diff options
Diffstat (limited to 'src/bindings/scripts')
390 files changed, 8056 insertions, 6044 deletions
diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index efee966da48..3c978e208e1 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -20,15 +20,15 @@ SET(trinityscript_LIB_SRCS scripts/creature/mob_generic_creature.cpp scripts/creature/simple_ai.cpp scripts/creature/simple_ai.h - scripts/custom/custom_example.cpp - scripts/custom/custom_gossip_codebox.cpp - scripts/custom/test.cpp + scripts/examples/example_creature.cpp + scripts/examples/example_escort.cpp + scripts/examples/example_gossip_codebox.cpp + scripts/examples/example_misc.cpp scripts/go/go_scripts.cpp scripts/guard/guard_ai.cpp scripts/guard/guard_ai.h scripts/guard/guards.cpp scripts/item/item_scripts.cpp - scripts/item/item_test.cpp scripts/npc/npc_escortAI.cpp scripts/npc/npc_escortAI.h scripts/npc/npc_innkeeper.cpp @@ -67,19 +67,19 @@ SET(trinityscript_LIB_SRCS scripts/zone/black_temple/def_black_temple.h scripts/zone/black_temple/illidari_council.cpp scripts/zone/black_temple/instance_black_temple.cpp - scripts/zone/blackrock_depths/blackrock_depths.cpp - scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp - scripts/zone/blackrock_depths/boss_anubshiah.cpp - scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp - scripts/zone/blackrock_depths/boss_general_angerforge.cpp + scripts/zone/blackrock_depths/blackrock_depths.cpp + scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp + scripts/zone/blackrock_depths/boss_anubshiah.cpp + scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp + scripts/zone/blackrock_depths/boss_general_angerforge.cpp scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp - scripts/zone/blackrock_depths/boss_grizzle.cpp - scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp - scripts/zone/blackrock_depths/boss_magmus.cpp - scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp - scripts/zone/blackrock_depths/boss_tomb_of_seven.cpp - scripts/zone/blackrock_depths/def_blackrock_depths.h - scripts/zone/blackrock_depths/instance_blackrock_depths.cpp + scripts/zone/blackrock_depths/boss_grizzle.cpp + scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp + scripts/zone/blackrock_depths/boss_magmus.cpp + scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp + scripts/zone/blackrock_depths/boss_tomb_of_seven.cpp + scripts/zone/blackrock_depths/def_blackrock_depths.h + scripts/zone/blackrock_depths/instance_blackrock_depths.cpp scripts/zone/blackrock_spire/boss_drakkisath.cpp scripts/zone/blackrock_spire/boss_gyth.cpp scripts/zone/blackrock_spire/boss_halycon.cpp @@ -106,6 +106,7 @@ SET(trinityscript_LIB_SRCS scripts/zone/blasted_lands/blasted_lands.cpp scripts/zone/blasted_lands/boss_kruul.cpp scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp + scripts/zone/borean_tundra/borean_tundra.cpp scripts/zone/burning_steppes/burning_steppes.cpp scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h scripts/zone/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -227,7 +228,6 @@ SET(trinityscript_LIB_SRCS scripts/zone/naxxramas/boss_gothik.cpp scripts/zone/naxxramas/boss_grobbulus.cpp scripts/zone/naxxramas/boss_heigan.cpp - scripts/zone/naxxramas/boss_highlord_mograine.cpp scripts/zone/naxxramas/boss_kelthuzad.cpp scripts/zone/naxxramas/boss_four_horsemen.cpp scripts/zone/naxxramas/boss_loatheb.cpp @@ -242,7 +242,7 @@ SET(trinityscript_LIB_SRCS scripts/zone/onyxias_lair/boss_onyxia.cpp scripts/zone/orgrimmar/orgrimmar.cpp scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp - scripts/zone/razorfen_kraul/razorfen_kraul.cpp + scripts/zone/razorfen_kraul/razorfen_kraul.cpp scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -352,6 +352,10 @@ SET(trinityscript_LIB_SRCS scripts/zone/uldaman/uldaman.cpp scripts/zone/undercity/undercity.cpp scripts/zone/ungoro_crater/ungoro_crater.cpp + scripts/zone/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp + scripts/zone/utgarde_keep/utgarde_keep/boss_keleseth.cpp + scripts/zone/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp + scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp scripts/zone/wailing_caverns/instance_wailing_caverns.cpp scripts/zone/western_plaguelands/western_plaguelands.cpp scripts/zone/westfall/westfall.cpp diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am new file mode 100644 index 00000000000..6798b1785dc --- /dev/null +++ b/src/bindings/scripts/Makefile.am @@ -0,0 +1,444 @@ +# Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> +# +# Thanks to the original authors: MaNGOS <http://getmangos.com/> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public 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 + +# build shared library +lib_LTLIBRARIES = libtrinityscript.la + +libtrinityscript_la_CPPFLAGS = \ +$(MYSQL_INCLUDES) \ +$(POSTGRE_INCLUDES) \ +-I$(top_srcdir)/dep/include \ +-I$(top_srcdir)/src/shared \ +-I$(top_srcdir)/src/framework \ +-I$(top_srcdir)/src/game \ +-I$(srcdir)/include \ +$(TRINI_INCLUDES) \ +-D_TRINITY_SCRIPT_CONFIG='"$(sysconfdir)/trinitycore.conf"' + +libtrinityscript_la_SOURCES = \ +ScriptMgr.cpp \ +ScriptMgr.h \ +include/precompiled.cpp \ +include/precompiled.h \ +include/sc_creature.cpp \ +include/sc_creature.h \ +include/sc_gossip.h \ +include/sc_instance.h \ +scripts/areatrigger/areatrigger_scripts.cpp \ +scripts/boss/boss_emeriss.cpp \ +scripts/boss/boss_lethon.cpp \ +scripts/boss/boss_taerar.cpp \ +scripts/boss/boss_ysondre.cpp \ +scripts/creature/mob_event_ai.cpp \ +scripts/creature/mob_event_ai.h \ +scripts/creature/mob_generic_creature.cpp \ +scripts/creature/simple_ai.cpp \ +scripts/creature/simple_ai.h \ +scripts/examples/example_creature.cpp \ +scripts/examples/example_escort.cpp \ +scripts/examples/example_gossip_codebox.cpp \ +scripts/examples/example_misc.cpp \ +scripts/go/go_scripts.cpp \ +scripts/guard/guard_ai.cpp \ +scripts/guard/guard_ai.h \ +scripts/guard/guards.cpp \ +scripts/item/item_scripts.cpp \ +scripts/npc/npc_escortAI.cpp \ +scripts/npc/npc_escortAI.h \ +scripts/npc/npc_innkeeper.cpp \ +scripts/npc/npc_professions.cpp \ +scripts/npc/npcs_special.cpp \ +scripts/zone/alterac_mountains/alterac_mountains.cpp \ +scripts/zone/arathi_highlands/arathi_highlands.cpp \ +scripts/zone/ashenvale_forest/ashenvale.cpp\ +scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp \ +scripts/zone/aunchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp \ +scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp \ +scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp \ +scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp \ +scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp \ +scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h \ +scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp \ +scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp \ +scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp \ +scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp \ +scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp \ +scripts/zone/aunchindoun/shadow_labyrinth/def_shadow_labyrinth.h \ +scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp \ +scripts/zone/azshara/azshara.cpp \ +scripts/zone/azshara/boss_azuregos.cpp \ +scripts/zone/azuremyst_isle/azuremyst_isle.cpp \ +scripts/zone/barrens/the_barrens.cpp \ +scripts/zone/black_temple/black_temple.cpp \ +scripts/zone/black_temple/boss_bloodboil.cpp \ +scripts/zone/black_temple/boss_illidan.cpp \ +scripts/zone/black_temple/boss_mother_shahraz.cpp \ +scripts/zone/black_temple/boss_reliquary_of_souls.cpp \ +scripts/zone/black_temple/boss_shade_of_akama.cpp \ +scripts/zone/black_temple/boss_supremus.cpp \ +scripts/zone/black_temple/boss_teron_gorefiend.cpp \ +scripts/zone/black_temple/boss_warlord_najentus.cpp \ +scripts/zone/black_temple/def_black_temple.h \ +scripts/zone/black_temple/illidari_council.cpp \ +scripts/zone/black_temple/instance_black_temple.cpp \ +scripts/zone/blackrock_depths/blackrock_depths.cpp \ +scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp \ +scripts/zone/blackrock_depths/boss_anubshiah.cpp \ +scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp \ +scripts/zone/blackrock_depths/boss_general_angerforge.cpp \ +scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp \ +scripts/zone/blackrock_depths/boss_grizzle.cpp \ +scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp \ +scripts/zone/blackrock_depths/boss_magmus.cpp \ +scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp \ +scripts/zone/blackrock_depths/boss_tomb_of_seven.cpp \ +scripts/zone/blackrock_depths/def_blackrock_depths.h \ +scripts/zone/blackrock_depths/instance_blackrock_depths.cpp \ +scripts/zone/blackrock_spire/boss_drakkisath.cpp \ +scripts/zone/blackrock_spire/boss_gyth.cpp \ +scripts/zone/blackrock_spire/boss_halycon.cpp \ +scripts/zone/blackrock_spire/boss_highlord_omokk.cpp \ +scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp \ +scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp \ +scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp \ +scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp \ +scripts/zone/blackrock_spire/boss_rend_blackhand.cpp \ +scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp \ +scripts/zone/blackrock_spire/boss_the_beast.cpp \ +scripts/zone/blackrock_spire/boss_warmaster_voone.cpp \ +scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp \ +scripts/zone/blackwing_lair/boss_chromaggus.cpp \ +scripts/zone/blackwing_lair/boss_ebonroc.cpp \ +scripts/zone/blackwing_lair/boss_firemaw.cpp \ +scripts/zone/blackwing_lair/boss_flamegor.cpp \ +scripts/zone/blackwing_lair/boss_nefarian.cpp \ +scripts/zone/blackwing_lair/boss_razorgore.cpp \ +scripts/zone/blackwing_lair/boss_vaelastrasz.cpp \ +scripts/zone/blackwing_lair/boss_victor_nefarius.cpp \ +scripts/zone/blackwing_lair/instance_blackwing_lair.cpp \ +scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp \ +scripts/zone/blasted_lands/blasted_lands.cpp \ +scripts/zone/blasted_lands/boss_kruul.cpp \ +scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp \ +scripts/zone/borean_tundra/borean_tundra.cpp \ +scripts/zone/burning_steppes/burning_steppes.cpp \ +scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp \ +scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp \ +scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp \ +scripts/zone/caverns_of_time/dark_portal/dark_portal.cpp \ +scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h \ +scripts/zone/caverns_of_time/dark_portal/instance_dark_portal.cpp \ +scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp \ +scripts/zone/caverns_of_time/hyjal/def_hyjal.h \ +scripts/zone/caverns_of_time/hyjal/hyjal.cpp \ +scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp \ +scripts/zone/caverns_of_time/hyjal/hyjalAI.h \ +scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp \ +scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp \ +scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp \ +scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp \ +scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h \ +scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp \ +scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp \ +scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h \ +scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp \ +scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp \ +scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp \ +scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp \ +scripts/zone/coilfang_resevoir/steam_vault/def_steam_vault.h \ +scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp \ +scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp \ +scripts/zone/darkshore/darkshore.cpp \ +scripts/zone/deadmines/deadmines.cpp \ +scripts/zone/deadmines/def_deadmines.h \ +scripts/zone/dun_morogh/dun_morogh.cpp \ +scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp \ +scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp \ +scripts/zone/elwynn_forest/elwynn_forest.cpp \ +scripts/zone/eversong_woods/eversong_woods.cpp \ +scripts/zone/felwood/felwood.cpp \ +scripts/zone/feralas/feralas.cpp \ +scripts/zone/ghostlands/ghostlands.cpp \ +scripts/zone/gruuls_lair/boss_gruul.cpp \ +scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp \ +scripts/zone/gruuls_lair/def_gruuls_lair.h \ +scripts/zone/gruuls_lair/instance_gruuls_lair.cpp \ +scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp \ +scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp \ +scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp \ +scripts/zone/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp \ +scripts/zone/hellfire_citadel/blood_furnace/def_blood_furnace.h \ +scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp \ +scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp \ +scripts/zone/hellfire_citadel/hellfire_ramparts/boss_vazruden_the_herald.cpp \ +scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp \ +scripts/zone/hellfire_citadel/magtheridons_lair/def_magtheridons_lair.h \ +scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp \ +scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp \ +scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp \ +scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp \ +scripts/zone/hellfire_citadel/shattered_halls/def_shattered_halls.h \ +scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp \ +scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp \ +scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp \ +scripts/zone/ironforge/ironforge.cpp \ +scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp \ +scripts/zone/karazhan/boss_curator.cpp \ +scripts/zone/karazhan/boss_maiden_of_virtue.cpp \ +scripts/zone/karazhan/boss_midnight.cpp \ +scripts/zone/karazhan/boss_moroes.cpp \ +scripts/zone/karazhan/boss_netherspite.cpp \ +scripts/zone/karazhan/boss_nightbane.cpp \ +scripts/zone/karazhan/boss_prince_malchezaar.cpp \ +scripts/zone/karazhan/boss_shade_of_aran.cpp \ +scripts/zone/karazhan/boss_terestian_illhoof.cpp \ +scripts/zone/karazhan/bosses_opera.cpp \ +scripts/zone/karazhan/def_karazhan.h \ +scripts/zone/karazhan/instance_karazhan.cpp \ +scripts/zone/karazhan/karazhan.cpp \ +scripts/zone/loch_modan/loch_modan.cpp \ +scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp \ +scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp \ +scripts/zone/magisters_terrace/boss_selin_fireheart.cpp \ +scripts/zone/magisters_terrace/boss_vexallus.cpp \ +scripts/zone/magisters_terrace/def_magisters_terrace.h \ +scripts/zone/magisters_terrace/instance_magisters_terrace.cpp \ +scripts/zone/maraudon/boss_celebras_the_cursed.cpp \ +scripts/zone/maraudon/boss_landslide.cpp \ +scripts/zone/maraudon/boss_noxxion.cpp \ +scripts/zone/maraudon/boss_princess_theradras.cpp \ +scripts/zone/molten_core/boss_baron_geddon.cpp \ +scripts/zone/molten_core/boss_garr.cpp \ +scripts/zone/molten_core/boss_gehennas.cpp \ +scripts/zone/molten_core/boss_golemagg.cpp \ +scripts/zone/molten_core/boss_lucifron.cpp \ +scripts/zone/molten_core/boss_magmadar.cpp \ +scripts/zone/molten_core/boss_majordomo_executus.cpp \ +scripts/zone/molten_core/boss_ragnaros.cpp \ +scripts/zone/molten_core/boss_shazzrah.cpp \ +scripts/zone/molten_core/boss_sulfuron_harbinger.cpp \ +scripts/zone/molten_core/def_molten_core.h \ +scripts/zone/molten_core/instance_molten_core.cpp \ +scripts/zone/molten_core/molten_core.cpp \ +scripts/zone/moonglade/moonglade.cpp \ +scripts/zone/mulgore/mulgore.cpp \ +scripts/zone/nagrand/nagrand.cpp \ +scripts/zone/naxxramas/boss_anubrekhan.cpp \ +scripts/zone/naxxramas/boss_faerlina.cpp \ +scripts/zone/naxxramas/boss_gluth.cpp \ +scripts/zone/naxxramas/boss_gothik.cpp \ +scripts/zone/naxxramas/boss_grobbulus.cpp \ +scripts/zone/naxxramas/boss_heigan.cpp \ +scripts/zone/naxxramas/boss_kelthuzad.cpp \ +scripts/zone/naxxramas/boss_four_horsemen.cpp \ +scripts/zone/naxxramas/boss_loatheb.cpp \ +scripts/zone/naxxramas/boss_maexxna.cpp \ +scripts/zone/naxxramas/boss_noth.cpp \ +scripts/zone/naxxramas/boss_patchwerk.cpp \ +scripts/zone/naxxramas/boss_razuvious.cpp \ +scripts/zone/naxxramas/boss_sapphiron.cpp \ +scripts/zone/naxxramas/boss_thaddius.cpp \ +scripts/zone/naxxramas/instance_naxxramas.cpp \ +scripts/zone/netherstorm/netherstorm.cpp \ +scripts/zone/onyxias_lair/boss_onyxia.cpp \ +scripts/zone/orgrimmar/orgrimmar.cpp \ +scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp \ +scripts/zone/razorfen_kraul/razorfen_kraul.cpp \ +scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp \ +scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp \ +scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp \ +scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp \ +scripts/zone/ruins_of_ahnqiraj/boss_ossirian.cpp \ +scripts/zone/ruins_of_ahnqiraj/boss_rajaxx.cpp \ +scripts/zone/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp \ +scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp \ +scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp \ +scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp \ +scripts/zone/scarlet_monastery/boss_herod.cpp \ +scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp \ +scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp \ +scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp \ +scripts/zone/scarlet_monastery/boss_scorn.cpp \ +scripts/zone/scarlet_monastery/boss_headless_horseman.cpp \ +scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp \ +scripts/zone/scarlet_monastery/instance_scarlet_monastery.cpp \ +scripts/zone/scarlet_monastery/def_scarlet_monastery.h \ +scripts/zone/scholomance/boss_darkmaster_gandling.cpp \ +scripts/zone/scholomance/boss_death_knight_darkreaver.cpp \ +scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp \ +scripts/zone/scholomance/boss_illucia_barov.cpp \ +scripts/zone/scholomance/boss_instructor_malicia.cpp \ +scripts/zone/scholomance/boss_jandice_barov.cpp \ +scripts/zone/scholomance/boss_kormok.cpp \ +scripts/zone/scholomance/boss_lord_alexei_barov.cpp \ +scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp \ +scripts/zone/scholomance/boss_ras_frostwhisper.cpp \ +scripts/zone/scholomance/boss_the_ravenian.cpp \ +scripts/zone/scholomance/boss_vectus.cpp \ +scripts/zone/scholomance/def_scholomance.h \ +scripts/zone/scholomance/instance_scholomance.cpp \ +scripts/zone/searing_gorge/searing_gorge.cpp \ +scripts/zone/shadowfang_keep/def_shadowfang_keep.h \ +scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp \ +scripts/zone/shadowfang_keep/shadowfang_keep.cpp \ +scripts/zone/shadowmoon_valley/boss_doomwalker.cpp \ +scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp \ +scripts/zone/shattrath/shattrath_city.cpp \ +scripts/zone/silithus/silithus.cpp \ +scripts/zone/silvermoon/silvermoon_city.cpp \ +scripts/zone/silverpine_forest/silverpine_forest.cpp \ +scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp \ +scripts/zone/stormwind/stormwind_city.cpp \ +scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp \ +scripts/zone/stratholme/boss_baron_rivendare.cpp \ +scripts/zone/stratholme/boss_baroness_anastari.cpp \ +scripts/zone/stratholme/boss_cannon_master_willey.cpp \ +scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp \ +scripts/zone/stratholme/boss_magistrate_barthilas.cpp \ +scripts/zone/stratholme/boss_maleki_the_pallid.cpp \ +scripts/zone/stratholme/boss_nerubenkan.cpp \ +scripts/zone/stratholme/boss_order_of_silver_hand.cpp \ +scripts/zone/stratholme/boss_postmaster_malown.cpp \ +scripts/zone/stratholme/boss_ramstein_the_gorger.cpp \ +scripts/zone/stratholme/boss_timmy_the_cruel.cpp \ +scripts/zone/stratholme/def_stratholme.h \ +scripts/zone/stratholme/instance_stratholme.cpp \ +scripts/zone/stratholme/stratholme.cpp \ +scripts/zone/sunwell_plateau/boss_eredar_twins.cpp \ +scripts/zone/sunwell_plateau/boss_felmyst.cpp \ +scripts/zone/sunwell_plateau/boss_brutallus.cpp \ +scripts/zone/sunwell_plateau/boss_kalecgos.cpp \ +scripts/zone/sunwell_plateau/def_sunwell_plateau.h \ +scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp \ +scripts/zone/tanaris/tanaris.cpp \ +scripts/zone/tempest_keep/arcatraz/arcatraz.cpp \ +scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp \ +scripts/zone/tempest_keep/arcatraz/def_arcatraz.h \ +scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp \ +scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp \ +scripts/zone/tempest_keep/botanica/boss_laj.cpp \ +scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp \ +scripts/zone/tempest_keep/the_eye/boss_alar.cpp \ +scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp \ +scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp \ +scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp \ +scripts/zone/tempest_keep/the_eye/def_the_eye.h \ +scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp \ +scripts/zone/tempest_keep/the_eye/the_eye.cpp \ +scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp \ +scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp \ +scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp \ +scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp \ +scripts/zone/tempest_keep/the_mechanar/def_mechanar.h \ +scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp \ +scripts/zone/temple_of_ahnqiraj/boss_viscidus.cpp \ +scripts/zone/temple_of_ahnqiraj/def_temple_of_ahnqiraj.h \ +scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp \ +scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp \ +scripts/zone/terokkar_forest/terokkar_forest.cpp \ +scripts/zone/thunder_bluff/thunder_bluff.cpp \ +scripts/zone/tirisfal_glades/tirisfal_glades.cpp \ +scripts/zone/thousand_needles/thousand_needles.cpp \ +scripts/zone/uldaman/boss_archaedas.cpp \ +scripts/zone/uldaman/instance_uldaman.cpp \ +scripts/zone/uldaman/boss_ironaya.cpp \ +scripts/zone/uldaman/uldaman.cpp \ +scripts/zone/undercity/undercity.cpp \ +scripts/zone/ungoro_crater/ungoro_crater.cpp \ +scripts/zone/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp \ +scripts/zone/utgarde_keep/utgarde_keep/boss_keleseth.cpp \ +scripts/zone/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp \ +scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp \ +scripts/zone/wailing_caverns/instance_wailing_caverns.cpp \ +scripts/zone/western_plaguelands/western_plaguelands.cpp \ +scripts/zone/westfall/westfall.cpp \ +scripts/zone/winterspring/winterspring.cpp \ +scripts/zone/zangarmarsh/zangarmarsh.cpp \ +scripts/zone/zulaman/boss_akilzon.cpp \ +scripts/zone/zulaman/boss_halazzi.cpp \ +scripts/zone/zulaman/boss_hexlord.cpp \ +scripts/zone/zulaman/boss_janalai.cpp \ +scripts/zone/zulaman/boss_nalorakk.cpp \ +scripts/zone/zulaman/boss_zuljin.cpp \ +scripts/zone/zulaman/def_zulaman.h \ +scripts/zone/zulaman/instance_zulaman.cpp \ +scripts/zone/zulaman/zulaman.cpp \ +scripts/zone/zulfarrak/zulfarrak.cpp \ +scripts/zone/zulgurub/boss_arlokk.cpp \ +scripts/zone/zulgurub/boss_gahzranka.cpp \ +scripts/zone/zulgurub/boss_grilek.cpp \ +scripts/zone/zulgurub/boss_hakkar.cpp \ +scripts/zone/zulgurub/boss_hazzarah.cpp \ +scripts/zone/zulgurub/boss_jeklik.cpp \ +scripts/zone/zulgurub/boss_jindo.cpp \ +scripts/zone/zulgurub/boss_mandokir.cpp \ +scripts/zone/zulgurub/boss_marli.cpp \ +scripts/zone/zulgurub/boss_renataki.cpp \ +scripts/zone/zulgurub/boss_thekal.cpp \ +scripts/zone/zulgurub/boss_venoxis.cpp \ +scripts/zone/zulgurub/boss_wushoolay.cpp \ +scripts/zone/zulgurub/def_zulgurub.h \ +scripts/zone/zulgurub/instance_zulgurub.cpp \ +system.cpp + +## libtool settings +# API versioning +# Increase the last number, if you do bug fixes only, no interface change. +# Increase the middle number when you augmented the interface ( aka add new exported functions ). +# Increase the first number when you break old interface. ( aka remove/change previously exported functions ). +libtrinityscript_la_LIBFLAGS = -version-info 0:0:1 +libtrinityscript_la_LIBADD = $(MYSQL_LIBS) $(POSTGRE_LIBS) + +## Additional files to install +## sysconf_DATA = + +## EXTRA_DIST = + +## Prevend overwrite of the config file, if its already installed +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) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$dest"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$dest; \ + fi; \ + done + + + diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index b176c763f1f..56802718081 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -5,10 +5,9 @@ #include "precompiled.h" #include "Config/Config.h" #include "Database/DatabaseEnv.h" -#include "Database/DBCStores.h" +#include "DBCStores.h" #include "ObjectMgr.h" #include "ProgressBar.h" -#include "scripts/creature/mob_event_ai.h" #define _FULLVERSION "TrinityScript" @@ -16,7 +15,6 @@ # define _TRINITY_SCRIPT_CONFIG "trinitycore.conf" #endif _TRINITY_SCRIPT_CONFIG -//*** Global data *** int num_sc_scripts; Script *m_scripts[MAX_SCRIPTS]; @@ -32,36 +30,13 @@ struct StringTextData uint32 Emote; }; -// Enums used by StringTextData::Type -enum ChatType -{ - CHAT_TYPE_SAY = 0, - CHAT_TYPE_YELL = 1, - CHAT_TYPE_TEXT_EMOTE = 2, - CHAT_TYPE_BOSS_EMOTE = 3, - CHAT_TYPE_WHISPER = 4, - CHAT_TYPE_BOSS_WHISPER = 5, -}; - #define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available // Text Maps UNORDERED_MAP<int32, StringTextData> TextMap; -//*** End Global data *** - -//*** EventAI data *** -//Event AI structure. Used exclusivly by mob_event_ai.cpp (60 bytes each) -UNORDERED_MAP<uint32, std::vector<EventAI_Event> > EventAI_Event_Map; - -//Event AI summon structure. Used exclusivly by mob_event_ai.cpp. -UNORDERED_MAP<uint32, EventAI_Summon> EventAI_Summon_Map; - -//Event AI error prevention structure. Used at runtime to prevent error log spam of same creature id. -//UNORDERED_MAP<uint32, EventAI_CreatureError> EventAI_CreatureErrorPreventionList; - -uint32 EAI_ErrorLevel; -//*** End EventAI data *** +// Waypoint lists +std::list<PointMovement> PointMovementList; void FillSpellSummary(); void LoadOverridenSQLData(); @@ -78,13 +53,15 @@ extern void AddSC_boss_taerar(); extern void AddSC_boss_ysondre(); // -- Creature -- -extern void AddSC_mob_event(); extern void AddSC_generic_creature(); // -- Custom -- -extern void AddSC_custom_example(); -extern void AddSC_custom_gossip_codebox(); -extern void AddSC_test(); + +// -- Examples -- +extern void AddSC_example_creature(); +extern void AddSC_example_escort(); +extern void AddSC_example_gossip_codebox(); +extern void AddSC_example_misc(); // -- GO -- extern void AddSC_go_scripts(); @@ -96,7 +73,6 @@ extern void AddSC_guards(); // -- Item -- extern void AddSC_item_scripts(); -extern void AddSC_item_test(); // -- NPC -- extern void AddSC_npc_professions(); @@ -211,6 +187,9 @@ extern void AddSC_blasted_lands(); //Bloodmyst Isle extern void AddSC_bloodmyst_isle(); +//Borean Tundra +extern void AddSC_borean_tundra(); + //Burning steppes extern void AddSC_burning_steppes(); @@ -395,14 +374,13 @@ extern void AddSC_boss_anubrekhan(); extern void AddSC_boss_maexxna(); extern void AddSC_boss_patchwerk(); extern void AddSC_boss_razuvious(); -extern void AddSC_boss_highlord_mograine(); extern void AddSC_boss_kelthuzad(); -extern void AddSC_boss_faerlina(); extern void AddSC_boss_loatheb(); extern void AddSC_boss_noth(); extern void AddSC_boss_gluth(); extern void AddSC_boss_sapphiron(); extern void AddSC_boss_four_horsemen(); +extern void AddSC_boss_faerlina(); //Netherstorm extern void AddSC_netherstorm(); @@ -571,6 +549,13 @@ extern void AddSC_undercity(); extern void AddSC_ungoro_crater(); //Upper blackrock spire + +//Utgarde Keep +extern void AddSC_boss_keleseth(); +extern void AddSC_boss_skarvald_dalronn(); +extern void AddSC_boss_ingvar_the_plunderer(); +extern void AddSC_instance_utgarde_keep(); + //Wailing caverns //Western plaguelands @@ -619,17 +604,17 @@ extern void AddSC_zulaman(); void LoadDatabase() { //Get db string from file - char const* dbstring = NULL; + std::string dbstring = TScriptConfig.GetStringDefault("WorldDatabaseInfo", ""); - if (!TScriptConfig.GetString("WorldDatabaseInfo", &dbstring) ) + if (dbstring.empty() ) { error_log("TSCR: Missing world database info from configuration file. Load database aborted."); return; } //Initialize connection to DB - if (dbstring && TScriptDB.Initialize(dbstring) ) - outstring_log("TSCR: TrinityScript database: %s",dbstring); + if (!dbstring.empty() && TScriptDB.Initialize(dbstring.c_str()) ) + outstring_log("TSCR: TrinityScript database: %s",dbstring.c_str()); else { error_log("TSCR: Unable to connect to Database. Load database aborted."); @@ -663,8 +648,7 @@ void LoadDatabase() LoadTrinityStrings(TScriptDB,"eventai_texts",-1,1+(TEXT_SOURCE_RANGE)); // Gather Additional data from EventAI Texts - //result = TScriptDB.PQuery("SELECT entry, sound, type, language, emote FROM eventai_texts"); - result = TScriptDB.PQuery("SELECT entry, sound, type, language FROM eventai_texts"); + result = TScriptDB.PQuery("SELECT entry, sound, type, language, emote FROM eventai_texts"); outstring_log("TSCR: Loading EventAI Texts additional data..."); if (result) @@ -682,7 +666,7 @@ void LoadDatabase() temp.SoundId = fields[1].GetInt32(); temp.Type = fields[2].GetInt32(); temp.Language = fields[3].GetInt32(); - temp.Emote = 0;//fields[4].GetInt32(); + temp.Emote = fields[4].GetInt32(); if (i >= 0) { @@ -854,455 +838,65 @@ void LoadDatabase() outstring_log(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); } - //Gather additional data for EventAI - result = TScriptDB.PQuery("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM eventai_summons"); - - //Drop Existing EventSummon Map - EventAI_Summon_Map.clear(); + // Drop Existing Waypoint list + PointMovementList.clear(); + uint64 uiCreatureCount = 0; - outstring_log("TSCR: Loading EventAI Summons..."); + // Load Waypoints + result = TScriptDB.PQuery("SELECT COUNT(entry) FROM script_waypoint GROUP BY entry"); if (result) { - barGoLink bar(result->GetRowCount()); - uint32 Count = 0; - - do - { - bar.step(); - Field *fields = result->Fetch(); - - EventAI_Summon temp; - - uint32 i = fields[0].GetUInt32(); - temp.position_x = fields[1].GetFloat(); - temp.position_y = fields[2].GetFloat(); - temp.position_z = fields[3].GetFloat(); - temp.orientation = fields[4].GetFloat(); - temp.SpawnTimeSecs = fields[5].GetUInt32(); - - //Add to map - EventAI_Summon_Map[i] = temp; - ++Count; - }while (result->NextRow()); - + uiCreatureCount = result->GetRowCount(); delete result; - - outstring_log(""); - outstring_log(">> Loaded %u EventAI summon definitions", Count); - }else - { - barGoLink bar(1); - bar.step(); - outstring_log(""); - outstring_log(">> Loaded 0 EventAI Summon definitions. DB table `eventai_summons` is empty."); } - //Gather event data - result = TScriptDB.PQuery("SELECT 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 " - "FROM eventai_scripts"); + outstring_log("SD2: Loading Script Waypoints for %u creature(s)...", uiCreatureCount); - //Drop Existing EventAI List - EventAI_Event_Map.clear(); + result = TScriptDB.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid"); - outstring_log("TSCR: Loading EventAI scripts..."); if (result) { barGoLink bar(result->GetRowCount()); - uint32 Count = 0; + uint32 uiNodeCount = 0; do { bar.step(); - Field *fields = result->Fetch(); - - EventAI_Event temp; - - temp.event_id = fields[0].GetUInt32(); - uint32 i = temp.event_id; - temp.creature_id = fields[1].GetUInt32(); - uint32 creature_id = temp.creature_id; - temp.event_type = fields[2].GetUInt16(); - temp.event_inverse_phase_mask = fields[3].GetUInt32(); - temp.event_chance = fields[4].GetUInt8(); - temp.event_flags = fields[5].GetUInt8(); - temp.event_param1 = fields[6].GetUInt32(); - temp.event_param2 = fields[7].GetUInt32(); - temp.event_param3 = fields[8].GetUInt32(); - temp.event_param4 = fields[9].GetUInt32(); - - //Creature does not exist in database - if (!GetCreatureTemplateStore(temp.creature_id)) - error_db_log("TSCR: Event %u has script for non-existing creature.", i); - - //Report any errors in event - if (temp.event_type >= EVENT_T_END) - error_db_log("TSCR: Event %u has incorrect event type. Maybe DB requires updated version of SD2.", i); - - //No chance of this event occuring - if (temp.event_chance == 0) - error_db_log("TSCR: Event %u has 0 percent chance. Event will never trigger!", i); - - //Chance above 100, force it to be 100 - if (temp.event_chance > 100) - { - error_db_log("TSCR: Creature %u are using event %u with more than 100 percent chance. Adjusting to 100 percent.", temp.creature_id, i); - temp.event_chance = 100; - } - - //Individual event checks - switch (temp.event_type) - { - case EVENT_T_HP: - case EVENT_T_MANA: - case EVENT_T_TARGET_HP: - { - if (temp.event_param2 > 100) - error_db_log("TSCR: Creature %u are using percentage event(%u) with param2 (MinPercent) > 100. Event will never trigger! ", temp.creature_id, i); - - if (temp.event_param1 <= temp.event_param2) - error_db_log("TSCR: Creature %u are using percentage event(%u) with param1 <= param2 (MaxPercent <= MinPercent). Event will never trigger! ", temp.creature_id, i); - - if (temp.event_flags & EFLAG_REPEATABLE && !temp.event_param3 && !temp.event_param4) - { - error_db_log("TSCR: Creature %u has param3 and param4=0 (RepeatMin/RepeatMax) but cannot be repeatable without timers. Removing EFLAG_REPEATABLE for event %u.", temp.creature_id, i); - temp.event_flags &= ~EFLAG_REPEATABLE; - } - } - break; - - case EVENT_T_SPELLHIT: - { - if (temp.event_param1) - { - SpellEntry const* pSpell = GetSpellStore()->LookupEntry(temp.event_param1); - if (!pSpell) - { - error_db_log("TSCR: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.event_param1, i); - continue; - } - - if (temp.event_param2_s != -1 && temp.event_param2 != pSpell->SchoolMask) - error_db_log("TSCR: Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.", temp.creature_id, temp.event_param1, i); - } - - //TODO: fix this system with SPELL_SCHOOL_MASK. Current complicate things, using int32(-1) instead of just 0 - //SPELL_SCHOOL_MASK_NONE = 0 and does not exist, thus it can not ever trigger or be used in SpellHit() - if (temp.event_param2_s != -1 && temp.event_param2_s > SPELL_SCHOOL_MASK_ALL) - error_db_log("TSCR: Creature %u is using invalid SpellSchoolMask(%u) defined in event %u.", temp.creature_id, temp.event_param2, i); - - if (temp.event_param4 < temp.event_param3) - error_db_log("TSCR: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); - } - break; - - case EVENT_T_RANGE: - case EVENT_T_OOC_LOS: - case EVENT_T_FRIENDLY_HP: - case EVENT_T_FRIENDLY_IS_CC: - case EVENT_T_FRIENDLY_MISSING_BUFF: - { - if (temp.event_param4 < temp.event_param3) - error_db_log("TSCR: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); - } - break; - - case EVENT_T_TIMER: - case EVENT_T_TIMER_OOC: - { - if (temp.event_param2 < temp.event_param1) - error_db_log("TSCR: Creature %u are using timed event(%u) with param2 < param1 (InitialMax < InitialMin). Event will never repeat.", temp.creature_id, i); - - if (temp.event_param4 < temp.event_param3) - error_db_log("TSCR: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); - } - break; - - case EVENT_T_KILL: - case EVENT_T_TARGET_CASTING: - { - if (temp.event_param2 < temp.event_param1) - error_db_log("TSCR: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); - } - break; - - case EVENT_T_AGGRO: - case EVENT_T_DEATH: - case EVENT_T_EVADE: - case EVENT_T_SPAWNED: - case EVENT_T_REACHED_HOME: - { - if (temp.event_flags & EFLAG_REPEATABLE) - { - error_db_log("TSCR: Creature %u has EFLAG_REPEATABLE set. Event can never be repeatable. Removing flag for event %u.", temp.creature_id, i); - temp.event_flags &= ~EFLAG_REPEATABLE; - } - } - break; - } - - for (uint32 j = 0; j < MAX_ACTIONS; j++) + Field* pFields = result->Fetch(); + PointMovement pTemp; + + pTemp.m_uiCreatureEntry = pFields[0].GetUInt32(); + pTemp.m_uiPointId = pFields[1].GetUInt32(); + pTemp.m_fX = pFields[2].GetFloat(); + pTemp.m_fY = pFields[3].GetFloat(); + pTemp.m_fZ = pFields[4].GetFloat(); + pTemp.m_uiWaitTime = pFields[5].GetUInt32(); + + CreatureInfo const* pCInfo = GetCreatureTemplateStore(pTemp.m_uiCreatureEntry); + if (!pCInfo) { - temp.action[j].type = fields[10+(j*4)].GetUInt16(); - temp.action[j].param1 = fields[11+(j*4)].GetUInt32(); - temp.action[j].param2 = fields[12+(j*4)].GetUInt32(); - temp.action[j].param3 = fields[13+(j*4)].GetUInt32(); - - //Report any errors in actions - switch (temp.action[j].type) - { - case ACTION_T_TEXT: - { - if (temp.action[j].param1_s < 0) - { - if (TextMap.find(temp.action[j].param1_s) == TextMap.end()) - error_db_log("TSCR: Event %u Action %u param1 refrences non-existing entry in texts table.", i, j+1); - } - if (temp.action[j].param2_s < 0) - { - if (TextMap.find(temp.action[j].param2_s) == TextMap.end()) - error_db_log("TSCR: Event %u Action %u param2 refrences non-existing entry in texts table.", i, j+1); - - if (!temp.action[j].param1_s) - error_db_log("TSCR: Event %u Action %u has param2, but param1 is not set. Required for randomized text.", i, j+1); - } - if (temp.action[j].param3_s < 0) - { - if (TextMap.find(temp.action[j].param3_s) == TextMap.end()) - error_db_log("TSCR: Event %u Action %u param3 refrences non-existing entry in texts table.", i, j+1); - - if (!temp.action[j].param1_s || !temp.action[j].param2_s) - error_db_log("TSCR: Event %u Action %u has param3, but param1 and/or param2 is not set. Required for randomized text.", i, j+1); - } - } - break; - case ACTION_T_SET_FACTION: - /*if (temp.action[j].param1 !=0 && !GetFactionStore()->LookupEntry(temp.action[j].param1)) - { - error_db_log("SD2: Event %u Action %u uses non-existant FactionId %u.", i, j+1, temp.action[j].param1); - temp.action[j].param1 = 0; - }*/ - break; - case ACTION_T_MORPH_TO_ENTRY_OR_MODEL: - if (temp.action[j].param1 !=0 || temp.action[j].param2 !=0) - { - if (temp.action[j].param1 && !GetCreatureTemplateStore(temp.action[j].param1)) - { - error_db_log("TSCR: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, temp.action[j].param1); - temp.action[j].param1 = 0; - } - - /*if (temp.action[j].param2 && !GetCreatureDisplayStore()->LookupEntry(temp.action[j].param2)) - { - error_db_log("TSCR: Event %u Action %u uses non-existant ModelId %u.", i, j+1, temp.action[j].param2); - temp.action[j].param2 = 0; - }*/ - } - break; - case ACTION_T_SOUND: - if (!GetSoundEntriesStore()->LookupEntry(temp.action[j].param1)) - error_db_log("TSCR: Event %u Action %u uses non-existant SoundID %u.", i, j+1, temp.action[j].param1); - break; - - /*case ACTION_T_RANDOM_SOUND: - { - if(!GetSoundEntriesStore()->LookupEntry(temp.action[j].param1)) - error_db_log("TSCR: Event %u Action %u param1 uses non-existant SoundID %u.", i, j+1, temp.action[j].param1); - if(!GetSoundEntriesStore()->LookupEntry(temp.action[j].param2)) - error_db_log("TSCR: Event %u Action %u param2 uses non-existant SoundID %u.", i, j+1, temp.action[j].param2); - if(!GetSoundEntriesStore()->LookupEntry(temp.action[j].param3)) - error_db_log("TSCR: Event %u Action %u param3 uses non-existant SoundID %u.", i, j+1, temp.action[j].param3); - } - break;*/ - - case ACTION_T_CAST: - { - const SpellEntry *spell = GetSpellStore()->LookupEntry(temp.action[j].param1); - if (!spell) - error_db_log("SD2: Event %u Action %u uses non-existant SpellID %u.", i, j+1, temp.action[j].param1); - else - { - if (spell->RecoveryTime > 0 && temp.event_flags & EFLAG_REPEATABLE) - { - //output as debug for now, also because there's no general rule all spells have RecoveryTime - if (temp.event_param3 < spell->RecoveryTime) - debug_log("SD2: Event %u Action %u uses SpellID %u but cooldown is longer(%u) than minumum defined in event param3(%u).", i, j+1,temp.action[j].param1, spell->RecoveryTime, temp.event_param3); - } - } - - if (temp.action[j].param2 >= TARGET_T_END) - error_db_log("TSCR: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - - case ACTION_T_REMOVEAURASFROMSPELL: - { - if (!GetSpellStore()->LookupEntry(temp.action[j].param2)) - error_db_log("TSCR: Event %u Action %u uses non-existant SpellID %u.", i, j+1, temp.action[j].param2); - - if (temp.action[j].param1 >= TARGET_T_END) - error_db_log("TSCR: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - case ACTION_T_QUEST_EVENT: - { - if (Quest const* qid = GetQuestTemplateStore(temp.action[j].param1)) - { - if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) - error_db_log("SD2: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, temp.action[j].param1); - } - else - error_db_log("SD2: Event %u Action %u uses non-existant Quest entry %u.", i, j+1, temp.action[j].param1); - - if (temp.action[j].param2 >= TARGET_T_END) - error_db_log("SD2: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - case ACTION_T_QUEST_EVENT_ALL: - { - if (Quest const* qid = GetQuestTemplateStore(temp.action[j].param1)) - { - if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT)) - error_db_log("SD2: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, temp.action[j].param1); - } - else - error_db_log("SD2: Event %u Action %u uses non-existant Quest entry %u.", i, j+1, temp.action[j].param1); - } - break; - case ACTION_T_CASTCREATUREGO: - { - if (!GetCreatureTemplateStore(temp.action[j].param1)) - error_db_log("SD2: Event %u Action %u uses non-existant creature entry %u.", i, j+1, temp.action[j].param1); - - if (!GetSpellStore()->LookupEntry(temp.action[j].param2)) - error_db_log("TSCR: Event %u Action %u uses non-existant SpellID %u.", i, j+1, temp.action[j].param2); - - if (temp.action[j].param3 >= TARGET_T_END) - error_db_log("SD2: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - case ACTION_T_CASTCREATUREGO_ALL: - { - if (!GetQuestTemplateStore(temp.action[j].param1)) - error_db_log("SD2: Event %u Action %u uses non-existant Quest entry %u.", i, j+1, temp.action[j].param1); - - if (!GetSpellStore()->LookupEntry(temp.action[j].param2)) - error_db_log("SD2: Event %u Action %u uses non-existant SpellID %u.", i, j+1, temp.action[j].param2); - } - break; - - //2nd param target - case ACTION_T_SUMMON_ID: - { - if (!GetCreatureTemplateStore(temp.action[j].param1)) - error_db_log("SD2: Event %u Action %u uses non-existant creature entry %u.", i, j+1, temp.action[j].param1); - - if (EventAI_Summon_Map.find(temp.action[j].param3) == EventAI_Summon_Map.end()) - error_db_log("TSCR: Event %u Action %u summons missing EventAI_Summon %u", i, j+1, temp.action[j].param3); - - if (temp.action[j].param2 >= TARGET_T_END) - error_db_log("TSCR: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - case ACTION_T_KILLED_MONSTER: - { - if (!GetCreatureTemplateStore(temp.action[j].param1)) - error_db_log("SD2: Event %u Action %u uses non-existant creature entry %u.", i, j+1, temp.action[j].param1); - - if (temp.action[j].param2 >= TARGET_T_END) - error_db_log("SD2: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - case ACTION_T_SUMMON: - { - if (!GetCreatureTemplateStore(temp.action[j].param1)) - error_db_log("SD2: Event %u Action %u uses non-existant creature entry %u.", i, j+1, temp.action[j].param1); - - if (temp.action[j].param2 >= TARGET_T_END) - error_db_log("SD2: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - case ACTION_T_THREAT_SINGLE_PCT: - case ACTION_T_SET_UNIT_FLAG: - case ACTION_T_REMOVE_UNIT_FLAG: - if (temp.action[j].param2 >= TARGET_T_END) - error_db_log("TSCR: Event %u Action %u uses incorrect Target type", i, j+1); - break; - - //3rd param target - case ACTION_T_SET_UNIT_FIELD: - if (temp.action[j].param1 < OBJECT_END || temp.action[j].param1 >= UNIT_END) - error_db_log("SD2: Event %u Action %u param1 (UNIT_FIELD*). Index out of range for intended use.", i, j+1); - if (temp.action[j].param3 >= TARGET_T_END) - error_db_log("TSCR: Event %u Action %u uses incorrect Target type", i, j+1); - break; - - case ACTION_T_SET_PHASE: - if (temp.action[j].param1 > 31) - error_db_log("TSCR: Event %u Action %u attempts to set phase > 31. Phase mask cannot be used past phase 31.", i, j+1); - break; - - case ACTION_T_INC_PHASE: - if (!temp.action[j].param1) - error_db_log("SD2: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1); - break; - - case ACTION_T_SET_INST_DATA: - { - if (!(temp.event_flags & EFLAG_NORMAL) && !(temp.event_flags & EFLAG_HEROIC)) - error_db_log("SD2: Event %u Action %u. Cannot set instance data without event flags (normal/heroic).", i, j+1); - - if (temp.action[j].param2 > SPECIAL) - error_db_log("SD2: Event %u Action %u attempts to set instance data above encounter state 4. Custom case?", i, j+1); - } - break; - case ACTION_T_SET_INST_DATA64: - { - if (!(temp.event_flags & EFLAG_NORMAL) && !(temp.event_flags & EFLAG_HEROIC)) - error_db_log("SD2: Event %u Action %u. Cannot set instance data without event flags (normal/heroic).", i, j+1); - - if (temp.action[j].param2 >= TARGET_T_END) - error_db_log("SD2: Event %u Action %u uses incorrect Target type", i, j+1); - } - break; - case ACTION_T_UPDATE_TEMPLATE: - { - if (!GetCreatureTemplateStore(temp.action[j].param1)) - error_db_log("SD2: Event %u Action %u uses non-existant creature entry %u.", i, j+1, temp.action[j].param1); - } - break; - case ACTION_T_RANDOM_SAY: - case ACTION_T_RANDOM_YELL: - case ACTION_T_RANDOM_TEXTEMOTE: - error_db_log("TSCR: Event %u Action %u currently unused ACTION type. Did you forget to update database?", i, j+1); - break; - - default: - if (temp.action[j].type >= ACTION_T_END) - error_db_log("TSCR: Event %u Action %u has incorrect action type. Maybe DB requires updated version of SD2.", i, j+1); - break; - } + error_db_log("SD2: DB table script_waypoint has waypoint for non-existant creature entry %u", pTemp.m_uiCreatureEntry); + continue; } - //Add to list - EventAI_Event_Map[creature_id].push_back(temp); + 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.m_uiCreatureEntry); - ++Count; + PointMovementList.push_back(pTemp); + ++uiNodeCount; } while (result->NextRow()); delete result; outstring_log(""); - outstring_log(">> Loaded %u EventAI scripts", Count); - }else + outstring_log(">> Loaded %u Script Waypoint nodes.", uiNodeCount); + } + else { barGoLink bar(1); bar.step(); outstring_log(""); - outstring_log(">> Loaded 0 EventAI scripts. DB table `eventai_scripts` is empty."); + outstring_log(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); } //Free database thread and resources @@ -1322,7 +916,7 @@ void ScriptsFree() delete []SpellSummary; // Free resources before library unload - for(int i=0;i<num_sc_scripts;i++) + for(int i=0;i<MAX_SCRIPTS;i++) delete m_scripts[i]; num_sc_scripts = 0; @@ -1351,25 +945,6 @@ void ScriptsInit() } else outstring_log("TSCR: Using configuration file %s",_TRINITY_SCRIPT_CONFIG); - EAI_ErrorLevel = TScriptConfig.GetIntDefault("EAIErrorLevel", 1); - - switch (EAI_ErrorLevel) - { - case 0: - outstring_log("TSCR: EventAI Error Reporting level set to 0 (Startup Errors only)"); - break; - case 1: - outstring_log("TSCR: EventAI Error Reporting level set to 1 (Startup errors and Runtime event errors)"); - break; - case 2: - outstring_log("TSCR: EventAI Error Reporting level set to 2 (Startup errors, Runtime event errors, and Creation errors)"); - break; - default: - outstring_log("TSCR: Unknown EventAI Error Reporting level. Defaulting to 1 (Startup errors and Runtime event errors)"); - EAI_ErrorLevel = 1; - break; - } - outstring_log(""); //Load database (must be called after TScriptConfig.SetSource). In case it failed, no need to even try load. @@ -1397,13 +972,15 @@ void ScriptsInit() AddSC_boss_ysondre(); // -- Creature -- - AddSC_mob_event(); AddSC_generic_creature(); // -- Custom -- - AddSC_custom_example(); - AddSC_custom_gossip_codebox(); - AddSC_test(); + + // -- Examples -- + AddSC_example_creature(); + AddSC_example_escort(); + AddSC_example_gossip_codebox(); + AddSC_example_misc(); // -- GO -- AddSC_go_scripts(); @@ -1415,7 +992,6 @@ void ScriptsInit() // -- Item -- AddSC_item_scripts(); - AddSC_item_test(); // -- NPC -- AddSC_npc_professions(); @@ -1529,6 +1105,9 @@ void ScriptsInit() //Bloodmyst Isle AddSC_bloodmyst_isle(); + + //Borean Tundra + AddSC_borean_tundra(); //Burning steppes AddSC_burning_steppes(); @@ -1710,12 +1289,11 @@ void ScriptsInit() //Naxxramas AddSC_boss_anubrekhan(); + AddSC_boss_faerlina(); AddSC_boss_maexxna(); AddSC_boss_patchwerk(); AddSC_boss_razuvious(); - AddSC_boss_highlord_mograine(); AddSC_boss_kelthuzad(); - AddSC_boss_faerlina(); AddSC_boss_loatheb(); AddSC_boss_noth(); AddSC_boss_gluth(); @@ -1889,6 +1467,13 @@ void ScriptsInit() AddSC_ungoro_crater(); //Upper blackrock spire + + //Utgarde Keep + AddSC_boss_keleseth(); + AddSC_boss_skarvald_dalronn(); + AddSC_boss_ingvar_the_plunderer(); + AddSC_instance_utgarde_keep(); + //Wailing caverns //Western plaguelands @@ -2016,6 +1601,9 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target) pSource->MonsterWhisper(textEntry, target->GetGUID(), true); else error_log("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry); }break; + case CHAT_TYPE_ZONE_YELL: + pSource->MonsterYellToZone(textEntry, (*i).second.Language, target ? target->GetGUID() : 0); + break; } } @@ -2029,8 +1617,12 @@ void Script::RegisterSelf() { 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()); + } + else + { + debug_log("TSCR: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str()); + delete this; + } } //******************************** @@ -2246,6 +1838,37 @@ bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote ) } TRINITY_DLL_EXPORT +bool EffectDummyCreature(Unit *caster, uint32 spellId, uint32 effIndex, Creature *crTarget ) +{ + Script *tmpscript = m_scripts[crTarget->GetScriptId()]; + + if (!tmpscript || !tmpscript->pEffectDummyCreature) return false; + + return tmpscript->pEffectDummyCreature(caster, spellId,effIndex,crTarget); +} + +TRINITY_DLL_EXPORT +bool EffectDummyGameObj(Unit *caster, uint32 spellId, uint32 effIndex, GameObject *gameObjTarget ) +{ + Script *tmpscript = m_scripts[gameObjTarget->GetGOInfo()->ScriptId]; + + if (!tmpscript || !tmpscript->pEffectDummyGameObj) return false; + + return tmpscript->pEffectDummyGameObj(caster, spellId,effIndex,gameObjTarget); +} + + +TRINITY_DLL_EXPORT +bool EffectDummyItem(Unit *caster, uint32 spellId, uint32 effIndex, Item *itemTarget ) +{ + Script *tmpscript = m_scripts[itemTarget->GetProto()->ScriptId]; + + if (!tmpscript || !tmpscript->pEffectDummyItem) return false; + + return tmpscript->pEffectDummyItem(caster, spellId,effIndex,itemTarget); +} + +TRINITY_DLL_EXPORT InstanceData* CreateInstanceData(Map *map) { if (!map->IsDungeon()) return NULL; diff --git a/src/bindings/scripts/ScriptMgr.h b/src/bindings/scripts/ScriptMgr.h index 87a557779a2..92e8728abf0 100644 --- a/src/bindings/scripts/ScriptMgr.h +++ b/src/bindings/scripts/ScriptMgr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/> +/* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * @@ -10,7 +10,7 @@ #include "Common.h" #include "Platform/CompilerDefs.h" -#include "Database/DBCStructure.h" +#include "DBCStructure.h" class Player; class Creature; @@ -32,9 +32,11 @@ 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),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) + pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), + pChooseReward(NULL), pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), + pGOQuestAccept(NULL), pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), + pEffectDummyCreature(NULL), pEffectDummyGameObj(NULL), pEffectDummyItem(NULL), + GetAI(NULL), GetInstanceData(NULL) {} std::string Name; @@ -59,6 +61,9 @@ struct Script bool (*pGOChooseReward )(Player*, GameObject*, Quest const*, uint32 ); bool (*pReceiveEmote )(Player*, Creature*, 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*); diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index 57ee9dad9f3..58d1dfd072c 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -231,6 +231,22 @@ </File> </Filter> <Filter + Name="examples" + > + <File + RelativePath="..\scripts\examples\example_creature.cpp"> + </File> + <File + RelativePath="..\scripts\examples\example_escort.cpp"> + </File> + <File + RelativePath="..\scripts\examples\example_gossip_codebox.cpp"> + </File> + <File + RelativePath="..\scripts\examples\example_misc.cpp"> + </File> + </Filter> + <Filter Name="guard" > <File @@ -281,18 +297,6 @@ <Filter Name="custom" > - <File - RelativePath="..\scripts\custom\custom_example.cpp" - > - </File> - <File - RelativePath="..\scripts\custom\custom_gossip_codebox.cpp" - > - </File> - <File - RelativePath="..\scripts\custom\test.cpp" - > - </File> </Filter> <Filter Name="areatrigger" @@ -317,10 +321,6 @@ RelativePath="..\scripts\item\item_scripts.cpp" > </File> - <File - RelativePath="..\scripts\item\item_test.cpp" - > - </File> </Filter> <Filter Name="zone" @@ -849,10 +849,6 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_highlord_mograine.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_kelthuzad.cpp" > </File> @@ -1934,6 +1930,9 @@ </Filter> <Filter + Name="Culling of Stratholme"> + </Filter> + <Filter Name="Old Hillsbrad" > <File @@ -1994,6 +1993,166 @@ > </File> </Filter> + <Filter + Name="Borean Tundra"> + <File + RelativePath="..\scripts\zone\borean_tundra\borean_tundra.cpp" + > + </File> + </Filter> + <Filter + Name="Howling Fjord"> + </Filter> + <Filter + Name="Crystalsong Forest"> + </Filter> + <Filter + Name="Dalaran"> + </Filter> + <Filter + Name="Dragonblight"> + </Filter> + <Filter + Name="Grizzly Hills"> + </Filter> + <Filter + Name="Icecrown"> + </Filter> + <Filter + Name="Sholazar Basin"> + </Filter> + <Filter + Name="The Storm Peaks"> + </Filter> + <Filter + Name="Zul'Drak"> + </Filter> + <Filter + Name="Azjol-Nerub"> + <Filter + Name="Ahn'kahet" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_amanitar.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_elder_nadox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_herald_volazj.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_jedoga_shadowseeker.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_prince_taldaram.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\def_ahnkahet.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\instance_ahnkahet.cpp" + > + </File> + </Filter> + <Filter + Name="Azjol-Nerub" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp" + > + </File> + </Filter> + + </Filter> + <Filter + Name="Drak'Tharon Keep"> + </Filter> + <Filter + Name="Gundrak"> + </Filter> + <Filter + Name="Nexus"> + <Filter + Name="Nexus"> + </Filter> + <Filter + Name="Oculus"> + </Filter> + <Filter + Name="Eye of Eternity"> + </Filter> + </Filter> + <Filter + Name="Violet Hold"> + </Filter> + <Filter + Name="Ulduar" + > + <Filter + Name="Halls of Stone"> + </Filter> + <Filter + Name="Halls of Lightning"> + </Filter> + </Filter> + <Filter + Name="Utgarde Keep"> + <Filter + Name="Utgarde Keep"> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_keleseth.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_skarvald_dalronn.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_ingvar_the_plunderer.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\def_utgarde_keep.h" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\instance_utgarde_keep.cpp" + > + </File> + </Filter> + <Filter + Name="Utgarde Pinnacle"> + </Filter> + </Filter> + <Filter + Name="Obsidian Sanctum"> + </Filter> + <Filter + Name="Vault of Archavon"> + </Filter> <Filter Name="Shattrath City" > diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index a2fcfb26af0..79f4c293310 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -408,6 +408,26 @@ </File> </Filter> <Filter + Name="examples" + > + <File + RelativePath="..\scripts\examples\example_creature.cpp" + > + </File> + <File + RelativePath="..\scripts\examples\example_escort.cpp" + > + </File> + <File + RelativePath="..\scripts\examples\example_gossip_codebox.cpp" + > + </File> + <File + RelativePath="..\scripts\examples\example_misc.cpp" + > + </File> + </Filter> + <Filter Name="guard" > <File @@ -458,18 +478,6 @@ <Filter Name="custom" > - <File - RelativePath="..\scripts\custom\custom_example.cpp" - > - </File> - <File - RelativePath="..\scripts\custom\custom_gossip_codebox.cpp" - > - </File> - <File - RelativePath="..\scripts\custom\test.cpp" - > - </File> </Filter> <Filter Name="areatrigger" @@ -494,10 +502,6 @@ RelativePath="..\scripts\item\item_scripts.cpp" > </File> - <File - RelativePath="..\scripts\item\item_test.cpp" - > - </File> </Filter> <Filter Name="zone" @@ -1026,10 +1030,6 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_highlord_mograine.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_kelthuzad.cpp" > </File> @@ -1078,6 +1078,166 @@ Name="Ragefire Chasm" > </Filter> + <Filter + Name="Borean Tundra"> + <File + RelativePath="..\scripts\zone\borean_tundra\borean_tundra.cpp" + > + </File> + </Filter> + <Filter + Name="Howling Fjord"> + </Filter> + <Filter + Name="Crystalsong Forest"> + </Filter> + <Filter + Name="Dalaran"> + </Filter> + <Filter + Name="Dragonblight"> + </Filter> + <Filter + Name="Grizzly Hills"> + </Filter> + <Filter + Name="Icecrown"> + </Filter> + <Filter + Name="Sholazar Basin"> + </Filter> + <Filter + Name="The Storm Peaks"> + </Filter> + <Filter + Name="Zul'Drak"> + </Filter> + <Filter + Name="Azjol-Nerub"> + <Filter + Name="Ahn'kahet" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_amanitar.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_elder_nadox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_herald_volazj.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_jedoga_shadowseeker.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_prince_taldaram.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\def_ahnkahet.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\instance_ahnkahet.cpp" + > + </File> + </Filter> + <Filter + Name="Azjol-Nerub" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp" + > + </File> + </Filter> + + </Filter> + <Filter + Name="Drak'Tharon Keep"> + </Filter> + <Filter + Name="Gundrak"> + </Filter> + <Filter + Name="Nexus"> + <Filter + Name="Nexus"> + </Filter> + <Filter + Name="Oculus"> + </Filter> + <Filter + Name="Eye of Eternity"> + </Filter> + </Filter> + <Filter + Name="Violet Hold"> + </Filter> + <Filter + Name="Ulduar" + > + <Filter + Name="Halls of Stone"> + </Filter> + <Filter + Name="Halls of Lightning"> + </Filter> + </Filter> + <Filter + Name="Utgarde Keep"> + <Filter + Name="Utgarde Keep"> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_keleseth.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_skarvald_dalronn.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_ingvar_the_plunderer.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\def_utgarde_keep.h" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\instance_utgarde_keep.cpp" + > + </File> + </Filter> + <Filter + Name="Utgarde Pinnacle"> + </Filter> + </Filter> + <Filter + Name="Obsidian Sanctum"> + </Filter> + <Filter + Name="Vault of Archavon"> + </Filter> <Filter Name="Razorfen Downs" > @@ -2111,6 +2271,9 @@ </Filter> <Filter + Name="Culling of Stratholme" + > + <Filter Name="Old Hillsbrad" > <File diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 8e8c9b58ca4..b22f0e49c1d 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -55,7 +55,7 @@ PrecompiledHeaderThrough="precompiled.h" WarningLevel="3" Detect64BitPortabilityProblems="false" - DebugInformationFormat="4" + DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" @@ -103,7 +103,7 @@ /> </Configuration> <Configuration - Name="Release|Win32" + Name="Debug|x64" OutputDirectory="..\..\..\..\bin\$(PlatformName)_$(ConfigurationName)" IntermediateDirectory=".\ScriptDev2__$(PlatformName)_$(ConfigurationName)" ConfigurationType="2" @@ -125,16 +125,16 @@ /> <Tool Name="VCMIDLTool" + TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" - AdditionalOptions="/MP" + Optimization="0" AdditionalIncludeDirectories="..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\..\..\..\dep\ACE_wrappers" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT" - MinimalRebuild="false" - RuntimeLibrary="2" - EnableEnhancedInstructionSet="1" - FloatingPointModel="2" + PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" UsePrecompiledHeader="2" PrecompiledHeaderThrough="precompiled.h" WarningLevel="3" @@ -154,16 +154,15 @@ Name="VCLinkerTool" AdditionalDependencies="trinitycore.lib zthread.lib" OutputFile="$(OutDir)/TrinityScript.dll" - LinkIncremental="1" + LinkIncremental="2" AdditionalLibraryDirectories="..\..\..\..\win\VC90\zthread__$(PlatformName)_$(ConfigurationName);..\..\..\..\win\VC90\trinitycore__$(PlatformName)_$(ConfigurationName)" - GenerateDebugInformation="false" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/MaNGOSScript.pdb" SubSystem="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" RandomizedBaseAddress="1" DataExecutionPrevention="0" ImportLibrary="$(OutDir)/TrinityScript.lib" - TargetMachine="1" + TargetMachine="17" /> <Tool Name="VCALinkTool" @@ -188,7 +187,7 @@ /> </Configuration> <Configuration - Name="Debug|x64" + Name="Release|Win32" OutputDirectory="..\..\..\..\bin\$(PlatformName)_$(ConfigurationName)" IntermediateDirectory=".\ScriptDev2__$(PlatformName)_$(ConfigurationName)" ConfigurationType="2" @@ -210,16 +209,16 @@ /> <Tool Name="VCMIDLTool" - TargetEnvironment="3" /> <Tool Name="VCCLCompilerTool" - Optimization="0" + AdditionalOptions="/MP" AdditionalIncludeDirectories="..\..\..\..\dep\include\;..\..\..\shared\;..\..\..\framework\;..\..\..\game\;..\include\;..\..\..\..\dep\ACE_wrappers" - PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_WINDOWS;_USRDLL;SCRIPT" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPT" + MinimalRebuild="false" + RuntimeLibrary="2" + EnableEnhancedInstructionSet="1" + FloatingPointModel="2" UsePrecompiledHeader="2" PrecompiledHeaderThrough="precompiled.h" WarningLevel="3" @@ -239,15 +238,16 @@ Name="VCLinkerTool" AdditionalDependencies="trinitycore.lib zthread.lib" OutputFile="$(OutDir)/TrinityScript.dll" - LinkIncremental="2" + LinkIncremental="1" AdditionalLibraryDirectories="..\..\..\..\win\VC90\zthread__$(PlatformName)_$(ConfigurationName);..\..\..\..\win\VC90\trinitycore__$(PlatformName)_$(ConfigurationName)" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/MaNGOSScript.pdb" + GenerateDebugInformation="false" SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" RandomizedBaseAddress="1" DataExecutionPrevention="0" ImportLibrary="$(OutDir)/TrinityScript.lib" - TargetMachine="17" + TargetMachine="1" /> <Tool Name="VCALinkTool" @@ -267,6 +267,9 @@ <Tool Name="VCAppVerifierTool" /> + <Tool + Name="VCPostBuildEventTool" + /> </Configuration> <Configuration Name="Release|x64" @@ -348,6 +351,9 @@ <Tool Name="VCAppVerifierTool" /> + <Tool + Name="VCPostBuildEventTool" + /> </Configuration> </Configurations> <References> @@ -401,6 +407,26 @@ </File> </Filter> <Filter + Name="examples" + > + <File + RelativePath="..\scripts\examples\example_creature.cpp" + > + </File> + <File + RelativePath="..\scripts\examples\example_escort.cpp" + > + </File> + <File + RelativePath="..\scripts\examples\example_gossip_codebox.cpp" + > + </File> + <File + RelativePath="..\scripts\examples\example_misc.cpp" + > + </File> + </Filter> + <Filter Name="guard" > <File @@ -451,18 +477,6 @@ <Filter Name="custom" > - <File - RelativePath="..\scripts\custom\custom_example.cpp" - > - </File> - <File - RelativePath="..\scripts\custom\custom_gossip_codebox.cpp" - > - </File> - <File - RelativePath="..\scripts\custom\test.cpp" - > - </File> </Filter> <Filter Name="areatrigger" @@ -487,10 +501,6 @@ RelativePath="..\scripts\item\item_scripts.cpp" > </File> - <File - RelativePath="..\scripts\item\item_test.cpp" - > - </File> </Filter> <Filter Name="zone" @@ -748,6 +758,190 @@ > </Filter> <Filter + Name="Borean Tundra" + > + <File + RelativePath="..\scripts\zone\borean_tundra\borean_tundra.cpp" + > + </File> + </Filter> + <Filter + Name="Howling Fjord" + > + </Filter> + <Filter + Name="Crystalsong Forest" + > + </Filter> + <Filter + Name="Dalaran" + > + </Filter> + <Filter + Name="Dragonblight" + > + </Filter> + <Filter + Name="Grizzly Hills" + > + </Filter> + <Filter + Name="Icecrown" + > + </Filter> + <Filter + Name="Sholazar Basin" + > + </Filter> + <Filter + Name="The Storm Peaks" + > + </Filter> + <Filter + Name="Zul'Drak" + > + </Filter> + <Filter + Name="Azjol-Nerub" + > + <Filter + Name="Ahn'kahet" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_amanitar.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_elder_nadox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_herald_volazj.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_jedoga_shadowseeker.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\boss_prince_taldaram.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\def_ahnkahet.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Ahn'kahet\instance_ahnkahet.cpp" + > + </File> + </Filter> + <Filter + Name="Azjol-Nerub" + > + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h" + > + </File> + <File + RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp" + > + </File> + </Filter> + </Filter> + <Filter + Name="Drak'Tharon Keep" + > + </Filter> + <Filter + Name="Gundrak" + > + </Filter> + <Filter + Name="Nexus" + > + <Filter + Name="Nexus" + > + </Filter> + <Filter + Name="Oculus" + > + </Filter> + <Filter + Name="Eye of Eternity" + > + </Filter> + </Filter> + <Filter + Name="Violet Hold" + > + </Filter> + <Filter + Name="Ulduar" + > + <Filter + Name="Halls of Stone" + > + </Filter> + <Filter + Name="Halls of Lightning" + > + </Filter> + </Filter> + <Filter + Name="Utgarde Keep" + > + <Filter + Name="Utgarde Keep" + > + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_ingvar_the_plunderer.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_keleseth.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\boss_skarvald_dalronn.cpp" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\def_utgarde_keep.h" + > + </File> + <File + RelativePath="..\scripts\zone\utgarde_keep\utgarde_keep\instance_utgarde_keep.cpp" + > + </File> + </Filter> + <Filter + Name="Utgarde Pinnacle" + > + </Filter> + </Filter> + <Filter + Name="Obsidian Sanctum" + > + </Filter> + <Filter + Name="Vault of Archavon" + > + </Filter> + <Filter Name="Scarlet Monastery" > <File @@ -1019,10 +1213,6 @@ > </File> <File - RelativePath="..\scripts\zone\naxxramas\boss_highlord_mograine.cpp" - > - </File> - <File RelativePath="..\scripts\zone\naxxramas\boss_kelthuzad.cpp" > </File> @@ -2104,6 +2294,10 @@ </Filter> <Filter + Name="Culling of Stratholme" + > + </Filter> + <Filter Name="Old Hillsbrad" > <File @@ -2373,7 +2567,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Release|Win32" + Name="Debug|x64" > <Tool Name="VCCLCompilerTool" @@ -2381,7 +2575,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Debug|x64" + Name="Release|Win32" > <Tool Name="VCCLCompilerTool" @@ -2423,10 +2617,6 @@ </File> </Filter> <File - RelativePath="..\config.h" - > - </File> - <File RelativePath="..\ScriptMgr.cpp" > </File> @@ -2435,10 +2625,6 @@ > </File> <File - RelativePath="..\svn_revision.h" - > - </File> - <File RelativePath="..\system.cpp" > </File> diff --git a/src/bindings/scripts/docs/EventAI.txt b/src/bindings/scripts/docs/EventAI.txt index 580f73ae75b..ade6ec7fe1e 100644 --- a/src/bindings/scripts/docs/EventAI.txt +++ b/src/bindings/scripts/docs/EventAI.txt @@ -42,7 +42,7 @@ action3_param3 All params are signed 32 bit values (+/- 2147483647). If param specifies time then time is in milliseconds. If param specifies percentage then percentages are value/100 (ex: if param = 500 then that means 500%, -50 = -50%) -*Phase mask is a bit mask of which phases this event should not trigger in. Example: Phase mask value of 12 (1100) would mean that this event would trigger 0, 1 and all other phases except for 2 and 3 (0 counts as the first phase). +*Phase mask is a bit mask of which phases this event should not trigger in. Example: Phase mask value of 12 (1100) would mean that this event would trigger 0, 1 and all other phases except for 2 and 3 (0 counts as the first phase). ========================================= Event Types @@ -56,22 +56,24 @@ Events will not repeat until the creature exits combat unless EFLAG_REPEATABLE i ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0 EVENT_T_TIMER InitialMin, InitialMax, RepeatMin, RepeatMax Expires first between (Param1) and (Param2) and then between every (Param3) and (Param4). but only in combat. 1 EVENT_T_TIMER_OOC InitialMin, InitialMax, RepeatMin, RepeatMax Expires first between (Param1) and (Param2) and then between every (Param3) and (Param4). but only out of combat. -2 EVENT_T_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). -3 EVENT_T_MANA ManaMax%,ManaMin% RepeatMin, RepeatMax Expires once Mana% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). -4 EVENT_T_AGGRO NONE Expires upon initial aggro (does not repeat). +2 EVENT_T_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). +3 EVENT_T_MANA ManaMax%,ManaMin% RepeatMin, RepeatMax Expires once Mana% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). +4 EVENT_T_AGGRO NONE Expires upon initial aggro (does not repeat). 5 EVENT_T_KILL RepeatMin, RepeatMax Expires upon killing a player. Will repeat between every (Param1) and (Param2). -6 EVENT_T_DEATH NONE Expires upon Death of the Creature. +6 EVENT_T_DEATH NONE Expires upon Death of the Creature. 7 EVENT_T_EVADE NONE Expires upon creature EnterEvadeMode(). 8 EVENT_T_SPELLHIT SpellID, School, RepeatMin, RepeatMax Expires upon Spell hit. If (param1) is set will only expire on that spell. If (param2) will only expire on spells of that school (-1 for all). Will repeat every (Param3) and (Param4) . 9 EVENT_T_RANGE MinDist, MaxDist, RepeatMin, RepeatMax Expires when the highest threat target distance is greater than (Param1) and less than (Param2). Will repeat every (Param3) and (Param4) . -10 EVENT_T_OOC_LOS NoHostile, NoFriendly, RepeatMin, RepeatMax Expires when a Player moves within visible distance to creature. Does not expire for Hostile Players if (Param1) is not 0. Does not expire for Friendly Players if (Param2) is not 0. Will repeat every (Param3) and (Param4) . Does not expire for creatures or pet or when the creature is in combat. +10 EVENT_T_OOC_LOS Hostile-or-Not, MaxAllowedRange, RepeatMin, RepeatMax Expires when a Unit moves within distance(MaxAllowedRange) to creature. If Param1=0 it will expire if Unit are Hostile. If Param1=1 it will only expire if Unit are not Hostile(generally determined by faction). Will repeat every (Param3) and (Param4). Does not expire when the creature is in combat. 11 EVENT_T_SPAWNED NONE Expires at initial spawn and at creature respawn (useful for setting ranged movement type) -12 EVENT_T_TARGET_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when Current Target's HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4) . +12 EVENT_T_TARGET_HP HPMax%, HPMin%, RepeatMin, RepeatMax Expires when Current Target's HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4) . 13 EVENT_T_TARGET_CASTING RepeatMin, RepeatatMax Expires when the current target is casting a spell. Will repeat every (Param1) and (Param2) . 14 EVENT_T_FRIENDLY_HP HPDeficit, Radius, RepeatMin, RepeatMax Expires when a friendly unit in radius has at least (param1) hp missing. Will repeat every (Param3) and (Param4) . 15 EVENT_T_FRIENDLY_IS_CC DispelType, Radius, RepeatMin, RepeatMax Expires when a friendly unit is Crowd controlled within the given radius (param2). Will repeat every (Param3) and (Param4) . 16 EVENT_T_MISSING_BUFF SpellId, Radius, RepeatMin, RepeatMax Expires when a friendly unit is missing aura's given by spell (param1) within radius (param2). Will repeat every (Param3) and (Param4) . -17 EVENT_T_SUMMONED_UNIT CreatureId, RepeatMin, RepeatMax Expires after creature with entry = (param1) is spawned or for all spawns if param1 = 0. Will repeat every (Param2) and (Param3) . +17 EVENT_T_SUMMONED_UNIT CreatureId, RepeatMin, RepeatMax Expires after creature with entry = (param1) is spawned or for all spawns if param1 = 0. Will repeat every (Param2) and (Param3). +18 EVENT_T_TARGET_MANA ManaMax%, ManaMin%, RepeatMin, RepeatMax +21 EVENT_T_REACHED_HOME NONE Expires when creature reach it's home(spawn) location after Evade. ========================================= Action Types @@ -83,8 +85,8 @@ Params are always read from Param1, then Param2, then Param3. (# Internal Name Param usage Discription) 0 ACTION_T_NONE No Action Does Nothing 1 ACTION_T_TEXT -TextId1, -TextId2, -TextId3 Displays the -TextId as defined. In case -TextId2 and optionally -TextId3, the output will be randomized. Type text are defined in the text table itself(say, yell, whisper, etc) along with other options for the text. All values are required to be negative. -2 ACTION_T_YELL UNUSED -3 ACTION_T_TEXTEMOTE UNUSED +2 ACTION_T_SET_FACTION FactionId Change faction for creature. If param1==0, creature will revert to default faction. +3 ACTION_T_MORPH_TO_ENTRY_OR_MODEL CreatureEntry, ModelId Set model from creature_template.entry(param1) OR set explicit modelId(param2). If param1 AND param2 both 0, demorph and revert to default model for creature. 4 ACTION_T_SOUND SoundId Plays Sound 5 ACTION_T_EMOTE EmoteId Does emote 6 ACTION_T_RANDOM_SAY UNUSED @@ -93,7 +95,7 @@ Params are always read from Param1, then Param2, then Param3. 9 ACTION_T_RANDOM_SOUND SoundId1, SoundId2, SoundId3 Plays random sound between 3 params* 10 ACTION_T_RANDOM_EMOTE EmoteId1, EmoteId2, EmoteId3 Emotes random emote between 3 params 11 ACTION_T_CAST SpellId, Target, CastFlags Casts spell (param1) on target type (param2). Uses Cast Flags (specified below target types) -12 ACTION_T_SUMMON CreatureID, Target, Duration Summons creature (param1) to attack target (param2) for (param3) duration. Spawns on top of current creature. +12 ACTION_T_SUMMON CreatureID, Target, Duration Summons creature (param1) to attack target (param2) for (param3) duration. Spawns on top of current creature. 13 ACTION_T_THREAT_SINGLE_PCT Threat%, Target Modifies threat by (param1) on target type (param2) 14 ACTION_T_THREAT_ALL_PCT Threat% Modifies threat by (param1) on all targets (using -100% on all will result in full aggro dump) 15 ACTION_T_QUEST_EVENT QuestID, Target Calls AreaExploredOrEventHappens with (param1) for target type (Param2) @@ -113,7 +115,7 @@ Params are always read from Param1, then Param2, then Param3. 29 ACTION_T_RANGED_MOVEMENT Distance, Angle Changes the movement generator type to a ranged type. Note: Default melee type can still be done with this. Specify 0 angle and 0 distance. 30 ACTION_T_RANDOM_PHASE PhaseId1, PhaseId2, PhaseId3 Sets the phase to the id between 3 params* 31 ACTION_T_RANDOM_PHASE_RANGE PhaseMin, PhaseMax Sets the phase to a random id (Phase = PhaseMin + rnd % PhaseMin-PhaseMax). PhaseMax must be greater than PhaseMin. -32 ACTION_T_SUMMON CreatureID, Target, SummonID Summons creature (param1) to attack target (param2) at location specified by EventAI_Summons (param3). +32 ACTION_T_SUMMON CreatureID, Target, SummonID Summons creature (param1) to attack target (param2) at location specified by EventAI_Summons (param3). 33 ACTION_T_KILLED_MONSTER CreatureID, Target Calls KilledMonster (param1) for target of type (param2) 34 ACTION_T_SET_INST_DATA Field, Data Calls ScriptedInstance::SetData with field (param1) and data (param2) 35 ACTION_T_SET_INST_DATA64 Field, Target Calls ScriptedInstance::SetData64 with field (param1) and data (param2) target's GUID. @@ -134,7 +136,7 @@ BOTH - This event can trigger both in and out of combat. Events that do not have lables on them are events that are directly involved with the in and out of combat state. ------------------ -0 = EVENT_T_TIMER: +0 = EVENT_T_TIMER: ------------------ Parameter 1: InitialMin - Minumum Time used to calculate Random Initial Expire Parameter 2: InitialMax - Maximum Time used to calculate Random Initial Expire @@ -152,7 +154,7 @@ Parameter 2: InitialMax - Maximum Time used to calculate Random Initial Expire Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -OUT OF COMBAT ONLY! - Expires first between (Param1) and (Param2) and then between every (Param3) and (Param4) from then on. +OUT OF COMBAT ONLY! - Expires first between (Param1) and (Param2) and then between every (Param3) and (Param4) from then on. This is commonly used for events that occur and repeat outside of combat. --------------- @@ -163,7 +165,7 @@ Parameter 2: HPMin% - Minimum HP% That this Event will Expire Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -BOTH - Expires when HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). +BOTH - Expires when HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). This is commonly used for events that trigger at a specific HP% (Such as Heal/Enrage Spells or NPC's that Flee). ----------------- @@ -174,7 +176,7 @@ Parameter 2: ManaMin% - Minimum Mana% That this Event will Expire Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -BOTH - Expires once Mana% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). +BOTH - Expires once Mana% is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). This is commonly used for events where an NPC low on Mana will do something (Such as stop casting spells and switch to melee). ------------------ @@ -188,7 +190,7 @@ This Event Expires upon initial aggro (does not repeat). Parameter 1: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 2: RepeatMax - Maximum Time used to calculate Random Repeat Expire -COMBAT ONLY! - Expires upon killing a player. Will repeat every (Param1) and (Param2). +COMBAT ONLY! - Expires upon killing a player. Will repeat every (Param1) and (Param2). This Event Expires upon killing a player. It is commonly used for NPC's who yell or do something after killing a player. ------------------ @@ -200,7 +202,7 @@ This is commonly used for NPC's who have a yell on death or cast some kind if su ------------------ 7 = EVENT_T_EVADE: ------------------ -This Event Expires upon the creature EnterEvadeMode(). +This Event Expires upon the creature EnterEvadeMode(). This is commonly used for NPC's who use phases, allows you to reset their phase to 0 upon evade to prevent possible strange behavior. --------------------- @@ -223,7 +225,7 @@ Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire COMBAT ONLY! - Expires when the highest threat target distance is greater than (Param1) and less than (Param2). Will repeat every (Param3) and (Param4). -This Event is commonly used for NPC's who have Ranged Combat and will Throw/Shoot between a certian distance. +This Event is commonly used for NPC's who have Ranged Combat and will Throw/Shoot between a certian distance. --------------------- 10 = EVENT_T_OOC_LOS: @@ -233,7 +235,7 @@ Parameter 2: NoFriendly - This Value is to Prevent this Action from Expiring Whe Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -OUT OF COMBAT ONLY! - Expires when a Player moves within visible distance to the NPC. Does not expire for Hostile Players if (Param1) is not 0. Does not expire for Friendly Players if (Param2) is not 0. Will repeat every (Param3) and (Param4). Does not expire for creatures or pets when they are in combat. +OUT OF COMBAT ONLY! - Expires when a Player moves within visible distance to the NPC. Does not expire for Hostile Players if (Param1) is not 0. Does not expire for Friendly Players if (Param2) is not 0. Will repeat every (Param3) and (Param4). Does not expire for creatures or pets when they are in combat. This Event is commonly used for NPC's who Do Something or Say Something when you walk past them Out of Combat. --------------------- @@ -250,7 +252,7 @@ Parameter 2: HPMin% - Minimum HP% That this Event will Expire Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -COMBAT ONLY! - Expires when Current NPC's Target's HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). +COMBAT ONLY! - Expires when Current NPC's Target's HP is between (Param1) and (Param2). Will repeat every (Param3) and (Param4). This Event is commonly used for NPC's who have a special ability (Like Execute) that only casts when a Player HP is low. ---------------------------- @@ -259,7 +261,7 @@ This Event is commonly used for NPC's who have a special ability (Like Execute) Parameter 1: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 2: RepeatMax - Maximum Time used to calculate Random Repeat Expire -COMBAT ONLY! - Expires when the current target is casting a spell. Will repeat every (Param1) and (Param2). +COMBAT ONLY! - Expires when the current target is casting a spell. Will repeat every (Param1) and (Param2). This event is commonly used for NPC's who will cast a counter spell when their target starts to cast a spell. ------------------------- @@ -281,7 +283,7 @@ Parameter 2: Radius - This is the Range in Yards the NPC will scan for nearby Fr Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -COMBAT ONLY! - Expires when a friendly unit is Crowd controlled within the given radius (param2). Will repeat every (Param3) and (Param4). +COMBAT ONLY! - Expires when a friendly unit is Crowd controlled within the given radius (param2). Will repeat every (Param3) and (Param4). This is commonly used for NPC's who can come to the resule of other Friendly NPC's if being Crowd Controlled -------------------------- @@ -302,9 +304,15 @@ Parameter 1: CreatureId - The CreatureID that the NPC is watching to spawn to tr Parameter 2: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 3: RepeatMax - Maximum Time used to calculate Random Repeat Expire -BOTH - Expires after creature with entry(Param1) is spawned or for all spawns if param1 = 0. Will repeat every (Param2) and (Param3) . +BOTH - Expires after creature with entry(Param1) is spawned or for all spawns if param1 = 0. Will repeat every (Param2) and (Param3) . This is commonly used for NPC's who will do something special once another NPC is summoned. Usually used is Complex Scripts or Special Events. +--------------------------- +21 = EVENT_T_REACHED_HOME: +--------------------------- +Expires only when creature has returned to it's home location after Evade. Out of combat event. +Most commonly used to cast spells that can not be casted in EVENT_T_EVADE and other effects that does not fit in while still running back to spawn/home location. + ========================================= Action Types @@ -321,15 +329,20 @@ Parameter 1: The entry of the text that the NPC should use from eventai_texts ta Parameter 2: Optional. TextId can be defined in addition. The same apply to this as explained above, however eventAI will randomize between the two. Parameter 3: Optional, if Parameter 2 exist. In this case, eventAI will randomize between three. +See Text-tables.txt for documentation of eventai_texts-table. + ------------------ -2 = ACTION_T_YELL: +2 = ACTION_T_SET_FACTION: ------------------ -UNUSED Can be reused to create new action type +Parameter 1: FactionId from Faction.dbc OR 0. Changes faction for creature. If 0, creature will revert to it's default faction if previously changed. ----------------------- -3 = ACTION_T_TEXTEMOTE: +3 = ACTION_T_MORPH_TO_ENTRY_OR_MODEL: ----------------------- -UNUSED Can be reused to create new action type +Parameter 1: Creature entry from creature_template. Action will then change to the model this creature are using. +Parameter 2: If parameter 1 is 0, then this modelId will be used (in case parameter 1 exist, parameter 2 will not be used) + +If both parameter 1 and 2 is 0, the creature will DeMorph, and use it's default model. ------------------- 4 = ACTION_T_SOUND: @@ -367,16 +380,16 @@ UNUSED Can be reused to create new action type -------------------------- Parameter 1: The Sound ID to be played as Random Choice #1. Parameter 2: The Sound ID to be played as Random Choice #2. -Parameter 3: The Sound ID to be played as Random Choice #3. +Parameter 3: The Sound ID to be played as Random Choice #3. -Similar to the ACTION_T_SOUND action, it will choose at random a sound to play. +Similar to the ACTION_T_SOUND action, it will choose at random a sound to play. --------------------------- 10 = ACTION_T_RANDOM_EMOTE: --------------------------- Parameter 1: The Emote ID to be played as Random Choice #1. Parameter 2: The Emote ID to be played as Random Choice #2. -Parameter 3: The Emote ID to be played as Random Choice #3. +Parameter 3: The Emote ID to be played as Random Choice #3. Similar to the ACTION_T_EMOTE action, it will choose at random an Emote to Visually Perform. @@ -387,26 +400,26 @@ Parameter 1: SpellId - The Spell ID to use for the NPC to cast. The value used i Parameter 2: Target - The Target Type defining who the creature should cast the spell at. The value in this field needs to be a valid Target Type as specified in the reference tables below. Parameter 3: CastFlags - See Table Below for Cast Flag Bitmask Values. If you are unsure what to set this value at leave it at 0. -The creature will cast a spell specified by a spell ID on a target specified by the target type. +The creature will cast a spell specified by a spell ID on a target specified by the target type. This is commonly used for NPC's who cast spells. --------------------- 12 = ACTION_T_SUMMON: --------------------- Parameter 1: CreatureID - The Creature Template ID to be Summoned. The value here needs to be a valid Creature Template ID. -Parameter 2: Target - The Target Type defining who the Summoned creature will attack once spawned. The value in this field needs to be a valid Target Type as specified in the reference tables below. -Parameter 3: Duration - The duration until the summoned creature should be unsummoned AFTER Combat ends. The value in this field is in milliseconds or 0. +Parameter 2: Target - The Target Type defining who the Summoned creature will attack once spawned. The value in this field needs to be a valid Target Type as specified in the reference tables below. +Parameter 3: Duration - The duration until the summoned creature should be unsummoned AFTER Combat ends. The value in this field is in milliseconds or 0. -The NPC will Summon another creature at the same spot as itself that will attack the specified target. +The NPC will Summon another creature at the same spot as itself that will attack the specified target. NOTE: Almost all Creature Summons have proper Summon Spells that should be used when possible. This Action is a powerful last resort option only to be used if nothing else works. NOTE: Using Target Type 0 will cause the Summoned creature to not attack anyone. -NOTE: If Duration is set at 0, then the summoned creature will not despawn until it has died. +NOTE: If Duration is set at 0, then the summoned creature will not despawn until it has died. This is used as a manual way to force an NPC to Summon. -------------------------------- 13 = ACTION_T_THREAT_SINGLE_PCT: -------------------------------- Parameter 1: Threat% - Threat percent that should be modified. The value in this field can range from -100 to +100. If it is negative, threat will be taken away and if positive, threat will be added. -Parameter 2: Target - The Target Type defining on whom the threat change should occur. The value in this field needs to be a valid target type as specified in the reference tables below. +Parameter 2: Target - The Target Type defining on whom the threat change should occur. The value in this field needs to be a valid target type as specified in the reference tables below. This action will modify the threat of a target in the creature's threat list by the specified percent. This is commonly used to allow an NPC to adjust the Threat to a single player. @@ -414,7 +427,7 @@ This is commonly used to allow an NPC to adjust the Threat to a single player. ----------------------------- 14 = ACTION_T_THREAT_ALL_PCT: ----------------------------- -Parameter 1: Threat% - The percent that should be used in modifying everyone's threat in the creature's threat list. The value here can range from -100 to +100. +Parameter 1: Threat% - The percent that should be used in modifying everyone's threat in the creature's threat list. The value here can range from -100 to +100. This action will modify the threat for everyone in the creature's threat list by the specified percent. NOTE: Using -100 will cause the creature to reset everyone's threat to 0 so that everyone has the same amount of threat. It will NOT remove anyone from the threat list. @@ -424,10 +437,10 @@ This is commonly used to allow an NPC to drop threat for all players to zero. 15 = ACTION_T_QUEST_EVENT: -------------------------- Parameter 1: QuestID - The Quest Template ID. The value here must be a valid quest template ID. Furthermore, the quest should have SpecialFlags | 2 as it would need to be completed by an external event which is the activation of this action. -Parameter 2: Target - The Target Type defining whom the quest should be completed for. The value in this field needs to be a valid target type as specified in the reference tables below. +Parameter 2: Target - The Target Type defining whom the quest should be completed for. The value in this field needs to be a valid target type as specified in the reference tables below. -This action will satisfy the external completion requirement for the quest for the specified target defined by the target type. -NOTE: This action can only be used with player targets so it must be ensured that the target type will point to a player. +This action will satisfy the external completion requirement for the quest for the specified target defined by the target type. +NOTE: This action can only be used with player targets so it must be ensured that the target type will point to a player. This is commonly used for Quests where only ONE player will gain credit for the quest. ----------------------------- @@ -435,9 +448,9 @@ This is commonly used for Quests where only ONE player will gain credit for the ----------------------------- Parameter 1: CreatureID - The Creature Template ID to be Summoned. The value here needs to be a valid Creature Template ID. Parameter 2: SpellId - The Spell ID to use to simulate the cast. The value used in this field needs to be a valid Spell ID. -Parameter 3: Target - The Target Type defining whom the quest credit should be given to. The value in this field needs to be a valid target type as specified in the reference tables below. +Parameter 3: Target - The Target Type defining whom the quest credit should be given to. The value in this field needs to be a valid target type as specified in the reference tables below. -This action will call CastedCreatureOrGO() function for the player. It can be used to give quest credit for casting a spell on the creature. +This action will call CastedCreatureOrGO() function for the player. It can be used to give quest credit for casting a spell on the creature. This is commonly used for NPC's who have a special requirement to have a Spell cast on them to complete a quest. ----------------------------- @@ -445,7 +458,7 @@ This is commonly used for NPC's who have a special requirement to have a Spell c ----------------------------- Parameter 1: Field_Number - The index of the Field Number to be changed. Use (http://wiki.udbforums.org/index.php/Character_data) for a list of indeces and what they control. Creatures only contain the OBJECT_FIELD_* and UNIT_FIELD_* fields. They do not contain the PLAYER_FIELD_* fields. Parameter 2: Value - The new value to be put in the field. -Parameter 3: Target - The Target Type defining for whom the unit field should be changed. The value in this field needs to be a valid target type as specified in the reference tables below. +Parameter 3: Target - The Target Type defining for whom the unit field should be changed. The value in this field needs to be a valid target type as specified in the reference tables below. When activated, this action can change the target's unit field values. More information on the field value indeces can be found at (http://wiki.udbforums.org/index.php/Character_data) @@ -453,31 +466,31 @@ When activated, this action can change the target's unit field values. More info 18 = ACTION_T_SET_UNIT_FLAG: ---------------------------- Parameter 1: Flags - The flag(s) to be set. Multiple flags can be set by using bitwise-OR on them (adding them together). -Parameter 2: Target - The Target Type defining for whom the flags should be changed. The value in this field needs to be a valid Target Type as specified in the reference tables below. +Parameter 2: Target - The Target Type defining for whom the flags should be changed. The value in this field needs to be a valid Target Type as specified in the reference tables below. -When activated, this action changes the target's flags by adding (turning on) more flags. For example, this action can make the creature unattackable/unselectable if the right flags are used. +When activated, this action changes the target's flags by adding (turning on) more flags. For example, this action can make the creature unattackable/unselectable if the right flags are used. ------------------------------- 19 = ACTION_T_REMOVE_UNIT_FLAG: ------------------------------- Parameter 1: Flags - The flag(s) to be removed. Multiple flags can be set by using bitwise-OR on them (adding them together). -Parameter 2: Target - The target type defining for whom the flags should be changed. The value in this field needs to be a valid Target Type as specified in the reference tables below. +Parameter 2: Target - The target type defining for whom the flags should be changed. The value in this field needs to be a valid Target Type as specified in the reference tables below. -When activated, this action changes the target's flags by removing (turning off) flags. For example, this action can make the creature normal after it was unattackable/unselectable if the right flags are used. +When activated, this action changes the target's flags by removing (turning off) flags. For example, this action can make the creature normal after it was unattackable/unselectable if the right flags are used. -------------------------- 20 = ACTION_T_AUTO_ATTACK: -------------------------- -Parameter 1: AllowAutoAttack - If zero, then the creature will stop its melee attacks. If non-zero, then the creature will either continue its melee attacks (the action would then have no effect) or it will start its melee attacks on the target with the top threat if its melee attacks were previously stopped. +Parameter 1: AllowAutoAttack - If zero, then the creature will stop its melee attacks. If non-zero, then the creature will either continue its melee attacks (the action would then have no effect) or it will start its melee attacks on the target with the top threat if its melee attacks were previously stopped. -This action controls whether or not the creature should stop or start the auto melee attack. +This action controls whether or not the creature should stop or start the auto melee attack. NOTE: The ACID Dev Team has conformed to using either 0 or 1 for the Param values (0 = Stop Melee, 1 = Start Melee). This is commonly used in combination with EVENT_T_RANGE and ACTION_T_COMBAT_MOVEMENT for Ranged Combat for Mages and Spell Casters. ------------------------------ 21 = ACTION_T_COMBAT_MOVEMENT: ------------------------------ -Parameter 1: If zero, then the creature will stop moving towards its victim (if its victim gets out of melee range) and will be stationary. If non-zero, then the creature will either continue to follow its victim (the action would have no effect) or it will start to follow the target with the top threat if its movement was disabled before. +Parameter 1: If zero, then the creature will stop moving towards its victim (if its victim gets out of melee range) and will be stationary. If non-zero, then the creature will either continue to follow its victim (the action would have no effect) or it will start to follow the target with the top threat if its movement was disabled before. This action controls whether or not the creature will always move towards its target. NOTE: The ACID Dev Team has conformed to using either 0 or 1 for the Param values. (0 = Stop Movement, 1 = Start Movement) @@ -486,7 +499,7 @@ This is commonly used with EVENT_T_RANGE and ACTION_T_AUTO_ATTACK for NPC's who ------------------------ 22 = ACTION_T_SET_PHASE: ------------------------ -Parameter 1: The new phase to set the creature in. This number must be an integer between 0 and 31. Numbers outside of that range will result in an error. +Parameter 1: The new phase to set the creature in. This number must be an integer between 0 and 31. Numbers outside of that range will result in an error. When activated, this action sets the creature's event to the specified value. NOTE: The creature's current Phase is NOT reset at creature evade. You must manually set the phase back to 0 at EVENT_T_RESET. @@ -496,20 +509,20 @@ This is commonly used for complex scripts with several phases and you need to sw ------------------------ 23 = ACTION_T_INC_PHASE: ------------------------ -Parameter 1: Value - The number of phases to increase or decrease. Use negative values to decrease the current phase. +Parameter 1: Value - The number of phases to increase or decrease. Use negative values to decrease the current phase. -When activated, this action will increase (or decrease) the current creature's phase. -NOTE: After increasing or decreasing the phase by this action, the current phase must NOT be lower than 0 or exceed 31. +When activated, this action will increase (or decrease) the current creature's phase. +NOTE: After increasing or decreasing the phase by this action, the current phase must NOT be lower than 0 or exceed 31. This can be used instead of ACTION_T_SET_PHASE to change phases in scripts. Just a user friendly option for changing phases. -------------------- 24 = ACTION_T_EVADE: -------------------- -When activated, the creature will immediately exit out of combat, clear its threat list, and move back to its spawn point. Basically, this action will reset the whole encounter. +When activated, the creature will immediately exit out of combat, clear its threat list, and move back to its spawn point. Basically, this action will reset the whole encounter. NOTE: All Param Values Are 0 for this Action. ------------------- -25 = ACTION_T_FLEE: +25 = ACTION_T_FLEE: ------------------- When activated, the creature will try to flee from combat. Currently this is done by it casting a fear-like spell on itself called "Run Away". A Better Flee system is in Development but will take time before it is implimented. NOTE: All Param Values Are 0 for this Action. @@ -517,47 +530,47 @@ NOTE: All Param Values Are 0 for this Action. ------------------------------ 26 = ACTION_T_QUEST_EVENT_ALL: ------------------------------ -Parameter 1: QuestId - The quest ID to finish for everyone. +Parameter 1: QuestId - The quest ID to finish for everyone. -This action does the same thing as the ACTION_T_QUEST_EVENT does but it does it for all players in the creature's threat list. -NOTE: If a player is not in the NPC's threat list for whatever reason, he/she won't get the quest completed. +This action does the same thing as the ACTION_T_QUEST_EVENT does but it does it for all players in the creature's threat list. +NOTE: If a player is not in the NPC's threat list for whatever reason, he/she won't get the quest completed. --------------------------------- 27 = ACTION_T_CASTCREATUREGO_ALL: --------------------------------- Parameter 1: QuestId - The quest template ID. -Parameter 2: SpellId - The spell ID used to simulate the cast. +Parameter 2: SpellId - The spell ID used to simulate the cast. -This action does the same thing as the ACTION_T_CASTCREATUREGO does but it does it for all players in the creature's threat list. -NOTE: If a player is not in its threat list for whatever reason, he/she won't receive the cast emulation. +This action does the same thing as the ACTION_T_CASTCREATUREGO does but it does it for all players in the creature's threat list. +NOTE: If a player is not in its threat list for whatever reason, he/she won't receive the cast emulation. ----------------------------------- 28 = ACTION_T_REMOVEAURASFROMSPELL: ----------------------------------- Parameter 1: Target - The target type defining for whom the unit field should be changed. The value in this field needs to be a valid target type as specified in the reference tables below. -Parameter 2: SpellId - The spell ID whose auras will be removed. +Parameter 2: SpellId - The spell ID whose auras will be removed. -This action will remove all auras from a specific spell from the target. +This action will remove all auras from a specific spell from the target. This is commonly used for NPC's who have an OOC Aura that is removed at combat start or a similar idea (Like Stealth or Shape Shift) ------------------------------ 29 = ACTION_T_RANGED_MOVEMENT: ------------------------------ Parameter 1: Distance - The distance the mob should keep between it and its target. -Parameter 2: Angle - The angle the mob should use. +Parameter 2: Angle - The angle the mob should use. -This action changes the movement type generator to ranged type using the specified values for angle and distance. -NOTE: Specifying zero angle and distance will make it just melee instead. -This is commonly used for NPC's who always attack at range and you can specify the distance they will maintain from the target. +This action changes the movement type generator to ranged type using the specified values for angle and distance. +NOTE: Specifying zero angle and distance will make it just melee instead. +This is commonly used for NPC's who always attack at range and you can specify the distance they will maintain from the target. --------------------------- 30 = ACTION_T_RANDOM_PHASE: --------------------------- Parameter 1: PhaseId1 - A possible random phase choice. Parameter 2: PhaseId2 - A possible random phase choice. -Parameter 3: PhaseId3 - A possible random phase choice. +Parameter 3: PhaseId3 - A possible random phase choice. -Randomly sets the phase to one from the three parameter choices. +Randomly sets the phase to one from the three parameter choices. NOTE: Use -1 to specify that if this param is picked to do nothing. Random is constant between actions within an event. So if you have a random Yell and a random Sound they will match up (ex: param2 with param2) NOTE 2: PLEASE NOTE THAT EACH OF THE PARAM VALUES ARE ACTUAL PHASE NUMBERS NOT THE INVERSE PHASE MASK VALUE. This is commonly used for Spellcasting NPC's who on Aggro may select at random a school of spells to use for the fight. Use this if you have up to 3 phases used, otherwise use Action 31 for more then 3 phases. @@ -566,9 +579,9 @@ This is commonly used for Spellcasting NPC's who on Aggro may select at random a 31 = ACTION_T_RANDOM_PHASE_RANGE: --------------------------------- Parameter 1: PhaseMin - The minimum of the phase range. -Parameter 2: PhaseMax - The maximum of the phase range. The number here must be greater than PhaseMin. +Parameter 2: PhaseMax - The maximum of the phase range. The number here must be greater than PhaseMin. -Randomly sets the phase between a range of phases controlled by the parameters. Sets the phase to a random id (Phase = PhaseMin + rnd % PhaseMin-PhaseMax). +Randomly sets the phase between a range of phases controlled by the parameters. Sets the phase to a random id (Phase = PhaseMin + rnd % PhaseMin-PhaseMax). NOTE: PhaseMax must be greater than PhaseMin. NOTE 2: PLEASE NOTE THAT EACH OF THE PARAM VALUES ARE ACTUAL PHASE NUMBERS NOT THE INVERSE PHASE MASK VALUE. This is commonly used for Spellcasting NPC's who on Aggro may select at random a school of spells to use for the fight. Use this if you have MORE then 3 phases used, otherwise use Action 30. @@ -578,9 +591,9 @@ This is commonly used for Spellcasting NPC's who on Aggro may select at random a --------------------- Parameter 1: CreatureID - The creature template ID to be summoned. The value here needs to be a valid creature template ID. Parameter 2: Target - The target type defining who the summoned creature will attack. The value in this field needs to be a valid target type as specified in the reference tables below. NOTE: Using target type 0 will cause the summoned creature to not attack anyone. -Parameter 3: SummonID - The summon ID from the eventai_summons table controlling the position (and spawntime) where the summoned mob should be spawned at. +Parameter 3: SummonID - The summon ID from the eventai_summons table controlling the position (and spawntime) where the summoned mob should be spawned at. -Summons creature (param1) to attack target (param2) at location specified by EventAI_Summons (param3). +Summons creature (param1) to attack target (param2) at location specified by EventAI_Summons (param3). NOTE: Param3 Value is the ID Value used for the entry used in EventAI_Summons for this action. You MUST have an EventAI_Summons entry to use this action. This is commonly used for NPC's who need to Summon a creature at a specific location. (Normally used for complex events) @@ -588,9 +601,9 @@ This is commonly used for NPC's who need to Summon a creature at a specific loca 33 = ACTION_T_KILLED_MONSTER: ----------------------------- Parameter 1: CreatureID - The creature template ID. The value here must be a valid creature template ID. -Parameter 2: Target - The target type defining whom the quest kill count should be given to. The value in this field needs to be a valid target type as specified in the reference tables below. +Parameter 2: Target - The target type defining whom the quest kill count should be given to. The value in this field needs to be a valid target type as specified in the reference tables below. -When activated, this action will call KilledMonster() function for the player. It can be used to give creature credit for killing a creature. In general if the quest is set to be accompished on different creatures (e.g. "Credit" templates). +When activated, this action will call KilledMonster() function for the player. It can be used to give creature credit for killing a creature. In general if the quest is set to be accompished on different creatures (e.g. "Credit" templates). NOTE: It can be ANY creature including certain quest specific triggers This is commonly used for giving the player Quest Credits for NPC kills (Many NPC's may use the same CreatureID for the Kill Credit) @@ -600,7 +613,7 @@ This is commonly used for giving the player Quest Credits for NPC kills (Many NP Parameter 1: Field - The field to change in the instance script. Again, this field needs to be a valid field that has been already defined in the instance's script. Parameter 2: Data - The value to put at that field index. -Sets data for the instance. Note that this will only work when the creature is inside an instantiable zone that has a valid script (ScriptedInstance) assigned. +Sets data for the instance. Note that this will only work when the creature is inside an instantiable zone that has a valid script (ScriptedInstance) assigned. NOTE: Param1 Value is located in "def_<instance name>.h" SD2 File and Param2 value is generally found in the "sc_instance.h" file in SD2 This is commonly used to link an ACID script with a SD2 C++ Script. You make make things happen like opening doors on specific events that happen. ACID Just triggers the C++ Script to function. @@ -608,30 +621,30 @@ This is commonly used to link an ACID script with a SD2 C++ Script. You make mak 35 = ACTION_T_SET_INST_DATA64: ------------------------------ Parameter 1: Field - The field to change in the instance script. Again, this field needs to be a valid field that has been already defined in the instance's script. -Parameter 2: Target - The target type to use to get the GUID that will be stored at the field index. The value in this field needs to be a valid target type as specified in the reference tables below. +Parameter 2: Target - The target type to use to get the GUID that will be stored at the field index. The value in this field needs to be a valid target type as specified in the reference tables below. -Sets GUID (64 bits) data for the instance based on the target. Note that this will only work when the creature is inside an instantiable zone that has a valid script (ScriptedInstance) assigned. +Sets GUID (64 bits) data for the instance based on the target. Note that this will only work when the creature is inside an instantiable zone that has a valid script (ScriptedInstance) assigned. Calls ScriptedInstance::SetData64 with field (param1) and data (param2) target's GUID. ------------------------------ 36 = ACTION_T_UPDATE_TEMPLATE: ------------------------------ Parameter 1: TemplateId - The creature template ID. The value here must be a valid creature template ID. -Parameter 2: Team - Use model_id from team : Alliance(0) or Horde (1). +Parameter 2: Team - Use model_id from team : Alliance(0) or Horde (1). -This function temporarily changes creature entry to new entry, display is changed, loot is changed, but AI is not changed. At respawn creature will be reverted to original entry. +This function temporarily changes creature entry to new entry, display is changed, loot is changed, but AI is not changed. At respawn creature will be reverted to original entry. Changes the creature to a new creature template of (param1) with team = Alliance if (param2) = false or Horde if (param2) = true ------------------ 37 = ACTION_T_DIE: ------------------ Kills the creature -This is commonly used if you need to Instakill the creature for one reason or another. +This is commonly used if you need to Instakill the creature for one reason or another. -------------------------------- 38 = ACTION_T_ZONE_COMBAT_PULSE: -------------------------------- -Places all players within the instance into combat with the creature. Only works in combat and only works inside of instances. +Places all players within the instance into combat with the creature. Only works in combat and only works inside of instances. ========================================= @@ -665,7 +678,7 @@ Another example: the number "5" (101 in Binary, selecting first and third option 4 16 CAST_FORCE_TARGET_SELF Forces the target to cast this spell on itself 5 32 CAST_AURA_NOT_PRESENT Only casts the spell on the target if the target does not have the aura from that spell on itself already. -NOTE: You can add the numbers in the decimal column to combine flags. +NOTE: You can add the numbers in the decimal column to combine flags. For example if you wanted to use CAST_NO_MELEE_IF_OOM(8) and CAST_TRIGGERED(2) you would simply use 10 in the cast flags field (8 + 2 = 10). ========================================= @@ -683,4 +696,4 @@ Below is the list of current Event Flags that EventAI can handle. Event flags ar 6 64 7 128 EFLAG_DEBUG_ONLY Prevents events from occuring on Release builds of ScriptDev2. Useful for testing new features. -NOTE: You can add the numbers in the decimal column to combine flags. +NOTE: You can add the numbers in the decimal column to combine flags.
\ No newline at end of file diff --git a/src/bindings/scripts/docs/Text-tables.txt b/src/bindings/scripts/docs/Text-tables.txt index 6db1ce9d852..2a539a72874 100644 --- a/src/bindings/scripts/docs/Text-tables.txt +++ b/src/bindings/scripts/docs/Text-tables.txt @@ -52,8 +52,8 @@ Below is the list of current Text types that texts tables can handle. These were ----------------------------------------------------------- 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). +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). @@ -65,7 +65,7 @@ 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. diff --git a/src/bindings/scripts/include/precompiled.cpp b/src/bindings/scripts/include/precompiled.cpp index 9753d023374..75bfae9e1c4 100644 --- a/src/bindings/scripts/include/precompiled.cpp +++ b/src/bindings/scripts/include/precompiled.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/include/precompiled.h b/src/bindings/scripts/include/precompiled.h index cd6d68f9f31..2c36cc924e0 100644 --- a/src/bindings/scripts/include/precompiled.h +++ b/src/bindings/scripts/include/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -12,6 +12,7 @@ #include "GridNotifiersImpl.h" #include "Unit.h" #include "GameObject.h" +#include "TemporarySummon.h" #include "sc_creature.h" #include "sc_gossip.h" #include "sc_instance.h" diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index f30ae9408c5..2c0ab471bda 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/> +/* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * @@ -108,9 +108,9 @@ void ScriptedAI::AttackStart(Unit* who) void ScriptedAI::UpdateAI(const uint32 diff) { //Check if we have a current target - if (m_creature->isAlive() && UpdateVictim()) + if (UpdateVictim()) { - if (m_creature->isAttackReady() ) + if (m_creature->isAttackReady()) { //If we are within range melee the target if (m_creature->IsWithinMeleeRange(m_creature->getVictim())) @@ -206,23 +206,23 @@ void ScriptedAI::DoSay(const char* text, uint32 language, Unit* target, bool Say { if (target) { - m_creature->Say(text, language, target->GetGUID()); + m_creature->MonsterSay(text, language, target->GetGUID()); if(SayEmote) m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); } - else m_creature->Say(text, language, 0); + else m_creature->MonsterSay(text, language, 0); } void ScriptedAI::DoYell(const char* text, uint32 language, Unit* target) { - if (target) m_creature->Yell(text, language, target->GetGUID()); - else m_creature->Yell(text, language, 0); + if (target) m_creature->MonsterYell(text, language, target->GetGUID()); + else m_creature->MonsterYell(text, language, 0); } void ScriptedAI::DoTextEmote(const char* text, Unit* target, bool IsBossEmote) { - if (target) m_creature->TextEmote(text, target->GetGUID(), IsBossEmote); - else m_creature->TextEmote(text, 0, IsBossEmote); + if (target) m_creature->MonsterTextEmote(text, target->GetGUID(), IsBossEmote); + else m_creature->MonsterTextEmote(text, 0, IsBossEmote); } void ScriptedAI::DoWhisper(const char* text, Unit* reciever, bool IsBossWhisper) @@ -230,7 +230,7 @@ void ScriptedAI::DoWhisper(const char* text, Unit* reciever, bool IsBossWhisper) if (!reciever || reciever->GetTypeId() != TYPEID_PLAYER) return; - m_creature->Whisper(text, reciever->GetGUID(), IsBossWhisper); + m_creature->MonsterWhisper(text, reciever->GetGUID(), IsBossWhisper); } void ScriptedAI::DoPlaySoundToSet(Unit* unit, uint32 sound) @@ -437,11 +437,9 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* Target, int32 School, int32 Mech return false; //Using the extended script system we first create a list of viable spells - SpellEntry const* Spell[4]; - Spell[0] = 0; - Spell[1] = 0; - Spell[2] = 0; - Spell[3] = 0; + SpellEntry const* Spell[CREATURE_MAX_SPELLS]; + for (uint8 i=0;i<CREATURE_MAX_SPELLS;i++) + Spell[i] = 0; uint32 SpellCount = 0; @@ -449,7 +447,7 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* Target, int32 School, int32 Mech SpellRangeEntry const* TempRange; //Check if each spell is viable(set it to null if not) - for (uint32 i = 0; i < 4; i++) + for (uint32 i = 0; i < CREATURE_MAX_SPELLS; i++) { TempSpell = GetSpellStore()->LookupEntry(m_creature->m_spells[i]); @@ -493,13 +491,13 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* Target, int32 School, int32 Mech continue; //Check if the spell meets our range requirements - if (RangeMin && TempRange->maxRange < RangeMin) + if (RangeMin && m_creature->GetSpellMinRangeForTarget(Target, TempRange) < RangeMin) continue; - if (RangeMax && TempRange->maxRange > RangeMax) + if (RangeMax && m_creature->GetSpellMaxRangeForTarget(Target, TempRange) > RangeMax) continue; //Check if our target is in range - if (m_creature->IsWithinDistInMap(Target, TempRange->minRange) || !m_creature->IsWithinDistInMap(Target, TempRange->maxRange)) + if (m_creature->IsWithinDistInMap(Target, m_creature->GetSpellMinRangeForTarget(Target, TempRange)) || !m_creature->IsWithinDistInMap(Target, m_creature->GetSpellMaxRangeForTarget(Target, TempRange))) continue; //All good so lets add it to the spell list @@ -521,11 +519,11 @@ bool ScriptedAI::CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered) return false; //Silenced so we can't cast - if (!Triggered && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) + if (!Triggered && me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) return false; //Check for power - if (!Triggered && m_creature->GetPower((Powers)Spell->powerType) < Spell->manaCost) + if (!Triggered && me->GetPower((Powers)Spell->powerType) < Spell->manaCost) return false; SpellRangeEntry const *TempRange = NULL; @@ -537,20 +535,21 @@ bool ScriptedAI::CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered) return false; //Unit is out of range of this spell - if (m_creature->GetDistance(Target) > TempRange->maxRange || m_creature->GetDistance(Target) < TempRange->minRange) + if (me->GetDistance(Target) > me->GetSpellMaxRangeForTarget(Target, TempRange) + || me->GetDistance(Target) < me->GetSpellMinRangeForTarget(Target, TempRange)) return false; return true; } -float GetSpellMaxRange(uint32 id) +float GetSpellMaxRangeForHostile(uint32 id) { SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(id); if(!spellInfo) return 0; SpellRangeEntry const *range = GetSpellRangeStore()->LookupEntry(spellInfo->rangeIndex); if(!range) return 0; - return range->maxRange; + return range->maxRangeHostile; } void FillSpellSummary() @@ -583,7 +582,7 @@ void FillSpellSummary() //Spell targets AoE at enemy if ( TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA || TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || - TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_AROUND_CASTER || + TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER || TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED ) SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_ENEMY-1); @@ -592,7 +591,7 @@ void FillSpellSummary() TempSpell->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES || TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA || TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || - TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_AROUND_CASTER || + TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER || TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED ) SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_ENEMY-1); @@ -605,7 +604,7 @@ void FillSpellSummary() //Spell targets aoe friends if ( TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_PARTY_AROUND_CASTER || TempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || - TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_AROUND_CASTER) + TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER) SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_FRIEND-1); //Spell targets any friend(or self) @@ -614,7 +613,7 @@ void FillSpellSummary() TempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_PARTY || TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_PARTY_AROUND_CASTER || TempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || - TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_AROUND_CASTER) + TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER) SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_FRIEND-1); //Make sure that this spell includes a damage effect @@ -638,39 +637,6 @@ void FillSpellSummary() } } -void ScriptedAI::DoZoneInCombat(Unit* pUnit) -{ - if (!pUnit) - pUnit = m_creature; - - Map *map = pUnit->GetMap(); - - if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated - { - error_log("SD2: DoZoneInCombat call for map that isn't an instance (pUnit entry = %d)", pUnit->GetTypeId() == TYPEID_UNIT ? ((Creature*)pUnit)->GetEntry() : 0); - return; - } - - if (!pUnit->CanHaveThreatList() || pUnit->getThreatManager().isThreatListEmpty()) - { - error_log("SD2: DoZoneInCombat called for creature that either cannot have threat list or has empty threat list (pUnit entry = %d)", pUnit->GetTypeId() == TYPEID_UNIT ? ((Creature*)pUnit)->GetEntry() : 0); - - return; - } - - Map::PlayerList const &PlayerList = map->GetPlayers(); - for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (Player* i_pl = i->getSource()) - if (i_pl->isAlive()) - { - pUnit->SetInCombatWith(i_pl); - i_pl->SetInCombatWith(pUnit); - pUnit->AddThreat(i_pl, 0.0f); - } - } -} - void ScriptedAI::DoResetThreat() { if (!m_creature->CanHaveThreatList() || m_creature->getThreatManager().isThreatListEmpty()) @@ -741,7 +707,7 @@ Unit* FindCreature(uint32 entry, float range, Unit* Finder) return NULL; Creature* target = NULL; Trinity::AllCreaturesOfEntryInRange check(Finder, entry, range); - Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(target, check); + Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(Finder, target, check); Finder->VisitNearbyObject(range, searcher); return target; } @@ -752,7 +718,7 @@ GameObject* FindGameObject(uint32 entry, float range, Unit* Finder) return NULL; GameObject* target = NULL; Trinity::AllGameObjectsWithEntryInGrid go_check(entry); - Trinity::GameObjectSearcher<Trinity::AllGameObjectsWithEntryInGrid> searcher(target, go_check); + Trinity::GameObjectSearcher<Trinity::AllGameObjectsWithEntryInGrid> searcher(Finder, target, go_check); Finder->VisitNearbyGridObject(range, searcher); return target; } @@ -761,7 +727,7 @@ Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) { Unit* pUnit = NULL; Trinity::MostHPMissingInRange u_check(m_creature, range, MinHPDiff); - Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(pUnit, u_check); + Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(m_creature, pUnit, u_check); m_creature->VisitNearbyObject(range, searcher); return pUnit; } @@ -770,7 +736,7 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range) { std::list<Creature*> pList; Trinity::FriendlyCCedInRange u_check(m_creature, range); - Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(pList, u_check); + Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(m_creature, pList, u_check); m_creature->VisitNearbyObject(range, searcher); return pList; } @@ -779,7 +745,7 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 s { std::list<Creature*> pList; Trinity::FriendlyMissingBuffInRange u_check(m_creature, range, spellid); - Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(pList, u_check); + Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(m_creature, pList, u_check); m_creature->VisitNearbyObject(range, searcher); return pList; } diff --git a/src/bindings/scripts/include/sc_creature.h b/src/bindings/scripts/include/sc_creature.h index a545d47332b..61a82bb6dd5 100644 --- a/src/bindings/scripts/include/sc_creature.h +++ b/src/bindings/scripts/include/sc_creature.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/> +/* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * @@ -11,7 +11,7 @@ #include "CreatureAI.h" #include "Creature.h" -float GetSpellMaxRange(uint32 id); +float GetSpellMaxRangeForHostile(uint32 id); class SummonList : std::list<uint64> { @@ -31,6 +31,16 @@ Unit* FindCreature(uint32 entry, float range, Unit* Finder); //Get a single gameobject of given entry GameObject* FindGameObject(uint32 entry, float range, Unit* Finder); +struct PointMovement +{ + uint32 m_uiCreatureEntry; + uint32 m_uiPointId; + float m_fX; + float m_fY; + float m_fZ; + uint32 m_uiWaitTime; +}; + struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI { ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), InCombat(false), IsFleeing(false) {} @@ -138,9 +148,6 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI //Plays a sound to all nearby players void DoPlaySoundToSet(Unit* unit, uint32 sound); - //Places the entire map into combat with creature - void DoZoneInCombat(Unit* pUnit = 0); - //Drops all threat to 0%. Does not remove players from the threat list void DoResetThreat(); diff --git a/src/bindings/scripts/include/sc_gossip.h b/src/bindings/scripts/include/sc_gossip.h index 74bc93694af..9665a7e1123 100644 --- a/src/bindings/scripts/include/sc_gossip.h +++ b/src/bindings/scripts/include/sc_gossip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/> +/* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * @@ -16,29 +16,38 @@ #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_WINDRIDER "Wind rider master" -#define GOSSIP_TEXT_GRYPHON "Gryphon Master" -#define GOSSIP_TEXT_BATHANDLER "Bat Handler" -#define GOSSIP_TEXT_HIPPOGRYPH "Hippogryph Master" -#define GOSSIP_TEXT_FLIGHTMASTER "Flight Master" -#define GOSSIP_TEXT_AUCTIONHOUSE "Auction House" -#define GOSSIP_TEXT_GUILDMASTER "Guild Master" -#define GOSSIP_TEXT_INN "The Inn" -#define GOSSIP_TEXT_MAILBOX "Mailbox" -#define GOSSIP_TEXT_STABLEMASTER "Stable Master" -#define GOSSIP_TEXT_WEAPONMASTER "Weapons Trainer" -#define GOSSIP_TEXT_BATTLEMASTER "Battlemaster" -#define GOSSIP_TEXT_CLASSTRAINER "Class Trainer" -#define GOSSIP_TEXT_PROFTRAINER "Profession Trainer" -#define GOSSIP_TEXT_OFFICERS "The officers` lounge" +#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" @@ -57,18 +66,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_IRONFORGE_BANK "Bank of Ironforge" -#define GOSSIP_TEXT_STORMWIND_BANK "Bank of Stormwind" -#define GOSSIP_TEXT_DEEPRUNTRAM "Deeprun Tram" -#define GOSSIP_TEXT_ZEPPLINMASTER "Zeppelin master" -#define GOSSIP_TEXT_FERRY "Rut'theran Ferry" +#define GOSSIP_TEXT_INSCRIPTION "Inscription" // Skill defines @@ -86,6 +89,7 @@ #define TRADESKILL_FISHING 12 #define TRADESKILL_SKINNING 13 #define TRADESKILL_JEWLCRAFTING 14 +#define TRADESKILL_INSCRIPTION 15 #define TRADESKILL_LEVEL_NONE 0 #define TRADESKILL_LEVEL_APPRENTICE 1 @@ -93,6 +97,7 @@ #define TRADESKILL_LEVEL_EXPERT 3 #define TRADESKILL_LEVEL_ARTISAN 4 #define TRADESKILL_LEVEL_MASTER 5 +#define TRADESKILL_LEVEL_GRAND_MASTER 6 // Gossip defines diff --git a/src/bindings/scripts/include/sc_instance.h b/src/bindings/scripts/include/sc_instance.h index 75a25490419..2f1cd3a16a6 100644 --- a/src/bindings/scripts/include/sc_instance.h +++ b/src/bindings/scripts/include/sc_instance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp b/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp index 6767a8fe88b..1c1b7312cb3 100644 --- a/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp +++ b/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,6 @@ EndScriptData */ /* ContentData at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm -at_test script test only EndContentData */ #include "precompiled.h" @@ -56,12 +55,6 @@ bool AreaTrigger_at_legion_teleporter(Player *player, AreaTriggerEntry *at) return false; } -bool ATtest(Player *player, AreaTriggerEntry *at) -{ - player->Say("Hi!",LANG_UNIVERSAL); - return true; -} - void AddSC_areatrigger_scripts() { Script *newscript; @@ -70,10 +63,5 @@ void AddSC_areatrigger_scripts() newscript->Name = "at_legion_teleporter"; newscript->pAreaTrigger = &AreaTrigger_at_legion_teleporter; newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name="at_test"; - newscript->pAreaTrigger = &ATtest; - newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/boss/boss_emeriss.cpp b/src/bindings/scripts/scripts/boss/boss_emeriss.cpp index eecd2595a68..08b374c443e 100644 --- a/src/bindings/scripts/scripts/boss/boss_emeriss.cpp +++ b/src/bindings/scripts/scripts/boss/boss_emeriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/boss/boss_lethon.cpp b/src/bindings/scripts/scripts/boss/boss_lethon.cpp index 721009ac68c..e387891efed 100644 --- a/src/bindings/scripts/scripts/boss/boss_lethon.cpp +++ b/src/bindings/scripts/scripts/boss/boss_lethon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/boss/boss_taerar.cpp b/src/bindings/scripts/scripts/boss/boss_taerar.cpp index 57184aa4b98..0d046456523 100644 --- a/src/bindings/scripts/scripts/boss/boss_taerar.cpp +++ b/src/bindings/scripts/scripts/boss/boss_taerar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/boss/boss_ysondre.cpp b/src/bindings/scripts/scripts/boss/boss_ysondre.cpp index fca9bc4b15b..0cfbc37b374 100644 --- a/src/bindings/scripts/scripts/boss/boss_ysondre.cpp +++ b/src/bindings/scripts/scripts/boss/boss_ysondre.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp index 9c0bf637429..5f656a45da8 100644 --- a/src/bindings/scripts/scripts/creature/mob_event_ai.cpp +++ b/src/bindings/scripts/scripts/creature/mob_event_ai.cpp @@ -1,1432 +1 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along 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_Event_AI -SD%Complete: 90 -SDComment: Database Event AI -SDCategory: Creatures -EndScriptData */ - #include "precompiled.h" -#include "mob_event_ai.h" -#include "ObjectMgr.h" - -#define EVENT_UPDATE_TIME 500 -#define SPELL_RUN_AWAY 8225 - -struct EventHolder -{ - EventHolder(EventAI_Event p) : Event(p), Time(0), Enabled(true){} - - EventAI_Event Event; - uint32 Time; - bool Enabled; -}; - -struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI -{ - Mob_EventAI(Creature *c, std::list<EventHolder> pEventList) : ScriptedAI(c) - { - EventList = pEventList; - Phase = 0; - CombatMovementEnabled = true; - MeleeEnabled = true; - AttackDistance = 0; - AttackAngle = 0.0f; - - //Handle Spawned Events - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - case EVENT_T_SPAWNED: - ProcessEvent(*i); - break; - } - } - } - - ~Mob_EventAI() - { - EventList.clear(); - } - - //Variables used by EventAI for handling events - std::list<EventHolder> EventList; //Holder for events (stores enabled, time, and eventid) - uint32 EventUpdateTime; //Time between event updates - uint32 EventDiff; //Time between the last event call - - //Variables used by Events themselves - uint8 Phase; //Current phase, max 32 phases - bool CombatMovementEnabled; //If we allow targeted movment gen (movement twoards top threat) - bool MeleeEnabled; //If we allow melee auto attack - uint32 AttackDistance; //Distance to attack from - float AttackAngle; //Angle of attack - uint32 TimetoFleeLeft; //For fleeing - - bool ProcessEvent(EventHolder& pHolder, Unit* pActionInvoker = NULL) - { - if (!pHolder.Enabled || pHolder.Time) - return false; - - //Check the inverse phase mask (event doesn't trigger if current phase bit is set in mask) - if (pHolder.Event.event_inverse_phase_mask & (1 << Phase)) - return false; - - //Store random here so that all random actions match up - uint32 rnd = rand(); - - //Return if chance for event is not met - if (pHolder.Event.event_chance <= rnd % 100) - return false; - - union - { - uint32 param1; - int32 param1_s; - }; - - union - { - uint32 param2; - int32 param2_s; - }; - - union - { - uint32 param3; - int32 param3_s; - }; - - union - { - uint32 param4; - int32 param4_s; - }; - - param1 = pHolder.Event.event_param1; - param2 = pHolder.Event.event_param2; - param3 = pHolder.Event.event_param3; - param4 = pHolder.Event.event_param4; - - //Check event conditions based on the event type, also reset events - switch (pHolder.Event.event_type) - { - case EVENT_T_TIMER: - { - if (!InCombat) - return false; - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_TIMER_OOC: - { - if (InCombat) - return false; - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_HP: - { - if (!InCombat || !m_creature->GetMaxHealth()) - return false; - - uint32 perc = (m_creature->GetHealth()*100) / m_creature->GetMaxHealth(); - - if (perc > param1 || perc < param2) - return false; - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_MANA: - { - if (!InCombat || !m_creature->GetMaxPower(POWER_MANA)) - return false; - - uint32 perc = (m_creature->GetPower(POWER_MANA)*100) / m_creature->GetMaxPower(POWER_MANA); - - if (perc > param1 || perc < param2) - return false; - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_AGGRO: - { - } - break; - case EVENT_T_KILL: - { - //Repeat Timers - if (param1 == param2) - { - pHolder.Time = param1; - - }else if (param2 > param1) - pHolder.Time = urand(param1, param2); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - case EVENT_T_DEATH: - { - } - break; - case EVENT_T_EVADE: - { - } - break; - case EVENT_T_SPELLHIT: - { - //Spell hit is special case, param1 and param2 handled within EventAI::SpellHit - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_RANGE: - { - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_OOC_LOS: - { - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_SPAWNED: - { - } - break; - case EVENT_T_TARGET_HP: - { - if (!InCombat || !m_creature->getVictim() || !m_creature->getVictim()->GetMaxHealth()) - return false; - - uint32 perc = (m_creature->getVictim()->GetHealth()*100) / m_creature->getVictim()->GetMaxHealth(); - - if (perc > param1 || perc < param2) - return false; - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_TARGET_CASTING: - { - if (!InCombat || !m_creature->getVictim() || !m_creature->getVictim()->IsNonMeleeSpellCasted(false, false, true)) - return false; - - //Repeat Timers - if (param1 == param2) - { - pHolder.Time = param1; - - }else if (param2 > param1) - pHolder.Time = urand(param1, param2); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_FRIENDLY_HP: - { - if (!InCombat) - return false; - - Unit* pUnit = DoSelectLowestHpFriendly(param2, param1); - - if (!pUnit) - return false; - - pActionInvoker = pUnit; - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_FRIENDLY_IS_CC: - { - if (!InCombat) - return false; - - std::list<Creature*> pList = DoFindFriendlyCC(param2); - - //List is empty - if (pList.empty()) - return false; - - //We don't really care about the whole list, just return first available - pActionInvoker = *(pList.begin()); - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_FRIENDLY_MISSING_BUFF: - { - std::list<Creature*> pList = DoFindFriendlyMissingBuff(param2, param1); - - //List is empty - if (pList.empty()) - return false; - - //We don't really care about the whole list, just return first available - pActionInvoker = *(pList.begin()); - - //Repeat Timers - if (param3 == param4) - { - pHolder.Time = param3; - - }else if (param4 > param3) - pHolder.Time = urand(param3, param4); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_SUMMONED_UNIT: - { - //Prevent event from occuring on no unit or non creatures - if (!pActionInvoker || pActionInvoker->GetTypeId()!=TYPEID_UNIT) - return false; - - //Creature id doesn't match up - if (param1 && ((Creature*)pActionInvoker)->GetEntry() != param1) - return false; - - //Repeat Timers - if (param2 == param3) - { - pHolder.Time = param2; - - }else if (param3 > param2) - pHolder.Time = urand(param2, param3); - else - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - pHolder.Enabled = false; - } - } - break; - case EVENT_T_REACHED_HOME: - { - } - break; - default: - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", m_creature->GetEntry(), pHolder.Event.event_id, pHolder.Event.event_type); - break; - } - - //Disable non-repeatable events - if (!(pHolder.Event.event_flags & EFLAG_REPEATABLE)) - pHolder.Enabled = false; - - //Process actions - for (uint32 j = 0; j < MAX_ACTIONS; j++) - ProcessAction(pHolder.Event.action[j].type, pHolder.Event.action[j].param1, pHolder.Event.action[j].param2, pHolder.Event.action[j].param3, rnd, pHolder.Event.event_id, pActionInvoker); - - return true; - } - - inline uint32 GetRandActionParam(uint32 rnd, uint32 param1, uint32 param2, uint32 param3) - { - switch (rnd % 3) - { - case 0: - return param1; - break; - case 1: - return param2; - break; - case 2: - return param3; - break; - } - return 0; - } - - inline Unit* GetTargetByType(uint32 Target, Unit* pActionInvoker) - { - switch (Target) - { - case TARGET_T_SELF: - return m_creature; - break; - case TARGET_T_HOSTILE: - return m_creature->getVictim(); - break; - case TARGET_T_HOSTILE_SECOND_AGGRO: - return SelectUnit(SELECT_TARGET_TOPAGGRO,1); - break; - case TARGET_T_HOSTILE_LAST_AGGRO: - return SelectUnit(SELECT_TARGET_BOTTOMAGGRO,0); - break; - case TARGET_T_HOSTILE_RANDOM: - return SelectUnit(SELECT_TARGET_RANDOM,0); - break; - case TARGET_T_HOSTILE_RANDOM_NOT_TOP: - return SelectUnit(SELECT_TARGET_RANDOM,1); - break; - case TARGET_T_ACTION_INVOKER: - return pActionInvoker; - break; - default: - return NULL; - break; - }; - } - - void ProcessAction(uint16 type, uint32 param1, uint32 param2, uint32 param3, uint32 rnd, uint32 EventId, Unit* pActionInvoker) - { - switch (type) - { - case ACTION_T_TEXT: - { - if (!param1) - return; - - uint32 temp = 0; - - if (param2 && param3) - { - switch( rand()%3 ) - { - case 0: temp = param1; break; - case 2: temp = param2; break; - case 3: temp = param3; break; - } - }else if ( param2 && urand(0,1) ) - { - temp = param2; - }else - { - temp = param1; - } - - if (temp) - { - Unit* target = NULL; - Unit* owner = NULL; - - if (pActionInvoker) - { - if (pActionInvoker->GetTypeId() == TYPEID_PLAYER) - target = pActionInvoker; - else if (owner = pActionInvoker->GetOwner()) - { - if (owner->GetTypeId() == TYPEID_PLAYER) - target = owner; - } - } - else if (target = m_creature->getVictim()) - { - if (target->GetTypeId() != TYPEID_PLAYER) - { - if (owner = target->GetOwner()) - { - if (owner->GetTypeId() == TYPEID_PLAYER) - target = owner; - } - } - } - - DoScriptText(temp, m_creature, target); - } - } - break; - case ACTION_T_SET_FACTION: - { - if (param1) - m_creature->setFaction(param1); - else - { - if (CreatureInfo const* ci = GetCreatureTemplateStore(m_creature->GetEntry())) - { - //if no id provided, assume reset and then use default - if (m_creature->getFaction() != ci->faction_A) - m_creature->setFaction(ci->faction_A); - } - } - } - break; - case ACTION_T_MORPH_TO_ENTRY_OR_MODEL: - { - if (param1 || param2) - { - //set model based on entry from creature_template - if (param1) - { - if (CreatureInfo const* ci = GetCreatureTemplateStore(param1)) - { - //use default display - if (ci->Modelid1) - m_creature->SetDisplayId(ci->Modelid1); - } - } - //if no param1, then use value from param2 (modelId) - else - m_creature->SetDisplayId(param2); - } - else - m_creature->DeMorph(); - } - break; - case ACTION_T_SOUND: - DoPlaySoundToSet(m_creature, param1); - break; - case ACTION_T_EMOTE: - m_creature->HandleEmoteCommand(param1); - break; - case ACTION_T_RANDOM_SOUND: - { - uint32 temp = GetRandActionParam(rnd, param1, param2, param3); - - if (temp != 0xffffffff) - DoPlaySoundToSet(m_creature, temp); - } - break; - case ACTION_T_RANDOM_EMOTE: - { - uint32 temp = GetRandActionParam(rnd, param1, param2, param3); - - if (temp != 0xffffffff) - m_creature->HandleEmoteCommand(temp); - } - break; - case ACTION_T_CAST: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - Unit* caster = m_creature; - - if (!target) - return; - - //Cast is always triggered if target is forced to cast on self - if (param3 & CAST_FORCE_TARGET_SELF) - { - param3 |= CAST_TRIGGERED; - caster = target; - } - - //Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered - bool canCast = !(caster->IsNonMeleeSpellCasted(false) && (param3 & CAST_TRIGGERED | CAST_INTURRUPT_PREVIOUS)); - - // If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them - if(param3 & CAST_AURA_NOT_PRESENT) - { - for(uint8 i = 0; i < 3; ++i) - if(target->HasAura(param1, i)) - return; - } - - if (canCast) - { - const SpellEntry* tSpell = GetSpellStore()->LookupEntry(param1); - - //Verify that spell exists - if (tSpell) - { - //Check if cannot cast spell - if (!(param3 & (CAST_FORCE_TARGET_SELF | CAST_FORCE_CAST)) && - !CanCast(target, tSpell, (param3 & CAST_TRIGGERED))) - { - //Melee current victim if flag not set - if (!(param3 & CAST_NO_MELEE_IF_OOM)) - { - AttackDistance = 0; - AttackAngle = 0; - - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle); - } - - }else - { - //Interrupt any previous spell - if (caster->IsNonMeleeSpellCasted(false) && param3 & CAST_INTURRUPT_PREVIOUS) - caster->InterruptNonMeleeSpells(false); - - caster->CastSpell(target, param1, (param3 & CAST_TRIGGERED)); - } - - }else if (EAI_ErrorLevel > 0) - error_db_log("SD2: EventAI event %d creature %d attempt to cast spell that doesn't exist %d", EventId, m_creature->GetEntry(), param1); - } - } - break; - case ACTION_T_SUMMON: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - Creature* pCreature = NULL; - - if (param3) - pCreature = DoSpawnCreature(param1, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, param3); - else pCreature = pCreature = DoSpawnCreature(param1, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0); - - if (!pCreature) - { - if (EAI_ErrorLevel > 0) - error_db_log( "SD2: EventAI failed to spawn creature %u. Spawn event %d is on creature %d", param1, EventId, m_creature->GetEntry()); - } - else if (param2 != TARGET_T_SELF && target) - pCreature->AI()->AttackStart(target); - } - break; - case ACTION_T_THREAT_SINGLE_PCT: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - if (target) - DoModifyThreatPercent(target, param1); - } - break; - case ACTION_T_THREAT_ALL_PCT: - { - Unit* Temp = NULL; - - std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) - { - Temp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); - if (Temp) - DoModifyThreatPercent(Temp, param1); - } - } - break; - case ACTION_T_QUEST_EVENT: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - if (target && target->GetTypeId() == TYPEID_PLAYER) - ((Player*)target)->AreaExploredOrEventHappens(param1); - } - break; - case ACTION_T_CASTCREATUREGO: - { - Unit* target = GetTargetByType(param3, pActionInvoker); - - if (target && target->GetTypeId() == TYPEID_PLAYER) - ((Player*)target)->CastedCreatureOrGO(param1, m_creature->GetGUID(), param2); - } - break; - case ACTION_T_SET_UNIT_FIELD: - { - Unit* target = GetTargetByType(param3, pActionInvoker); - - if (param1 < OBJECT_END || param1 >= UNIT_END) - return; - - if (target) - target->SetUInt32Value(param1, param2); - } - break; - case ACTION_T_SET_UNIT_FLAG: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - if (target) - target->SetFlag(UNIT_FIELD_FLAGS, param1); - } - break; - case ACTION_T_REMOVE_UNIT_FLAG: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - if (target) - target->RemoveFlag(UNIT_FIELD_FLAGS, param1); - } - break; - case ACTION_T_AUTO_ATTACK: - { - if (param1) - MeleeEnabled = true; - else MeleeEnabled = false; - } - break; - case ACTION_T_COMBAT_MOVEMENT: - { - CombatMovementEnabled = param1; - - //Allow movement (create new targeted movement gen if none exist already) - if (CombatMovementEnabled) - { - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle); - } - else - { - m_creature->GetMotionMaster()->MoveIdle(); - } - } - break; - case ACTION_T_SET_PHASE: - { - Phase = param1; - } - break; - case ACTION_T_INC_PHASE: - { - Phase += param1; - - if (Phase > 31) - if (EAI_ErrorLevel > 0) - error_db_log( "SD2: Event %d incremented Phase above 31. Phase mask cannot be used with phases past 31. CreatureEntry = %d", EventId, m_creature->GetEntry()); - } - break; - case ACTION_T_EVADE: - { - EnterEvadeMode(); - } - break; - case ACTION_T_FLEE: - { - if(m_creature->HasAuraType(SPELL_AURA_PREVENTS_FLEEING)) - break; - TimetoFleeLeft = 8000; - m_creature->DoFleeToGetAssistance(); - IsFleeing = true; - } - break; - case ACTION_T_QUEST_EVENT_ALL: - { - Unit* Temp = NULL; - if( pActionInvoker && pActionInvoker->GetTypeId() == TYPEID_PLAYER ) - { - Temp = Unit::GetUnit((*m_creature),pActionInvoker->GetGUID()); - if( Temp ) - ((Player*)Temp)->GroupEventHappens(param1,m_creature); - } - } - break; - case ACTION_T_CASTCREATUREGO_ALL: - { - Unit* Temp = NULL; - - std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) - { - Temp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); - if (Temp && Temp->GetTypeId() == TYPEID_PLAYER) - ((Player*)Temp)->CastedCreatureOrGO(param1, m_creature->GetGUID(), param2); - } - } - break; - case ACTION_T_REMOVEAURASFROMSPELL: - { - Unit* target = GetTargetByType(param1, pActionInvoker); - - if (target) - target->RemoveAurasDueToSpell(param2); - } - break; - case ACTION_T_RANGED_MOVEMENT: - { - AttackDistance = param1; - AttackAngle = ((float)param2/180)*M_PI; - - if (CombatMovementEnabled) - { - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle); - } - } - break; - case ACTION_T_RANDOM_PHASE: - { - uint32 temp = GetRandActionParam(rnd, param1, param2, param3); - - Phase = temp; - } - break; - case ACTION_T_RANDOM_PHASE_RANGE: - { - if (param2 > param1) - { - Phase = param1 + (rnd % (param2 - param1)); - } - else if (EAI_ErrorLevel > 0) - error_db_log( "SD2: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 <= Param1. Divide by Zero. Event = %d. CreatureEntry = %d", EventId, m_creature->GetEntry()); - } - break; - case ACTION_T_SUMMON_ID: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - //Duration - Creature* pCreature = NULL; - - UNORDERED_MAP<uint32, EventAI_Summon>::iterator i = EventAI_Summon_Map.find(param3); - - if (i == EventAI_Summon_Map.end()) - { - if (EAI_ErrorLevel > 0) - error_db_log( "SD2: EventAI failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", param1, param3, EventId, m_creature->GetEntry()); - return; - } - - if ((*i).second.SpawnTimeSecs) - pCreature = m_creature->SummonCreature(param1, (*i).second.position_x, (*i).second.position_y, (*i).second.position_z, (*i).second.orientation, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, (*i).second.SpawnTimeSecs); - else pCreature = m_creature->SummonCreature(param1, (*i).second.position_x, (*i).second.position_y, (*i).second.position_z, (*i).second.orientation, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0); - - if (!pCreature) - { - if (EAI_ErrorLevel > 0) - error_db_log( "SD2: EventAI failed to spawn creature %u. EventId %d.Creature %d", param1, EventId, m_creature->GetEntry()); - } - else if (param2 != TARGET_T_SELF && target) - pCreature->AI()->AttackStart(target); - } - break; - case ACTION_T_KILLED_MONSTER: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - if (target && target->GetTypeId() == TYPEID_PLAYER) - ((Player*)target)->KilledMonster(param1, m_creature->GetGUID()); - } - break; - case ACTION_T_SET_INST_DATA: - { - ScriptedInstance* pInst = (ScriptedInstance*)m_creature->GetInstanceData(); - if (!pInst) - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Event %d attempt to set instance data without instance script. Creature %d", EventId, m_creature->GetEntry()); - return; - } - - pInst->SetData(param1, param2); - } - break; - case ACTION_T_SET_INST_DATA64: - { - Unit* target = GetTargetByType(param2, pActionInvoker); - - if (!target) - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Event %d attempt to set instance data64 but Target == NULL. Creature %d", EventId, m_creature->GetEntry()); - return; - } - - ScriptedInstance* pInst = (ScriptedInstance*)m_creature->GetInstanceData(); - - if (!pInst) - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Event %d attempt to set instance data64 without instance script. Creature %d", EventId, m_creature->GetEntry()); - return; - } - - pInst->SetData64(param1, target->GetGUID()); - } - break; - case ACTION_T_UPDATE_TEMPLATE: - { - if (m_creature->GetEntry() == param1) - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Event %d ACTION_T_UPDATE_TEMPLATE call with param1 == current entry. Creature %d", EventId, m_creature->GetEntry()); - return; - } - - m_creature->UpdateEntry(param1, param2 ? HORDE : ALLIANCE); - } - break; - case ACTION_T_DIE: - { - if (m_creature->isDead()) - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Event %d ACTION_T_DIE on dead creature. Creature %d", EventId, m_creature->GetEntry()); - return; - } - m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - break; - case ACTION_T_ZONE_COMBAT_PULSE: - { - if (!m_creature->isInCombat() || !m_creature->GetMap()->IsDungeon()) - { - if (EAI_ErrorLevel > 0) - error_db_log("SD2: Event %d ACTION_T_ZONE_COMBAT_PULSE on creature out of combat or in non-dungeon map. Creature %d", EventId, m_creature->GetEntry()); - return; - } - - DoZoneInCombat(); - } - break; - - // TRINITY ONLY - case ACTION_T_SET_ACTIVE: - m_creature->setActive(param1 ? true : false); - break; - case ACTION_T_SET_AGGRESSIVE: - m_creature->SetReactState(ReactStates(param1)); - break; - case ACTION_T_ATTACK_START_PULSE: - AttackStart(m_creature->SelectNearestTarget((float)param1)); - break; - } - } - - void JustRespawned() - { - InCombat = false; - IsFleeing = false; - Reset(); - - //Handle Spawned Events - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - case EVENT_T_SPAWNED: - ProcessEvent(*i); - break; - } - } - } - - void Reset() - { - EventUpdateTime = EVENT_UPDATE_TIME; - EventDiff = 0; - - //Reset all events to enabled - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - //Reset all out of combat timers - case EVENT_T_TIMER_OOC: - { - if ((*i).Event.event_param2 == (*i).Event.event_param1) - { - (*i).Time = (*i).Event.event_param1; - (*i).Enabled = true; - }else if ((*i).Event.event_param2 > (*i).Event.event_param1) - { - (*i).Time = urand((*i).Event.event_param1, (*i).Event.event_param2); - (*i).Enabled = true; - }else if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has InitialMax < InitialMin. Event disabled.", m_creature->GetEntry(), (*i).Event.event_id, (*i).Event.event_type); - } - break; - //default: - //TODO: enable below code line / verify this is correct to enable events previously disabled (ex. aggro yell), instead of enable this in void Aggro() - //(*i).Enabled = true; - //(*i).Time = 0; - //break; - } - } - } - - //when creature reach home after EnterEvadeMode - void JustReachedHome() - { - m_creature->LoadCreaturesAddon(); - - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - if ((*i).Event.event_type == EVENT_T_REACHED_HOME) - ProcessEvent(*i); - } - - Reset(); - } - - void EnterEvadeMode() - { - ScriptedAI::EnterEvadeMode(); - - IsFleeing = false; - - //Handle Evade events - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - if ((*i).Event.event_type == EVENT_T_EVADE) - ProcessEvent(*i); - } - } - - void JustDied(Unit* killer) - { - InCombat = false; - IsFleeing = false; - Reset(); - - //Handle Evade events - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - //Evade - case EVENT_T_DEATH: - ProcessEvent(*i, killer); - break; - } - } - } - - void KilledUnit(Unit* victim) - { - if (victim->GetTypeId() != TYPEID_PLAYER) - return; - - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - //Kill - case EVENT_T_KILL: - ProcessEvent(*i, victim); - break; - } - } - - } - - void JustSummoned(Creature* pUnit) - { - if (!pUnit) - return; - - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - //Summoned - case EVENT_T_SUMMONED_UNIT: - ProcessEvent(*i, pUnit); - break; - } - } - } - - void Aggro(Unit *who) - { - //Check for on combat start events - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - case EVENT_T_AGGRO: - (*i).Enabled = true; - ProcessEvent(*i, who); - break; - //Reset all in combat timers - case EVENT_T_TIMER: - if ((*i).Event.event_param2 == (*i).Event.event_param1) - { - (*i).Time = (*i).Event.event_param1; - (*i).Enabled = true; - }else if ((*i).Event.event_param2 > (*i).Event.event_param1) - { - (*i).Time = urand((*i).Event.event_param1, (*i).Event.event_param2); - (*i).Enabled = true; - }else if (EAI_ErrorLevel > 0) - error_db_log("SD2: Creature %u using Event %u (Type = %u) has InitialMax < InitialMin. Event disabled.", m_creature->GetEntry(), (*i).Event.event_id, (*i).Event.event_type); - break; - //All normal events need to be re-enabled and their time set to 0 - default: - (*i).Enabled = true; - (*i).Time = 0; - break; - } - } - - EventUpdateTime = EVENT_UPDATE_TIME; - EventDiff = 0; - } - - void AttackStart(Unit *who) - { - if (!who) - return; - - if (m_creature->Attack(who, MeleeEnabled)) - { - //Begin melee attack if we are within range - - if (!InCombat) - { - InCombat = true; - Aggro(who); - } - - if (CombatMovementEnabled) - { - m_creature->GetMotionMaster()->MoveChase(who, AttackDistance, AttackAngle); - } - else - { - m_creature->GetMotionMaster()->MoveIdle(); - } - } - } - - void MoveInLineOfSight(Unit *who) - { - if (!who || InCombat) - return; - - //Check for OOC LOS Event - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - case EVENT_T_OOC_LOS: - { - if ((*i).Event.event_param1 && m_creature->IsHostileTo(who)) - break; - - if ((*i).Event.event_param2 && !m_creature->IsHostileTo(who)) - break; - - ProcessEvent(*i, who); - } - break; - } - } - - // do we need this? - //if (m_creature->isCivilian() && m_creature->IsNeutralToAll()) - // return; - - if(m_creature->canStartAttack(who)) - AttackStart(who); - } - - void SpellHit(Unit* pUnit, const SpellEntry* pSpell) - { - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - //Spell hit - case EVENT_T_SPELLHIT: - { - //If spell id matches (or no spell id) & if spell school matches (or no spell school) - if (!(*i).Event.event_param1 || pSpell->Id == (*i).Event.event_param1) - if ((*i).Event.event_param2_s == -1 || pSpell->SchoolMask == (*i).Event.event_param2) - ProcessEvent(*i, pUnit); - } - break; - } - } - } - - void UpdateAI(const uint32 diff) - { - //Check if we are in combat (also updates calls threat update code) - bool Combat = InCombat ? UpdateVictim() : false; - - //Must return if creature isn't alive. Normally select hostil target and get victim prevent this - if (!m_creature->isAlive()) - return; - - if (IsFleeing) - { - if(TimetoFleeLeft < diff) - { - m_creature->SetControlled(false, UNIT_STAT_FLEEING); - m_creature->SetNoCallAssistance(false); - m_creature->CallAssistance(); - if(m_creature->getVictim()) - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - IsFleeing = false; - } - else - TimetoFleeLeft -= diff; - - return; - } - - //Events are only updated once every EVENT_UPDATE_TIME ms to prevent lag with large amount of events - if (EventUpdateTime < diff) - { - EventDiff += diff; - - //Check for range based events - //if (m_creature->GetDistance(m_creature->getVictim()) > - if (Combat) - { - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - switch ((*i).Event.event_type) - { - case EVENT_T_RANGE: - // in some cases this is called twice and victim may not exist in the second time - if(m_creature->getVictim()) - { - float dist = m_creature->GetDistance(m_creature->getVictim()); - if (dist > (*i).Event.event_param1 && dist < (*i).Event.event_param2) - ProcessEvent(*i); - } - break; - } - } - } - - //Check for time based events - for (std::list<EventHolder>::iterator i = EventList.begin(); i != EventList.end(); ++i) - { - //Decrement Timers - if ((*i).Time) - { - if ((*i).Time > EventDiff) - { - //Do not decrement timers if event cannot trigger in this phase - if (!((*i).Event.event_inverse_phase_mask & (1 << Phase))) - (*i).Time -= EventDiff; - - //Skip processing of events that have time remaining - continue; - } - else (*i).Time = 0; - } - - //Events that are updated every EVENT_UPDATE_TIME - switch ((*i).Event.event_type) - { - case EVENT_T_TIMER_OOC: - ProcessEvent(*i); - break; - case EVENT_T_TIMER: - case EVENT_T_MANA: - case EVENT_T_HP: - case EVENT_T_TARGET_HP: - case EVENT_T_TARGET_CASTING: - case EVENT_T_FRIENDLY_HP: - if (Combat) - ProcessEvent(*i); - break; - case EVENT_T_RANGE: - if (Combat) - { - if (m_creature->IsWithinDistInMap(m_creature->getVictim(),(float)(*i).Event.event_param2)) - { - if (m_creature->GetDistance(m_creature->getVictim()) >= (float)(*i).Event.event_param1) - ProcessEvent(*i); - } - } - break; - } - } - - EventDiff = 0; - EventUpdateTime = EVENT_UPDATE_TIME; - } - else - { - EventDiff += diff; - EventUpdateTime -= diff; - } - - //Melee Auto-Attack - if (Combat && MeleeEnabled) - DoMeleeAttackIfReady(); - - } -}; - -CreatureAI* GetAI_Mob_EventAI(Creature *pCreature) -{ - //Select events by creature id - std::list<EventHolder> EventList; - - //Find creature id in the Event map - UNORDERED_MAP<uint32, std::vector<EventAI_Event> >::iterator CreatureEvents = EventAI_Event_Map.find(pCreature->GetEntry()); - - if (CreatureEvents != EventAI_Event_Map.end()) - { - std::vector<EventAI_Event>::iterator i; - - for (i = (*CreatureEvents).second.begin(); i != (*CreatureEvents).second.end(); ++i) - { - //Debug check -#ifndef _DEBUG - if ((*i).event_flags & EFLAG_DEBUG_ONLY) - continue; -#endif - if( pCreature->GetMap()->IsDungeon() ) - { - if ((pCreature->GetMap()->IsHeroic() && (*i).event_flags & EFLAG_HEROIC) || - (!pCreature->GetMap()->IsHeroic() && (*i).event_flags & EFLAG_NORMAL)) - EventList.push_back(EventHolder(*i)); - continue; - } - - EventList.push_back(EventHolder(*i)); - } - - //EventMap had events but they were not added because they must be for instance - if (EventList.empty()) - { - if (EAI_ErrorLevel > 1) - error_db_log("SD2: CreatureId has events but no events added to list because of instance flags.", pCreature->GetEntry()); - } - } - else - { - if (EAI_ErrorLevel > 1) - error_db_log("SD2: EventMap for Creature %u is empty but creature is using Mob_EventAI.", pCreature->GetEntry()); - } - - return new Mob_EventAI (pCreature, EventList); -} - -void AddSC_mob_event() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "mob_eventai"; - newscript->GetAI = &GetAI_Mob_EventAI; - newscript->RegisterSelf(); -} - diff --git a/src/bindings/scripts/scripts/creature/mob_event_ai.h b/src/bindings/scripts/scripts/creature/mob_event_ai.h index aff54b824f4..f6c9b663ce0 100644 --- a/src/bindings/scripts/scripts/creature/mob_event_ai.h +++ b/src/bindings/scripts/scripts/creature/mob_event_ai.h @@ -1,222 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - #ifndef SC_EVENTAI_H #define SC_EVENTAI_H - -#define MAX_ACTIONS 3 - -enum Event_Types -{ - EVENT_T_TIMER = 0, //InitialMin, InitialMax, RepeatMin, RepeatMax - EVENT_T_TIMER_OOC = 1, //InitialMin, InitialMax, RepeatMin, RepeatMax - EVENT_T_HP = 2, //HPMax%, HPMin%, RepeatMin, RepeatMax - EVENT_T_MANA = 3, //ManaMax%,ManaMin% RepeatMin, RepeatMax - EVENT_T_AGGRO = 4, //NONE - EVENT_T_KILL = 5, //RepeatMin, RepeatMax - EVENT_T_DEATH = 6, //NONE - EVENT_T_EVADE = 7, //NONE - EVENT_T_SPELLHIT = 8, //SpellID, School, RepeatMin, RepeatMax - EVENT_T_RANGE = 9, //MinDist, MaxDist, RepeatMin, RepeatMax - EVENT_T_OOC_LOS = 10, //NoHostile, NoFriendly, RepeatMin, RepeatMax - EVENT_T_SPAWNED = 11, //NONE - EVENT_T_TARGET_HP = 12, //HPMax%, HPMin%, RepeatMin, RepeatMax - EVENT_T_TARGET_CASTING = 13, //RepeatMin, RepeatMax - EVENT_T_FRIENDLY_HP = 14, //HPDeficit, Radius, RepeatMin, RepeatMax - EVENT_T_FRIENDLY_IS_CC = 15, //DispelType, Radius, RepeatMin, RepeatMax - EVENT_T_FRIENDLY_MISSING_BUFF = 16, //SpellId, Radius, RepeatMin, RepeatMax - EVENT_T_SUMMONED_UNIT = 17, //CreatureId, RepeatMin, RepeatMax - EVENT_T_TARGET_MANA = 18, //ManaMax%, ManaMin%, RepeatMin, RepeatMax - EVENT_T_QUEST_ACCEPT = 19, //QuestID - EVENT_T_QUEST_COMPLETE = 20, // - EVENT_T_REACHED_HOME = 21, //NONE - - EVENT_T_END, -}; - -enum Action_Types -{ - ACTION_T_NONE = 0, //No action - ACTION_T_TEXT = 1, //-TextId1, optionally -TextId2, optionally -TextId3(if -TextId2 exist). If more than just -TextId1 is defined, randomize. Negative values. - ACTION_T_SET_FACTION = 2, //FactionId (or 0 for default) - ACTION_T_MORPH_TO_ENTRY_OR_MODEL = 3, //Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph) - ACTION_T_SOUND = 4, //SoundId - ACTION_T_EMOTE = 5, //EmoteId - ACTION_T_RANDOM_SAY = 6, //UNUSED - ACTION_T_RANDOM_YELL = 7, //UNUSED - ACTION_T_RANDOM_TEXTEMOTE = 8, //UNUSED - ACTION_T_RANDOM_SOUND = 9, //SoundId1, SoundId2, SoundId3 (-1 in any field means no output if randomed that field) - ACTION_T_RANDOM_EMOTE = 10, //EmoteId1, EmoteId2, EmoteId3 (-1 in any field means no output if randomed that field) - ACTION_T_CAST = 11, //SpellId, Target, CastFlags - ACTION_T_SUMMON = 12, //CreatureID, Target, Duration in ms - ACTION_T_THREAT_SINGLE_PCT = 13, //Threat%, Target - ACTION_T_THREAT_ALL_PCT = 14, //Threat% - ACTION_T_QUEST_EVENT = 15, //QuestID, Target - ACTION_T_CASTCREATUREGO = 16, //QuestID, SpellId, Target - ACTION_T_SET_UNIT_FIELD = 17, //Field_Number, Value, Target - ACTION_T_SET_UNIT_FLAG = 18, //Flags (may be more than one field OR'd together), Target - ACTION_T_REMOVE_UNIT_FLAG = 19, //Flags (may be more than one field OR'd together), Target - ACTION_T_AUTO_ATTACK = 20, //AllowAttackState (0 = stop attack, anything else means continue attacking) - ACTION_T_COMBAT_MOVEMENT = 21, //AllowCombatMovement (0 = stop combat based movement, anything else continue attacking) - ACTION_T_SET_PHASE = 22, //Phase - ACTION_T_INC_PHASE = 23, //Value (may be negative to decrement phase, should not be 0) - ACTION_T_EVADE = 24, //No Params - ACTION_T_FLEE = 25, //No Params - ACTION_T_QUEST_EVENT_ALL = 26, //QuestID - ACTION_T_CASTCREATUREGO_ALL = 27, //QuestId, SpellId - ACTION_T_REMOVEAURASFROMSPELL = 28, //Target, Spellid - ACTION_T_RANGED_MOVEMENT = 29, //Distance, Angle - ACTION_T_RANDOM_PHASE = 30, //PhaseId1, PhaseId2, PhaseId3 - ACTION_T_RANDOM_PHASE_RANGE = 31, //PhaseMin, PhaseMax - ACTION_T_SUMMON_ID = 32, //CreatureId, Target, SpawnId - ACTION_T_KILLED_MONSTER = 33, //CreatureId, Target - ACTION_T_SET_INST_DATA = 34, //Field, Data - ACTION_T_SET_INST_DATA64 = 35, //Field, Target - ACTION_T_UPDATE_TEMPLATE = 36, //Entry, Team - ACTION_T_DIE = 37, //No Params - ACTION_T_ZONE_COMBAT_PULSE = 38, //No Params - - ACTION_T_SET_ACTIVE = 101, //Apply - ACTION_T_SET_AGGRESSIVE = 102, //Apply - ACTION_T_ATTACK_START_PULSE = 103, //Distance - - ACTION_T_END, -}; - -enum Target -{ - //Self (m_creature) - TARGET_T_SELF = 0, //Self cast - - //Hostile targets (if pet then returns pet owner) - TARGET_T_HOSTILE, //Our current target (ie: highest aggro) - TARGET_T_HOSTILE_SECOND_AGGRO, //Second highest aggro (generaly used for cleaves and some special attacks) - TARGET_T_HOSTILE_LAST_AGGRO, //Dead last on aggro (no idea what this could be used for) - TARGET_T_HOSTILE_RANDOM, //Just any random target on our threat list - TARGET_T_HOSTILE_RANDOM_NOT_TOP, //Any random target except top threat - - //Invoker targets (if pet then returns pet owner) - TARGET_T_ACTION_INVOKER, //Unit who caused this Event to occur (only works for EVENT_T_AGGRO, EVENT_T_KILL, EVENT_T_DEATH, EVENT_T_SPELLHIT, EVENT_T_OOC_LOS, EVENT_T_FRIENDLY_HP, EVENT_T_FRIENDLY_IS_CC, EVENT_T_FRIENDLY_MISSING_BUFF) - - //Hostile targets (including pets) - TARGET_T_HOSTILE_WPET, //Current target (can be a pet) - TARGET_T_HOSTILE_WPET_SECOND_AGGRO, //Second highest aggro (generaly used for cleaves and some special attacks) - TARGET_T_HOSTILE_WPET_LAST_AGGRO, //Dead last on aggro (no idea what this could be used for) - TARGET_T_HOSTILE_WPET_RANDOM, //Just any random target on our threat list - TARGET_T_HOSTILE_WPET_RANDOM_NOT_TOP, //Any random target except top threat - - TARGET_T_ACTION_INVOKER_WPET, - - TARGET_T_END -}; - -enum CastFlags -{ - CAST_INTURRUPT_PREVIOUS = 0x01, //Interrupt any spell casting - CAST_TRIGGERED = 0x02, //Triggered (this makes spell cost zero mana and have no cast time) - CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range - CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range - CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself - CAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell -}; - -enum EventFlags -{ - EFLAG_REPEATABLE = 0x01, //Event repeats - EFLAG_NORMAL = 0x02, //Event only occurs in Normal instance difficulty - EFLAG_HEROIC = 0x04, //Event only occurs in Heroic instance difficulty - EFLAG_RESERVED_3 = 0x08, - EFLAG_RESERVED_4 = 0x10, - EFLAG_RESERVED_5 = 0x20, - EFLAG_RESERVED_6 = 0x40, - EFLAG_DEBUG_ONLY = 0x80, //Event only occurs in debug build of SD2 only -}; - -struct EventAI_Event -{ - uint32 event_id; - - uint32 creature_id; - - uint16 event_type; - uint32 event_inverse_phase_mask; - uint8 event_chance; - uint8 event_flags; - union - { - uint32 event_param1; - int32 event_param1_s; - }; - union - { - uint32 event_param2; - int32 event_param2_s; - }; - union - { - uint32 event_param3; - int32 event_param3_s; - }; - union - { - uint32 event_param4; - int32 event_param4_s; - }; - - struct _action - { - uint16 type; - union - { - uint32 param1; - int32 param1_s; - }; - union - { - uint32 param2; - int32 param2_s; - }; - union - { - uint32 param3; - int32 param3_s; - }; - }action[MAX_ACTIONS]; -}; - -//Event_Map -extern UNORDERED_MAP<uint32, std::vector<EventAI_Event> > EventAI_Event_Map; - -struct EventAI_Summon -{ - uint32 id; - - float position_x; - float position_y; - float position_z; - float orientation; - uint32 SpawnTimeSecs; -}; - -//EventSummon_Map -extern UNORDERED_MAP<uint32, EventAI_Summon> EventAI_Summon_Map; - -//EventAI Error handling -extern uint32 EAI_ErrorLevel; -/* - -struct EventAI_CreatureError -{ - bool ListEmpty; - bool NoInstance; -}; - -//Error prevention list -extern UNORDERED_MAP<uint32, EventAI_CreatureError> EventAI_CreatureErrorPreventionList; - -//Defines -#define EVENTAI_EMPTY_EVENTLIST "SD2: Eventlist for Creature %i is empty but creature is using Mob_EventAI. Preventing EventAI on this creature." -*/ #endif diff --git a/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp b/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp index d3395327aa7..a912e6af17f 100644 --- a/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp +++ b/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/creature/simple_ai.cpp b/src/bindings/scripts/scripts/creature/simple_ai.cpp index 96583c4ee39..5dd299e0a14 100644 --- a/src/bindings/scripts/scripts/creature/simple_ai.cpp +++ b/src/bindings/scripts/scripts/creature/simple_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -27,34 +27,25 @@ EndScriptData */ SimpleAI::SimpleAI(Creature *c) : ScriptedAI(c) { //Clear all data - Aggro_Text[0] = NULL; - Aggro_Text[1] = NULL; - Aggro_Text[2] = NULL; - Aggro_Say[0] = false; - Aggro_Say[1] = false; - Aggro_Say[2] = false; + 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_Text[0] = NULL; - Death_Text[1] = NULL; - Death_Text[2] = NULL; - Death_Say[0] = false; - Death_Say[1] = false; - Death_Say[2] = false; + 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_Text[0] = NULL; - Kill_Text[1] = NULL; - Kill_Text[2] = NULL; - Kill_Say[0] = false; - Kill_Say[1] = false; - Kill_Say[2] = false; + Kill_TextId[0] = 0; + Kill_TextId[1] = 0; + Kill_TextId[2] = 0; Kill_Sound[0] = 0; Kill_Sound[1] = 0; Kill_Sound[2] = 0; @@ -106,11 +97,9 @@ void SimpleAI::Aggro(Unit *who) uint32 random_text = rand()%3; - //Random yell - if (Aggro_Text[random_text]) - if (Aggro_Say[random_text]) - DoSay(Aggro_Text[random_text], LANG_UNIVERSAL, who); - else DoYell(Aggro_Text[random_text], LANG_UNIVERSAL, who); + //Random text + if (Aggro_TextId[random_text]) + DoScriptText(Aggro_TextId[random_text], m_creature, who); //Random sound if (Aggro_Sound[random_text]) @@ -122,10 +111,8 @@ void SimpleAI::KilledUnit(Unit *victim) uint32 random_text = rand()%3; //Random yell - if (Kill_Text[random_text]) - if (Kill_Say[random_text]) - DoSay(Kill_Text[random_text], LANG_UNIVERSAL, victim); - else DoYell(Kill_Text[random_text], LANG_UNIVERSAL, victim); + if (Kill_TextId[random_text]) + DoScriptText(Kill_TextId[random_text], m_creature, victim); //Random sound if (Kill_Sound[random_text]) @@ -172,10 +159,8 @@ void SimpleAI::DamageTaken(Unit *killer, uint32 &damage) uint32 random_text = rand()%3; //Random yell - if (Death_Text[random_text]) - if (Death_Say[random_text]) - DoSay(Death_Text[random_text], LANG_UNIVERSAL, killer); - else DoYell(Death_Text[random_text], LANG_UNIVERSAL, killer); + if (Death_TextId[random_text]) + DoScriptText(Death_TextId[random_text], m_creature, killer); //Random sound if (Death_Sound[random_text]) @@ -269,10 +254,8 @@ void SimpleAI::UpdateAI(const uint32 diff) uint32 random_text = rand()%3; //Random yell - if (Spell[i].Text[random_text]) - if (Spell[i].Say[random_text]) - DoSay(Spell[i].Text[random_text], LANG_UNIVERSAL, target); - else DoYell(Spell[i].Text[random_text], LANG_UNIVERSAL, target); + if (Spell[i].TextId[random_text]) + DoScriptText(Spell[i].TextId[random_text], m_creature, target); //Random sound if (Spell[i].Text_Sound[random_text]) diff --git a/src/bindings/scripts/scripts/creature/simple_ai.h b/src/bindings/scripts/scripts/creature/simple_ai.h index 8745d78ad41..44cadef1f33 100644 --- a/src/bindings/scripts/scripts/creature/simple_ai.h +++ b/src/bindings/scripts/scripts/creature/simple_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -35,18 +35,15 @@ struct TRINITY_DLL_DECL SimpleAI : public ScriptedAI public: - char* Aggro_Text[3]; - bool Aggro_Say[3]; + int32 Aggro_TextId[3]; uint32 Aggro_Sound[3]; - char* Death_Text[3]; - bool Death_Say[3]; + int32 Death_TextId[3]; uint32 Death_Sound[3]; uint32 Death_Spell; uint32 Death_Target_Type; - char* Kill_Text[3]; - bool Kill_Say[3]; + int32 Kill_TextId[3]; uint32 Kill_Sound[3]; uint32 Kill_Spell; uint32 Kill_Target_Type; @@ -62,8 +59,7 @@ public: bool Enabled; //Spell enabled or disabled (default: false) //3 texts to many? - char* Text[3]; - bool Say[3]; + int32 TextId[3]; uint32 Text_Sound[3]; }Spell[10]; diff --git a/src/bindings/scripts/scripts/examples/example_creature.cpp b/src/bindings/scripts/scripts/examples/example_creature.cpp new file mode 100644 index 00000000000..708740c3b9d --- /dev/null +++ b/src/bindings/scripts/scripts/examples/example_creature.cpp @@ -0,0 +1,261 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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 + +//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. +#define SAY_AGGRO -1999900 +#define SAY_RANDOM_0 -1999901 +#define SAY_RANDOM_1 -1999902 +#define SAY_RANDOM_2 -1999903 +#define SAY_RANDOM_3 -1999904 +#define SAY_RANDOM_4 -1999905 +#define SAY_BESERK -1999906 +#define SAY_PHASE -1999907 +#define SAY_DANCE -1999908 +#define SAY_SALUTE -1999909 + +//List of gossip item texts. Items will appear in the gossip window. +#define GOSSIP_ITEM "I'm looking for a fight" + +//List of spells. Not required to define them in this way, but will make it easier to maintain in case spellId change +#define SPELL_BUFF 25661 +#define SPELL_ONE 12555 +#define SPELL_ONE_ALT 24099 +#define SPELL_TWO 10017 +#define SPELL_THREE 26027 +#define SPELL_ENRAGE 23537 +#define SPELL_BESERK 32309 + +struct TRINITY_DLL_DECL example_creatureAI : public ScriptedAI +{ + //*** HANDLED FUNCTION *** + //This is the constructor, called only once when the creature is first created + example_creatureAI(Creature *c) : ScriptedAI(c) {Reset();} + + //*** CUSTOM VARIABLES **** + //These variables are for use only by this individual script. + //Nothing else will ever call them but us. + + uint32 Say_Timer; //Timer for random chat + uint32 Rebuff_Timer; //Timer for rebuffing + uint32 Spell_1_Timer; //Timer for spell 1 when in combat + uint32 Spell_2_Timer; //Timer for spell 1 when in combat + uint32 Spell_3_Timer; //Timer for spell 1 when in combat + uint32 Beserk_Timer; //Timer until we go into Beserk (enraged) mode + uint32 Phase; //The current battle phase we are in + uint32 Phase_Timer; //Timer until phase transition + + //*** HANDLED FUNCTION *** + //This is called whenever the core decides we need to evade + void Reset() + { + Phase = 1; //Start in phase 1 + Phase_Timer = 60000; //60 seconds + Spell_1_Timer = 5000; //5 seconds + Spell_2_Timer = 37000; //37 seconds + Spell_3_Timer = 19000; //19 seconds + Beserk_Timer = 120000; //2 minutes + } + + //*** HANDLED FUNCTION *** + //Attack Start is called whenever someone hits us. + void Aggro(Unit *who) + { + //Say some stuff + DoScriptText(SAY_AGGRO, m_creature, who); + } + + //*** 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 diff) + { + //Out of combat timers + if (!m_creature->getVictim()) + { + //Random Say timer + if (Say_Timer < diff) + { + //Random switch between 5 outcomes + switch (rand()%5) + { + 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; + } + + Say_Timer = 45000; //Say something agian in 45 seconds + }else Say_Timer -= diff; + + //Rebuff timer + if (Rebuff_Timer < diff) + { + DoCast(m_creature,SPELL_BUFF); + Rebuff_Timer = 900000; //Rebuff agian in 15 minutes + }else Rebuff_Timer -= diff; + } + + //Return since we have no target + if (!UpdateVictim()) + return; + + //Spell 1 timer + if (Spell_1_Timer < diff) + { + //Cast spell one on our current target. + if (rand()%50 > 10) + DoCast(m_creature->getVictim(),SPELL_ONE_ALT); + else if (m_creature->GetDistance(m_creature->getVictim()) < 25) + DoCast(m_creature->getVictim(),SPELL_ONE); + + Spell_1_Timer = 5000; + }else Spell_1_Timer -= diff; + + //Spell 2 timer + if (Spell_2_Timer < diff) + { + //Cast spell one on our current target. + DoCast(m_creature->getVictim(),SPELL_TWO); + + Spell_2_Timer = 37000; + }else Spell_2_Timer -= diff; + + //Spell 3 timer + if (Phase > 1) + if (Spell_3_Timer < diff) + { + //Cast spell one on our current target. + DoCast(m_creature->getVictim(),SPELL_THREE); + + Spell_3_Timer = 19000; + }else Spell_3_Timer -= diff; + + //Beserk timer + if (Phase > 1) + if (Beserk_Timer < diff) + { + //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 + Beserk_Timer = 12000; + }else Beserk_Timer -= diff; + + //Phase timer + if (Phase == 1) + if (Phase_Timer < diff) + { + //Go to next phase + Phase++; + DoScriptText(SAY_PHASE, m_creature); + DoCast(m_creature,SPELL_ENRAGE); + }else Phase_Timer -= diff; + + 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 *_Creature) +{ + return new example_creatureAI (_Creature); +} + +//This function is called when the player clicks an option on the gossip menu +void SendDefaultMenu_example_creature(Player *player, Creature *_Creature, uint32 action) +{ + if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time + { + //Set our faction to hostile twoards all + _Creature->setFaction(24); + _Creature->Attack(player, true); + player->PlayerTalkClass->CloseGossip(); + } +} + +//This function is called when the player clicks an option on the gossip menu +bool GossipSelect_example_creature(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + if (sender == GOSSIP_SENDER_MAIN) + SendDefaultMenu_example_creature(player, _Creature, action); + + return true; +} + +//This function is called when the player opens the gossip menu +bool GossipHello_example_creature(Player *player, Creature *_Creature) +{ + player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID()); + + return true; +} + +//Our Recive emote function +bool ReceiveEmote_example_creature(Player *player, Creature *_Creature, uint32 emote) +{ + _Creature->HandleEmoteCommand(emote); + + if (emote == TEXTEMOTE_DANCE) + DoScriptText(SAY_DANCE, _Creature); + + if (emote == TEXTEMOTE_SALUTE) + DoScriptText(SAY_SALUTE, _Creature); + + 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 +//For example if you want this Script to handle Emotes you must include +//newscript->ReciveEmote = My_Emote_Function; +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->pReceiveEmote = &ReceiveEmote_example_creature; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/examples/example_escort.cpp b/src/bindings/scripts/scripts/examples/example_escort.cpp new file mode 100644 index 00000000000..1cc5356a9ac --- /dev/null +++ b/src/bindings/scripts/scripts/examples/example_escort.cpp @@ -0,0 +1,220 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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 "../npc/npc_escortAI.h" + +#define SAY_AGGRO1 -1999910 +#define SAY_AGGRO2 -1999911 +#define SAY_WP_1 -1999912 +#define SAY_WP_2 -1999913 +#define SAY_WP_3 -1999914 +#define SAY_WP_4 -1999915 +#define SAY_DEATH_1 -1999916 +#define SAY_DEATH_2 -1999917 +#define SAY_DEATH_3 -1999918 +#define SAY_SPELL -1999919 +#define SAY_RAND_1 -1999920 +#define SAY_RAND_2 -1999921 + +#define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Defend, Run)" +#define GOSSIP_ITEM_2 "Click to Test Escort(NoAttack, NoDefend, Walk)" +#define GOSSIP_ITEM_3 "Click to Test Escort(NoAttack, Defend, Walk)" + +struct TRINITY_DLL_DECL example_escortAI : public npc_escortAI +{ + public: + + // CreatureAI functions + example_escortAI(Creature *c) : npc_escortAI(c) {Reset();} + + uint32 DeathCoilTimer; + uint32 ChatTimer; + + // Pure Virtual Functions + void WaypointReached(uint32 i) + { + switch (i) + { + case 1: + DoScriptText(SAY_WP_1, m_creature); + break; + + case 3: + { + DoScriptText(SAY_WP_2, m_creature); + Creature* temp = m_creature->SummonCreature(21878, m_creature->GetPositionX()+5, m_creature->GetPositionY()+7, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); + if(temp) + temp->AI()->AttackStart(m_creature); + } + break; + + case 4: + { + Unit* temp = Unit::GetUnit(*m_creature, PlayerGUID); + if (temp) + { + //temp is the target of the text + DoScriptText(SAY_WP_3, m_creature, temp); + //temp is the source of the text + DoScriptText(SAY_WP_4, temp); + } + } + break; + } + } + + void Aggro(Unit* who) + { + if (IsBeingEscorted) + { + if (Unit* temp = Unit::GetUnit(*m_creature, PlayerGUID)) + DoScriptText(SAY_AGGRO1, m_creature, temp); + } + else DoScriptText(SAY_AGGRO2, m_creature); + } + + void Reset() + { + DeathCoilTimer = 4000; + ChatTimer = 4000; + } + + void JustDied(Unit* killer) + { + if (IsBeingEscorted) + { + Unit *pTemp = Unit::GetUnit(*m_creature,PlayerGUID); + //killer = m_creature when player got to far from creature + if (killer == m_creature) + { + //This is actually a whisper. You control the text type in database + if (pTemp) + DoScriptText(SAY_DEATH_1, m_creature, pTemp); + } + else if (pTemp) DoScriptText(SAY_DEATH_2, m_creature, pTemp); + } + else DoScriptText(SAY_DEATH_3, m_creature); + } + + void UpdateAI(const uint32 diff) + { + //Must update npc_escortAI + npc_escortAI::UpdateAI(diff); + + //Combat check + if (InCombat && m_creature->getVictim()) + { + if (DeathCoilTimer < diff) + { + DoScriptText(SAY_SPELL, m_creature); + m_creature->CastSpell(m_creature->getVictim(), 33130, false); + + DeathCoilTimer = 4000; + }else DeathCoilTimer -= diff; + }else + { + //Out of combat but being escorted + if (IsBeingEscorted) + if (ChatTimer < diff) + { + if (m_creature->HasAura(3593)) + { + DoScriptText(SAY_RAND_1, m_creature); + m_creature->CastSpell(m_creature, 11540, false); + }else + { + DoScriptText(SAY_RAND_2, m_creature); + m_creature->CastSpell(m_creature, 3593, false); + } + + ChatTimer = 12000; + }else ChatTimer -= diff; + } + } +}; + +CreatureAI* GetAI_example_escort(Creature *_Creature) +{ + example_escortAI* testAI = new example_escortAI(_Creature); + + testAI->AddWaypoint(0, 1231, -4419, 23); + testAI->AddWaypoint(1, 1198, -4440, 23, 0); + testAI->AddWaypoint(2, 1208, -4392, 23); + testAI->AddWaypoint(3, 1231, -4419, 23, 5000); + testAI->AddWaypoint(4, 1208, -4392, 23, 5000); + + return (CreatureAI*)testAI; +} + +bool GossipHello_example_escort(Player *player, Creature *_Creature) +{ + player->TalkedToCreature(_Creature->GetEntry(),_Creature->GetGUID()); + _Creature->prepareGossipMenu(player,0); + + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + _Creature->sendPreparedGossip( player ); + return true; +} + +bool GossipSelect_example_escort(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + if (action == GOSSIP_ACTION_INFO_DEF+1) + { + player->CLOSE_GOSSIP_MENU(); + ((npc_escortAI*)(_Creature->AI()))->Start(true, true, true, player->GetGUID()); + + return true; // prevent mangos core handling + } + + if (action == GOSSIP_ACTION_INFO_DEF+2) + { + player->CLOSE_GOSSIP_MENU(); + ((npc_escortAI*)(_Creature->AI()))->Start(false, false, false, player->GetGUID()); + + return true; // prevent mangos core handling + } + + if (action == GOSSIP_ACTION_INFO_DEF+3) + { + player->CLOSE_GOSSIP_MENU(); + ((npc_escortAI*)(_Creature->AI()))->Start(false, true, false, player->GetGUID()); + + return true; // prevent mangos core handling + } + return false; +} + +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/src/bindings/scripts/scripts/examples/example_gossip_codebox.cpp b/src/bindings/scripts/scripts/examples/example_gossip_codebox.cpp new file mode 100644 index 00000000000..5d05197fd7a --- /dev/null +++ b/src/bindings/scripts/scripts/examples/example_gossip_codebox.cpp @@ -0,0 +1,88 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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 <cstring> + +#define SAY_NOT_INTERESTED -1999922 +#define SAY_WRONG -1999923 +#define 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 *player, Creature *_Creature) +{ + player->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + player->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID()); + return true; +} + +//This function is called when the player clicks an option on the gossip menubool +bool GossipSelect_example_gossip_codebox(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + if(action == GOSSIP_ACTION_INFO_DEF+2) + { + DoScriptText(SAY_NOT_INTERESTED, _Creature); + player->CLOSE_GOSSIP_MENU(); + } + return true; +} + +bool GossipSelectWithCode_example_gossip_codebox( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode ) +{ + if(sender == GOSSIP_SENDER_MAIN) + { + if(action == GOSSIP_ACTION_INFO_DEF+1) + { + if(std::strcmp(sCode, player->GetName())!=0) + { + DoScriptText(SAY_WRONG, _Creature); + _Creature->CastSpell(player, 12826, true); + } + else + { + DoScriptText(SAY_CORRECT, _Creature); + _Creature->CastSpell(player, 26990, true); + } + player->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/src/bindings/scripts/scripts/examples/example_misc.cpp b/src/bindings/scripts/scripts/examples/example_misc.cpp new file mode 100644 index 00000000000..63136c6bc5d --- /dev/null +++ b/src/bindings/scripts/scripts/examples/example_misc.cpp @@ -0,0 +1,65 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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" + +#define SAY_HI -1999925 + +bool AT_example_areatrigger(Player *player, AreaTriggerEntry *at) +{ + DoScriptText(SAY_HI, player); + return true; +} + +extern void LoadDatabase(); +bool ItemUse_example_item(Player *player, Item* _Item, SpellCastTargets const& targets) +{ + LoadDatabase(); + return true; +} + +bool GOHello_example_go_teleporter(Player *player, GameObject* _GO) +{ + player->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/src/bindings/scripts/scripts/go/go_scripts.cpp b/src/bindings/scripts/scripts/go/go_scripts.cpp index 9aacd2487e9..5613ccdd9b7 100644 --- a/src/bindings/scripts/scripts/go/go_scripts.cpp +++ b/src/bindings/scripts/scripts/go/go_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,6 +22,7 @@ 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 @@ -30,12 +31,26 @@ go_field_repair_bot_74A go_orb_of_command go_tablet_of_madness go_tablet_of_the_seven -go_teleporter EndContentData */ #include "precompiled.h" /*###### +## go_cat_figurine +######*/ + +enum +{ + SPELL_SUMMON_GHOST_SABER = 5968, +}; + +bool GOHello_go_cat_figurine(Player *player, GameObject* _GO) +{ + player->CastSpell(player,SPELL_SUMMON_GHOST_SABER,true); + return false; +} + +/*###### ## go_crystal_pylons (3x) ######*/ @@ -108,6 +123,26 @@ bool GOHello_go_field_repair_bot_74A(Player *player, GameObject* _GO) } /*###### +## 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_orb_of_command ######*/ @@ -148,16 +183,6 @@ bool GOHello_go_tablet_of_the_seven(Player *player, GameObject* _GO) return true; } -/*###### -## go_teleporter -######*/ - -bool GOHello_go_teleporter(Player *player, GameObject* _GO) -{ - player->TeleportTo(0, 1807.07f,336.105f,70.3975f,0.0f); - return false; -} - /*##### ## go_jump_a_tron ######*/ @@ -173,7 +198,7 @@ bool GOHello_go_jump_a_tron(Player *player, GameObject* _GO) /*###### ## go_ethereum_prison ######*/ - + float ethereum_NPC[2][7] = { {20785,20790,20789,20784,20786,20783,20788}, // hostile npc @@ -184,7 +209,7 @@ bool GOHello_go_ethereum_prison(Player *player, GameObject* _GO) { _GO->SetGoState(0); switch(rand()%2){ - case 0: + case 0: _GO->SummonCreature(ethereum_NPC[0][rand()%6],_GO->GetPositionX(),_GO->GetPositionY(),_GO->GetPositionZ()+0.3, 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); break; case 1: @@ -213,6 +238,11 @@ 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(); @@ -238,6 +268,11 @@ void AddSC_go_scripts() newscript->RegisterSelf(); newscript = new Script; + newscript->Name = "go_gilded_brazier"; + newscript->pGOHello = &GOHello_go_gilded_brazier; + newscript->RegisterSelf(); + + newscript = new Script; newscript->Name="go_orb_of_command"; newscript->pGOHello = &GOHello_go_orb_of_command; newscript->RegisterSelf(); @@ -253,11 +288,6 @@ void AddSC_go_scripts() newscript->RegisterSelf(); newscript = new Script; - newscript->Name="go_teleporter"; - newscript->pGOHello = &GOHello_go_teleporter; - newscript->RegisterSelf(); - - newscript = new Script; newscript->Name="go_jump_a_tron"; newscript->pGOHello = &GOHello_go_jump_a_tron; newscript->RegisterSelf(); diff --git a/src/bindings/scripts/scripts/guard/guard_ai.cpp b/src/bindings/scripts/scripts/guard/guard_ai.cpp index f28820eb7ee..b635ae74b2d 100644 --- a/src/bindings/scripts/scripts/guard/guard_ai.cpp +++ b/src/bindings/scripts/scripts/guard/guard_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -28,6 +28,10 @@ EndScriptData */ #define GENERIC_CREATURE_COOLDOWN 5000 +#define SAY_GUARD_SIL_AGGRO1 -1070001 +#define SAY_GUARD_SIL_AGGRO2 -1070002 +#define SAY_GUARD_SIL_AGGRO3 -1070003 + void guardAI::Reset() { GlobalCooldown = 0; @@ -40,15 +44,9 @@ void guardAI::Aggro(Unit *who) { switch(rand()%3) { - case 0: - DoSay("Taste blade, mongrel!", LANG_UNIVERSAL,NULL); - break; - case 1: - DoSay("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...", LANG_UNIVERSAL,NULL); - break; - case 2: - DoSay("As if we don't have enough problems, you go and create more!", LANG_UNIVERSAL,NULL); - break; + 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; } } diff --git a/src/bindings/scripts/scripts/guard/guard_ai.h b/src/bindings/scripts/scripts/guard/guard_ai.h index 7952040b5e2..d7cd6cd6318 100644 --- a/src/bindings/scripts/scripts/guard/guard_ai.h +++ b/src/bindings/scripts/scripts/guard/guard_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/guard/guards.cpp b/src/bindings/scripts/scripts/guard/guards.cpp index ff6ec258b22..e157310f291 100644 --- a/src/bindings/scripts/scripts/guard/guards.cpp +++ b/src/bindings/scripts/scripts/guard/guards.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -115,23 +115,23 @@ void SendDefaultMenu_guard_azuremyst(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Bank - player->SEND_POI(-3918.95, -11544.7, 6, 6, 0, "Bank"); + player->SEND_POI(-3918.95, -11544.7, 7, 6, 0, "Bank"); player->SEND_GOSSIP_MENU(10067,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hippogryph Master - player->SEND_POI(-4057.15, -11788.6, 6, 6, 0, "Stephanos"); + player->SEND_POI(-4057.15, -11788.6, 7, 6, 0, "Stephanos"); player->SEND_GOSSIP_MENU(10071,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Guild master - player->SEND_POI(-4092.43, -11626.6, 6, 6, 0, "Funaam"); + player->SEND_POI(-4092.43, -11626.6, 7, 6, 0, "Funaam"); player->SEND_GOSSIP_MENU(10073,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(-4129.43, -12469, 6, 6, 0, "Caregiver Chellan"); + player->SEND_POI(-4129.43, -12469, 7, 6, 0, "Caregiver Chellan"); player->SEND_GOSSIP_MENU(10074,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master - player->SEND_POI(-4146.42, -12492.7, 6, 6, 0, "Esbina"); + player->SEND_POI(-4146.42, -12492.7, 7, 6, 0, "Esbina"); player->SEND_GOSSIP_MENU(10075,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer @@ -168,31 +168,31 @@ void SendClassTrainerMenu_guard_azuremyst(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Druid - player->SEND_POI(-4274.81, -11495.3, 6, 6, 0, "Shalannius"); + player->SEND_POI(-4274.81, -11495.3, 7, 6, 0, "Shalannius"); player->SEND_GOSSIP_MENU(10077,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(-4203.65, -12526.5, 6, 6, 0, "Acteon"); + player->SEND_POI(-4203.65, -12526.5, 7, 6, 0, "Acteon"); player->SEND_GOSSIP_MENU(10078,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Mage - player->SEND_POI(-4149.62, -12530.1, 6, 6, 0, "Semid"); + player->SEND_POI(-4149.62, -12530.1, 7, 6, 0, "Semid"); player->SEND_GOSSIP_MENU(10081,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Paladin - player->SEND_POI(-4138.98, -12468.5, 6, 6, 0, "Tullas"); + player->SEND_POI(-4138.98, -12468.5, 7, 6, 0, "Tullas"); player->SEND_GOSSIP_MENU(10083,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Priest - player->SEND_POI(-4131.66, -12478.6, 6, 6, 0, "Guvan"); + player->SEND_POI(-4131.66, -12478.6, 7, 6, 0, "Guvan"); player->SEND_GOSSIP_MENU(10084,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Shaman - player->SEND_POI(-4162.33, -12456.1, 6, 6, 0, "Tuluun"); + player->SEND_POI(-4162.33, -12456.1, 7, 6, 0, "Tuluun"); player->SEND_GOSSIP_MENU(10085,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warrior - player->SEND_POI(-4165.05, -12536.4, 6, 6, 0, "Ruada"); + player->SEND_POI(-4165.05, -12536.4, 7, 6, 0, "Ruada"); player->SEND_GOSSIP_MENU(10086,_Creature->GetGUID()); break; } @@ -203,54 +203,54 @@ void SendProfTrainerMenu_guard_azuremyst(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-4191.15, -12470, 6, 6, 0, "Daedal"); + player->SEND_POI(-4191.15, -12470, 7, 6, 0, "Daedal"); player->SEND_GOSSIP_MENU(10088,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-4726.29, -12387, 6, 6, 0, "Blacksmith Calypso"); + player->SEND_POI(-4726.29, -12387, 7, 6, 0, "Blacksmith Calypso"); player->SEND_GOSSIP_MENU(10089,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-4710.87, -12400.6, 6, 6, 0, "'Cookie' McWeaksauce"); + player->SEND_POI(-4710.87, -12400.6, 7, 6, 0, "'Cookie' McWeaksauce"); player->SEND_GOSSIP_MENU(10090,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-3882.85, -11496.7, 6, 6, 0, "Nahogg"); + player->SEND_POI(-3882.85, -11496.7, 7, 6, 0, "Nahogg"); player->SEND_GOSSIP_MENU(10091,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(-4157.57, -12470.2, 6, 6, 0, "Artificer Daelo"); + player->SEND_POI(-4157.57, -12470.2, 7, 6, 0, "Artificer Daelo"); player->SEND_GOSSIP_MENU(10092,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(-4199.11, -12469.9, 6, 6, 0, "Anchorite Fateema"); + player->SEND_POI(-4199.11, -12469.9, 7, 6, 0, "Anchorite Fateema"); player->SEND_GOSSIP_MENU(10093,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(-4266.38, -12985.1, 6, 6, 0, "Diktynna"); + player->SEND_POI(-4266.38, -12985.1, 7, 6, 0, "Diktynna"); player->SEND_GOSSIP_MENU(10094,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism player->SEND_GOSSIP_MENU(10095,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Jewelcrafting - player->SEND_POI(-3781.55, -11541.8, 6, 6, 0, "Farii"); + player->SEND_POI(-3781.55, -11541.8, 7, 6, 0, "Farii"); player->SEND_GOSSIP_MENU(10096,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking - player->SEND_POI(-3442.68, -12322.2, 6, 6, 0, "Moordo"); + player->SEND_POI(-3442.68, -12322.2, 7, 6, 0, "Moordo"); player->SEND_GOSSIP_MENU(10098,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Mining - player->SEND_POI(-4179.89, -12493.1, 6, 6, 0, "Dulvi"); + player->SEND_POI(-4179.89, -12493.1, 7, 6, 0, "Dulvi"); player->SEND_GOSSIP_MENU(10097,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Skinning - player->SEND_POI(-3431.17, -12316.5, 6, 6, 0, "Gurf"); + player->SEND_POI(-3431.17, -12316.5, 7, 6, 0, "Gurf"); player->SEND_GOSSIP_MENU(10098,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring - player->SEND_POI(-4711.54, -12386.7, 6, 6, 0, "Erin Kelly"); + player->SEND_POI(-4711.54, -12386.7, 7, 6, 0, "Erin Kelly"); player->SEND_GOSSIP_MENU(10099,_Creature->GetGUID()); break; } @@ -302,35 +302,35 @@ void SendDefaultMenu_guard_bluffwatcher(Player *player, Creature *_Creature, uin switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Bank - player->SEND_POI(-1257.8, 24.14, 6, 6, 0, "Thunder Bluff Bank"); + player->SEND_POI(-1257.8, 24.14, 7, 6, 0, "Thunder Bluff Bank"); player->SEND_GOSSIP_MENU(1292,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Wind master - player->SEND_POI(-1196.43, 28.26, 6, 6, 0, "Wind Rider Roost"); + player->SEND_POI(-1196.43, 28.26, 7, 6, 0, "Wind Rider Roost"); player->SEND_GOSSIP_MENU(1293,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Guild master - player->SEND_POI(-1296.5, 127.57, 6, 6, 0, "Thunder Bluff Civic Information"); + player->SEND_POI(-1296.5, 127.57, 7, 6, 0, "Thunder Bluff Civic Information"); player->SEND_GOSSIP_MENU(1291,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(-1296, 39.7, 6, 6, 0, "Thunder Bluff Inn"); + player->SEND_POI(-1296, 39.7, 7, 6, 0, "Thunder Bluff Inn"); player->SEND_GOSSIP_MENU(3153,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox - player->SEND_POI(-1263.59, 44.36, 6, 6, 0, "Thunder Bluff Mailbox"); + player->SEND_POI(-1263.59, 44.36, 7, 6, 0, "Thunder Bluff Mailbox"); player->SEND_GOSSIP_MENU(3154,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Auction House - player->SEND_POI(1381.77, -4371.16, 6, 6, 0, GOSSIP_TEXT_AUCTIONHOUSE); + player->SEND_POI(1381.77, -4371.16, 7, 6, 0, GOSSIP_TEXT_AUCTIONHOUSE); player->SEND_GOSSIP_MENU(3155,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Weapon master - player->SEND_POI(-1282.31, 89.56, 6, 6, 0, "Ansekhwa"); + player->SEND_POI(-1282.31, 89.56, 7, 6, 0, "Ansekhwa"); player->SEND_GOSSIP_MENU(4520,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Stable master - player->SEND_POI(-1270.19, 48.84, 6, 6, 0, "Bulrug"); + player->SEND_POI(-1270.19, 48.84, 7, 6, 0, "Bulrug"); player->SEND_GOSSIP_MENU(5977,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //battlemaster @@ -370,15 +370,15 @@ void SendBattleMasterMenu_guard_bluffwatcher(Player *player, Creature *_Creature switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(-1387.82, -97.55, 6, 6, 0, "Taim Ragetotem"); + player->SEND_POI(-1387.82, -97.55, 7, 6, 0, "Taim Ragetotem"); player->SEND_GOSSIP_MENU(7522,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(-997, 214.12, 6, 6, 0, "Martin Lindsey"); + player->SEND_POI(-997, 214.12, 7, 6, 0, "Martin Lindsey"); player->SEND_GOSSIP_MENU(7648,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //WSG - player->SEND_POI(-1384.94, -75.91, 6, 6, 0, "Kergul Bloodaxe"); + player->SEND_POI(-1384.94, -75.91, 7, 6, 0, "Kergul Bloodaxe"); player->SEND_GOSSIP_MENU(7523,_Creature->GetGUID()); break; } @@ -389,27 +389,27 @@ void SendClassTrainerMenu_guard_bluffwatcher(Player *player, Creature *_Creature switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Druid - player->SEND_POI(-1054.47, -285, 6, 6, 0, "Hall of Elders"); + player->SEND_POI(-1054.47, -285, 7, 6, 0, "Hall of Elders"); player->SEND_GOSSIP_MENU(1294,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(-1416.32, -114.28, 6, 6, 0, "Hunter's Hall"); + player->SEND_POI(-1416.32, -114.28, 7, 6, 0, "Hunter's Hall"); player->SEND_GOSSIP_MENU(1295,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Mage - player->SEND_POI(-1061.2, 195.5, 6, 6, 0, "Pools of Vision"); + player->SEND_POI(-1061.2, 195.5, 7, 6, 0, "Pools of Vision"); player->SEND_GOSSIP_MENU(1296,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Priest - player->SEND_POI(-1061.2, 195.5, 6, 6, 0, "Pools of Vision"); + player->SEND_POI(-1061.2, 195.5, 7, 6, 0, "Pools of Vision"); player->SEND_GOSSIP_MENU(1297,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Shaman - player->SEND_POI(-989.54, 278.25, 6, 6, 0, "Hall of Spirits"); + player->SEND_POI(-989.54, 278.25, 7, 6, 0, "Hall of Spirits"); player->SEND_GOSSIP_MENU(1298,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Warrior - player->SEND_POI(-1416.32, -114.28, 6, 6, 0, "Hunter's Hall"); + player->SEND_POI(-1416.32, -114.28, 7, 6, 0, "Hunter's Hall"); player->SEND_GOSSIP_MENU(1299,_Creature->GetGUID()); break; } @@ -420,47 +420,47 @@ void SendProfTrainerMenu_guard_bluffwatcher(Player *player, Creature *_Creature, switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-1085.56, 27.29, 6, 6, 0, "Bena's Alchemy"); + player->SEND_POI(-1085.56, 27.29, 7, 6, 0, "Bena's Alchemy"); player->SEND_GOSSIP_MENU(1332,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-1239.75, 104.88, 6, 6, 0, "Karn's Smithy"); + player->SEND_POI(-1239.75, 104.88, 7, 6, 0, "Karn's Smithy"); player->SEND_GOSSIP_MENU(1333,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-1214.5, -21.23, 6, 6, 0, "Aska's Kitchen"); + player->SEND_POI(-1214.5, -21.23, 7, 6, 0, "Aska's Kitchen"); player->SEND_GOSSIP_MENU(1334,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-1112.65, 48.26, 6, 6, 0, "Dawnstrider Enchanters"); + player->SEND_POI(-1112.65, 48.26, 7, 6, 0, "Dawnstrider Enchanters"); player->SEND_GOSSIP_MENU(1335,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //First Aid - player->SEND_POI(-996.58, 200.5, 6, 6, 0, "Spiritual Healing"); + player->SEND_POI(-996.58, 200.5, 7, 6, 0, "Spiritual Healing"); player->SEND_GOSSIP_MENU(1336,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Fishing - player->SEND_POI(-1169.35, -68.87, 6, 6, 0, "Mountaintop Bait & Tackle"); + player->SEND_POI(-1169.35, -68.87, 7, 6, 0, "Mountaintop Bait & Tackle"); player->SEND_GOSSIP_MENU(1337,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism - player->SEND_POI(-1137.7, -1.51, 6, 6, 0, "Holistic Herbalism"); + player->SEND_POI(-1137.7, -1.51, 7, 6, 0, "Holistic Herbalism"); player->SEND_GOSSIP_MENU(1338,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Leatherworking - player->SEND_POI(-1156.22, 66.86, 6, 6, 0, "Thunder Bluff Armorers"); + player->SEND_POI(-1156.22, 66.86, 7, 6, 0, "Thunder Bluff Armorers"); player->SEND_GOSSIP_MENU(1339,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Mining - player->SEND_POI(-1249.17, 155, 6, 6, 0, "Stonehoof Geology"); + player->SEND_POI(-1249.17, 155, 7, 6, 0, "Stonehoof Geology"); player->SEND_GOSSIP_MENU(1340,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Skinning - player->SEND_POI(-1148.56, 51.18, 6, 6, 0, "Mooranta"); + player->SEND_POI(-1148.56, 51.18, 7, 6, 0, "Mooranta"); player->SEND_GOSSIP_MENU(1343,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Tailoring - player->SEND_POI(-1156.22, 66.86, 6, 6, 0, "Thunder Bluff Armorers"); + player->SEND_POI(-1156.22, 66.86, 7, 6, 0, "Thunder Bluff Armorers"); player->SEND_GOSSIP_MENU(1341,_Creature->GetGUID()); break; } @@ -525,35 +525,35 @@ void SendDefaultMenu_guard_darnassus(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Auction house - player->SEND_POI(9861.23, 2334.55, 6, 6, 0, "Darnassus Auction House"); + player->SEND_POI(9861.23, 2334.55, 7, 6, 0, "Darnassus Auction House"); player->SEND_GOSSIP_MENU(3833, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank - player->SEND_POI(9938.45, 2512.35, 6, 6, 0, "Darnassus Bank"); + player->SEND_POI(9938.45, 2512.35, 7, 6, 0, "Darnassus Bank"); player->SEND_GOSSIP_MENU(3017, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Wind master - player->SEND_POI(9945.65, 2618.94, 6, 6, 0, "Rut'theran Village"); + player->SEND_POI(9945.65, 2618.94, 7, 6, 0, "Rut'theran Village"); player->SEND_GOSSIP_MENU(3018, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Guild master - player->SEND_POI(10076.40, 2199.59, 6, 6, 0, "Darnassus Guild Master"); + player->SEND_POI(10076.40, 2199.59, 7, 6, 0, "Darnassus Guild Master"); player->SEND_GOSSIP_MENU(3019, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Inn - player->SEND_POI(10133.29, 2222.52, 6, 6, 0, "Darnassus Inn"); + player->SEND_POI(10133.29, 2222.52, 7, 6, 0, "Darnassus Inn"); player->SEND_GOSSIP_MENU(3020, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Mailbox - player->SEND_POI(9942.17, 2495.48, 6, 6, 0, "Darnassus Mailbox"); + player->SEND_POI(9942.17, 2495.48, 7, 6, 0, "Darnassus Mailbox"); player->SEND_GOSSIP_MENU(3021, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Stable master - player->SEND_POI(10167.20, 2522.66, 6, 6, 0, "Alassin"); + player->SEND_POI(10167.20, 2522.66, 7, 6, 0, "Alassin"); player->SEND_GOSSIP_MENU(5980, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Weapon trainer - player->SEND_POI(9907.11, 2329.70, 6, 6, 0, "Ilyenia Moonfire"); + player->SEND_POI(9907.11, 2329.70, 7, 6, 0, "Ilyenia Moonfire"); player->SEND_GOSSIP_MENU(4517, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster @@ -590,15 +590,15 @@ void SendBattleMasterMenu_guard_darnassus(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(9923.61, 2327.43, 6, 6, 0, "Brogun Stoneshield"); + player->SEND_POI(9923.61, 2327.43, 7, 6, 0, "Brogun Stoneshield"); player->SEND_GOSSIP_MENU(7518, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(9977.37, 2324.39, 6, 6, 0, "Keras Wolfheart"); + player->SEND_POI(9977.37, 2324.39, 7, 6, 0, "Keras Wolfheart"); player->SEND_GOSSIP_MENU(7651, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //WSG - player->SEND_POI(9979.84, 2315.79, 6, 6, 0, "Aethalas"); + player->SEND_POI(9979.84, 2315.79, 7, 6, 0, "Aethalas"); player->SEND_GOSSIP_MENU(7482, _Creature->GetGUID()); break; } @@ -609,23 +609,23 @@ void SendClassTrainerMenu_guard_darnassus(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Druid - player->SEND_POI(10186, 2570.46, 6, 6, 0, "Darnassus Druid Trainer"); + player->SEND_POI(10186, 2570.46, 7, 6, 0, "Darnassus Druid Trainer"); player->SEND_GOSSIP_MENU(3024, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(10177.29, 2511.10, 6, 6, 0, "Darnassus Hunter Trainer"); + player->SEND_POI(10177.29, 2511.10, 7, 6, 0, "Darnassus Hunter Trainer"); player->SEND_GOSSIP_MENU(3023, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Priest - player->SEND_POI(9659.12, 2524.88, 6, 6, 0, "Temple of the Moon"); + player->SEND_POI(9659.12, 2524.88, 7, 6, 0, "Temple of the Moon"); player->SEND_GOSSIP_MENU(3025, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Rogue - player->SEND_POI(10122, 2599.12, 6, 6, 0, "Darnassus Rogue Trainer"); + player->SEND_POI(10122, 2599.12, 7, 6, 0, "Darnassus Rogue Trainer"); player->SEND_GOSSIP_MENU(3026, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Warrior - player->SEND_POI(9951.91, 2280.38, 6, 6, 0, "Warrior's Terrace"); + player->SEND_POI(9951.91, 2280.38, 7, 6, 0, "Warrior's Terrace"); player->SEND_GOSSIP_MENU(3033, _Creature->GetGUID()); break; } @@ -636,39 +636,39 @@ void SendProfTrainerMenu_guard_darnassus(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(10075.90, 2356.76, 6, 6, 0, "Darnassus Alchemy Trainer"); + player->SEND_POI(10075.90, 2356.76, 7, 6, 0, "Darnassus Alchemy Trainer"); player->SEND_GOSSIP_MENU(3035, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Cooking - player->SEND_POI(10088.59, 2419.21, 6, 6, 0, "Darnassus Cooking Trainer"); + player->SEND_POI(10088.59, 2419.21, 7, 6, 0, "Darnassus Cooking Trainer"); player->SEND_GOSSIP_MENU(3036, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Enchanting - player->SEND_POI(10146.09, 2313.42, 6, 6, 0, "Darnassus Enchanting Trainer"); + player->SEND_POI(10146.09, 2313.42, 7, 6, 0, "Darnassus Enchanting Trainer"); player->SEND_GOSSIP_MENU(3337, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //First Aid - player->SEND_POI(10150.09, 2390.43, 6, 6, 0, "Darnassus First Aid Trainer"); + player->SEND_POI(10150.09, 2390.43, 7, 6, 0, "Darnassus First Aid Trainer"); player->SEND_GOSSIP_MENU(3037, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Fishing - player->SEND_POI(9836.20, 2432.17, 6, 6, 0, "Darnassus Fishing Trainer"); + player->SEND_POI(9836.20, 2432.17, 7, 6, 0, "Darnassus Fishing Trainer"); player->SEND_GOSSIP_MENU(3038, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Herbalism - player->SEND_POI(9757.17, 2430.16, 6, 6, 0, "Darnassus Herbalism Trainer"); + player->SEND_POI(9757.17, 2430.16, 7, 6, 0, "Darnassus Herbalism Trainer"); player->SEND_GOSSIP_MENU(3039, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking - player->SEND_POI(10086.59, 2255.77, 6, 6, 0, "Darnassus Leatherworking Trainer"); + player->SEND_POI(10086.59, 2255.77, 7, 6, 0, "Darnassus Leatherworking Trainer"); player->SEND_GOSSIP_MENU(3040, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Skinning - player->SEND_POI(10081.40, 2257.18, 6, 6, 0, "Darnassus Skinning Trainer"); + player->SEND_POI(10081.40, 2257.18, 7, 6, 0, "Darnassus Skinning Trainer"); player->SEND_GOSSIP_MENU(3042, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Tailoring - player->SEND_POI(10079.70, 2268.19, 6, 6, 0, "Darnassus Tailor"); + player->SEND_POI(10079.70, 2268.19, 7, 6, 0, "Darnassus Tailor"); player->SEND_GOSSIP_MENU(3044, _Creature->GetGUID()); break; } @@ -727,11 +727,11 @@ void SendDefaultMenu_guard_dunmorogh(Player *player, Creature *_Creature, uint32 player->SEND_GOSSIP_MENU(4290,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(-5582.66, -525.89, 6, 6, 0, "Thunderbrew Distillery"); + player->SEND_POI(-5582.66, -525.89, 7, 6, 0, "Thunderbrew Distillery"); player->SEND_GOSSIP_MENU(4291,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master - player->SEND_POI(-5604, -509.58, 6, 6, 0, "Shelby Stoneflint"); + player->SEND_POI(-5604, -509.58, 7, 6, 0, "Shelby Stoneflint"); player->SEND_GOSSIP_MENU(5985,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer @@ -767,31 +767,31 @@ void SendClassTrainerMenu_guard_dunmorogh(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Hunter - player->SEND_POI(-5618.29, -454.25, 6, 6, 0, "Grif Wildheart"); + player->SEND_POI(-5618.29, -454.25, 7, 6, 0, "Grif Wildheart"); player->SEND_GOSSIP_MENU(4293,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Mage - player->SEND_POI(-5585.6, -539.99, 6, 6, 0, "Magis Sparkmantle"); + player->SEND_POI(-5585.6, -539.99, 7, 6, 0, "Magis Sparkmantle"); player->SEND_GOSSIP_MENU(4294,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Paladin - player->SEND_POI(-5585.6, -539.99, 6, 6, 0, "Azar Stronghammer"); + player->SEND_POI(-5585.6, -539.99, 7, 6, 0, "Azar Stronghammer"); player->SEND_GOSSIP_MENU(4295,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Priest - player->SEND_POI(-5591.74, -525.61, 6, 6, 0, "Maxan Anvol"); + player->SEND_POI(-5591.74, -525.61, 7, 6, 0, "Maxan Anvol"); player->SEND_GOSSIP_MENU(4296,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Rogue - player->SEND_POI(-5602.75, -542.4, 6, 6, 0, "Hogral Bakkan"); + player->SEND_POI(-5602.75, -542.4, 7, 6, 0, "Hogral Bakkan"); player->SEND_GOSSIP_MENU(4297,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Warlock - player->SEND_POI(-5641.97, -523.76, 6, 6, 0, "Gimrizz Shadowcog"); + player->SEND_POI(-5641.97, -523.76, 7, 6, 0, "Gimrizz Shadowcog"); player->SEND_GOSSIP_MENU(4298,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warrior - player->SEND_POI(-5604.79, -529.38, 6, 6, 0, "Granis Swiftaxe"); + player->SEND_POI(-5604.79, -529.38, 7, 6, 0, "Granis Swiftaxe"); player->SEND_GOSSIP_MENU(4299,_Creature->GetGUID()); break; } @@ -805,26 +805,26 @@ void SendProfTrainerMenu_guard_dunmorogh(Player *player, Creature *_Creature, ui player->SEND_GOSSIP_MENU(4301,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-5584.72, -428.41, 6, 6, 0, "Tognus Flintfire"); + player->SEND_POI(-5584.72, -428.41, 7, 6, 0, "Tognus Flintfire"); player->SEND_GOSSIP_MENU(4302,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-5596.85, -541.43, 6, 6, 0, "Gremlock Pilsnor"); + player->SEND_POI(-5596.85, -541.43, 7, 6, 0, "Gremlock Pilsnor"); player->SEND_GOSSIP_MENU(4303,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting player->SEND_GOSSIP_MENU(4304,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(-5531, -666.53, 6, 6, 0, "Bronk Guzzlegear"); + player->SEND_POI(-5531, -666.53, 7, 6, 0, "Bronk Guzzlegear"); player->SEND_GOSSIP_MENU(4305,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(-5603.67, -523.57, 6, 6, 0, "Thamner Pol"); + player->SEND_POI(-5603.67, -523.57, 7, 6, 0, "Thamner Pol"); player->SEND_GOSSIP_MENU(4306,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(-5199.9, 58.58, 6, 6, 0, "Paxton Ganter"); + player->SEND_POI(-5199.9, 58.58, 7, 6, 0, "Paxton Ganter"); player->SEND_GOSSIP_MENU(4307,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism @@ -834,7 +834,7 @@ void SendProfTrainerMenu_guard_dunmorogh(Player *player, Creature *_Creature, ui player->SEND_GOSSIP_MENU(4310,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining - player->SEND_POI(-5531, -666.53, 6, 6, 0, "Yarr Hamerstone"); + player->SEND_POI(-5531, -666.53, 7, 6, 0, "Yarr Hamerstone"); player->SEND_GOSSIP_MENU(4311,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning @@ -893,11 +893,11 @@ void SendDefaultMenu_guard_durotar(Player *player, Creature *_Creature, uint32 a player->SEND_GOSSIP_MENU(4033,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Inn - player->SEND_POI(338.7, -4688.87, 6, 6, 0, "Razor Hill Inn"); + player->SEND_POI(338.7, -4688.87, 7, 6, 0, "Razor Hill Inn"); player->SEND_GOSSIP_MENU(4034,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Stable master - player->SEND_POI(330.31, -4710.66, 6, 6, 0, "Shoja'my"); + player->SEND_POI(330.31, -4710.66, 7, 6, 0, "Shoja'my"); player->SEND_GOSSIP_MENU(5973,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer @@ -933,31 +933,31 @@ void SendClassTrainerMenu_guard_durotar(Player *player, Creature *_Creature, uin switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Hunter - player->SEND_POI(276, -4706.72, 6, 6, 0, "Thotar"); + player->SEND_POI(276, -4706.72, 7, 6, 0, "Thotar"); player->SEND_GOSSIP_MENU(4013,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Mage - player->SEND_POI(-839.33, -4935.6, 6, 6, 0, "Un'Thuwa"); + player->SEND_POI(-839.33, -4935.6, 7, 6, 0, "Un'Thuwa"); player->SEND_GOSSIP_MENU(4014,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Priest - player->SEND_POI(296.22, -4828.1, 6, 6, 0, "Tai'jin"); + player->SEND_POI(296.22, -4828.1, 7, 6, 0, "Tai'jin"); player->SEND_GOSSIP_MENU(4015,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Rogue - player->SEND_POI(265.76, -4709, 6, 6, 0, "Kaplak"); + player->SEND_POI(265.76, -4709, 7, 6, 0, "Kaplak"); player->SEND_GOSSIP_MENU(4016,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Shaman - player->SEND_POI(307.79, -4836.97, 6, 6, 0, "Swart"); + player->SEND_POI(307.79, -4836.97, 7, 6, 0, "Swart"); player->SEND_GOSSIP_MENU(4017,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Warlock - player->SEND_POI(355.88, -4836.45, 6, 6, 0, "Dhugru Gorelust"); + player->SEND_POI(355.88, -4836.45, 7, 6, 0, "Dhugru Gorelust"); player->SEND_GOSSIP_MENU(4018,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warrior - player->SEND_POI(312.3, -4824.66, 6, 6, 0, "Tarshaw Jaggedscar"); + player->SEND_POI(312.3, -4824.66, 7, 6, 0, "Tarshaw Jaggedscar"); player->SEND_GOSSIP_MENU(4019,_Creature->GetGUID()); break; } @@ -968,11 +968,11 @@ void SendProfTrainerMenu_guard_durotar(Player *player, Creature *_Creature, uint switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-800.25, -4894.33, 6, 6, 0, "Miao'zan"); + player->SEND_POI(-800.25, -4894.33, 7, 6, 0, "Miao'zan"); player->SEND_GOSSIP_MENU(4020,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(373.24, -4716.45, 6, 6, 0, "Dwukk"); + player->SEND_POI(373.24, -4716.45, 7, 6, 0, "Dwukk"); player->SEND_GOSSIP_MENU(4021,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking @@ -982,26 +982,26 @@ void SendProfTrainerMenu_guard_durotar(Player *player, Creature *_Creature, uint player->SEND_GOSSIP_MENU(4023,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(368.95, -4723.95, 6, 6, 0, "Mukdrak"); + player->SEND_POI(368.95, -4723.95, 7, 6, 0, "Mukdrak"); player->SEND_GOSSIP_MENU(4024,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(327.17, -4825.62, 6, 6, 0, "Rawrk"); + player->SEND_POI(327.17, -4825.62, 7, 6, 0, "Rawrk"); player->SEND_GOSSIP_MENU(4025,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(-1065.48, -4777.43, 6, 6, 0, "Lau'Tiki"); + player->SEND_POI(-1065.48, -4777.43, 7, 6, 0, "Lau'Tiki"); player->SEND_GOSSIP_MENU(4026,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism - player->SEND_POI(-836.25, -4896.89, 6, 6, 0, "Mishiki"); + player->SEND_POI(-836.25, -4896.89, 7, 6, 0, "Mishiki"); player->SEND_GOSSIP_MENU(4027,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking player->SEND_GOSSIP_MENU(4028,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining - player->SEND_POI(366.94, -4705, 6, 6, 0, "Krunn"); + player->SEND_POI(366.94, -4705, 7, 6, 0, "Krunn"); player->SEND_GOSSIP_MENU(4029,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning @@ -1064,11 +1064,11 @@ void SendDefaultMenu_guard_elwynnforest(Player *player, Creature *_Creature, uin player->SEND_GOSSIP_MENU(4262,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(-9459.34, 42.08, 6, 6, 0, "Lion's Pride Inn"); + player->SEND_POI(-9459.34, 42.08, 7, 6, 0, "Lion's Pride Inn"); player->SEND_GOSSIP_MENU(4263,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master - player->SEND_POI(-9466.62, 45.87, 6, 6, 0, "Erma"); + player->SEND_POI(-9466.62, 45.87, 7, 6, 0, "Erma"); player->SEND_GOSSIP_MENU(5983,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer @@ -1111,27 +1111,27 @@ void SendClassTrainerMenu_guard_elwynnforest(Player *player, Creature *_Creature player->SEND_GOSSIP_MENU(4266,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Mage - player->SEND_POI(-9471.12, 33.44, 6, 6, 0, "Zaldimar Wefhellt"); + player->SEND_POI(-9471.12, 33.44, 7, 6, 0, "Zaldimar Wefhellt"); player->SEND_GOSSIP_MENU(4268,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Paladin - player->SEND_POI(-9469, 108.05, 6, 6, 0, "Brother Wilhelm"); + player->SEND_POI(-9469, 108.05, 7, 6, 0, "Brother Wilhelm"); player->SEND_GOSSIP_MENU(4269,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Priest - player->SEND_POI(-9461.07, 32.6, 6, 6, 0, "Priestess Josetta"); + player->SEND_POI(-9461.07, 32.6, 7, 6, 0, "Priestess Josetta"); player->SEND_GOSSIP_MENU(4267,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Rogue - player->SEND_POI(-9465.13, 13.29, 6, 6, 0, "Keryn Sylvius"); + player->SEND_POI(-9465.13, 13.29, 7, 6, 0, "Keryn Sylvius"); player->SEND_GOSSIP_MENU(4270,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warlock - player->SEND_POI(-9473.21, -4.08, 6, 6, 0, "Maximillian Crowe"); + player->SEND_POI(-9473.21, -4.08, 7, 6, 0, "Maximillian Crowe"); player->SEND_GOSSIP_MENU(4272,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Warrior - player->SEND_POI(-9461.82, 109.50, 6, 6, 0, "Lyria Du Lac"); + player->SEND_POI(-9461.82, 109.50, 7, 6, 0, "Lyria Du Lac"); player->SEND_GOSSIP_MENU(4271,_Creature->GetGUID()); break; } @@ -1142,15 +1142,15 @@ void SendProfTrainerMenu_guard_elwynnforest(Player *player, Creature *_Creature, switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-9057.04, 153.63, 6, 6, 0, "Alchemist Mallory"); + player->SEND_POI(-9057.04, 153.63, 7, 6, 0, "Alchemist Mallory"); player->SEND_GOSSIP_MENU(4274,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-9456.58, 87.90, 6, 6, 0, "Smith Argus"); + player->SEND_POI(-9456.58, 87.90, 7, 6, 0, "Smith Argus"); player->SEND_GOSSIP_MENU(4275,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-9467.54, -3.16, 6, 6, 0, "Tomas"); + player->SEND_POI(-9467.54, -3.16, 7, 6, 0, "Tomas"); player->SEND_GOSSIP_MENU(4276,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting @@ -1160,30 +1160,30 @@ void SendProfTrainerMenu_guard_elwynnforest(Player *player, Creature *_Creature, player->SEND_GOSSIP_MENU(4278,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(-9456.82, 30.49, 6, 6, 0, "Michelle Belle"); + player->SEND_POI(-9456.82, 30.49, 7, 6, 0, "Michelle Belle"); player->SEND_GOSSIP_MENU(4279,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(-9386.54, -118.73, 6, 6, 0, "Lee Brown"); + player->SEND_POI(-9386.54, -118.73, 7, 6, 0, "Lee Brown"); player->SEND_GOSSIP_MENU(4280,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism - player->SEND_POI(-9060.70, 149.23, 6, 6, 0, "Herbalist Pomeroy"); + player->SEND_POI(-9060.70, 149.23, 7, 6, 0, "Herbalist Pomeroy"); player->SEND_GOSSIP_MENU(4281,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking - player->SEND_POI(-9376.12, -75.23, 6, 6, 0, "Adele Fielder"); + player->SEND_POI(-9376.12, -75.23, 7, 6, 0, "Adele Fielder"); player->SEND_GOSSIP_MENU(4282,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining player->SEND_GOSSIP_MENU(4283,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning - player->SEND_POI(-9536.91, -1212.76, 6, 6, 0, "Helene Peltskinner"); + player->SEND_POI(-9536.91, -1212.76, 7, 6, 0, "Helene Peltskinner"); player->SEND_GOSSIP_MENU(4284,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring - player->SEND_POI(-9376.12, -75.23, 6, 6, 0, "Eldrin"); + player->SEND_POI(-9376.12, -75.23, 7, 6, 0, "Eldrin"); player->SEND_GOSSIP_MENU(4285,_Creature->GetGUID()); break; } @@ -1230,18 +1230,18 @@ void SendDefaultMenu_guard_eversong(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Bat Handler - player->SEND_POI(9371.93, -7164.80, 6, 6, 0, "Skymistress Gloaming"); + player->SEND_POI(9371.93, -7164.80, 7, 6, 0, "Skymistress Gloaming"); player->SEND_GOSSIP_MENU(10181,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Guild master player->SEND_GOSSIP_MENU(10182,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Inn - player->SEND_POI(9483.74, -6844.58, 6, 6, 0, "Delaniel's inn"); + player->SEND_POI(9483.74, -6844.58, 7, 6, 0, "Delaniel's inn"); player->SEND_GOSSIP_MENU(10183,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Stable Master - player->SEND_POI(9489.62, -6829.93, 6, 6, 0, "Anathos"); + player->SEND_POI(9489.62, -6829.93, 7, 6, 0, "Anathos"); player->SEND_GOSSIP_MENU(10184,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer @@ -1280,27 +1280,27 @@ void SendClassTrainerMenu_guard_eversong(Player *player, Creature *_Creature, ui player->SEND_GOSSIP_MENU(10185,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(9527.44, -6865.25, 6, 6, 0, "Hannovia"); + player->SEND_POI(9527.44, -6865.25, 7, 6, 0, "Hannovia"); player->SEND_GOSSIP_MENU(10186,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Mage - player->SEND_POI(9464.24, -6855.52, 6, 6, 0, "Garridel"); + player->SEND_POI(9464.24, -6855.52, 7, 6, 0, "Garridel"); player->SEND_GOSSIP_MENU(10187,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Paladin - player->SEND_POI(9517.61, -6871.04, 6, 6, 0, "Noellene"); + player->SEND_POI(9517.61, -6871.04, 7, 6, 0, "Noellene"); player->SEND_GOSSIP_MENU(10189,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Priest - player->SEND_POI(9467.39, -6845.72, 6, 6, 0, "Ponaris"); + player->SEND_POI(9467.39, -6845.72, 7, 6, 0, "Ponaris"); player->SEND_GOSSIP_MENU(10190,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Rogue - player->SEND_POI(9533.67, -6877.39, 6, 6, 0, "Tannaria"); + player->SEND_POI(9533.67, -6877.39, 7, 6, 0, "Tannaria"); player->SEND_GOSSIP_MENU(10191,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warlock - player->SEND_POI(9468.99, -6865.60, 6, 6, 0, "Celoenus"); + player->SEND_POI(9468.99, -6865.60, 7, 6, 0, "Celoenus"); player->SEND_GOSSIP_MENU(10192,_Creature->GetGUID()); break; } @@ -1311,48 +1311,48 @@ void SendProfTrainerMenu_guard_eversong(Player *player, Creature *_Creature, uin switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(8659.90, -6368.12, 6, 6, 0, "Arcanist Sheynathren"); + player->SEND_POI(8659.90, -6368.12, 7, 6, 0, "Arcanist Sheynathren"); player->SEND_GOSSIP_MENU(10193,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(8984.21, -7419.21, 6, 6, 0, "Arathel Sunforge"); + player->SEND_POI(8984.21, -7419.21, 7, 6, 0, "Arathel Sunforge"); player->SEND_GOSSIP_MENU(10194,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(9494.04, -6881.51, 6, 6, 0, "Quarelestra"); + player->SEND_POI(9494.04, -6881.51, 7, 6, 0, "Quarelestra"); player->SEND_GOSSIP_MENU(10195,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Engineering player->SEND_GOSSIP_MENU(10197,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //First Aid - player->SEND_POI(9479.46, -6879.16, 6, 6, 0, "Kanaria"); + player->SEND_POI(9479.46, -6879.16, 7, 6, 0, "Kanaria"); player->SEND_GOSSIP_MENU(10198,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Fishing player->SEND_GOSSIP_MENU(10199,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism - player->SEND_POI(8678.92, -6329.09, 6, 6, 0, "Botanist Tyniarrel"); + player->SEND_POI(8678.92, -6329.09, 7, 6, 0, "Botanist Tyniarrel"); player->SEND_GOSSIP_MENU(10200,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Jewelcrafting - player->SEND_POI(9484.32, -6874.98, 6, 6, 0, "Aleinia"); + player->SEND_POI(9484.32, -6874.98, 7, 6, 0, "Aleinia"); player->SEND_GOSSIP_MENU(10203,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking - player->SEND_POI(9362.04, -7130.33, 6, 6, 0, "Sathein"); + player->SEND_POI(9362.04, -7130.33, 7, 6, 0, "Sathein"); player->SEND_GOSSIP_MENU(10204,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining player->SEND_GOSSIP_MENU(10205,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning - player->SEND_POI(9362.04, -7130.33, 6, 6, 0, "Mathreyn"); + player->SEND_POI(9362.04, -7130.33, 7, 6, 0, "Mathreyn"); player->SEND_GOSSIP_MENU(10206,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring - player->SEND_POI(8680.36, -6327.51, 6, 6, 0, "Sempstress Ambershine"); + player->SEND_POI(8680.36, -6327.51, 7, 6, 0, "Sempstress Ambershine"); player->SEND_GOSSIP_MENU(10207,_Creature->GetGUID()); break; } @@ -1404,35 +1404,35 @@ void SendDefaultMenu_guard_exodar(Player *player, Creature *_Creature, uint32 ac switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Auction house - player->SEND_POI(-4023.6, -11739.3, 6, 6, 0, "Exodar Auction House"); + player->SEND_POI(-4023.6, -11739.3, 7, 6, 0, "Exodar Auction House"); player->SEND_GOSSIP_MENU(9528, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank - player->SEND_POI(-3923.89, -11544.5, 6, 6, 0, "Exodar Bank"); + player->SEND_POI(-3923.89, -11544.5, 7, 6, 0, "Exodar Bank"); player->SEND_GOSSIP_MENU(9529, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Guild master - player->SEND_POI(-4092.57, -11626.5, 6, 6, 0, "Exodar Guild Master"); + player->SEND_POI(-4092.57, -11626.5, 7, 6, 0, "Exodar Guild Master"); player->SEND_GOSSIP_MENU(9539, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Hippogryph master - player->SEND_POI(-4060.46, -11787.1, 6, 6, 0, "Exodar Hippogryph Master"); + player->SEND_POI(-4060.46, -11787.1, 7, 6, 0, "Exodar Hippogryph Master"); player->SEND_GOSSIP_MENU(9530, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Inn - player->SEND_POI(-3741.87, -11695.1, 6, 6, 0, "Exodar Inn"); + player->SEND_POI(-3741.87, -11695.1, 7, 6, 0, "Exodar Inn"); player->SEND_GOSSIP_MENU(9545, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Mailbox - player->SEND_POI(-3972.5, -11696.0, 6, 6, 0, "Mailbox"); + player->SEND_POI(-3972.5, -11696.0, 7, 6, 0, "Mailbox"); player->SEND_GOSSIP_MENU(10254, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Stable master - player->SEND_POI(-3786.5, -11702.5, 6, 6, 0, "Stable Master Arthaid"); + player->SEND_POI(-3786.5, -11702.5, 7, 6, 0, "Stable Master Arthaid"); player->SEND_GOSSIP_MENU(9558, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Weapon trainer - player->SEND_POI(-4215.68, -11628.9, 6, 6, 0, "Weapon Master Handiir"); + player->SEND_POI(-4215.68, -11628.9, 7, 6, 0, "Weapon Master Handiir"); player->SEND_GOSSIP_MENU(9565, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster @@ -1477,23 +1477,23 @@ void SendBattleMasterMenu_guard_exodar(Player *player, Creature *_Creature, uint switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(-3978.1, -11357, 6, 6, 0, "Alterac Valley Battlemaster"); + player->SEND_POI(-3978.1, -11357, 7, 6, 0, "Alterac Valley Battlemaster"); player->SEND_GOSSIP_MENU(9531, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(-3998.9, -11345.2, 6, 6, 0, "Arathi Basin Battlemaster"); + player->SEND_POI(-3998.9, -11345.2, 7, 6, 0, "Arathi Basin Battlemaster"); player->SEND_GOSSIP_MENU(9531, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //A - player->SEND_POI(-3759.27, -11695.63, 6, 6, 0, "Miglik Blotstrom"); + player->SEND_POI(-3759.27, -11695.63, 7, 6, 0, "Miglik Blotstrom"); player->SEND_GOSSIP_MENU(10223, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //EOS - player->SEND_POI(-3978.1, -11357, 6, 6, 0, "Eye Of The Storm Battlemaster"); + player->SEND_POI(-3978.1, -11357, 7, 6, 0, "Eye Of The Storm Battlemaster"); player->SEND_GOSSIP_MENU(9531, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //WSG - player->SEND_POI(-3977.5, -11381.2, 6, 6, 0, "Warsong Gulch Battlemaster"); + player->SEND_POI(-3977.5, -11381.2, 7, 6, 0, "Warsong Gulch Battlemaster"); player->SEND_GOSSIP_MENU(9531, _Creature->GetGUID()); break; } @@ -1504,31 +1504,31 @@ void SendClassTrainerMenu_guard_exodar(Player *player, Creature *_Creature, uint switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Druid - player->SEND_POI(-4276.0, -11495, 6, 6, 0, "Exodar Druid Trainer"); + player->SEND_POI(-4276.0, -11495, 7, 6, 0, "Exodar Druid Trainer"); player->SEND_GOSSIP_MENU(9534, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(-4210.6, -11575.2, 6, 6, 0, "Exodar Hunter Trainer"); + player->SEND_POI(-4210.6, -11575.2, 7, 6, 0, "Exodar Hunter Trainer"); player->SEND_GOSSIP_MENU(9544, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Mage - player->SEND_POI(-4057.32, -11556.5, 6, 6, 0, "Exodar Mage Trainer"); + player->SEND_POI(-4057.32, -11556.5, 7, 6, 0, "Exodar Mage Trainer"); player->SEND_GOSSIP_MENU(9550, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Paladin - player->SEND_POI(-4191.2, -11470.4, 6, 6, 0, "Exodar Paladin Trainer"); + player->SEND_POI(-4191.2, -11470.4, 7, 6, 0, "Exodar Paladin Trainer"); player->SEND_GOSSIP_MENU(9553, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Priest - player->SEND_POI(-3969.63, -11482.8, 6, 6, 0, "Exodar Priest Trainer"); + player->SEND_POI(-3969.63, -11482.8, 7, 6, 0, "Exodar Priest Trainer"); player->SEND_GOSSIP_MENU(9554, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Shaman - player->SEND_POI(-3805.5, -11380.7, 6, 6, 0, "Exodar Shaman Trainer"); + player->SEND_POI(-3805.5, -11380.7, 7, 6, 0, "Exodar Shaman Trainer"); player->SEND_GOSSIP_MENU(9556, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warrior - player->SEND_POI(-4189.43, -11653.7, 6, 6, 0, "Exodar Warrior Trainer"); + player->SEND_POI(-4189.43, -11653.7, 7, 6, 0, "Exodar Warrior Trainer"); player->SEND_GOSSIP_MENU(9562, _Creature->GetGUID()); break; } @@ -1539,55 +1539,55 @@ void SendProfTrainerMenu_guard_exodar(Player *player, Creature *_Creature, uint3 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-4040.6, -11364.5, 6, 6, 0, "Exodar Alchemy Trainer"); + player->SEND_POI(-4040.6, -11364.5, 7, 6, 0, "Exodar Alchemy Trainer"); player->SEND_GOSSIP_MENU(9527, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-4229.5, -11706, 6, 6, 0, "Exodar Blacksmithing Trainer"); + player->SEND_POI(-4229.5, -11706, 7, 6, 0, "Exodar Blacksmithing Trainer"); player->SEND_GOSSIP_MENU(9532, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-3798.3, -11651.7, 6, 6, 0, "Exodar Cooking Trainer"); + player->SEND_POI(-3798.3, -11651.7, 7, 6, 0, "Exodar Cooking Trainer"); player->SEND_GOSSIP_MENU(9551, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-3889.3, -11495, 6, 6, 0, "Exodar Enchanting Trainer"); + player->SEND_POI(-3889.3, -11495, 7, 6, 0, "Exodar Enchanting Trainer"); player->SEND_GOSSIP_MENU(9535, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(-4257.68, -11640.3, 6, 6, 0, "Exodar Engineering Trainer"); + player->SEND_POI(-4257.68, -11640.3, 7, 6, 0, "Exodar Engineering Trainer"); player->SEND_GOSSIP_MENU(9536, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(-3769.5, -11479.6, 6, 6, 0, "Exodar First Aid Trainer"); + player->SEND_POI(-3769.5, -11479.6, 7, 6, 0, "Exodar First Aid Trainer"); player->SEND_GOSSIP_MENU(9537, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(-3725.5, -11385.2, 6, 6, 0, "Exodar Fishing Trainer"); + player->SEND_POI(-3725.5, -11385.2, 7, 6, 0, "Exodar Fishing Trainer"); player->SEND_GOSSIP_MENU(9538, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Jewelcrafting - player->SEND_POI(-3783, -11546, 6, 6, 0, "Exodar Jewelcrafting Trainer"); + player->SEND_POI(-3783, -11546, 7, 6, 0, "Exodar Jewelcrafting Trainer"); player->SEND_GOSSIP_MENU(9547, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Herbalism - player->SEND_POI(-4040.6, -11364.5, 6, 6, 0, "Exodar Herbalist Trainer"); + player->SEND_POI(-4040.6, -11364.5, 7, 6, 0, "Exodar Herbalist Trainer"); player->SEND_GOSSIP_MENU(9543, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking - player->SEND_POI(-4140.6, -11776.7, 6, 6, 0, "Exodar Leatherworking Trainer"); + player->SEND_POI(-4140.6, -11776.7, 7, 6, 0, "Exodar Leatherworking Trainer"); player->SEND_GOSSIP_MENU(9549, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Mining - player->SEND_POI(-4228, -11697, 6, 6, 0, "Exodar Mining Trainer"); + player->SEND_POI(-4228, -11697, 7, 6, 0, "Exodar Mining Trainer"); player->SEND_GOSSIP_MENU(9552, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Skinning - player->SEND_POI(-4134.97, -11760.5, 6, 6, 0, "Exodar Skinning Trainer"); + player->SEND_POI(-4134.97, -11760.5, 7, 6, 0, "Exodar Skinning Trainer"); player->SEND_GOSSIP_MENU(9557, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring - player->SEND_POI(-4092.5, -11744.5, 6, 6, 0, "Exodar Tailor Trainer"); + player->SEND_POI(-4092.5, -11744.5, 7, 6, 0, "Exodar Tailor Trainer"); player->SEND_GOSSIP_MENU(9559, _Creature->GetGUID()); break; } @@ -1641,39 +1641,39 @@ void SendDefaultMenu_guard_ironforge(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Auction House - player->SEND_POI(-4957.39, -911.6, 6, 6, 0, "Ironforge Auction House"); + player->SEND_POI(-4957.39, -911.6, 7, 6, 0, "Ironforge Auction House"); player->SEND_GOSSIP_MENU(3014, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank - player->SEND_POI(-4891.91, -991.47, 6, 6, 0, "The Vault"); + player->SEND_POI(-4891.91, -991.47, 7, 6, 0, "The Vault"); player->SEND_GOSSIP_MENU(2761, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Tram - player->SEND_POI(-4835.27, -1294.69, 6, 6, 0, "Deeprun Tram"); + player->SEND_POI(-4835.27, -1294.69, 7, 6, 0, "Deeprun Tram"); player->SEND_GOSSIP_MENU(3814, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Gryphon Master - player->SEND_POI(-4821.52, -1152.3, 6, 6, 0, "Ironforge Gryphon Master"); + player->SEND_POI(-4821.52, -1152.3, 7, 6, 0, "Ironforge Gryphon Master"); player->SEND_GOSSIP_MENU(2762, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Guild Master - player->SEND_POI(-5021, -996.45, 6, 6, 0, "Ironforge Visitor's Center"); + player->SEND_POI(-5021, -996.45, 7, 6, 0, "Ironforge Visitor's Center"); player->SEND_GOSSIP_MENU(2764, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Inn - player->SEND_POI(-4850.47, -872.57, 6, 6, 0, "Stonefire Tavern"); + player->SEND_POI(-4850.47, -872.57, 7, 6, 0, "Stonefire Tavern"); player->SEND_GOSSIP_MENU(2768, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Mailbox - player->SEND_POI(-4845.7, -880.55, 6, 6, 0, "Ironforge Mailbox"); + player->SEND_POI(-4845.7, -880.55, 7, 6, 0, "Ironforge Mailbox"); player->SEND_GOSSIP_MENU(2769, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Stable Master - player->SEND_POI(-5010.2, -1262, 6, 6, 0, "Ulbrek Firehand"); + player->SEND_POI(-5010.2, -1262, 7, 6, 0, "Ulbrek Firehand"); player->SEND_GOSSIP_MENU(5986, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Weapons Trainer - player->SEND_POI(-5040, -1201.88, 6, 6, 0, "Bixi and Buliwyf"); + player->SEND_POI(-5040, -1201.88, 7, 6, 0, "Bixi and Buliwyf"); player->SEND_GOSSIP_MENU(4518, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Battlemaster @@ -1716,15 +1716,15 @@ void SendBattleMasterMenu_guard_ironforge(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(-5047.87, -1263.77, 6, 6, 0, "Glordrum Steelbeard"); + player->SEND_POI(-5047.87, -1263.77, 7, 6, 0, "Glordrum Steelbeard"); player->SEND_GOSSIP_MENU(7483, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(-5038.37, -1266.39, 6, 6, 0, "Donal Osgood"); + player->SEND_POI(-5038.37, -1266.39, 7, 6, 0, "Donal Osgood"); player->SEND_GOSSIP_MENU(7649, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //WSG - player->SEND_POI(-5037.24, -1274.82, 6, 6, 0, "Lylandris"); + player->SEND_POI(-5037.24, -1274.82, 7, 6, 0, "Lylandris"); player->SEND_GOSSIP_MENU(7528, _Creature->GetGUID()); break; } @@ -1735,35 +1735,35 @@ void SendClassTrainerMenu_guard_ironforge(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Hunter - player->SEND_POI(-5023, -1253.68, 6, 6, 0, "Hall of Arms"); + player->SEND_POI(-5023, -1253.68, 7, 6, 0, "Hall of Arms"); player->SEND_GOSSIP_MENU(2770, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Mage - player->SEND_POI(-4627, -926.45, 6, 6, 0, "Hall of Mysteries"); + player->SEND_POI(-4627, -926.45, 7, 6, 0, "Hall of Mysteries"); player->SEND_GOSSIP_MENU(2771, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Paladin - player->SEND_POI(-4627.02, -926.45, 6, 6, 0, "Hall of Mysteries"); + player->SEND_POI(-4627.02, -926.45, 7, 6, 0, "Hall of Mysteries"); player->SEND_GOSSIP_MENU(2773, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Priest - player->SEND_POI(-4627, -926.45, 6, 6, 0, "Hall of Mysteries"); + player->SEND_POI(-4627, -926.45, 7, 6, 0, "Hall of Mysteries"); player->SEND_GOSSIP_MENU(2772, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Rogue - player->SEND_POI(-4647.83, -1124, 6, 6, 0, "Ironforge Rogue Trainer"); + player->SEND_POI(-4647.83, -1124, 7, 6, 0, "Ironforge Rogue Trainer"); player->SEND_GOSSIP_MENU(2774, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Warlock - player->SEND_POI(-4605, -1110.45, 6, 6, 0, "Ironforge Warlock Trainer"); + player->SEND_POI(-4605, -1110.45, 7, 6, 0, "Ironforge Warlock Trainer"); player->SEND_GOSSIP_MENU(2775, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warrior - player->SEND_POI(-5023.08, -1253.68, 6, 6, 0, "Hall of Arms"); + player->SEND_POI(-5023.08, -1253.68, 7, 6, 0, "Hall of Arms"); player->SEND_GOSSIP_MENU(2776, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Shaman - player->SEND_POI(-4732, -1147, 6, 6, 0, "Ironforge Shaman Trainer"); + player->SEND_POI(-4732, -1147, 7, 6, 0, "Ironforge Shaman Trainer"); //incorrect id player->SEND_GOSSIP_MENU(2766, _Creature->GetGUID()); break; @@ -1775,51 +1775,51 @@ void SendProfTrainerMenu_guard_ironforge(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-4858.5, -1241.83, 6, 6, 0, "Berryfizz's Potions and Mixed Drinks"); + player->SEND_POI(-4858.5, -1241.83, 7, 6, 0, "Berryfizz's Potions and Mixed Drinks"); player->SEND_GOSSIP_MENU(2794, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-4796.97, -1110.17, 6, 6, 0, "The Great Forge"); + player->SEND_POI(-4796.97, -1110.17, 7, 6, 0, "The Great Forge"); player->SEND_GOSSIP_MENU(2795, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-4767.83, -1184.59, 6, 6, 0, "The Bronze Kettle"); + player->SEND_POI(-4767.83, -1184.59, 7, 6, 0, "The Bronze Kettle"); player->SEND_GOSSIP_MENU(2796, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-4803.72, -1196.53, 6, 6, 0, "Thistlefuzz Arcanery"); + player->SEND_POI(-4803.72, -1196.53, 7, 6, 0, "Thistlefuzz Arcanery"); player->SEND_GOSSIP_MENU(2797, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(-4799.56, -1250.23, 6, 6, 0, "Springspindle's Gadgets"); + player->SEND_POI(-4799.56, -1250.23, 7, 6, 0, "Springspindle's Gadgets"); player->SEND_GOSSIP_MENU(2798, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(-4881.6, -1153.13, 6, 6, 0, "Ironforge Physician"); + player->SEND_POI(-4881.6, -1153.13, 7, 6, 0, "Ironforge Physician"); player->SEND_GOSSIP_MENU(2799, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(-4597.91, -1091.93, 6, 6, 0, "Traveling Fisherman"); + player->SEND_POI(-4597.91, -1091.93, 7, 6, 0, "Traveling Fisherman"); player->SEND_GOSSIP_MENU(2800, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism - player->SEND_POI(-4876.9, -1151.92, 6, 6, 0, "Ironforge Physician"); + player->SEND_POI(-4876.9, -1151.92, 7, 6, 0, "Ironforge Physician"); player->SEND_GOSSIP_MENU(2801, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking - player->SEND_POI(-4745, -1027.57, 6, 6, 0, "Finespindle's Leather Goods"); + player->SEND_POI(-4745, -1027.57, 7, 6, 0, "Finespindle's Leather Goods"); player->SEND_GOSSIP_MENU(2802, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Minning - player->SEND_POI(-4705.06, -1116.43, 6, 6, 0, "Deepmountain Mining Guild"); + player->SEND_POI(-4705.06, -1116.43, 7, 6, 0, "Deepmountain Mining Guild"); player->SEND_GOSSIP_MENU(2804, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning - player->SEND_POI(-4745, -1027.57, 6, 6, 0, "Finespindle's Leather Goods"); + player->SEND_POI(-4745, -1027.57, 7, 6, 0, "Finespindle's Leather Goods"); player->SEND_GOSSIP_MENU(2805, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring - player->SEND_POI(-4719.60, -1056.96, 6, 6, 0, "Stonebrow's Clothier"); + player->SEND_POI(-4719.60, -1056.96, 7, 6, 0, "Stonebrow's Clothier"); player->SEND_GOSSIP_MENU(2807, _Creature->GetGUID()); break; } @@ -1873,11 +1873,11 @@ void SendDefaultMenu_guard_mulgore(Player *player, Creature *_Creature, uint32 a player->SEND_GOSSIP_MENU(4052,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Inn - player->SEND_POI(-2361.38, -349.19, 6, 6, 0, "Bloodhoof Village Inn"); + player->SEND_POI(-2361.38, -349.19, 7, 6, 0, "Bloodhoof Village Inn"); player->SEND_GOSSIP_MENU(4053,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Stable master - player->SEND_POI(-2338.86, -357.56, 6, 6, 0, "Seikwa"); + player->SEND_POI(-2338.86, -357.56, 7, 6, 0, "Seikwa"); player->SEND_GOSSIP_MENU(5976,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer @@ -1909,19 +1909,19 @@ void SendClassTrainerMenu_guard_mulgore(Player *player, Creature *_Creature, uin switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Druid - player->SEND_POI(-2312.15, -443.69, 6, 6, 0, "Gennia Runetotem"); + player->SEND_POI(-2312.15, -443.69, 7, 6, 0, "Gennia Runetotem"); player->SEND_GOSSIP_MENU(4054,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(-2178.14, -406.14, 6, 6, 0, "Yaw Sharpmane"); + player->SEND_POI(-2178.14, -406.14, 7, 6, 0, "Yaw Sharpmane"); player->SEND_GOSSIP_MENU(4055,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Shaman - player->SEND_POI(-2301.5, -439.87, 6, 6, 0, "Narm Skychaser"); + player->SEND_POI(-2301.5, -439.87, 7, 6, 0, "Narm Skychaser"); player->SEND_GOSSIP_MENU(4056,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Warrior - player->SEND_POI(-2345.43, -494.11, 6, 6, 0, "Krang Stonehoof"); + player->SEND_POI(-2345.43, -494.11, 7, 6, 0, "Krang Stonehoof"); player->SEND_GOSSIP_MENU(4057,_Creature->GetGUID()); break; } @@ -1938,32 +1938,32 @@ void SendProfTrainerMenu_guard_mulgore(Player *player, Creature *_Creature, uint player->SEND_GOSSIP_MENU(4059,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-2263.34, -287.91, 6, 6, 0, "Pyall Silentstride"); + player->SEND_POI(-2263.34, -287.91, 7, 6, 0, "Pyall Silentstride"); player->SEND_GOSSIP_MENU(4060,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting player->SEND_GOSSIP_MENU(4061,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //First Aid - player->SEND_POI(-2353.52, -355.82, 6, 6, 0, "Vira Younghoof"); + player->SEND_POI(-2353.52, -355.82, 7, 6, 0, "Vira Younghoof"); player->SEND_GOSSIP_MENU(4062,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Fishing - player->SEND_POI(-2349.21, -241.37, 6, 6, 0, "Uthan Stillwater"); + player->SEND_POI(-2349.21, -241.37, 7, 6, 0, "Uthan Stillwater"); player->SEND_GOSSIP_MENU(4063,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism player->SEND_GOSSIP_MENU(4064,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Leatherworking - player->SEND_POI(-2257.12, -288.63, 6, 6, 0, "Chaw Stronghide"); + player->SEND_POI(-2257.12, -288.63, 7, 6, 0, "Chaw Stronghide"); player->SEND_GOSSIP_MENU(4065,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Mining player->SEND_GOSSIP_MENU(4066,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Skinning - player->SEND_POI(-2252.94, -291.32, 6, 6, 0, "Yonn Deepcut"); + player->SEND_POI(-2252.94, -291.32, 7, 6, 0, "Yonn Deepcut"); player->SEND_GOSSIP_MENU(4067,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Tailoring @@ -2021,43 +2021,43 @@ void SendDefaultMenu_guard_orgrimmar(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Bank - player->SEND_POI(1631.51, -4375.33, 6, 6, 0, "Bank of Orgrimmar"); + player->SEND_POI(1631.51, -4375.33, 7, 6, 0, "Bank of Orgrimmar"); player->SEND_GOSSIP_MENU(2554,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //wind rider - player->SEND_POI(1676.6, -4332.72, 6, 6, 0, "The Sky Tower"); + player->SEND_POI(1676.6, -4332.72, 7, 6, 0, "The Sky Tower"); player->SEND_GOSSIP_MENU(2555,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //guild master - player->SEND_POI(1576.93, -4294.75, 6, 6, 0, "Horde Embassy"); + player->SEND_POI(1576.93, -4294.75, 7, 6, 0, "Horde Embassy"); player->SEND_GOSSIP_MENU(2556,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(1644.51, -4447.27, 6, 6, 0, "Orgrimmar Inn"); + player->SEND_POI(1644.51, -4447.27, 7, 6, 0, "Orgrimmar Inn"); player->SEND_GOSSIP_MENU(2557,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //mailbox - player->SEND_POI(1622.53, -4388.79, 6, 6, 0, "Orgrimmar Mailbox"); + player->SEND_POI(1622.53, -4388.79, 7, 6, 0, "Orgrimmar Mailbox"); player->SEND_GOSSIP_MENU(2558,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //auction house - player->SEND_POI(1679.21, -4450.1, 6, 6, 0, "Orgrimmar Auction House"); + player->SEND_POI(1679.21, -4450.1, 7, 6, 0, "Orgrimmar Auction House"); player->SEND_GOSSIP_MENU(3075,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //zeppelin - player->SEND_POI(1337.36, -4632.7, 6, 6, 0, "Orgrimmar Zeppelin Tower"); + player->SEND_POI(1337.36, -4632.7, 7, 6, 0, "Orgrimmar Zeppelin Tower"); player->SEND_GOSSIP_MENU(3173,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //weapon master - player->SEND_POI(2092.56, -4823.95, 6, 6, 0, "Sayoc & Hanashi"); + player->SEND_POI(2092.56, -4823.95, 7, 6, 0, "Sayoc & Hanashi"); player->SEND_GOSSIP_MENU(4519,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //stable master - player->SEND_POI(2133.12, -4663.93, 6, 6, 0, "Xon'cha"); + player->SEND_POI(2133.12, -4663.93, 7, 6, 0, "Xon'cha"); player->SEND_GOSSIP_MENU(5974,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //officers lounge - player->SEND_POI(1633.56, -4249.37, 6, 6, 0, "Hall of Legends"); + player->SEND_POI(1633.56, -4249.37, 7, 6, 0, "Hall of Legends"); player->SEND_GOSSIP_MENU(7046,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //battlemaster @@ -2100,15 +2100,15 @@ void SendBattleMasterMenu_guard_orgrimmar(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(1983.92, -4794.2, 6, 6, 0, "Hall of the Brave"); + player->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); player->SEND_GOSSIP_MENU(7484,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(1983.92, -4794.2, 6, 6, 0, "Hall of the Brave"); + player->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); player->SEND_GOSSIP_MENU(7644,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //WSG - player->SEND_POI(1983.92, -4794.2, 6, 6, 0, "Hall of the Brave"); + player->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); player->SEND_GOSSIP_MENU(7520,_Creature->GetGUID()); break; } @@ -2119,35 +2119,35 @@ void SendClassTrainerMenu_guard_orgrimmar(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Hunter - player->SEND_POI(2114.84, -4625.31, 6, 6, 0, "Orgrimmar Hunter's Hall"); + player->SEND_POI(2114.84, -4625.31, 7, 6, 0, "Orgrimmar Hunter's Hall"); player->SEND_GOSSIP_MENU(2559,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Mage - player->SEND_POI(1451.26, -4223.33, 6, 6, 0, "Darkbriar Lodge"); + player->SEND_POI(1451.26, -4223.33, 7, 6, 0, "Darkbriar Lodge"); player->SEND_GOSSIP_MENU(2560,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Priest - player->SEND_POI(1442.21, -4183.24, 6, 6, 0, "Spirit Lodge"); + player->SEND_POI(1442.21, -4183.24, 7, 6, 0, "Spirit Lodge"); player->SEND_GOSSIP_MENU(2561,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Shaman - player->SEND_POI(1925.34, -4181.89, 6, 6, 0, "Thrall's Fortress"); + player->SEND_POI(1925.34, -4181.89, 7, 6, 0, "Thrall's Fortress"); player->SEND_GOSSIP_MENU(2562,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Rogue - player->SEND_POI(1773.39, -4278.97, 6, 6, 0, "Shadowswift Brotherhood"); + player->SEND_POI(1773.39, -4278.97, 7, 6, 0, "Shadowswift Brotherhood"); player->SEND_GOSSIP_MENU(2563,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Warlock - player->SEND_POI(1849.57, -4359.68, 6, 6, 0, "Darkfire Enclave"); + player->SEND_POI(1849.57, -4359.68, 7, 6, 0, "Darkfire Enclave"); player->SEND_GOSSIP_MENU(2564,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warrior - player->SEND_POI(1983.92, -4794.2, 6, 6, 0, "Hall of the Brave"); + player->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); player->SEND_GOSSIP_MENU(2565,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Paladin - player->SEND_POI(1906.65, -4134.26, 6, 6, 0, "Valley of Wisdom"); + player->SEND_POI(1906.65, -4134.26, 7, 6, 0, "Valley of Wisdom"); player->SEND_GOSSIP_MENU(10843,_Creature->GetGUID()); break; } @@ -2158,51 +2158,51 @@ void SendProfTrainerMenu_guard_orgrimmar(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(1955.17, -4475.79, 6, 6, 0, "Yelmak's Alchemy and Potions"); + player->SEND_POI(1955.17, -4475.79, 7, 6, 0, "Yelmak's Alchemy and Potions"); player->SEND_GOSSIP_MENU(2497,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(2054.34, -4831.85, 6, 6, 0, "The Burning Anvil"); + player->SEND_POI(2054.34, -4831.85, 7, 6, 0, "The Burning Anvil"); player->SEND_GOSSIP_MENU(2499,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(1780.96, -4481.31, 6, 6, 0, "Borstan's Firepit"); + player->SEND_POI(1780.96, -4481.31, 7, 6, 0, "Borstan's Firepit"); player->SEND_GOSSIP_MENU(2500,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(1917.5, -4434.95, 6, 6, 0, "Godan's Runeworks"); + player->SEND_POI(1917.5, -4434.95, 7, 6, 0, "Godan's Runeworks"); player->SEND_GOSSIP_MENU(2501,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(2038.45, -4744.75, 6, 6, 0, "Nogg's Machine Shop"); + player->SEND_POI(2038.45, -4744.75, 7, 6, 0, "Nogg's Machine Shop"); player->SEND_GOSSIP_MENU(2653,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(1485.21, -4160.91, 6, 6, 0, "Survival of the Fittest"); + player->SEND_POI(1485.21, -4160.91, 7, 6, 0, "Survival of the Fittest"); player->SEND_GOSSIP_MENU(2502,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(1994.15, -4655.7, 6, 6, 0, "Lumak's Fishing"); + player->SEND_POI(1994.15, -4655.7, 7, 6, 0, "Lumak's Fishing"); player->SEND_GOSSIP_MENU(2503,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism - player->SEND_POI(1898.61, -4454.93, 6, 6, 0, "Jandi's Arboretum"); + player->SEND_POI(1898.61, -4454.93, 7, 6, 0, "Jandi's Arboretum"); player->SEND_GOSSIP_MENU(2504,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking - player->SEND_POI(1852.82, -4562.31, 6, 6, 0, "Kodohide Leatherworkers"); + player->SEND_POI(1852.82, -4562.31, 7, 6, 0, "Kodohide Leatherworkers"); player->SEND_GOSSIP_MENU(2513,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining - player->SEND_POI(2029.79, -4704, 6, 6, 0, "Red Canyon Mining"); + player->SEND_POI(2029.79, -4704, 7, 6, 0, "Red Canyon Mining"); player->SEND_GOSSIP_MENU(2515,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning - player->SEND_POI(1852.82, -4562.31, 6, 6, 0, "Kodohide Leatherworkers"); + player->SEND_POI(1852.82, -4562.31, 7, 6, 0, "Kodohide Leatherworkers"); player->SEND_GOSSIP_MENU(2516,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring - player->SEND_POI(1802.66, -4560.66, 6, 6, 0, "Magar's Cloth Goods"); + player->SEND_POI(1802.66, -4560.66, 7, 6, 0, "Magar's Cloth Goods"); player->SEND_GOSSIP_MENU(2518,_Creature->GetGUID()); break; } @@ -2263,7 +2263,7 @@ void SendDefaultMenu_guard_shattrath(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Tavern - player->SEND_POI(-1759.5, 5165, 6, 6, 0, "Worlds End Tavern"); + player->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern"); player->SEND_GOSSIP_MENU(10394, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank @@ -2277,7 +2277,7 @@ void SendDefaultMenu_guard_shattrath(Player *player, Creature *_Creature, uint32 player->SEND_GOSSIP_MENU(10382, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Flight master - player->SEND_POI(-1832, 5299, 6, 6, 0, "Flight Master"); + player->SEND_POI(-1832, 5299, 7, 6, 0, "Flight Master"); player->SEND_GOSSIP_MENU(10385, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox @@ -2310,11 +2310,11 @@ void SendDefaultMenu_guard_shattrath(Player *player, Creature *_Creature, uint32 player->SEND_GOSSIP_MENU(10391, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom - player->SEND_POI(-2070, 5265.5, 6, 6, 0, "Mana Loom"); + player->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom"); player->SEND_GOSSIP_MENU(10503, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab - player->SEND_POI(-1648.5, 5540, 6, 6, 0, "Alchemy Lab"); + player->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab"); player->SEND_GOSSIP_MENU(10321, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant @@ -2329,12 +2329,12 @@ void SendBankMenu_guard_shattrath(Player *player, Creature *_Creature, uint32 ac { if (action == GOSSIP_ACTION_INFO_DEF + 1) { - player->SEND_POI(-1730.5, 5496, 6, 6, 0, "Aldor Bank"); + player->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank"); player->SEND_GOSSIP_MENU(10380, _Creature->GetGUID()); } if (action == GOSSIP_ACTION_INFO_DEF + 2) { - player->SEND_POI(-1997.7, 5363, 6, 6, 0, "Scyers Bank"); + player->SEND_POI(-1997.7, 5363, 7, 6, 0, "Scyers Bank"); player->SEND_GOSSIP_MENU(10381, _Creature->GetGUID()); } } @@ -2343,12 +2343,12 @@ void SendInnMenu_guard_shattrath(Player *player, Creature *_Creature, uint32 act { if (action == GOSSIP_ACTION_INFO_DEF + 1) { - player->SEND_POI(-1895, 5767, 6, 6, 0, "Aldor Inn"); + player->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn"); player->SEND_GOSSIP_MENU(10383, _Creature->GetGUID()); } if (action == GOSSIP_ACTION_INFO_DEF + 2) { - player->SEND_POI(-2178, 5405, 6, 6, 0, "Scyers Inn"); + player->SEND_POI(-2178, 5405, 7, 6, 0, "Scyers Inn"); player->SEND_GOSSIP_MENU(10384, _Creature->GetGUID()); } } @@ -2358,19 +2358,19 @@ void SendMailboxMenu_guard_shattrath(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: - player->SEND_POI(-1730.5, 5496, 6, 6, 0, "Aldor Bank"); + player->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank"); player->SEND_GOSSIP_MENU(10380, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: - player->SEND_POI(-1895, 5767, 6, 6, 0, "Aldor Inn"); + player->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn"); player->SEND_GOSSIP_MENU(10383, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: - player->SEND_POI(-1997.7, 5363, 6, 6, 0, "Scyers Bank"); + player->SEND_POI(-1997.7, 5363, 7, 6, 0, "Scyers Bank"); player->SEND_GOSSIP_MENU(10381, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: - player->SEND_POI(-2178, 5405, 6, 6, 0, "Scyers Inn"); + player->SEND_POI(-2178, 5405, 7, 6, 0, "Scyers Inn"); player->SEND_GOSSIP_MENU(10384, _Creature->GetGUID()); break; } @@ -2380,12 +2380,12 @@ void SendStableMasterMenu_guard_shattrath(Player *player, Creature *_Creature, u { if (action == GOSSIP_ACTION_INFO_DEF + 1) { - player->SEND_POI(-1888.5, 5761, 6, 6, 0, "Aldor Stable"); + player->SEND_POI(-1888.5, 5761, 7, 6, 0, "Aldor Stable"); player->SEND_GOSSIP_MENU(10321, _Creature->GetGUID()); } if (action == GOSSIP_ACTION_INFO_DEF + 2) { - player->SEND_POI(-2170, 5404, 6, 6, 0, "Scyers Stable"); + player->SEND_POI(-2170, 5404, 7, 6, 0, "Scyers Stable"); player->SEND_GOSSIP_MENU(10321, _Creature->GetGUID()); } } @@ -2395,15 +2395,15 @@ void SendBattleMasterMenu_guard_shattrath(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: - player->SEND_POI(-1774, 5251, 6, 6, 0, "Alliance Battlemasters"); + player->SEND_POI(-1774, 5251, 7, 6, 0, "Alliance Battlemasters"); player->SEND_GOSSIP_MENU(10389, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: - player->SEND_POI(-1963, 5263, 6, 6, 0, "Horde Battlemasters"); + player->SEND_POI(-1963, 5263, 7, 6, 0, "Horde Battlemasters"); player->SEND_GOSSIP_MENU(10390, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: - player->SEND_POI(-1960, 5175, 6, 6, 0, "Arena Battlemasters"); + player->SEND_POI(-1960, 5175, 7, 6, 0, "Arena Battlemasters"); player->SEND_GOSSIP_MENU(12510, _Creature->GetGUID()); break; } @@ -2414,35 +2414,35 @@ void SendProfTrainerMenu_guard_shattrath(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-1648.5, 5534, 6, 6, 0, "Lorokeem"); + player->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem"); player->SEND_GOSSIP_MENU(10392, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-1847, 5222, 6, 6, 0, "Kradu Grimblade and Zula Slagfury"); + player->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury"); player->SEND_GOSSIP_MENU(10400, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-2067.4, 5316.5, 6, 6, 0, "Jack Trapper"); + player->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper"); player->SEND_GOSSIP_MENU(10393, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-2263.5, 5563.5, 6, 6, 0, "High Enchanter Bardolan"); + player->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan"); player->SEND_GOSSIP_MENU(10395, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //First Aid - player->SEND_POI(-1591, 5265.5, 6, 6, 0, "Mildred Fletcher"); + player->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher"); player->SEND_GOSSIP_MENU(10396, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting - player->SEND_POI(-1654, 5667.5, 6, 6, 0, "Hamanar"); + player->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar"); player->SEND_GOSSIP_MENU(10397, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking - player->SEND_POI(-2060.5, 5256.5, 6, 6, 0, "Darmari"); + player->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari"); player->SEND_GOSSIP_MENU(10399, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Skinning - player->SEND_POI(-2048, 5300, 6, 6, 0, "Seymour"); + player->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour"); player->SEND_GOSSIP_MENU(10398, _Creature->GetGUID()); break; } @@ -2452,12 +2452,12 @@ void SendGemMerchantMenu_guard_shattrath(Player *player, Creature *_Creature, ui { if (action == GOSSIP_ACTION_INFO_DEF + 1) { - player->SEND_POI(-1645, 5669.5, 6, 6, 0, "Aldor Gem Merchant"); + player->SEND_POI(-1645, 5669.5, 7, 6, 0, "Aldor Gem Merchant"); player->SEND_GOSSIP_MENU(10698, _Creature->GetGUID()); } if (action == GOSSIP_ACTION_INFO_DEF + 2) { - player->SEND_POI(-2193, 5424.5, 6, 6, 0, "Scyers Gem Merchant"); + player->SEND_POI(-2193, 5424.5, 7, 6, 0, "Scyers Gem Merchant"); player->SEND_GOSSIP_MENU(10699, _Creature->GetGUID()); } } @@ -2573,28 +2573,28 @@ void SendDefaultMenu_guard_shattrath_aldor(Player *player, Creature *_Creature, switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Tavern - player->SEND_POI(-1759.5, 5165, 6, 6, 0, "Worlds End Tavern"); + player->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern"); player->SEND_GOSSIP_MENU(10394, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank - player->SEND_POI(-1730.5, 5496, 6, 6, 0, "Aldor Bank"); + player->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank"); player->SEND_GOSSIP_MENU(10380, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Inn - player->SEND_POI(-1895, 5767, 6, 6, 0, "Aldor Inn"); + player->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn"); player->SEND_GOSSIP_MENU(10525, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Flight master - player->SEND_POI(-1832, 5299, 6, 6, 0, "Shattrath Flight Master"); + player->SEND_POI(-1832, 5299, 7, 6, 0, "Shattrath Flight Master"); player->SEND_GOSSIP_MENU(10402, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox - player->SEND_POI(0, 0, 6, 6, 0, "Aldor Mailbox"); + player->SEND_POI(0, 0, 7, 6, 0, "Aldor Mailbox"); //unknown player->SEND_GOSSIP_MENU(10524, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Stable master - player->SEND_POI(-1888.5, 5761, 6, 6, 0, "Aldor Stable Master"); + player->SEND_POI(-1888.5, 5761, 7, 6, 0, "Aldor Stable Master"); player->SEND_GOSSIP_MENU(10527, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster @@ -2615,15 +2615,15 @@ void SendDefaultMenu_guard_shattrath_aldor(Player *player, Creature *_Creature, player->SEND_GOSSIP_MENU(10391, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom - player->SEND_POI(-2070, 5265.5, 6, 6, 0, "Mana Loom"); + player->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom"); player->SEND_GOSSIP_MENU(10522, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab - player->SEND_POI(-1648.5, 5540, 6, 6, 0, "Alchemy Lab"); + player->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab"); player->SEND_GOSSIP_MENU(10696, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant - player->SEND_POI(-1645, 5669.5, 6, 6, 0, "Aldor Gem Merchant"); + player->SEND_POI(-1645, 5669.5, 7, 6, 0, "Aldor Gem Merchant"); player->SEND_GOSSIP_MENU(10411, _Creature->GetGUID()); break; } @@ -2634,35 +2634,35 @@ void SendProfTrainerMenu_guard_shattrath_aldor(Player *player, Creature *_Creatu switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-1648.5, 5534, 6, 6, 0, "Lorokeem"); + player->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem"); player->SEND_GOSSIP_MENU(10392, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-1847, 5222, 6, 6, 0, "Kradu Grimblade and Zula Slagfury"); + player->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury"); player->SEND_GOSSIP_MENU(10400, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-2067.4, 5316.5, 6, 6, 0, "Jack Trapper"); + player->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper"); player->SEND_GOSSIP_MENU(10393, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-2263.5, 5563.5, 6, 6, 0, "High Enchanter Bardolan"); + player->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan"); player->SEND_GOSSIP_MENU(10528, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //First Aid - player->SEND_POI(-1591, 5265.5, 6, 6, 0, "Mildred Fletcher"); + player->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher"); player->SEND_GOSSIP_MENU(10396, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting - player->SEND_POI(-1654, 5667.5, 6, 6, 0, "Hamanar"); + player->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar"); player->SEND_GOSSIP_MENU(10529, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking - player->SEND_POI(-2060.5, 5256.5, 6, 6, 0, "Darmari"); + player->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari"); player->SEND_GOSSIP_MENU(10399, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Skinning - player->SEND_POI(-2048, 5300, 6, 6, 0, "Seymour"); + player->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour"); player->SEND_GOSSIP_MENU(10419, _Creature->GetGUID()); break; } @@ -2769,27 +2769,27 @@ void SendDefaultMenu_guard_shattrath_scryer(Player *player, Creature *_Creature, switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Tavern - player->SEND_POI(-1759.5, 5165, 6, 6, 0, "Worlds End Tavern"); + player->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern"); player->SEND_GOSSIP_MENU(10431, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank - player->SEND_POI(-1996.6, 5363.7, 6, 6, 0, "Scryer Bank"); + player->SEND_POI(-1996.6, 5363.7, 7, 6, 0, "Scryer Bank"); player->SEND_GOSSIP_MENU(10432, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Inn - player->SEND_POI(-2176.6, 5405.8, 6, 6, 0, "Scryer Inn"); + player->SEND_POI(-2176.6, 5405.8, 7, 6, 0, "Scryer Inn"); player->SEND_GOSSIP_MENU(10433, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Flight master - player->SEND_POI(-1832, 5299, 6, 6, 0, "Shattrath Flight Master"); + player->SEND_POI(-1832, 5299, 7, 6, 0, "Shattrath Flight Master"); player->SEND_GOSSIP_MENU(10435, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox - player->SEND_POI(-2174.3, 5411.4, 6, 6, 0, "Scryer Mailbox"); + player->SEND_POI(-2174.3, 5411.4, 7, 6, 0, "Scryer Mailbox"); player->SEND_GOSSIP_MENU(10436, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Stable master - player->SEND_POI(-2169.9, 5405.1, 6, 6, 0, "Scryer Stable Master"); + player->SEND_POI(-2169.9, 5405.1, 7, 6, 0, "Scryer Stable Master"); player->SEND_GOSSIP_MENU(10437, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster @@ -2810,15 +2810,15 @@ void SendDefaultMenu_guard_shattrath_scryer(Player *player, Creature *_Creature, player->SEND_GOSSIP_MENU(10504, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom - player->SEND_POI(-2070, 5265.5, 6, 6, 0, "Mana Loom"); + player->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom"); player->SEND_GOSSIP_MENU(10522, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab - player->SEND_POI(-1648.5, 5540, 6, 6, 0, "Alchemy Lab"); + player->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab"); player->SEND_GOSSIP_MENU(10701, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant - player->SEND_POI(-1645, 5669.5, 6, 6, 0, "Scryer Gem Merchant"); + player->SEND_POI(-1645, 5669.5, 7, 6, 0, "Scryer Gem Merchant"); player->SEND_GOSSIP_MENU(10702, _Creature->GetGUID()); break; } @@ -2829,35 +2829,35 @@ void SendProfTrainerMenu_guard_shattrath_scryer(Player *player, Creature *_Creat switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-1648.5, 5534, 6, 6, 0, "Lorokeem"); + player->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem"); player->SEND_GOSSIP_MENU(10516, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-1847, 5222, 6, 6, 0, "Kradu Grimblade and Zula Slagfury"); + player->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury"); player->SEND_GOSSIP_MENU(10517, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-2067.4, 5316.5, 6, 6, 0, "Jack Trapper"); + player->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper"); player->SEND_GOSSIP_MENU(10518, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-2263.5, 5563.5, 6, 6, 0, "High Enchanter Bardolan"); + player->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan"); player->SEND_GOSSIP_MENU(10519, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //First Aid - player->SEND_POI(-1591, 5265.5, 6, 6, 0, "Mildred Fletcher"); + player->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher"); player->SEND_GOSSIP_MENU(10520, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting - player->SEND_POI(-1654, 5667.5, 6, 6, 0, "Hamanar"); + player->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar"); player->SEND_GOSSIP_MENU(10521, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking - player->SEND_POI(-2060.5, 5256.5, 6, 6, 0, "Darmari"); + player->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari"); player->SEND_GOSSIP_MENU(10523, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Skinning - player->SEND_POI(-2048, 5300, 6, 6, 0, "Seymour"); + player->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour"); player->SEND_GOSSIP_MENU(10523, _Creature->GetGUID()); break; } @@ -2914,11 +2914,11 @@ void SendDefaultMenu_guard_silvermoon(Player *player, Creature *_Creature, uint3 player->SEND_GOSSIP_MENU(9317, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank - player->SEND_POI(9808.4, -7488.16, 6, 6, 0, "Silvermoon Bank"); + player->SEND_POI(9808.4, -7488.16, 7, 6, 0, "Silvermoon Bank"); player->SEND_GOSSIP_MENU(9322, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Guild master - player->SEND_POI(9474.97, -7345.21, 6, 6, 0, "Tandrine"); + player->SEND_POI(9474.97, -7345.21, 7, 6, 0, "Tandrine"); player->SEND_GOSSIP_MENU(9324, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn @@ -2927,19 +2927,19 @@ void SendDefaultMenu_guard_silvermoon(Player *player, Creature *_Creature, uint3 player->SEND_GOSSIP_MENU(9602, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox - player->SEND_POI(9658.33, -7492.17, 6, 6, 0, "Silvermoon Mailbox"); + player->SEND_POI(9658.33, -7492.17, 7, 6, 0, "Silvermoon Mailbox"); player->SEND_GOSSIP_MENU(9326, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Stable master - player->SEND_POI(9904.95, -7404.31, 6, 6, 0, "Shalenn"); + player->SEND_POI(9904.95, -7404.31, 7, 6, 0, "Shalenn"); player->SEND_GOSSIP_MENU(9327, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Weapon trainer - player->SEND_POI(9841.17, -7505.13, 6, 6, 0, "Ileda"); + player->SEND_POI(9841.17, -7505.13, 7, 6, 0, "Ileda"); player->SEND_GOSSIP_MENU(9328, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Wind master - player->SEND_POI(9378.45, -7163.94, 6, 6, 0, "Silvermoon Wind Master"); + player->SEND_POI(9378.45, -7163.94, 7, 6, 0, "Silvermoon Wind Master"); player->SEND_GOSSIP_MENU(10181, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster @@ -2983,12 +2983,12 @@ void SendAuctionhouseMenu_guard_silvermoon(Player *player, Creature *_Creature, { if (action == GOSSIP_ACTION_INFO_DEF + 1) { - player->SEND_POI(9644.47, -7140.22, 6, 6, 0, "Western Auction House"); + player->SEND_POI(9644.47, -7140.22, 7, 6, 0, "Western Auction House"); player->SEND_GOSSIP_MENU(9318, _Creature->GetGUID()); } if (action == GOSSIP_ACTION_INFO_DEF + 2) { - player->SEND_POI(9683.27, -7521.22, 6, 6, 0, "Royal Exchange Auction House"); + player->SEND_POI(9683.27, -7521.22, 7, 6, 0, "Royal Exchange Auction House"); player->SEND_GOSSIP_MENU(9319, _Creature->GetGUID()); } } @@ -2997,12 +2997,12 @@ void SendInnMenu_guard_silvermoon(Player *player, Creature *_Creature, uint32 ac { if (action == GOSSIP_ACTION_INFO_DEF + 1) { - player->SEND_POI(9677.7, -7368, 6, 6, 0, "Silvermoon City Inn"); + player->SEND_POI(9677.7, -7368, 7, 6, 0, "Silvermoon City Inn"); player->SEND_GOSSIP_MENU(9325, _Creature->GetGUID()); } if (action == GOSSIP_ACTION_INFO_DEF + 2) { - player->SEND_POI(9561.1, -7517.5, 6, 6, 0, "Wayfarer's Rest tavern"); + player->SEND_POI(9561.1, -7517.5, 7, 6, 0, "Wayfarer's Rest tavern"); player->SEND_GOSSIP_MENU(9603, _Creature->GetGUID()); } } @@ -3012,23 +3012,23 @@ void SendBattleMasterMenu_guard_silvermoon(Player *player, Creature *_Creature, switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(9850.49, -7572.26, 6, 6, 0, "Gurak"); + player->SEND_POI(9850.49, -7572.26, 7, 6, 0, "Gurak"); player->SEND_GOSSIP_MENU(9329, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(9857.18, -7564.36, 6, 6, 0, "Karen Wentworth"); + player->SEND_POI(9857.18, -7564.36, 7, 6, 0, "Karen Wentworth"); player->SEND_GOSSIP_MENU(9329, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //A - player->SEND_POI(9850.6, -7559.25, 6, 6, 0, "Bipp Glizzitor"); + player->SEND_POI(9850.6, -7559.25, 7, 6, 0, "Bipp Glizzitor"); player->SEND_GOSSIP_MENU(9329, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //EOS - player->SEND_POI(9857.18, -7564.36, 6, 6, 0, "Karen Wentworth"); + player->SEND_POI(9857.18, -7564.36, 7, 6, 0, "Karen Wentworth"); player->SEND_GOSSIP_MENU(9329, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //WSG - player->SEND_POI(9845.45, -7562.58, 6, 6, 0, "Krukk"); + player->SEND_POI(9845.45, -7562.58, 7, 6, 0, "Krukk"); player->SEND_GOSSIP_MENU(9329, _Creature->GetGUID()); break; } @@ -3039,31 +3039,31 @@ void SendClassTrainerMenu_guard_silvermoon(Player *player, Creature *_Creature, switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Druid - player->SEND_POI(9700.55, -7262.57, 6, 6, 0, "Harene Plainwalker"); + player->SEND_POI(9700.55, -7262.57, 7, 6, 0, "Harene Plainwalker"); player->SEND_GOSSIP_MENU(9330, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(9927.48, -7426.14, 6, 6, 0, "Zandine"); + player->SEND_POI(9927.48, -7426.14, 7, 6, 0, "Zandine"); player->SEND_GOSSIP_MENU(9332, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Mage - player->SEND_POI(9995.07, -7118.17, 6, 6, 0, "Quithas"); + player->SEND_POI(9995.07, -7118.17, 7, 6, 0, "Quithas"); player->SEND_GOSSIP_MENU(9333, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Paladin - player->SEND_POI(9850.22, -7516.93, 6, 6, 0, "Champion Bachi"); + player->SEND_POI(9850.22, -7516.93, 7, 6, 0, "Champion Bachi"); player->SEND_GOSSIP_MENU(9334, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Priest - player->SEND_POI(9926.79, -7066.66, 6, 6, 0, "Belestra"); + player->SEND_POI(9926.79, -7066.66, 7, 6, 0, "Belestra"); player->SEND_GOSSIP_MENU(9335, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Rogue - player->SEND_POI(9739.88, -7374.33, 6, 6, 0, "Zelanis"); + player->SEND_POI(9739.88, -7374.33, 7, 6, 0, "Zelanis"); player->SEND_GOSSIP_MENU(9336, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Warlock - player->SEND_POI(9787.57, -7284.63, 6, 6, 0, "Alamma"); + player->SEND_POI(9787.57, -7284.63, 7, 6, 0, "Alamma"); player->SEND_GOSSIP_MENU(9337, _Creature->GetGUID()); break; } @@ -3074,55 +3074,55 @@ void SendProfTrainerMenu_guard_silvermoon(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(9998.09, -7214.36, 6, 6, 0, "Silvermoon Alchemy Trainer"); + player->SEND_POI(9998.09, -7214.36, 7, 6, 0, "Silvermoon Alchemy Trainer"); player->SEND_GOSSIP_MENU(9316, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(9841.43, -7361.53, 6, 6, 0, "Silvermoon Blacksmithing Trainer"); + player->SEND_POI(9841.43, -7361.53, 7, 6, 0, "Silvermoon Blacksmithing Trainer"); player->SEND_GOSSIP_MENU(9340, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(9577.26, -7243.6, 6, 6, 0, "Silvermoon Cooking Trainer"); + player->SEND_POI(9577.26, -7243.6, 7, 6, 0, "Silvermoon Cooking Trainer"); player->SEND_GOSSIP_MENU(9316, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(9962.57, -7246.18, 6, 6, 0, "Silvermoon Enchanting Trainer"); + player->SEND_POI(9962.57, -7246.18, 7, 6, 0, "Silvermoon Enchanting Trainer"); player->SEND_GOSSIP_MENU(9341, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(9820.18, -7329.56, 6, 6, 0, "Silvermoon Engineering Trainer"); + player->SEND_POI(9820.18, -7329.56, 7, 6, 0, "Silvermoon Engineering Trainer"); player->SEND_GOSSIP_MENU(9316, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(9579.8, -7343.71, 6, 6, 0, "Silvermoon First Aid Trainer"); + player->SEND_POI(9579.8, -7343.71, 7, 6, 0, "Silvermoon First Aid Trainer"); player->SEND_GOSSIP_MENU(9316, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(9602.73, -7328.3, 6, 6, 0, "Silvermoon Fishing Trainer"); + player->SEND_POI(9602.73, -7328.3, 7, 6, 0, "Silvermoon Fishing Trainer"); player->SEND_GOSSIP_MENU(9316, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Jewelcrafting - player->SEND_POI(9553.54, -7506.43, 6, 6, 0, "Silvermoon Jewelcrafting Trainer"); + player->SEND_POI(9553.54, -7506.43, 7, 6, 0, "Silvermoon Jewelcrafting Trainer"); player->SEND_GOSSIP_MENU(9346, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Herbalism - player->SEND_POI(10004.4, -7216.86, 6, 6, 0, "Silvermoon Herbalism Trainer"); + player->SEND_POI(10004.4, -7216.86, 7, 6, 0, "Silvermoon Herbalism Trainer"); player->SEND_GOSSIP_MENU(9316, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking - player->SEND_POI(9503.72, -7430.16, 6, 6, 0, "Silvermoon Leatherworking Trainer"); + player->SEND_POI(9503.72, -7430.16, 7, 6, 0, "Silvermoon Leatherworking Trainer"); player->SEND_GOSSIP_MENU(9347, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Mining - player->SEND_POI(9805.1, -7355.56, 6, 6, 0, "Silvermoon Mining Trainer"); + player->SEND_POI(9805.1, -7355.56, 7, 6, 0, "Silvermoon Mining Trainer"); player->SEND_GOSSIP_MENU(9348, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Skinning - player->SEND_POI(9513.37, -7429.4, 6, 6, 0, "Silvermoon Skinning Trainer"); + player->SEND_POI(9513.37, -7429.4, 7, 6, 0, "Silvermoon Skinning Trainer"); player->SEND_GOSSIP_MENU(9316, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring - player->SEND_POI(9750.55, -7095.28, 6, 6, 0, "Silvermoon Tailor"); + player->SEND_POI(9750.55, -7095.28, 7, 6, 0, "Silvermoon Tailor"); player->SEND_GOSSIP_MENU(9350, _Creature->GetGUID()); break; } @@ -3179,43 +3179,43 @@ void SendDefaultMenu_guard_stormwind(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Auction House - player->SEND_POI(-8811.46, 667.46, 6, 6, 0, "Stormwind Auction House"); + player->SEND_POI(-8811.46, 667.46, 7, 6, 0, "Stormwind Auction House"); player->SEND_GOSSIP_MENU(3834,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bank - player->SEND_POI(-8916.87, 622.87, 6, 6, 0, "Stormwind Bank"); + player->SEND_POI(-8916.87, 622.87, 7, 6, 0, "Stormwind Bank"); player->SEND_GOSSIP_MENU(764,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Deeprun tram - player->SEND_POI(-8378.88, 554.23, 6, 6, 0, "The Deeprun Tram"); + player->SEND_POI(-8378.88, 554.23, 7, 6, 0, "The Deeprun Tram"); player->SEND_GOSSIP_MENU(3813,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(-8869.0, 675.4, 6, 6, 0, "The Gilded Rose"); + player->SEND_POI(-8869.0, 675.4, 7, 6, 0, "The Gilded Rose"); player->SEND_GOSSIP_MENU(3860,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Gryphon Master - player->SEND_POI(-8837.0, 493.5, 6, 6, 0, "Stormwind Gryphon Master"); + player->SEND_POI(-8837.0, 493.5, 7, 6, 0, "Stormwind Gryphon Master"); player->SEND_GOSSIP_MENU(879,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Guild Master - player->SEND_POI(-8894.0, 611.2, 6, 6, 0, "Stormwind Vistor`s Center"); + player->SEND_POI(-8894.0, 611.2, 7, 6, 0, "Stormwind Vistor`s Center"); player->SEND_GOSSIP_MENU(882,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Mailbox - player->SEND_POI(-8876.48, 649.18, 6, 6, 0, "Stormwind Mailbox"); + player->SEND_POI(-8876.48, 649.18, 7, 6, 0, "Stormwind Mailbox"); player->SEND_GOSSIP_MENU(3861,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Stable Master - player->SEND_POI(-8433.0, 554.7, 6, 6, 0, "Jenova Stoneshield"); + player->SEND_POI(-8433.0, 554.7, 7, 6, 0, "Jenova Stoneshield"); player->SEND_GOSSIP_MENU(5984,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Weapon Trainer - player->SEND_POI(-8797.0, 612.8, 6, 6, 0, "Woo Ping"); + player->SEND_POI(-8797.0, 612.8, 7, 6, 0, "Woo Ping"); player->SEND_GOSSIP_MENU(4516,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Officers Lounge - player->SEND_POI(-8759.92, 399.69, 6, 6, 0, "Champions` Hall"); + player->SEND_POI(-8759.92, 399.69, 7, 6, 0, "Champions` Hall"); player->SEND_GOSSIP_MENU(7047,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Battlemasters @@ -3259,15 +3259,15 @@ void SendBattleMasterMenu_guard_stormwind(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(-8443.88, 335.99, 6, 6, 0, "Thelman Slatefist"); + player->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Thelman Slatefist"); player->SEND_GOSSIP_MENU(7500, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(-8443.88, 335.99, 6, 6, 0, "Lady Hoteshem"); + player->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Lady Hoteshem"); player->SEND_GOSSIP_MENU(7650, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //WSG - player->SEND_POI(-8443.88, 335.99, 6, 6, 0, "Elfarran"); + player->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Elfarran"); player->SEND_GOSSIP_MENU(7501, _Creature->GetGUID()); break; } @@ -3278,39 +3278,39 @@ void SendClassTrainerMenu_guard_stormwind(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Mage - player->SEND_POI(-9012.0, 867.6, 6, 6, 0, "Wizard`s Sanctum"); + player->SEND_POI(-9012.0, 867.6, 7, 6, 0, "Wizard`s Sanctum"); player->SEND_GOSSIP_MENU(899,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Rogue - player->SEND_POI(-8753.0, 367.8, 6, 6, 0, "Stormwind - Rogue House"); + player->SEND_POI(-8753.0, 367.8, 7, 6, 0, "Stormwind - Rogue House"); player->SEND_GOSSIP_MENU(900,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Warrior - player->SEND_POI(-8690.11, 324.85, 6, 6, 0, "Command Center"); + player->SEND_POI(-8690.11, 324.85, 7, 6, 0, "Command Center"); player->SEND_GOSSIP_MENU(901,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Druid - player->SEND_POI(-8751.0, 1124.5, 6, 6, 0, "The Park"); + player->SEND_POI(-8751.0, 1124.5, 7, 6, 0, "The Park"); player->SEND_GOSSIP_MENU(902,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Priest - player->SEND_POI(-8512.0, 862.4, 6, 6, 0, "Catedral Of Light"); + player->SEND_POI(-8512.0, 862.4, 7, 6, 0, "Catedral Of Light"); player->SEND_GOSSIP_MENU(903,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Paladin - player->SEND_POI(-8577.0, 881.7, 6, 6, 0, "Catedral Of Light"); + player->SEND_POI(-8577.0, 881.7, 7, 6, 0, "Catedral Of Light"); player->SEND_GOSSIP_MENU(904,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Hunter - player->SEND_POI(-8413.0, 541.5, 6, 6, 0, "Hunter Lodge"); + player->SEND_POI(-8413.0, 541.5, 7, 6, 0, "Hunter Lodge"); player->SEND_GOSSIP_MENU(905,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Warlock - player->SEND_POI(-8948.91, 998.35, 6, 6, 0, "The Slaughtered Lamb"); + player->SEND_POI(-8948.91, 998.35, 7, 6, 0, "The Slaughtered Lamb"); player->SEND_GOSSIP_MENU(906,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Shaman - player->SEND_POI(-9033, 550, 6, 6, 0, "Valley Of Heroes"); + player->SEND_POI(-9033, 550, 7, 6, 0, "Valley Of Heroes"); //incorrect id player->SEND_GOSSIP_MENU(2593,_Creature->GetGUID()); break; @@ -3322,51 +3322,51 @@ void SendProfTrainerMenu_guard_stormwind(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(-8988.0, 759.60, 6, 6, 0, "Alchemy Needs"); + player->SEND_POI(-8988.0, 759.60, 7, 6, 0, "Alchemy Needs"); player->SEND_GOSSIP_MENU(919,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(-8424.0, 616.9, 6, 6, 0, "Therum Deepforge"); + player->SEND_POI(-8424.0, 616.9, 7, 6, 0, "Therum Deepforge"); player->SEND_GOSSIP_MENU(920,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(-8611.0, 364.6, 6, 6, 0, "Pig and Whistle Tavern"); + player->SEND_POI(-8611.0, 364.6, 7, 6, 0, "Pig and Whistle Tavern"); player->SEND_GOSSIP_MENU(921,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(-8858.0, 803.7, 6, 6, 0, "Lucan Cordell"); + player->SEND_POI(-8858.0, 803.7, 7, 6, 0, "Lucan Cordell"); player->SEND_GOSSIP_MENU(941,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(-8347.0, 644.1, 6, 6, 0, "Lilliam Sparkspindle"); + player->SEND_POI(-8347.0, 644.1, 7, 6, 0, "Lilliam Sparkspindle"); player->SEND_GOSSIP_MENU(922,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(-8513.0, 801.8, 6, 6, 0, "Shaina Fuller"); + player->SEND_POI(-8513.0, 801.8, 7, 6, 0, "Shaina Fuller"); player->SEND_GOSSIP_MENU(923,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(-8803.0, 767.5, 6, 6, 0, "Arnold Leland"); + player->SEND_POI(-8803.0, 767.5, 7, 6, 0, "Arnold Leland"); player->SEND_GOSSIP_MENU(940,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism - player->SEND_POI(-8967.0, 779.5, 6, 6, 0, "Alchemy Needs"); + player->SEND_POI(-8967.0, 779.5, 7, 6, 0, "Alchemy Needs"); player->SEND_GOSSIP_MENU(924,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking - player->SEND_POI(-8726.0, 477.4, 6, 6, 0, "The Protective Hide"); + player->SEND_POI(-8726.0, 477.4, 7, 6, 0, "The Protective Hide"); player->SEND_GOSSIP_MENU(925,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining - player->SEND_POI(-8434.0, 692.8, 6, 6, 0, "Gelman Stonehand"); + player->SEND_POI(-8434.0, 692.8, 7, 6, 0, "Gelman Stonehand"); player->SEND_GOSSIP_MENU(927,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning - player->SEND_POI(-8716.0, 469.4, 6, 6, 0, "The Protective Hide"); + player->SEND_POI(-8716.0, 469.4, 7, 6, 0, "The Protective Hide"); player->SEND_GOSSIP_MENU(928,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring - player->SEND_POI(-8938.0, 800.7, 6, 6, 0, "Duncan`s Textiles"); + player->SEND_POI(-8938.0, 800.7, 7, 6, 0, "Duncan`s Textiles"); player->SEND_GOSSIP_MENU(929,_Creature->GetGUID()); break; } @@ -3431,11 +3431,11 @@ void SendDefaultMenu_guard_teldrassil(Player *player, Creature *_Creature, uint3 player->SEND_GOSSIP_MENU(4319,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(9821.49, 960.13, 6, 6, 0, "Dolanaar Inn"); + player->SEND_POI(9821.49, 960.13, 7, 6, 0, "Dolanaar Inn"); player->SEND_GOSSIP_MENU(4320,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //stable master - player->SEND_POI(9808.37, 931.1, 6, 6, 0, "Seriadne"); + player->SEND_POI(9808.37, 931.1, 7, 6, 0, "Seriadne"); player->SEND_GOSSIP_MENU(5982,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //class trainer @@ -3466,23 +3466,23 @@ void SendClassTrainerMenu_guard_teldrassil(Player *player, Creature *_Creature, switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Druid - player->SEND_POI(9741.58, 963.7, 6, 6, 0, "Kal"); + player->SEND_POI(9741.58, 963.7, 7, 6, 0, "Kal"); player->SEND_GOSSIP_MENU(4323,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Hunter - player->SEND_POI(9815.12, 926.28, 6, 6, 0, "Dazalar"); + player->SEND_POI(9815.12, 926.28, 7, 6, 0, "Dazalar"); player->SEND_GOSSIP_MENU(4324,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Priest - player->SEND_POI(9906.16, 986.63, 6, 6, 0, "Laurna Morninglight"); + player->SEND_POI(9906.16, 986.63, 7, 6, 0, "Laurna Morninglight"); player->SEND_GOSSIP_MENU(4325,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Rogue - player->SEND_POI(9789, 942.86, 6, 6, 0, "Jannok Breezesong"); + player->SEND_POI(9789, 942.86, 7, 6, 0, "Jannok Breezesong"); player->SEND_GOSSIP_MENU(4326,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Warrior - player->SEND_POI(9821.96, 950.61, 6, 6, 0, "Kyra Windblade"); + player->SEND_POI(9821.96, 950.61, 7, 6, 0, "Kyra Windblade"); player->SEND_GOSSIP_MENU(4327,_Creature->GetGUID()); break; } @@ -3493,34 +3493,34 @@ void SendProfTrainerMenu_guard_teldrassil(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(9767.59, 878.81, 6, 6, 0, "Cyndra Kindwhisper"); + player->SEND_POI(9767.59, 878.81, 7, 6, 0, "Cyndra Kindwhisper"); player->SEND_GOSSIP_MENU(4329,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Cooking - player->SEND_POI(9751.19, 906.13, 6, 6, 0, "Zarrin"); + player->SEND_POI(9751.19, 906.13, 7, 6, 0, "Zarrin"); player->SEND_GOSSIP_MENU(4330,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Enchanting - player->SEND_POI(10677.59, 1946.56, 6, 6, 0, "Alanna Raveneye"); + player->SEND_POI(10677.59, 1946.56, 7, 6, 0, "Alanna Raveneye"); player->SEND_GOSSIP_MENU(4331,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //First Aid - player->SEND_POI(9903.12, 999, 6, 6, 0, "Byancie"); + player->SEND_POI(9903.12, 999, 7, 6, 0, "Byancie"); player->SEND_GOSSIP_MENU(4332,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Fishing player->SEND_GOSSIP_MENU(4333,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Herbalism - player->SEND_POI(9773.78, 875.88, 6, 6, 0, "Malorne Bladeleaf"); + player->SEND_POI(9773.78, 875.88, 7, 6, 0, "Malorne Bladeleaf"); player->SEND_GOSSIP_MENU(4334,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking - player->SEND_POI(10152.59, 1681.46, 6, 6, 0, "Nadyia Maneweaver"); + player->SEND_POI(10152.59, 1681.46, 7, 6, 0, "Nadyia Maneweaver"); player->SEND_GOSSIP_MENU(4335,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Skinning - player->SEND_POI(10135.59, 1673.18, 6, 6, 0, "Radnaal Maneweaver"); + player->SEND_POI(10135.59, 1673.18, 7, 6, 0, "Radnaal Maneweaver"); player->SEND_GOSSIP_MENU(4336,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Tailoring @@ -3576,11 +3576,11 @@ void SendDefaultMenu_guard_tirisfal(Player *player, Creature *_Creature, uint32 player->SEND_GOSSIP_MENU(4075,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Inn - player->SEND_POI(2246.68, 241.89, 6, 6, 0, "Gallows` End Tavern"); + player->SEND_POI(2246.68, 241.89, 7, 6, 0, "Gallows` End Tavern"); player->SEND_GOSSIP_MENU(4076,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Stable Master - player->SEND_POI(2267.66, 319.32, 6, 6, 0, "Morganus"); + player->SEND_POI(2267.66, 319.32, 7, 6, 0, "Morganus"); player->SEND_GOSSIP_MENU(5978,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer @@ -3614,23 +3614,23 @@ void SendClassTrainerMenu_guard_tirisfal(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Mage - player->SEND_POI(2259.18, 240.93, 6, 6, 0, "Cain Firesong"); + player->SEND_POI(2259.18, 240.93, 7, 6, 0, "Cain Firesong"); player->SEND_GOSSIP_MENU(4077,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Priest - player->SEND_POI(2259.18, 240.93, 6, 6, 0, "Dark Cleric Beryl"); + player->SEND_POI(2259.18, 240.93, 7, 6, 0, "Dark Cleric Beryl"); player->SEND_GOSSIP_MENU(4078,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Rogue - player->SEND_POI(2259.18, 240.93, 6, 6, 0, "Marion Call"); + player->SEND_POI(2259.18, 240.93, 7, 6, 0, "Marion Call"); player->SEND_GOSSIP_MENU(4079,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Warlock - player->SEND_POI(2259.18, 240.93, 6, 6, 0, "Rupert Boch"); + player->SEND_POI(2259.18, 240.93, 7, 6, 0, "Rupert Boch"); player->SEND_GOSSIP_MENU(4080,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Warrior - player->SEND_POI(2256.48, 240.32, 6, 6, 0, "Austil de Mon"); + player->SEND_POI(2256.48, 240.32, 7, 6, 0, "Austil de Mon"); player->SEND_GOSSIP_MENU(4081,_Creature->GetGUID()); break; } @@ -3641,7 +3641,7 @@ void SendProfTrainerMenu_guard_tirisfal(Player *player, Creature *_Creature, uin switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(2263.25, 344.23, 6, 6, 0, "Carolai Anise"); + player->SEND_POI(2263.25, 344.23, 7, 6, 0, "Carolai Anise"); player->SEND_GOSSIP_MENU(4082,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing @@ -3651,37 +3651,37 @@ void SendProfTrainerMenu_guard_tirisfal(Player *player, Creature *_Creature, uin player->SEND_GOSSIP_MENU(4084,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(2250.35, 249.12, 6, 6, 0, "Vance Undergloom"); + player->SEND_POI(2250.35, 249.12, 7, 6, 0, "Vance Undergloom"); player->SEND_GOSSIP_MENU(4085,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering player->SEND_GOSSIP_MENU(4086,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(2246.68, 241.89, 6, 6, 0, "Nurse Neela"); + player->SEND_POI(2246.68, 241.89, 7, 6, 0, "Nurse Neela"); player->SEND_GOSSIP_MENU(4087,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(2292.37, -10.72, 6, 6, 0, "Clyde Kellen"); + player->SEND_POI(2292.37, -10.72, 7, 6, 0, "Clyde Kellen"); player->SEND_GOSSIP_MENU(4088,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism - player->SEND_POI(2268.21, 331.69, 6, 6, 0, "Faruza"); + player->SEND_POI(2268.21, 331.69, 7, 6, 0, "Faruza"); player->SEND_GOSSIP_MENU(4089,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking - player->SEND_POI(2027, 78.72, 6, 6, 0, "Shelene Rhobart"); + player->SEND_POI(2027, 78.72, 7, 6, 0, "Shelene Rhobart"); player->SEND_GOSSIP_MENU(4090,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining player->SEND_GOSSIP_MENU(4091,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning - player->SEND_POI(2027, 78.72, 6, 6, 0, "Rand Rhobart"); + player->SEND_POI(2027, 78.72, 7, 6, 0, "Rand Rhobart"); player->SEND_GOSSIP_MENU(4092,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring - player->SEND_POI(2160.45, 659.93, 6, 6, 0, "Bowen Brisboise"); + player->SEND_POI(2160.45, 659.93, 7, 6, 0, "Bowen Brisboise"); player->SEND_GOSSIP_MENU(4093,_Creature->GetGUID()); break; } @@ -3734,39 +3734,39 @@ void SendDefaultMenu_guard_undercity(Player *player, Creature *_Creature, uint32 switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Bank - player->SEND_POI(1595.64, 232.45, 6, 6, 0, "Undercity Bank"); + player->SEND_POI(1595.64, 232.45, 7, 6, 0, "Undercity Bank"); player->SEND_GOSSIP_MENU(3514,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Bat handler - player->SEND_POI(1565.9, 271.43, 6, 6, 0, "Undercity Bat Handler"); + player->SEND_POI(1565.9, 271.43, 7, 6, 0, "Undercity Bat Handler"); player->SEND_GOSSIP_MENU(3515,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Guild master - player->SEND_POI(1594.17, 205.57, 6, 6, 0, "Undercity Guild Master"); + player->SEND_POI(1594.17, 205.57, 7, 6, 0, "Undercity Guild Master"); player->SEND_GOSSIP_MENU(3516,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Inn - player->SEND_POI(1639.43, 220.99, 6, 6, 0, "Undercity Inn"); + player->SEND_POI(1639.43, 220.99, 7, 6, 0, "Undercity Inn"); player->SEND_GOSSIP_MENU(3517,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox - player->SEND_POI(1632.68, 219.4, 6, 6, 0, "Undercity Mailbox"); + player->SEND_POI(1632.68, 219.4, 7, 6, 0, "Undercity Mailbox"); player->SEND_GOSSIP_MENU(3518,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //Auction House - player->SEND_POI(1647.9, 258.49, 6, 6, 0, "Undercity Auction House"); + player->SEND_POI(1647.9, 258.49, 7, 6, 0, "Undercity Auction House"); player->SEND_GOSSIP_MENU(3519,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Zeppelin - player->SEND_POI(2059, 274.86, 6, 6, 0, "Undercity Zeppelin"); + player->SEND_POI(2059, 274.86, 7, 6, 0, "Undercity Zeppelin"); player->SEND_GOSSIP_MENU(3520,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Weapon Master - player->SEND_POI(1670.31, 324.66, 6, 6, 0, "Archibald"); + player->SEND_POI(1670.31, 324.66, 7, 6, 0, "Archibald"); player->SEND_GOSSIP_MENU(4521,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Stable master - player->SEND_POI(1634.18, 226.76, 6, 6, 0, "Anya Maulray"); + player->SEND_POI(1634.18, 226.76, 7, 6, 0, "Anya Maulray"); player->SEND_GOSSIP_MENU(5979,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Battlemaster @@ -3806,15 +3806,15 @@ void SendBattleMasterMenu_guard_undercity(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //AV - player->SEND_POI(1329, 333.92, 6, 6, 0, "Grizzle Halfmane"); + player->SEND_POI(1329, 333.92, 7, 6, 0, "Grizzle Halfmane"); player->SEND_GOSSIP_MENU(7525,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //AB - player->SEND_POI(1283.3, 287.16, 6, 6, 0, "Sir Malory Wheeler"); + player->SEND_POI(1283.3, 287.16, 7, 6, 0, "Sir Malory Wheeler"); player->SEND_GOSSIP_MENU(7646,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //WSG - player->SEND_POI(1265, 351.18, 6, 6, 0, "Kurden Bloodclaw"); + player->SEND_POI(1265, 351.18, 7, 6, 0, "Kurden Bloodclaw"); player->SEND_GOSSIP_MENU(7526,_Creature->GetGUID()); break; } @@ -3825,23 +3825,23 @@ void SendClassTrainerMenu_guard_undercity(Player *player, Creature *_Creature, u switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Mage - player->SEND_POI(1781, 53, 6, 6, 0, "Undercity Mage Trainers"); + player->SEND_POI(1781, 53, 7, 6, 0, "Undercity Mage Trainers"); player->SEND_GOSSIP_MENU(3513,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Priest - player->SEND_POI(1758.33, 401.5, 6, 6, 0, "Undercity Priest Trainers"); + player->SEND_POI(1758.33, 401.5, 7, 6, 0, "Undercity Priest Trainers"); player->SEND_GOSSIP_MENU(3521,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Rogue - player->SEND_POI(1418.56, 65, 6, 6, 0, "Undercity Rogue Trainers"); + player->SEND_POI(1418.56, 65, 7, 6, 0, "Undercity Rogue Trainers"); player->SEND_GOSSIP_MENU(3524,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Warlock - player->SEND_POI(1780.92, 53.16, 6, 6, 0, "Undercity Warlock Trainers"); + player->SEND_POI(1780.92, 53.16, 7, 6, 0, "Undercity Warlock Trainers"); player->SEND_GOSSIP_MENU(3526,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Warrior - player->SEND_POI(1775.59, 418.19, 6, 6, 0, "Undercity Warrior Trainers"); + player->SEND_POI(1775.59, 418.19, 7, 6, 0, "Undercity Warrior Trainers"); player->SEND_GOSSIP_MENU(3527,_Creature->GetGUID()); break; } @@ -3852,51 +3852,51 @@ void SendProfTrainerMenu_guard_undercity(Player *player, Creature *_Creature, ui switch (action) { case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy - player->SEND_POI(1419.82, 417.19, 6, 6, 0, "The Apothecarium"); + player->SEND_POI(1419.82, 417.19, 7, 6, 0, "The Apothecarium"); player->SEND_GOSSIP_MENU(3528,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing - player->SEND_POI(1696, 285, 6, 6, 0, "Undercity Blacksmithing Trainer"); + player->SEND_POI(1696, 285, 7, 6, 0, "Undercity Blacksmithing Trainer"); player->SEND_GOSSIP_MENU(3529,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: //Cooking - player->SEND_POI(1596.34, 274.68, 6, 6, 0, "Undercity Cooking Trainer"); + player->SEND_POI(1596.34, 274.68, 7, 6, 0, "Undercity Cooking Trainer"); player->SEND_GOSSIP_MENU(3530,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting - player->SEND_POI(1488.54, 280.19, 6, 6, 0, "Undercity Enchanting Trainer"); + player->SEND_POI(1488.54, 280.19, 7, 6, 0, "Undercity Enchanting Trainer"); player->SEND_GOSSIP_MENU(3531,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: //Engineering - player->SEND_POI(1408.58, 143.43, 6, 6, 0, "Undercity Engineering Trainer"); + player->SEND_POI(1408.58, 143.43, 7, 6, 0, "Undercity Engineering Trainer"); player->SEND_GOSSIP_MENU(3532,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: //First Aid - player->SEND_POI(1519.65, 167.19, 6, 6, 0, "Undercity First Aid Trainer"); + player->SEND_POI(1519.65, 167.19, 7, 6, 0, "Undercity First Aid Trainer"); player->SEND_GOSSIP_MENU(3533,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: //Fishing - player->SEND_POI(1679.9, 89, 6, 6, 0, "Undercity Fishing Trainer"); + player->SEND_POI(1679.9, 89, 7, 6, 0, "Undercity Fishing Trainer"); player->SEND_GOSSIP_MENU(3534,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism - player->SEND_POI(1558, 349.36, 6, 6, 0, "Undercity Herbalism Trainer"); + player->SEND_POI(1558, 349.36, 7, 6, 0, "Undercity Herbalism Trainer"); player->SEND_GOSSIP_MENU(3535,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking - player->SEND_POI(1498.76, 196.43, 6, 6, 0, "Undercity Leatherworking Trainer"); + player->SEND_POI(1498.76, 196.43, 7, 6, 0, "Undercity Leatherworking Trainer"); player->SEND_GOSSIP_MENU(3536,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 10: //Mining - player->SEND_POI(1642.88, 335.58, 6, 6, 0, "Undercity Mining Trainer"); + player->SEND_POI(1642.88, 335.58, 7, 6, 0, "Undercity Mining Trainer"); player->SEND_GOSSIP_MENU(3537,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: //Skinning - player->SEND_POI(1498.6, 196.46, 6, 6, 0, "Undercity Skinning Trainer"); + player->SEND_POI(1498.6, 196.46, 7, 6, 0, "Undercity Skinning Trainer"); player->SEND_GOSSIP_MENU(3538,_Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring - player->SEND_POI(1689.55, 193, 6, 6, 0, "Undercity Tailoring Trainer"); + player->SEND_POI(1689.55, 193, 7, 6, 0, "Undercity Tailoring Trainer"); player->SEND_GOSSIP_MENU(3539,_Creature->GetGUID()); break; } diff --git a/src/bindings/scripts/scripts/item/item_scripts.cpp b/src/bindings/scripts/scripts/item/item_scripts.cpp index a2e02069e15..0d09d7a67ed 100644 --- a/src/bindings/scripts/scripts/item/item_scripts.cpp +++ b/src/bindings/scripts/scripts/item/item_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -223,7 +223,7 @@ bool ItemUse_item_flying_machine(Player *player, Item* _Item, SpellCastTargets c bool ItemUse_item_gor_dreks_ointment(Player *player, Item* _Item, SpellCastTargets const& targets) { if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT && - targets.getUnitTarget()->GetEntry() == 20748 && !targets.getUnitTarget()->HasAura(32578,0) ) + targets.getUnitTarget()->GetEntry() == 20748 && !targets.getUnitTarget()->HasAura(32578) ) return false; player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL); diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp index 9699505f293..34179378b06 100644 --- a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp +++ b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -13,6 +13,7 @@ EndScriptData */ #include "npc_escortAI.h" #define WP_LAST_POINT -1 +extern std::list<PointMovement> PointMovementList; bool npc_escortAI::IsVisible(Unit* who) const { @@ -271,6 +272,20 @@ void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 Wait WaypointList.push_back(t); } +void npc_escortAI::FillPointMovementListForCreature() +{ + std::list<PointMovement>::iterator itr; + + for (itr = PointMovementList.begin(); itr != PointMovementList.end(); ++itr) + { + if (itr->m_uiCreatureEntry == m_creature->GetEntry()) + { + Escort_Waypoint pPoint(itr->m_uiPointId,itr->m_fX,itr->m_fY,itr->m_fZ,itr->m_uiWaitTime); + WaypointList.push_back(pPoint); + } + } +} + void npc_escortAI::Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID) { if (InCombat) diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.h b/src/bindings/scripts/scripts/npc/npc_escortAI.h index a2ec7fc50ed..f396a168960 100644 --- a/src/bindings/scripts/scripts/npc/npc_escortAI.h +++ b/src/bindings/scripts/scripts/npc/npc_escortAI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -58,6 +58,8 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI // EscortAI functions void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0); + void FillPointMovementListForCreature(); + void Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID = 0); void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; } diff --git a/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp b/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp index f96011266b9..ccd2b69f8bf 100644 --- a/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp +++ b/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -52,7 +52,7 @@ bool GossipHello_npc_innkeeper(Player *player, Creature *_Creature) if (_Creature->isQuestGiver()) player->PrepareQuestMenu( _Creature->GetGUID() ); - if (isEventActive()&& !player->GetAura(SPELL_TRICK_OR_TREATED,0)) + if (isEventActive()&& !player->GetAura(SPELL_TRICK_OR_TREATED, player->GetGUID())) { char* localizedEntry; switch (player->GetSession()->GetSessionDbLocaleIndex()) @@ -83,7 +83,7 @@ bool GossipHello_npc_innkeeper(Player *player, Creature *_Creature) bool GossipSelect_npc_innkeeper(Player *player, Creature *_Creature, uint32 sender, uint32 action ) { - if (action == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !player->GetAura(SPELL_TRICK_OR_TREATED,0)) + if (action == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !player->GetAura(SPELL_TRICK_OR_TREATED, player->GetGUID())) { player->CLOSE_GOSSIP_MENU(); player->CastSpell(player, SPELL_TRICK_OR_TREATED, true); diff --git a/src/bindings/scripts/scripts/npc/npc_professions.cpp b/src/bindings/scripts/scripts/npc/npc_professions.cpp index a13dc927603..e121e598528 100644 --- a/src/bindings/scripts/scripts/npc/npc_professions.cpp +++ b/src/bindings/scripts/scripts/npc/npc_professions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -634,8 +634,6 @@ void SendActionMenu_npc_prof_blacksmith(Player *player, Creature *_Creature, uin { //unknown textID (TALK_MUST_UNLEARN_WEAPON) player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); - //Temporary, not offilike - _Creature->MonsterSay(TALK_MUST_UNLEARN_WEAPON,0,player->GetGUID()); } else if( EquippedOk(player,S_UNLEARN_WEAPON) ) { diff --git a/src/bindings/scripts/scripts/npc/npcs_special.cpp b/src/bindings/scripts/scripts/npc/npcs_special.cpp index 49532e89eaf..a9f20422223 100644 --- a/src/bindings/scripts/scripts/npc/npcs_special.cpp +++ b/src/bindings/scripts/scripts/npc/npcs_special.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ /* ScriptData SDName: Npcs_Special SD%Complete: 100 -SDComment: To be used for special NPCs that are located globally. Support for quest 3861 (Cluck!), 6622 and 6624 (Triage) +SDComment: To be used for special NPCs that are located globally. SDCategory: NPCs EndScriptData */ @@ -26,6 +26,7 @@ EndScriptData 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, 565 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_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy @@ -40,10 +41,11 @@ EndContentData */ # npc_chicken_cluck #########*/ +#define EMOTE_A_HELLO -1070004 +#define EMOTE_H_HELLO -1070005 +#define EMOTE_CLUCK_TEXT2 -1070006 + #define QUEST_CLUCK 3861 -#define EMOTE_A_HELLO "looks up at you quizzically. Maybe you should inspect it?" -#define EMOTE_H_HELLO "looks at you unexpectadly." -#define CLUCK_TEXT2 "starts pecking at the feed." #define FACTION_FRIENDLY 84 #define FACTION_CHICKEN 31 @@ -95,18 +97,17 @@ bool ReceiveEmote_npc_chicken_cluck( Player *player, Creature *_Creature, uint32 { _Creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); _Creature->setFaction(FACTION_FRIENDLY); - _Creature->MonsterTextEmote(EMOTE_A_HELLO, 0); + DoScriptText(EMOTE_A_HELLO, _Creature); } } - } else - _Creature->MonsterTextEmote(EMOTE_H_HELLO,0); + } else DoScriptText(EMOTE_H_HELLO,_Creature); } if( emote == TEXTEMOTE_CHEER && player->GetTeam() == ALLIANCE ) if( player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE ) { _Creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); _Creature->setFaction(FACTION_FRIENDLY); - _Creature->MonsterTextEmote(CLUCK_TEXT2, 0); + DoScriptText(EMOTE_CLUCK_TEXT2, _Creature); } return true; @@ -198,7 +199,7 @@ bool ReceiveEmote_npc_dancing_flames( Player *player, Creature *flame, uint32 em case TEXTEMOTE_JOKE: flame->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break; case TEXTEMOTE_DANCE: { - if (!player->HasAura(SPELL_SEDUCTION,0)) + if (!player->HasAura(SPELL_SEDUCTION)) flame->CastSpell(player,SPELL_SEDUCTION,true); } break; @@ -211,75 +212,46 @@ bool ReceiveEmote_npc_dancing_flames( Player *player, Creature *flame, uint32 em ## Triage quest ######*/ -#define SAY_DOC1 "I'm saved! Thank you, doctor!" -#define SAY_DOC2 "HOORAY! I AM SAVED!" -#define SAY_DOC3 "Sweet, sweet embrace... take me..." +#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; }; -#define DOCTOR_ALLIANCE 12939 - static Location AllianceCoords[]= { - { // Top-far-right bunk as seen from entrance - -3757.38, -4533.05, 14.16, 3.62 - }, - { // Top-far-left bunk - -3754.36, -4539.13, 14.16, 5.13 - }, - { // Far-right bunk - -3749.54, -4540.25, 14.28, 3.34 - }, - { // Right bunk near entrance - -3742.10, -4536.85, 14.28, 3.64 - }, - { // Far-left bunk - -3755.89, -4529.07, 14.05, 0.57 - }, - { // Mid-left bunk - -3749.51, -4527.08, 14.07, 5.26 - }, - { // Left bunk near entrance - -3746.37, -4525.35, 14.16, 5.22 - }, + {-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 }; -#define ALLIANCE_COORDS 7 - //alliance run to where #define A_RUNTOX -3742.96 #define A_RUNTOY -4531.52 #define A_RUNTOZ 11.91 -#define DOCTOR_HORDE 12920 - static Location HordeCoords[]= { - { // Left, Behind - -1013.75, -3492.59, 62.62, 4.34 - }, - { // Right, Behind - -1017.72, -3490.92, 62.62, 4.34 - }, - { // Left, Mid - -1015.77, -3497.15, 62.82, 4.34 - }, - { // Right, Mid - -1019.51, -3495.49, 62.82, 4.34 - }, - { // Left, front - -1017.25, -3500.85, 62.98, 4.34 - }, - { // Right, Front - -1020.95, -3499.21, 62.98, 4.34 - } + {-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 }; -#define HORDE_COORDS 6 - //horde run to where #define H_RUNTOX -1016.44 #define H_RUNTOY -3508.48 @@ -305,6 +277,8 @@ const uint32 HordeSoldierId[3] = struct TRINITY_DLL_DECL npc_doctorAI : public ScriptedAI { + npc_doctorAI(Creature *c) : ScriptedAI(c) {} + uint64 Playerguid; uint32 SummonPatient_Timer; @@ -317,9 +291,17 @@ struct TRINITY_DLL_DECL npc_doctorAI : public ScriptedAI std::list<uint64> Patients; std::vector<Location*> Coordinates; - npc_doctorAI(Creature *c) : ScriptedAI(c) {} + void Reset() + { + Playerguid = 0; + + SummonPatient_Timer = 10000; + SummonPatientCount = 0; + PatientDiedCount = 0; + PatientSavedCount = 0; - void Reset(){} + Event = false; + } void BeginEvent(Player* player); void PatientDied(Location* Point); @@ -338,20 +320,21 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI npc_injured_patientAI(Creature *c) : ScriptedAI(c) {} uint64 Doctorguid; - Location* Coord; void Reset() { Doctorguid = 0; - Coord = NULL; - //no select + + //no select m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //no regen health + + //no regen health m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); - //to make them lay with face down - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_DEAD); + + //to make them lay with face down + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD); uint32 mobId = m_creature->GetEntry(); @@ -378,25 +361,34 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI { 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((((Player*)caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (((Player*)caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) { - if(Doctorguid) + if (Doctorguid) { - Creature* Doctor = ((Creature*)Unit::GetUnit((*m_creature), Doctorguid)); - if(Doctor) + if (Creature* Doctor = ((Creature*)Unit::GetUnit((*m_creature), Doctorguid))) ((npc_doctorAI*)Doctor->AI())->PatientSaved(m_creature, ((Player*)caster), Coord); } } - //make not selectable + + //make not selectable m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //regen health + + //regen health m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); - //stand up - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE); - DoSay(SAY_DOC1,LANG_UNIVERSAL,NULL); + + //stand up + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND); + + switch(rand()%3) + { + case 0: DoScriptText(SAY_DOC1,m_creature); break; + case 1: DoScriptText(SAY_DOC2,m_creature); break; + case 2: DoScriptText(SAY_DOC3,m_creature); break; + } uint32 mobId = m_creature->GetEntry(); m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + switch (mobId) { case 12923: @@ -416,8 +408,9 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI 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) - { //lower HP on every world tick makes it a useful counter, not officlone though + { m_creature->SetHealth(uint32(m_creature->GetHealth()-5) ); } @@ -428,10 +421,9 @@ struct TRINITY_DLL_DECL npc_injured_patientAI : public ScriptedAI m_creature->setDeathState(JUST_DIED); m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, 32); - if(Doctorguid) + if (Doctorguid) { - Creature* Doctor = ((Creature*)Unit::GetUnit((*m_creature), Doctorguid)); - if(Doctor) + if (Creature* Doctor = ((Creature*)Unit::GetUnit((*m_creature), Doctorguid))) ((npc_doctorAI*)Doctor->AI())->PatientDied(Coord); } } @@ -462,7 +454,6 @@ void npc_doctorAI::BeginEvent(Player* player) 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]); @@ -470,7 +461,6 @@ void npc_doctorAI::BeginEvent(Player* player) } Event = true; - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -489,6 +479,7 @@ void npc_doctorAI::PatientDied(Location* Point) Event = false; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Reset(); } Coordinates.push_back(Point); @@ -497,31 +488,31 @@ void npc_doctorAI::PatientDied(Location* Point) void npc_doctorAI::PatientSaved(Creature* soldier, Player* player, Location* Point) { - if(player && Playerguid == player->GetGUID()) + if (player && Playerguid == player->GetGUID()) { - if((player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) + if ((player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) { PatientSavedCount++; - if(PatientSavedCount == 15) + if (PatientSavedCount == 15) { - if(!Patients.empty()) + if (!Patients.empty()) { std::list<uint64>::iterator itr; for(itr = Patients.begin(); itr != Patients.end(); ++itr) { - Creature* Patient = ((Creature*)Unit::GetUnit((*m_creature), *itr)); - if( Patient ) + if (Creature* Patient = ((Creature*)Unit::GetUnit((*m_creature), *itr))) Patient->setDeathState(JUST_DIED); } } - if(player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) + if (player->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) player->AreaExploredOrEventHappens(6624); - else if(player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE) + else if (player->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE) player->AreaExploredOrEventHappens(6622); Event = false; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Reset(); } Coordinates.push_back(Point); @@ -531,53 +522,61 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* player, Location* Poi void npc_doctorAI::UpdateAI(const uint32 diff) { - if(Event && SummonPatientCount >= 20) + if (Event && SummonPatientCount >= 20) { Event = false; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Reset(); } - if(Event) - if(SummonPatient_Timer < diff) + if (Event) { - Creature* Patient = NULL; - Location* Point = NULL; + if (SummonPatient_Timer < diff) + { + Creature* Patient = NULL; + Location* Point = NULL; - if(Coordinates.empty()) - return; + if (Coordinates.empty()) + return; - std::vector<Location*>::iterator itr = Coordinates.begin()+rand()%Coordinates.size(); - uint32 patientEntry = 0; + std::vector<Location*>::iterator itr = Coordinates.begin()+rand()%Coordinates.size(); + uint32 patientEntry = 0; - switch(m_creature->GetEntry()) - { - case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[rand()%3]; break; - case DOCTOR_HORDE: patientEntry = HordeSoldierId[rand()%3]; break; - default: - error_log("SD2: Invalid entry for Triage doctor. Please check your database"); - return; - } + switch(m_creature->GetEntry()) + { + case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[rand()%3]; break; + case DOCTOR_HORDE: patientEntry = HordeSoldierId[rand()%3]; break; + default: + error_log("SD2: Invalid entry for Triage doctor. Please check your database"); + return; + } - Point = *itr; + Point = *itr; - Patient = m_creature->SummonCreature(patientEntry, Point->x, Point->y, Point->z, Point->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + Patient = m_creature->SummonCreature(patientEntry, Point->x, Point->y, Point->z, Point->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - if(Patient) - { - 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; + 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 *player, Creature *creature, Quest const *quest ) { - if((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622)) + if ((quest->GetQuestId() == 6624) || (quest->GetQuestId() == 6622)) ((npc_doctorAI*)creature->AI())->BeginEvent(player); return true; @@ -589,11 +588,262 @@ CreatureAI* GetAI_npc_doctor(Creature *_Creature) } /*###### +## 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 = -1000164, + SAY_DG_KEL_THANKS = -1000165, + SAY_DG_KEL_GOODBYE = -1000166, + SAY_ROBERTS_THANKS = -1000167, + SAY_ROBERTS_GOODBYE = -1000168, + SAY_KORJA_THANKS = -1000169, + SAY_KORJA_GOODBYE = -1000170, + SAY_DOLF_THANKS = -1000171, + SAY_DOLF_GOODBYE = -1000172, + SAY_SHAYA_THANKS = -1000173, + SAY_SHAYA_GOODBYE = -1000174, +}; + +float fRunTo[5][3]= +{ + {9661.724, 869.803, 1270.742}, //shaya + {-9543.747, -117.770, 57.893}, //roberts + {-5650.226, -473.517, 397.027}, //dolf + {189.175, -4747.069, 11.215}, //kor'ja + {2471.303, 371.101, 30.919}, //kel +}; + +struct TRINITY_DLL_DECL npc_garments_of_questsAI : public ScriptedAI +{ + npc_garments_of_questsAI(Creature *c) : ScriptedAI(c) {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)); + m_creature->SetVisibility(VISIBILITY_ON); + } + + void Aggro(Unit *who) {} + + void SpellHit(Unit* pCaster, const SpellEntry *Spell) + { + if (Spell->Id == SPELL_LESSER_HEAL_R2 || Spell->Id == SPELL_FORTITUDE_R1) + { + //not while in combat + if (InCombat) + 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 MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) + return; + + //we reached destination, kill ourselves + if (id == 0) + { + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + m_creature->CombatStop(); + m_creature->DeleteThreatList(); + m_creature->RemoveCorpse(); + } + } + + void UpdateAI(const uint32 diff) + { + if (bCanRun && !InCombat) + { + 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); + m_creature->GetMotionMaster()->MovePoint(0, fRunTo[0][0], fRunTo[0][1], fRunTo[0][2]); + break; + case ENTRY_ROBERTS: + DoScriptText(SAY_ROBERTS_GOODBYE,m_creature,pUnit); + m_creature->GetMotionMaster()->MovePoint(0, fRunTo[1][0], fRunTo[1][1], fRunTo[1][2]); + break; + case ENTRY_DOLF: + DoScriptText(SAY_DOLF_GOODBYE,m_creature,pUnit); + m_creature->GetMotionMaster()->MovePoint(0, fRunTo[2][0], fRunTo[2][1], fRunTo[2][2]); + break; + case ENTRY_KORJA: + DoScriptText(SAY_KORJA_GOODBYE,m_creature,pUnit); + m_creature->GetMotionMaster()->MovePoint(0, fRunTo[3][0], fRunTo[3][1], fRunTo[3][2]); + break; + case ENTRY_DG_KEL: + DoScriptText(SAY_DG_KEL_GOODBYE,m_creature,pUnit); + m_creature->GetMotionMaster()->MovePoint(0, fRunTo[4][0], fRunTo[4][1], fRunTo[4][2]); + break; + } + } + else + EnterEvadeMode(); //something went wrong + + RunAwayTimer = 30000; + }else RunAwayTimer -= diff; + } + + //Return since we have no target + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_garments_of_quests(Creature* pCreature) +{ + return new npc_garments_of_questsAI(pCreature); +} + +/*###### ## npc_guardian ######*/ #define SPELL_DEATHTOUCH 5 -#define SAY_AGGRO "This area is closed!" struct TRINITY_DLL_DECL npc_guardianAI : public ScriptedAI { @@ -606,7 +856,6 @@ struct TRINITY_DLL_DECL npc_guardianAI : public ScriptedAI void Aggro(Unit *who) { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); } void UpdateAI(const uint32 diff) @@ -964,7 +1213,7 @@ CreatureAI* GetAI_npc_tonk_mine(Creature *_Creature) bool ReceiveEmote_npc_winter_reveler( Player *player, Creature *_Creature, uint32 emote ) { //TODO: check auralist. - if(player->HasAura(26218, 0)) + if(player->HasAura(26218)) return false; if( emote == TEXTEMOTE_KISS ) @@ -1159,6 +1408,11 @@ void AddSC_npcs_special() 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(); diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_amanitar.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_amanitar.cpp new file mode 100644 index 00000000000..14480a8b725 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_amanitar.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_amanitar +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_elder_nadox.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_elder_nadox.cpp new file mode 100644 index 00000000000..6ae0e551b6f --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_elder_nadox.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_elder_nadox +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_BROOD_PLAGUE 56130 +#define H_SPELL_BROOD_PLAGUE 59467 +#define SPELL_BROOD_RAGE 59465 + +#define MOB_AHNKAHAR_SWARMER 30178 +#define SPELL_SUMMON_SWARMERS 56119//2x 30178 + +#define MOB_AHNKAHAR_SWARMER 30178 +#define SPELL_SUMMON_SWARM_GUARD 56120//1x 30176 +#define SPELL_DEADLY_POISON 56145// Proc trigger +#define H_SPELL_DEADLY_POISON 59479// Proc trigger +#define SPELL_GUARDIAN_AURA 56151 diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_herald_volazj.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_herald_volazj.cpp new file mode 100644 index 00000000000..389e828c881 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_herald_volazj.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_herald_volazj +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_jedoga_shadowseeker.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_jedoga_shadowseeker.cpp new file mode 100644 index 00000000000..efcd811641f --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_jedoga_shadowseeker.cpp @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_jedoga_shadowseeker +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_CYCLONE_STRIKE 56855 +#define H_SPELL_CYCLONE_STRIKE 60030//kein unterschied zu 56855 außer das 60030 1,5sec cast ist +#define SPELL_LIGHTNING_BOLT 56891 +#define H_SPELL_LIGHTNING_BOLT 60032 +#define SPELL_THUNDERSHOCK 56926//AOE works +#define H_SPELL_THUNDERSHOCK 60029//AOE works + +#define SPELL_GIFT_OF_THE_HERALD 56219//triggert if sucessfull sacreficed diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_prince_taldaram.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_prince_taldaram.cpp new file mode 100644 index 00000000000..c03fe85a7f1 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/boss_prince_taldaram.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_prince_taldaram +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_BLOODTHIRST 55968 //Trigger Spell + add aura +#define SPELL_CONJURE_FLAME_SPHERE 55931 + +#define SPELL_FLAME_SPHERE_SUMMON_1 55895// 1x 30106 +#define H_SPELL_FLAME_SPHERE_SUMMON_1 59511// 1x 31686 +#define H_SPELL_FLAME_SPHERE_SUMMON_2 59512// 1x 31687 +#define SPELL_FLAME_SPHERE_SPAWN_EFFEKT 55891 +#define SPELL_FLAME_SPHERE_VISUAL 55928 +#define SPELL_FLAME_SPHERE_PERIODIC 55926 +#define H_SPELL_FLAME_SPHERE_PERIODIC 59508 +#define SPELL_FLAME_SPHERE_DEATH_EFFEKT 55947 + +#define SPELL_EMBRACE_OF_THE_VAMPYR 55959 +#define H_SPELL_EMBRACE_OF_THE_VAMPYR 59513 + +#define SPELL_VANISH 55964 diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/def_ahnkahet.h b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/def_ahnkahet.h new file mode 100644 index 00000000000..97c0db55d72 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/def_ahnkahet.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DEF_AHNKAHET_H +#define DEF_AHNKAHET_H + +#define DATA_ELDER_NADOX 1 +#define DATA_PRINCE_TALDARAM 2 +#define DATA_JEDOGA_SHADOWSEEKER 3 +#define DATA_HERALD_VOLAZJ 4 +#define DATA_AMANITAR 5 + +#define DATA_ELDER_NADOX_EVENT 6 +#define DATA_PRINCE_TALDARAM_EVENT 7 +#define DATA_JEDOGA_SHADOWSEEKER_EVENT 8 +#define DATA_HERALD_VOLAZJ_EVENT 9 +#define DATA_AMANITAR_EVENT 10 +#endif diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/instance_ahnkahet.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/instance_ahnkahet.cpp new file mode 100644 index 00000000000..544d504c5ae --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Ahn'kahet/instance_ahnkahet.cpp @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Azjol_Nerub +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define ENCOUNTERS 5 + +/* Ahn'kahet encounters: +0 - Elder Nadox +1 - Prince Taldaram +2 - Jedoga Shadowseeker +3 - Herald Volazj +4 - Amanitar (Heroic only) +*/ + +struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance +{ + instance_ahnkahet(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint64 Elder_Nadox; + uint64 Prince_Taldaram; + uint64 Jedoga_Shadowseeker; + uint64 Herald_Volazj; + uint64 Amanitar; + + uint32 Encounters[ENCOUNTERS]; + + void Initialize() + { + Elder_Nadox =0; + Prince_Taldaram =0; + Jedoga_Shadowseeker =0; + Herald_Volazj =0; + Amanitar =0; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + Encounters[i] = NOT_STARTED; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if(Encounters[i] == IN_PROGRESS) return true; + + return false; + } + + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature_entry) + { + case 29309: Elder_Nadox = creature->GetGUID(); break; + case 29308: Prince_Taldaram = creature->GetGUID(); break; + case 29310: Jedoga_Shadowseeker = creature->GetGUID(); break; + case 29311: Herald_Volazj = creature->GetGUID(); break; + case 30258: Amanitar = creature->GetGUID(); break; + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_ELDER_NADOX: return Elder_Nadox; + case DATA_PRINCE_TALDARAM: return Prince_Taldaram; + case DATA_JEDOGA_SHADOWSEEKER: return Jedoga_Shadowseeker; + case DATA_HERALD_VOLAZJ: return Herald_Volazj; + case DATA_AMANITAR: return Amanitar; + } + return 0; + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_ELDER_NADOX_EVENT: + Encounters[0] = data;break; + case DATA_PRINCE_TALDARAM_EVENT: + Encounters[1] = data; break; + case DATA_JEDOGA_SHADOWSEEKER_EVENT: + Encounters[2] = data; break; + case DATA_HERALD_VOLAZJ: + Encounters[3] = data; break; + case DATA_AMANITAR: + Encounters[4] = data; break; + } + + if (data == DONE) + { + SaveToDB(); + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_ELDER_NADOX_EVENT: return Encounters[0]; + case DATA_PRINCE_TALDARAM_EVENT: return Encounters[1]; + case DATA_JEDOGA_SHADOWSEEKER_EVENT: return Encounters[2]; + case DATA_HERALD_VOLAZJ: return Encounters[3]; + case DATA_AMANITAR: return Encounters[4]; + } + return 0; + } + + const char* Save() + { + OUT_SAVE_INST_DATA; + + std::string str_data; + + std::ostringstream saveStream; + saveStream << "A K " << Encounters[0] << " " << Encounters[1] << " " + << Encounters[2] << Encounters[3] << Encounters[4]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0,data1,data2,data3,data4; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4; + + if( dataHead1 == 'A' && dataHead2 == 'K') + { + Encounters[0] = data0; + Encounters[1] = data1; + Encounters[2] = data2; + Encounters[3] = data3; + Encounters[4] = data4; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounters[i] == IN_PROGRESS) + Encounters[i] = NOT_STARTED; + + }else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_ahnkahet(Map* map) +{ + return new instance_ahnkahet(map); +} + +void AddSC_instance_ahnkahet() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_ahnkahet"; + newscript->GetInstanceData = &GetInstanceData_instance_ahnkahet; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_anubarak.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_anubarak.cpp new file mode 100644 index 00000000000..f9922581733 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_anubarak.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_anubarak +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_hadronox.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_hadronox.cpp new file mode 100644 index 00000000000..72bcb708429 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_hadronox.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_hadronox +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define SPELL_WEB_FRONT_DOORS 53177//dummy + +#define SPELL_ACID_CLOUD 53400 +#define H_SPELL_ACID_CLOUD 59419 +#define SPELL_LEECH_POISON 53030 +#define H_SPELL_LEECH_POISON 59417 +#define SPELL_LEECH_POISON_DEADTRIGGER 53800//heal 10% heroic und normal +#define SPELL_PIECE_ARMOR 53418 +#define SPELL_WEB_GRAB 53406 +#define H_SPELL_WEB_GRAB 59420
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_krikthir_the_gatewatcher.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_krikthir_the_gatewatcher.cpp new file mode 100644 index 00000000000..27f4d3070fc --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/boss_krikthir_the_gatewatcher.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_krikthir_the_gatewatcher +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define SPELL_MIND_FLAY 52586 +#define H_SPELL_MIND_FLAY 59367 +#define SPELL_CURSE_OF_FATIGUE 52592 +#define H_SPELL_CURSE_OF_FATIGUE 59368 +#define SPELL_FRENZY 28747 + +#define MOB_SKITTERING_SWARMER 28735 +#define MOB_SKITTERING_SWARMER_CONTROLLER 32593 +#define SPELL_SUMMON_SKITTERING_SWARMER 52438//AOE Effekt 140 +#define SPELL_SUMMON_SKITTERING_SWARMER 52439//Summon 3x 28735
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/def_azjol_nerub.h b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/def_azjol_nerub.h new file mode 100644 index 00000000000..9e319e8fde0 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/def_azjol_nerub.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DEF_AZJOL_NERUB_H +#define DEF_AZJOL_NERUB_H + +#define DATA_KRIKTHIR_THE_GATEWATCHER 1 +#define DATA_HADRONOX 2 +#define DATA_ANUBARAK 3 + +#define DATA_KRIKTHIR_THE_GATEWATCHER_EVENT 4 +#define DATA_HADRONOX_EVENT 5 +#define DATA_ANUBARAK_EVENT 6 +#endif diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/instance_azjol_nerub.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/instance_azjol_nerub.cpp new file mode 100644 index 00000000000..bd3fccd98d9 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/Azjol-Nerub/Azjol-Nerub/instance_azjol_nerub.cpp @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Azjol_Nerub +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define ENCOUNTERS 3 + +/* Azjol Nerub encounters: +0 - Krik'thir the Gatewatcher +1 - Hadronox +2 - Anub'arak +*/ + +struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance +{ + instance_azjol_nerub(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint64 Krikthir; + uint64 Hadronox; + uint64 Anubarak; + + uint32 Encounters[ENCOUNTERS]; + + void Initialize() + { + Krikthir = 0; + Hadronox = 0; + Anubarak =0; + + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + Encounters[i] = NOT_STARTED; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if(Encounters[i] == IN_PROGRESS) return true; + + return false; + } + + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature_entry) + { + case 28684: Krikthir = creature->GetGUID(); break; + case 28921: Hadronox = creature->GetGUID(); break; + case 29120: Anubarak = creature->GetGUID(); break; + + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_KRIKTHIR_THE_GATEWATCHER: return Krikthir; + case DATA_HADRONOX: return Hadronox; + case DATA_ANUBARAK: return Anubarak; + } + + return 0; + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: + Encounters[0] = data;break; + case DATA_HADRONOX_EVENT: + Encounters[1] = data; break; + case DATA_ANUBARAK_EVENT: + Encounters[2] = data; break; + } + + if (data == DONE) + { + SaveToDB(); + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: return Encounters[0]; + case DATA_HADRONOX_EVENT: return Encounters[1]; + case DATA_ANUBARAK_EVENT: return Encounters[2]; + } + + return 0; + } + + const char* Save() + { + OUT_SAVE_INST_DATA; + + std::string str_data; + + std::ostringstream saveStream; + saveStream << "A N " << Encounters[0] << " " << Encounters[1] << " " + << Encounters[2]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0,data1,data2; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2; + + if( dataHead1 == 'A' && dataHead2 == 'N') + { + Encounters[0] = data0; + Encounters[1] = data1; + Encounters[2] = data2; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounters[i] == IN_PROGRESS) + Encounters[i] = NOT_STARTED; + + }else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_azjol_nerub(Map* map) +{ + return new instance_azjol_nerub(map); +} + +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/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp b/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp index 72dda8dd835..13f8bdd3fbf 100644 --- a/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp +++ b/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp index fdd63163289..48232d8e9fe 100644 --- a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp +++ b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp index b975d297fbf..42d219aabcb 100644 --- a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp +++ b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -108,6 +108,9 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI void JustDied(Unit* killer) { + if (killer->GetEntry() == m_creature->GetEntry()) + return; + if (PlayerGUID && !Completed) { if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID)) diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index e469dc6f618..986413cdf0f 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -299,7 +299,7 @@ CreatureAI* GetAI_boss_exarch_maladaar(Creature *_Creature) } #define SPELL_AV_MORTAL_STRIKE 16856 -#define SPELL_AV_MORTAL_STRIKE 16856 +#define SPELL_AV_SUNDER_ARMOR 16145 struct TRINITY_DLL_DECL mob_avatar_of_martyredAI : public ScriptedAI { diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp index 86ae13e29c6..c7323267b2f 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_shirrak_the_dead_watcher.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 7cd8cbe367a..6b030f53d9a 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -201,7 +201,7 @@ CreatureAI* GetAI_boss_nexusprince_shaffar(Creature *_Creature) struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI { - mob_ethereal_beaconAI(Creature *c) : ScriptedAI(c) + mob_ethereal_beaconAI(Creature *c) : ScriptedAI(c), CanEvade(false) { HeroicMode = m_creature->GetMap()->IsHeroic(); CanEvade = false; diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp index d366400b97d..d3ca37b445e 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp index dbf41ed777d..758596ca55d 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp index e1d1e98206e..94257e0aa37 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -147,7 +147,7 @@ struct TRINITY_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI if (ArcaneVolley_Timer < diff) { DoCast(m_creature,HeroicMode ? H_SPELL_ARCANE_VOLLEY : SPELL_ARCANE_VOLLEY); - ArcaneVolley_Timer = 10000+rand()%5000; + ArcaneVolley_Timer = 7000+rand()%5000; }else ArcaneVolley_Timer -= diff; if (Sheep_Timer < diff) diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h index 52ba2206c21..698571faecc 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h +++ b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp index e22ac68ff02..3d53f7b29e8 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 5a9b8e8b2a3..6c64a255370 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -38,7 +38,7 @@ EndScriptData */ #define SAY_DEATH -1555007 #define SPELL_BANISH 30231 -#define SPELL_CORROSIVE_ACID 23313 +#define SPELL_CORROSIVE_ACID 33551 #define SPELL_FEAR 33547 #define SPELL_ENRAGE 0 //need to find proper spell @@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI if (pInstance->GetData(TYPE_OVERSEER) == DONE) { - if (m_creature->HasAura(SPELL_BANISH,0)) + if (m_creature->HasAura(SPELL_BANISH)) m_creature->RemoveAurasDueToSpell(SPELL_BANISH); Intro = true; } @@ -89,7 +89,7 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { - if (m_creature->HasAura(SPELL_BANISH,0)) + if (m_creature->HasAura(SPELL_BANISH)) return; ScriptedAI::MoveInLineOfSight(who); @@ -105,7 +105,7 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI { DoScriptText(SAY_INTRO, m_creature); - if (m_creature->HasAura(SPELL_BANISH,0)) + if (m_creature->HasAura(SPELL_BANISH)) m_creature->RemoveAurasDueToSpell(SPELL_BANISH); IsBanished = false; @@ -168,14 +168,14 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI if (CorrosiveAcid_Timer < diff) { - DoCast(m_creature,SPELL_CORROSIVE_ACID); - CorrosiveAcid_Timer = 25000; + DoCast(m_creature->getVictim(),SPELL_CORROSIVE_ACID); + CorrosiveAcid_Timer = 15000 + rand()%10000; }else CorrosiveAcid_Timer -= diff; if (Fear_Timer < diff) { DoCast(m_creature,SPELL_FEAR); - Fear_Timer = 35000; + Fear_Timer = 20000 + rand()%15000; }else Fear_Timer -= diff; /*if (HeroicMode) diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index 43b01ba752f..5aa71a80825 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -148,14 +148,14 @@ struct TRINITY_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(target, SPELL_CHARGE); - Charge_Timer = 25000; + Charge_Timer = 15000 + rand()%10000; }else Charge_Timer -= diff; //Knockback_Timer if (Knockback_Timer < diff) { DoCast(m_creature, SPELL_WAR_STOMP); - Knockback_Timer = 20000; + Knockback_Timer = 18000 + rand()%6000; }else Knockback_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 32aa9c3e844..c58bae35137 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -60,12 +60,6 @@ float VoidPortalCoords[5][3] = {-261.4533, -297.3298, 17.1} }; -class EmpoweringShadowsAura: public Aura -{ - public: - EmpoweringShadowsAura(SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) {} -}; - struct TRINITY_DLL_DECL mob_voidtravelerAI : public ScriptedAI { mob_voidtravelerAI(Creature *c) : ScriptedAI(c) @@ -100,7 +94,7 @@ struct TRINITY_DLL_DECL mob_voidtravelerAI : public ScriptedAI { SpellEntry *spell = (SpellEntry *)GetSpellStore()->LookupEntry(HeroicMode?H_SPELL_EMPOWERING_SHADOWS:SPELL_EMPOWERING_SHADOWS); if( spell ) - Vorpil->AddAura(new EmpoweringShadowsAura(spell, 0, NULL, Vorpil, m_creature)); + Vorpil->AddAura(new Aura(spell, 1, NULL, Vorpil, m_creature)); Vorpil->SetHealth(Vorpil->GetHealth()+Vorpil->GetMaxHealth()/25); DoCast(m_creature, SPELL_SHADOW_NOVA, true); m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); @@ -150,7 +144,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI void Reset() { - ShadowBoltVolley_Timer = 15000; + ShadowBoltVolley_Timer = 7000 + rand()%7000; DrawShadows_Timer = 45000; summonTraveler_Timer = 90000; banish_Timer = 17000; @@ -258,7 +252,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI if (ShadowBoltVolley_Timer < diff) { DoCast(m_creature,SPELL_SHADOWBOLT_VOLLEY); - ShadowBoltVolley_Timer = 15000; + ShadowBoltVolley_Timer = 15000 + rand()%15000;; }else ShadowBoltVolley_Timer -= diff; if (HeroicMode && banish_Timer < diff) @@ -277,7 +271,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI Map::PlayerList const &PlayerList = map->GetPlayers(); for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) if (Player* i_pl = i->getSource()) - if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH,0)) + if (i_pl->isAlive() && !i_pl->HasAura(SPELL_BANISH)) i_pl->TeleportTo(m_creature->GetMapId(), VorpilPosition[0],VorpilPosition[1],VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT); m_creature->Relocate(VorpilPosition[0],VorpilPosition[1],VorpilPosition[2]); @@ -286,7 +280,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI DoCast(m_creature,HeroicMode?H_SPELL_RAIN_OF_FIRE:SPELL_RAIN_OF_FIRE); ShadowBoltVolley_Timer = 6000; - DrawShadows_Timer = 30000; + DrawShadows_Timer = 3000; }else DrawShadows_Timer -= diff; if ( summonTraveler_Timer < diff) diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp index aae194de9b8..defaaa51a5d 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp @@ -52,9 +52,9 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI void Reset() { SonicBoom_Timer = 30000; - MurmursTouch_Timer = 20000; - Resonance_Timer = 10000; - MagneticPull_Timer = 20000; + MurmursTouch_Timer = 8000 + rand()%12000; + Resonance_Timer = 5000; + MagneticPull_Timer = 15000 + rand()%15000; ThunderingStorm_Timer = 15000; SonicShock_Timer = 10000; SonicBoom = false; @@ -64,6 +64,24 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if (hp) m_creature->SetHealth(hp); } + void SonicBoomEffect() + { + std::list<HostilReference *> t_list = m_creature->getThreatManager().getThreatList(); + for( std::list<HostilReference *>::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) && 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 Aggro(Unit *who) { } // Sonic Boom instant damage (needs core fix instead of this) @@ -83,12 +101,14 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if(SonicBoom) { DoCast(m_creature, SPELL_SONIC_BOOM_EFFECT, true); + SonicBoomEffect(); + SonicBoom = false; Resonance_Timer = 1500; } if (SonicBoom_Timer < diff) { - DoScriptText(EMOTE_SONIC_BOOM, m_creature); + DoScriptText(EMOTE_SONIC_BOOM, m_creature); DoCast(m_creature, SPELL_SONIC_BOOM_CAST); SonicBoom_Timer = 30000; SonicBoom = true; @@ -100,16 +120,18 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI { if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0,80,true)) DoCast(target, SPELL_MURMURS_TOUCH); - MurmursTouch_Timer = 30000; + MurmursTouch_Timer = 25000 + rand()%10000; }else MurmursTouch_Timer -= diff; // Resonance - if (Resonance_Timer < diff) + if (!SonicBoom && !(m_creature->IsWithinMeleeRange(m_creature->getVictim()))) { - if (!m_creature->IsWithinMeleeRange(SelectUnit(SELECT_TARGET_NEAREST,0,20,true))) + if (Resonance_Timer < diff) + { DoCast(m_creature, SPELL_RESONANCE); - Resonance_Timer = 5000; - }else Resonance_Timer -= diff; + Resonance_Timer = 5000; + }else Resonance_Timer -= diff; + } // Magnetic Pull if (MagneticPull_Timer < diff) @@ -118,7 +140,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI if (target->GetTypeId() == TYPEID_PLAYER && target->isAlive()) { DoCast(target, SPELL_MAGNETIC_PULL); - MagneticPull_Timer = 20000+rand()%15000; + MagneticPull_Timer = 15000+rand()%15000; return; } MagneticPull_Timer = 500; diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/def_shadow_labyrinth.h b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/def_shadow_labyrinth.h index d03c9270181..a78955368bf 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/def_shadow_labyrinth.h +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/def_shadow_labyrinth.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index c87670085a3..03605ab4eb7 100644 --- a/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case 18732: GrandmasterVorpil = creature->GetGUID(); diff --git a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp index 9efb3141500..845625a2ac0 100644 --- a/src/bindings/scripts/scripts/zone/azshara/azshara.cpp +++ b/src/bindings/scripts/scripts/zone/azshara/azshara.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp b/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp index 97e21ccbe1b..34aa388c4c7 100644 --- a/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp +++ b/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp index cdddf115210..cd5dffd164c 100644 --- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -39,155 +39,140 @@ EndContentData */ ## npc_draenei_survivor ######*/ -#define HEAL1 -1000248 -#define HEAL2 -1000249 -#define HEAL3 -1000250 -#define HEAL4 -1000251 +#define SAY_HEAL1 -1000248 +#define SAY_HEAL2 -1000249 +#define SAY_HEAL3 -1000250 +#define SAY_HEAL4 -1000251 -#define HELP1 -1000252 -#define HELP2 -1000253 -#define HELP3 -1000254 -#define HELP4 -1000255 +#define SAY_HELP1 -1000252 +#define SAY_HELP2 -1000253 +#define SAY_HELP3 -1000254 +#define SAY_HELP4 -1000255 + +#define SPELL_IRRIDATION 35046 +#define SPELL_STUNNED 28630 struct TRINITY_DLL_DECL npc_draenei_survivorAI : public ScriptedAI { npc_draenei_survivorAI(Creature *c) : ScriptedAI(c) {} - uint32 UnSpawnTimer; - uint32 ResetlifeTimer; - uint32 SayingTimer; - uint32 HealSayTimer; - bool UnSpawn; - bool say; - bool HealSay; - bool isRun; - bool isMove; + uint64 pCaster; + + uint32 SayThanksTimer; + uint32 RunAwayTimer; + uint32 SayHelpTimer; + + bool CanSayHelp; void Reset() { - UnSpawnTimer = 2500; - ResetlifeTimer= 60000; - SayingTimer = 5000; - HealSayTimer = 6000; - say = false; - isRun = false; - isMove = false; - UnSpawn = false; - HealSay = false; + pCaster = 0; + + SayThanksTimer = 0; + RunAwayTimer = 0; + SayHelpTimer = 10000; + + CanSayHelp = 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); - //cast red shining - m_creature->CastSpell(m_creature, 29152, false, NULL); - //set creature health m_creature->SetHealth(int(m_creature->GetMaxHealth()*.1)); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 3); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); } void Aggro(Unit *who) {} - void MoveInLineOfSight(Unit *who) //MoveInLineOfSight is called if creature could see you, updated all 100 ms + void MoveInLineOfSight(Unit *who) { - if (!who) - return; - - if(who->GetTypeId() == TYPEID_PLAYER && m_creature->IsFriendlyTo(who) && m_creature->IsWithinDistInMap(who, 15) && say && !isRun) + if (CanSayHelp && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsFriendlyTo(who) && m_creature->IsWithinDistInMap(who, 25.0f)) { - switch (rand()%4) //Random switch between 4 texts + //Random switch between 4 texts + switch (rand()%4) { - case 0: - DoScriptText(HELP1, m_creature); - SayingTimer = 15000; - say = false; - break; - case 1: - DoScriptText(HELP2, m_creature); - SayingTimer = 15000; - say = false; - break; - case 2: - DoScriptText(HELP3, m_creature); - SayingTimer = 15000; - say = false; - break; - case 3: - DoScriptText(HELP4, m_creature); - SayingTimer = 15000; - say = false; - break; - } - } - else - { - isRun = false; + case 0: DoScriptText(SAY_HELP1, m_creature, who); break; + case 1: DoScriptText(SAY_HELP2, m_creature, who); break; + case 2: DoScriptText(SAY_HELP3, m_creature, who); break; + case 3: DoScriptText(SAY_HELP4, m_creature, who); break; + } + + SayHelpTimer = 20000; + CanSayHelp = false; } } - void UpdateAI(const uint32 diff) //Is also called each ms for Creature AI Updates... + void SpellHit(Unit *Caster, const SpellEntry *Spell) { - if (m_creature->GetHealth() > 50) + if (Spell->SpellFamilyFlags[2] & 0x080000000) { - if(ResetlifeTimer < diff) - { - ResetlifeTimer = 60000; - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); - //set creature health - m_creature->SetHealth(int(m_creature->GetMaxHealth()*.1)); - // ley down - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,3); - } - else ResetlifeTimer -= diff; - } + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); - if(HealSay) - { - if (HealSayTimer < diff) - { - UnSpawn = true; - isRun = true; - isMove = true; - }else HealSayTimer -= diff; + m_creature->CastSpell(m_creature, SPELL_STUNNED, true); + + pCaster = Caster->GetGUID(); + + SayThanksTimer = 5000; } + } - if(UnSpawn) + void UpdateAI(const uint32 diff) + { + if (SayThanksTimer) { - if(isMove) + if (SayThanksTimer <= diff) { + m_creature->RemoveAurasDueToSpell(SPELL_IRRIDATION); + + if (Player *pPlayer = (Player*)Unit::GetUnit(*m_creature,pCaster)) + { + if (pPlayer->GetTypeId() != TYPEID_PLAYER) + return; + + switch (rand()%4) + { + 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); - isMove = false; - } - if (UnSpawnTimer < diff) - { - m_creature->StopMoving(); - EnterEvadeMode(); - //set creature health - m_creature->SetHealth(int(m_creature->GetMaxHealth()*.1)); + RunAwayTimer = 10000; + SayThanksTimer = 0; + }else SayThanksTimer -= diff; - }else UnSpawnTimer -= diff; + return; } - if(SayingTimer < diff) + if (RunAwayTimer) { - say = true; - }else SayingTimer -= diff; - } - - void SpellHit(Unit *Hitter, const SpellEntry *Spellkind)//Called if you cast a spell and do some things if Specified spell is true! - { - if (Hitter && Spellkind->Id == 28880) - { - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); - m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); - m_creature->HandleEmoteCommand(ANIM_RISE); - switch (rand()%4) //This switch doesn't work at all, creature say nothing! + if (RunAwayTimer <= diff) { - case 0: DoScriptText(HEAL1, m_creature, Hitter); break; - case 1: DoScriptText(HEAL2, m_creature, Hitter); break; - case 2: DoScriptText(HEAL3, m_creature, Hitter); break; - case 3: DoScriptText(HEAL4, m_creature, Hitter); break; - } - HealSay = true; + m_creature->RemoveAllAuras(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + m_creature->CombatStop(); + m_creature->DeleteThreatList(); + m_creature->RemoveCorpse(); + }else RunAwayTimer -= diff; + + return; } + + if (SayHelpTimer < diff) + { + CanSayHelp = true; + SayHelpTimer = 20000; + }else SayHelpTimer -= diff; } }; CreatureAI* GetAI_npc_draenei_survivor(Creature *_Creature) @@ -288,8 +273,8 @@ struct TRINITY_DLL_DECL npc_injured_draeneiAI : public ScriptedAI m_creature->SetHealth(int(m_creature->GetMaxHealth()*.15)); switch (rand()%2) { - case 0: m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 1); break; - case 1: m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 3); break; + case 0: m_creature->SetStandState(UNIT_STAND_STATE_SIT); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); break; } } @@ -322,7 +307,7 @@ CreatureAI* GetAI_npc_injured_draenei(Creature *_Creature) #define SAY_END2 -1000115 #define EMOTE_HUG -1000116 -#define QUEST_A_CRY_FOR_HELP 9528 +#define QUEST_A_CRY_FOR_SAY_HELP 9528 struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI { @@ -351,7 +336,7 @@ struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI DoScriptText(EMOTE_HUG, m_creature, player); DoScriptText(SAY_END2, m_creature, player); if (player && player->GetTypeId() == TYPEID_PLAYER) - ((Player*)player)->GroupEventHappens(QUEST_A_CRY_FOR_HELP,m_creature); + ((Player*)player)->GroupEventHappens(QUEST_A_CRY_FOR_SAY_HELP,m_creature); break; } } @@ -373,7 +358,7 @@ struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI { Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); if (player) - ((Player*)player)->FailQuest(QUEST_A_CRY_FOR_HELP); + ((Player*)player)->FailQuest(QUEST_A_CRY_FOR_SAY_HELP); } } @@ -385,7 +370,7 @@ struct TRINITY_DLL_DECL npc_magwinAI : public npc_escortAI bool QuestAccept_npc_magwin(Player* player, Creature* creature, Quest const* quest) { - if (quest->GetQuestId() == QUEST_A_CRY_FOR_HELP) + if (quest->GetQuestId() == QUEST_A_CRY_FOR_SAY_HELP) { creature->setFaction(113); ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); @@ -562,7 +547,7 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI cell.SetNoCreate(); Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG); - Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(FlagList, go_check); + Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid> go_search(m_creature, FlagList, go_check); TypeContainerVisitor <Trinity::GameObjectListSearcher<Trinity::AllGameObjectsWithEntryInGrid>, GridTypeMapContainer> go_visit(go_search); CellLock<GridReadGuard> cell_lock(cell, pair); diff --git a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp index b9e6377f6d9..878865fec2c 100644 --- a/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp +++ b/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -89,50 +89,54 @@ bool GossipSelect_npc_sputtervalve(Player *player, Creature *_Creature, uint32 s ## npc_taskmaster_fizzule ######*/ -//#define FACTION_HOSTILE_F 430 -#define FACTION_HOSTILE_F 16 -#define FACTION_FRIENDLY_F 35 - -#define SPELL_FLARE 10113 -#define SPELL_FOLLY 10137 +enum +{ + FACTION_FRIENDLY_F = 35, + SPELL_FLARE = 10113, + SPELL_FOLLY = 10137, +}; struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI { - npc_taskmaster_fizzuleAI(Creature* c) : ScriptedAI(c) {} + npc_taskmaster_fizzuleAI(Creature* c) : ScriptedAI(c) + { + factionNorm = c->getFaction(); + } + uint32 factionNorm; bool IsFriend; uint32 Reset_Timer; - uint32 FlareCount; + uint8 FlareCount; void Reset() { IsFriend = false; Reset_Timer = 120000; FlareCount = 0; - m_creature->setFaction(FACTION_HOSTILE_F); - m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->setFaction(factionNorm); } - //This is a hack. Spellcast will make creature aggro but that is not - //supposed to happen (Trinity not implemented/not found way to detect this spell kind) - void DoUglyHack() + void DoFriend() { m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(); + + 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 ) + if (spell->Id == SPELL_FLARE || spell->Id == SPELL_FOLLY) { - DoUglyHack(); ++FlareCount; - if( FlareCount >= 2 ) - { - m_creature->setFaction(FACTION_FRIENDLY_F); + + if (FlareCount >= 2) IsFriend = true; - } } } @@ -140,9 +144,9 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if( IsFriend ) + if (IsFriend) { - if( Reset_Timer < diff ) + if (Reset_Timer < diff) { EnterEvadeMode(); } else Reset_Timer -= diff; @@ -154,19 +158,22 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_npc_taskmaster_fizzule(Creature *_Creature) + +CreatureAI* GetAI_npc_taskmaster_fizzule(Creature* pCreature) { - return new npc_taskmaster_fizzuleAI (_Creature); + return new npc_taskmaster_fizzuleAI(pCreature); } -bool ReciveEmote_npc_taskmaster_fizzule(Player *player, Creature *_Creature, uint32 emote) +bool ReciveEmote_npc_taskmaster_fizzule(Player* pPlayer, Creature* pCreature, uint32 emote) { - if( emote == TEXTEMOTE_SALUTE ) + if (emote == TEXTEMOTE_SALUTE) { - if( ((npc_taskmaster_fizzuleAI*)_Creature->AI())->FlareCount >= 2 ) + if (((npc_taskmaster_fizzuleAI*)pCreature->AI())->FlareCount >= 2) { - _Creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - _Creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); + if (pCreature->getFaction() == FACTION_FRIENDLY_F) + return true; + else + ((npc_taskmaster_fizzuleAI*)pCreature->AI())->DoFriend(); } } return true; @@ -357,7 +364,6 @@ struct TRINITY_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI //pCreature->GetMotionMaster()->MovePoint(0, -1693, -4343, 4.32); //pCreature->GetMotionMaster()->MovePoint(1, -1684, -4333, 2.78); pCreature->GetMotionMaster()->MovePoint(2, -1682, -4329, 2.79); - //pCreature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); pCreature->HandleEmoteCommand(EMOTE_STATE_READYUNARMED); EventBigWill = true; Wave_Timer = 1000; diff --git a/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp b/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp index da9b20ef63e..738c58eab2e 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp index 656496c268f..b181f50f69b 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -215,7 +215,7 @@ struct TRINITY_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)) { if(EnrageTimer < diff) { diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp index b821edbb8d1..7e656bccee0 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -137,6 +137,9 @@ EndScriptData */ #define FLAME_ENRAGE_DISTANCE 30 #define FLAME_CHARGE_DISTANCE 50 +#define ITEM_ID_MAIN_HAND 32837 +#define ITEM_ID_OFF_HAND 32838 + /**** Creature Summon and Recognition IDs ****/ enum CreatureEntry { @@ -365,6 +368,10 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { pInstance = ((ScriptedInstance*)c->GetInstanceData()); m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true); + + SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SHADOWFIEND_PASSIVE); + if(TempSpell) + TempSpell->EffectApplyAuraName[0] = 4; // proc debuff, and summon infinite fiends } ScriptedInstance* pInstance; @@ -454,7 +461,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(i)); if(Door) - Door->SetUInt32Value(GAMEOBJECT_STATE, 0); // Open Doors + Door->SetGoState(0); // Open Doors } } @@ -487,10 +494,10 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { if(spell->Id == SPELL_GLAIVE_RETURNS) // Re-equip our warblades! { - if(!m_creature->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY)) - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 45479); + if(!m_creature->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID)) + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 45479); else - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 45481); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 45481); m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); } } @@ -524,7 +531,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI if(Conversation[count].emote) creature->HandleEmoteCommand(Conversation[count].emote); // Make the creature do some animation! if(Conversation[count].text) - creature->Yell(Conversation[count].text, LANG_UNIVERSAL, 0); // Have the creature yell out some text + creature->MonsterYell(Conversation[count].text, LANG_UNIVERSAL, 0); // Have the creature yell out some text if(Conversation[count].sound) DoPlaySoundToSet(creature, Conversation[count].sound); // Play some sound on the creature } @@ -567,8 +574,8 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI Timer[EVENT_FLIGHT_SEQUENCE] = 700; break; case 4://throw another - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); { uint8 i=0; Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -653,14 +660,14 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI if(DemonTransformation[TransformCount].equip) { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 45479); // Requip warglaives if needed - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 45481); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 45479); // Requip warglaives if needed + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 45481); m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); } else { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); // Unequip warglaives if needed - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+0, 0); // Unequip warglaives if needed + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); } switch(TransformCount) @@ -741,7 +748,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI if(m_creature->IsNonMeleeSpellCasted(false)) return; - if(Phase == PHASE_NORMAL || Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV && !m_creature->HasAura(SPELL_CAGED, 0)) + if(Phase == PHASE_NORMAL || Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV && !m_creature->HasAura(SPELL_CAGED)) { switch(Event) { @@ -926,7 +933,7 @@ struct TRINITY_DLL_DECL flame_of_azzinothAI : public ScriptedAI AttackStart(m_creature->getVictim()); } } - else if(!m_creature->HasAura(SPELL_AZZINOTH_CHANNEL, 0)) + else if(!m_creature->HasAura(SPELL_AZZINOTH_CHANNEL)) { Glaive->CastSpell(m_creature, SPELL_AZZINOTH_CHANNEL, false); m_creature->RemoveAurasDueToSpell(SPELL_FLAME_ENRAGE); @@ -998,10 +1005,10 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI DoorGUID[1] = pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_L); if(GETGO(Gate, GateGUID)) - Gate->SetUInt32Value(GAMEOBJECT_STATE, 1); + Gate->SetGoState(1); for(uint8 i = 0; i < 2; i++) if(GETGO(Door, DoorGUID[i])) - Door->SetUInt32Value(GAMEOBJECT_STATE, 1); + Door->SetGoState(1); } else { @@ -1071,7 +1078,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI for(uint8 i = 0; i < 2; i++) if(GETGO(Door, DoorGUID[i])) - Door->SetUInt32Value(GAMEOBJECT_STATE, 1); + Door->SetGoState(1); if(GETCRE(Illidan, IllidanGUID)) { @@ -1186,7 +1193,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI if(GETCRE(Illidan, IllidanGUID)) { ((boss_illidan_stormrageAI*)Illidan->AI())->Timer[EVENT_TAUNT] += 30000; - Illidan->Yell(SAY_AKAMA_MINION, LANG_UNIVERSAL, 0); + Illidan->MonsterYell(SAY_AKAMA_MINION, LANG_UNIVERSAL, 0); DoPlaySoundToSet(Illidan, SOUND_AKAMA_MINION); } Timer = 8000; @@ -1237,7 +1244,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI Spirit[0]->InterruptNonMeleeSpells(true); Spirit[1]->InterruptNonMeleeSpells(true); if(GETGO(Gate, GateGUID)) - Gate->SetUInt32Value(GAMEOBJECT_STATE, 0); + Gate->SetGoState(0); Timer = 2000; break; case 4: @@ -1268,7 +1275,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI case 6: for(uint8 i = 0; i < 2; i++) if(GETGO(Door, DoorGUID[i])) - Door->SetUInt32Value(GAMEOBJECT_STATE, 0); + Door->SetGoState(0); break; case 8: if(Phase == PHASE_WALK) @@ -1378,9 +1385,9 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI Timer[EVENT_MAIEV_STEALTH] = 0; Timer[EVENT_MAIEV_TAUNT] = 22000 + rand()%21 * 1000; Timer[EVENT_MAIEV_SHADOW_STRIKE] = 30000; - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 44850); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY + 1, 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY + 2, 45738); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 44850); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, 45738); } void Aggro(Unit *who) {} @@ -1618,12 +1625,12 @@ struct TRINITY_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))) { IllidanGUID = who->GetGUID(); who->CastSpell(who, SPELL_CAGED, true); DespawnTimer = 5000; - if(who->HasAura(SPELL_ENRAGE, 0)) + if(who->HasAura(SPELL_ENRAGE)) who->RemoveAurasDueToSpell(SPELL_ENRAGE); // Dispel his enrage //if(GameObject* CageTrap = GameObject::GetGameObject(*m_creature, CageTrapGUID)) // CageTrap->SetLootState(GO_JUST_DEACTIVATED); @@ -1663,7 +1670,7 @@ bool GOHello_cage_trap(Player* plr, GameObject* go) // Grid search for nearest live creature of entry 23304 within 10 yards Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck check(*plr, 23304, true, 10); - Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(trigger, check); + Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(plr, trigger, check); TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> cSearcher(searcher); @@ -1671,7 +1678,7 @@ bool GOHello_cage_trap(Player* plr, GameObject* go) cell_lock->Visit(cell_lock, cSearcher, *(plr->GetMap())); ((cage_trap_triggerAI*)trigger->AI())->Active = true; - go->SetUInt32Value(GAMEOBJECT_STATE, 0); + go->SetGoState(0); return true; } @@ -1701,7 +1708,7 @@ struct TRINITY_DLL_DECL shadow_demonAI : public ScriptedAI if(m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; // Only cast the below on players. - if(!m_creature->getVictim()->HasAura(SPELL_PARALYZE, 0)) + if(!m_creature->getVictim()->HasAura(SPELL_PARALYZE)) { TargetGUID = m_creature->getVictim()->GetGUID(); m_creature->AddThreat(m_creature->getVictim(), 10000000.0f); @@ -1743,8 +1750,8 @@ struct TRINITY_DLL_DECL mob_parasitic_shadowfiendAI : public ScriptedAI { if( m_creature->isAttackReady() && m_creature->IsWithinMeleeRange(m_creature->getVictim())) { - if(!m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND, 0) - && !m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2, 0)) + if(!m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND) + && !m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND2)) { m_creature->CastSpell(m_creature->getVictim(), SPELL_PARASITIC_SHADOWFIEND2, true, 0, 0, IllidanGUID); //do not stack } @@ -1834,8 +1841,8 @@ void boss_illidan_stormrageAI::Reset() m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); m_creature->setActive(false); Summons.DespawnAll(); @@ -1855,8 +1862,8 @@ void boss_illidan_stormrageAI::JustSummoned(Creature* summon) return; } Unit *target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0, 999, true); - if(!target || target->HasAura(SPELL_PARASITIC_SHADOWFIEND, 0) - || target->HasAura(SPELL_PARASITIC_SHADOWFIEND2, 0)) + if(!target || target->HasAura(SPELL_PARASITIC_SHADOWFIEND) + || target->HasAura(SPELL_PARASITIC_SHADOWFIEND2)) target = SelectUnit(SELECT_TARGET_RANDOM, 0, 999, true); if(target) summon->AI()->AttackStart(target); @@ -1892,8 +1899,8 @@ void boss_illidan_stormrageAI::HandleTalkSequence() m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); break; case 8: - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 45479); // Equip our warglaives! - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 45481); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 45479); // Equip our warglaives! + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 45481); m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break; @@ -1953,7 +1960,7 @@ void boss_illidan_stormrageAI::HandleTalkSequence() { Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); Maiev->setDeathState(JUST_DIED); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD); } break; case 21: // Kill ourself. diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp index 4b63b092c53..e459e1aa687 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -276,7 +276,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI }else SaberTimer -= diff; //Enrage - if(!m_creature->HasAura(SPELL_BERSERK, 0)) + if(!m_creature->HasAura(SPELL_BERSERK)) if(EnrageTimer < diff) { DoCast(m_creature, SPELL_BERSERK); diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp index eb3480c9ca7..37ebaca0b78 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp index e4f22eba72d..f8f742d3a3c 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -290,7 +290,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI debug_log("SD2: Increasing Death Count for Shade of Akama encounter"); ++DeathCount; - m_creature->RemoveSingleAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2, 0); + m_creature->RemoveAuraFromStack(SPELL_SHADE_SOUL_CHANNEL_2); if(guid) { if(Sorcerers.empty()) @@ -345,7 +345,7 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI std::list<Creature*> ChannelerList; Trinity::AllCreaturesOfEntryInRange check(m_creature, CREATURE_CHANNELER, 50); - Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(ChannelerList, check); + Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(m_creature, ChannelerList, check); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> visitor(searcher); CellLock<GridReadGuard> cell_lock(cell, pair); diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp index 72429886626..44122355311 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp @@ -153,7 +153,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI if (!UpdateVictim()) return; - if(!m_creature->HasAura(SPELL_BERSERK, 0)) + if(!m_creature->HasAura(SPELL_BERSERK)) { if(BerserkTimer < diff) DoCast(m_creature, SPELL_BERSERK); @@ -276,7 +276,7 @@ struct TRINITY_DLL_DECL npc_volcanoAI : public ScriptedAI } else if(Eruption && ((boss_supremusAI*)Supremus->AI())->Phase1) { - m_creature->RemoveAura(SPELL_VOLCANIC_ERUPTION, 0); + m_creature->RemoveAura(SPELL_VOLCANIC_ERUPTION); } CheckTimer = 1500; }else CheckTimer -= diff; diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp index 7e60a1cdfa5..5e362d29eb8 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -90,7 +90,7 @@ struct TRINITY_DLL_DECL mob_doom_blossomAI : public ScriptedAI Despawn(); CheckTeronTimer = 5000; - }else CheckTeronTimer -= diff; + }else CheckTeronTimer -= diff; if(ShadowBoltTimer < diff && InCombat) { @@ -331,7 +331,7 @@ struct TRINITY_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)) { /*float x,y,z; Ghost->GetPosition(x,y,z); @@ -487,7 +487,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI RandomYellTimer = 50000 + rand()%51 * 1000; }else RandomYellTimer -= diff; - if(!m_creature->HasAura(SPELL_BERSERK, 0)) + if(!m_creature->HasAura(SPELL_BERSERK)) { if(EnrageTimer < diff) { diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp index 9c662dd8232..b605c16394b 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -95,7 +95,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI void SpellHit(Unit *caster, const SpellEntry *spell) { - if(spell->Id == SPELL_HURL_SPINE && m_creature->HasAura(SPELL_TIDAL_SHIELD, 0)) + if(spell->Id == SPELL_HURL_SPINE && m_creature->HasAura(SPELL_TIDAL_SHIELD)) { m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD); m_creature->CastSpell(m_creature, SPELL_TIDAL_BURST, true); @@ -116,7 +116,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI { if(!SpineTargetGUID) return false; Unit* target = Unit::GetUnit(*m_creature, SpineTargetGUID); - if(target && target->HasAura(SPELL_IMPALING_SPINE, 1)) + if(target && target->HasAura(SPELL_IMPALING_SPINE)) target->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE); SpineTargetGUID=0; return true; @@ -154,7 +154,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI SelectUnitList(target, 3, SELECT_TARGET_RANDOM, 80, true); for(std::list<Unit*>::iterator i = target.begin(); i != target.end(); ++i) m_creature->CastSpell(*i, 39835, true); - NeedleSpineTimer = 20000+rand()%5000; + NeedleSpineTimer = 2000+rand()%1000; }else NeedleSpineTimer -= diff; if(SpecialYellTimer < diff) @@ -199,7 +199,7 @@ bool GOHello_go_najentus_spine(Player *player, GameObject* _GO) { player->CastSpell(player, SPELL_CREATE_NAJENTUS_SPINE, true); _GO->SetLootState(GO_NOT_READY); - _GO->SetRespawnTime(0); + _GO->Delete(); } return true; } diff --git a/src/bindings/scripts/scripts/zone/black_temple/def_black_temple.h b/src/bindings/scripts/scripts/zone/black_temple/def_black_temple.h index 0d5bb184792..4779f92fa4d 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/def_black_temple.h +++ b/src/bindings/scripts/scripts/zone/black_temple/def_black_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp b/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp index a6180dcc15a..ca3a6658f45 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp b/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp index 80a749faa12..43646746505 100644 --- a/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp +++ b/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -42,6 +42,9 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance { instance_black_temple(Map *map) : ScriptedInstance(map) {Initialize();}; + uint32 Encounters[ENCOUNTERS]; + std::string str_data; + uint64 Najentus; uint64 Akama; // This is the Akama that starts the Illidan encounter. uint64 Akama_Shade; // This is the Akama that starts the Shade of Akama encounter. @@ -68,9 +71,6 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance uint64 IllidanGate; uint64 IllidanDoor[2]; - uint32 Encounters[ENCOUNTERS]; - std::string str_data; - void Initialize() { Najentus = 0; @@ -131,7 +131,7 @@ struct TRINITY_DLL_DECL instance_black_temple : public ScriptedInstance void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case 22887: Najentus = creature->GetGUID(); break; case 23089: Akama = creature->GetGUID(); break; diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp index 1ff4dcec224..253912ef288 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp index b0c4bafb290..bf698aff507 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp index ad9330528b9..7cc38998a9e 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 978f4d8e9d7..e5b279d65ef 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,12 +23,12 @@ EndScriptData */ #include "precompiled.h" +#define SAY_AGGRO -1230001 +#define SAY_SLAY -1230002 + #define SPELL_HANDOFTHAURISSAN 17492 #define SPELL_AVATAROFFLAME 15636 -#define SAY_AGGRO "Come to aid the Throne!" -#define SAY_SLAY "Hail to the king, baby!" - struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI { boss_draganthaurissanAI(Creature *c) : ScriptedAI(c) {} @@ -46,12 +46,12 @@ struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI void Aggro(Unit *who) { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); + DoScriptText(SAY_AGGRO, m_creature); } void KilledUnit(Unit* victim) { - DoYell(SAY_SLAY, LANG_UNIVERSAL, NULL); + DoScriptText(SAY_SLAY, m_creature); } void UpdateAI(const uint32 diff) @@ -62,9 +62,8 @@ struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI if (HandOfThaurissan_Timer < diff) { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target) DoCast(target,SPELL_HANDOFTHAURISSAN); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_HANDOFTHAURISSAN); //3 Hands of Thaurissan will be casted //if (Counter < 3) @@ -89,6 +88,7 @@ struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_draganthaurissan(Creature *_Creature) { return new boss_draganthaurissanAI (_Creature); diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp index 80df7fec20b..c0ea7cac901 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp index 25367c6f4dd..3fd45e6eed7 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp index 389b2bc5b4d..df109c24001 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,6 +23,8 @@ EndScriptData */ #include "precompiled.h" +#define EMOTE_GENERIC_FRENZY_KILL -1000001 + #define SPELL_GROUNDTREMOR 6524 #define SPELL_FRENZY 28371 @@ -62,7 +64,7 @@ struct TRINITY_DLL_DECL boss_grizzleAI : public ScriptedAI if (Frenzy_Timer < diff) { DoCast(m_creature,SPELL_FRENZY); - DoTextEmote("goes into a killing frenzy!",NULL); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); Frenzy_Timer = 15000; }else Frenzy_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp index 422f0f25532..5921cc8419a 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp index 25f7f890e3f..c4230b5f557 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp index 26c72404355..bc90aeb17cf 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp index 2d5615779a7..e056f732158 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_depths/instance_blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp index 45e5184e1d3..69ca2482357 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp index 09656309e5c..919643a34e9 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp index 61ce2ea2cc4..81e872b1ffa 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp index 6069bad85ed..79ebd4fa098 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp index 7188ae17770..c2df5796f48 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp index 85113c9a1ab..ecb0a71db82 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -103,8 +103,10 @@ struct TRINITY_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI 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; } diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp index ea320b40b4d..532a719bbe3 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp index b4b14ac5f89..af158d97de6 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp index ee41701667b..d43de67fa56 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp index 7a1080226ea..6563aa8a929 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp index 6eead9d4162..c9ba2a77921 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp index 625bbc0d28a..d701edc6d40 100644 --- a/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp +++ b/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp index 5c0b2a8d2f2..b59be12f8eb 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp index 8e89a3aeed4..4e54fe2ce35 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -258,11 +258,11 @@ struct TRINITY_DLL_DECL boss_chromaggusAI : public ScriptedAI 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)) + if (pUnit->HasAura(SPELL_BROODAF_BLUE) + && pUnit->HasAura(SPELL_BROODAF_BLACK) + && pUnit->HasAura(SPELL_BROODAF_RED) + && pUnit->HasAura(SPELL_BROODAF_BRONZE) + && pUnit->HasAura(SPELL_BROODAF_GREEN)) { //target->RemoveAllAuras(); //DoCast(target,SPELL_CHROMATIC_MUT_1); diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp index c30485ac327..54348dd86c4 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -76,7 +76,7 @@ struct TRINITY_DLL_DECL boss_ebonrocAI : public ScriptedAI ShadowOfEbonroc_Timer = 25000 + rand()%10000; }else ShadowOfEbonroc_Timer -= diff; - if (m_creature->getVictim()->HasAura(SPELL_SHADOWOFEBONROC,0)) + if (m_creature->getVictim()->HasAura(SPELL_SHADOWOFEBONROC)) { if (Heal_Timer < diff) { diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp index 64a01b228f0..dfae4f31662 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp index 49dfdaa896f..def9af062be 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp index d91714c0246..4abe9265828 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp index 1da3fb554df..ff29427664f 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -104,7 +104,7 @@ struct TRINITY_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)) { Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,1); diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp index f0048e7a4fa..c8fecdae893 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp index ea6751605c0..03543bf9874 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blackwing_lair/instance_blackwing_lair.cpp b/src/bindings/scripts/scripts/zone/blackwing_lair/instance_blackwing_lair.cpp index ddd9e8b9aa3..97bf717589a 100644 --- a/src/bindings/scripts/scripts/zone/blackwing_lair/instance_blackwing_lair.cpp +++ b/src/bindings/scripts/scripts/zone/blackwing_lair/instance_blackwing_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp b/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp index 3617ae8cc14..03c3a57568c 100644 --- a/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp +++ b/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ /* 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) +SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete) SDCategory: Blade's Edge Mountains EndScriptData */ @@ -28,10 +28,20 @@ npc_daranelle npc_overseer_nuaar npc_saikkal_the_elder npc_skyguard_handler_irena +go_legion_obelisk EndContentData */ #include "precompiled.h" +//Support for quest: You're Fired! (10821) +bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five; + +#define LEGION_OBELISK_ONE 185193 +#define LEGION_OBELISK_TWO 185195 +#define LEGION_OBELISK_THREE 185196 +#define LEGION_OBELISK_FOUR 185197 +#define LEGION_OBELISK_FIVE 185198 + /*###### ## mobs_bladespire_ogre ######*/ @@ -96,14 +106,9 @@ struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI void Reset() { - NihilSpeech_Timer = 2000; IsNihil = false; - if( m_creature->GetEntry() == ENTRY_NIHIL ) - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - IsNihil = true; - } - NihilSpeech_Phase = 1; + NihilSpeech_Timer = 3000; + NihilSpeech_Phase = 0; ArcaneBlast_Timer = 7500; ManaBurn_Timer = 10000; @@ -112,138 +117,115 @@ struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI void Aggro(Unit* who) { } + 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 ) + if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER) { - uint32 cEntry = 0; + 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; - switch( m_creature->GetEntry() ) + //we are nihil, so say before transform + if (m_creature->GetEntry() == ENTRY_NIHIL) { - case ENTRY_WHELP: - switch(rand()%4) - { - case 0: cEntry = ENTRY_PROTO; break; - case 1: cEntry = ENTRY_ADOLE; break; - case 2: cEntry = ENTRY_MATUR; break; - case 3: cEntry = ENTRY_NIHIL; break; - } - break; - case ENTRY_PROTO: - switch(rand()%3) - { - case 0: cEntry = ENTRY_ADOLE; break; - case 1: cEntry = ENTRY_MATUR; break; - case 2: cEntry = ENTRY_NIHIL; break; - } - break; - case ENTRY_ADOLE: - switch(rand()%3) - { - case 0: cEntry = ENTRY_PROTO; break; - case 1: cEntry = ENTRY_MATUR; break; - case 2: cEntry = ENTRY_NIHIL; break; - } - break; - case ENTRY_MATUR: - switch(rand()%3) - { - case 0: cEntry = ENTRY_PROTO; break; - case 1: cEntry = ENTRY_ADOLE; break; - case 2: cEntry = ENTRY_NIHIL; break; - } - break; - case ENTRY_NIHIL: - if( NihilSpeech_Phase ) - { - DoScriptText(SAY_NIHIL_INTERRUPT, m_creature); - IsNihil = false; - switch(rand()%3) - { - case 0: cEntry = ENTRY_PROTO; break; - case 1: cEntry = ENTRY_ADOLE; break; - case 2: cEntry = ENTRY_MATUR; break; - } - } - break; + DoScriptText(SAY_NIHIL_INTERRUPT, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + IsNihil = false; } - if( cEntry ) + if (m_creature->UpdateEntry(entry_list[cid])) { - m_creature->UpdateEntry(cEntry); - - if( cEntry == ENTRY_NIHIL ) + if (entry_list[cid] == ENTRY_NIHIL) { - m_creature->InterruptNonMeleeSpells(true); - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(); - InCombat = false; - Reset(); - } + EnterEvadeMode(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + IsNihil = true; + }else + AttackStart(caster); } } } void UpdateAI(const uint32 diff) { - if( IsNihil ) + if (IsNihil) { - if( NihilSpeech_Phase ) + if (NihilSpeech_Timer <= diff) { - if(NihilSpeech_Timer <= diff) + switch(NihilSpeech_Phase) { - switch( NihilSpeech_Phase ) - { - case 1: - DoScriptText(SAY_NIHIL_1, m_creature); - ++NihilSpeech_Phase; - break; - case 2: - DoScriptText(SAY_NIHIL_2, m_creature); - ++NihilSpeech_Phase; - break; - case 3: - DoScriptText(SAY_NIHIL_3, m_creature); - ++NihilSpeech_Phase; - break; - case 4: - DoScriptText(SAY_NIHIL_4, m_creature); - ++NihilSpeech_Phase; - break; - case 5: - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - // + MOVEMENTFLAG_LEVITATING - m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); - //then take off to random location. creature is initially summoned, so don't bother do anything else. - m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+100, m_creature->GetPositionY(), m_creature->GetPositionZ()+100); - NihilSpeech_Phase = 0; - break; - } - NihilSpeech_Timer = 5000; - }else NihilSpeech_Timer -=diff; - } - return; //anything below here is not interesting for Nihil, so skip it + 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( !UpdateVictim() ) + if (!UpdateVictim() ) return; - if( IntangiblePresence_Timer <= diff ) + if (IntangiblePresence_Timer <= diff) { DoCast(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE); IntangiblePresence_Timer = 15000+rand()%15000; }else IntangiblePresence_Timer -= diff; - if( ManaBurn_Timer <= diff ) + if (ManaBurn_Timer <= diff) { Unit* target = m_creature->getVictim(); - if( target && target->getPowerType() == POWER_MANA ) + if (target && target->getPowerType() == POWER_MANA) DoCast(target,SPELL_MANA_BURN); ManaBurn_Timer = 8000+rand()%8000; }else ManaBurn_Timer -= diff; - if( ArcaneBlast_Timer <= diff ) + if (ArcaneBlast_Timer <= diff) { DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST); ArcaneBlast_Timer = 2500+rand()%5000; @@ -252,6 +234,7 @@ struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_mobs_nether_drake(Creature *_Creature) { return new mobs_nether_drakeAI (_Creature); @@ -261,27 +244,23 @@ CreatureAI* GetAI_mobs_nether_drake(Creature *_Creature) ## npc_daranelle ######*/ -#define SAY_DARANELLE -1000401 +#define SAY_SPELL_INFLUENCE -1000174 struct TRINITY_DLL_DECL npc_daranelleAI : public ScriptedAI { npc_daranelleAI(Creature *c) : ScriptedAI(c) {} - void Reset() - { - } + void Reset() { } - void Aggro(Unit* who) - { - } + void Aggro(Unit* who) { } void MoveInLineOfSight(Unit *who) { if (who->GetTypeId() == TYPEID_PLAYER) { - if(who->HasAura(36904,0)) + if (who->HasAura(36904) && m_creature->IsWithinDistInMap(who, 10.0f)) { - DoScriptText(SAY_DARANELLE, m_creature, who); + DoScriptText(SAY_SPELL_INFLUENCE, m_creature, who); //TODO: Move the below to updateAI and run if this statement == true ((Player*)who)->KilledMonster(21511, m_creature->GetGUID()); ((Player*)who)->RemoveAurasDueToSpell(36904); @@ -301,12 +280,10 @@ CreatureAI* GetAI_npc_daranelle(Creature *_Creature) ## npc_overseer_nuaar ######*/ -#define GOSSIP_HON "Overseer, I am here to negotiate on behalf of the Cenarion Expedition." - bool GossipHello_npc_overseer_nuaar(Player *player, Creature *_Creature) { if (player->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM( 0, GOSSIP_HON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM( 0, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(10532, _Creature->GetGUID()); @@ -327,13 +304,10 @@ bool GossipSelect_npc_overseer_nuaar(Player *player, Creature *_Creature, uint32 ## npc_saikkal_the_elder ######*/ -#define GOSSIP_HSTE "Yes... yes, it's me." -#define GOSSIP_SSTE "Yes elder. Tell me more of the book." - bool GossipHello_npc_saikkal_the_elder(Player *player, Creature *_Creature) { if (player->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM( 0, GOSSIP_HSTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM( 0, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(10794, _Creature->GetGUID()); @@ -345,7 +319,7 @@ bool GossipSelect_npc_saikkal_the_elder(Player *player, Creature *_Creature, uin switch (action) { case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM( 0, GOSSIP_SSTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->ADD_GOSSIP_ITEM( 0, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->SEND_GOSSIP_MENU(10795, _Creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: @@ -380,18 +354,54 @@ bool GossipSelect_npc_skyguard_handler_irena(Player *player, Creature *_Creature if (action == GOSSIP_ACTION_INFO_DEF+1) { player->CLOSE_GOSSIP_MENU(); - - std::vector<uint32> nodes; - - nodes.resize(2); - nodes[0] = 172; //from ogri'la - nodes[1] = 171; //end at skettis - player->ActivateTaxiPathTo(nodes); //TaxiPath 706 + player->CastSpell(player,41278,true); //TaxiPath 706 } return true; } /*###### +## go_legion_obelisk +######*/ + +bool GOHello_go_legion_obelisk(Player *player, GameObject* _GO) +{ + if ( player->GetQuestStatus(10821) == QUEST_STATUS_INCOMPLETE ) + { + switch( _GO->GetEntry() ) + { + case LEGION_OBELISK_ONE: + obelisk_one = true; + break; + case LEGION_OBELISK_TWO: + obelisk_two = true; + break; + case LEGION_OBELISK_THREE: + obelisk_three = true; + break; + case LEGION_OBELISK_FOUR: + obelisk_four = true; + break; + case LEGION_OBELISK_FIVE: + obelisk_five = true; + break; + } + + if ( obelisk_one == true && obelisk_two == true && obelisk_three == true && obelisk_four == true && obelisk_five == true ) + { + _GO->SummonCreature(19963,2943.40f,4778.20f,284.49f,0.94f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000); + //reset global var + obelisk_one = false; + obelisk_two = false; + obelisk_three = false; + obelisk_four = false; + obelisk_five = false; + } + } + + return true; +} + +/*###### ## AddSC ######*/ @@ -425,6 +435,11 @@ void AddSC_blades_edge_mountains() newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder; newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="go_legion_obelisk"; + newscript->pGOHello = &GOHello_go_legion_obelisk; + newscript->RegisterSelf(); newscript = new Script; newscript->Name="npc_skyguard_handler_irena"; diff --git a/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp b/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp index 954792a1044..432633e90fe 100644 --- a/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp +++ b/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp b/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp index f186a58252c..7516930285e 100644 --- a/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp +++ b/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp b/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp index e7ce3b95c42..79d7b19e108 100644 --- a/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -81,7 +81,7 @@ CreatureAI* GetAI_mob_webbed_creature(Creature *_Creature) bool GossipHello_npc_captured_sunhawk_agent(Player *player, Creature *_Creature) { - if (player->HasAura(31609,1) && player->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE) + if (player->HasAura(31609) && player->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE) { player->ADD_GOSSIP_ITEM( 0, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(9136, _Creature->GetGUID()); diff --git a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp new file mode 100644 index 00000000000..c776c1f9271 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp @@ -0,0 +1,105 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along 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: +SDCategory: Borean Tundra +EndScriptData */ + +/* ContentData +npc_tiare +npc_surristrasz +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_tiare +######*/ + +#define GOSSIP_ITEM_TELEPORT "Teleport me to Amber Ledge, please." + +bool GossipHello_npc_tiare(Player *player, Creature *_Creature) +{ + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); + player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + return true; +} + +bool GossipSelect_npc_tiare(Player *player, Creature *_Creature, uint32 sender, uint32 action) +{ + if (action == GOSSIP_OPTION_GOSSIP) + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,50135,true); + } + 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?" + +bool GossipHello_npc_surristrasz(Player *player, Creature *_Creature) +{ + if (_Creature->isQuestGiver()) + player->PrepareQuestMenu(_Creature->GetGUID()); + + if (_Creature->isTaxi()) + { + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_FREE_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); + player->ADD_GOSSIP_ITEM(2, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR); + } + + player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + return true; +} + +bool GossipSelect_npc_surristrasz(Player *player, Creature *_Creature, uint32 sender, uint32 action) +{ + if (action == GOSSIP_OPTION_GOSSIP) + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,46064,true); //TaxiPath 795 (amber to coldarra) + } + if (action == GOSSIP_OPTION_TAXIVENDOR) + { + player->GetSession()->SendTaxiMenu(_Creature); + } + return true; +} + +void AddSC_borean_tundra() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_tiare"; + newscript->pGossipHello = &GossipHello_npc_tiare; + newscript->pGossipSelect = &GossipSelect_npc_tiare; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_surristrasz"; + newscript->pGossipHello = &GossipHello_npc_surristrasz; + newscript->pGossipSelect = &GossipSelect_npc_surristrasz; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp b/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp index 0458e495959..b16b6551c78 100644 --- a/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp +++ b/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL npc_ragged_johnAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { - if( who->HasAura(16468,0) ) + if( who->HasAura(16468) ) { if( who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 15) && who->isInAccessiblePlaceFor(m_creature) ) { diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp index 7a2e8239cac..abe37b53685 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index dc8723b7201..d7ffcde4059 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp index 1efa7c75a2c..3e0e327bb89 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/dark_portal.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/dark_portal.cpp index cbe3c4273a2..db8db78f723 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/dark_portal.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -79,8 +79,8 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI if (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)) + m_creature->RemoveAura(SPELL_CHANNEL); m_creature->CastSpell(m_creature,SPELL_PORTAL_RUNE,true); } @@ -92,7 +92,7 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 10.0f)) { - if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS) + if (pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS || pInstance->GetData(TYPE_MEDIVH) == DONE) return; DoScriptText(SAY_INTRO, m_creature); @@ -156,13 +156,13 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI if (SpellCorrupt_Timer) { - if (SpellCorrupt_Timer < diff) + if (SpellCorrupt_Timer <= diff) { pInstance->SetData(TYPE_MEDIVH,SPECIAL); - if (m_creature->HasAura(SPELL_CORRUPT_AEONUS,0)) + if (m_creature->HasAura(SPELL_CORRUPT_AEONUS)) SpellCorrupt_Timer = 1000; - else if (m_creature->HasAura(SPELL_CORRUPT,0)) + else if (m_creature->HasAura(SPELL_CORRUPT)) SpellCorrupt_Timer = 3000; else SpellCorrupt_Timer = 0; @@ -171,7 +171,7 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI if (Check_Timer) { - if (Check_Timer < diff) + if (Check_Timer <= diff) { uint32 pct = pInstance->GetData(DATA_SHIELD); @@ -181,7 +181,6 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI { DoScriptText(SAY_WEAK25, m_creature); Life25 = false; - Check_Timer = 0; } else if (Life50 && pct <= 50) { @@ -203,11 +202,16 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI return; } - if (pInstance->GetData(TYPE_MEDIVH) == DONE) + if (pInstance->GetData(TYPE_RIFT) == DONE) { DoScriptText(SAY_WIN, m_creature); Check_Timer = 0; + + if (m_creature->HasAura(SPELL_CHANNEL)) + m_creature->RemoveAura(SPELL_CHANNEL); + //TODO: start the post-event here + pInstance->SetData(TYPE_MEDIVH,DONE); } }else Check_Timer -= diff; } @@ -334,7 +338,8 @@ struct TRINITY_DLL_DECL npc_time_riftAI : public ScriptedAI debug_log("SD2: npc_time_rift: not casting anylonger, i need to die."); m_creature->setDeathState(JUST_DIED); - pInstance->SetData(TYPE_RIFT,SPECIAL); + if (pInstance->GetData(TYPE_RIFT) == IN_PROGRESS) + pInstance->SetData(TYPE_RIFT,SPECIAL); } }; diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h index 61018f58118..7bfd8c917d7 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/instance_dark_portal.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/instance_dark_portal.cpp index 39445fe727c..697134cd82d 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -108,7 +108,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance } } - debug_log("SD2: Instance Black Portal: GetPlayerInMap, but PlayerList is empty!"); + debug_log("TSCR: Instance Black Portal: GetPlayerInMap, but PlayerList is empty!"); return NULL; } @@ -123,7 +123,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance if (Player* player = itr->getSource()) player->SendUpdateWorldState(id,state); } - }else debug_log("SD2: Instance Black Portal: UpdateBMWorldState, but PlayerList is empty!"); + }else debug_log("TSCR: Instance Black Portal: UpdateBMWorldState, but PlayerList is empty!"); } void InitWorldState(bool Enable = true) @@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance if (!player) { - debug_log("SD2: Instance Black Portal: SetData (Type: %u Data %u) cannot find any player.", type, data); + debug_log("TSCR: Instance Black Portal: SetData (Type: %u Data %u) cannot find any player.", type, data); return; } @@ -216,7 +216,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance { if (data == IN_PROGRESS) { - debug_log("SD2: Instance Dark Portal: Starting event."); + debug_log("TSCR: Instance Dark Portal: Starting event."); InitWorldState(); Encounter[1] = IN_PROGRESS; NextPortal_Timer = 15000; @@ -227,6 +227,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance //this may be completed further out in the post-event if (Unit *medivh = Unit::GetUnit(*player,MedivhGUID)) { + debug_log("TSCR: Instance Dark Portal: Event completed."); player->GroupEventHappens(QUEST_OPENING_PORTAL,medivh); player->GroupEventHappens(QUEST_MASTER_TOUCH,medivh); } @@ -282,7 +283,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance //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); + debug_log("TSCR: Instance Dark Portal: Summoning rift boss entry %u.",entry); Unit *Summon = source->SummonCreature(entry,x,y,z,source->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); @@ -290,7 +291,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance if (Summon) return Summon; - debug_log("SD2: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); + debug_log("TSCR: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); return NULL; } @@ -302,12 +303,11 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance if (Unit *medivh = Unit::GetUnit(*player,MedivhGUID)) { - for(uint8 i = 0; i < 4; i++) - { - int tmp = rand()%4; - if (tmp != CurrentRiftId) - { - debug_log("SD2: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).",tmp,CurrentRiftId); + int tmp = rand()%(4-1); + + if (tmp >= CurrentRiftId) + tmp++; + debug_log("TSCR: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).",tmp,CurrentRiftId); CurrentRiftId = tmp; @@ -334,9 +334,6 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance } } } - break; - } - } } } @@ -354,7 +351,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance if (NextPortal_Timer) { - if (NextPortal_Timer < diff) + if (NextPortal_Timer <= diff) { ++mRiftPortalCount; UpdateBMWorldState(WORLD_STATE_BM_RIFT,mRiftPortalCount); diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp index 4095ef9ca23..86823aae7d4 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,12 +6,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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 @@ -39,9 +39,9 @@ EndScriptData */ #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_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 @@ -52,8 +52,7 @@ EndScriptData */ #define SPELL_GRIP_OF_THE_LEGION 31972 #define SPELL_DOOMFIRE_STRIKE 31903 //summons two creatures #define SPELL_DOOMFIRE_SPAWN 32074 -#define SPELL_DOOMFIRE_VISUAL 42344 // This is actually a Zul'Aman spell, but the proper Doomfire spell sometimes freezes the server if a player stands in it for too long -#define SPELL_DOOMFIRE_DAMAGE 31944 +#define SPELL_DOOMFIRE 31945 #define SPELL_SOUL_CHARGE_YELLOW 32045 #define SPELL_SOUL_CHARGE_GREEN 32051 #define SPELL_SOUL_CHARGE_RED 32052 @@ -64,7 +63,7 @@ EndScriptData */ #define CREATURE_ARCHIMONDE 17968 #define CREATURE_DOOMFIRE 18095 -#define CREATURE_DOOMFIRE_TARGETING 18104 +#define CREATURE_DOOMFIRE_SPIRIT 18104 #define CREATURE_ANCIENT_WISP 17946 #define CREATURE_CHANNEL_TARGET 22418 @@ -97,20 +96,20 @@ struct mob_ancient_wispAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(!ArchimondeGUID) + if (!ArchimondeGUID) { - if(pInstance) + if (pInstance) ArchimondeGUID = pInstance->GetData64(DATA_ARCHIMONDE); } - if(CheckTimer < diff) + if (CheckTimer < diff) { - if(ArchimondeGUID) + if (ArchimondeGUID) { Unit* Archimonde = Unit::GetUnit((*m_creature), ArchimondeGUID); - if(Archimonde) + if (Archimonde) { - if((((Archimonde->GetHealth()*100) / Archimonde->GetMaxHealth()) < 2) || !Archimonde->isAlive()) + if ((((Archimonde->GetHealth()*100) / Archimonde->GetMaxHealth()) < 2) || !Archimonde->isAlive()) DoCast(m_creature, SPELL_DENOUEMENT_WISP); else DoCast(Archimonde, SPELL_ANCIENT_SPARK); @@ -121,186 +120,65 @@ struct mob_ancient_wispAI : public ScriptedAI } }; -/* This script controls the Doomfire mob. Unlike the other Doomfire mob, this one does not stalk players. - Instead, this doomfire will simply stand in one place after spawning and deal damage to any players that - are within 3 yards. Another creature called Doomfire Targetting spawns this creature as well as stalks. */ +/* 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 TRINITY_DLL_DECL mob_doomfireAI : public ScriptedAI { mob_doomfireAI(Creature* c) : ScriptedAI(c) {} - uint32 CheckTimer; - uint32 RefreshTimer; - - bool TargetSelected; - - uint64 ArchimondeGUID; - uint64 TargetGUID; - - void Reset() - { - CheckTimer = 5000; - RefreshTimer = 0; - - TargetSelected = false; - - ArchimondeGUID = 0; - TargetGUID = 0; - } - - void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; } + void Reset() { } + void MoveInLineOfSight(Unit* who) { } void Aggro(Unit* who) { } - - void MoveInLineOfSight(Unit* who) - { - // Do not do anything if who does not exist, or we are refreshing our timer, or who is Doomfire, Archimonde or Doomfire targetting - if(!who || who == m_creature || RefreshTimer || who->GetEntry() == CREATURE_ANCIENT_WISP || - who->GetEntry() == CREATURE_ARCHIMONDE || who->GetEntry() == CREATURE_DOOMFIRE || - who->GetEntry() == CREATURE_DOOMFIRE_TARGETING || !who->isTargetableForAttack()) - return; - - if(m_creature->IsWithinDistInMap(who, 3)) - { - TargetSelected = true; - TargetGUID = who->GetGUID(); - RefreshTimer = 2000; - } - } - - void KilledUnit(Unit* victim) - { - bool suicide = true; - if(ArchimondeGUID) - { - Creature* Archimonde = ((Creature*)Unit::GetUnit((*m_creature), ArchimondeGUID)); - if(Archimonde && Archimonde->isAlive()) - { - suicide = false; - Archimonde->AI()->KilledUnit(victim); - } - } - - if(suicide) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - - void UpdateAI(const uint32 diff) - { - if(RefreshTimer < diff) - RefreshTimer = 0; - else RefreshTimer -= diff; - - if(TargetSelected && TargetGUID) - { - Unit* target = Unit::GetUnit((*m_creature), TargetGUID); - if(target && target->isAlive()) - { - target->CastSpell(target, SPELL_DOOMFIRE_DAMAGE, true); - TargetGUID = 0; - TargetSelected = false; - } - } - - if(CheckTimer < diff) - { - if(ArchimondeGUID) - { - Unit* Archimonde = Unit::GetUnit((*m_creature), ArchimondeGUID); - if(!Archimonde || !Archimonde->isAlive()) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - CheckTimer = 5000; - } - else m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - }else CheckTimer -= diff; - } + void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; } }; -/* This is the script for the Doomfire Targetting Mob. This mob simply follows players and/or travels in random directions and spawns the actual Doomfire which does damage to anyone that moves close. */ +/* 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 TRINITY_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI { mob_doomfire_targettingAI(Creature* c) : ScriptedAI(c) {} + uint64 TargetGUID; uint32 ChangeTargetTimer; - uint32 SummonTimer; // This timer will serve as both a summon timer for the doomfire that does damage as well as to check on Archionde - - uint64 ArchimondeGUID; void Reset() { + TargetGUID = 0; ChangeTargetTimer = 5000; - SummonTimer = 1000; - - ArchimondeGUID = 0; } - void Aggro(Unit* who) {} - void MoveInLineOfSight(Unit* who) { - // Do not do anything if who does not exist, or who is Doomfire, Archimonde or Doomfire targetting - if(!who || who == m_creature || who->GetEntry() == CREATURE_ARCHIMONDE - || who->GetEntry() == CREATURE_DOOMFIRE || who->GetEntry() == CREATURE_DOOMFIRE_TARGETING || !who->isTargetableForAttack()) - return; - - m_creature->AddThreat(who, 0.0f); + //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 Aggro(Unit* who) {} + void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; } void UpdateAI(const uint32 diff) { - if(!UpdateVictim()) - return; - - if(SummonTimer < diff) + if (ChangeTargetTimer < diff) { - if(ArchimondeGUID) + if (Unit *temp = Unit::GetUnit(*m_creature,TargetGUID)) { - Unit* Archimonde = Unit::GetUnit((*m_creature), ArchimondeGUID); - if(Archimonde && Archimonde->isAlive()) - { - Creature* Doomfire = DoSpawnCreature(CREATURE_DOOMFIRE, 0, 0, 2, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); - if(Doomfire) - { - Doomfire->CastSpell(Doomfire, SPELL_DOOMFIRE_VISUAL, true); - ((mob_doomfireAI*)Doomfire->AI())->ArchimondeGUID = ArchimondeGUID; - Doomfire->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - SummonTimer = 500; - } - else - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->GetMotionMaster()->MoveFollow(temp,0.0f,0.0f); + TargetGUID = 0; } else - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - }else SummonTimer -= diff; - - if(ChangeTargetTimer < diff) - { - Unit* target = NULL; - switch(rand()%2) { - case 0: // stalk player - target = SelectUnit(SELECT_TARGET_RANDOM, 1); - if(target && target->isAlive()) - { - m_creature->AddThreat(target, DoGetThreat(m_creature->getVictim())); - m_creature->GetMotionMaster()->MoveChase(target); - } - break; - - case 1: // random location - float x = 0; - float y = 0; - float z = 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); - break; + 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. @@ -308,8 +186,8 @@ struct TRINITY_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI 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 Targetting) that summons another mob (Doomfire every second) - Doomfire Targetting 'stalks' players whilst Doomfire damages player that are within range. */ + 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. */ // This is used to sort by distance in order to see who is the closest target, when checking for Finger of Death struct TargetDistanceOrder : public std::binary_function<const Unit, const Unit, bool> @@ -332,6 +210,9 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI ScriptedInstance* pInstance; + uint64 DoomfireSpiritGUID; + uint64 WorldTreeGUID; + uint32 DrainNordrassilTimer; uint32 FearTimer; uint32 AirBurstTimer; @@ -353,9 +234,12 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI void Reset() { - if(pInstance) + if (pInstance) pInstance->SetData(DATA_ARCHIMONDEEVENT, NOT_STARTED); + DoomfireSpiritGUID = 0; + WorldTreeGUID = 0; + DrainNordrassilTimer = 0; FearTimer = 42000; AirBurstTimer = 30000; @@ -382,7 +266,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); DoZoneInCombat(); - if(pInstance) + if (pInstance) pInstance->SetData(DATA_ARCHIMONDEEVENT, IN_PROGRESS); } @@ -390,12 +274,12 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI { switch(rand()%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; + 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)) + if (victim && (victim->GetTypeId() == TYPEID_PLAYER)) GainSoulCharge(((Player*)victim)); } @@ -428,7 +312,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if(pInstance) + if (pInstance) pInstance->SetData(DATA_ARCHIMONDEEVENT, DONE); } @@ -436,11 +320,11 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI { // 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))) + if (victim && m_creature->IsWithinDistInMap(victim, m_creature->GetAttackDistance(victim))) return false; std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList(); - if(m_threatlist.empty()) + if (m_threatlist.empty()) return false; std::list<Unit*> targets; @@ -448,56 +332,70 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI for( ; itr != m_threatlist.end(); ++itr) { Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); - if(pUnit && pUnit->isAlive()) + if (pUnit && pUnit->isAlive()) targets.push_back(pUnit); } - if(targets.empty()) + if (targets.empty()) return false; targets.sort(TargetDistanceOrder(m_creature)); Unit* target = targets.front(); - if(target) + if (target) { - if(!m_creature->IsWithinDistInMap(target, m_creature->GetAttackDistance(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, DoGetThreat(m_creature->getVictim())); + m_creature->AddThreat(target, m_creature->getThreatManager().getThreat(m_creature->getVictim())); } return false; } - void SummonDoomfire(Unit* target) + void JustSummoned(Creature *summoned) { - Creature* Doomfire = DoSpawnCreature(CREATURE_DOOMFIRE_TARGETING, rand()%30, rand()%30, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); - if(Doomfire) + summoned->setFaction(m_creature->getFaction()); + summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (summoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT) { - ((mob_doomfire_targettingAI*)Doomfire->AI())->ArchimondeGUID = m_creature->GetGUID(); - Doomfire->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - // Give Doomfire a taste of everyone in the threatlist = more targets to chase. - std::list<HostilReference*>::iterator itr; - for(itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr) - Doomfire->AddThreat(Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()), 1.0f); - Doomfire->setFaction(m_creature->getFaction()); - DoCast(Doomfire, SPELL_DOOMFIRE_SPAWN); - Doomfire->CastSpell(Doomfire, SPELL_DOOMFIRE_VISUAL, true); - if(target) - Doomfire->AI()->AttackStart(target); - - if(rand()%2 == 0) - DoScriptText(SAY_DOOMFIRE1, m_creature); - else - DoScriptText(SAY_DOOMFIRE2, m_creature); + DoomfireSpiritGUID = summoned->GetGUID(); } + + if (summoned->GetEntry() == CREATURE_DOOMFIRE) + { + summoned->CastSpell(summoned,SPELL_DOOMFIRE_SPAWN,false); + summoned->CastSpell(summoned,SPELL_DOOMFIRE,true,0,0,m_creature->GetGUID()); + + if (Unit *DoomfireSpirit = Unit::GetUnit(*m_creature, DoomfireSpiritGUID)) + { + summoned->GetMotionMaster()->MoveFollow(DoomfireSpirit,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(rand()%3) { case 0: @@ -513,42 +411,48 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI unleashSpell = SPELL_UNLEASH_SOUL_GREEN; break; } - if(m_creature->HasAura(chargeSpell, 0)) + + if (m_creature->HasAura(chargeSpell)) { - m_creature->RemoveSingleAuraFromStack(chargeSpell, 0); + m_creature->RemoveAuraFromStack(chargeSpell); DoCast(m_creature->getVictim(), unleashSpell); HasCast = true; SoulChargeCount--; } - if(HasCast) + + if (HasCast) SoulChargeTimer = 2000 + rand()%28000; } void UpdateAI(const uint32 diff) { - if(!InCombat) + if (!InCombat) { - if(pInstance) + if (pInstance) { // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished. - if((pInstance->GetData(DATA_AZGALOREVENT) < DONE) && ((m_creature->GetVisibility() != VISIBILITY_OFF) || (m_creature->getFaction() != 35))) + if ((pInstance->GetData(DATA_AZGALOREVENT) < DONE) && ((m_creature->GetVisibility() != VISIBILITY_OFF) || (m_creature->getFaction() != 35))) { m_creature->SetVisibility(VISIBILITY_OFF); m_creature->setFaction(35); } - else if((pInstance->GetData(DATA_AZGALOREVENT) >= DONE) && ((m_creature->GetVisibility() != VISIBILITY_ON) || (m_creature->getFaction() == 35))) + else if ((pInstance->GetData(DATA_AZGALOREVENT) >= DONE) && ((m_creature->GetVisibility() != VISIBILITY_ON) || (m_creature->getFaction() == 35))) { m_creature->setFaction(1720); m_creature->SetVisibility(VISIBILITY_ON); } } - if(DrainNordrassilTimer < diff) + if (DrainNordrassilTimer < diff) { - if(!IsChanneling) + if (!IsChanneling) { - Creature* Nordrassil = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 1200000); - if(Nordrassil) + 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->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686); @@ -556,26 +460,24 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI IsChanneling = true; } } - Creature* Nordrassil = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 5000); - if(Nordrassil) + + if (Unit *Nordrassil = Unit::GetUnit(*m_creature, WorldTreeGUID)) { - Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Nordrassil->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686); Nordrassil->CastSpell(m_creature, SPELL_DRAIN_WORLD_TREE_2, true); DrainNordrassilTimer = 1000; } }else DrainNordrassilTimer -= diff; } - if(!UpdateVictim()) + if (!UpdateVictim() ) return; - if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !BelowTenPercent && !Enraged) + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !BelowTenPercent && !Enraged) BelowTenPercent = true; - if(!Enraged) + if (!Enraged) { - if(EnrageTimer < diff) + if (EnrageTimer < diff) { if((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) > 10) { @@ -586,14 +488,15 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI } }else EnrageTimer -= diff; - if(CheckDistanceTimer < 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) + if (Check) { Check->SetVisibility(VISIBILITY_OFF); - if(m_creature->IsWithinDistInMap(Check, 75)) + + if (m_creature->IsWithinDistInMap(Check, 75)) { m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); @@ -605,22 +508,23 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI }else CheckDistanceTimer -= diff; } - if(BelowTenPercent) + if (BelowTenPercent) { - if(!HasProtected) + 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) + if (SummonWispTimer < diff) { Creature* Wisp = DoSpawnCreature(CREATURE_ANCIENT_WISP, rand()%40, rand()%40, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if(Wisp) + if (Wisp) { Wisp->AI()->AttackStart(m_creature); ((mob_ancient_wispAI*)Wisp->AI())->ArchimondeGUID = m_creature->GetGUID(); @@ -629,13 +533,13 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI ++WispCount; }else SummonWispTimer -= diff; - if(WispCount >= 30) + if (WispCount >= 30) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - if(Enraged) + if (Enraged) { - if(HandOfDeathTimer < diff) + if (HandOfDeathTimer < diff) { DoCast(m_creature->getVictim(), SPELL_HAND_OF_DEATH); HandOfDeathTimer = 2000; @@ -643,46 +547,57 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI return; // Don't do anything after this point. } - if(SoulChargeCount) + if (SoulChargeCount) { - if(SoulChargeTimer < diff) + if (SoulChargeTimer < diff) UnleashSoulCharge(); else SoulChargeTimer -= diff; } - if(GripOfTheLegionTimer < diff) + if (GripOfTheLegionTimer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_GRIP_OF_THE_LEGION); GripOfTheLegionTimer = 5000 + rand()%20000; }else GripOfTheLegionTimer -= diff; - if(AirBurstTimer < diff) + if (AirBurstTimer < diff) { - if(rand()%2 == 0) + if (rand()%2 == 0) DoScriptText(SAY_AIR_BURST1, m_creature); else DoScriptText(SAY_AIR_BURST2, m_creature); - DoCast(SelectUnit(SELECT_TARGET_RANDOM, 1), SPELL_AIR_BURST);//not on tank AirBurstTimer = 25000 + rand()%15000; }else AirBurstTimer -= diff; - if(FearTimer < diff) + if (FearTimer < diff) { DoCast(m_creature->getVictim(), SPELL_FEAR); FearTimer = 42000; }else FearTimer -= diff; - if(DoomfireTimer < diff) + if (DoomfireTimer < diff) { - SummonDoomfire(SelectUnit(SELECT_TARGET_RANDOM, 1)); - DoomfireTimer = 40000; + if (rand()%2 == 0) + 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 (MeleeRangeCheckTimer < diff) { - if(CanUseFingerOfDeath()) + if (CanUseFingerOfDeath()) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FINGER_OF_DEATH); MeleeRangeCheckTimer = 1000; @@ -719,7 +634,7 @@ void AddSC_boss_archimonde() { Script *newscript; newscript = new Script; - newscript->Name="boss_archimonde"; + newscript->Name = "boss_archimonde"; newscript->GetAI = &GetAI_boss_archimonde; newscript->RegisterSelf(); @@ -738,4 +653,3 @@ void AddSC_boss_archimonde() newscript->GetAI = &GetAI_mob_ancient_wisp; newscript->RegisterSelf(); } - diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/def_hyjal.h b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/def_hyjal.h index f6a77174e5d..948dbcaa53a 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/def_hyjal.h +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/def_hyjal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp index 9664fe6bf5f..a63856ea6f2 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -91,7 +91,7 @@ bool GossipSelect_npc_jaina_proudmoore(Player *player, Creature *_Creature, uint { if(_Creature->GetMap()->GetPlayersCountExceptGMs() < MINPLAYERS && !player->isGameMaster()) { - _Creature->Say("Did you come to die with me?",0,0); + _Creature->MonsterSay("Did you come to die with me?",0,0); return true; } hyjalAI* ai = ((hyjalAI*)_Creature->AI()); @@ -169,7 +169,7 @@ bool GossipSelect_npc_thrall(Player *player, Creature *_Creature, uint32 sender, { if(_Creature->GetMap()->GetPlayersCountExceptGMs() < MINPLAYERS && !player->isGameMaster())//to stop idiot farmers { - _Creature->Say("Did you come to die with me?",0,0); + _Creature->MonsterSay("Did you come to die with me?",0,0); return true; } hyjalAI* ai = ((hyjalAI*)_Creature->AI()); diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp index 582cab0e290..f27d2434550 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -329,6 +329,7 @@ void hyjalAI::Reset() // Misc WaveCount = 0; + EnemyCount = 0; // Set faction properly based on creature entry switch(m_creature->GetEntry()) @@ -407,7 +408,7 @@ void hyjalAI::EnterEvadeMode() void hyjalAI::Aggro(Unit *who) { if(IsDummy)return; - for(uint8 i = 0; i < 2; ++i) + for(uint8 i = 0; i < 3; ++i) if(Spell[i].Cooldown) SpellTimer[i] = Spell[i].Cooldown; @@ -657,7 +658,7 @@ void hyjalAI::Retreat() // First get all creatures. std::list<Creature*> creatures; Trinity::AllFriendlyCreaturesInGrid creature_check(m_creature); - Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(creatures, creature_check); + Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(m_creature, creatures, creature_check); TypeContainerVisitor <Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher); @@ -983,7 +984,7 @@ void hyjalAI::HideNearPos(float x, float y) // First get all creatures. std::list<Creature*> creatures; Trinity::AllFriendlyCreaturesInGrid creature_check(m_creature); - Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(creatures, creature_check); + Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(m_creature, creatures, creature_check); TypeContainerVisitor <Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher); @@ -1011,7 +1012,7 @@ void hyjalAI::RespawnNearPos(float x, float y) cell.SetNoCreate(); Trinity::RespawnDo u_do; - Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(u_do); + Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(m_creature, u_do); TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker); CellLock<GridReadGuard> cell_lock(cell, p); cell_lock->Visit(cell_lock, obj_worker, *m_creature->GetMap()); @@ -1020,7 +1021,7 @@ void hyjalAI::WaypointReached(uint32 i) { if(i == 1 || (i == 0 && m_creature->GetEntry() == THRALL)) { - m_creature->Yell("Hurry, we don't have much time",0,0); + m_creature->MonsterYell("Hurry, we don't have much time",0,0); WaitForTeleport = true; TeleportTimer = 20000; if(m_creature->GetEntry() == JAINA) @@ -1045,7 +1046,7 @@ void hyjalAI::WaypointReached(uint32 i) // First get all creatures. std::list<Creature*> creatures; Trinity::AllFriendlyCreaturesInGrid creature_check(m_creature); - Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(creatures, creature_check); + Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(m_creature, creatures, creature_check); TypeContainerVisitor <Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher); @@ -1087,7 +1088,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) std::list<Creature*> creatures; Trinity::AllFriendlyCreaturesInGrid creature_check(m_creature); - Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(creatures, creature_check); + Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> creature_searcher(m_creature, creatures, creature_check); TypeContainerVisitor <Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> creature_visitor(creature_searcher); diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.h b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.h index ba74c248707..f7aa2122db9 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.h +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp index 1a0aaafb35b..89a895713f7 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -38,6 +38,9 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance { instance_mount_hyjal(Map *map) : ScriptedInstance(map) {Initialize();}; + uint32 Encounters[ENCOUNTERS]; + std::string str_data; + uint64 RageWinterchill; uint64 Anetheron; uint64 Kazrogal; @@ -50,7 +53,7 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance uint64 ElfGate; uint32 Trash; - uint32 Encounters[ENCOUNTERS]; + uint32 hordeRetreat; uint32 allianceRetreat; @@ -110,13 +113,12 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance void OpenDoor(uint64 DoorGUID, bool open) { - if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) - Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + HandleGameObject(DoorGUID, open, NULL); } void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case 17767: RageWinterchill = creature->GetGUID(); break; case 17808: Anetheron = creature->GetGUID(); break; @@ -217,7 +219,20 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance debug_log("SD2: Instance Hyjal: Instance data updated for event %u (Data=%u)",type,data); if(data == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " " + << Encounters[3] << " " << Encounters[4] + << " " << allianceRetreat << " " << hordeRetreat; + + str_data = saveStream.str(); + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } uint32 GetData(uint32 type) @@ -252,19 +267,7 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance const char* Save() { - OUT_SAVE_INST_DATA; - std::ostringstream stream; - stream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " " - << Encounters[3] << " " << Encounters[4] << " " << allianceRetreat << " " << hordeRetreat; - char* out = new char[stream.str().length() + 1]; - strcpy(out, stream.str().c_str()); - if(out) - { - OUT_SAVE_INST_DATA_COMPLETE; - return out; - } - - return NULL; + return str_data.c_str(); } void Load(const char* in) @@ -276,8 +279,7 @@ struct TRINITY_DLL_DECL instance_mount_hyjal : public ScriptedInstance } OUT_LOAD_INST_DATA(in); - std::istringstream loadStream; - loadStream.str(in); + std::istringstream loadStream(in); loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3] >> Encounters[4] >> allianceRetreat >> hordeRetreat; for(uint8 i = 0; i < ENCOUNTERS; ++i) if(Encounters[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead. diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp index ab3a61ffe0b..be4c2660b51 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -56,9 +56,9 @@ struct TRINITY_DLL_DECL boss_captain_skarlocAI : public ScriptedAI void Reset() { - Holy_Light_Timer = 30000; + Holy_Light_Timer = 20000 + rand()%10000; Cleanse_Timer = 10000; - HammerOfJustice_Timer = 60000; + HammerOfJustice_Timer = 20000 + rand()%15000; HolyShield_Timer = 240000; DevotionAura_Timer = 3000; Consecration_Timer = 8000; @@ -126,14 +126,14 @@ struct TRINITY_DLL_DECL boss_captain_skarlocAI : public ScriptedAI if (DevotionAura_Timer < diff) { DoCast(m_creature, SPELL_DEVOTION_AURA); - DevotionAura_Timer = 60000; + DevotionAura_Timer = 45000 + rand()%10000; }else DevotionAura_Timer -= diff; //Consecration if (Consecration_Timer < diff) { //DoCast(m_creature->getVictim(), SPELL_CONSECRATION); - Consecration_Timer = 8000; + Consecration_Timer = 5000 + rand()%5000; }else Consecration_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp index 39d42413c5f..60ef9ae55fe 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -56,8 +56,8 @@ struct TRINITY_DLL_DECL boss_epoch_hunterAI : public ScriptedAI void Reset() { - SandBreath_Timer = 25000; - ImpendingDeath_Timer = 30000; + SandBreath_Timer = 8000 + rand()%8000; + ImpendingDeath_Timer = 25000 + rand()%5000; WingBuffet_Timer = 35000; Mda_Timer = 40000; } @@ -108,13 +108,13 @@ struct TRINITY_DLL_DECL boss_epoch_hunterAI : public ScriptedAI case 1: DoScriptText(SAY_BREATH2, m_creature); break; } - SandBreath_Timer = 25000+rand()%5000; + SandBreath_Timer = 10000 + rand()%10000; }else SandBreath_Timer -= diff; if (ImpendingDeath_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_IMPENDING_DEATH); - ImpendingDeath_Timer = 30000+rand()%5000; + ImpendingDeath_Timer = 25000+rand()%5000; }else ImpendingDeath_Timer -= diff; if (WingBuffet_Timer < diff) diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp index 67d0db45872..b36555cd074 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -159,7 +159,7 @@ struct TRINITY_DLL_DECL boss_lieutenant_drakeAI : public ScriptedAI { DoScriptText(SAY_SHOUT, m_creature); DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); - Fear_Timer = 30000+rand()%10000; + Fear_Timer = 25000+rand()%10000; }else Fear_Timer -= diff; //Mortal Strike @@ -167,7 +167,7 @@ struct TRINITY_DLL_DECL boss_lieutenant_drakeAI : public ScriptedAI { DoScriptText(SAY_MORTAL, m_creature); DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); - MortalStrike_Timer = 45000+rand()%5000; + MortalStrike_Timer = 20000+rand()%10000; }else MortalStrike_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h index 01c0e1334ac..39db5bed06a 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/def_old_hillsbrad.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index 9ec75c06e0c..8b0a62c4452 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -98,7 +98,7 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case THRALL_ENTRY: ThrallGUID = creature->GetGUID(); diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index b720eb946d6..96a903a0795 100644 --- a/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -235,12 +235,12 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI case 9: DoScriptText(SAY_TH_ARMORY, m_creature); m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); - 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); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 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_ID+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->SetUInt32Value(UNIT_FIELD_DISPLAYID, THRALL_MODEL_EQUIPPED); @@ -278,7 +278,6 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI break; case 31: DoScriptText(SAY_TH_MOUNTS_UP, m_creature); - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); DoMount(); break; case 37: @@ -347,11 +346,9 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI break; case 96: DoScriptText(SAY_TH_EPOCH_WONDER, m_creature); - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); break; case 97: DoScriptText(SAY_TH_EPOCH_KILL_TARETHA, m_creature); - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); break; case 98: @@ -386,11 +383,11 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI //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; + break; case 108: - //last waypoint, just set Thrall invisible, respawn is turned off + //last waypoint, just set Thrall invisible, respawn is turned off m_creature->SetVisibility(VISIBILITY_OFF); - break; + break; } } @@ -406,12 +403,8 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI { DoUnmount(); HadMount = false; - 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->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, THRALL_MODEL_UNEQUIPPED); } if( IsBeingEscorted ) diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp index 4a92666933d..e9b5841d005 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -519,7 +519,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI return; } - if( !m_creature->HasAura(SPELL_WINDFURY_WEAPON, 0) ) + if( !m_creature->HasAura(SPELL_WINDFURY_WEAPON) ) { DoCast(m_creature, SPELL_WINDFURY_WEAPON); } diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp index 5f96d979c09..d4263ec4747 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp index 1a82ee38900..47a45c9db6f 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -370,7 +370,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI Unit *target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target && !target->HasAura(SPELL_STATIC_CHARGE_TRIGGER, 0)) + if(target && !target->HasAura(SPELL_STATIC_CHARGE_TRIGGER)) //cast Static Charge every 2 seconds for 20 seconds DoCast(target, SPELL_STATIC_CHARGE_TRIGGER); @@ -576,12 +576,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI } } }; -class TRINITY_DLL_DECL VashjSurgeAura : public Aura -{ - public: - VashjSurgeAura(SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) - {} -}; + //Enchanted Elemental //If one of them reaches Vashj he will increase her damage done by 5%. struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI @@ -665,13 +660,14 @@ struct TRINITY_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI SpellEntry *spell = (SpellEntry *)GetSpellStore()->LookupEntry(SPELL_SURGE); if( spell ) { - for(uint32 i = 0;i<3;i++) + uint8 eff_mask=0; + for (int i=0; i<3; i++) { if (!spell->Effect[i]) continue; - - Vashj->AddAura(new VashjSurgeAura(spell, i, NULL, Vashj, Vashj)); + eff_mask|=1<<i; } + Vashj->AddAura(new Aura(spell, eff_mask, NULL, Vashj, Vashj)); } m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } @@ -923,7 +919,7 @@ struct TRINITY_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI if(Vashj && Vashj->isAlive()) { //start visual channel - if (!Casted || !Vashj->HasAura(SPELL_MAGIC_BARRIER,0)) + if (!Casted || !Vashj->HasAura(SPELL_MAGIC_BARRIER)) { m_creature->CastSpell(Vashj,SPELL_MAGIC_BARRIER,true); Casted = true; diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp index 612d3f017f0..81d85180cb4 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -65,12 +65,6 @@ EndScriptData */ #define SAY_FREE -1548019 #define SAY_DEATH -1548020 -class TRINITY_DLL_DECL InsidiousAura : public Aura { -public: - InsidiousAura(SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) - {} -}; - struct TRINITY_DLL_DECL mob_inner_demonAI : public ScriptedAI { mob_inner_demonAI(Creature *c) : ScriptedAI(c) @@ -91,7 +85,7 @@ struct TRINITY_DLL_DECL mob_inner_demonAI : public ScriptedAI void JustDied(Unit *victim) { Unit* pUnit = Unit::GetUnit((*m_creature),victimGUID); - if (pUnit && pUnit->HasAura(SPELL_INSIDIOUS_WHISPER,0)) + if (pUnit && pUnit->HasAura(SPELL_INSIDIOUS_WHISPER)) pUnit->RemoveAurasDueToSpell(SPELL_INSIDIOUS_WHISPER); } @@ -128,7 +122,7 @@ struct TRINITY_DLL_DECL mob_inner_demonAI : public ScriptedAI }else Link_Timer -= diff; - if(!m_creature->HasAura(AURA_DEMONIC_ALIGNMENT, 0)) + if(!m_creature->HasAura(AURA_DEMONIC_ALIGNMENT)) DoCast(m_creature, AURA_DEMONIC_ALIGNMENT,true); if(ShadowBolt_Timer < diff) @@ -194,8 +188,8 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI InnderDemon_Count = 0; m_creature->SetSpeed( MOVE_RUN, 2.0f, true); m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY , 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true); m_creature->SetCorpseDelay(1000*60*60); if(pInstance) @@ -229,7 +223,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI } void MoveInLineOfSight(Unit *who) { - if(m_creature->HasAura(AURA_BANISH, 0)) + if(m_creature->HasAura(AURA_BANISH)) return; if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) ) @@ -267,13 +261,13 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI } // channelers == 0 remove banish aura - if(AliveChannelers == 0 && m_creature->HasAura(AURA_BANISH, 0)) + if(AliveChannelers == 0 && m_creature->HasAura(AURA_BANISH)) { // removing banish aura m_creature->RemoveAurasDueToSpell(AURA_BANISH); // Leotheras is getting immune again - m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, 1<<MECHANIC_BANISH, true); // changing model to bloodelf m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_NIGHTELF); @@ -290,19 +284,19 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI StartEvent(); } } - else if(AliveChannelers != 0 && !m_creature->HasAura(AURA_BANISH, 0)) + else if(AliveChannelers != 0 && !m_creature->HasAura(AURA_BANISH)) { // channelers != 0 apply banish aura // removing Leotheras banish immune to apply AURA_BANISH - m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, MECHANIC_BANISH, false); + m_creature->ApplySpellImmune(AURA_BANISH, IMMUNITY_MECHANIC, 1<<MECHANIC_BANISH, false); DoCast(m_creature, AURA_BANISH); // changing model m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON); // and removing weapons - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY , 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); } } @@ -390,7 +384,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI void Aggro(Unit *who) { - if(m_creature->HasAura(AURA_BANISH, 0)) + if(m_creature->HasAura(AURA_BANISH)) return; m_creature->LoadEquipment(m_creature->GetEquipmentId()); @@ -399,7 +393,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI void UpdateAI(const uint32 diff) { //Return since we have no target - if (m_creature->HasAura(AURA_BANISH, 0) || !UpdateVictim()) + if (m_creature->HasAura(AURA_BANISH) || !UpdateVictim()) { if(BanishTimer<diff) { @@ -408,7 +402,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI }else BanishTimer -= diff; return; } - if(m_creature->HasAura(SPELL_WHIRLWIND, 0)) + if(m_creature->HasAura(SPELL_WHIRLWIND)) if(Whirlwind_Timer < diff) { Unit *newTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); @@ -422,7 +416,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI }else Whirlwind_Timer -= diff; // reseting after changing forms and after ending whirlwind - if(NeedThreatReset && !m_creature->HasAura(SPELL_WHIRLWIND, 0)) + if(NeedThreatReset && !m_creature->HasAura(SPELL_WHIRLWIND)) { // when changing forms seting timers (or when ending whirlwind - to avoid adding new variable i use Whirlwind_Timer to countdown 2s while whirlwinding) if(DemonForm) @@ -446,7 +440,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI if(!DemonForm) { //Whirldind Timer - if(!m_creature->HasAura(SPELL_WHIRLWIND, 0)) + if(!m_creature->HasAura(SPELL_WHIRLWIND)) { if(Whirlwind_Timer < diff) { @@ -465,8 +459,8 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_creature->RemoveAurasDueToSpell(SPELL_WHIRLWIND,0); m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_DEMON); DoScriptText(SAY_SWITCH_TO_DEMON, m_creature); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY , 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); DemonForm = true; NeedThreatReset = true; SwitchToDemon_Timer = 45000; @@ -513,12 +507,14 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI ((ScriptedAI *)demon->AI())->AttackStart( (*itr) ); ((mob_inner_demonAI *)demon->AI())->victimGUID = (*itr)->GetGUID(); + uint8 eff_mask=0; for (int i=0; i<3; i++) { if (!spell->Effect[i]) continue; - (*itr)->AddAura(new InsidiousAura(spell, i, NULL, (*itr), (*itr))); + eff_mask|=1<<i; } + (*itr)->AddAura(new Aura(spell, eff_mask, NULL, (*itr), (*itr))); if( InnderDemon_Count > 4 ) InnderDemon_Count = 0; //Safe storing of creatures diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp index 02125f5fd38..653799f08f5 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -266,7 +266,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if (i->getSource()->isAlive() && i->getSource()->IsInWater() && !i->getSource()->HasAura(SPELL_SCALDINGWATER, 0)) + if (i->getSource()->isAlive() && i->getSource()->IsInWater() && !i->getSource()->HasAura(SPELL_SCALDINGWATER)) i->getSource()->CastSpell(i->getSource(), SPELL_SCALDINGWATER, true); else if(!i->getSource()->IsInWater()) i->getSource()->RemoveAurasDueToSpell(SPELL_SCALDINGWATER); diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 79ce2373694..224f22f804e 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h index aceabea4b5c..13144bc93c0 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/def_serpent_shrine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp index 94e94c9be50..ef69ab220bf 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -137,12 +137,12 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance void OpenDoor(uint64 DoorGUID, bool open) { if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) - Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + Door->SetGoState(open ? 0 : 1); } void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case 21212: LadyVashj = creature->GetGUID(); break; case 21214: Karathress = creature->GetGUID(); break; diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp index cafbf8e3f4f..8ffee603597 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp index 1515b14e3a2..e5b12065298 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp index 7090d678768..ede9a38126f 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -143,7 +143,7 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI cell.SetNoCreate(); Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*m_creature, entry, true, range); - Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(pCreature, creature_check); + Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_creature, pCreature, creature_check); TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher); diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/def_steam_vault.h b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/def_steam_vault.h index 09a76d482b7..4b407ac4816 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/def_steam_vault.h +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/def_steam_vault.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp index b76cfedb777..92df1fffbe1 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp index 328bd8ee1ce..99d313d303a 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_the_black_stalker.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_the_black_stalker.cpp index 325b6ffe244..43342a276aa 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_the_black_stalker.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_the_black_stalker.cpp @@ -121,7 +121,7 @@ struct TRINITY_DLL_DECL boss_the_black_stalkerAI : public ScriptedAI { if(Unit* target = (Unit*)Unit::GetUnit(*m_creature, LevitatedTarget)) { - if(!target->HasAura(SPELL_LEVITATE,0)) + if(!target->HasAura(SPELL_LEVITATE)) { LevitatedTarget = 0; return; @@ -131,7 +131,7 @@ struct TRINITY_DLL_DECL boss_the_black_stalkerAI : public ScriptedAI target->AddAura(SPELL_SUSPENSION, target); LevitatedTarget = 0; } - else + else { target->CastSpell(target, SPELL_MAGNETIC_PULL, true); InAir = true; diff --git a/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp b/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp index aea0e52e4f7..fcb13e9f479 100644 --- a/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp +++ b/src/bindings/scripts/scripts/zone/darkshore/darkshore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp b/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp index 3f71dc9041b..cafdc5fbc46 100644 --- a/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp +++ b/src/bindings/scripts/scripts/zone/deadmines/deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -69,7 +69,7 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance CannonBlast_Timer = CANNON_BLAST_TIMER; // it's a hack - Mr. Smite should do that but his too far away IronCladDoor->SetName("Mr. Smite"); - IronCladDoor->Yell(SAY_MR_SMITE_ALARM1, LANG_UNIVERSAL, 0); + IronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM1, LANG_UNIVERSAL, 0); DoPlaySound(IronCladDoor, SOUND_MR_SMITE_ALARM1); State=CANNON_BLAST_INITIATED; break; @@ -81,7 +81,7 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance ShootCannon(); BlastOutDoor(); LeverStucked(); - IronCladDoor->Yell(SAY_MR_SMITE_ALARM2, LANG_UNIVERSAL, 0); + IronCladDoor->MonsterYell(SAY_MR_SMITE_ALARM2, LANG_UNIVERSAL, 0); DoPlaySound(IronCladDoor, SOUND_MR_SMITE_ALARM2); State = PIRATES_ATTACK; }else @@ -120,13 +120,13 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance void ShootCannon() { - DefiasCannon->SetUInt32Value(GAMEOBJECT_STATE, 0); + DefiasCannon->SetGoState(0); DoPlaySound(DefiasCannon, SOUND_CANNONFIRE); } void BlastOutDoor() { - IronCladDoor->SetUInt32Value(GAMEOBJECT_STATE, 2); + IronCladDoor->SetGoState(2); DoPlaySound(IronCladDoor, SOUND_DESTROYDOOR); } diff --git a/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp b/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp index abba40ffe2a..c9cc4625b97 100644 --- a/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp +++ b/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -44,7 +44,7 @@ struct TRINITY_DLL_DECL npc_narm_faulkAI : public ScriptedAI { lifeTimer = 120000; m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 32); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,7); // lay down + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); spellHit = false; } @@ -59,7 +59,7 @@ struct TRINITY_DLL_DECL npc_narm_faulkAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (!m_creature->GetUInt32Value(UNIT_FIELD_BYTES_1)) + if (m_creature->IsStandState()) { if(lifeTimer < diff) m_creature->AI()->EnterEvadeMode(); @@ -73,7 +73,7 @@ struct TRINITY_DLL_DECL npc_narm_faulkAI : public ScriptedAI if(Spellkind->Id == 8593 && !spellHit) { DoCast(m_creature,32343); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); //m_creature->RemoveAllAuras(); DoScriptText(SAY_HEAL, m_creature); diff --git a/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp b/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp index 6e3e0fbb6d7..67f68334410 100644 --- a/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp +++ b/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp index 6d068ec1543..167dd0455af 100644 --- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp +++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -118,7 +118,7 @@ bool GossipHello_npc_tirion_fordring(Player *player, Creature *_Creature) if (_Creature->isQuestGiver()) player->PrepareQuestMenu( _Creature->GetGUID() ); - if (player->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && player->getStandState() == PLAYER_STATE_SIT ) + if (player->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && player->getStandState() == UNIT_STAND_STATE_SIT ) player->ADD_GOSSIP_ITEM( 0, "I am ready to hear your tale, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); diff --git a/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp b/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp index 2e07f91984c..d1fa414ea11 100644 --- a/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp +++ b/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -44,7 +44,7 @@ struct TRINITY_DLL_DECL npc_henze_faulkAI : public ScriptedAI { lifeTimer = 120000; m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 32); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,7); // lay down + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); // lay down spellHit = false; } @@ -59,7 +59,7 @@ struct TRINITY_DLL_DECL npc_henze_faulkAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (!m_creature->GetUInt32Value(UNIT_FIELD_BYTES_1)) + if (m_creature->IsStandState()) { if(lifeTimer < diff) m_creature->AI()->EnterEvadeMode(); @@ -73,7 +73,7 @@ struct TRINITY_DLL_DECL npc_henze_faulkAI : public ScriptedAI if(Spellkind->Id == 8593 && !spellHit) { DoCast(m_creature,32343); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); //m_creature->RemoveAllAuras(); DoScriptText(SAY_HEAL, m_creature); diff --git a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp index ea30e0a9ca6..f6a5c5bd4a2 100644 --- a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp +++ b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,12 +17,11 @@ /* ScriptData SDName: Eversong_Woods SD%Complete: 100 -SDComment: Quest support: 8346, 8483, 8488, 8490 +SDComment: Quest support: 8483, 8488, 8490 SDCategory: Eversong Woods EndScriptData */ /* ContentData -mobs_mana_tapped npc_prospector_anvilward npc_apprentice_mirveda npc_infused_crystal @@ -32,31 +31,6 @@ EndContentData */ #include "../../npc/npc_escortAI.h" /*###### -## mobs_mana_tapped -######*/ - -struct TRINITY_DLL_DECL mobs_mana_tappedAI : public ScriptedAI -{ - mobs_mana_tappedAI(Creature *c) : ScriptedAI(c) {} - - void Reset() { } - - void Aggro(Unit *who) { } - - void SpellHit(Unit *caster, const SpellEntry *spell) - { - if( caster->GetTypeId() == TYPEID_PLAYER) - if( ((Player*)caster)->GetQuestStatus(8346) == QUEST_STATUS_INCOMPLETE && !((Player*)caster)->GetReqKillOrCastCurrentCount(8346, m_creature->GetEntry()) && spell->Id == 28734) - ((Player*)caster)->CastedCreatureOrGO(15468, m_creature->GetGUID(), spell->Id); - return; - } -}; -CreatureAI* GetAI_mobs_mana_tapped(Creature *_Creature) -{ - return new mobs_mana_tappedAI (_Creature); -} - -/*###### ## npc_prospector_anvilward ######*/ @@ -229,7 +203,7 @@ struct TRINITY_DLL_DECL npc_secondTrialAI : public ScriptedAI questPhase = 0; summonerGuid = 0; - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_KNEEL); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_KNEEL); m_creature->setFaction(FACTION_FRIENDLY); spellFlashLight = false; @@ -268,7 +242,7 @@ struct TRINITY_DLL_DECL npc_secondTrialAI : public ScriptedAI if ( questPhase == 1 ) { if ( timer < diff ) { - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND); m_creature->setFaction(FACTION_HOSTILE); questPhase = 0; @@ -539,7 +513,7 @@ bool GOHello_go_second_trial(Player *player, GameObject* _GO) Creature* event_controller = NULL; Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*_GO, MASTER_KELERUN_BLOODMOURN, true, 30); - Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(event_controller, u_check); + Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(player, event_controller, u_check); TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher); //cell_lock->Visit(cell_lock, grid_unit_searcher, *MapManager::Instance().GetMap(_GO->GetMap(), _GO)); cell_lock->Visit(cell_lock, grid_unit_searcher, *(_GO->GetMap())); @@ -754,11 +728,6 @@ void AddSC_eversong_woods() Script *newscript; newscript = new Script; - newscript->Name="mobs_mana_tapped"; - newscript->GetAI = &GetAI_mobs_mana_tapped; - newscript->RegisterSelf(); - - newscript = new Script; newscript->Name= "npc_prospector_anvilward"; newscript->GetAI = &GetAI_npc_prospector_anvilward; newscript->pGossipHello = &GossipHello_npc_prospector_anvilward; diff --git a/src/bindings/scripts/scripts/zone/felwood/felwood.cpp b/src/bindings/scripts/scripts/zone/felwood/felwood.cpp index b7a4bc03c59..4103283be43 100644 --- a/src/bindings/scripts/scripts/zone/felwood/felwood.cpp +++ b/src/bindings/scripts/scripts/zone/felwood/felwood.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/feralas/feralas.cpp b/src/bindings/scripts/scripts/zone/feralas/feralas.cpp index f3822bcdb7a..ff30fc3f90c 100644 --- a/src/bindings/scripts/scripts/zone/feralas/feralas.cpp +++ b/src/bindings/scripts/scripts/zone/feralas/feralas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp index d48a0d77051..54e4e3e4739 100644 --- a/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp +++ b/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -135,17 +135,21 @@ bool GOHello_gilded_brazier(Player *player, GameObject* _GO) ## npc_ranger_lilatha ######*/ -#define SAY_START -1000140 -#define SAY_PROGRESS1 -1000141 -#define SAY_PROGRESS2 -1000142 -#define SAY_PROGRESS3 -1000143 -#define SAY_END1 -1000144 -#define SAY_END2 -1000145 -#define SAY_CAPTAIN_ANSWER -1000146 - -#define QUEST_ESCAPE_FROM_THE_CATACOMBS 9212 -#define GO_CAGE 181152 -#define NPC_CAPTAIN_HELIOS 16220 +enum +{ + SAY_START = -1000140, + SAY_PROGRESS1 = -1000141, + SAY_PROGRESS2 = -1000142, + SAY_PROGRESS3 = -1000143, + SAY_END1 = -1000144, + SAY_END2 = -1000145, + SAY_CAPTAIN_ANSWER = -1000146, + + QUEST_ESCAPE_FROM_THE_CATACOMBS = 9212, + GO_CAGE = 181152, + NPC_CAPTAIN_HELIOS = 16220, + FACTION_SMOON_E = 1603, +}; struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI { @@ -249,41 +253,7 @@ CreatureAI* GetAI_npc_ranger_lilathaAI(Creature *_Creature) { npc_ranger_lilathaAI* ranger_lilathaAI = new npc_ranger_lilathaAI(_Creature); - ranger_lilathaAI->AddWaypoint(0, 7545.07, -7359.87, 162.354, 4000); // Say0 - ranger_lilathaAI->AddWaypoint(1, 7550.048340, -7362.237793, 162.235657); - ranger_lilathaAI->AddWaypoint(2, 7566.976074, -7364.315430, 161.738770); - ranger_lilathaAI->AddWaypoint(3, 7578.830566, -7361.677734, 161.738770); - ranger_lilathaAI->AddWaypoint(4, 7590.969238, -7359.053711, 162.257660); - ranger_lilathaAI->AddWaypoint(5, 7598.354004, -7362.815430, 162.256683, 4000); // Say1 - ranger_lilathaAI->AddWaypoint(6, 7605.861328, -7380.424316, 161.937073); - ranger_lilathaAI->AddWaypoint(7, 7605.295410, -7387.382813, 157.253998); - ranger_lilathaAI->AddWaypoint(8, 7606.131836, -7393.893555, 156.941925); - ranger_lilathaAI->AddWaypoint(9, 7615.207520, -7400.187012, 157.142639); - ranger_lilathaAI->AddWaypoint(10, 7618.956543, -7402.652832, 158.202042); - ranger_lilathaAI->AddWaypoint(11, 7636.850586, -7401.756836, 162.144791); - ranger_lilathaAI->AddWaypoint(12, 7637.058105, -7404.944824, 162.206970, 4000);// Say2 - ranger_lilathaAI->AddWaypoint(13, 7636.910645, -7412.585449, 162.366425); - ranger_lilathaAI->AddWaypoint(14, 7637.607910, -7425.591797, 162.630661); - ranger_lilathaAI->AddWaypoint(15, 7637.816895, -7459.057129, 163.302704); - ranger_lilathaAI->AddWaypoint(16, 7638.859863, -7470.902344, 162.517059); - ranger_lilathaAI->AddWaypoint(17, 7641.395996, -7488.217285, 157.381287); - ranger_lilathaAI->AddWaypoint(18, 7634.455566, -7505.451660, 154.682159); - ranger_lilathaAI->AddWaypoint(19, 7631.906738, -7516.948730, 153.597382); // say3 - ranger_lilathaAI->AddWaypoint(20, 7622.231445, -7537.037598, 151.587112); - ranger_lilathaAI->AddWaypoint(21, 7610.921875, -7550.670410, 149.639374); - ranger_lilathaAI->AddWaypoint(22, 7598.229004, -7562.551758, 145.953888); - ranger_lilathaAI->AddWaypoint(23, 7588.509277, -7577.755371, 148.294479); - ranger_lilathaAI->AddWaypoint(24, 7567.339355, -7608.456055, 146.006485); - ranger_lilathaAI->AddWaypoint(25, 7562.547852, -7617.417969, 148.097504); - ranger_lilathaAI->AddWaypoint(26, 7561.508789, -7645.064453, 151.245163); - ranger_lilathaAI->AddWaypoint(27, 7563.337402, -7654.652344, 151.227158); - ranger_lilathaAI->AddWaypoint(28, 7565.533691, -7658.296387, 151.248886); - ranger_lilathaAI->AddWaypoint(29, 7571.155762, -7659.118652, 151.244568); - ranger_lilathaAI->AddWaypoint(30, 7579.119629, -7662.213867, 151.651505); - ranger_lilathaAI->AddWaypoint(31, 7603.768066, -7667.000488, 153.997726); - ranger_lilathaAI->AddWaypoint(32, 7603.768066, -7667.000488, 153.997726, 4000); // Say4 & Set orientation - ranger_lilathaAI->AddWaypoint(33, 7603.768066, -7667.000488, 153.997726, 8000); // Say5 & Set orientation - ranger_lilathaAI->AddWaypoint(34, 7603.768066, -7667.000488, 153.997726); + ranger_lilathaAI->FillPointMovementListForCreature(); return (CreatureAI*)ranger_lilathaAI; } diff --git a/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp b/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp index e6f12fd852b..96986367077 100644 --- a/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp +++ b/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,12 +6,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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 @@ -24,7 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "def_gruuls_lair.h" -/* Yells & Quotes */ #define SAY_AGGRO -1565010 #define SAY_SLAM1 -1565011 #define SAY_SLAM2 -1565012 @@ -36,17 +35,18 @@ EndScriptData */ #define SAY_DEATH -1565018 #define EMOTE_GROW -1565019 -/* Spells */ -#define SPELL_GROWTH 36300 -#define SPELL_CAVE_IN 36240 -#define 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) -#define SPELL_REVERBERATION 36297 //AoE Silence -#define SPELL_SHATTER 33654 -#define SPELL_MAGNETIC_PULL 28337 -#define SPELL_KNOCK_BACK 24199 //Knockback spell until correct implementation is made +#define SPELL_GROWTH 36300 +#define SPELL_CAVE_IN 36240 +#define 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) +#define SPELL_REVERBERATION 36297 //AoE Silence +#define SPELL_SHATTER 33654 + #define SPELL_SHATTER_EFFECT 33671 #define SPELL_HURTFUL_STRIKE 33813 #define SPELL_STONED 33652 //Spell is self cast +#define SPELL_MAGNETIC_PULL 28337 +#define SPELL_KNOCK_BACK 24199 //Knockback spell until correct implementation is made + #define SPELL_GRONN_LORDS_GRASP 33572 //Triggered by Ground Slam struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI @@ -60,6 +60,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI uint32 Growth_Timer; uint32 CaveIn_Timer; + uint32 CaveIn_StaticTimer; uint32 GroundSlamTimer; uint32 GroundSlamStage; uint32 PerformingGroundSlam; @@ -69,62 +70,60 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI void Reset() { Growth_Timer= 30000; - CaveIn_Timer= 40000; + CaveIn_Timer= 27000; + CaveIn_StaticTimer = 30000; GroundSlamTimer= 35000; GroundSlamStage= 0; PerformingGroundSlam= false; HurtfulStrike_Timer= 8000; Reverberation_Timer= 60000+45000; - if(pInstance) + if (pInstance) { pInstance->SetData(DATA_GRUULEVENT, NOT_STARTED); + GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR)); + if (EncounterDoor) + EncounterDoor->SetGoState(0); // Open the encounter door + }else error_log(ERROR_INST_DATA); - GameObject* Door = NULL; - Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR)); - if(Door) - Door->SetGoState(0); - } - } - - void JustDied(Unit* Killer) - { - DoScriptText(SAY_DEATH, m_creature); - - if(pInstance) - { - pInstance->SetData(DATA_GRUULEVENT, DONE); - - GameObject* Door = NULL; - Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR)); - if(Door) - Door->SetGoState(0); - } + m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void Aggro(Unit *who) { DoScriptText(SAY_AGGRO, m_creature); - DoZoneInCombat(); - if(pInstance) - { + if (pInstance) + { pInstance->SetData(DATA_GRUULEVENT, IN_PROGRESS); - - GameObject* Door = NULL; - Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR)); - if(Door) - Door->SetGoState(1); - } + GameObject* EncounterDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_GRUULDOOR)); + if (EncounterDoor) + EncounterDoor->SetGoState(1); //Close the encounter door, open it in JustDied/Reset + } } void KilledUnit() { switch(rand()%3) { - case 0: DoScriptText(SAY_SLAY1, m_creature); break; - case 1: DoScriptText(SAY_SLAY2, m_creature); break; - case 2: DoScriptText(SAY_SLAY3, m_creature); break; + 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) + { + DoScriptText(SAY_DEATH, m_creature); + + if(pInstance) + { + pInstance->SetData(DATA_GRUULEVENT, DONE); + + GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GRUULDOOR)); + if (EncounterDoor) + EncounterDoor->SetGoState(0); // Open the encounter door } } @@ -138,14 +137,14 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI // Gruul can cast this spell up to 30 times if (Growth_Timer < diff) { - DoCast(m_creature,SPELL_GROWTH); DoScriptText(EMOTE_GROW, m_creature); + DoCast(m_creature,SPELL_GROWTH); Growth_Timer = 30000; }else Growth_Timer -= diff; - if(PerformingGroundSlam) + if (PerformingGroundSlam) { - if(GroundSlamTimer < diff) + if (GroundSlamTimer < diff) { switch(GroundSlamStage) { @@ -161,7 +160,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI { Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); - if(target && target->GetTypeId() == TYPEID_PLAYER) + if (target && target->GetTypeId() == TYPEID_PLAYER) knockback_targets.push_back(target); } @@ -171,7 +170,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI Unit *target = *itr; Unit *target2 = *(knockback_targets.begin() + rand()%knockback_targets.size()); - if(target && target2) + if (target && target2) { switch(rand()%2) { @@ -182,7 +181,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI } GroundSlamTimer = 7000; - break; + break; } case 1: @@ -202,18 +201,15 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI } GroundSlamTimer = 5000; - - break; + break; } case 2: { //The dummy shatter spell is cast DoCast(m_creature, SPELL_SHATTER); - GroundSlamTimer = 1000; - - break; + break; } case 3: @@ -238,20 +234,20 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(); Unit *victim = m_creature->getVictim(); - if(victim) + if (victim) { m_creature->GetMotionMaster()->MoveChase(victim); m_creature->SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID()); } PerformingGroundSlam = false; - GroundSlamTimer =120000; HurtfulStrike_Timer= 8000; - if(Reverberation_Timer < 10000) //Give a little time to the players to undo the damage from shatter + + if (Reverberation_Timer < 10000) //Give a little time to the players to undo the damage from shatter Reverberation_Timer += 10000; - break; + break; } } @@ -280,7 +276,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI if (Reverberation_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_REVERBERATION, true); - Reverberation_Timer = 30000; + Reverberation_Timer = 15000 + rand()%10000; }else Reverberation_Timer -= diff; // Cave In @@ -289,7 +285,11 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_CAVE_IN); - CaveIn_Timer = 20000; + if(CaveIn_StaticTimer >= 4000) + CaveIn_StaticTimer -= 2000; + + CaveIn_Timer = CaveIn_StaticTimer; + }else CaveIn_Timer -= diff; // Ground Slam, Gronn Lord's Grasp, Stoned, Shatter diff --git a/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp b/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp index cb20e606800..4437938a47a 100644 --- a/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp +++ b/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -237,8 +237,8 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI DoScriptText(SAY_ENRAGE, m_creature); m_creature->CastSpell(m_creature, SPELL_DUAL_WIELD, true); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); } if(Phase2) @@ -445,7 +445,7 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI if(target) DoCast(target, SPELL_GREATER_POLYMORPH); - GreaterPolymorph_Timer = 20000; + GreaterPolymorph_Timer = 15000 + rand()%5000; }else GreaterPolymorph_Timer -= diff; //LightningBolt_Timer @@ -483,13 +483,15 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI uint32 GreaterPowerWordShield_Timer; uint32 Heal_Timer; + uint32 PrayerofHealing_Timer; ScriptedInstance* pInstance; void Reset() { GreaterPowerWordShield_Timer = 5000; - Heal_Timer = 30000; + Heal_Timer = 25000 + rand()%15000; + PrayerofHealing_Timer = 45000 + rand()%10000; //reset encounter if (pInstance) @@ -552,9 +554,16 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI if(Heal_Timer < diff) { DoCast(m_creature, SPELL_HEAL); - Heal_Timer = 60000; + Heal_Timer = 15000 + rand()%25000; }else Heal_Timer -= diff; + //PrayerofHealing_Timer + if (PrayerofHealing_Timer < diff) + { + DoCast(m_creature, SPELL_PRAYER_OH); + PrayerofHealing_Timer = 35000 + rand()%15000; + }else PrayerofHealing_Timer -= diff; + DoMeleeAttackIfReady(); } }; diff --git a/src/bindings/scripts/scripts/zone/gruuls_lair/def_gruuls_lair.h b/src/bindings/scripts/scripts/zone/gruuls_lair/def_gruuls_lair.h index 145e573f02a..7003dcb1e26 100644 --- a/src/bindings/scripts/scripts/zone/gruuls_lair/def_gruuls_lair.h +++ b/src/bindings/scripts/scripts/zone/gruuls_lair/def_gruuls_lair.h @@ -1,19 +1,21 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * 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 -#define DATA_BLINDEYETHESEER 1 -#define DATA_GRUULEVENT 2 -#define DATA_KIGGLERTHECRAZED 3 -#define DATA_KROSHFIREHAND 4 -#define DATA_MAULGAREVENT 5 -#define DATA_MAULGAREVENT_TANK 6 -#define DATA_OLMTHESUMMONER 7 -#define DATA_MAULGARDOOR 8 -#define DATA_GRUULDOOR 9 -#define DATA_MAULGAR 10 +#define DATA_BLINDEYETHESEER 1 +#define DATA_GRUULEVENT 2 +#define DATA_KIGGLERTHECRAZED 3 +#define DATA_KROSHFIREHAND 4 +#define DATA_MAULGAREVENT 5 +#define DATA_MAULGAREVENT_TANK 6 +#define DATA_OLMTHESUMMONER 7 +#define DATA_MAULGARDOOR 8 +#define DATA_GRUULDOOR 9 +#define DATA_MAULGAR 10 + +#define ERROR_INST_DATA "TSCR Error: Instance Data not set properly for Gruul's Lair instance (map 565). Encounters will be buggy." #endif diff --git a/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp b/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp index c5a82bff322..9ecd95176f0 100644 --- a/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp +++ b/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -74,7 +74,7 @@ struct TRINITY_DLL_DECL instance_gruuls_lair : public ScriptedInstance void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case 18835: KigglerTheCrazed = creature->GetGUID(); break; case 18836: BlindeyeTheSeer = creature->GetGUID(); break; diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp index 92971bf16cf..1afe49ce30e 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,18 +6,18 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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: Boss_Broggok -SD%Complete: 100 -SDComment: +SD%Complete: 70 +SDComment: pre-event not made SDCategory: Hellfire Citadel, Blood Furnace EndScriptData */ @@ -51,25 +51,32 @@ struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 diff) + 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()); + } - if (!UpdateVictim()) + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim() ) return; - if(AcidSpray_Timer < diff) + if (AcidSpray_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_SLIME_SPRAY); AcidSpray_Timer = 4000+rand()%8000; }else AcidSpray_Timer -=diff; - if(PoisonBolt_Timer < diff) + if (PoisonBolt_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_POISON_BOLT); PoisonBolt_Timer = 4000+rand()%8000; }else PoisonBolt_Timer -=diff; - if(PoisonSpawn_Timer < diff) + if (PoisonSpawn_Timer < diff) { DoCast(m_creature,SPELL_POISON_CLOUD); PoisonSpawn_Timer = 20000; @@ -79,17 +86,36 @@ struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI } }; -CreatureAI* GetAI_boss_broggokAI(Creature *_Creature) +struct TRINITY_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI +{ + mob_broggok_poisoncloudAI(Creature *c) : ScriptedAI(c) {Reset();} + + void Reset() { } + void MoveInLineOfSight(Unit *who) { } + void AttackStart(Unit *who) { } + void Aggro(Unit* who) { } +}; + +CreatureAI* GetAI_boss_broggok(Creature *_Creature) { return new boss_broggokAI (_Creature); } +CreatureAI* GetAI_mob_broggok_poisoncloud(Creature *_Creature) +{ + return new mob_broggok_poisoncloudAI (_Creature); +} + void AddSC_boss_broggok() { Script *newscript; newscript = new Script; - newscript->Name="boss_broggok"; - newscript->GetAI = &GetAI_boss_broggokAI; + 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/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 1f404c9b636..de74db2a251 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -62,12 +62,6 @@ const float ShadowmoonChannelers[5][4]= {316,-109,-24.6,1.257} }; -class TRINITY_DLL_DECL BurningNovaAura : public Aura -{ - public: - BurningNovaAura(SpellEntry *spell, uint32 eff, Unit *target, Unit *caster) : Aura(spell, eff, NULL, target, caster, NULL){} -}; - struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI { boss_kelidan_the_breakerAI(Creature *c) : ScriptedAI(c) @@ -234,12 +228,14 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI if(SpellEntry *nova = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_BURNING_NOVA)) { - for(uint32 i = 0; i < 3; ++i) - if(nova->Effect[i] == SPELL_EFFECT_APPLY_AURA) - { - Aura *Aur = new BurningNovaAura(nova, i, m_creature, m_creature); - m_creature->AddAura(Aur); - } + uint8 eff_mask=0; + for (int i=0; i<3; i++) + { + if (!nova->Effect[i]) + continue; + eff_mask|=1<<i; + } + m_creature->AddAura(new Aura(nova, eff_mask, NULL, m_creature, m_creature)); } if (HeroicMode) diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 65c98d5ef8d..e1ea1e03b2f 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 0dce1fe51d9..e6b8593d0c0 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 042291b330a..e955c537bf6 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index a00c3cbde2e..16d4b07ba15 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -257,7 +257,7 @@ struct TRINITY_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)) { DebuffClicker(clicker); (*i).second = 0; @@ -265,12 +265,12 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI } // if 5 clickers from other cubes apply shadow cage - if(ClickerNum >= CLICKERS_COUNT && !m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) + if(ClickerNum >= CLICKERS_COUNT && !m_creature->HasAura(SPELL_SHADOW_CAGE)) { DoScriptText(SAY_BANISH, m_creature); m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); } - else if(ClickerNum < CLICKERS_COUNT && m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) + else if(ClickerNum < CLICKERS_COUNT && m_creature->HasAura(SPELL_SHADOW_CAGE)) m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); if(!ClickerNum) NeedCheckCube = false; @@ -510,7 +510,7 @@ bool GOHello_go_Manticron_Cube(Player *player, GameObject* _GO) if(!Magtheridon || !Magtheridon->isAlive()) return true; // if exhausted or already channeling return - if(player->HasAura(SPELL_MIND_EXHAUSTION, 0) || player->HasAura(SPELL_SHADOW_GRASP, 1)) + if(player->HasAura(SPELL_MIND_EXHAUSTION) || player->HasAura(SPELL_SHADOW_GRASP)) return true; player->InterruptNonMeleeSpells(false); diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/def_magtheridons_lair.h b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/def_magtheridons_lair.h index 3c0012ce447..c5469acaea0 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/def_magtheridons_lair.h +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/def_magtheridons_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index ea51e575824..1bdce52aea9 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -166,7 +166,7 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance Creature *Magtheridon = instance->GetCreatureInMap(MagtheridonGUID); if(Magtheridon && Magtheridon->isAlive()) { - Magtheridon->TextEmote("'s bonds begin to weaken!", 0); + Magtheridon->MonsterTextEmote("'s bonds begin to weaken!", 0); CageTimer = 120000; } if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index e394fed9e2b..91246b0c5b2 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -183,10 +183,11 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { - if (!m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) ) - { - if (!IntroOnce && m_creature->IsWithinDistInMap(who, 75)) + if (!IntroOnce && m_creature->IsWithinDistInMap(who, 50.0f)) { + if (who->GetTypeId() != TYPEID_PLAYER) + return; + DoScriptText(SAY_INTRO, m_creature); IntroOnce = true; IsIntroEvent = true; @@ -195,19 +196,10 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); } - if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE ) - return; - if (IsIntroEvent || !IsMainEvent) 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); - } - } + ScriptedAI::MoveInLineOfSight(who); } void Aggro(Unit *who) @@ -222,9 +214,13 @@ struct TRINITY_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI void JustSummoned(Creature *summoned) { - summoned->setFaction(14); + 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) @@ -340,20 +336,24 @@ struct TRINITY_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI if (pInstance->GetData64(DATA_NETHEKURSE)) { Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); - if (pKurse) + if (pKurse && m_creature->GetDistance(pKurse) < 45.0f) + { ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonAggro(); - } - if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) - return; - else pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); - } + if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) + return; + else pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); + } + } + } } void JustDied(Unit* Killer) { if (pInstance) { + if (pInstance->GetData(TYPE_NETHEKURSE) != IN_PROGRESS) + return; if (pInstance->GetData64(DATA_NETHEKURSE)) { Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); @@ -383,39 +383,10 @@ struct TRINITY_DLL_DECL mob_lesser_shadow_fissureAI : public ScriptedAI { mob_lesser_shadow_fissureAI(Creature *c) : ScriptedAI(c) {} - bool Start; - uint32 Stop_Timer; - - void Reset() - { - Start = false; - Stop_Timer = 30000; - } - + void Reset() { } + void MoveInLineOfSight(Unit *who) { } + void AttackStart(Unit* who) { } void Aggro(Unit* who) { } - - void MoveInLineOfSight(Unit *who) { return; } - - void AttackStart(Unit* who) { return; } - - void UpdateAI(const uint32 diff) - { - if (!Start) - { - //triggered spell of consumption does not properly show it's SpellVisual, hack it a bit - m_creature->CastSpell(m_creature,SPELL_TEMPORARY_VISUAL,true); - m_creature->CastSpell(m_creature,SPELL_CONSUMPTION,false); - Start = true; - } - - if (Stop_Timer < diff) - { - m_creature->setDeathState(JUST_DIED); - m_creature->SetHealth(0); - m_creature->CombatStop(); - m_creature->DeleteThreatList(); - }else Stop_Timer -= diff; - } }; CreatureAI* GetAI_boss_grand_warlock_nethekurse(Creature *_Creature) diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index c565d6ab08e..b8c6162a809 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -156,8 +156,6 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void Reset() { - m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); - m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); LeftHead = 0; RightHead = 0; @@ -175,6 +173,9 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI ThunderClap_Timer = 15000; ResetThreat_Timer = 30000; + m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); + m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); + if (pInstance) pInstance->SetData(TYPE_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. } @@ -202,8 +203,8 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI void Aggro(Unit *who) { - DoSpawnCreature(ENTRY_LEFT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1800000); - DoSpawnCreature(ENTRY_RIGHT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1800000); + DoSpawnCreature(ENTRY_LEFT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,90000); + DoSpawnCreature(ENTRY_RIGHT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,90000); if (Unit *Left = Unit::GetUnit(*m_creature,LeftHead)) { @@ -357,19 +358,19 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI DoResetThreat(); m_creature->AddThreat(target, 0.0f); } - ResetThreat_Timer = 35000+rand()%10000; + ResetThreat_Timer = 25000+rand()%15000; }else ResetThreat_Timer -= diff; if (Fear_Timer < diff) { DoCast(m_creature,SPELL_FEAR); - Fear_Timer = 15000+rand()%25000; + Fear_Timer = 15000+rand()%20000; }else Fear_Timer -= diff; if (ThunderClap_Timer < diff) { DoCast(m_creature,SPELL_THUNDERCLAP); - ThunderClap_Timer = 25000+rand()%15000; + ThunderClap_Timer = 15000+rand()%15000; }else ThunderClap_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 8c4b24421c6..e72c0adc8e9 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -1,6 +1,39 @@ -/* Copyright (C) 2008 - 2009 BroodWyrm */ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with 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 @@ -11,23 +44,10 @@ #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 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}; -#define SOUND_AGGRO1 10323 -#define SAY_AGGRO1 "Ours is the true Horde! The only Horde!" -#define SOUND_AGGRO2 10324 -#define SAY_AGGRO2 "I'll carve the meat from your bones!" -#define SOUND_AGGRO3 10325 -#define SAY_AGGRO3 "I am called Bladefist for a reason, as you will see!" -#define SOUND_SLAY1 10326 -#define SAY_SLAY1 "For the real Horde!" -#define SOUND_SLAY2 10327 -#define SAY_SLAY2 "I am the only Warchief!" -#define SOUND_DEATH 10328 -#define SAY_DEATH "The true Horde... will.. prevail.." - struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI { boss_warchief_kargath_bladefistAI(Creature *c) : ScriptedAI(c) @@ -67,8 +87,8 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI Wait_Timer = 0; Charge_timer = 0; - Blade_Dance_Timer = 30000; - Summon_Assistant_Timer = 15000; + Blade_Dance_Timer = 45000; + Summon_Assistant_Timer = 30000; Assassins_Timer = 5000; resetcheck_timer = 5000; } @@ -77,18 +97,9 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI { switch (rand()%3) { - case 0: - DoPlaySoundToSet(m_creature,SOUND_AGGRO1); - DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL); - break; - case 1: - DoPlaySoundToSet(m_creature,SOUND_AGGRO2); - DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL); - break; - case 2: - DoPlaySoundToSet(m_creature,SOUND_AGGRO3); - DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL); - break; + case 0:DoScriptText(SAY_AGGRO1, m_creature);break; + case 1:DoScriptText(SAY_AGGRO2, m_creature);break; + case 2:DoScriptText(SAY_AGGRO3, m_creature);break; } } @@ -114,22 +125,15 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI { switch(rand()%2) { - case 0: - DoPlaySoundToSet(m_creature, SOUND_SLAY1); - DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL); - break; - case 1: - DoPlaySoundToSet(m_creature, SOUND_SLAY2); - DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL); - break; + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; } } } void JustDied(Unit* Killer) { - DoPlaySoundToSet(m_creature, SOUND_DEATH); - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); + DoScriptText(SAY_DEATH, m_creature); removeAdds(); } @@ -180,15 +184,16 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI } void SpawnAssassin() { - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]+8, AssassEntrance[2], 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]-8, AssassEntrance[2], 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]+8, AssassExit[2], 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); - m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]-8, AssassExit[2], 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); + 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 (!UpdateVictim() ) + //Return since we have no target + if (!UpdateVictim()) return; if(Assassins_Timer) @@ -250,30 +255,29 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI if (Summon_Assistant_Timer < diff) { Unit* target = NULL; - Creature* Summoned; for(int i = 0; i < summoned; i++) { switch(rand()%3) { - case 0: Summoned = m_creature->SummonCreature(MOB_HEARTHEN_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); break; - case 1: Summoned = m_creature->SummonCreature(MOB_SHARPSHOOTER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); break; - case 2: Summoned = m_creature->SummonCreature(MOB_REAVER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,10000); break; + 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(rand()%100 < 20) summoned++; - Summon_Assistant_Timer = 15000 + (rand()%5000) ; + Summon_Assistant_Timer = 25000 + (rand()%10000) ; }else Summon_Assistant_Timer -= diff; DoMeleeAttackIfReady(); } - if(resetcheck_timer < diff) + if (resetcheck_timer < diff) { uint32 tempx,tempy; - tempx = m_creature->GetPositionX(); - tempy = m_creature->GetPositionY(); - if ( tempx > 255 || tempx < 205) + tempx = uint32(m_creature->GetPositionX()); + tempy = uint32(m_creature->GetPositionY()); + if (tempx > 255 || tempx < 205) { EnterEvadeMode(); } @@ -292,7 +296,7 @@ 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->GetAI = GetAI_boss_warchief_kargath_bladefist; newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/def_shattered_halls.h b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/def_shattered_halls.h index cb3a06055cb..cbfa23ec4e0 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/def_shattered_halls.h +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/def_shattered_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index aa2817ca994..b606ff0f97e 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp b/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp index b9e3b9d752f..fbb86e6cabf 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp b/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp index 56a186098dd..61c31fb0fba 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -293,8 +293,6 @@ struct TRINITY_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI break; case 13: DoScriptText(SAY_ELF_RESTING, m_creature, player); - // make the NPC kneel - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); break; case 14: DoScriptText(SAY_ELF_SUMMON2, m_creature, player); diff --git a/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp b/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp index 674bf56bb26..b17a280391a 100644 --- a/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp +++ b/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp b/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp index 4462eee116c..75d78fde331 100644 --- a/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp +++ b/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -164,7 +164,7 @@ struct TRINITY_DLL_DECL npc_greengill_slaveAI : public ScriptedAI if(!caster) return; - if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == ORB && !m_creature->HasAura(ENRAGE, 0)) + if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == ORB && !m_creature->HasAura(ENRAGE)) { PlayerGUID = caster->GetGUID(); if(PlayerGUID) diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp index 9c5563e8ac8..c71870b3232 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,18 +6,18 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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: Boss_Curator SD%Complete: 100 -SDComment: Evocation may cause client crash (Core related) +SDComment: SDCategory: Karazhan EndScriptData */ @@ -34,10 +34,6 @@ EndScriptData */ //Flare spell info #define SPELL_ASTRAL_FLARE_PASSIVE 30234 //Visual effect + Flare damage -#define SPELL_ASTRAL_FLARE_NE 30236 -#define SPELL_ASTRAL_FLARE_NW 30239 -#define SPELL_ASTRAL_FLARE_SE 30240 -#define SPELL_ASTRAL_FLARE_SW 30241 //Curator spell info #define SPELL_HATEFUL_BOLT 30383 @@ -45,7 +41,7 @@ EndScriptData */ #define SPELL_ENRAGE 30403 //Arcane Infusion: Transforms Curator and adds damage. #define SPELL_BERSERK 26662 -struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI +struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI { boss_curatorAI(Creature *c) : ScriptedAI(c) {} @@ -69,8 +65,8 @@ struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI { switch(rand()%2) { - case 0: DoScriptText(SAY_KILL1, m_creature); break; - case 1: DoScriptText(SAY_KILL2, m_creature); break; + case 0: DoScriptText(SAY_KILL1, m_creature); break; + case 1: DoScriptText(SAY_KILL2, m_creature); break; } } @@ -89,18 +85,38 @@ struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI if (!UpdateVictim() ) return; - if (Evocating && !m_creature->HasAura(SPELL_EVOCATION, 0)) - Evocating = false; + //always decrease BerserkTimer + if (BerserkTimer < diff) + { + //if evocate, then break evocate + if (Evocating) + { + if (m_creature->HasAura(SPELL_EVOCATION)) + m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION); + + Evocating = false; + } + + //may not be correct SAY (generic hard enrage) + DoScriptText(SAY_ENRAGE, m_creature); - if (m_creature->GetPower(POWER_MANA) <= 1000 && !Evocating) + m_creature->InterruptNonMeleeSpells(true); + DoCast(m_creature, SPELL_BERSERK); + + //don't know if he's supposed to do summon/evocate after hard enrage (probably not) + Enraged = true; + }else BerserkTimer -= diff; + + if (Evocating) { - DoScriptText(SAY_EVOCATE, m_creature); - m_creature->InterruptNonMeleeSpells(false); - DoCast(m_creature, SPELL_EVOCATION); - Evocating = true; + //not supposed to do anything while evocate + if (m_creature->HasAura(SPELL_EVOCATION)) + return; + else + Evocating = false; } - if (!Enraged && !Evocating) + if (!Enraged) { if (AddTimer < diff) { @@ -113,29 +129,40 @@ struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI { AstralFlare->CastSpell(AstralFlare, SPELL_ASTRAL_FLARE_PASSIVE, false); AstralFlare->AI()->AttackStart(target); + AstralFlare->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); + AstralFlare->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } - //Reduce Mana by 10% - int32 mana = (int32)(0.1f*(m_creature->GetMaxPower(POWER_MANA))); - m_creature->ModifyPower(POWER_MANA, -mana); - switch(rand()%4) + //Reduce Mana by 10% of max health + if (int32 mana = m_creature->GetMaxPower(POWER_MANA)) { - case 0: DoScriptText(SAY_SUMMON1, m_creature);break; - case 1: DoScriptText(SAY_SUMMON2, m_creature);break; + mana /= 10; + m_creature->ModifyPower(POWER_MANA, -mana); + + //if this get's us below 10%, then we evocate (the 10th should be summoned now) + if (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA) < 10) + { + DoScriptText(SAY_EVOCATE, m_creature); + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_EVOCATION); + Evocating = true; + //no AddTimer cooldown, this will make first flare appear instantly after evocate end, like expected + return; + } + else + { + switch(rand()%4) + { + case 0: DoScriptText(SAY_SUMMON1, m_creature); break; + case 1: DoScriptText(SAY_SUMMON2, m_creature); break; + } + } } + AddTimer = 10000; }else AddTimer -= diff; - if (HatefulBoltTimer < diff) - { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1); - DoCast(target, SPELL_HATEFUL_BOLT); - - HatefulBoltTimer = 15000; - }else HatefulBoltTimer -= diff; - - if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 15) + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 15) { Enraged = true; DoCast(m_creature, SPELL_ENRAGE); @@ -143,11 +170,17 @@ struct TRINITY_DLL_DECL boss_curatorAI : public ScriptedAI } } - if (BerserkTimer < diff) + if (HatefulBoltTimer < diff) { - DoCast(m_creature, SPELL_BERSERK); - DoScriptText(SAY_ENRAGE, m_creature); - }else BerserkTimer -= diff; + if (Enraged) + HatefulBoltTimer = 7000; + else + HatefulBoltTimer = 15000; + + if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1)) + DoCast(target, SPELL_HATEFUL_BOLT); + + }else HatefulBoltTimer -= diff; DoMeleeAttackIfReady(); } @@ -162,8 +195,7 @@ void AddSC_boss_curator() { Script *newscript; newscript = new Script; - newscript->Name="boss_curator"; + newscript->Name = "boss_curator"; newscript->GetAI = &GetAI_boss_curator; newscript->RegisterSelf(); } - diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp index 230b31c69bb..95e34e85622 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -51,9 +51,9 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI void Reset() { - Repentance_Timer = 30000+(rand()%15000); + Repentance_Timer = 25000+(rand()%15000); Holyfire_Timer = 8000+(rand()%17000); - Holywrath_Timer = 20000+(rand()%10000); + Holywrath_Timer = 15000+(rand()%10000); Holyground_Timer = 3000; Enrage_Timer = 600000; @@ -109,7 +109,7 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI case 0: DoScriptText(SAY_REPENTANCE1, m_creature);break; case 1: DoScriptText(SAY_REPENTANCE2, m_creature);break; } - Repentance_Timer = 30000 + rand()%15000; //A little randomness on that spell + Repentance_Timer = 25000 + rand()%10000; //A little randomness on that spell }else Repentance_Timer -= diff; if (Holyfire_Timer < diff) @@ -117,7 +117,7 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_HOLYFIRE); - Holyfire_Timer = 8000 + rand()%17000; //Anywhere from 8 to 25 seconds, good luck having several of those in a row! + Holyfire_Timer = 8000 + rand()%15000; //Anywhere from 8 to 23 seconds, good luck having several of those in a row! }else Holyfire_Timer -= diff; if (Holywrath_Timer < diff) @@ -125,7 +125,7 @@ struct TRINITY_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_HOLYWRATH); - Holywrath_Timer = 20000+(rand()%10000); //20-30 secs sounds nice + Holywrath_Timer = 20000+(rand()%5000); //20-30 secs sounds nice }else Holywrath_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp index caa79aa4afe..0f6d13c2198 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -185,6 +185,9 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI void Reset() { ResetTimer = 2000; + + m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); } void Aggro(Unit* who) {} @@ -283,6 +286,7 @@ struct TRINITY_DLL_DECL boss_attumenAI : public ScriptedAI { ((boss_midnightAI*)(pMidnight->AI()))->Mount(m_creature); m_creature->SetHealth(pMidnight->GetHealth()); + DoResetThreat(); } } } diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp index a1fcabc474c..cf235b99880 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -150,7 +150,7 @@ struct TRINITY_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)) i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE); } } @@ -320,6 +320,8 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI 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->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); m_creature->AI()->AttackStart(m_creature->getVictim()); InVanish = false; }else Wait_Timer -= diff; @@ -540,7 +542,7 @@ struct TRINITY_DLL_DECL boss_baron_rafe_dreugerAI : public boss_moroes_guestAI struct TRINITY_DLL_DECL boss_lady_catriona_von_indiAI : public boss_moroes_guestAI { //Holy Priest - boss_lady_catriona_von_indiAI(Creature *c) : boss_moroes_guestAI(c) {} + boss_lady_catriona_von_indiAI(Creature *c) : boss_moroes_guestAI(c) {Reset();} uint32 DispelMagic_Timer; uint32 GreaterHeal_Timer; @@ -610,7 +612,7 @@ struct TRINITY_DLL_DECL boss_lady_catriona_von_indiAI : public boss_moroes_guest struct TRINITY_DLL_DECL boss_lady_keira_berrybuckAI : public boss_moroes_guestAI { //Holy Pally - boss_lady_keira_berrybuckAI(Creature *c) : boss_moroes_guestAI(c) {} + boss_lady_keira_berrybuckAI(Creature *c) : boss_moroes_guestAI(c) {Reset();} uint32 Cleanse_Timer; uint32 GreaterBless_Timer; @@ -727,7 +729,7 @@ struct TRINITY_DLL_DECL boss_lord_robin_darisAI : public boss_moroes_guestAI struct TRINITY_DLL_DECL boss_lord_crispin_ferenceAI : public boss_moroes_guestAI { //Arms Warr - boss_lord_crispin_ferenceAI(Creature *c) : boss_moroes_guestAI(c) {} + boss_lord_crispin_ferenceAI(Creature *c) : boss_moroes_guestAI(c) {Reset();} uint32 Disarm_Timer; uint32 HeroicStrike_Timer; diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_netherspite.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_netherspite.cpp index b074dc920c1..6db1b193234 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_netherspite.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_netherspite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp index 96f58bd3a3c..fd7e6176433 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_nightbane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -134,9 +134,9 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI void HandleTerraceDoors(bool open) { if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1))) - Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + Door->SetGoState(open ? 0 : 1); if(GameObject *Door = GameObject::GetGameObject((*m_creature),pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2))) - Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + Door->SetGoState(open ? 0 : 1); } void Aggro(Unit *who) diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp index 3de8e352ded..54c04f59743 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -37,7 +37,7 @@ EndScriptData */ #define SAY_SUMMON2 -1532101 #define SAY_DEATH -1532102 -// 19 Coordinates for Infernal spawns +// 18 Coordinates for Infernal spawns struct InfernalPoint { float x,y; @@ -64,11 +64,10 @@ static InfernalPoint InfernalPoints[] = {-10948.8, -2005.1}, {-10984.0, -2019.3}, {-10932.8, -1979.6}, - {-10932.8, -1979.6}, {-10935.7, -1996.0} }; -#define TOTAL_INFERNAL_POINTS 19 +#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% @@ -81,9 +80,10 @@ static InfernalPoint InfernalPoints[] = #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 3417 //Passive proc chance for thrash +#define SPELL_THRASH_AURA 12787 //Passive proc chance for thrash #define SPELL_EQUIP_AXES 30857 //Visual for axe equiping -#define SPELL_AMPLIFY_DAMAGE 12738 //Amplifiy during phase 3 +#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 @@ -168,6 +168,7 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI uint32 SWPainTimer; uint32 SunderArmorTimer; uint32 AmplifyDamageTimer; + uint32 Cleave_Timer; uint32 InfernalTimer; uint32 AxesTargetSwitchTimer; uint32 InfernalCleanupTimer; @@ -196,12 +197,14 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI EnfeebleTimer = 30000; EnfeebleResetTimer = 38000; - ShadowNovaTimer = 35000; + ShadowNovaTimer = 35500; SWPainTimer = 20000; - AmplifyDamageTimer = 10000; + AmplifyDamageTimer = 5000; + Cleave_Timer = 8000; InfernalTimer = 45000; InfernalCleanupTimer = 47000; AxesTargetSwitchTimer = 7500 + rand()%12500; + SunderArmorTimer = 5000 + rand()%5000; phase = 1; if(pInstance) @@ -288,11 +291,11 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI void ClearWeapons() { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 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); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, 0); + //m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, 0); //damage const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); @@ -432,11 +435,11 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_THRASH_AURA, true); //models - 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_ID, 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); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, AXE_EQUIP_MODEL); + //m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, AXE_EQUIP_INFO); //damage const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); @@ -474,8 +477,8 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI 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->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 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()); @@ -499,9 +502,16 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI if(SunderArmorTimer < diff) { DoCast(m_creature->getVictim(), SPELL_SUNDER_ARMOR); - SunderArmorTimer = 15000; + SunderArmorTimer = 10000 + rand()%8000; }else SunderArmorTimer -= diff; + + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + Cleave_Timer = 6000 + rand()%6000; + + }else Cleave_Timer -= diff; } else { @@ -543,13 +553,13 @@ struct TRINITY_DLL_DECL boss_malchezaarAI : public ScriptedAI if(InfernalTimer < diff) { SummonInfernal(diff); - InfernalTimer = phase == 3 ? 15000 : 45000; //15 secs in phase 3, 45 otherwise + 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 ? 35000 : -1; + ShadowNovaTimer = phase == 3 ? 31000 : -1; }else ShadowNovaTimer -= diff; if(phase != 2) diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp index f98d85f9125..98aa93f3b8d 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -273,8 +273,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI 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); - //Sitting down - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 1); + m_creature->SetStandState(UNIT_STAND_STATE_SIT); DrinkInturruptTimer = 10000; } } @@ -284,7 +283,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI { Drinking = false; m_creature->RemoveAurasDueToSpell(SPELL_DRINK); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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); } @@ -295,7 +294,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI DrinkInturruptTimer -= diff; else { - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->CastSpell(m_creature, SPELL_POTION, true); m_creature->CastSpell(m_creature, SPELL_AOE_PYROBLAST, false); DrinkInturrupted = true; diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp index 4f4dea515c7..bf8d539026e 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -45,11 +45,10 @@ EndScriptData */ #define SPELL_FIENDISH_PORTAL 30171 // Opens portal and summons Fiendish Portal, 2 sec cast #define SPELL_FIENDISH_PORTAL_1 30179 // Opens portal and summons Fiendish Portal, instant cast -#define SPELL_FIREBOLT 18086 // Blasts a target for 150 Fire damage. +#define SPELL_FIREBOLT 30050 // Blasts a target for 150 Fire damage. #define SPELL_BROKEN_PACT 30065 // All damage taken increased by 25%. #define SPELL_AMPLIFY_FLAMES 30053 // Increases the Fire damage taken by an enemy by 500 for 25 sec. -#define SPELL_FIREBOLT 18086 // Blasts a target for 150 Fire damage. #define CREATURE_DEMONCHAINS 17248 #define CREATURE_FIENDISHIMP 17267 @@ -79,8 +78,7 @@ struct TRINITY_DLL_DECL mob_kilrekAI : public ScriptedAI void Reset() { TerestianGUID = 0; - - AmplifyTimer = 0; + AmplifyTimer = 2000; } void Aggro(Unit *who) @@ -121,13 +119,10 @@ struct TRINITY_DLL_DECL mob_kilrekAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(false); DoCast(m_creature->getVictim(),SPELL_AMPLIFY_FLAMES); - AmplifyTimer = 20000; + AmplifyTimer = 10000 + rand()%10000; }else AmplifyTimer -= diff; - //Chain cast - if (!m_creature->IsNonMeleeSpellCasted(false) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) - DoCast(m_creature->getVictim(),SPELL_FIREBOLT); - else DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; @@ -161,6 +156,8 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI { boss_terestianAI(Creature *c) : ScriptedAI(c) { + for(uint8 i = 0; i < 2; ++i) + PortalGUID[i] = 0; pInstance = ((ScriptedInstance*)c->GetInstanceData()); } @@ -175,6 +172,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI uint32 SummonTimer; uint32 BerserkTimer; + bool ReSummon; bool SummonKilrek; bool SummonedPortals; bool Berserk; @@ -201,6 +199,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI SummonedPortals = false; Berserk = false; + ReSummon = false; if(pInstance) pInstance->SetData(DATA_TERESTIAN_EVENT, NOT_STARTED); @@ -212,8 +211,15 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI if(pInstance) { - // Put Kil'rek in combat against our target so players don't skip him Creature* Kilrek = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILREK))); + + // Respawn Kil'rek on aggro if Kil'rek is dead. + if (!Kilrek || !Kilrek->isAlive()) + { + Kilrek->Respawn(); + } + + // Put Kil'rek in combat against our target so players don't skip him if(Kilrek && !Kilrek->getVictim()) Kilrek->AddThreat(who, 1.0f); @@ -257,18 +263,22 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI if(CheckKilrekTimer < diff) { + CheckKilrekTimer = 5000; if(pInstance) uint64 KilrekGUID = pInstance->GetData64(DATA_KILREK); else ERROR_INST_DATA(m_creature); - Creature* Kilrek = ((Creature*)Unit::GetUnit((*m_creature), KilrekGUID)); + Creature* Kilrek = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILREK))); if(SummonKilrek && Kilrek) { Kilrek->Respawn(); if(Kilrek->AI()) + { Kilrek->AI()->AttackStart(m_creature->getVictim()); + m_creature->RemoveAurasDueToSpell(SPELL_BROKEN_PACT); + } SummonKilrek = false; } @@ -355,7 +365,9 @@ struct TRINITY_DLL_DECL mob_karazhan_impAI : public ScriptedAI void Reset() { - FireboltTimer = 3000; + FireboltTimer = 2000; + + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); } void Aggro(Unit *who) {} @@ -369,7 +381,7 @@ struct TRINITY_DLL_DECL mob_karazhan_impAI : public ScriptedAI if(FireboltTimer < diff) { DoCast(m_creature->getVictim(), SPELL_FIREBOLT); - FireboltTimer = 1500; + FireboltTimer = 2200; }else FireboltTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp index 0f49cbe5a86..33899c4cd83 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -91,7 +91,7 @@ void SummonCroneIfReady(ScriptedInstance* pInstance, Creature *_Creature) pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, 0); // Increment DeathCount if(pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4) { - Creature* Crone = _Creature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, _Creature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + Creature* Crone = _Creature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, _Creature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); if(Crone) { if(_Creature->getVictim()) @@ -117,7 +117,6 @@ struct TRINITY_DLL_DECL boss_dorotheeAI : public ScriptedAI bool SummonedTito; bool TitoDied; - bool InCombat; void Reset() { @@ -129,7 +128,6 @@ struct TRINITY_DLL_DECL boss_dorotheeAI : public ScriptedAI SummonedTito = false; TitoDied = false; - InCombat = false; } void Aggro(Unit* who) @@ -205,13 +203,11 @@ struct TRINITY_DLL_DECL mob_titoAI : public ScriptedAI mob_titoAI(Creature* c) : ScriptedAI(c) {} uint64 DorotheeGUID; - uint32 YipTimer; void Reset() { DorotheeGUID = 0; - YipTimer = 10000; } @@ -247,7 +243,7 @@ struct TRINITY_DLL_DECL mob_titoAI : public ScriptedAI void boss_dorotheeAI::SummonTito() { - Creature* Tito = DoSpawnCreature(CREATURE_TITO, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + Creature* Tito = DoSpawnCreature(CREATURE_TITO, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); if(Tito) { DoScriptText(SAY_DOROTHEE_SUMMON, m_creature); @@ -301,8 +297,15 @@ struct TRINITY_DLL_DECL boss_strawmanAI : public ScriptedAI void SpellHit(Unit* caster, const SpellEntry *Spell) { - if((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10))) + if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && (!(rand()%10))) + { + /* + if (not direct damage(aoe,dot)) + return; + */ + DoCast(m_creature, SPELL_BURNING_STRAW, true); + } } void JustDied(Unit* killer) @@ -569,9 +572,11 @@ struct TRINITY_DLL_DECL boss_croneAI : public ScriptedAI if(pInstance) { pInstance->SetData(DATA_OPERA_EVENT, DONE); - GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)); - if(Door) - Door->UseDoorOrButton(); + + if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT))) + lDoor->SetGoState(0); + if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) + rDoor->SetGoState(0); } } @@ -620,7 +625,7 @@ struct TRINITY_DLL_DECL mob_cycloneAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(!m_creature->HasAura(SPELL_KNOCKBACK, 0)) + if(!m_creature->HasAura(SPELL_KNOCKBACK)) DoCast(m_creature, SPELL_KNOCKBACK, true); if(MoveTimer < diff) @@ -705,7 +710,7 @@ bool GossipSelect_npc_grandmother(Player* player, Creature* _Creature, uint32 se _Creature->SetVisibility(VISIBILITY_OFF); float x,y,z; _Creature->GetPosition(x,y,z); - Creature* BigBadWolf = _Creature->SummonCreature(CREATURE_BIG_BAD_WOLF, x, y, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + Creature* BigBadWolf = _Creature->SummonCreature(CREATURE_BIG_BAD_WOLF, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); if(BigBadWolf) { BigBadWolf->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -760,9 +765,11 @@ struct TRINITY_DLL_DECL boss_bigbadwolfAI : public ScriptedAI if(pInstance) { pInstance->SetData(DATA_OPERA_EVENT, DONE); - GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)); - if(Door) - Door->UseDoorOrButton(); + + if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT))) + lDoor->SetGoState(0); + if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) + rDoor->SetGoState(0); } } @@ -795,8 +802,8 @@ struct TRINITY_DLL_DECL boss_bigbadwolfAI : public ScriptedAI else { IsChasing = false; - Unit* target = Unit::GetUnit((*m_creature), HoodGUID); - if(target) + + if (Unit* target = Unit::GetUnit((*m_creature), HoodGUID)) { HoodGUID = 0; if(DoGetThreat(target)) @@ -868,9 +875,9 @@ CreatureAI* GetAI_boss_bigbadwolf(Creature* _Creature) #define SPELL_RES_VISUAL 24171 /*** Misc. Information ****/ -#define CREATURE_ROMULO 17533 -#define ROMULO_X -10900 -#define ROMULO_Y -1758 +#define CREATURE_ROMULO 17533 +#define ROMULO_X -10900 +#define ROMULO_Y -1758 enum RAJPhase { @@ -881,32 +888,28 @@ enum RAJPhase void PretendToDie(Creature* _Creature) { - _Creature->InterruptNonMeleeSpells(false); + _Creature->InterruptNonMeleeSpells(true); + _Creature->RemoveAllAuras(); _Creature->SetHealth(0); - _Creature->ClearComboPointHolders(); - _Creature->RemoveAllAurasOnDeath(); - _Creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); - _Creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); _Creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - _Creature->ClearAllReactives(); - _Creature->SetUInt64Value(UNIT_FIELD_TARGET,0); - _Creature->GetMotionMaster()->Clear(); + _Creature->GetMotionMaster()->MovementExpired(false); _Creature->GetMotionMaster()->MoveIdle(); - _Creature->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD); + _Creature->SetStandState(UNIT_STAND_STATE_DEAD); }; void Resurrect(Creature* target) { target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); target->SetHealth(target->GetMaxHealth()); - target->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + target->SetStandState(UNIT_STAND_STATE_STAND); target->CastSpell(target, SPELL_RES_VISUAL, true); if(target->getVictim()) { - target->SetUInt64Value(UNIT_FIELD_TARGET, target->getVictim()->GetGUID()); target->GetMotionMaster()->MoveChase(target->getVictim()); target->AI()->AttackStart(target->getVictim()); } + else + target->GetMotionMaster()->Initialize(); }; struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI @@ -920,18 +923,21 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI ScriptedInstance* pInstance; + uint32 EntryYellTimer; + uint32 AggroYellTimer; + uint64 RomuloGUID; uint32 Phase; - uint32 EntryYellTimer; - uint32 AggroYellTimer; uint32 BlindingPassionTimer; uint32 DevotionTimer; uint32 EternalAffectionTimer; uint32 PowerfulAttractionTimer; uint32 SummonRomuloTimer; uint32 ResurrectTimer; + uint32 DrinkPoisonTimer; + uint32 ResurrectSelfTimer; bool IsFakingDeath; bool SummonedRomulo; @@ -947,15 +953,18 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI Romulo->DealDamage(Romulo, Romulo->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - RomuloGUID = 0; } + RomuloGUID = 0; Phase = PHASE_JULIANNE; BlindingPassionTimer = 30000; DevotionTimer = 15000; EternalAffectionTimer = 25000; PowerfulAttractionTimer = 5000; + SummonRomuloTimer = 10000; + DrinkPoisonTimer = 0; + ResurrectSelfTimer = 0; if(IsFakingDeath) Resurrect(m_creature); @@ -983,6 +992,15 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI ScriptedAI::MoveInLineOfSight(who); } + 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) @@ -992,9 +1010,11 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI if(pInstance) { pInstance->SetData(DATA_OPERA_EVENT, DONE); - GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT)); - if(Door) - Door->UseDoorOrButton(); + + if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT))) + lDoor->SetGoState(0); + if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) + rDoor->SetGoState(0); } } @@ -1010,12 +1030,14 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI { boss_romuloAI(Creature* c) : ScriptedAI(c) { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); EntryYellTimer = 8000; AggroYellTimer = 15000; } + + ScriptedInstance* pInstance; uint64 JulianneGUID; - uint32 Phase; uint32 EntryYellTimer; @@ -1026,22 +1048,19 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI uint32 PoisonThrustTimer; uint32 ResurrectTimer; - bool JulianneDead; bool IsFakingDeath; + bool JulianneDead; void Reset() { JulianneGUID = 0; - Phase = PHASE_ROMULO; BackwardLungeTimer = 15000; DaringTimer = 20000; DeadlySwatheTimer = 25000; PoisonThrustTimer = 10000; - - if(IsFakingDeath) - Resurrect(m_creature); + ResurrectTimer = 10000; IsFakingDeath = false; JulianneDead = false; @@ -1074,6 +1093,16 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI void JustDied(Unit* killer) { DoScriptText(SAY_ROMULO_DEATH, m_creature); + + if (pInstance) + { + pInstance->SetData(DATA_OPERA_EVENT, DONE); + + if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT))) + lDoor->SetGoState(0); + if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) + rDoor->SetGoState(0); + } } void KilledUnit(Unit* victim) @@ -1086,137 +1115,169 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage) { - if(damage < m_creature->GetHealth() || done_by == m_creature || done_by->GetGUID() == RomuloGUID) + if (damage < m_creature->GetHealth()) return; + //anything below only used if incoming damage will kill + if(Phase == PHASE_JULIANNE) { - DoScriptText(SAY_JULIANNE_DEATH01, m_creature); + damage = 0; + + //this means already drinking, so return + if (IsFakingDeath) + return; + m_creature->InterruptNonMeleeSpells(true); DoCast(m_creature, SPELL_DRINK_POISON); - PretendToDie(m_creature); - Phase = PHASE_ROMULO; - damage = 0; + IsFakingDeath = true; - SummonRomuloTimer = 10000; + //IS THIS USEFULL? Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)); return; } - if(!IsFakingDeath) + if (Phase == PHASE_ROMULO) { - Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID)); - if(Romulo && Romulo->isAlive() && !((boss_romuloAI*)Romulo->AI())->IsFakingDeath) - { - ((boss_romuloAI*)Romulo->AI())->ResurrectTimer = 10000; - ((boss_romuloAI*)Romulo->AI())->JulianneDead = true; - } - else + error_log("TSCR: 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) { - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if(Romulo) + if (Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID))) { - Romulo->DealDamage(Romulo, Romulo->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Romulo->GetMotionMaster()->Clear(); + Romulo->setDeathState(JUST_DIED); + Romulo->CombatStop(); + Romulo->DeleteThreatList(); + Romulo->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - JustDied(done_by); + return; } - IsFakingDeath = true; - PretendToDie(m_creature); - damage = 0; + //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; + } } - else - damage = 0; + error_log("TSCR: 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() || done_by == m_creature || done_by->GetGUID() == JulianneGUID) + if (damage < m_creature->GetHealth()) return; - if(!IsFakingDeath) + //anything below only used if incoming damage will kill + + if (Phase == PHASE_ROMULO) { - IsFakingDeath = true; + DoScriptText(SAY_ROMULO_DEATH, m_creature); PretendToDie(m_creature); + IsFakingDeath = true; + Phase = PHASE_BOTH; - if(Phase == PHASE_BOTH) + if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID))) { - Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)); - if(Julianne && Julianne->isAlive() && !((boss_julianneAI*)Julianne->AI())->IsFakingDeath) - { - ((boss_julianneAI*)Julianne->AI())->ResurrectTimer = 10000; - ((boss_julianneAI*)Julianne->AI())->RomuloDead = true; - } - else - { - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - if(Julianne) - { - Julianne->DealDamage(Julianne, Julianne->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - JustDied(done_by); - } + ((boss_julianneAI*)Julianne->AI())->RomuloDead = true; + ((boss_julianneAI*)Julianne->AI())->ResurrectSelfTimer = 10000; } - else + + damage = 0; + return; + } + + if (Phase == PHASE_BOTH) + { + if (JulianneDead) { - Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)); - if(Julianne) + if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID))) { - Resurrect(Julianne); - m_creature->SetHealth(m_creature->GetMaxHealth()); - ((boss_julianneAI*)Julianne->AI())->ResurrectTimer = 4000; - ((boss_julianneAI*)Julianne->AI())->RomuloDead = true; - ((boss_julianneAI*)Julianne->AI())->Phase = PHASE_BOTH; - ((boss_julianneAI*)Julianne->AI())->IsFakingDeath = false; + Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Julianne->GetMotionMaster()->Clear(); + Julianne->setDeathState(JUST_DIED); + Julianne->CombatStop(); + Julianne->DeleteThreatList(); + Julianne->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - Phase = PHASE_BOTH; + return; } - damage = 0; + 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; + } } - if(IsFakingDeath) damage = 0; + error_log("TSCR: boss_romuloAI: DamageTaken reach end of code, that should not happen."); } void boss_julianneAI::UpdateAI(const uint32 diff) { if(EntryYellTimer) { - if(EntryYellTimer < diff) + if (EntryYellTimer <= diff) { DoScriptText(SAY_JULIANNE_ENTER, m_creature); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); EntryYellTimer = 0; }else EntryYellTimer -= diff; } if(AggroYellTimer) { - if(AggroYellTimer < diff) + 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(Phase == PHASE_ROMULO && !SummonedRomulo) + 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) { - Creature* Romulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 45000); + Creature* Romulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); if(Romulo) { RomuloGUID = Romulo->GetGUID(); ((boss_romuloAI*)Romulo->AI())->JulianneGUID = m_creature->GetGUID(); ((boss_romuloAI*)Romulo->AI())->Phase = PHASE_ROMULO; + Romulo->setFaction(16); + if(m_creature->getVictim()) { - Romulo->AI()->AttackStart(m_creature->getVictim()); - Romulo->AddThreat(m_creature->getVictim(), 50.0f); + Romulo->AddThreat(m_creature->getVictim(), 0.0f); } DoZoneInCombat(Romulo); } @@ -1224,7 +1285,23 @@ void boss_julianneAI::UpdateAI(const uint32 diff) }else SummonRomuloTimer -= diff; } - if(!UpdateVictim() ||IsFakingDeath) + 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(!UpdateVictim() || IsFakingDeath) return; if(RomuloDead) @@ -1237,9 +1314,9 @@ void boss_julianneAI::UpdateAI(const uint32 diff) DoScriptText(SAY_JULIANNE_RESURRECT, m_creature); Resurrect(Romulo); ((boss_romuloAI*)Romulo->AI())->IsFakingDeath = false; + RomuloDead = false; ResurrectTimer = 10000; } - RomuloDead = false; }else ResurrectTimer -= diff; } @@ -1266,10 +1343,8 @@ void boss_julianneAI::UpdateAI(const uint32 diff) if(rand()%2 == 1 && SummonedRomulo) { Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID)); - if(Romulo && Romulo->isAlive() && !((boss_romuloAI*)Romulo->AI())->IsFakingDeath) + if (Romulo && Romulo->isAlive() && !RomuloDead) DoCast(Romulo, SPELL_ETERNAL_AFFECTION); - else - return; }else DoCast(m_creature, SPELL_ETERNAL_AFFECTION); EternalAffectionTimer = 45000 + rand()%15000; @@ -1293,9 +1368,9 @@ void boss_romuloAI::UpdateAI(const uint32 diff) DoScriptText(SAY_ROMULO_RESURRECT, m_creature); Resurrect(Julianne); ((boss_julianneAI*)Julianne->AI())->IsFakingDeath = false; + JulianneDead = false; ResurrectTimer = 10000; } - JulianneDead = false; }else ResurrectTimer -= diff; } diff --git a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h index d08911d9c76..4304477de2a 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h +++ b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp index 3952c0da167..185c44c6cdc 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -46,6 +46,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance instance_karazhan(Map* map) : ScriptedInstance(map) {Initialize();} uint32 Encounters[ENCOUNTERS]; + std::string str_data; uint32 OperaEvent; uint32 OzDeathCount; @@ -183,7 +184,19 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance } if(data == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " " + << Encounters[3] << " " << Encounters[4] << " " << Encounters[5] << " " << Encounters[6] << " " + << Encounters[7] << " " << Encounters[8] << " " << Encounters[9] << " " << Encounters[10]; + + str_data = saveStream.str(); + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } } void SetData64(uint32 identifier, uint64 data) @@ -226,20 +239,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance const char* Save() { - OUT_SAVE_INST_DATA; - std::ostringstream stream; - stream << Encounters[0] << " " << Encounters[1] << " " << Encounters[2] << " " << Encounters[3] << " " - << Encounters[4] << " " << Encounters[5] << " " << Encounters[6] << " " << Encounters[7] << " " - << Encounters[8] << " " << Encounters[9] << " " << Encounters[10] << " " << Encounters[11]; - char* out = new char[stream.str().length() + 1]; - strcpy(out, stream.str().c_str()); - if(out) - { - OUT_SAVE_INST_DATA_COMPLETE; - return out; - } - - return NULL; + return str_data.c_str(); } void Load(const char* in) @@ -251,8 +251,8 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance } OUT_LOAD_INST_DATA(in); - std::istringstream stream(in); - stream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3] + std::istringstream loadStream(in); + loadStream >> Encounters[0] >> Encounters[1] >> Encounters[2] >> Encounters[3] >> Encounters[4] >> Encounters[5] >> Encounters[6] >> Encounters[7] >> Encounters[8] >> Encounters[9] >> Encounters[10] >> Encounters[11]; for(uint8 i = 0; i < ENCOUNTERS; ++i) diff --git a/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp index bdf7eed9f3a..3b550c34e72 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -46,6 +46,10 @@ EndContentData */ #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 textid; @@ -181,6 +185,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI } IsBeingEscorted = false; PerformanceReady = true; + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); break; } } @@ -377,6 +382,13 @@ bool GossipHello_npc_barnes(Player* player, Creature* _Creature) { player->ADD_GOSSIP_ITEM(0, OZ_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + if (player->isGameMaster()) + { + player->ADD_GOSSIP_ITEM(5, OZ_GM_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + player->ADD_GOSSIP_ITEM(5, OZ_GM_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + player->ADD_GOSSIP_ITEM(5, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + } + if(!((npc_barnesAI*)_Creature->AI())->RaidWiped) player->SEND_GOSSIP_MENU(8970, _Creature->GetGUID()); else @@ -394,11 +406,25 @@ bool GossipSelect_npc_barnes(Player *player, Creature *_Creature, uint32 sender, player->ADD_GOSSIP_ITEM(0, OZ_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->SEND_GOSSIP_MENU(8971, _Creature->GetGUID()); break; - case GOSSIP_ACTION_INFO_DEF+2: player->CLOSE_GOSSIP_MENU(); ((npc_barnesAI*)_Creature->AI())->StartEvent(); break; + case GOSSIP_ACTION_INFO_DEF+3: + player->CLOSE_GOSSIP_MENU(); + ((npc_barnesAI*)_Creature->AI())->Event = EVENT_OZ; + outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_OZ",player->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + player->CLOSE_GOSSIP_MENU(); + ((npc_barnesAI*)_Creature->AI())->Event = EVENT_HOOD; + outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_HOOD",player->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + player->CLOSE_GOSSIP_MENU(); + ((npc_barnesAI*)_Creature->AI())->Event = EVENT_RAJ; + outstring_log("TSCR: player (GUID %i) manually set Opera event to EVENT_RAJ",player->GetGUID()); + break; } return true; @@ -524,25 +550,25 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI { case 0: return 9999999; case 1: - m_creature->Yell(SAY_DIALOG_MEDIVH_1,LANG_UNIVERSAL,NULL); + m_creature->MonsterYell(SAY_DIALOG_MEDIVH_1,LANG_UNIVERSAL,NULL); return 10000; case 2: if(arca) - ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_2,LANG_UNIVERSAL,NULL); + ((Creature*)arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_2,LANG_UNIVERSAL,NULL); return 20000; case 3: - m_creature->Yell(SAY_DIALOG_MEDIVH_3,LANG_UNIVERSAL,NULL); + m_creature->MonsterYell(SAY_DIALOG_MEDIVH_3,LANG_UNIVERSAL,NULL); return 10000; case 4: if(arca) - ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL, NULL); + ((Creature*)arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_4, LANG_UNIVERSAL, NULL); return 20000; case 5: - m_creature->Yell(SAY_DIALOG_MEDIVH_5, LANG_UNIVERSAL, NULL); + m_creature->MonsterYell(SAY_DIALOG_MEDIVH_5, LANG_UNIVERSAL, NULL); return 20000; case 6: if(arca) - ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL, NULL); + ((Creature*)arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_6, LANG_UNIVERSAL, NULL); return 10000; case 7: FireArcanagosTimer = 500; @@ -552,7 +578,7 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI DoCast(m_creature, SPELL_MANA_SHIELD); return 10000; case 9: - m_creature->TextEmote(EMOTE_DIALOG_MEDIVH_7, 0, false); + m_creature->MonsterTextEmote(EMOTE_DIALOG_MEDIVH_7, 0, false); return 10000; case 10: if(arca) @@ -560,7 +586,7 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI return 1000; case 11: if(arca) - ((Creature*)arca)->Yell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, NULL); + ((Creature*)arca)->MonsterYell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, NULL); return 5000; case 12: arca->GetMotionMaster()->MovePoint(0, -11010.82,-1761.18, 156.47); @@ -569,7 +595,7 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI arca->SetSpeed(MOVE_FLIGHT, 2.0f); return 10000; case 13: - m_creature->Yell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL); + m_creature->MonsterYell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL); return 10000; case 14: m_creature->SetVisibility(VISIBILITY_OFF); diff --git a/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp b/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp index d79f581d1c8..b838fc97aab 100644 --- a/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp +++ b/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp index 3334898ed7b..b35b6a98642 100644 --- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,18 +6,18 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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: Boss_Felblood_Kaelthas SD%Complete: 80 -SDComment: Normal and Heroic Support. Issues: Arcane Spheres do not initially follow targets. TODO: Convert Phoenix to ACID. +SDComment: Normal and Heroic Support. Issues: Arcane Spheres do not initially follow targets. SDCategory: Magisters' Terrace EndScriptData */ @@ -25,7 +25,7 @@ EndScriptData */ #include "def_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 aggro yell. +#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 @@ -36,13 +36,12 @@ EndScriptData */ /*** 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 44198 // A spell Phoenix uses to damage everything around -#define SPELL_PHOENIX_FIREBALL 44202 // Phoenix casts this in phase 2 and stops moving +#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_FLAMESTRIKE1_NORMAL 44190 // Damage part #define SPELL_FLAMESTRIKE1_HEROIC 46163 // Heroic damage part @@ -53,7 +52,6 @@ EndScriptData */ #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. @@ -68,16 +66,14 @@ EndScriptData */ #define CREATURE_ARCANE_SPHERE 24708 /** Locations **/ -float KaelLocations[6][2]= +float KaelLocations[3][2]= { - {148.744659, 181.377426},//center - {140.823883, 195.403046},//phoenixpos1 - {156.574188, 195.650482},//phoenixpos2 - {149.813, 160.917},//spherepos1 - {167.223, 173.594},//spherepos2 - {130.68, 173.007},//spherepos3 + {148.744659, 181.377426}, + {140.823883, 195.403046}, + {156.574188, 195.650482}, }; -#define LOCATION_Z -16.727455 + +#define LOCATION_Z -16.727455 struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI { @@ -106,6 +102,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI bool FirstGravityLapse; bool Heroic; + bool HasTaunted; uint8 Phase; // 0 = Not started @@ -116,7 +113,7 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI { // TODO: Timers FireballTimer = 0; - PhoenixTimer = 30000; + PhoenixTimer = 10000; FlameStrikeTimer = 25000; CombatPulseTimer = 0; @@ -126,55 +123,57 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI GravityLapsePhase = 0; FirstGravityLapse = true; + HasTaunted = false; Phase = 0; - if(pInstance) - { - if(m_creature->isDead()) - pInstance->SetData(DATA_KAELTHAS_EVENT, DONE); - else - pInstance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED); - } - } + if (pInstance) + pInstance->SetData(DATA_KAELTHAS_EVENT, 0); - void KilledUnit(Unit* victim) - { - if(victim && (victim->GetTypeId() == TYPEID_PLAYER)) - { - victim->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); - victim->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); - WorldPacket data(12); - data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); - data.append(victim->GetPackGUID()); - data << uint32(0); - victim->SendMessageToSet(&data, true); - } + GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_DOOR)); + if (Door) + Door->SetGoState(0); // 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) { - RemoveGravityLapse(); DoScriptText(SAY_DEATH, m_creature); - if(pInstance) - pInstance->SetData(DATA_KAELTHAS_EVENT, DONE); + GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_KAEL_DOOR)); + if (EncounterDoor) + EncounterDoor->SetGoState(0); // Open the encounter door } void DamageTaken(Unit* done_by, uint32 &damage) { - if(damage > m_creature->GetHealth()) + 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) { - DoScriptText(SAY_AGGRO, m_creature); - if(pInstance) - pInstance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS); + if (pInstance) + { + GameObject* EncounterDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_DOOR)); + if (EncounterDoor) + EncounterDoor->SetGoState(1); //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 SetThreatList(Creature* SummonedUnit) { - if(!SummonedUnit) + if (!SummonedUnit) return; std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList(); @@ -182,114 +181,86 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI for(i = m_threatlist.begin(); i != m_threatlist.end(); i++) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); - if(pUnit && pUnit->isAlive()) + if (pUnit && pUnit->isAlive()) { - float threat = DoGetThreat(pUnit); - SummonedUnit->AddThreat(pUnit, 0.1f); + float threat = m_creature->getThreatManager().getThreat(pUnit); + SummonedUnit->AddThreat(pUnit, threat); } } } - void EnterEvadeMode() - { - RemoveGravityLapse(); - m_creature->InterruptNonMeleeSpells(true); - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(); - m_creature->LoadCreaturesAddon(); - - if( m_creature->isAlive() ) - m_creature->GetMotionMaster()->MoveTargetedHome(); - - m_creature->SetLootRecipient(NULL); - - InCombat = false; - Reset(); - } - void TeleportPlayersToSelf() { - float x,y,z; - m_creature->Relocate(KaelLocations[0][0], KaelLocations[0][1], LOCATION_Z, 0); - Map *map = m_creature->GetMap(); - Map::PlayerList const &PlayerList = map->GetPlayers(); - Map::PlayerList::const_iterator i; - for (i = PlayerList.begin(); i != PlayerList.end(); ++i) + float x = KaelLocations[0][0]; + float y = KaelLocations[0][1]; + m_creature->Relocate(x, y, LOCATION_Z, 0); + //m_creature->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues... + std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) { - if (Player* i_pl = i->getSource()) - if(i_pl->isAlive()) - { - i_pl->CastSpell(i_pl, SPELL_TELEPORT_CENTER, true); - m_creature->GetNearPoint(m_creature,x,y,z,5,5,0); - i_pl->TeleportTo(m_creature->GetMapId(),x,y,LOCATION_Z,i_pl->GetOrientation()); - } + 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() { - Map *map = m_creature->GetMap(); - Map::PlayerList const &PlayerList = map->GetPlayers(); - Map::PlayerList::const_iterator i; - for (i = PlayerList.begin(); i != PlayerList.end(); ++i) + std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) { - if (Player* i_pl = i->getSource()) - if(i_pl->isAlive()) + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) // Knockback into the air - i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID()); + 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... { - Map *map = m_creature->GetMap(); - Map::PlayerList const &PlayerList = map->GetPlayers(); - Map::PlayerList::const_iterator i; - for (i = PlayerList.begin(); i != PlayerList.end(); ++i) + std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) { - if (Player* i_pl = i->getSource()) + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) { - if(i_pl->isAlive()) - { - // Also needs an exception in spell system. - i_pl->CastSpell(i_pl, 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(i_pl->GetPackGUID()); - data << uint32(0); - i_pl->SendMessageToSet(&data, true); - i_pl->SetSpeed(MOVE_FLIGHT, 2.0f); - } + // 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() { - Map *map = m_creature->GetMap(); - Map::PlayerList const &PlayerList = map->GetPlayers(); - Map::PlayerList::const_iterator i; - for (i = PlayerList.begin(); i != PlayerList.end(); ++i) + std::list<HostilReference*>::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) { - if(Player* i_pl = i->getSource()) + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) { - i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); - i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); + pUnit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); + pUnit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); + WorldPacket data(12); data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); - data.append(i_pl->GetPackGUID()); + data.append(pUnit->GetPackGUID()); data << uint32(0); - i_pl->SendMessageToSet(&data, true); + pUnit->SendMessageToSet(&data, true); } } } void UpdateAI(const uint32 diff) { - if(!UpdateVictim()) + //Return since we have no target + if (!UpdateVictim()) return; switch(Phase) @@ -297,9 +268,9 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI case 0: { // *Heroic mode only: - if(Heroic) + if (Heroic) { - if(PyroblastTimer < diff) + if (PyroblastTimer < diff) { DoCast(m_creature, SPELL_SHOCK_BARRIER, true); DoCast(m_creature->getVictim(), SPELL_PYROBLAST); @@ -307,56 +278,47 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI }else PyroblastTimer -= diff; } - if(FireballTimer < diff) + if (FireballTimer < diff) { DoCast(m_creature->getVictim(), Heroic ? SPELL_FIREBALL_HEROIC : SPELL_FIREBALL_NORMAL); FireballTimer = 2000 + rand()%4000; }else FireballTimer -= diff; - if(PhoenixTimer < diff) + if (PhoenixTimer < diff) { + + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + uint32 random = rand()%2 + 1; float x = KaelLocations[random][0]; float y = KaelLocations[random][1]; - Creature* Phoenix = m_creature->SummonCreature(CREATURE_PHOENIX, x, y, LOCATION_Z, 0, TEMPSUMMON_CORPSE_DESPAWN, 60000); - if(Phoenix) + + 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); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1); - if(target) - { - Phoenix->AddThreat(target,1000); - Phoenix->Attack(target,true); - Phoenix->GetMotionMaster()->MoveChase(target); - } - else - { - Phoenix->AddThreat(m_creature->getVictim(),1000); - Phoenix->Attack(m_creature->getVictim(),true); - Phoenix->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } + Phoenix->AI()->AttackStart(target); } DoScriptText(SAY_PHOENIX, m_creature); - PhoenixTimer = 40000; + PhoenixTimer = 60000; }else PhoenixTimer -= diff; - if(FlameStrikeTimer < diff) + if (FlameStrikeTimer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) { - m_creature->InterruptNonMeleeSpells(false); DoCast(target, SPELL_FLAMESTRIKE3, true); DoScriptText(SAY_FLAMESTRIKE, m_creature); - - FlameStrikeTimer = 20000 + rand()%5000; } + FlameStrikeTimer = 15000 + rand()%10000; }else FlameStrikeTimer -= diff; // Below 50% - if(m_creature->GetMaxHealth() * 0.5 > m_creature->GetHealth()) + if (m_creature->GetMaxHealth() * 0.5 > m_creature->GetHealth()) { m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); m_creature->StopMoving(); @@ -366,34 +328,35 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI GravityLapsePhase = 0; Phase = 1; } + DoMeleeAttackIfReady(); } break; case 1: { - m_creature->StopMoving(); - if(GravityLapseTimer < diff) + if (GravityLapseTimer < diff) { switch(GravityLapsePhase) { case 0: - if(FirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse + if (FirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse { DoScriptText(SAY_GRAVITY_LAPSE, m_creature); FirstGravityLapse = false; - if(pInstance) + + if (pInstance) { GameObject* KaelLeft = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_STATUE_LEFT)); - if(KaelLeft) KaelLeft->SetGoState(0); + if (KaelLeft) KaelLeft->SetGoState(0); GameObject* KaelRight = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_KAEL_STATUE_RIGHT)); - if(KaelRight) KaelRight->SetGoState(0); + if (KaelRight) KaelRight->SetGoState(0); } }else { DoScriptText(SAY_RECAST_GRAVITY, m_creature); } - m_creature->StopMoving(); + DoCast(m_creature, SPELL_GRAVITY_LAPSE_INITIAL); GravityLapseTimer = 2000 + diff;// Don't interrupt the visual spell GravityLapsePhase = 1; @@ -415,31 +378,23 @@ struct TRINITY_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI CastGravityLapseFly(); GravityLapseTimer = 30000; GravityLapsePhase = 4; + + for(uint8 i = 0; i < 3; ++i) { - Creature* Orb = m_creature->SummonCreature(CREATURE_ARCANE_SPHERE,KaelLocations[3+i][0],KaelLocations[3+i][1],LOCATION_Z,0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000); - if(Orb) + 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); - Unit *target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,i); - if(target) - { - Orb->AddThreat(target,1000); - Orb->Attack(target,true); - Orb->GetMotionMaster()->MoveChase(target); - } - else - { - Unit *ntarget = SelectUnit(SELECT_TARGET_RANDOM,0); - if(ntarget) - { - Orb->AddThreat(ntarget,1000); - Orb->Attack(ntarget,true); - Orb->GetMotionMaster()->MoveChase(ntarget); - } - } + //SetThreatList(Orb); + Orb->AddThreat(target, 1.0f); + Orb->AI()->AttackStart(target); } + } + DoCast(m_creature, SPELL_GRAVITY_LAPSE_CHANNEL); break; @@ -483,7 +438,7 @@ struct TRINITY_DLL_DECL mob_felkael_flamestrikeAI : public ScriptedAI void MoveInLineOfSight(Unit *who) {} void UpdateAI(const uint32 diff) { - if(FlameStrikeTimer < diff) + if (FlameStrikeTimer < diff) { DoCast(m_creature, Heroic ? SPELL_FLAMESTRIKE1_HEROIC : SPELL_FLAMESTRIKE1_NORMAL, true); m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); @@ -493,211 +448,187 @@ struct TRINITY_DLL_DECL mob_felkael_flamestrikeAI : public ScriptedAI struct TRINITY_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI { - mob_felkael_phoenixAI(Creature *c) : ScriptedAI(c) + mob_felkael_phoenixAI(Creature* c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); } - uint32 BurnTimer; - uint32 CheckTimer; - uint8 phase; + ScriptedInstance* pInstance; - bool end; + uint32 BurnTimer; + uint32 Death_Timer; + bool Rebirth; + bool FakeDeath; void Reset() { - m_creature->SetSpeed(MOVE_RUN, 0.5f); - m_creature->SetSpeed(MOVE_WALK, 0.5f); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + m_creature->CastSpell(m_creature,SPELL_PHOENIX_BURN,true); BurnTimer = 2000; - CheckTimer = 1000; - phase = 0; - end = false; + Death_Timer = 2700; + Rebirth = false; + FakeDeath = false; } void Aggro(Unit* who) {} - void JustDied(Unit* slayer) + void DamageTaken(Unit* pKiller, uint32 &damage) { - if (end) + if (damage < m_creature->GetHealth()) + return; + + //Prevent glitch if in fake death + if (FakeDeath) + { + damage = 0; return; - DoSpawnCreature(CREATURE_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 45000); + + } + //Don't really die in all phases of Kael'Thas + if (pInstance && 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) + { + DoSpawnCreature(CREATURE_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); } void UpdateAI(const uint32 diff) { - if(CheckTimer < diff) + + //If we are fake death, we cast revbirth and after that we kill the phoenix to spawn the egg. + if (FakeDeath) { - if (pInstance) + if (!Rebirth) + { + DoCast(m_creature, SPELL_REBIRTH_DMG); + Rebirth = true; + } + + if (Rebirth) { - Creature *boss = ((Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL))); - if (boss) + + if (Death_Timer < diff) { - phase = ((boss_felblood_kaelthasAI*)boss->AI())->Phase; - if(boss->isDead() || !boss->isInCombat()) - { - end = true; - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FIRE, NULL, false);//temphack, hellfire is not damaging self - } - } + DoSpawnCreature(CREATURE_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + m_creature->setDeathState(JUST_DIED); + m_creature->RemoveCorpse(); + Rebirth = false; + }else Death_Timer -= diff; } - CheckTimer = 1000; - }else CheckTimer -= diff; + + + } if (!UpdateVictim()) return; if (BurnTimer < diff) { - if(!phase) - { - DoCast(m_creature, SPELL_PHOENIX_BURN); - m_creature->DealDamage(m_creature, 1500, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FIRE, NULL, false);//temphack, hellfire is not damaging self - } - else - { - m_creature->StopMoving(); - DoCast(m_creature->getVictim(), SPELL_PHOENIX_FIREBALL); - } - BurnTimer = 2000; - }else 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(); + + DoMeleeAttackIfReady(); } }; -struct TRINITY_DLL_DECL mob_felkael_phoenix_eggAI : public Scripted_NoMovementAI +struct TRINITY_DLL_DECL mob_felkael_phoenix_eggAI : public ScriptedAI { - mob_felkael_phoenix_eggAI(Creature *c) : Scripted_NoMovementAI(c) - { - pInstance = ((ScriptedInstance*)c->GetInstanceData()); - } + mob_felkael_phoenix_eggAI(Creature *c) : ScriptedAI(c) {} uint32 HatchTimer; - ScriptedInstance* pInstance; - void Reset() { HatchTimer = 15000; } + + void Reset() + { + HatchTimer = 10000; + + } void Aggro(Unit* who) {} void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) { - - if(HatchTimer < diff) + if (HatchTimer < diff) { - Creature *bird = DoSpawnCreature(CREATURE_PHOENIX, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 60000); - if (bird) - { - Unit *boss = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL)); - if (boss && boss->getVictim()) - { - bird->AddThreat(boss->getVictim(),100); - bird->Attack(boss->getVictim(),true); - bird->GetMotionMaster()->MoveChase(boss->getVictim()); - } - } + DoSpawnCreature(CREATURE_PHOENIX, 0, 0, 0, 0, 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 TRINITY_DLL_DECL mob_arcane_sphereAI : public ScriptedAI { - mob_arcane_sphereAI(Creature *c) : ScriptedAI(c) - { - pInstance = ((ScriptedInstance*)c->GetInstanceData()); - } + mob_arcane_sphereAI(Creature *c) : ScriptedAI(c) {Reset();} + uint32 DespawnTimer; uint32 ChangeTargetTimer; - uint32 CheckTimer; - - ScriptedInstance* pInstance; void Reset() { - m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); DespawnTimer = 30000; - ChangeTargetTimer = 5000; - CheckTimer = 1000; - m_creature->SetSpeed(MOVE_RUN, 0.5f); - m_creature->SetSpeed(MOVE_WALK, 0.5f); + ChangeTargetTimer = 6000 + rand()%6000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); m_creature->setFaction(14); DoCast(m_creature, SPELL_ARCANE_SPHERE_PASSIVE, true); } + void Aggro(Unit* who) {} - void StalkTarget(Unit* target) - { - if(!target) - return; - m_creature->AddThreat(target,100000); - m_creature->GetMotionMaster()->MoveChase(target); - m_creature->Attack(target,true); - } void UpdateAI(const uint32 diff) { - if(DespawnTimer < 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(!UpdateVictim()) - ChangeTargetTimer = 0; + //Return since we have no target + if (!UpdateVictim()) + return; - if(ChangeTargetTimer < diff) + if (ChangeTargetTimer < diff) { - DoResetThreat(); - Unit *ntarget = SelectUnit(SELECT_TARGET_RANDOM,0); - if (ntarget) - StalkTarget(ntarget); - ChangeTargetTimer = 10000; - }else ChangeTargetTimer -= diff; - if(CheckTimer < diff) - { - if (pInstance) - { - Creature *boss = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_KAEL)); - if(boss) - { - if(!((boss_felblood_kaelthasAI*)boss->AI())->Phase || boss->isDead()) - DespawnTimer = 0; - }else DespawnTimer = 0; - } - CheckTimer = 1000; - }else CheckTimer -= diff; - } -}; + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + m_creature->AddThreat(target, 1.0f); + m_creature->TauntApply(target); + AttackStart(target); -bool GOHello_go_kael_orb(Player *player, GameObject* _GO) -{ - ScriptedInstance* pInst = (ScriptedInstance*)_GO->GetInstanceData(); - if (pInst && player) - { - Unit *kael = Unit::GetUnit((*_GO),pInst->GetData64(DATA_KAEL)); - if (kael && kael->isDead()) - player->TeleportTo(530, 12888, -6876, 9, 0.3); - } - return true; -} - -bool GOHello_go_movie_orb(Player *player, GameObject* _GO) -{ - if (player) - { - WorldPacket data(SMSG_TRIGGER_CINEMATIC, 4); - data << (uint32)164; - player->GetSession()->SendPacket(&data); - - if (player->GetQuestStatus(11490) == QUEST_STATUS_INCOMPLETE) - { - Unit *qUnit = player->SummonCreature(25042,player->GetPositionX(),player->GetPositionY(),player->GetPositionZ()-10,0,TEMPSUMMON_CORPSE_DESPAWN,0); - if(qUnit) - player->DealDamage(qUnit, qUnit->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } + ChangeTargetTimer = 5000 + rand()%10000; + }else ChangeTargetTimer -= diff; } - return true; -} +}; CreatureAI* GetAI_boss_felblood_kaelthas(Creature* c) { @@ -739,28 +670,18 @@ void AddSC_boss_felblood_kaelthas() newscript->RegisterSelf(); newscript = new Script; - newscript->Name="mob_felkael_phoenix"; + newscript->Name = "mob_felkael_phoenix"; newscript->GetAI = &GetAI_mob_felkael_phoenix; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="mob_felkael_phoenix_egg"; + newscript->Name = "mob_felkael_phoenix_egg"; newscript->GetAI = &GetAI_mob_felkael_phoenix_egg; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="mob_felkael_flamestrike"; + newscript->Name = "mob_felkael_flamestrike"; newscript->GetAI = &GetAI_mob_felkael_flamestrike; newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name="go_kael_orb"; - newscript->pGOHello = &GOHello_go_kael_orb; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name="go_movie_orb"; - newscript->pGOHello = &GOHello_go_movie_orb; - newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp index 371af670a10..3488eada9dd 100644 --- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -97,8 +97,6 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI boss_priestess_delrissaAI(Creature* c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); - Adds.clear(); - //SummonAdds(); Heroic = c->GetMap()->IsHeroic(); } @@ -121,7 +119,6 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI void Reset() { - m_creature->SetCorpseDelay(60*60*1000); LackeysKilled = 0; PlayersKilled = 0; @@ -133,15 +130,14 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI CombatPulseTimer = 5000; + SummonAdds(); CheckAdds(); - if(pInstance) + if (pInstance) { + pInstance->SetData(DATA_DELRISSA_EVENT, NOT_STARTED); pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 0); - if (m_creature->isDead()) - pInstance->SetData(DATA_DELRISSA_EVENT, DONE); - else pInstance->SetData(DATA_DELRISSA_EVENT, NOT_STARTED); - }else error_log(ERROR_INST_DATA); + } else error_log(ERROR_INST_DATA); } void Aggro(Unit* who) @@ -155,8 +151,9 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI void SummonAdds() { - /*if (m_creature->isDead()) - return;*/ + if(!Adds.empty()) + return; + std::vector<uint32> AddList; for(uint8 i = 0; i < 8; ++i) AddList.push_back(AddEntry[i]); @@ -167,7 +164,7 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI for(uint8 i = 0; i < AddList.size(); ++i) { Creature* pAdd = m_creature->SummonCreature(AddList[i], LackeyLocations[i][0], LackeyLocations[i][1], POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0); - if(pAdd) + if (pAdd) { Add* nAdd = new Add(AddList[i], pAdd->GetGUID()); Adds.push_back(nAdd); @@ -177,51 +174,45 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI void CheckAdds() { - //if (m_creature->isDead()) - // return; - if(Adds.empty()) - { - SummonAdds(); + if (Adds.empty()) return; - } - for(uint8 i = 0; i < Adds.size(); ++i) + + uint32 n = 0; + for(std::vector<Add*>::iterator i = Adds.begin(); i != Adds.end(); ++i, ++n) { - Creature* pAdd = ((Creature*)Unit::GetUnit(*m_creature, Adds[i]->guid)); + Creature* pAdd = ((Creature*)Unit::GetUnit(*m_creature, (*i)->guid)); if(pAdd && pAdd->isAlive()) { - pAdd->AI()->EnterEvadeMode(); - pAdd->GetMotionMaster()->MovePoint(0,LackeyLocations[i][0], LackeyLocations[i][1], POS_Z); + pAdd->AI()->EnterEvadeMode(); // Force them out of combat and reset if they are in combat. } - if(!pAdd || (pAdd && pAdd->isDead())) + else { + pAdd = m_creature->SummonCreature((*i)->entry, LackeyLocations[n][0], LackeyLocations[n][1], POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0); if(pAdd) - pAdd->RemoveCorpse();//looks stupid if mob is alive but has a dead corpse in front of him :) - Creature* pAdd = m_creature->SummonCreature(Adds[i]->entry, LackeyLocations[i][0], LackeyLocations[i][1], POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0); - if(pAdd) - Adds[i]->guid = pAdd->GetGUID(); + (*i)->guid = pAdd->GetGUID(); + else + (*i)->guid = 0; } } } void KilledUnit(Unit* victim) { - if(victim->GetTypeId() != TYPEID_PLAYER || m_creature->isDead()) + if (victim->GetTypeId() != TYPEID_PLAYER) return; DoScriptText(PlayerDeath[PlayersKilled].id, m_creature); - if( PlayersKilled < 4 ) + + if (PlayersKilled < 4) ++PlayersKilled; } void KilledLackey() { - if(m_creature->isDead())//no sense to talk if dead.. - return; DoScriptText(LackeyDeath[LackeysKilled].id, m_creature); - if( LackeysKilled < 3 ) - ++LackeysKilled; - CheckLootable(); + if (LackeysKilled < 3) + ++LackeysKilled; } void JustDied(Unit* killer) @@ -230,21 +221,21 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI CheckLootable(); - if(!pInstance) + if (!pInstance) { error_log(ERROR_INST_DATA); return; } - pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 1); pInstance->SetData(DATA_DELRISSA_EVENT, DONE); - if(GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_DELRISSA_DOOR))) + + if (GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_DELRISSA_DOOR))) Door->SetGoState(0); } void CheckLootable() { - if(pInstance && pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) >= 4) + if (LackeysKilled > 3) m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); else m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); @@ -252,30 +243,30 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(!UpdateVictim()) + if (!UpdateVictim()) return; - if(HealTimer < diff) + if (HealTimer < diff) { uint32 health = m_creature->GetHealth(); Unit* target = m_creature; for(uint8 i = 0; i < Adds.size(); ++i) - if(Unit* pAdd = Unit::GetUnit(*m_creature, Adds[i]->guid)) - if(pAdd->isAlive() && pAdd->GetHealth() < health) + if (Unit* pAdd = Unit::GetUnit(*m_creature, Adds[i]->guid)) + if (pAdd->isAlive() && pAdd->GetHealth() < health) target = pAdd; DoCast(target, SPELL_FLASH_HEAL); HealTimer = 15000; }else HealTimer -= diff; - if(RenewTimer < diff) + if (RenewTimer < diff) { Unit* target = m_creature; - if(rand()%2 == 1) + if (rand()%2 == 1) { std::vector<Add*>::iterator itr = Adds.begin() + rand()%Adds.size(); Unit* pAdd = Unit::GetUnit(*m_creature, (*itr)->guid); - if(pAdd && pAdd->isAlive()) + if (pAdd && pAdd->isAlive()) target = pAdd; } DoCast(target,Heroic ? SPELL_RENEW_HEROIC : SPELL_RENEW_NORMAL); @@ -285,44 +276,44 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if(ShieldTimer < diff) { Unit* target = m_creature; - if(rand()%2 == 1) + if (rand()%2 == 1) { std::vector<Add*>::iterator itr = Adds.begin() + rand()%Adds.size(); - if(Unit* pAdd = Unit::GetUnit(*m_creature, (*itr)->guid)) - if(!pAdd->HasAura(SPELL_SHIELD, 0) && pAdd->isAlive()) + if (Unit* pAdd = Unit::GetUnit(*m_creature, (*itr)->guid)) + if (!pAdd->HasAura(SPELL_SHIELD) && pAdd->isAlive()) target = pAdd; } DoCast(target, SPELL_SHIELD); ShieldTimer = 7500; }else ShieldTimer -= diff; - if(DispelTimer < diff) + if (DispelTimer < diff) { Unit* target = NULL; bool friendly = false; - if(rand()%2 == 1) + if (rand()%2 == 1) target = SelectUnit(SELECT_TARGET_RANDOM, 0); else { friendly = true; - if(rand()%2 == 1) + if (rand()%2 == 1) target = m_creature; else { std::vector<Add*>::iterator itr = Adds.begin() + rand()%Adds.size(); Unit* pAdd = Unit::GetUnit(*m_creature, (*itr)->guid); - if(pAdd && pAdd->isAlive()) + if (pAdd && pAdd->isAlive()) target = pAdd; } } - if(target) + if (target) { DoCast(target, SPELL_DISPEL_MAGIC); DispelTimer = 12000; } }else DispelTimer -= diff; - if(SWPainTimer < diff) + if (SWPainTimer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0),Heroic ? SPELL_SW_PAIN_HEROIC : SPELL_SW_PAIN_NORMAL); SWPainTimer = 10000; @@ -368,12 +359,7 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI void Reset() { UsedPotion = false; - if(pInstance) - { - Creature *boss = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA))); - if (boss && boss->isDead()) - boss->Respawn(); - } + ResetThreatTimer = 5000 + rand()%15000; // These guys like to switch targets often, and are not meant to be tanked. } @@ -381,46 +367,47 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI void JustDied(Unit* killer) { - if(!pInstance) + if (!pInstance) { error_log(ERROR_INST_DATA); return; } Creature* Delrissa = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA))); - if(Delrissa) + if (Delrissa) { + pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 1); + ((boss_priestess_delrissaAI*)Delrissa->AI())->KilledLackey(); - if(!Delrissa->isAlive() && pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) > 3) - ((boss_priestess_delrissaAI*)Delrissa->AI())->CheckLootable(); - pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 1); + if (!Delrissa->isAlive() && pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) > 3) + Delrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } } void KilledUnit(Unit* victim) { - if(!pInstance) + if (!pInstance) { error_log(ERROR_INST_DATA); return; } Creature* Delrissa = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA))); - if(Delrissa) + if (Delrissa) Delrissa->AI()->KilledUnit(victim); } void AcquireGUIDs() { - if(!pInstance) + if (!pInstance) { error_log(ERROR_INST_DATA); return; } Creature* Delrissa = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA))); - if(Delrissa) + if (Delrissa) { Group = ((boss_priestess_delrissaAI*)Delrissa->AI())->Adds; Add* dAdd = new Add(Delrissa->GetEntry(), Delrissa->GetGUID()); @@ -430,13 +417,13 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) && !UsedPotion) + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) && !UsedPotion) { DoCast(m_creature, SPELL_HEALING_POTION, true); UsedPotion = true; } - if(ResetThreatTimer < diff) + if (ResetThreatTimer < diff) { DoResetThreat(); ResetThreatTimer = 5000 + rand()%15000; @@ -478,12 +465,12 @@ struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestA void UpdateAI(const uint32 diff) { - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(Vanish_Timer < diff) + if (Vanish_Timer < diff) { m_creature->SetVisibility(VISIBILITY_OFF); // ...? Hacklike DoCast(m_creature, SPELL_VANISH); @@ -494,35 +481,36 @@ struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestA m_creature->AddThreat(SelectUnit(SELECT_TARGET_RANDOM, 0), 1000.0f); }else Vanish_Timer -= diff; - if(InVanish) - if(Wait_Timer < diff) + if (InVanish) { - 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 (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) + if (Gouge_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_GOUGE); - DoModifyThreatPercent(m_creature->getVictim(),-100); Gouge_Timer = 5500; }else Gouge_Timer -= diff; - if(Kick_Timer < diff) + if (Kick_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_KICK); Kick_Timer = 7000; }else Kick_Timer -= diff; - if(Eviscerate_Timer < diff) + if (Eviscerate_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_EVISCERATE); Eviscerate_Timer = 4000; }else Eviscerate_Timer -= diff; - if(!InVanish) + if (!InVanish) DoMeleeAttackIfReady(); } }; @@ -554,7 +542,8 @@ struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestA void UpdateAI(const uint32 diff) { - if (!UpdateVictim() ) + //Return since we have no target + if (!UpdateVictim()) return; //Chain cast @@ -567,9 +556,7 @@ struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestA struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI { //Warlock - boss_ellris_duskhallowAI(Creature *c) : boss_priestess_guestAI(c) - { - } + boss_ellris_duskhallowAI(Creature *c) : boss_priestess_guestAI(c) {} bool HasSummonedImp; @@ -581,7 +568,7 @@ struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI void Reset() { - //HasSummonedImp = false; + HasSummonedImp = false; Immolate_Timer = 6000; Shadow_Bolt_Timer = 3000; @@ -599,51 +586,49 @@ struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI void UpdateAI(const uint32 diff) { - if(!HasSummonedImp) + if (!HasSummonedImp) { //Imp will not despawn unless it's killed, even if owner dies, this is correct way. DoCast(m_creature,SPELL_SUMMON_IMP); HasSummonedImp = true; } - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(Immolate_Timer < diff) + if (Immolate_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_IMMOLATE); Immolate_Timer = 6000; }else Immolate_Timer -= diff; - if(Shadow_Bolt_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 (Seed_of_Corruption_Timer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SEED_OF_CORRUPTION); Seed_of_Corruption_Timer = 10000; }else Seed_of_Corruption_Timer -= diff; - if(Curse_of_Agony_Timer < diff) + if (Curse_of_Agony_Timer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_CURSE_OF_AGONY); Curse_of_Agony_Timer = 13000; }else Curse_of_Agony_Timer -= diff; - if(Fear_Timer < diff) + if (Fear_Timer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FEAR); Fear_Timer = 10000; }else Fear_Timer -= diff; - if (m_creature->GetDistance(m_creature->getVictim()) <= 10) - m_creature->StopMoving(); - //DoMeleeAttackIfReady();//should not melee, she's a warlock + DoMeleeAttackIfReady(); } }; @@ -680,18 +665,18 @@ struct TRINITY_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_guestA void UpdateAI(const uint32 diff) { - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(Knockdown_Timer < diff) + if (Knockdown_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); Knockdown_Timer = 6000; }else Knockdown_Timer -= diff; - if(Snap_Kick_Timer < diff) + if (Snap_Kick_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_SNAP_KICK); Snap_Kick_Timer = 4500; @@ -712,7 +697,7 @@ struct TRINITY_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_guestA struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI { //Mage - boss_yazzaiAI(Creature *c) : boss_priestess_guestAI(c) {} + boss_yazzaiAI(Creature *c) : boss_priestess_guestAI(c) {} bool HasIceBlocked; @@ -743,82 +728,75 @@ struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI void UpdateAI(const uint32 diff) { - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(Polymorph_Timer < diff) + if (Polymorph_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) { DoCast(target, SPELL_POLYMORPH); - DoModifyThreatPercent(target,-100); Polymorph_Timer = 20000; } }else Polymorph_Timer -= diff; - if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 35) && !HasIceBlocked) + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 35) && !HasIceBlocked) { DoCast(m_creature, SPELL_ICE_BLOCK); HasIceBlocked = true; } - if(Blizzard_Timer < diff) + if (Blizzard_Timer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_BLIZZARD); Blizzard_Timer = 8000; }else Blizzard_Timer -= diff; - if(Ice_Lance_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) + 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) + if (Frostbolt_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_FROSTBOLT); Frostbolt_Timer = 8000; }else Frostbolt_Timer -= diff; - if(Blink_Timer < diff) + if (Blink_Timer < diff) { bool InMeleeRange = false; std::list<HostilReference*>& t_list = m_creature->getThreatManager().getThreatList(); for(std::list<HostilReference*>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { - if(Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) + 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 does not work on npcs - float x,y,z; - m_creature->GetPosition(x,y,z); - x = rand()%2 ? x+10+rand()%10 : x-10-rand()%10; - y = rand()%2 ? y+10+rand()%10 : y-10-rand()%10; - DoTeleportTo(x, y, z); - } + if (InMeleeRange) + DoCast(m_creature, SPELL_BLINK); + Blink_Timer = 8000; }else Blink_Timer -= diff; - if (m_creature->getVictim() && m_creature->GetDistance(m_creature->getVictim()) <= 10) - m_creature->StopMoving(); - - //DoMeleeAttackIfReady(); //mage type, no melee needed + DoMeleeAttackIfReady(); } }; @@ -851,6 +829,7 @@ struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_guestAI Hamstring_Timer = 4500; Mortal_Strike_Timer = 8000; DoCast(m_creature, SPELL_BATTLE_SHOUT); + boss_priestess_guestAI::Reset(); } @@ -861,56 +840,60 @@ struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_guestAI void UpdateAI(const uint32 diff) { - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(Intercept_Stun_Timer < diff) + if (Intercept_Stun_Timer < diff) { bool InMeleeRange = false; std::list<HostilReference*>& t_list = m_creature->getThreatManager().getThreatList(); for(std::list<HostilReference*>::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)) + if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) { - InMeleeRange = true; - break; + //if in melee range + if (target->IsWithinDistInMap(m_creature, 5)) + { + InMeleeRange = true; + break; + } } } + //if nobody is in melee range than try to use Intercept - if(!InMeleeRange) + if (!InMeleeRange) DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_INTERCEPT_STUN); + Intercept_Stun_Timer = 10000; }else Intercept_Stun_Timer -= diff; - if(Disarm_Timer < diff) + if (Disarm_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_DISARM); Disarm_Timer = 6000; }else Disarm_Timer -= diff; - if(Hamstring_Timer < diff) + if (Hamstring_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_HAMSTRING); Hamstring_Timer = 4500; }else Hamstring_Timer -= diff; - if(Mortal_Strike_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) + 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) + if (Frightening_Shout_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); Frightening_Shout_Timer = 18000; @@ -959,13 +942,11 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI uint32 Multi_Shot_Timer; uint32 Wing_Clip_Timer; uint32 Freezing_Trap_Timer; - uint32 StopMoving; - bool Stopped; void Reset() { //SliverGUID = 0; - //HasSummonedSliver = false; + HasSummonedSliver = false; Aimed_Shot_Timer = 6000; Shoot_Timer = 2500; @@ -973,8 +954,6 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI Multi_Shot_Timer = 10000; Wing_Clip_Timer = 4000; Freezing_Trap_Timer = 15000; - StopMoving = 2000; - Stopped = false; boss_priestess_guestAI::Reset(); } @@ -986,10 +965,10 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI void UpdateAI(const uint32 diff) { - if(!HasSummonedSliver) + if (!HasSummonedSliver) { Creature* Sliver = m_creature->SummonCreature(CREATURE_SLIVER, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - if(Sliver) + if (Sliver) { //((mob_sliverAI*)Sliver->AI())->GaraxxasGUID = m_creature->GetGUID(); //SliverGUID = Sliver->GetGUID(); @@ -997,64 +976,53 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI } } - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(m_creature->IsWithinDistInMap(m_creature->getVictim(), 5)) + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5.0f)) { - if(Wing_Clip_Timer < diff) + 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) + if (Freezing_Trap_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_FREEZING_TRAP); - DoModifyThreatPercent(m_creature->getVictim(),-100); Freezing_Trap_Timer = 30000; }else Freezing_Trap_Timer -= diff; - if(!m_creature->getVictim()->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED | UNIT_STAT_DISTRACTED)) - DoMeleeAttackIfReady(); - }else + DoMeleeAttackIfReady(); + } + else { - if(Concussive_Shot_Timer < diff) + 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) + 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) + 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) + if (Shoot_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_SHOOT); Shoot_Timer = 2500; }else Shoot_Timer -= diff; } - if(StopMoving < diff) - { - if(Stopped) - Stopped = false; - else - Stopped = true; - StopMoving = 2000+rand()%5000; - }else StopMoving -= diff; - if (Stopped) - m_creature->StopMoving(); } }; @@ -1104,12 +1072,12 @@ struct TRINITY_DLL_DECL boss_apokoAI : public boss_priestess_guestAI void UpdateAI(const uint32 diff) { - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(Totem_Timer < diff) + if (Totem_Timer < diff) { switch(rand()%3) { @@ -1121,25 +1089,25 @@ struct TRINITY_DLL_DECL boss_apokoAI : public boss_priestess_guestAI Totem_Timer = Totem_Amount*2000; }else Totem_Timer -= diff; - if(War_Stomp_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 (Purge_Timer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_PURGE); Purge_Timer = 15000; }else Purge_Timer -= diff; - if(Frost_Shock_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) + if (Healing_Wave_Timer < diff) { // std::vector<Add*>::iterator itr = Group.begin() + rand()%Group.size(); // uint64 guid = (*itr)->guid; @@ -1191,44 +1159,45 @@ struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_guestAI void UpdateAI(const uint32 diff) { - if(!UpdateVictim() ) + if (!UpdateVictim()) return; boss_priestess_guestAI::UpdateAI(diff); - if(Goblin_Dragon_Gun_Timer < diff) + if (Goblin_Dragon_Gun_Timer < diff) { - if (m_creature->GetDistance(m_creature->getVictim()) <= 5) - { - Goblin_Dragon_Gun_Timer = 10000; - DoCast(m_creature->getVictim(), SPELL_GOBLIN_DRAGON_GUN); - }else Goblin_Dragon_Gun_Timer = 2000; + DoCast(m_creature->getVictim(), SPELL_GOBLIN_DRAGON_GUN); + Goblin_Dragon_Gun_Timer = 10000; }else Goblin_Dragon_Gun_Timer -= diff; - if(Rocket_Launch_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) + 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) + if (Recombobulate_Timer < diff) { for(uint8 i = 0; i < Group.size(); ++i) - if(Unit* pAdd = Unit::GetUnit(*m_creature, Group[i]->guid)) - if(pAdd->IsPolymorphed()) + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, Group[i]->guid)) + { + if (pAdd->IsPolymorphed()) { DoCast(pAdd, SPELL_RECOMBOBULATE); break; } + } + } }else Recombobulate_Timer -= diff; - if(High_Explosive_Sheep_Timer < diff) + if (High_Explosive_Sheep_Timer < diff) { DoCast(m_creature, SPELL_HIGH_EXPLOSIVE_SHEEP); High_Explosive_Sheep_Timer = 65000; @@ -1328,62 +1297,62 @@ void AddSC_boss_priestess_delrissa() Script *newscript; newscript = new Script; - newscript->Name="boss_priestess_delrissa"; + newscript->Name = "boss_priestess_delrissa"; newscript->GetAI = &GetAI_boss_priestess_delrissa; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_kagani_nightstrike"; + newscript->Name = "boss_kagani_nightstrike"; newscript->GetAI = &GetAI_boss_kagani_nightstrike; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_ellris_duskhallow"; + newscript->Name = "boss_ellris_duskhallow"; newscript->GetAI = &GetAI_ellris_duskhallow; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_eramas_brightblaze"; + newscript->Name = "boss_eramas_brightblaze"; newscript->GetAI = &GetAI_eramas_brightblaze; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_yazzai"; + newscript->Name = "boss_yazzai"; newscript->GetAI = &GetAI_yazzai; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_warlord_salaris"; + newscript->Name = "boss_warlord_salaris"; newscript->GetAI = &GetAI_warlord_salaris; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_garaxxas"; + newscript->Name = "boss_garaxxas"; newscript->GetAI = &GetAI_garaxxas; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_apoko"; + newscript->Name = "boss_apoko"; newscript->GetAI = &GetAI_apoko; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="boss_zelfan"; + newscript->Name = "boss_zelfan"; newscript->GetAI = &GetAI_zelfan; newscript->RegisterSelf(); /*newscript = new Script; - newscript->Name="mob_high_explosive_sheep"; + newscript->Name = "mob_high_explosive_sheep"; newscript->GetAI = &GetAI_mob_high_explosive_sheep; newscript->RegisterSelf();*/ /*newscript = new Script; - newscript->Name="mob_fizzle"; + newscript->Name = "mob_fizzle"; newscript->GetAI = &GetAI_mob_fizzle; newscript->RegisterSelf();*/ /*newscript = new Script; - newscript->Name="mob_sliver"; + newscript->Name = "mob_sliver"; newscript->GetAI = &GetAI_mob_sliver; newscript->RegisterSelf();*/ } diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp index a7af5214014..2dc2d893c5a 100644 --- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,12 +6,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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 @@ -32,7 +32,7 @@ EndScriptData */ #define SAY_DEATH -1585005 #define EMOTE_CRYSTAL -1585006 -//Crystal efect spells +//Crystal effect spells #define SPELL_FEL_CRYSTAL_COSMETIC 44374 #define SPELL_FEL_CRYSTAL_DUMMY 44329 #define SPELL_FEL_CRYSTAL_VISUAL 44355 @@ -56,8 +56,8 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI pInstance = ((ScriptedInstance*)c->GetInstanceData()); Crystals.clear(); - // GUIDs per instance is static, so we only need to load them once. - if(pInstance) + //GUIDs per instance is static, so we only need to load them once. + if (pInstance) { uint32 size = pInstance->GetData(DATA_FEL_CRYSTAL_SIZE); for(uint8 i = 0; i < size; ++i) @@ -71,6 +71,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI } ScriptedInstance* pInstance; + bool Heroic; std::list<uint64> Crystals; @@ -78,23 +79,23 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI uint32 DrainManaTimer; uint32 FelExplosionTimer; uint32 DrainCrystalTimer; - uint32 CheckTimer; + uint32 EmpowerTimer; bool IsDraining; bool DrainingCrystal; - bool Heroic; + 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(pInstance) + if (pInstance) { //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) for(std::list<uint64>::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) { if(!pUnit->isAlive()) ((Creature*)pUnit)->Respawn(); // Let MaNGOS handle setting death state, etc. @@ -103,14 +104,13 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI pUnit->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } } + GameObject* Door = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR)); - if( Door ) + if (Door) Door->SetGoState(0); // 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 - if (m_creature->isDead()) - pInstance->SetData(DATA_SELIN_EVENT, DONE); - else pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED); + pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED); }else error_log(ERROR_INST_DATA); DrainLifeTimer = 3000 + rand()%4000; @@ -118,7 +118,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI FelExplosionTimer = 2100; DrainCrystalTimer = 10000 + rand()%5000; DrainCrystalTimer = 20000 + rand()%5000; - CheckTimer = 1000; + EmpowerTimer = 10000; IsDraining = false; DrainingCrystal = false; @@ -127,7 +127,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI void SelectNearestCrystal() { - if(Crystals.empty()) + if (Crystals.empty()) return; float ShortestDistance = 0; @@ -140,9 +140,9 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI pCrystal = NULL; //pCrystal = Unit::GetUnit(*m_creature, FelCrystals[i]); pCrystal = Unit::GetUnit(*m_creature, *itr); - if(pCrystal && pCrystal->isAlive()) + if (pCrystal && pCrystal->isAlive()) { - if(!ShortestDistance || (ShortestDistance > m_creature->GetDistance2d(pCrystal))) + if (!ShortestDistance || (ShortestDistance > m_creature->GetDistance2d(pCrystal))) { ShortestDistance = m_creature->GetDistance2d(pCrystal); CrystalGUID = pCrystal->GetGUID(); @@ -150,7 +150,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI } } } - if( CrystalChosen ) + if (CrystalChosen) { DoScriptText(SAY_ENERGY, m_creature); DoScriptText(EMOTE_CRYSTAL, m_creature); @@ -168,7 +168,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI void ShatterRemainingCrystals() { - if(Crystals.empty()) + if (Crystals.empty()) return; //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) @@ -176,20 +176,19 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { //Creature* pCrystal = ((Creature*)Unit::GetUnit(*m_creature, FelCrystals[i])); Creature* pCrystal = ((Creature*)Unit::GetUnit(*m_creature, *itr)); - if( pCrystal && pCrystal->isAlive()) + if (pCrystal && pCrystal->isAlive()) pCrystal->DealDamage(pCrystal, pCrystal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } void Aggro(Unit* who) { - m_creature->SetPower(POWER_MANA, 0); DoScriptText(SAY_AGGRO, m_creature); - if( pInstance ) + if (pInstance) { GameObject* EncounterDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR)); - if( EncounterDoor ) + if (EncounterDoor) EncounterDoor->SetGoState(1); //Close the encounter door, open it in JustDied/Reset } } @@ -198,17 +197,17 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { switch(rand()%2) { - case 0: DoScriptText(SAY_KILL_1, m_creature); break; - case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; } } void MovementInform(uint32 type, uint32 id) { - if(type == POINT_MOTION_TYPE && id == 1) + if (type == POINT_MOTION_TYPE && id == 1) { Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID); - if(CrystalChosen && CrystalChosen->isAlive()) + if (CrystalChosen && CrystalChosen->isAlive()) { // Make the crystal attackable // We also remove NON_ATTACKABLE in case the database has it set. @@ -229,7 +228,7 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if(!pInstance) + if (!pInstance) { error_log(ERROR_INST_DATA); return; @@ -238,35 +237,36 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI pInstance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete! GameObject* EncounterDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR)); - if( EncounterDoor ) + if (EncounterDoor) EncounterDoor->SetGoState(0); // Open the encounter door GameObject* ContinueDoor = GameObject::GetGameObject(*m_creature, pInstance->GetData64(DATA_SELIN_DOOR)); - if( ContinueDoor ) + if (ContinueDoor) ContinueDoor->SetGoState(0); // Open the door leading further in + ShatterRemainingCrystals(); } void UpdateAI(const uint32 diff) { - if(!UpdateVictim()) + if (!UpdateVictim()) return; - if(!DrainingCrystal) + if (!DrainingCrystal) { uint32 maxPowerMana = m_creature->GetMaxPower(POWER_MANA); - if( maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10) ) + if (maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) { - if( DrainLifeTimer < diff ) + if (DrainLifeTimer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DRAIN_LIFE); DrainLifeTimer = 10000; }else DrainLifeTimer -= diff; // Heroic only - if( Heroic ) + if (Heroic) { - if( DrainManaTimer < diff ) + if (DrainManaTimer < diff) { DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DRAIN_MANA); DrainManaTimer = 10000; @@ -274,9 +274,9 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI } } - if( FelExplosionTimer < diff ) + if (FelExplosionTimer < diff) { - if(!m_creature->IsNonMeleeSpellCasted(false)) + if (!m_creature->IsNonMeleeSpellCasted(false)) { DoCast(m_creature, SPELL_FEL_EXPLOSION); FelExplosionTimer = 2000; @@ -285,48 +285,40 @@ struct TRINITY_DLL_DECL boss_selin_fireheartAI : public ScriptedAI // If below 10% mana, start recharging maxPowerMana = m_creature->GetMaxPower(POWER_MANA); - if( maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10) ) + if (maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) { - if(DrainCrystalTimer < diff) + if (DrainCrystalTimer < diff) { SelectNearestCrystal(); - if(Heroic) DrainCrystalTimer = 10000 + rand()%5000; - else DrainCrystalTimer = 20000 + rand()%5000; + if (Heroic) DrainCrystalTimer = 10000 + rand()%5000; + else DrainCrystalTimer = 20000 + rand()%5000; }else DrainCrystalTimer -= diff; } }else { - if( IsDraining ) + if (IsDraining) { - if (CheckTimer < diff) + if (EmpowerTimer < diff) { + IsDraining = false; + DrainingCrystal = false; + + DoScriptText(SAY_EMPOWERED, m_creature); + Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID); - if(CrystalChosen) - { - if(CrystalChosen->GetUInt32Value(UNIT_CHANNEL_SPELL) == SPELL_MANA_RAGE) - { - m_creature->StopMoving(); - }else{ - 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()); - } - } - CheckTimer = 1000; - }else CheckTimer -= diff; + 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. } }; @@ -348,19 +340,18 @@ struct TRINITY_DLL_DECL mob_fel_crystalAI : public ScriptedAI void JustDied(Unit* killer) { - m_creature->RemoveAurasDueToSpell(SPELL_MANA_RAGE); - if(ScriptedInstance* pInstance = ((ScriptedInstance*)m_creature->GetInstanceData())) + if (ScriptedInstance* pInstance = ((ScriptedInstance*)m_creature->GetInstanceData())) { Creature* Selin = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_SELIN))); - if(Selin && Selin->isAlive()) + if (Selin && Selin->isAlive()) { - if(((boss_selin_fireheartAI*)Selin->AI())->CrystalGUID == m_creature->GetGUID()) + 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; - Selin->RemoveAurasDueToSpell(SPELL_MANA_RAGE); - if(Selin->getVictim()) + ((boss_selin_fireheartAI*)Selin->AI())->EmpowerTimer = 10000; + if (Selin->getVictim()) { Selin->AI()->AttackStart(Selin->getVictim()); Selin->GetMotionMaster()->MoveChase(Selin->getVictim()); @@ -381,12 +372,12 @@ void AddSC_boss_selin_fireheart() Script *newscript; newscript = new Script; - newscript->Name="boss_selin_fireheart"; + newscript->Name = "boss_selin_fireheart"; newscript->GetAI = &GetAI_boss_selin_fireheart; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="mob_fel_crystal"; + newscript->Name = "mob_fel_crystal"; newscript->GetAI = &GetAI_mob_fel_crystal; newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp index 3743423f0e0..5fb43c88306 100644 --- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,12 +6,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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 @@ -29,31 +29,36 @@ EndScriptData */ #define SAY_OVERLOAD -1585009 #define SAY_KILL -1585010 #define EMOTE_DISCHARGE_ENERGY -1585011 + //is this text for real? -#define SAY_DEATH "What...happen...ed." +//#define SAY_DEATH "What...happen...ed." //Pure energy spell info -#define SPELL_ENERGY_BOLT 44342 +#define SPELL_ENERGY_BOLT 46156 #define SPELL_ENERGY_FEEDBACK 44335 //Vexallus spell info #define SPELL_CHAIN_LIGHTNING 44318 -#define SPELL_SUMMON_PURE_ENERGY 44322 //not-working, this script summon this creatures without this spell #define SPELL_OVERLOAD 44353 #define SPELL_ARCANE_SHOCK 44319 -#define ASTRAL_FLARE_VISUAL 30237 + +#define SPELL_SUMMON_PURE_ENERGY 44322 //mod scale -10 +#define H_SPELL_SUMMON_PURE_ENERGY1 46154 //mod scale -5 +#define H_SPELL_SUMMON_PURE_ENERGY2 46159 //mod scale -5 //Creatures #define CREATURE_PURE_ENERGY 24745 -struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI +struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI { boss_vexallusAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); Heroic = c->GetMap()->IsHeroic(); + Heroic = c->GetMap()->IsHeroic(); } ScriptedInstance* pInstance; + bool Heroic; uint32 ChainLightningTimer; uint32 ArcaneShockTimer; @@ -61,7 +66,6 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI uint32 SpawnAddInterval; uint32 AlreadySpawnedAmount; bool Enraged; - bool Heroic; void Reset() { @@ -70,15 +74,10 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI OverloadTimer = 2200; SpawnAddInterval = 15; AlreadySpawnedAmount = 0; - Enraged = false; - if(pInstance) - { - if (m_creature->isDead()) - pInstance->SetData(DATA_VEXALLUS_EVENT, DONE); - else pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); - } + if (pInstance) + pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); } void KilledUnit(Unit *victim) @@ -88,14 +87,11 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI void JustDied(Unit *victim) { - DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL); if (pInstance) { pInstance->SetData(DATA_VEXALLUS_EVENT, DONE); - GameObject* Door = NULL; - Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR)); - if(Door) + if (GameObject* Door = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_VEXALLUS_DOOR))) Door->SetGoState(0); } } @@ -103,68 +99,82 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI void Aggro(Unit *who) { DoScriptText(SAY_AGGRO, m_creature); + if (pInstance) 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->CastSpell(summoned,SPELL_ENERGY_BOLT,false,0,0,m_creature->GetGUID()); + } + void UpdateAI(const uint32 diff) { if (!UpdateVictim() ) return; - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 11) + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10) { Enraged = true; } - if(!Enraged) + if (!Enraged) { //used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25% if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(SpawnAddInterval*(AlreadySpawnedAmount+1)))) { DoScriptText(SAY_ENERGY, m_creature); DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature); - Creature* PureEnergyCreature = NULL; - PureEnergyCreature = DoSpawnCreature(CREATURE_PURE_ENERGY, 10, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if (PureEnergyCreature && target) - PureEnergyCreature->AI()->AttackStart(target); - - if(Heroic) // *Heroic mode only - he summons two instead of one. + + if (Heroic) { - PureEnergyCreature = DoSpawnCreature(CREATURE_PURE_ENERGY, -10, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if (PureEnergyCreature && target) - PureEnergyCreature->AI()->AttackStart(target); + 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 + DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (Heroic) + DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); ++AlreadySpawnedAmount; - }; + } - if(ChainLightningTimer < diff) + if (ChainLightningTimer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_CHAIN_LIGHTNING); + DoCast(target, SPELL_CHAIN_LIGHTNING); + ChainLightningTimer = 10000; }else ChainLightningTimer -= diff; - if(ArcaneShockTimer < diff) + if (ArcaneShockTimer < diff) { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM, 0); - DoCast(target, SPELL_ARCANE_SHOCK); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_ARCANE_SHOCK); + ArcaneShockTimer = 8000; }else ArcaneShockTimer -= diff; - }else + } + else { - if(OverloadTimer < diff) + if (OverloadTimer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_OVERLOAD); + DoCast(target, SPELL_OVERLOAD); + OverloadTimer = 2200; }else OverloadTimer -= diff; } + DoMeleeAttackIfReady(); } }; @@ -174,44 +184,24 @@ CreatureAI* GetAI_boss_vexallus(Creature *_Creature) return new boss_vexallusAI (_Creature); }; -struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI +struct TRINITY_DLL_DECL mob_pure_energyAI : public ScriptedAI { mob_pure_energyAI(Creature *c) : ScriptedAI(c) {} - uint32 EnergyBoltTimer; - uint32 VisualTimer; - - void Reset() - { - EnergyBoltTimer = 1700; - VisualTimer = 1000; - m_creature->SetSpeed(MOVE_RUN, 0.5f); - m_creature->SetSpeed(MOVE_WALK, 0.5f); - } + void Reset() { } void JustDied(Unit* slayer) { - slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, m_creature->GetGUID()); - } - - void Aggro(Unit *who){} - - void UpdateAI(const uint32 diff) - { - if(!UpdateVictim()) - return; - - if(EnergyBoltTimer < diff) + if (Unit *temp = m_creature->GetOwner()) { - DoCast(m_creature->getVictim(), SPELL_ENERGY_BOLT); - EnergyBoltTimer = 1700; - }else EnergyBoltTimer -= diff; - if(VisualTimer < diff) - { - DoCast(m_creature->getVictim(), ASTRAL_FLARE_VISUAL, true); - VisualTimer = 1000; - }else VisualTimer -= diff; + if (temp && temp->isAlive()) + slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID()); + } } + + void Aggro(Unit *who) { } + void MoveInLineOfSight(Unit *who) { } + void AttackStart(Unit *who) { } }; CreatureAI* GetAI_mob_pure_energy(Creature *_Creature) @@ -224,13 +214,12 @@ void AddSC_boss_vexallus() Script *newscript; newscript = new Script; - newscript->Name="boss_vexallus"; + newscript->Name = "boss_vexallus"; newscript->GetAI = &GetAI_boss_vexallus; newscript->RegisterSelf(); newscript = new Script; - newscript->Name="mob_pure_energy"; + newscript->Name = "mob_pure_energy"; newscript->GetAI = &GetAI_mob_pure_energy; newscript->RegisterSelf(); } - diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/def_magisters_terrace.h b/src/bindings/scripts/scripts/zone/magisters_terrace/def_magisters_terrace.h index f509a8bc73c..d6419ea409c 100644 --- a/src/bindings/scripts/scripts/zone/magisters_terrace/def_magisters_terrace.h +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/def_magisters_terrace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -20,13 +20,12 @@ #define DATA_DELRISSA_DOOR 11 #define DATA_SELIN_ENCOUNTER_DOOR 12 -#define DATA_KAEL_STATUE_LEFT 13 -#define DATA_KAEL_STATUE_RIGHT 14 +#define DATA_KAEL_DOOR 13 +#define DATA_KAEL_STATUE_LEFT 14 +#define DATA_KAEL_STATUE_RIGHT 15 -#define DATA_DELRISSA_DEATH_COUNT 15 +#define DATA_DELRISSA_DEATH_COUNT 16 -#define DATA_KAEL 16 - -#define ERROR_INST_DATA "SD2 Error: Instance Data not set properly for Magister's Terrace instance (map 585). Encounters will be buggy." +#define ERROR_INST_DATA "TSCR Error: Instance Data not set properly for Magister's Terrace instance (map 585). Encounters will be buggy." #endif diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp index 5afb79e84d0..7e16b37c353 100644 --- a/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp +++ b/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -6,12 +6,12 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public 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 @@ -37,29 +37,25 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance { instance_magisters_terrace(Map* map) : ScriptedInstance(map) {Initialize();} - uint32 DoorState[3];//0seline, 1vexallus, 2derlissa uint32 Encounters[NUMBER_OF_ENCOUNTERS]; uint32 DelrissaDeathCount; std::list<uint64> FelCrystals; std::list<uint64>::iterator CrystalItr; - uint64 KaelGUID; uint64 SelinGUID; uint64 DelrissaGUID; uint64 VexallusDoorGUID; uint64 SelinDoorGUID; uint64 SelinEncounterDoorGUID; uint64 DelrissaDoorGUID; + uint64 KaelDoorGUID; uint64 KaelStatue[2]; bool InitializedItr; void Initialize() { - for(uint8 i = 0; i < 3; i++) - DoorState[i] = 1;//1 closed, 0 opened - for(uint8 i = 0; i < NUMBER_OF_ENCOUNTERS; i++) Encounters[i] = NOT_STARTED; @@ -67,13 +63,13 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance DelrissaDeathCount = 0; - KaelGUID = 0; SelinGUID = 0; DelrissaGUID = 0; VexallusDoorGUID = 0; SelinDoorGUID = 0; SelinEncounterDoorGUID = 0; DelrissaDoorGUID = 0; + KaelDoorGUID = 0; KaelStatue[0] = 0; KaelStatue[1] = 0; @@ -106,30 +102,9 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance { switch(identifier) { - case DATA_SELIN_EVENT: - Encounters[0] = data; - if(data==DONE) - { - DoorState[0] = 0; - SaveToDB(); - } - break; - case DATA_VEXALLUS_EVENT: - Encounters[1] = data; - if(data==DONE) - { - DoorState[1] = 0; - SaveToDB(); - } - break; - case DATA_DELRISSA_EVENT: - Encounters[2] = data; - if(data==DONE) - { - DoorState[2] = 0; - SaveToDB(); - } - break; + case DATA_SELIN_EVENT: Encounters[0] = data; break; + case DATA_VEXALLUS_EVENT: Encounters[1] = data; break; + case DATA_DELRISSA_EVENT: Encounters[2] = data; break; case DATA_KAELTHAS_EVENT: Encounters[3] = data; break; case DATA_DELRISSA_DEATH_COUNT: @@ -138,38 +113,13 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance } } - const char* Save() - { - std::ostringstream ss; - ss << "S " << DoorState[0] << " " << DoorState[1] << " " << DoorState[2]; - char* data = new char[ss.str().length()+1]; - strcpy(data, ss.str().c_str()); - return data; - } - - void Load(const char* load) - { - if(!load) return; - std::istringstream ss(load); - char dataHead; // S - uint32 data1, data2, data3; - ss >> dataHead >> data1 >> data2 >> data3; - if(dataHead == 'S') - { - DoorState[0] = data1; - DoorState[1] = data2; - DoorState[2] = data3; - }else error_log("SD2: Magister's Terrace: corrupted save data."); - } - void OnCreatureCreate(Creature *creature, uint32 entry) { - switch(entry) + switch(creature->GetEntry()) { case 24723: SelinGUID = creature->GetGUID(); break; case 24560: DelrissaGUID = creature->GetGUID(); break; case 24722: FelCrystals.push_back(creature->GetGUID()); break; - case 24664: KaelGUID = creature->GetGUID(); break; } } @@ -177,21 +127,13 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance { switch(go->GetEntry()) { - case 187896: - VexallusDoorGUID = go->GetGUID(); - go->SetGoState(DoorState[1]); - break; + case 187896: VexallusDoorGUID = go->GetGUID(); break; //SunwellRaid Gate 02 - case 187979: - SelinDoorGUID = go->GetGUID(); - go->SetGoState(DoorState[0]); - break; + case 187979: SelinDoorGUID = go->GetGUID(); break; //Assembly Chamber Door case 188065: SelinEncounterDoorGUID = go->GetGUID(); break; - case 187770: - DelrissaDoorGUID = go->GetGUID(); - go->SetGoState(DoorState[2]); - break; + case 187770: DelrissaDoorGUID = go->GetGUID(); break; + case 188064: KaelDoorGUID = go->GetGUID(); break; case 188165: KaelStatue[0] = go->GetGUID(); break; case 188166: KaelStatue[1] = go->GetGUID(); break; } @@ -202,12 +144,12 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance switch(identifier) { case DATA_SELIN: return SelinGUID; - case DATA_KAEL: return KaelGUID; case DATA_DELRISSA: return DelrissaGUID; case DATA_VEXALLUS_DOOR: return VexallusDoorGUID; case DATA_SELIN_DOOR: return SelinDoorGUID; case DATA_SELIN_ENCOUNTER_DOOR: return SelinEncounterDoorGUID; case DATA_DELRISSA_DOOR: return DelrissaDoorGUID; + case DATA_KAEL_DOOR: return KaelDoorGUID; case DATA_KAEL_STATUE_LEFT: return KaelStatue[0]; case DATA_KAEL_STATUE_RIGHT: return KaelStatue[1]; diff --git a/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp b/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp index 16a6a301681..bb7c183ff02 100644 --- a/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp +++ b/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp b/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp index ca2253c96b1..960307421d0 100644 --- a/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp +++ b/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp b/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp index e59da4ff650..d748220d3cf 100644 --- a/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp +++ b/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp b/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp index 64b7c2c67f5..4741577a60b 100644 --- a/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp +++ b/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp index 5b34758714c..953ed97cfc6 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp index 7f4758b8c79..72d2e871f16 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp index fbe09203551..55ed3c6fb38 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp index 8684f10c509..b98c4bec979 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp index 7b948fbf747..b1d12d5a351 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp index 72c3a759dfa..034344845c6 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp index c28867accbd..ccfed05578b 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp index 7d9a64666cf..fddbbdeb992 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -225,6 +225,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI { target = SelectUnit(SELECT_TARGET_RANDOM,0); Summoned = m_creature->SummonCreature(12143,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000); + if (Summoned) ((CreatureAI*)Summoned->AI())->AttackStart(target); } @@ -242,6 +243,7 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI { target = SelectUnit(SELECT_TARGET_RANDOM,0); Summoned = m_creature->SummonCreature(12143,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000); + if (Summoned) ((CreatureAI*)Summoned->AI())->AttackStart(target); } diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp index d11a49e0cf9..1f515f1e32f 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp b/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp index 244bc6ece50..3efc6d08bbf 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/def_molten_core.h b/src/bindings/scripts/scripts/zone/molten_core/def_molten_core.h index e728c863767..5874d8b9408 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/def_molten_core.h +++ b/src/bindings/scripts/scripts/zone/molten_core/def_molten_core.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp b/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp index 5c783edfe10..bfaa583e033 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp b/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp index 8d9977957d6..d25ddc7631c 100644 --- a/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp +++ b/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp b/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp index 027ef125ca7..dfafa193542 100644 --- a/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp +++ b/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp b/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp index 74d800a5484..85d5d8a1d53 100644 --- a/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp +++ b/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp b/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp index 0266fa8ef43..8b43005b5df 100644 --- a/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp +++ b/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -124,7 +124,7 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI m_creature->DeleteThreatList(); m_creature->CombatStop(); m_creature->setFaction(1080); //friendly - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_SIT); + m_creature->SetStandState(UNIT_STAND_STATE_SIT); DoScriptText(LUMP_DEFEAT, m_creature); bReset = true; @@ -134,11 +134,11 @@ struct TRINITY_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)) + m_creature->RemoveAura(SPELL_VISUAL_SLEEP); if (!m_creature->IsStandState()) - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); switch(rand()%2) { @@ -226,7 +226,7 @@ struct TRINITY_DLL_DECL mob_sunspring_villagerAI : public ScriptedAI void Reset() { m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 32); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,7); // lay down + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); } void Aggro(Unit *who) {} diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp index 86d4002718f..815b273d185 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Anubrekhan -SD%Complete: 70 +SD%Complete: 100 SDComment: SDCategory: Naxxramas EndScriptData */ @@ -38,7 +38,7 @@ EndScriptData */ #define SPELL_LOCUSTSWARM 28785 //This is a self buff that triggers the dmg debuff #define H_SPELL_LOCUSTSWARM 54021 -//invalid +//spellId invalid #define SPELL_SUMMONGUARD 29508 //Summons 1 crypt guard at targeted location #define SPELL_SELF_SPAWN_5 29105 //This spawns 5 corpse scarabs ontop of us (most likely the player casts this on death) @@ -109,7 +109,7 @@ struct TRINITY_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(SPELL_LOCUSTSWARM)) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_IMPALE); diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp index c04cab35e58..5fafebadb96 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Faerlina SD%Complete: 50 -SDComment: Without Mindcontrol boss cannot be defeated +SDComment: SDCategory: Naxxramas EndScriptData */ @@ -32,6 +32,8 @@ EndScriptData */ #define SAY_SLAY2 -1533015 #define SAY_DEATH -1533016 +//#define SOUND_RANDOM_AGGRO 8955 //soundId containing the 4 aggro sounds, we not using this + #define SPELL_POSIONBOLT_VOLLEY 28796 #define H_SPELL_POSIONBOLT_VOLLEY 54098 #define SPELL_ENRAGE 28798 diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_four_horsemen.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_four_horsemen.cpp index 0ae5080d227..a51573d745d 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_four_horsemen.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_four_horsemen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp index 80cbc347fe1..5fb9f017b0a 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp index ed2ef9de4e6..0becff399da 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_gothik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -41,8 +41,10 @@ EndScriptData */ #define SPELL_SHADOW_MARK 27825 //Unrelenting Rider -#define SPELL_UNHOLY_AURA 28340 -#define SPELL_SHADOWBOLT 19729 //Search thru targets and find those who have the SHADOW_MARK to cast this on +#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 //Spectral Trainee #define SPELL_ARCANE_EXPLOSION 27989 diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_grobbulus.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_grobbulus.cpp index 88ce581e6dd..e0bf157dc43 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_grobbulus.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_grobbulus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp index 78921efff3d..d5f1e594d0c 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_heigan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -21,20 +21,19 @@ SDComment: Place Holder SDCategory: Naxxramas EndScriptData */ -//Lotheb or Heigan? -//8825 aggro1 - You are mine now! -//8826 aggro2 - I see you! -//8827 aggro3 - You...are next! -//8828 death - -//8829 slay - close your eyes... sleep -//8830 taunt1 - The races of the world will perish. It is only a matter of time. -//8831 taunt2 - I see endless suffering, I see torment, I see rage. I see... everything! -//8832 taunt3 - Soon... the world will tremble! -//8833 taunt4 - The end is upon you. -//8834 taunt5 - Hungry worms will feast on your rotten flesh! - #include "precompiled.h" +#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 diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp index 170ced981f7..952fb5504ce 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -257,7 +257,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI Walk_Pos_Z = ADDZ_RIGHT_NEAR; break; } - pUnit->SendMonsterMoveWithSpeed(Walk_Pos_X, Walk_Pos_Y, Walk_Pos_Z,MOVEMENTFLAG_WALK_MODE); + pUnit->SendMonsterMoveWithSpeed(Walk_Pos_X, Walk_Pos_Y, Walk_Pos_Z); } } @@ -407,7 +407,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI { //if we find no one to figth walk to the center if(!pUnit->isInCombat()) - pUnit->SendMonsterMoveWithSpeed(Walk_Pos_X,Walk_Pos_Y,Walk_Pos_Z,MOVEMENTFLAG_WALK_MODE); + pUnit->SendMonsterMoveWithSpeed(Walk_Pos_X,Walk_Pos_Y,Walk_Pos_Z); //Safe storing of creatures GuardiansOfIcecrown[GuardiansOfIcecrown_Count] = pUnit->GetGUID(); diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp index d5e382d80e6..aceaba93b1f 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,28 +23,6 @@ EndScriptData */ #include "precompiled.h" -#define SAY_AGGRO1 "You are mine now!" -#define SAY_AGGRO2 "I see you!" -#define SAY_AGGRO3 "You...are next!" -#define SAY_SLAY1 "Close your eyes... sleep!" -#define SAY_SLAY2 "The races of the world will perish. It is only a matter of time." -#define SAY_SLAY3 "I see endless suffering, I see torment, I see rage. I see... everything!" -#define SAY_SLAY4 "Soon... the world will tremble!" -#define SAY_SLAY5 "The end is upon you." -#define SAY_SLAY6 "Hungry worms will feast on your rotten flesh!" -#define SAY_DEATH "" - -#define SOUND_AGGRO1 8825 -#define SOUND_AGGRO2 8826 -#define SOUND_AGGRO3 8827 -#define SOUND_SLAY1 8829 -#define SOUND_SLAY2 8830 -#define SOUND_SLAY3 8831 -#define SOUND_SLAY4 8832 -#define SOUND_SLAY5 8833 -#define SOUND_SLAY6 8834 -#define SOUND_DEATH 8828 - #define SPELL_CORRUPTED_MIND 29198 #define SPELL_POISON_AURA 29865 #define SPELL_INEVITABLE_DOOM 29204 @@ -85,58 +63,10 @@ struct TRINITY_DLL_DECL boss_loathebAI : public ScriptedAI void Aggro(Unit *who) { - switch (rand()%3) - { - case 0: - DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO1); - break; - case 1: - DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO2); - break; - case 2: - DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO3); - break; - } - } - - void KilledUnit(Unit* victim) - { - switch (rand()%6) - { - case 0: - DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY1); - break; - case 1: - DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY2); - break; - case 2: - DoYell(SAY_SLAY3,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY3); - break; - case 3: - DoYell(SAY_SLAY4,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY4); - break; - case 4: - DoYell(SAY_SLAY5,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY5); - break; - case 5: - DoYell(SAY_SLAY6,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SLAY6); - break; - } } void JustDied(Unit* Killer) { - DoYell(SAY_DEATH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_DEATH); } void UpdateAI(const uint32 diff) diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp index 235029f1cb7..6c41ad1b022 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Maexxna -SD%Complete: 80 -SDComment: +SD%Complete: 60 +SDComment: this needs review, and rewrite of the webwrap ability SDCategory: Naxxramas EndScriptData */ diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp index 59f9d33e245..43be957aa81 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp index 99d30a7ed06..5359b47bad4 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Patchwerk -SD%Complete: 100 -SDComment: Some issues with hateful strike inturrupting the melee swing timer. Probably core issue. +SD%Complete: 80 +SDComment: Some issues with hateful strike inturrupting the melee swing timer. SDCategory: Naxxramas EndScriptData */ diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp index 9a8277264e5..9054e89dc26 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp index 43396199f5f..c0c2f457f0c 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp b/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp index a8bc620ec17..259c1589791 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/boss_thaddius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Thaddius SD%Complete: 0 -SDComment: Merge Feugen & Stalagg with this script +SDComment: Placeholder. Includes Feugen & Stalagg. SDCategory: Naxxramas EndScriptData */ diff --git a/src/bindings/scripts/scripts/zone/naxxramas/instance_naxxramas.cpp b/src/bindings/scripts/scripts/zone/naxxramas/instance_naxxramas.cpp index e589630c15f..2ed8399f57a 100644 --- a/src/bindings/scripts/scripts/zone/naxxramas/instance_naxxramas.cpp +++ b/src/bindings/scripts/scripts/zone/naxxramas/instance_naxxramas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp index cf178f9ea2d..e8f6cae5e40 100644 --- a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp +++ b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -404,7 +404,7 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI cell.SetNoCreate(); Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*m_creature, entry, true, range); - Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(pCreature, creature_check); + Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_creature, pCreature, creature_check); TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher); @@ -441,8 +441,8 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI ardonis->SendUpdateToPlayer(player); //Set them to kneel - m_creature->SetStandState(PLAYER_STATE_KNEEL); - ardonis->SetStandState(PLAYER_STATE_KNEEL); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + ardonis->SetStandState(UNIT_STAND_STATE_KNEEL); } //Set them back to each other @@ -466,8 +466,8 @@ struct TRINITY_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI ardonis->SendUpdateToPlayer(player); //Set state - m_creature->SetStandState(PLAYER_STATE_NONE); - ardonis->SetStandState(PLAYER_STATE_NONE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + ardonis->SetStandState(UNIT_STAND_STATE_STAND); } } @@ -639,7 +639,7 @@ Creature* SearchDawnforge(Player *source, uint32 entry, float range) cell.SetNoCreate(); Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*source, entry, true, range); - Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(pCreature, creature_check); + Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(source, pCreature, creature_check); TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer> creature_searcher(searcher); @@ -652,7 +652,7 @@ Creature* SearchDawnforge(Player *source, uint32 entry, float range) bool AreaTrigger_at_commander_dawnforge(Player *player, AreaTriggerEntry *at) { //if player lost aura or not have at all, we should not try start event. - if (!player->HasAura(SPELL_SUNFURY_DISGUISE,0)) + if (!player->HasAura(SPELL_SUNFURY_DISGUISE)) return false; if (player->isAlive() && player->GetQuestStatus(QUEST_INFO_GATHERING) == QUEST_STATUS_INCOMPLETE) @@ -858,7 +858,7 @@ struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI DoScriptText(EMOTE_WEAK, m_creature); Weak = true; } - if(Weak && !Drained && m_creature->HasAura(34219, 0)) + if(Weak && !Drained && m_creature->HasAura(34219)) { Drained = true; diff --git a/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp b/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp index eef29518ecd..9e2370af086 100644 --- a/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp +++ b/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -125,7 +125,6 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 60) && (Phase == 1)) { Phase = 2; - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); m_creature->SetHover(true); m_creature->GetMotionMaster()->Clear(false); @@ -137,7 +136,6 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI { Phase = 3; m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); m_creature->SetHover(false); m_creature->GetMotionMaster()->MovePoint(0, -10.6155, -219.357, -87.7344); DoStartMovement(m_creature->getVictim()); diff --git a/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp b/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp index a53794c2b7a..fdb6fff31bb 100644 --- a/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp +++ b/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp index d8e1a297872..9c089fddf71 100644 --- a/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ b/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,15 +23,16 @@ EndScriptData */ #include "precompiled.h" -#define SAY_0 "You'll never leave this place... alive." -#define SAY_1 "Come, spirits, attend your master." -#define SAY_SLAY "Too...easy!" -#define SOUND_AGGRO 5825 -#define SOUND_SLAY 5826 -#define SOUND_SUMMON 5829 +#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 10179 +#define SPELL_AMNENNARSWRATH 13009 +#define SPELL_FROSTBOLT 15530 +#define SPELL_FROST_NOVA 15531 +#define SPELL_FROST_SPECTRES 12642 struct TRINITY_DLL_DECL boss_amnennar_the_coldbringerAI : public ScriptedAI { @@ -39,50 +40,29 @@ struct TRINITY_DLL_DECL boss_amnennar_the_coldbringerAI : public ScriptedAI uint32 AmnenarsWrath_Timer; uint32 FrostBolt_Timer; - bool Spectrals; - int Rand; - int RandX; - int RandY; - Creature* Summoned; + uint32 FrostNova_Timer; + bool Spectrals60; + bool Spectrals30; + bool Hp; void Reset() { AmnenarsWrath_Timer = 8000; FrostBolt_Timer = 1000; - Spectrals = false; + FrostNova_Timer = 10000 + rand()%5000; + Spectrals30 = false; + Spectrals60 = false; + Hp = false; } void Aggro(Unit *who) { - DoYell(SAY_0,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); + DoScriptText(SAY_AGGRO, m_creature); } void KilledUnit() { - DoYell(SAY_SLAY, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SLAY); - } - - void SummonSpectrals(Unit* victim) - { - Rand = rand()%5; - switch (rand()%2) - { - case 0: RandX = 0 - Rand; break; - case 1: RandX = 0 + Rand; break; - } - Rand = 0; - Rand = rand()%5; - switch (rand()%2) - { - case 0: RandY = 0 - Rand; break; - case 1: RandY = 0 + Rand; break; - } - Rand = 0; - Summoned = DoSpawnCreature(8585, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - if(Summoned) - ((CreatureAI*)Summoned->AI())->AttackStart(victim); + DoScriptText(SAY_KILL, m_creature); } void UpdateAI(const uint32 diff) @@ -100,25 +80,34 @@ struct TRINITY_DLL_DECL boss_amnennar_the_coldbringerAI : public ScriptedAI //FrostBolt_Timer if (FrostBolt_Timer < diff) { - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target) DoCast(target,SPELL_FROSTBOLT); - + DoCast(m_creature->getVictim(),SPELL_FROSTBOLT); FrostBolt_Timer = 8000; } else FrostBolt_Timer -= diff; - if ( !Spectrals && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50 ) + if (FrostNova_Timer < diff) { - DoYell(SAY_1, LANG_UNIVERSAL, NULL); - DoPlaySoundToSet(m_creature, SOUND_SUMMON); + DoCast(m_creature,SPELL_FROST_NOVA); + FrostNova_Timer = 15000; + } else FrostNova_Timer -= diff; - Unit* target = NULL; - target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (!Spectrals60 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 60) + { + DoScriptText(SAY_SUMMON60, m_creature); + DoCast(m_creature->getVictim(),SPELL_FROST_SPECTRES); + Spectrals60 = true; + } - SummonSpectrals(target); - SummonSpectrals(target); - SummonSpectrals(target); - Spectrals = 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(); diff --git a/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp b/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp index 1af5aae1e27..2edb4afcf16 100644 --- a/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp +++ b/src/bindings/scripts/scripts/zone/razorfen_kraul/razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp index 128ab315334..be15a35f032 100644 --- a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp index 4297c32492f..58c48540362 100644 --- a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp +++ b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 9c888e98605..f164009c79b 100644 --- a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp index 5830b3a8070..df0e63f8599 100644 --- a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp +++ b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ossirian.cpp b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ossirian.cpp index 1d389830045..5652b706917 100644 --- a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_rajaxx.cpp b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_rajaxx.cpp index 0639a02deb6..fb2c92ff59f 100644 --- a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 27a0621b2be..b94e6f16a80 100644 --- a/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp index 222f927e5a0..533adf732f3 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,55 +23,40 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_POLYMORPH 12826 -#define SPELL_AOESILENCE 8988 -#define SPELL_ARCANEEXPLOSION3 8438 -#define SPELL_ARCANEEXPLOSION4 8439 -#define SPELL_FIREAOE 9435 -#define SPELL_BLINK 1953 -#define SPELL_FIREBALL 21162 -#define SPELL_MANASHIELD4 10191 -#define SPELL_ARCANEBUBBLE 9438 - -#define SAY_AGGRO "You will not defile these mysteries!" -#define SAY_SPECIALAE "Burn in righteous fire!" - -#define SOUND_AGGRO 5842 -#define SOUND_SPECIALAE 5843 +enum +{ + SAY_AGGRO = -1189019, + SAY_SPECIALAE = -1189020, + + SPELL_POLYMORPH = 13323, + SPELL_AOESILENCE = 8988, + SPELL_ARCANEEXPLOSION = 9433, + SPELL_FIREAOE = 9435, + SPELL_ARCANEBUBBLE = 9438, +}; struct TRINITY_DLL_DECL boss_arcanist_doanAI : public ScriptedAI { boss_arcanist_doanAI(Creature *c) : ScriptedAI(c) {} - uint32 FullAOE_Timer; uint32 Polymorph_Timer; - uint32 Yell_Timer; - uint32 ArcaneBubble_Timer; uint32 AoESilence_Timer; - uint32 ArcaneExplosion3_Timer; - uint32 ArcaneExplosion4_Timer; - uint32 Blink_Timer; - uint32 Fireball_Timer; - uint32 ManaShield4_Timer; + uint32 ArcaneExplosion_Timer; + bool bCanDetonate; + bool bShielded; void Reset() { - FullAOE_Timer = 5000; - Polymorph_Timer = 1; - Yell_Timer = 2000; - ArcaneBubble_Timer = 3000; - AoESilence_Timer = 20000; - ArcaneExplosion3_Timer = 10000; - ArcaneExplosion4_Timer = 10000; - Blink_Timer = 40000; - Fireball_Timer = 6000; - ManaShield4_Timer = 70000; + Polymorph_Timer = 20000; + AoESilence_Timer = 15000; + ArcaneExplosion_Timer = 3000; + bCanDetonate = false; + bShielded = false; } void Aggro(Unit *who) { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); + DoScriptText(SAY_AGGRO, m_creature); } void UpdateAI(const uint32 diff) @@ -79,79 +64,50 @@ struct TRINITY_DLL_DECL boss_arcanist_doanAI : public ScriptedAI if (!UpdateVictim()) return; - //If we are <50% hp cast Arcane Bubble and start casting SPECIAL FIRE AOE - if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50 && !m_creature->IsNonMeleeSpellCasted(false)) + if (bShielded && bCanDetonate) { - if (Polymorph_Timer < diff) - { - Unit* target = NULL; - - target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target)DoCast(target,SPELL_POLYMORPH); - Polymorph_Timer = 40000; - }else Polymorph_Timer -= diff; - - if (Yell_Timer < diff) - { - DoYell(SAY_SPECIALAE,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_SPECIALAE); - Yell_Timer = 40000; - }else Yell_Timer -= diff; - - if (ArcaneBubble_Timer < diff) - { - DoCast(m_creature,SPELL_ARCANEBUBBLE); - ArcaneBubble_Timer = 40000; - }else ArcaneBubble_Timer -= diff; - - if (FullAOE_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_FIREAOE); - FullAOE_Timer = 40000; - }else FullAOE_Timer -= diff; + DoCast(m_creature,SPELL_FIREAOE); + bCanDetonate = false; } - //AoESilence_Timer - if (AoESilence_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_AOESILENCE); - AoESilence_Timer = 30000; - }else AoESilence_Timer -= diff; + if (m_creature->HasAura(SPELL_ARCANEBUBBLE)) + return; - //ArcaneExplosion3_Timer - if (ArcaneExplosion3_Timer < diff) + //If we are <50% hp cast Arcane Bubble + if (!bShielded && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50) { - DoCast(m_creature->getVictim(),SPELL_ARCANEEXPLOSION3); - ArcaneExplosion3_Timer = 8000; - }else ArcaneExplosion3_Timer -= diff; + //wait if we already casting + if (m_creature->IsNonMeleeSpellCasted(false)) + return; - //ArcaneExplosion4_Timer - if (ArcaneExplosion4_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_ARCANEEXPLOSION4); - ArcaneExplosion4_Timer = 10000; - }else ArcaneExplosion4_Timer -= diff; + DoScriptText(SAY_SPECIALAE, m_creature); + DoCast(m_creature,SPELL_ARCANEBUBBLE); - //Blink_Timer - if (Blink_Timer < diff) + bCanDetonate = true; + bShielded = true; + } + + if (Polymorph_Timer < diff) { - DoCast(m_creature,SPELL_BLINK); - Blink_Timer = 30000; - }else Blink_Timer -= diff; + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_POLYMORPH); + + Polymorph_Timer = 20000; + }else Polymorph_Timer -= diff; - //Fireball_Timer - if (Fireball_Timer < diff) + //AoESilence_Timer + if (AoESilence_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_FIREBALL); - Fireball_Timer = 12000; - }else Fireball_Timer -= diff; + DoCast(m_creature->getVictim(),SPELL_AOESILENCE); + AoESilence_Timer = 15000 + rand()%5000; + }else AoESilence_Timer -= diff; - //ManaShiled4_Timer - if (ManaShield4_Timer < diff) + //ArcaneExplosion_Timer + if (ArcaneExplosion_Timer < diff) { - DoCast(m_creature,SPELL_MANASHIELD4); - ManaShield4_Timer = 70000; - }else ManaShield4_Timer -= diff; + DoCast(m_creature->getVictim(),SPELL_ARCANEEXPLOSION); + ArcaneExplosion_Timer = 8000; + }else ArcaneExplosion_Timer -= diff; DoMeleeAttackIfReady(); } diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp index e22de9b8fb3..5975d5f7e57 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp index f5c094d6127..351a72db2fc 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,45 +23,45 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_FROSTNOVA2 865 -#define SPELL_FLAMESHOCK3 8053 -#define SPELL_SHADOWBOLT5 1106 -#define SPELL_FLAMESPIKE 8814 -#define SPELL_FIRENOVA 16079 - -#define SAY_AGGRO "We hunger for vengeance." -#define SAY_HEALTH "No rest... for the angry dead!" -#define SAY_DEATH "More... More souls!" - -#define SOUND_AGGRO 5844 -#define SOUND_HEALTH 5846 -#define SOUND_DEATH 5845 +enum +{ + SAY_AGGRO = -1189016, + SAY_HEALTH = -1189017, + SAY_KILL = -1189018, + + SPELL_FLAMESHOCK = 8053, + SPELL_SHADOWBOLT = 1106, + SPELL_FLAMESPIKE = 8814, + SPELL_FIRENOVA = 16079, +}; struct TRINITY_DLL_DECL boss_bloodmage_thalnosAI : public ScriptedAI { boss_bloodmage_thalnosAI(Creature *c) : ScriptedAI(c) {} - uint32 FrostNova2_Timer; - uint32 FlameShock3_Timer; - uint32 ShadowBolt5_Timer; + bool HpYell; + uint32 FlameShock_Timer; + uint32 ShadowBolt_Timer; uint32 FlameSpike_Timer; uint32 FireNova_Timer; - uint32 Yell_Timer; void Reset() { - Yell_Timer = 1; - FrostNova2_Timer = 10000; - FlameShock3_Timer = 15000; - ShadowBolt5_Timer = 20000; - FlameSpike_Timer = 20000; - FireNova_Timer = 10000; + HpYell = false; + FlameShock_Timer = 10000; + ShadowBolt_Timer = 2000; + FlameSpike_Timer = 8000; + FireNova_Timer = 40000; } void Aggro(Unit *who) { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_KILL, m_creature); } void UpdateAI(const uint32 diff) @@ -70,38 +70,18 @@ struct TRINITY_DLL_DECL boss_bloodmage_thalnosAI : public ScriptedAI return; //If we are <35% hp - if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 35) + if (!HpYell && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 35)) { - Yell_Timer -= diff; - - if (Yell_Timer < diff) - { - DoYell(SAY_HEALTH,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_HEALTH); - Yell_Timer = 900000; - } + DoScriptText(SAY_HEALTH, m_creature); + HpYell = true; } - //FrostNova2_Timer - if (FrostNova2_Timer < diff) + //FlameShock_Timer + if (FlameShock_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_FROSTNOVA2); - FrostNova2_Timer = 10000; - }else FrostNova2_Timer -= diff; - - //FlameShock3_Timer - if (FlameShock3_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_FLAMESHOCK3); - FlameShock3_Timer = 15000; - }else FlameShock3_Timer -= diff; - - //ShadowBolt5_Timer - if (ShadowBolt5_Timer < diff) - { - DoCast(m_creature->getVictim(),SPELL_SHADOWBOLT5); - ShadowBolt5_Timer = 20000; - }else ShadowBolt5_Timer -= diff; + DoCast(m_creature->getVictim(),SPELL_FLAMESHOCK); + FlameShock_Timer = 10000 + rand()%5000; + }else FlameShock_Timer -= diff; //FlameSpike_Timer if (FlameSpike_Timer < diff) @@ -114,9 +94,16 @@ struct TRINITY_DLL_DECL boss_bloodmage_thalnosAI : public ScriptedAI if (FireNova_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_FIRENOVA); - FireNova_Timer = 20000; + 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(); } }; diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp index 9a80392e8d6..6b14a4c9e45 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_headless_horseman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -176,7 +176,7 @@ struct TRINITY_DLL_DECL mob_wisp_invisAI : public ScriptedAI if (!who || Creaturetype != 1 || !who->isTargetableForAttack()) return; - if (m_creature->GetDistance2d(who) < 0.1 && !who->HasAura(SPELL_SQUASH_SOUL,0)) + if (m_creature->GetDistance2d(who) < 0.1 && !who->HasAura(SPELL_SQUASH_SOUL)) DoCast(who,SPELL_SQUASH_SOUL); } @@ -505,7 +505,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI void SpellHitTarget(Unit* unit, const SpellEntry* spell) { if (spell->Id == SPELL_CONFLAGRATION) - if (unit->HasAura(SPELL_CONFLAGRATION,0)) + if (unit->HasAura(SPELL_CONFLAGRATION)) SaySound(SAY_CONFLAGRATION,unit); } @@ -572,7 +572,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI DoCast(m_creature,SPELL_BODY_REGEN,true); m_creature->CastSpell(Head, SPELL_FLYING_HEAD,true); DoCast(m_creature,SPELL_CONFUSE,false); //test - done_by->ProcDamageAndSpell(m_creature,PROC_FLAG_KILL_AND_GET_XP,PROC_FLAG_KILLED,PROC_EX_NONE,0); + done_by->ProcDamageAndSpell(m_creature,PROC_FLAG_KILL,PROC_FLAG_KILLED,PROC_EX_NONE,0); whirlwind = 4000 + (rand()%5)*1000; regen = 0; } @@ -734,7 +734,7 @@ struct TRINITY_DLL_DECL mob_pulsing_pumpkinAI : public ScriptedAI sprouted = false; DoCast(m_creature,SPELL_PUMPKIN_AURA,true); DoCast(m_creature,SPELL_SPROUTING); - m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_ROTATE); + m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_STUNNED); } void Aggro(Unit *who){} @@ -745,7 +745,7 @@ struct TRINITY_DLL_DECL mob_pulsing_pumpkinAI : public ScriptedAI { sprouted = true; m_creature->RemoveAllAuras(); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_ROTATE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_STUNNED); DoCast(m_creature,SPELL_SPROUT_BODY,true); m_creature->UpdateEntry(PUMPKIN_FIEND); DoStartMovement(m_creature->getVictim()); diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp index 17f4aee1ae3..bccbcb62c33 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp index b1c8bde0566..a188fe9c3f2 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp index 5dde65cb840..7f812310be3 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,11 +23,10 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_SUMMONSCARLETHOUND 17164 -#define SPELL_ENRAGE 28747 +#define SAY_AGGRO -1189021 -#define SAY_AGGRO "Release the hounds!" -#define SOUND_AGGRO 5841 +#define SPELL_SUMMONSCARLETHOUND 17164 +#define SPELL_ENRAGE 6742 struct TRINITY_DLL_DECL boss_houndmaster_lokseyAI : public ScriptedAI { @@ -37,15 +36,12 @@ struct TRINITY_DLL_DECL boss_houndmaster_lokseyAI : public ScriptedAI void Reset() { - Enrage_Timer = 6000000; + Enrage_Timer = 0; } void Aggro(Unit *who) { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); - - DoCast(m_creature,SPELL_SUMMONSCARLETHOUND); + DoScriptText(SAY_AGGRO, m_creature); } void UpdateAI(const uint32 diff) @@ -53,16 +49,17 @@ struct TRINITY_DLL_DECL boss_houndmaster_lokseyAI : public ScriptedAI if (!UpdateVictim()) return; - //If we are <10% hp cast healing spells at self and Mograine - if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10 && !m_creature->IsNonMeleeSpellCasted(false) && Enrage_Timer < diff) + //If we are <25% hp, bloodlust + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 25 && Enrage_Timer < diff) { DoCast(m_creature,SPELL_ENRAGE); - Enrage_Timer = 900000; + Enrage_Timer = 60000; }else Enrage_Timer -= diff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_houndmaster_loksey(Creature *_Creature) { return new boss_houndmaster_lokseyAI (_Creature); diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp index 1366897eb05..34d5a7fff37 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,36 +22,55 @@ SDCategory: Scarlet Monastery EndScriptData */ #include "precompiled.h" +#include "def_scarlet_monastery.h" -#define SPELL_POWERWORDSHIELD 6065 - -#define SAY_AGGRO "Tell me... tell me everything!" -#define SAY_HEALTH1 "Naughty secrets" -#define SAY_HEALTH2 "I'll rip the secrets from your flesh!" -#define SAY_DEATH "Purged by pain!" +enum +{ + SAY_AGGRO = -1189011, + SAY_HEALTH1 = -1189012, + SAY_HEALTH2 = -1189013, + SAY_KILL = -1189014, + SAY_TRIGGER_VORREL = -1189015, -#define SOUND_AGGRO 5847 -#define SOUND_HEALTH1 5849 -#define SOUND_HEALTH2 5850 -#define SOUND_DEATH 5848 + SPELL_SHADOWWORDPAIN = 2767, +}; struct TRINITY_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI { - boss_interrogator_vishasAI(Creature *c) : ScriptedAI(c) {} + boss_interrogator_vishasAI(Creature *c) : ScriptedAI(c) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + } + + ScriptedInstance* pInstance; - uint32 Yell_Timer; - uint32 PowerWordShield_Timer; + bool Yell30; + bool Yell60; + uint32 ShadowWordPain_Timer; void Reset() { - Yell_Timer = 6000000; - PowerWordShield_Timer = 60000; + ShadowWordPain_Timer = 5000; } void Aggro(Unit *who) { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* Killer) + { + if (!pInstance) + return; + + //Any other actions to do with vorrel? setStandState? + if (Unit *vorrel = Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_VORREL))) + DoScriptText(SAY_TRIGGER_VORREL, vorrel); } void UpdateAI(const uint32 diff) @@ -60,44 +79,29 @@ struct TRINITY_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI return; //If we are low on hp Do sayings - if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 60 && !m_creature->IsNonMeleeSpellCasted(false)) + if (!Yell60 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 60)) { - //Yell_Timer - if (Yell_Timer < diff) - { - DoYell(SAY_HEALTH1,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_HEALTH1); - return; - - //60 seconds until we should cast this agian - Yell_Timer = 60000; - }else Yell_Timer -= diff; + DoScriptText(SAY_HEALTH1, m_creature); + Yell60 = true; } - if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 30 && !m_creature->IsNonMeleeSpellCasted(false)) + if (!Yell30 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 30)) { - //Yell_Timer - if (Yell_Timer < diff) - { - DoYell(SAY_HEALTH2,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_HEALTH2); - return; - - //60 seconds until we should cast this agian - Yell_Timer = 6000000; - }else Yell_Timer -= diff; + DoScriptText(SAY_HEALTH2, m_creature); + Yell30 = true; } - //PowerWordShield_Timer - if (PowerWordShield_Timer < diff) + //ShadowWordPain_Timer + if (ShadowWordPain_Timer < diff) { - DoCast(m_creature,SPELL_POWERWORDSHIELD); - PowerWordShield_Timer = 60000; - }else PowerWordShield_Timer -= diff; + DoCast(m_creature->getVictim(),SPELL_SHADOWWORDPAIN); + ShadowWordPain_Timer = 5000 + rand()%10000;; + }else ShadowWordPain_Timer -= diff; DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_interrogator_vishas(Creature *_Creature) { return new boss_interrogator_vishasAI (_Creature); diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp index 6c2bd8a9be8..bde26d42478 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp index 88cee632568..642c884ebc8 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/def_scarlet_monastery.h b/src/bindings/scripts/scripts/zone/scarlet_monastery/def_scarlet_monastery.h index b8ab822129d..2b6399ae3e4 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/def_scarlet_monastery.h +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/def_scarlet_monastery.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -10,7 +10,9 @@ #define DATA_WHITEMANE 3 #define DATA_DOOR_WHITEMANE 4 -#define DATA_HORSEMAN_EVENT 5 -#define GAMEOBJECT_PUMPKIN_SHRINE 6 +#define DATA_HORSEMAN_EVENT 5 +#define GAMEOBJECT_PUMPKIN_SHRINE 6 + +#define DATA_VORREL 7 #endif diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/instance_scarlet_monastery.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/instance_scarlet_monastery.cpp index 44152e6b4e0..4a2239f3b36 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/instance_scarlet_monastery.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -43,6 +43,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance uint64 MograineGUID; uint64 WhitemaneGUID; + uint64 VorrelGUID; uint64 DoorHighInquisitorGUID; uint32 Encounter[ENCOUNTERS]; @@ -56,6 +57,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance MograineGUID = 0; WhitemaneGUID = 0; + VorrelGUID = 0; DoorHighInquisitorGUID = 0; for(uint8 i = 0; i < ENCOUNTERS; i++) @@ -80,6 +82,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance case ENTRY_PUMPKIN: HorsemanAdds.insert(creature->GetGUID());break; case 3976: MograineGUID = creature->GetGUID(); break; case 3977: WhitemaneGUID = creature->GetGUID(); break; + case 3981: VorrelGUID = creature->GetGUID(); break; } } @@ -92,7 +95,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance { GameObject *Shrine = instance->GetGameObjectInMap(PumpkinShrineGUID); if(Shrine) - Shrine->SetUInt32Value(GAMEOBJECT_STATE,1); + Shrine->SetGoState(1); }break; case DATA_HORSEMAN_EVENT: if (data == DONE) @@ -106,7 +109,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance HorsemanAdds.clear(); GameObject *Shrine = instance->GetGameObjectInMap(PumpkinShrineGUID); if(Shrine) - Shrine->SetUInt32Value(GAMEOBJECT_STATE,1); + Shrine->SetGoState(1); } break; } @@ -121,6 +124,7 @@ struct TRINITY_DLL_DECL instance_scarlet_monastery : public ScriptedInstance //case DATA_HEAD: return HeadGUID; case DATA_MOGRAINE: return MograineGUID; case DATA_WHITEMANE: return WhitemaneGUID; + case DATA_VORREL: return VorrelGUID; case DATA_DOOR_WHITEMANE: return DoorHighInquisitorGUID; } return 0; diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp index a20cd4d8b83..46f216220aa 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss_Darkmaster_Gandling -SD%Complete: 99 +SD%Complete: 75 SDComment: Doors missing in instance script. SDCategory: Scholomance EndScriptData */ #include "precompiled.h" +#include "def_scholomance.h" #define SPELL_ARCANEMISSILES 22272 #define SPELL_SHADOWSHIELD 22417 //Not right ID. But 12040 is wrong either. @@ -49,12 +50,18 @@ EndScriptData */ struct TRINITY_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI { - boss_darkmaster_gandlingAI(Creature *c) : ScriptedAI(c) {} + boss_darkmaster_gandlingAI(Creature *c) : ScriptedAI(c) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + } + + ScriptedInstance* pInstance; uint32 ArcaneMissiles_Timer; uint32 ShadowShield_Timer; uint32 Curse_Timer; uint32 Teleport_Timer; + Creature *Summoned; void Reset() @@ -69,6 +76,12 @@ struct TRINITY_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI { } + void JustDied(Unit *killer) + { + if (pInstance) + pInstance->SetData(TYPE_GANDLING, DONE); + } + void UpdateAI(const uint32 diff) { if (!UpdateVictim()) @@ -113,59 +126,79 @@ struct TRINITY_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI 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; } diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp index 2e0eb4e09e2..8bb3703fa8b 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp index 001c67c26b8..96afbfe1971 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,6 +24,8 @@ EndScriptData */ #include "precompiled.h" #include "def_scholomance.h" +#define EMOTE_GENERIC_FRENZY_KILL -1000001 + #define SPELL_REND 18106 #define SPELL_CLEAVE 15584 #define SPELL_FRENZY 28371 @@ -50,7 +52,7 @@ struct TRINITY_DLL_DECL boss_theolenkrastinovAI : public ScriptedAI { pInstance->SetData(DATA_DOCTORTHEOLENKRASTINOV_DEATH, 0); - if(pInstance->GetData(DATA_CANSPAWNGANDLING)) + if (pInstance->GetData(TYPE_GANDLING) == IN_PROGRESS) m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); } } @@ -84,7 +86,7 @@ struct TRINITY_DLL_DECL boss_theolenkrastinovAI : public ScriptedAI if (Frenzy_Timer < diff) { DoCast(m_creature,SPELL_FRENZY); - DoTextEmote("goes into a killing frenzy!",NULL); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); Frenzy_Timer = 8000; }else Frenzy_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp index 6eb5e1ec249..02f4c9bc5a4 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_illuciabarovAI : public ScriptedAI { pInstance->SetData(DATA_LADYILLUCIABAROV_DEATH, 0); - if(pInstance->GetData(DATA_CANSPAWNGANDLING)) + if (pInstance->GetData(TYPE_GANDLING) == IN_PROGRESS) m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); } } diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp index 4ba2811dc52..2790e36ddaf 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL boss_instructormaliciaAI : public ScriptedAI { pInstance->SetData(DATA_INSTRUCTORMALICIA_DEATH, 0); - if(pInstance->GetData(DATA_CANSPAWNGANDLING)) + if (pInstance->GetData(TYPE_GANDLING) == IN_PROGRESS) m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); } } diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp index c6ff12be817..d2890801b5d 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp index 355fbd90c9b..8fdda4d2f33 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp index 195e5b048b4..ddf3c3b083d 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_lordalexeibarovAI : public ScriptedAI { pInstance->SetData(DATA_LORDALEXEIBAROV_DEATH, 0); - if(pInstance->GetData(DATA_CANSPAWNGANDLING)) + if (pInstance->GetData(TYPE_GANDLING) == IN_PROGRESS) m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); } } diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp index 728ad07e838..040cafc91fc 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_lorekeeperpolkeltAI : public ScriptedAI { pInstance->SetData(DATA_LOREKEEPERPOLKELT_DEATH, 0); - if(pInstance->GetData(DATA_CANSPAWNGANDLING)) + if (pInstance->GetData(TYPE_GANDLING) == IN_PROGRESS) m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); } } diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp index 154da52596a..fbb1e355f1d 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp index 95ebafb092a..aea8b476ad2 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -29,8 +29,6 @@ EndScriptData */ #define SPELL_SUNDERINCLEAVE 25174 #define SPELL_KNOCKAWAY 10101 -#define SAY_AGGRO1 "Mine! Mine! Mine! Gizlock is the ruler of this domain! You shall never reveal my presence!" - struct TRINITY_DLL_DECL boss_theravenianAI : public ScriptedAI { boss_theravenianAI(Creature *c) : ScriptedAI(c) {} @@ -57,14 +55,13 @@ struct TRINITY_DLL_DECL boss_theravenianAI : public ScriptedAI { pInstance->SetData(DATA_THERAVENIAN_DEATH, 0); - if(pInstance->GetData(DATA_CANSPAWNGANDLING)) + if (pInstance->GetData(TYPE_GANDLING) == IN_PROGRESS) m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); } } void Aggro(Unit *who) { - DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL); } void UpdateAI(const uint32 diff) @@ -103,6 +100,7 @@ struct TRINITY_DLL_DECL boss_theravenianAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_theravenian(Creature *_Creature) { return new boss_theravenianAI (_Creature); diff --git a/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp b/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp index 280e0d194d7..2ade6f7fd4d 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,6 +23,8 @@ EndScriptData */ #include "precompiled.h" +#define EMOTE_GENERIC_FRENZY_KILL -1000001 + #define SPELL_FIRESHIELD 19626 #define SPELL_BLASTWAVE 13021 #define SPELL_FRENZY 28371 @@ -71,7 +73,7 @@ struct TRINITY_DLL_DECL boss_vectusAI : public ScriptedAI if (Frenzy_Timer < diff) { DoCast(m_creature,SPELL_FRENZY); - DoTextEmote("goes into a killing frenzy!",NULL); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); Frenzy_Timer = 24000; }else Frenzy_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/scholomance/def_scholomance.h b/src/bindings/scripts/scripts/zone/scholomance/def_scholomance.h index 0216a48fc74..83ce26c9687 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/def_scholomance.h +++ b/src/bindings/scripts/scripts/zone/scholomance/def_scholomance.h @@ -1,16 +1,17 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * 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 -#define DATA_CANSPAWNGANDLING 1 +#define TYPE_GANDLING 1 #define DATA_DOCTORTHEOLENKRASTINOV_DEATH 2 #define DATA_INSTRUCTORMALICIA_DEATH 3 #define DATA_LADYILLUCIABAROV_DEATH 4 #define DATA_LORDALEXEIBAROV_DEATH 5 #define DATA_LOREKEEPERPOLKELT_DEATH 6 #define DATA_THERAVENIAN_DEATH 7 +#define TYPE_KIRTONOS 8 #endif diff --git a/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp b/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp index 74b90dfdf53..d99546fbcea 100644 --- a/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp +++ b/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,36 +24,65 @@ EndScriptData */ #include "precompiled.h" #include "def_scholomance.h" +#define GO_GATE_KIRTONOS 175570 +#define GO_GATE_GANDLING 177374 +#define GO_GATE_MALICIA 177375 +#define GO_GATE_THEOLEN 177377 +#define GO_GATE_POLKELT 177376 +#define GO_GATE_RAVENIAN 177372 +#define GO_GATE_BAROV 177373 +#define GO_GATE_ILLUCIA 177371 + +#define ENCOUNTERS 2 + struct TRINITY_DLL_DECL instance_scholomance : public ScriptedInstance { instance_scholomance(Map *map) : ScriptedInstance(map) {Initialize();}; //Lord Alexei Barov, Doctor Theolen Krastinov, The Ravenian, Lorekeeper Polkelt, Instructor Malicia and the Lady Illucia Barov. bool IsBossDied[6]; + uint32 Encounter[ENCOUNTERS]; - void Initialize() - { - IsBossDied[0] = false; - IsBossDied[1] = false; - IsBossDied[2] = false; - IsBossDied[3] = false; - IsBossDied[4] = false; - IsBossDied[5] = false; - } + uint64 GateKirtonosGUID; + uint64 GateGandlingGUID; + uint64 GateMiliciaGUID; + uint64 GateTheolenGUID; + uint64 GatePolkeltGUID; + uint64 GateRavenianGUID; + uint64 GateBarovGUID; + uint64 GateIlluciaGUID; - bool IsEncounterInProgress() const + void Initialize() { - //not active in scholomance - return false; + GateKirtonosGUID = 0; + GateGandlingGUID = 0; + GateMiliciaGUID = 0; + GateTheolenGUID = 0; + GatePolkeltGUID = 0; + GateRavenianGUID = 0; + GateBarovGUID = 0; + GateIlluciaGUID = 0; + + for(uint8 i = 0; i < 6; i++) + IsBossDied[i] = false; + + for(uint8 i = 0; i < ENCOUNTERS; i++) + Encounter[i] = NOT_STARTED; } - uint32 GetData(uint32 type) + void OnObjectCreate(GameObject *go) { - if(type == DATA_CANSPAWNGANDLING) - if(IsBossDied[0] && IsBossDied[1] && IsBossDied[2] && IsBossDied[3] && IsBossDied[4] && IsBossDied[5]) - return 1; - - return 0; + switch(go->GetEntry()) + { + case GO_GATE_KIRTONOS: GateKirtonosGUID = go->GetGUID(); break; + case GO_GATE_GANDLING: GateGandlingGUID = go->GetGUID(); break; + case GO_GATE_MALICIA: GateMiliciaGUID = go->GetGUID(); break; + case GO_GATE_THEOLEN: GateTheolenGUID = go->GetGUID(); break; + case GO_GATE_POLKELT: GatePolkeltGUID = go->GetGUID(); break; + case GO_GATE_RAVENIAN: GateRavenianGUID = go->GetGUID(); break; + case GO_GATE_BAROV: GateBarovGUID = go->GetGUID(); break; + case GO_GATE_ILLUCIA: GateIlluciaGUID = go->GetGUID(); break; + } } void SetData(uint32 type, uint32 data) @@ -63,28 +92,43 @@ struct TRINITY_DLL_DECL instance_scholomance : public ScriptedInstance case DATA_LORDALEXEIBAROV_DEATH: IsBossDied[0] = true; break; - case DATA_DOCTORTHEOLENKRASTINOV_DEATH: IsBossDied[1] = true; break; - case DATA_THERAVENIAN_DEATH: IsBossDied[2] = true; break; - case DATA_LOREKEEPERPOLKELT_DEATH: IsBossDied[3] = true; break; - case DATA_INSTRUCTORMALICIA_DEATH: IsBossDied[4] = true; break; - case DATA_LADYILLUCIABAROV_DEATH: IsBossDied[5] = true; break; + case TYPE_GANDLING: + Encounter[0] = data; + break; + case TYPE_KIRTONOS: + Encounter[1] = data; + break; } } + + uint32 GetData(uint32 type) + { + if (type == TYPE_GANDLING) + { + if (IsBossDied[0] && IsBossDied[1] && IsBossDied[2] && IsBossDied[3] && IsBossDied[4] && IsBossDied[5]) + { + Encounter[0] = IN_PROGRESS; + return IN_PROGRESS; + } + } + + return 0; + } }; InstanceData* GetInstanceData_instance_scholomance(Map* map) diff --git a/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp b/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp index fff417bcf21..4d55b5d91fd 100644 --- a/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp +++ b/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/shadowfang_keep/def_shadowfang_keep.h b/src/bindings/scripts/scripts/zone/shadowfang_keep/def_shadowfang_keep.h index 1612bfd59f0..8383a5c3950 100644 --- a/src/bindings/scripts/scripts/zone/shadowfang_keep/def_shadowfang_keep.h +++ b/src/bindings/scripts/scripts/zone/shadowfang_keep/def_shadowfang_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp b/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp index 3e7caef435f..0364c132447 100644 --- a/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp b/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp index a4f04f83ffd..717849bc07f 100644 --- a/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp +++ b/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -49,7 +49,6 @@ struct TRINITY_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI { if( pInstance && i == 6) { - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); DoScriptText(SAY_FREE, m_creature); pInstance->SetData(TYPE_FREE_NPC, DONE); } diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp index 014d7fe1153..ea84a299403 100644 --- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp +++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -131,7 +131,7 @@ struct TRINITY_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); DoCast(m_creature,SPELL_EARTHQUAKE); Quake_Timer = 30000 + rand()%25000; diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp index 32c6f345157..516ef7c5b09 100644 --- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp +++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -57,6 +57,7 @@ struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI mob_mature_netherwing_drakeAI(Creature* c) : ScriptedAI(c) { PlayerGUID = 0; + Reset(); } uint64 PlayerGUID; @@ -93,7 +94,7 @@ struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI if(!caster) return; - if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN, 0) && !PlayerGUID) + if(caster->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN) && !PlayerGUID) { float PlayerX, PlayerY, PlayerZ; caster->GetClosePoint(PlayerX, PlayerY, PlayerZ, m_creature->GetObjectSize()); @@ -180,6 +181,7 @@ struct TRINITY_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI { PlayerGUID = 0; Tapped = false; + Reset(); } uint64 PlayerGUID; diff --git a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp index d0a769b3ca1..bbd5cdf2235 100644 --- a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp +++ b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/silithus/silithus.cpp b/src/bindings/scripts/scripts/zone/silithus/silithus.cpp index 35dca28ddc8..bd1ecf748a0 100644 --- a/src/bindings/scripts/scripts/zone/silithus/silithus.cpp +++ b/src/bindings/scripts/scripts/zone/silithus/silithus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp b/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp index 330fcf937c2..b8119f82d6b 100644 --- a/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp +++ b/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -47,7 +47,7 @@ struct TRINITY_DLL_DECL npc_blood_knight_stillbladeAI : public ScriptedAI void Reset() { lifeTimer = 120000; - m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 32); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,7); // lay down spellHit = false; } @@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL npc_blood_knight_stillbladeAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (!m_creature->GetUInt32Value(UNIT_FIELD_BYTES_1)) + if (m_creature->IsStandState()) { if(lifeTimer < diff) m_creature->AI()->EnterEvadeMode(); @@ -79,7 +79,7 @@ struct TRINITY_DLL_DECL npc_blood_knight_stillbladeAI : public ScriptedAI { ((Player*)Hitter)->AreaExploredOrEventHappens(QUEST_REDEEMING_THE_DEAD); DoCast(m_creature,SPELL_REVIVE_SELF); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); //m_creature->RemoveAllAuras(); DoScriptText(SAY_HEAL, m_creature); diff --git a/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp b/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp index 0c2611d5a46..16e372f7261 100644 --- a/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp +++ b/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp index b3cd504bb02..a438c14294d 100644 --- a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp +++ b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp index 81016febdae..bcc6d9ccbfe 100644 --- a/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp +++ b/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -27,6 +27,7 @@ npc_bartleby npc_dashel_stonefist npc_general_marcus_jonathan npc_lady_katrana_prestor +npc_harbor_taxi EndContentData */ #include "precompiled.h" @@ -173,6 +174,8 @@ CreatureAI* GetAI_npc_dashel_stonefist(Creature *_creature) ## npc_general_marcus_jonathan ######*/ +#define SAY_GREETING -1000005 + bool ReceiveEmote_npc_general_marcus_jonathan(Player *player, Creature *_Creature, uint32 emote) { if(player->GetTeam() == ALLIANCE) @@ -184,7 +187,7 @@ bool ReceiveEmote_npc_general_marcus_jonathan(Player *player, Creature *_Creatur } if (emote == TEXTEMOTE_WAVE) { - _Creature->MonsterSay("Greetings citizen",LANG_COMMON,0); + DoScriptText(SAY_GREETING, _Creature, player); } } return true; @@ -236,6 +239,28 @@ bool GossipSelect_npc_lady_katrana_prestor(Player *player, Creature *_Creature, return true; } +/*###### +## npc_harbor_taxi +######*/ + +#define GOSSIP_STORMWIND "I'd like to take a flight around Stormwind Harbor." + +bool GossipHello_npc_stormwind_harbor_taxi(Player *player, Creature *_Creature) +{ + player->ADD_GOSSIP_ITEM(0, GOSSIP_STORMWIND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + player->SEND_GOSSIP_MENU(13454,_Creature->GetGUID()); + return true; +} + +bool GossipSelect_npc_stormwind_harbor_taxi(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + if (action == GOSSIP_ACTION_INFO_DEF + 10) + { + player->GetSession()->SendDoFlight(1149, 1041); + } + return true; +} + void AddSC_stormwind_city() { Script *newscript; @@ -268,5 +293,11 @@ void AddSC_stormwind_city() newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_stormwind_harbor_taxi"; + newscript->pGossipHello = &GossipHello_npc_stormwind_harbor_taxi; + newscript->pGossipSelect = &GossipSelect_npc_stormwind_harbor_taxi; + newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp b/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp index c2aa57d8c49..2a46fe4d5dd 100644 --- a/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp +++ b/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp index c8ad95038c0..aa897761344 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp index c30f712a98b..57f70cf33dd 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp index 08b754177bb..ce09bbc2cd0 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp index 0e70b4a3b43..5b85cdc07fe 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp index 5d0eda58c37..9402c601219 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp index 652dd48e766..e08c97965b1 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp index db425ebcca0..3233e5c9c50 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp index 86602f40d34..9c2084f6cec 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp index d6a87d43d8b..a8ed628ffc0 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp index 2e16dc883cc..6ef1477ff35 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp b/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp index f41c5f013b6..0555c5da57d 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/stratholme/def_stratholme.h b/src/bindings/scripts/scripts/zone/stratholme/def_stratholme.h index 79dd277c999..b9246091a7c 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/def_stratholme.h +++ b/src/bindings/scripts/scripts/zone/stratholme/def_stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp b/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp index 142c38f06d6..200195d76af 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -280,10 +280,10 @@ struct TRINITY_DLL_DECL instance_stratholme : public ScriptedInstance if (!pGroupie) continue; - if (pGroupie->HasAura(SPELL_BARON_ULTIMATUM,0)) + if (pGroupie->HasAura(SPELL_BARON_ULTIMATUM)) pGroupie->RemoveAurasDueToSpell(SPELL_BARON_ULTIMATUM); } - } else if (player->HasAura(SPELL_BARON_ULTIMATUM,0)) + } else if (player->HasAura(SPELL_BARON_ULTIMATUM)) player->RemoveAurasDueToSpell(SPELL_BARON_ULTIMATUM); if (Unit *temp = Unit::GetUnit(*player,GetData64(DATA_BARON))) diff --git a/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp b/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp index f22ca652fff..91c7553bff7 100644 --- a/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp +++ b/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -54,12 +54,12 @@ bool GOHello_go_gauntlet_gate(Player *player, GameObject* _GO) continue; if (pGroupie->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && - !pGroupie->HasAura(SPELL_BARON_ULTIMATUM,0) && + !pGroupie->HasAura(SPELL_BARON_ULTIMATUM) && pGroupie->GetMap() == _GO->GetMap()) pGroupie->CastSpell(pGroupie,SPELL_BARON_ULTIMATUM,true); } } else if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && - !player->HasAura(SPELL_BARON_ULTIMATUM,0) && + !player->HasAura(SPELL_BARON_ULTIMATUM) && player->GetMap() == _GO->GetMap()) player->CastSpell(player,SPELL_BARON_ULTIMATUM,true); @@ -72,10 +72,10 @@ bool GOHello_go_gauntlet_gate(Player *player, GameObject* _GO) ######*/ //Possibly more of these quotes around. -#define SAY_ZAPPED0 "Thanks to Egan" -#define SAY_ZAPPED1 "Rivendare must die" -#define SAY_ZAPPED2 "Who you gonna call?" -#define SAY_ZAPPED3 "Don't cross those beams!" +#define SAY_ZAPPED0 -1329000 +#define SAY_ZAPPED1 -1329001 +#define SAY_ZAPPED2 -1329002 +#define SAY_ZAPPED3 -1329003 struct TRINITY_DLL_DECL mob_freed_soulAI : public ScriptedAI { @@ -85,10 +85,10 @@ struct TRINITY_DLL_DECL mob_freed_soulAI : public ScriptedAI { switch (rand()%4) { - case 0: DoSay(SAY_ZAPPED0,LANG_UNIVERSAL,NULL); break; - case 1: DoSay(SAY_ZAPPED1,LANG_UNIVERSAL,NULL); break; - case 2: DoSay(SAY_ZAPPED2,LANG_UNIVERSAL,NULL); break; - case 3: DoSay(SAY_ZAPPED3,LANG_UNIVERSAL,NULL); break; + 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; } } diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp index 539548af9da..e848557f859 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -133,7 +133,7 @@ struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI Unit *Target = m_creature->getVictim(); DoCast(Target,SPELL_STOMP); - if(Target->HasAura(45151,0)) Target->RemoveAura(45151,0); + if(Target->HasAura(45151)) Target->RemoveAura(45151); StompTimer = 30000; }else StompTimer -= diff; diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp index a6f592c1b7c..bf2b11c3b9b 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -209,9 +209,9 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI switch(TouchedType) { case SPELL_FLAME_TOUCHED: - if(!target->HasAura(SPELL_DARK_FLAME,0)) + if(!target->HasAura(SPELL_DARK_FLAME)) { - if(target->HasAura(SPELL_DARK_TOUCHED,0)) + if(target->HasAura(SPELL_DARK_TOUCHED)) { target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED); target->CastSpell(target,SPELL_DARK_FLAME,true); @@ -222,9 +222,9 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI } break; case SPELL_DARK_TOUCHED: - if(!target->HasAura(SPELL_DARK_FLAME,0)) + if(!target->HasAura(SPELL_DARK_FLAME)) { - if(target->HasAura(SPELL_FLAME_TOUCHED,0)) + if(target->HasAura(SPELL_FLAME_TOUCHED)) { target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); target->CastSpell(target,SPELL_DARK_FLAME,true); @@ -507,9 +507,9 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI switch(TouchedType) { case SPELL_FLAME_TOUCHED: - if(!target->HasAura(SPELL_DARK_FLAME,0)) + if(!target->HasAura(SPELL_DARK_FLAME)) { - if(target->HasAura(SPELL_DARK_TOUCHED,0)) + if(target->HasAura(SPELL_DARK_TOUCHED)) { target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED); target->CastSpell(target,SPELL_DARK_FLAME,true); @@ -520,9 +520,9 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI } break; case SPELL_DARK_TOUCHED: - if(!target->HasAura(SPELL_DARK_FLAME,0)) + if(!target->HasAura(SPELL_DARK_FLAME)) { - if(target->HasAura(SPELL_FLAME_TOUCHED,0)) + if(target->HasAura(SPELL_FLAME_TOUCHED)) { target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); target->CastSpell(target,SPELL_DARK_FLAME,true); @@ -543,31 +543,31 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI case 0: DoPlaySoundToSet(m_creature,SOUND_INTRO); return 0; case 1: if(Sacrolash) - Sacrolash->Yell(YELL_INTRO_SAC_1, LANG_UNIVERSAL,NULL); + Sacrolash->MonsterYell(YELL_INTRO_SAC_1, LANG_UNIVERSAL,NULL); return 1000; case 2: - m_creature->Yell(YELL_INTRO_ALY_2, LANG_UNIVERSAL,NULL); + m_creature->MonsterYell(YELL_INTRO_ALY_2, LANG_UNIVERSAL,NULL); return 1000; case 3: if(Sacrolash) - Sacrolash->Yell(YELL_INTRO_SAC_3, LANG_UNIVERSAL,NULL); + Sacrolash->MonsterYell(YELL_INTRO_SAC_3, LANG_UNIVERSAL,NULL); return 2000; case 4: - m_creature->Yell(YELL_INTRO_ALY_4, LANG_UNIVERSAL,NULL); + m_creature->MonsterYell(YELL_INTRO_ALY_4, LANG_UNIVERSAL,NULL); return 1000; case 5: if(Sacrolash) - Sacrolash->Yell(YELL_INTRO_SAC_5, LANG_UNIVERSAL,NULL); + Sacrolash->MonsterYell(YELL_INTRO_SAC_5, LANG_UNIVERSAL,NULL); return 2000; case 6: - m_creature->Yell(YELL_INTRO_ALY_6, LANG_UNIVERSAL,NULL); + m_creature->MonsterYell(YELL_INTRO_ALY_6, LANG_UNIVERSAL,NULL); return 1000; case 7: if(Sacrolash) - Sacrolash->Yell(YELL_INTRO_SAC_7, LANG_UNIVERSAL,NULL); + Sacrolash->MonsterYell(YELL_INTRO_SAC_7, LANG_UNIVERSAL,NULL); return 3000; case 8: - m_creature->Yell(YELL_INTRO_ALY_8, LANG_UNIVERSAL,NULL); + m_creature->MonsterYell(YELL_INTRO_ALY_8, LANG_UNIVERSAL,NULL); return 900000; } return 10000; @@ -709,9 +709,9 @@ struct TRINITY_DLL_DECL mob_shadow_imageAI : public ScriptedAI case SPELL_SHADOW_FURY: case SPELL_DARK_STRIKE: - if(!target->HasAura(SPELL_DARK_FLAME,0)) + if(!target->HasAura(SPELL_DARK_FLAME)) { - if(target->HasAura(SPELL_FLAME_TOUCHED,0)) + if(target->HasAura(SPELL_FLAME_TOUCHED)) { target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED); target->CastSpell(target,SPELL_DARK_FLAME,true); @@ -726,7 +726,7 @@ struct TRINITY_DLL_DECL mob_shadow_imageAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(!m_creature->HasAura(SPELL_IMAGE_VISUAL,0)) + if(!m_creature->HasAura(SPELL_IMAGE_VISUAL)) DoCast(m_creature,SPELL_IMAGE_VISUAL); if(kill_timer < diff) diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp index 68bb0ae8e44..442ac05816c 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp @@ -491,7 +491,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI cell.SetNoCreate(); Trinity::AllCreaturesOfEntryInRange check(m_creature, entry, 100); - Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(templist, check); + Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(m_creature, templist, check); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher); diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp index 23c783ffa88..c39c14b7f20 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -133,7 +133,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); m_creature->SetVisibility(VISIBILITY_ON); - m_creature->SetStandState(PLAYER_STATE_SLEEP); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); ArcaneBuffetTimer = 8000; FrostBreathTimer = 15000; @@ -157,7 +157,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI void Aggro(Unit* who) { - m_creature->SetStandState(PLAYER_STATE_NONE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); DoScriptText(SAY_EVIL_AGGRO, m_creature); GameObject *Door = GameObject::GetGameObject(*m_creature, DoorGUID); if(Door) Door->SetLootState(GO_ACTIVATED); @@ -384,7 +384,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI if(ResetThreat < diff) { - if ( ( m_creature->getVictim()->HasAura(AURA_SPECTRAL_EXHAUSTION,0)) && (m_creature->getVictim()->GetTypeId() == TYPEID_PLAYER) ) + if ( ( m_creature->getVictim()->HasAura(AURA_SPECTRAL_EXHAUSTION)) && (m_creature->getVictim()->GetTypeId() == TYPEID_PLAYER) ) { for(std::list<HostilReference*>::iterator itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr) { @@ -609,7 +609,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff) { //this is a hack. we need to find a victim without aura in core Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if( ( target != m_creature->getVictim() ) && target->isAlive() && !(target->HasAura(AURA_SPECTRAL_EXHAUSTION, 0)) ) + if( ( target != m_creature->getVictim() ) && target->isAlive() && !(target->HasAura(AURA_SPECTRAL_EXHAUSTION)) ) { DoCast(target, SPELL_SPECTRAL_BLAST); SpectralBlastTimer = 20000+(rand()%5000); @@ -626,7 +626,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff) bool GOkalocegos_teleporter(Player *player, GameObject* _GO) { - if(player->HasAura(AURA_SPECTRAL_EXHAUSTION, 0)) + if(player->HasAura(AURA_SPECTRAL_EXHAUSTION)) player->GetSession()->SendNotification(GO_FAILED); else player->CastSpell(player, SPELL_TELEPORT_SPECTRAL, true); diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h index 0844d5dffe6..8ae61602616 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/def_sunwell_plateau.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp index fd93aa15d6c..cd4f62584f0 100644 --- a/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp index 6da8ad16fc2..ab83d78e266 100644 --- a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp +++ b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -191,7 +191,7 @@ struct TRINITY_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) && ((Player*)who)->GetQuestStatus(10277) == QUEST_STATUS_INCOMPLETE ) { float Radius = 10.0; if( m_creature->IsWithinDistInMap(who, Radius) ) diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp index a61a9c9b163..b12a9eff520 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -347,7 +347,7 @@ struct TRINITY_DLL_DECL npc_warden_mellicharAI : public ScriptedAI if( pInstance ) { m_creature->InterruptNonMeleeSpells(true); - m_creature->RemoveSpellsCausingAura(SPELL_AURA_DUMMY); + m_creature->RemoveAurasByType(SPELL_AURA_DUMMY); switch( Phase ) { diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index da2b392072a..ee8bacb930c 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/def_arcatraz.h b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/def_arcatraz.h index 76f8d575383..3f8dee8bbd0 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/def_arcatraz.h +++ b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/def_arcatraz.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp index ddf648d52fd..36ff863abe7 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index c9f88c57b2d..85a644f7ab8 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp index e95d8328907..9a276ead142 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp index 5306aa690cf..bbd18dee029 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp index 813222b52c9..3e5bbbf66da 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp @@ -241,12 +241,12 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI WaitEvent = WE_DUMMY; return; case WE_DIE: - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_DEAD); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD); WaitTimer = 5000; WaitEvent = WE_REVIVE; return; case WE_REVIVE: - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_STAND); m_creature->SetHealth(m_creature->GetMaxHealth()); m_creature->SetSpeed(MOVE_RUN, DefaultMoveSpeedRate); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -348,7 +348,7 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI if(Charge_Timer < diff) { - Unit *target= SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRange(SPELL_CHARGE), true); + Unit *target= SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRangeForHostile(SPELL_CHARGE), true); DoCast(target, SPELL_CHARGE); Charge_Timer = 30000; }else Charge_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp index bc215f8c683..340d3f23fc8 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -120,6 +120,7 @@ struct TRINITY_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI Jump_Timer=8000; Wrath_Timer = 20000+rand()%5000;//twice in phase one Phase = 1; + Wrath_Timer = 20000+rand()%5000;//twice in phase one if(pInstance) pInstance->SetData(DATA_HIGHASTROMANCERSOLARIANEVENT, NOT_STARTED); diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp index d36f520491a..c1f64b23fc7 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -236,7 +236,7 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD); if (pInstance->GetData(DATA_KAELTHASEVENT) == 3) JustDied(pKiller); @@ -341,7 +341,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI std::list<Creature*> PhoenixList; Trinity::AllCreaturesOfEntryInRange check(m_creature, PHOENIX, 50); - Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(PhoenixList, check); + Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(m_creature, PhoenixList, check); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> visitor(searcher); CellLock<GridReadGuard> cell_lock(cell, pair); @@ -569,7 +569,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI //Subphase 2 - Start case 2: Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[0])); - if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD)) + if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD)) { DoScriptText(SAY_INTRO_SANGUINAR, m_creature); @@ -603,7 +603,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI //Subphase 3 - Start case 4: Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[1])); - if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD)) + if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD)) { DoScriptText(SAY_INTRO_CAPERNIAN, m_creature); @@ -637,7 +637,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI //Subphase 4 - Start case 6: Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[2])); - if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD)) + if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD)) { DoScriptText(SAY_INTRO_TELONICUS, m_creature); @@ -673,7 +673,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI //End of phase 1 case 8: Advisor = (Creature*)(Unit::GetUnit((*m_creature), AdvisorGuid[3])); - if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == PLAYER_STATE_DEAD)) + if(Advisor && (Advisor->GetUInt32Value(UNIT_FIELD_BYTES_1) == UNIT_STAND_STATE_DEAD)) { Phase = 2; pInstance->SetData(DATA_KAELTHASEVENT, 2); @@ -1457,7 +1457,7 @@ struct TRINITY_DLL_DECL mob_phoenix_tkAI : public ScriptedAI if(SummonEgg == 1){ //hack die animation m_creature->RemoveAllAuras(); DoStartNoMovement(m_creature->getVictim()); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_DEAD); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, UNIT_STAND_STATE_DEAD); SummonEgg = 2; Cycle_Timer = 1000; } diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp index 708e5feffcd..65c8d2f87f3 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/def_the_eye.h b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/def_the_eye.h index 7162fb90199..d0d3ea09061 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/def_the_eye.h +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/def_the_eye.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp index 6f7dcb0f10d..bc407a3de99 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -77,7 +77,7 @@ struct TRINITY_DLL_DECL instance_the_eye : public ScriptedInstance void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case 20064: ThaladredTheDarkener = creature->GetGUID(); break; case 20063: MasterEngineerTelonicus = creature->GetGUID(); break; diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp index ef3860c0581..7d73e08d9e5 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp index c77989e27f3..268cfeb2918 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index bd8fc581e9d..9bc8afc8aef 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index b3eddfa7ebe..b8cd2fc0cbe 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -109,7 +109,7 @@ struct TRINITY_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI if(frost_attack_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_FROST_ATTACK); - frost_attack_Timer = 7000 + rand()%30000; + frost_attack_Timer = 7000 + rand()%3000; }else frost_attack_Timer -= diff; //Arcane Blast diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 338e115ef85..59f1748c9a5 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp index 05866eb27fb..e8806b62957 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -56,7 +56,7 @@ struct TRINITY_DLL_DECL instance_mechanar : public ScriptedInstance { switch(type) { - case DATA_NETHERMANCER_EVENT: return Encounters[0]; + case DATA_NETHERMANCER_EVENT: return Encounters[0]; } return false; diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp index dc1e4df24ca..64c4fdae2c8 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp index b18e89d5bde..d6ffe70dc69 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -566,13 +566,15 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI Map *map = m_creature->GetMap(); if(!map->IsDungeon()) return; + //Play random sound to the zone Map::PlayerList const &PlayerList = map->GetPlayers(); - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + + if (!PlayerList.isEmpty()) { - if (Player* i_pl = i->getSource()) + for(Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) { - //Play random sound to the zone - i_pl->SendPlaySound(RANDOM_SOUND_WHISPER, true); + if (Player* pPlr = itr->getSource()) + pPlr->PlayDirectSound(RANDOM_SOUND_WHISPER,pPlr); } } @@ -963,7 +965,7 @@ struct TRINITY_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI { Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID)) DoCast(target,SPELL_MIND_FLAY); //Mindflay every 10 seconds @@ -1031,7 +1033,7 @@ struct TRINITY_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI return; } - if (!target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (!target->HasAura(SPELL_DIGESTIVE_ACID)) { m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); Unit* p = DoSpawnCreature(MOB_SMALL_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -1127,7 +1129,7 @@ struct TRINITY_DLL_DECL giant_claw_tentacleAI : public Scripted_NoMovementAI return; } - if (!target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (!target->HasAura(SPELL_DIGESTIVE_ACID)) { m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); Unit* p = DoSpawnCreature(MOB_GIANT_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0); @@ -1211,7 +1213,7 @@ struct TRINITY_DLL_DECL giant_eye_tentacleAI : public Scripted_NoMovementAI { Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID)) DoCast(target,SPELL_GREEN_BEAM); //Beam every 2 seconds @@ -1249,7 +1251,7 @@ void flesh_tentacleAI::JustDied(Unit* killer) { if (!Parent) { - DoYell("Error: No Parent variable", LANG_UNIVERSAL, NULL); + error_log("TSCR: flesh_tentacle: No Parent variable"); return; } @@ -1257,7 +1259,7 @@ void flesh_tentacleAI::JustDied(Unit* killer) if (Cthun) ((cthunAI*)(Cthun->AI()))->FleshTentcleKilled(); - else DoYell("Error: No Cthun", LANG_UNIVERSAL, NULL); + else error_log("TSCR: flesh_tentacle: No Cthun"); } //GetAIs diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp index 0888c395489..9315817a460 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -135,34 +135,46 @@ struct TRINITY_DLL_DECL boss_fankrissAI : public ScriptedAI 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; } diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp index 484a6260c86..3456fd19d87 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,6 +23,9 @@ 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 @@ -71,6 +74,7 @@ struct TRINITY_DLL_DECL boss_huhuranAI : public ScriptedAI if (!Frenzy && Frenzy_Timer < diff) { DoCast(m_creature, SPELL_FRENZY); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); Frenzy = true; PoisonBolt_Timer = 3000; Frenzy_Timer = 25000 + rand()%10000; @@ -119,7 +123,7 @@ struct TRINITY_DLL_DECL boss_huhuranAI : public ScriptedAI if ( !Berserk && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 31 ) { m_creature->InterruptNonMeleeSpells(false); - DoTextEmote("is going berserk", NULL); + DoScriptText(EMOTE_GENERIC_BERSERK, m_creature); DoCast(m_creature, SPELL_BERSERK); Berserk = true; } diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp index 7f5827d398b..a5721c4bc92 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp index a9b0578279d..b1a0b4bdfea 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -94,8 +94,12 @@ struct TRINITY_DLL_DECL boss_sarturaAI : public ScriptedAI if (WhirlWindRandom_Timer < diff) { //Attack random Gamers - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - AttackStart(target); + 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 = 3000 + rand()%4000; }else WhirlWindRandom_Timer -= diff; @@ -119,8 +123,12 @@ struct TRINITY_DLL_DECL boss_sarturaAI : public ScriptedAI if (AggroReset_Timer < diff) { //Attack random Gamers - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - m_creature->TauntApply(target); + 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 = 2000 + rand()%3000; @@ -213,8 +221,12 @@ struct TRINITY_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI if (WhirlWindRandom_Timer < diff) { //Attack random Gamers - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - m_creature->TauntApply(target); + 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 = 3000 + rand()%4000; }else WhirlWindRandom_Timer -= diff; @@ -230,8 +242,12 @@ struct TRINITY_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI if (AggroReset_Timer < diff) { //Attack random Gamers - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - AttackStart(target); + 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 = 2000 + rand()%3000; diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp index 84311d725f5..c4f9401f869 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -261,6 +261,9 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_OFF); m_creature->Relocate(bossc->x, bossc->y, bossc->z, bossc->r); Invisible = true; + delete place1; + delete place2; + delete place3; DoResetThreat(); DoStopAttack(); @@ -274,20 +277,24 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); Image1 = m_creature->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000); - Image1->SetMaxHealth(m_creature->GetMaxHealth() / 5); - Image1->SetHealth(m_creature->GetHealth() / 5); - if (target) - Image1->AI()->AttackStart(target); + 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); - Image2->SetMaxHealth(m_creature->GetMaxHealth() / 5); - Image2->SetHealth(m_creature->GetHealth() / 5); - if (target) - Image2->AI()->AttackStart(target); - - ((boss_skeramAI*)Image1->AI())->IsImage = true; - ((boss_skeramAI*)Image2->AI())->IsImage = true; - + 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; } }; diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp index c707ad23cee..0abaf8e79d9 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -336,7 +336,7 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI std::list<Creature*> unitList; AnyBugCheck u_check(m_creature, 150); - Trinity::CreatureListSearcher<AnyBugCheck> searcher(unitList, u_check); + Trinity::CreatureListSearcher<AnyBugCheck> searcher(m_creature, unitList, u_check); TypeContainerVisitor<Trinity::CreatureListSearcher<AnyBugCheck>, GridTypeMapContainer > grid_creature_searcher(searcher); CellLock<GridReadGuard> cell_lock(cell, p); cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap())); @@ -404,13 +404,6 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI } }; -class TRINITY_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 TRINITY_DLL_DECL boss_veknilashAI : public boss_twinemperorsAI { bool IAmVeklor() {return false;} @@ -441,12 +434,14 @@ struct TRINITY_DLL_DECL boss_veknilashAI : public boss_twinemperorsAI target->setFaction(14); ((CreatureAI*)target->AI())->AttackStart(m_creature->getThreatManager().getHostilTarget()); SpellEntry *spell = (SpellEntry *)GetSpellStore()->LookupEntry(SPELL_MUTATE_BUG); + uint8 eff_mask=0; for (int i=0; i<3; i++) { if (!spell->Effect[i]) continue; - target->AddAura(new BugAura(spell, i, NULL, target, target)); + eff_mask|=1<<i; } + target->AddAura(new Aura(spell, eff_mask, NULL, target, target)); target->SetHealth(target->GetMaxHealth()); } @@ -524,12 +519,14 @@ struct TRINITY_DLL_DECL boss_veklorAI : public boss_twinemperorsAI { target->setFaction(14); SpellEntry *spell = (SpellEntry *)GetSpellStore()->LookupEntry(SPELL_EXPLODEBUG); + uint8 eff_mask=0; for (int i=0; i<3; i++) { if (!spell->Effect[i]) continue; - target->AddAura(new BugAura(spell, i, NULL, target, target)); + eff_mask|=1<<i; } + target->AddAura(new Aura(spell, eff_mask, NULL, target, target)); target->SetHealth(target->GetMaxHealth()); } diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_viscidus.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_viscidus.cpp index 7b310dfe10d..2bb9f1bfb0b 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_viscidus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/def_temple_of_ahnqiraj.h b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/def_temple_of_ahnqiraj.h index 95db307f778..5d545ed7c74 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/def_temple_of_ahnqiraj.h +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/def_temple_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 7ca0f33566f..9048591b774 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index fd3e7c56cb1..0899fa5a610 100644 --- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -174,7 +174,7 @@ struct TRINITY_DLL_DECL aqsentinelAI : public ScriptedAI std::list<Creature*> assistList; NearbyAQSentinel u_check(nears); - Trinity::CreatureListSearcher<NearbyAQSentinel> searcher(assistList, u_check); + Trinity::CreatureListSearcher<NearbyAQSentinel> searcher(m_creature, assistList, u_check); TypeContainerVisitor<Trinity::CreatureListSearcher<NearbyAQSentinel>, GridTypeMapContainer > grid_creature_searcher(searcher); CellLock<GridReadGuard> cell_lock(cell, p); cell_lock->Visit(cell_lock, grid_creature_searcher, *(nears->GetMap())); @@ -220,6 +220,8 @@ struct TRINITY_DLL_DECL aqsentinelAI : public ScriptedAI DoYell("I dont have enough buddies.", LANG_NEUTRAL, 0);*/ SendMyListToBuddies(); CallBuddiesToAttack(who); + + delete[] chosenAbilities; } bool gatherOthersWhenAggro; @@ -245,13 +247,16 @@ struct TRINITY_DLL_DECL aqsentinelAI : public ScriptedAI void GainSentinelAbility(uint32 id) { const SpellEntry *spell = GetSpellStore()->LookupEntry(id); + uint8 eff_mask=0; 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); + eff_mask=1<<i; } + SentinelAbilityAura *a = new SentinelAbilityAura(this, (SpellEntry *)spell, id, eff_mask); + m_creature->AddAura(a); + if (id == SPELL_KNOCK_BUFF) { m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); @@ -339,6 +344,5 @@ SentinelAbilityAura::SentinelAbilityAura(aqsentinelAI *abilityOwner, SpellEntry { aOwner = abilityOwner; abilityId = ability; - currentBasePoints = 0; } diff --git a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp index 6d6f53c6163..710268c0cff 100644 --- a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp +++ b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI CanDoQuest = false; UnkorUnfriendly_Timer = 0; Pulverize_Timer = 3000; - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_NONE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->setFaction(FACTION_HOSTILE); } @@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI { DoScriptText(SAY_SUBMIT, m_creature); m_creature->setFaction(FACTION_FRIENDLY); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, PLAYER_STATE_SIT); + m_creature->SetStandState(UNIT_STAND_STATE_SIT); m_creature->RemoveAllAuras(); m_creature->DeleteThreatList(); m_creature->CombatStop(); diff --git a/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp b/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp index 45d9094d678..cdd7cfd924d 100644 --- a/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp +++ b/src/bindings/scripts/scripts/zone/thousand_needles/thousand_needles.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp b/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp index 30312313ee8..8038b7e4c34 100644 --- a/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp +++ b/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp b/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp index 7a69eab5153..82f1afbff5d 100644 --- a/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp +++ b/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -100,7 +100,7 @@ GameObject* SearchMausoleumGo(Unit *source, uint32 entry, float range) cell.SetNoCreate(); Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*source, entry, range); - Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> searcher(pGo, go_check); + Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> searcher(source, pGo, go_check); TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer> go_searcher(searcher); diff --git a/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp b/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp index 14a788d29e2..030a5937caa 100644 --- a/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp +++ b/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,12 +23,11 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_ARCINGSMASH 39144 -#define SPELL_KNOCKAWAY 22893 -#define SPELL_WSTOMP 16727 +#define SAY_AGGRO -1070000 -#define SAY_AGGRO "None may steal the secrets of the makers!" -#define SOUND_AGGRO 5851 +#define SPELL_ARCINGSMASH 8374 +#define SPELL_KNOCKAWAY 10101 +#define SPELL_WSTOMP 11876 struct TRINITY_DLL_DECL boss_ironayaAI : public ScriptedAI { @@ -47,8 +46,7 @@ struct TRINITY_DLL_DECL boss_ironayaAI : public ScriptedAI void Aggro(Unit *who) { - DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL); - DoPlaySoundToSet(m_creature,SOUND_AGGRO); + DoScriptText(SAY_AGGRO, m_creature); } void UpdateAI(const uint32 diff) diff --git a/src/bindings/scripts/scripts/zone/uldaman/instance_uldaman.cpp b/src/bindings/scripts/scripts/zone/uldaman/instance_uldaman.cpp index 7a5e50805f1..a8a1820f0a4 100644 --- a/src/bindings/scripts/scripts/zone/uldaman/instance_uldaman.cpp +++ b/src/bindings/scripts/scripts/zone/uldaman/instance_uldaman.cpp @@ -70,7 +70,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance break; case ANCIENT_VAULT_DOOR: - go->SetUInt32Value(GAMEOBJECT_STATE,1); + go->SetGoState(1); go->SetUInt32Value(GAMEOBJECT_FLAGS, 33); ancientVaultDoor = go->GetGUID(); break; @@ -93,7 +93,7 @@ struct TRINITY_DLL_DECL instance_uldaman : public ScriptedInstance return; go->SetUInt32Value(GAMEOBJECT_FLAGS, 33); - go->SetUInt32Value(GAMEOBJECT_STATE, 0); + go->SetGoState(0); } void ActivateStoneKeepers() diff --git a/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp b/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp index de5f4889fe4..cf30cdb8824 100644 --- a/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp +++ b/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/undercity/undercity.cpp b/src/bindings/scripts/scripts/zone/undercity/undercity.cpp index b46acf1fcc2..3194ebc5439 100644 --- a/src/bindings/scripts/scripts/zone/undercity/undercity.cpp +++ b/src/bindings/scripts/scripts/zone/undercity/undercity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -110,7 +110,7 @@ struct TRINITY_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)) { DoScriptText(SAY_LAMENT_END, m_creature); DoScriptText(EMOTE_LAMENT_END, m_creature); @@ -175,7 +175,7 @@ struct TRINITY_DLL_DECL npc_highborne_lamenterAI : public ScriptedAI if( EventMove_Timer < diff ) { m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT | MOVEMENTFLAG_LEVITATING); - m_creature->SendMonsterMoveWithSpeed(m_creature->GetPositionX(),m_creature->GetPositionY(),HIGHBORNE_LOC_Y_NEW,MOVEMENTFLAG_ONTRANSPORT,5000); + 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; @@ -210,7 +210,7 @@ bool GossipHello_npc_parqual_fintallas(Player *player, Creature *_Creature) if (_Creature->isQuestGiver()) player->PrepareQuestMenu( _Creature->GetGUID() ); - if (player->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !player->HasAura(SPELL_MARK_OF_SHAME,0) ) + if (player->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !player->HasAura(SPELL_MARK_OF_SHAME) ) { player->ADD_GOSSIP_ITEM( 0, GOSSIP_HPF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->ADD_GOSSIP_ITEM( 0, GOSSIP_HPF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); diff --git a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp new file mode 100644 index 00000000000..22e1b504446 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_ingvar_the_plunderer.cpp @@ -0,0 +1,470 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ingvar_The_Plunderer +SD%Complete: 95 +SDComment: Some Problems with Annhylde Movement, Blizzlike Timers +SDCategory: Udgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "def_utgarde_keep.h" + +//Yells Ingvar +#define YELL_AGGRO_1 "I'll paint my face with your blood!" +#define SOUND_AGGRO_1 13207 +#define YELL_AGGRO_2 "I return! A second chance to carve out your skull!" +#define SOUND_AGGRO_2 13209 + +#define YELL_DEAD_1 "My life for the... death god!" +#define SOUND_DEAD_1 13213 +#define YELL_DEAD_2 "No! I can do... better! I can..." +#define SOUND_DEAD_2 13211 + +#define YELL_KILL_1 "Mjul orm agn gjor!" +#define SOUND_KILL_1 13212 +#define YELL_KILL_2 "I am a warriorborn!" +#define SOUND_KILL_2 13214 + +//Ingvar Spells human form +#define MOB_INGVAR_HUMAN 23954 +#define SPELL_CLEAVE 42724 +#define SPELL_SMASH 42669 +#define H_SPELL_SMASH 59706 +#define SPELL_STAGGERING_ROAR 42708 +#define H_SPELL_STAGGERING_ROAR 59708 +#define SPELL_ENRAGE 42705 +#define H_SPELL_ENRAGE 59707 + +#define MOB_ANNHYLDE_THE_CALLER 24068 +#define SPELL_INGVAR_FEIGN_DEATH 42795 +#define SPELL_SUMMON_BANSHEE 42912 +#define SPELL_SCOURG_RESURRECTION_EFFEKTSPAWN 42863 //Spawn resurrecteffekt around Ingvar + +#define MODEL_INGVAR_UNDEAD 26351 +#define MODEL_INGVAR_HUMAN 21953 + +//Ingvar Spells undead form +#define MOB_INGVAR_UNDEAD 23980 +#define SPELL_DARK_SMASH 42723 +#define SPELL_DREADFUL_ROAR 42729 +#define H_SPELL_DREADFUL_ROAR 59734 +#define SPELL_WOE_STRIKE 42730 +#define H_SPELL_WOE_STRIKE 59735 + +#define ENTRY_THROW_TARGET 23996 +#define SPELL_SHADOW_AXE_SUMMON 42749 + +struct TRINITY_DLL_DECL boss_ingvar_the_plundererAI : public ScriptedAI +{ + boss_ingvar_the_plundererAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = c->GetMap()->IsHeroic(); + } + + ScriptedInstance* pInstance; + + bool HeroicMode; + bool undead; + bool event_inProgress; + + uint32 Cleave_Timer; + uint32 Smash_Timer; + uint32 Enrage_Timer; + uint32 Roar_Timer; + uint32 SpawnResTimer; + uint32 wait_Timer; + + + void Reset() + { + if(undead) // Visual Hack + m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INGVAR_HUMAN); + + undead = false; + event_inProgress = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + Cleave_Timer = 2000; + Smash_Timer = 5000; + Enrage_Timer = 10000; + Roar_Timer = 15000; + + SpawnResTimer = 3000; + + wait_Timer = 0; + + if(pInstance) + pInstance->SetData(DATA_INGVAR_EVENT, NOT_STARTED); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if( damage >= m_creature->GetHealth() && !undead) + { + //DoCast(m_creature,SPELL_INGVAR_FEIGN_DEATH,true); // Dont work ??? + // visuel hack + m_creature->SetHealth(0); + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveAllAuras(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2); + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + // visuel hack end + + event_inProgress = true; + undead = true; + + DoYell(YELL_DEAD_1,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_DEAD_1); + } + + if(event_inProgress) + { + damage = 0; + } + } + + void StartZombiePhase() + { + undead = true; + event_inProgress = false; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->AI()->AttackStart(m_creature->getVictim()); + + DoYell(YELL_AGGRO_2,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); + } + + void Aggro(Unit *who) + { + DoYell(YELL_AGGRO_1,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); + + if(pInstance) + pInstance->SetData(DATA_INGVAR_EVENT, IN_PROGRESS); + } + + void JustDied(Unit* killer) + { + DoYell(YELL_DEAD_2,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_DEAD_2); + + if(pInstance) + pInstance->SetData(DATA_INGVAR_EVENT, DONE); + } + + void KilledUnit(Unit *victim) + { + if(undead) + { + DoYell(YELL_KILL_1,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_KILL_1); + } + else + { + DoYell(YELL_KILL_2,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_KILL_2); + } + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(event_inProgress) + { + if(SpawnResTimer) + if(SpawnResTimer< diff) + { + DoCast(m_creature,SPELL_SUMMON_BANSHEE); // Summons direktly on caster position + //DoCast(m_creature,SPELL_SCOURG_RESURRECTION_EFFEKTSPAWN); // Dont needet ? + SpawnResTimer = 0; + }else SpawnResTimer -= diff; + + return; + } + + // This is used for a spell queue ... the spells should not castet if one spell is already casting + if(wait_Timer) + if(wait_Timer < diff) + { + wait_Timer = 0; + }else wait_Timer -= diff; + + if(Cleave_Timer < diff) + { + if(!wait_Timer) + { + if(undead) + DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_WOE_STRIKE : SPELL_WOE_STRIKE); + else + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = rand()%5000 + 2000; + + wait_Timer = 1000; + } + }else Cleave_Timer -= diff; + + if(Smash_Timer < diff) + { + if(!wait_Timer) + { + if(undead) + DoCast(m_creature->getVictim(), SPELL_DARK_SMASH); + else + DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_SMASH : SPELL_SMASH); + Smash_Timer = 10000; + + wait_Timer = 5000; + } + }else Smash_Timer -= diff; + + if(!undead) + { + if(Enrage_Timer < diff) + { + DoCast(m_creature,HeroicMode ? H_SPELL_ENRAGE : SPELL_ENRAGE); + Enrage_Timer = 10000; + }else Enrage_Timer -= diff; + }else // In Undead form used to summon weapon + { + if(Enrage_Timer < diff) + { + if(!wait_Timer) + { + // Spawn target for Axe + Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1); + if(target) + { + Creature* temp = m_creature->SummonCreature(ENTRY_THROW_TARGET,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,2000); + + DoCast(m_creature,SPELL_SHADOW_AXE_SUMMON); + } + Enrage_Timer = 30000; + } + }else Enrage_Timer -= diff; + } + + + if(Roar_Timer < diff) + { + if(!wait_Timer) + { + if(undead) + DoCast(m_creature,HeroicMode ? H_SPELL_DREADFUL_ROAR : SPELL_DREADFUL_ROAR); + else + DoCast(m_creature,HeroicMode ? H_SPELL_STAGGERING_ROAR : SPELL_STAGGERING_ROAR); + Roar_Timer = 10000; + + wait_Timer = 5000; + } + }else Roar_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ingvar_the_plunderer(Creature *_Creature) +{ + return new boss_ingvar_the_plundererAI (_Creature); +} + +#define YELL_RESSURECT "Ingvar! Your pathetic failure will serve as a warning to all... you are damned! Arise and carry out the master's will!" +#define SOUND_RESSURECT 13754 + +//Spells for Annhylde +#define SPELL_SCOURG_RESURRECTION_HEAL 42704 //Heal Max + DummyAura +#define SPELL_SCOURG_RESURRECTION_BEAM 42857 //Channeling Beam of Annhylde +#define SPELL_SCOURG_RESURRECTION_DUMMY 42862 //Some Emote Dummy? +#define SPELL_INGVAR_TRANSFORM 42796 + +struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI +{ + mob_annhylde_the_callerAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + } + + float x,y,z; + ScriptedInstance* pInstance; + uint32 Resurect_Timer; + uint32 Resurect_Phase; + + void Reset() + { + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_FLYING + MOVEMENTFLAG_FLYING2); + m_creature->SetSpeed(MOVE_SWIM , 0.1f); + m_creature->SetSpeed(MOVE_RUN , 0.1f); + m_creature->SetSpeed(MOVE_WALK , 0.1f); + m_creature->SetSpeed(MOVE_FLIGHT , 0.1f); + + m_creature->GetPosition(x,y,z); + DoTeleportTo(x+1,y,z+30); + + Unit* ingvar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_INGVAR)); + if(ingvar) + { + m_creature->GetMotionMaster()->MovePoint(1,x,y,z+15); + + DoYell(YELL_RESSURECT,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_RESSURECT); + } + } + + void MovementInform(uint32 type, uint32 id) + { + if(type != POINT_MOTION_TYPE) + return; + Unit* ingvar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_INGVAR)); + if(ingvar) + { + switch (id) + { + case 1: + ingvar->RemoveAura(SPELL_SUMMON_BANSHEE); + ingvar->CastSpell(ingvar,SPELL_SCOURG_RESURRECTION_DUMMY,true); + DoCast(ingvar,SPELL_SCOURG_RESURRECTION_BEAM); + Resurect_Timer = 8000; + Resurect_Phase = 1; + break; + case 2: + m_creature->DealDamage(m_creature,m_creature->GetHealth()); + m_creature->RemoveCorpse(); + break; + } + } + } + + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void Aggro(Unit *who) {} + void UpdateAI(const uint32 diff) + { + if(Resurect_Timer) + if(Resurect_Timer < diff) + { + if(Resurect_Phase == 1) + { + Unit* ingvar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_INGVAR)); + if(ingvar) + { + ingvar->SetStandState(UNIT_STAND_STATE_STAND); + ingvar->CastSpell(ingvar,SPELL_SCOURG_RESURRECTION_HEAL,false); + } + Resurect_Timer = 3000; + Resurect_Phase = 2; + }else if (Resurect_Phase == 2) + { + Unit* ingvar = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_INGVAR)); + if(ingvar) + { + ingvar->RemoveAurasDueToSpell(SPELL_SCOURG_RESURRECTION_DUMMY); + //ingvar->CastSpell(ingvar,SPELL_INGVAR_TRANSFORM,false); + ingvar->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_INGVAR_UNDEAD); // Visual Hack - when he dies he becomes human model -> wrong + Creature* c_ingvar = (Creature*)ingvar; + + ((boss_ingvar_the_plundererAI*)(c_ingvar->AI()))->StartZombiePhase(); + + m_creature->GetMotionMaster()->MovePoint(2,x+1,y,z+30); + Resurect_Phase++; + } + } + + }else Resurect_Timer -= diff; + } +}; + +CreatureAI* GetAI_mob_annhylde_the_caller(Creature *_Creature) +{ + return new mob_annhylde_the_callerAI (_Creature); +} + +#define SPELL_SHADOW_AXE_DAMAGE 42750 +#define H_SPELL_SHADOW_AXE_DAMAGE 59719 + +struct TRINITY_DLL_DECL mob_ingvar_throw_dummyAI : public ScriptedAI +{ + mob_ingvar_throw_dummyAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = c->GetMap()->IsHeroic(); + } + + bool HeroicMode; + uint32 Despawn_Timer; + + ScriptedInstance* pInstance; + + void Reset() + { + Unit* target = FindCreature(ENTRY_THROW_TARGET,50,m_creature); + if(target) + { + DoCast(m_creature, HeroicMode ? H_SPELL_SHADOW_AXE_DAMAGE : SPELL_SHADOW_AXE_DAMAGE); + float x,y,z; + target->GetPosition(x,y,z); + m_creature->GetMotionMaster()->MovePoint(0,x,y,z); + } + Despawn_Timer = 7000; + } + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void Aggro(Unit *who) {} + void UpdateAI(const uint32 diff) + { + if(Despawn_Timer < diff) + { + m_creature->DealDamage(m_creature,m_creature->GetHealth()); + m_creature->RemoveCorpse(); + Despawn_Timer = 0; + }else Despawn_Timer -= diff; + } +}; + +CreatureAI* GetAI_mob_ingvar_throw_dummy(Creature *_Creature) +{ + return new mob_ingvar_throw_dummyAI (_Creature); +} + +void AddSC_boss_ingvar_the_plunderer() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_ingvar_the_plunderer"; + newscript->GetAI = &GetAI_boss_ingvar_the_plunderer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="mob_annhylde_the_caller"; + newscript->GetAI = &GetAI_mob_annhylde_the_caller; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="mob_ingvar_throw_dummy"; + newscript->GetAI = &GetAI_mob_ingvar_throw_dummy; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_keleseth.cpp new file mode 100644 index 00000000000..6e99f204666 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -0,0 +1,338 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Prince_Keleseth +SD%Complete: 90 +SDComment: Needs Prince Movements, Needs adjustments to blizzlike timers, Needs Shadowbolt castbar, Needs right Ressurect Visual, Needs Some Heroic Spells +SDCategory: Utgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "def_utgarde_keep.h" + +#define SPELL_SHADOWBOLT 43667 +#define SPELL_SHADOWBOLT_HEROIC 59389 +#define SPELL_FROST_TOMB 48400 +#define SPELL_FROST_TOMB_SUMMON 42714 +#define SPELL_DECREPIFY 42702 +#define SPELL_SCOURGE_RESSURRECTION 42704 +#define CREATURE_FROSTTOMB 23965 +#define CREATURE_SKELETON 23970 + +#define SAY_AGGRO -1574000 +#define SAY_KILL -1574001 +#define SAY_DEATH -1574002 +#define SAY_FROST_TOMB -1574003 +#define SAY_SKELETONS -1574004 + +#define SKELETONSPAWN_Z 42.8668 + +float SkeletonSpawnPoint[5][5]= +{ + {156.2559, 259.2093}, + {156.2559, 259.2093}, + {156.2559, 259.2093}, + {156.2559, 259.2093}, + {156.2559, 259.2093}, +}; + +float AttackLoc[3]={197.636, 194.046, 40.8164}; + +struct TRINITY_DLL_DECL mob_frost_tombAI : public ScriptedAI +{ + mob_frost_tombAI(Creature *c) : ScriptedAI(c) + { + FrostTombGUID = 0; + } + + uint64 FrostTombGUID; + + void SetPrisoner(Unit* uPrisoner) + { + FrostTombGUID = uPrisoner->GetGUID(); + } + + void Reset(){ FrostTombGUID = 0; } + void Aggro(Unit* who) {} + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + + void JustDied(Unit *killer) + { + if(FrostTombGUID) + { + Unit* FrostTomb = Unit::GetUnit((*m_creature),FrostTombGUID); + if(FrostTomb) + FrostTomb->RemoveAurasDueToSpell(SPELL_FROST_TOMB); + } + } + + void UpdateAI(const uint32 diff) + { + Unit* temp = Unit::GetUnit((*m_creature),FrostTombGUID); + if((temp && temp->isAlive() && !temp->HasAura(SPELL_FROST_TOMB)) || !temp ) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } +}; + +struct TRINITY_DLL_DECL boss_kelesethAI : public ScriptedAI +{ + boss_kelesethAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Heroic = c->GetMap()->IsHeroic(); + } + + ScriptedInstance* pInstance; + + uint32 FrostTombTimer; + uint32 SummonSkeletonsTimer; + uint32 RespawnSkeletonsTimer; + uint32 ShadowboltTimer; + uint64 SkeletonGUID[5]; + bool Skeletons; + bool Heroic; + bool RespawnSkeletons; + + void Reset() + { + ShadowboltTimer = 0; + Skeletons = false; + + ResetTimer(); + + if(pInstance) + pInstance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED); + } + + void KilledUnit(Unit *victim) + { + if(victim == m_creature) + return; + + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if(pInstance) + pInstance->SetData(DATA_PRINCEKELESETH_EVENT, DONE); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + DoZoneInCombat(); + + if(pInstance) + pInstance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS); + } + + void ResetTimer(uint32 inc = 0) + { + SummonSkeletonsTimer = 5000 + inc; + FrostTombTimer = 28000 + inc; + } + + void UpdateAI(const uint32 diff) + { + if (!UpdateVictim()) + return; + + if(ShadowboltTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); + if(target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) + m_creature->CastSpell(target, Heroic ? SPELL_SHADOWBOLT_HEROIC : SPELL_SHADOWBOLT, true); + ShadowboltTimer = 10000; + }else ShadowboltTimer -= diff; + + if(!Skeletons) + if((SummonSkeletonsTimer < diff)) + { + Creature* Skeleton; + DoScriptText(SAY_SKELETONS, m_creature); + for(uint8 i = 0; i < 5; ++i) + { + Skeleton = m_creature->SummonCreature(CREATURE_SKELETON, SkeletonSpawnPoint[i][0], SkeletonSpawnPoint[i][1] , SKELETONSPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); + if(Skeleton) + { + Skeleton->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + Skeleton->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY() , m_creature->GetPositionZ()); + Skeleton->AddThreat(m_creature->getVictim(), 0.0f); + DoZoneInCombat(Skeleton); + } + } + Skeletons = true; + }else SummonSkeletonsTimer -= diff; + + if(FrostTombTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + if(target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) + { + //DoCast(target, SPELL_FROST_TOMB_SUMMON, true); + Creature* Chains = m_creature->SummonCreature(CREATURE_FROSTTOMB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000); + if(Chains) + { + ((mob_frost_tombAI*)Chains->AI())->SetPrisoner(target); + Chains->CastSpell(target, SPELL_FROST_TOMB, true); + + DoScriptText(SAY_FROST_TOMB, m_creature); + } + } + FrostTombTimer = 15000; + }else FrostTombTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct TRINITY_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI +{ + mob_vrykul_skeletonAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + } + + ScriptedInstance *pInstance; + uint32 Respawn_Time; + uint64 Target_Guid; + uint32 Decrepify_Timer; + + bool isDead; + + void Reset() + { + Respawn_Time = 12000; + Decrepify_Timer = 10000 + rand()%20000; + isDead = false; + } + + void Aggro(Unit *who){} + void DamageTaken(Unit *done_by, uint32 &damage) + { + if(done_by->GetGUID() == m_creature->GetGUID()) + return; + + if(damage >= m_creature->GetHealth()) + { + PretendToDie(); + damage = 0; + } + } + + + void PretendToDie() + { + isDead = true; + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveAllAuras(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + }; + + void Resurrect() + { + isDead = false; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->CastSpell(m_creature,SPELL_SCOURGE_RESSURRECTION,true); + + if(m_creature->getVictim()) + { + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->AI()->AttackStart(m_creature->getVictim()); + } + else + m_creature->GetMotionMaster()->Initialize(); + }; + + void UpdateAI(const uint32 diff) + { + if(pInstance->GetData(DATA_PRINCEKELESETH_EVENT) == IN_PROGRESS) + { + if(isDead) + { + if(Respawn_Time < diff) + { + Resurrect(); + Respawn_Time = 12000; + }else Respawn_Time -= diff; + } + else + { + if(!UpdateVictim()) + return; + + if(Decrepify_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DECREPIFY); + Decrepify_Timer = 30000; + }else Decrepify_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }else + { + if(m_creature->isAlive()) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + } +}; + +CreatureAI* GetAI_mob_frost_tomb(Creature *_Creature) +{ + return new mob_frost_tombAI(_Creature); +} + +CreatureAI* GetAI_boss_keleseth(Creature *_Creature) +{ + return new boss_kelesethAI (_Creature); +} + +CreatureAI* GetAI_mob_vrykul_skeleton(Creature *_Creature) +{ + return new mob_vrykul_skeletonAI (_Creature); +} + +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_frost_tomb"; + newscript->GetAI = &GetAI_mob_frost_tomb; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="mob_vrykul_skeleton"; + newscript->GetAI = &GetAI_mob_vrykul_skeleton; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp new file mode 100644 index 00000000000..78bc29a770d --- /dev/null +++ b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/boss_skarvald_dalronn.cpp @@ -0,0 +1,408 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Skarvald_Dalronn +SD%Complete: 95 +SDComment: Needs adjustments to blizzlike timers, Yell Text + Sound to DB +SDCategory: Utgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "def_utgarde_keep.h" + +#define YELL_SKARVALD_AGGRO "Dalronn! See if you can muster the nerve to join my attack!" +#define SOUND_SKARVALD_AGGRO 13229 +#define YELL_DALRONN_AGGRO "By all means, don't assess the situation, you halfwit! Just jump into the fray!" +#define SOUND_DALRONN_AGGRO 13199 + +#define YELL_SKARVALD_KILL "Jarggn olkt!" +#define SOUND_SKARVALD_KILL 13232 +#define YELL_DALRONN_KILL "You may serve me yet." +#define SOUND_DALRONN_KILL 13202 + +#define YELL_DALRONN_DAL_DIEDFIRST "See... you... soon." +#define SOUND_DALRONN_DAL_DIEDFIRST 13200 +#define YELL_SKARVALD_DAL_DIEDFIRST "Pagh! What sort of necromancer lets death stop him? I knew you were worthless!" +#define SOUND_SKARVALD_DAL_DIEDFIRST 13233 +#define YELL_SKARVALD_DAL_DIED "A warrior's death." +#define SOUND_SKARVALD_DAL_DIED 13231 + +#define YELL_SKARVALD_SKA_DIEDFIRST "Not... over... yet." +#define SOUND_SKARVALD_SKA_DIEDFIRST 13230 +#define YELL_DALRONN_SKA_DIEDFIRST "Skarvald, you incompetent slug! Return and make yourself useful!" +#define SOUND_DALRONN_SKA_DIEDFIRST 13203 +#define YELL_DALRONN_SKA_DIED "There's no... greater... glory." +#define SOUND_DALRONN_SKA_DIED 13201 + +//Spells of Skarvald and his Ghost +#define MOB_SKARVALD_THE_CONSTRUCTOR 24200 +#define SPELL_CHARGE 43651 +#define SPELL_STONE_STRIKE 48583 +#define SPELL_SUMMON_SKARVALD_GHOST 48613 +#define MOB_SKARVALD_GHOST 27390 +//Spells of Dalronn and his Ghost +#define MOB_DALRONN_THE_CONTROLLER 24201 +#define SPELL_SHADOW_BOLT 43649 +#define H_SPELL_SHADOW_BOLT 59575 +#define H_SPELL_SUMMON_SKELETONS 52611 +#define SPELL_DEBILITATE 43650 +#define SPELL_SUMMON_DALRONN_GHOST 48612 +#define MOB_DALRONN_GHOST 27389 + +struct TRINITY_DLL_DECL boss_skarvald_the_constructorAI : public ScriptedAI +{ + boss_skarvald_the_constructorAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = m_creature->GetMap()->IsHeroic(); + } + + ScriptedInstance* pInstance; + + bool ghost; + bool HeroicMode; + uint32 Charge_Timer; + uint32 StoneStrike_Timer; + uint32 Response_Timer; + uint32 Check_Timer; + bool Dalronn_isDead; + + void Reset() + { + Charge_Timer = 5000; + StoneStrike_Timer = 10000; + Dalronn_isDead = false; + Check_Timer = 5000; + + ghost = (m_creature->GetEntry() == MOB_SKARVALD_GHOST); + if(!ghost) + { + Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN)); + if(dalronn && dalronn->isDead()) + ((Creature*)dalronn)->Respawn(); + + if(pInstance) + pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, NOT_STARTED); + } + } + + void Aggro(Unit *who) + { + if(!ghost) + { + DoYell(YELL_SKARVALD_AGGRO,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_SKARVALD_AGGRO); + + Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN)); + if(dalronn && dalronn->isAlive() && !dalronn->getVictim()) + dalronn->getThreatManager().addThreat(who,0.0f); + + if(pInstance) + pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, IN_PROGRESS); + } + } + + void JustDied(Unit* Killer) + { + if(!ghost) + { + Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN)); + if(dalronn) + { + if(dalronn->isDead()) + { + DoYell(YELL_SKARVALD_DAL_DIED,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_SKARVALD_DAL_DIED); + + if(pInstance) + pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE); + } + else + { + DoYell(YELL_SKARVALD_SKA_DIEDFIRST,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_SKARVALD_SKA_DIEDFIRST); + + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + //DoCast(m_creature,SPELL_SUMMON_SKARVALD_GHOST,true); + Creature* temp = m_creature->SummonCreature(MOB_SKARVALD_GHOST,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),0,TEMPSUMMON_CORPSE_DESPAWN,5000); + temp->AI()->AttackStart(Killer); + } + } + } + } + + void KilledUnit(Unit *victim) + { + if(!ghost) + { + DoYell(YELL_SKARVALD_KILL,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_SKARVALD_KILL); + } + } + + void UpdateAI(const uint32 diff) + { + if(ghost) + { + if(pInstance->GetData(DATA_SKARVALD_DALRONN_EVENT) != IN_PROGRESS) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + if(!UpdateVictim()) + return; + + if(!ghost) + { + if(Check_Timer) + if(Check_Timer < diff) + { + Check_Timer = 5000; + Unit* dalronn = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_DALRONN)); + if(dalronn && dalronn->isDead()) + { + Dalronn_isDead = true; + Response_Timer = 2000; + Check_Timer = 0; + } + }else Check_Timer -= diff; + + if(Response_Timer) + if(Dalronn_isDead) + if(Response_Timer < diff) + { + DoYell(YELL_SKARVALD_DAL_DIEDFIRST,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_SKARVALD_DAL_DIEDFIRST); + + Response_Timer = 0; + }else Response_Timer -= diff; + } + + if(Charge_Timer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 1), SPELL_CHARGE); + Charge_Timer = 5000+rand()%5000; + }else Charge_Timer -= diff; + + if(StoneStrike_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_STONE_STRIKE); + StoneStrike_Timer = 5000+rand()%5000; + }else StoneStrike_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_skarvald_the_constructor(Creature *_Creature) +{ + return new boss_skarvald_the_constructorAI (_Creature); +} + +struct TRINITY_DLL_DECL boss_dalronn_the_controllerAI : public ScriptedAI +{ + boss_dalronn_the_controllerAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + HeroicMode = m_creature->GetMap()->IsHeroic(); + } + + ScriptedInstance* pInstance; + + bool ghost; + bool HeroicMode; + uint32 ShadowBolt_Timer; + uint32 Debilitate_Timer; + uint32 Summon_Timer; + + uint32 Response_Timer; + uint32 Check_Timer; + uint32 AggroYell_Timer; + bool Skarvald_isDead; + + + void Reset() + { + ShadowBolt_Timer = 1000; + Debilitate_Timer = 5000; + Summon_Timer = 10000; + Check_Timer = 5000; + Skarvald_isDead = false; + AggroYell_Timer = 0; + + ghost = m_creature->GetEntry() == MOB_DALRONN_GHOST; + if(!ghost) + { + Unit* skarvald = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SKARVALD)); + if(skarvald && skarvald->isDead()) + ((Creature*)skarvald)->Respawn(); + + if(pInstance) + pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, NOT_STARTED); + } + } + + void Aggro(Unit *who) + { + if(!ghost) + { + Unit* skarvald = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SKARVALD)); + if(skarvald && skarvald->isAlive() && !skarvald->getVictim()) + skarvald->getThreatManager().addThreat(who,0.0f); + + AggroYell_Timer = 5000; + + if(pInstance) + pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, IN_PROGRESS); + } + } + + void JustDied(Unit* Killer) + { + if(!ghost) + { + Unit* skarvald = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SKARVALD)); + if(skarvald) + if(skarvald->isDead()) + { + DoYell(YELL_DALRONN_SKA_DIED,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_DALRONN_SKA_DIED); + + if(pInstance) + pInstance->SetData(DATA_SKARVALD_DALRONN_EVENT, DONE); + } + else + { + DoYell(YELL_DALRONN_DAL_DIEDFIRST,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_DALRONN_DAL_DIEDFIRST); + + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + //DoCast(m_creature,SPELL_SUMMON_DALRONN_GHOST,true); + Creature* temp = m_creature->SummonCreature(MOB_DALRONN_GHOST,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),0,TEMPSUMMON_CORPSE_DESPAWN,5000); + temp->AI()->AttackStart(Killer); + } + } + } + + void KilledUnit(Unit *victim) + { + if(!ghost) + { + DoYell(YELL_DALRONN_KILL,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_DALRONN_KILL); + } + } + + void UpdateAI(const uint32 diff) + { + if(ghost) + { + if(pInstance->GetData(DATA_SKARVALD_DALRONN_EVENT) != IN_PROGRESS) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + if(!UpdateVictim()) + return; + + if(AggroYell_Timer) + if(AggroYell_Timer < diff) + { + DoYell(YELL_DALRONN_AGGRO,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_DALRONN_AGGRO); + + AggroYell_Timer = 0; + }else AggroYell_Timer -= diff; + + if(!ghost) + { + if(Check_Timer) + if(Check_Timer < diff) + { + Check_Timer = 5000; + Unit* skarvald = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SKARVALD)); + if(skarvald && skarvald->isDead()) + { + Skarvald_isDead = true; + Response_Timer = 2000; + Check_Timer = 0; + } + }else Check_Timer -= diff; + + if(Response_Timer) + if(Skarvald_isDead) + if(Response_Timer < diff) + { + DoYell(YELL_DALRONN_SKA_DIEDFIRST,LANG_UNIVERSAL,NULL); + DoPlaySoundToSet(m_creature,SOUND_DALRONN_SKA_DIEDFIRST); + + Response_Timer = 0; + }else Response_Timer -= diff; + } + + if(ShadowBolt_Timer < diff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0),HeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + ShadowBolt_Timer = 1000; + } + }else ShadowBolt_Timer -= diff; + + if(Debilitate_Timer < diff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0),SPELL_DEBILITATE); + Debilitate_Timer = 5000+rand()%5000; + } + }else Debilitate_Timer -= diff; + + if(HeroicMode) + if(Summon_Timer < diff) + { + DoCast(m_creature,H_SPELL_SUMMON_SKELETONS); + Summon_Timer = (rand()%10000) + 20000; + }else Summon_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_dalronn_the_controller(Creature *_Creature) +{ + return new boss_dalronn_the_controllerAI (_Creature); +} + +void AddSC_boss_skarvald_dalronn() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_skarvald_the_constructor"; + newscript->GetAI = &GetAI_boss_skarvald_the_constructor; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="boss_dalronn_the_controller"; + newscript->GetAI = &GetAI_boss_dalronn_the_controller; + newscript->RegisterSelf(); +}
\ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/def_utgarde_keep.h b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/def_utgarde_keep.h new file mode 100644 index 00000000000..ec416e5729a --- /dev/null +++ b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/def_utgarde_keep.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DEF_UTGARDE_KEEP_H +#define DEF_UTGARDE_KEEP_H + +#define DATA_PRINCEKELESETH 1 +#define DATA_SKARVALD 3 +#define DATA_DALRONN 4 +#define DATA_INGVAR 6 + +#define DATA_PRINCEKELESETH_EVENT 2 +#define DATA_SKARVALD_DALRONN_EVENT 5 +#define DATA_INGVAR_EVENT 7 + +#endif diff --git a/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp new file mode 100644 index 00000000000..e0e243cbed9 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -0,0 +1,231 @@ +/* + * Copyright (C) 2009 Trinity <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Utgarde_Keep +SD%Complete: 90 +SDComment: Instance Data Scripts and functions to acquire mobs and set encounter status for use in various Utgarde Keep Scripts +SDCategory: Utgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "def_utgarde_keep.h" + +#define ENCOUNTERS 3 + +/* Utgarde Keep encounters: +0 - Prince Keleseth +1 - Skarvald Dalronn +2 - Ingvar the Plunderer +*/ + +struct TRINITY_DLL_DECL instance_utgarde_keep : public ScriptedInstance +{ + instance_utgarde_keep(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint64 Keleseth; + uint64 Skarvald; + uint64 Dalronn; + uint64 Ingvar; + + uint32 Encounters[ENCOUNTERS]; + std::string str_data; + + void Initialize() + { + Keleseth = 0; + Skarvald = 0; + Dalronn =0; + Ingvar =0; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + Encounters[i] = NOT_STARTED; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if(Encounters[i] == IN_PROGRESS) return true; + + return false; + } + + 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("TSCR: Instance Utgarde Keep: GetPlayerInMap, but PlayerList is empty!"); + return NULL; + } + + void HandleGameObject(uint64 guid, uint32 state) + { + Player *player = GetPlayerInMap(); + + if (!player || !guid) + { + debug_log("TSCR: Utgarde Keep: HandleGameObject fail"); + return; + } + + if (GameObject *go = GameObject::GetGameObject(*player,guid)) + go->SetGoState(state); + } + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature_entry) + { + case 23953: Keleseth = creature->GetGUID(); break; + case 24201: Dalronn = creature->GetGUID(); break; + case 24200: Skarvald = creature->GetGUID(); break; + case 23954: Ingvar = creature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* go) + { + //switch(go->GetEntry()) + //{ + //door and object id + //} + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_PRINCEKELESETH: return Keleseth; + case DATA_DALRONN: return Dalronn; + case DATA_SKARVALD: return Skarvald; + case DATA_INGVAR: return Ingvar; + } + + return 0; + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_PRINCEKELESETH_EVENT: + if(data == DONE) + { + //HandleGameObject(doorname, 0); + } + Encounters[0] = data;break; + case DATA_SKARVALD_DALRONN_EVENT: + if(data == DONE) + { + //HandleGameObject(doorname, 0); + } + Encounters[1] = data; break; + case DATA_INGVAR_EVENT: + if(data == DONE) + { + //HandleGameObject(doorname, 0); + } + Encounters[2] = data; break; + } + + if (data == DONE) + { + SaveToDB(); + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_PRINCEKELESETH_EVENT: return Encounters[0]; + case DATA_SKARVALD_DALRONN_EVENT: return Encounters[1]; + case DATA_INGVAR_EVENT: return Encounters[2]; + } + + return 0; + } + + const char* Save() + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << "U K " << Encounters[0] << " " << Encounters[1] << " " + << Encounters[2]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0,data1,data2; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2; + + if( dataHead1 == 'U' && dataHead2 == 'K') + { + Encounters[0] = data0; + Encounters[1] = data1; + Encounters[2] = data2; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounters[i] == IN_PROGRESS) + Encounters[i] = NOT_STARTED; + + }else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_utgarde_keep(Map* map) +{ + return new instance_utgarde_keep(map); +} + +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/src/bindings/scripts/scripts/zone/wailing_caverns/instance_wailing_caverns.cpp b/src/bindings/scripts/scripts/zone/wailing_caverns/instance_wailing_caverns.cpp index 9aaa32725c1..5327bf7041d 100644 --- a/src/bindings/scripts/scripts/zone/wailing_caverns/instance_wailing_caverns.cpp +++ b/src/bindings/scripts/scripts/zone/wailing_caverns/instance_wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp b/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp index 3019331ea05..70033f7c97b 100644 --- a/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp +++ b/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp index f9ee7b252af..fe83eb68bb9 100644 --- a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp +++ b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -38,7 +38,10 @@ EndContentData */ struct TRINITY_DLL_DECL npc_defias_traitorAI : public npc_escortAI { - npc_defias_traitorAI(Creature *c) : npc_escortAI(c) {} + npc_defias_traitorAI(Creature *c) : npc_escortAI(c) + { + IsWalking = false; + } bool IsWalking; diff --git a/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp b/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp index 1986d2c1b27..db6555d058f 100644 --- a/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp +++ b/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp index 797b80f4212..3d7481544e8 100644 --- a/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp +++ b/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp index ea832370ea3..704cadb0bcd 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp @@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI { Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(m_creature, m_creature, 999); - Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(tempUnitMap, u_check); + Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(m_creature, tempUnitMap, u_check); TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher); TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher); diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp index 6e7311d8917..b9601764d1b 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp index 3381ef889d7..3014394976e 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp @@ -235,8 +235,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI SpawnAdds(); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 46916); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, 50268674); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 46916); m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); } diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp index c5db3ddd8fd..6556672dfdf 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -238,7 +238,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI cell.SetNoCreate(); Trinity::AllCreaturesOfEntryInRange check(m_creature, MOB_EGG, 100); - Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(templist, check); + Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(m_creature, templist, check); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher); @@ -273,7 +273,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI cell.SetNoCreate(); Trinity::AllCreaturesOfEntryInRange check(m_creature, MOB_FIRE_BOMB, 100); - Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(templist, check); + Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(m_creature, templist, check); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher); @@ -397,7 +397,7 @@ struct TRINITY_DLL_DECL boss_janalaiAI : public ScriptedAI m_creature->AttackStop(); m_creature->GetMotionMaster()->Clear(); - DoTeleportTo(JanalainPos[0][0],JanalainPos[0][1],JanalainPos[0][2]); + DoTeleportTo(JanalainPos[0][0],JanalainPos[0][1],JanalainPos[0][2]); m_creature->StopMoving(); m_creature->CastSpell(m_creature, SPELL_HATCH_ALL, false); HatchAllEggs(2); @@ -514,7 +514,7 @@ struct TRINITY_DLL_DECL mob_amanishi_hatcherAI : public ScriptedAI cell.SetNoCreate(); Trinity::AllCreaturesOfEntryInRange check(m_creature, 23817, 50); - Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(templist, check); + Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(m_creature, templist, check); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher); diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp index 75d08661834..0212e4005f5 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -142,7 +142,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI Berserk_Timer = 600000; inBearForm = false; - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY + 1, 5122); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 5122); } void SendAttacker(Unit* target) @@ -158,7 +158,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI cell.SetNoCreate(); Trinity::AllFriendlyCreaturesInGrid check(m_creature); - Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> searcher(templist, check); + Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> searcher(m_creature, templist, check); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> cSearcher(searcher); @@ -360,7 +360,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI { if(inBearForm) { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY + 1, 5122); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 5122); DoYell(YELL_SHIFTEDTOTROLL, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(m_creature, SOUND_YELL_TOTROLL); m_creature->RemoveAurasDueToSpell(SPELL_BEARFORM); @@ -372,7 +372,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI } else { - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY + 1, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 0); DoYell(YELL_SHIFTEDTOBEAR, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(m_creature, SOUND_YELL_TOBEAR); DoCast(m_creature, SPELL_BEARFORM, true); @@ -394,7 +394,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI if(Mangle_Timer < diff) { - if(m_creature->getVictim() && !m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT, 0)) + if(m_creature->getVictim() && !m_creature->getVictim()->HasAura(SPELL_MANGLEEFFECT)) { DoCast(m_creature->getVictim(), SPELL_MANGLE); Mangle_Timer = 1000; @@ -406,7 +406,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI { DoYell(YELL_SURGE, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(m_creature, SOUND_YELL_SURGE); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRange(SPELL_SURGE), true); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRangeForHostile(SPELL_SURGE), true); DoCast(target, SPELL_SURGE); Surge_Timer = 15000 + rand()%5000; }else Surge_Timer -= diff; diff --git a/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp b/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp index cf319c8f063..4150e0ec393 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp @@ -206,9 +206,9 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI Summons.DespawnAll(); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 47174); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, 218172674); - m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 47174); + //m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, 218172674); + //m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); } void Aggro(Unit *who) @@ -252,7 +252,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI Summons.DespawnEntry(CREATURE_COLUMN_OF_FIRE); if(Unit *Temp = Unit::GetUnit(*m_creature, SpiritGUID[3])) - Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD); + Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD); } void AttackStart(Unit *who) @@ -339,7 +339,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI case 4: DoTeleportTo(CENTER_X, CENTER_Y, CENTER_Z, 100); DoResetThreat(); - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); m_creature->RemoveAurasDueToSpell(Transform[Phase].unaura); DoCast(m_creature, Transform[Phase].spell); DoYell(Transform[Phase].text, LANG_UNIVERSAL, NULL); @@ -347,7 +347,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI if(Phase > 0) { if(Unit *Temp = Unit::GetUnit(*m_creature, SpiritGUID[Phase - 1])) - Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,PLAYER_STATE_DEAD); + Temp->SetUInt32Value(UNIT_FIELD_BYTES_1,UNIT_STAND_STATE_DEAD); } if(Unit *Temp = Unit::GetUnit(*m_creature, SpiritGUID[NextPhase - 1])) Temp->CastSpell(m_creature, SPELL_SIPHON_SOUL, false); // should m cast on temp diff --git a/src/bindings/scripts/scripts/zone/zulaman/def_zulaman.h b/src/bindings/scripts/scripts/zone/zulaman/def_zulaman.h index c249cf6b3ec..6fb0ef173bd 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/def_zulaman.h +++ b/src/bindings/scripts/scripts/zone/zulaman/def_zulaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp b/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp index a56cdf3f9a7..2ff8a6e9b8a 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp @@ -1,4 +1,4 @@ - /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -106,7 +106,7 @@ struct TRINITY_DLL_DECL instance_zulaman : public ScriptedInstance void OnCreatureCreate(Creature *creature, uint32 creature_entry) { - switch(creature_entry) + switch(creature->GetEntry()) { case 23578://janalai case 23863://zuljin @@ -140,7 +140,7 @@ struct TRINITY_DLL_DECL instance_zulaman : public ScriptedInstance void OpenDoor(uint64 DoorGUID, bool open) { if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) - Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); + Door->SetGoState(open ? 0 : 1); } void SummonHostage(uint8 num) diff --git a/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp b/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp index ef6d17d9746..a7243ac125d 100644 --- a/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp +++ b/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp b/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp index 3d233037d16..b53855990b3 100644 --- a/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp +++ b/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp index a472fff2076..102fef21467 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp index 7cf15d53416..e5e727b4843 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,7 @@ EndScriptData */ #include "precompiled.h" -#define SPELL_FROSTBREATH 21099 +#define SPELL_FROSTBREATH 16099 #define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon... #define SPELL_SLAM 24326 diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp index 623015acb73..dce2e76e157 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp index 0d490781ec7..592129b88da 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp index efe847045d5..bd341fdaf40 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp index aecc2f450db..62a057dc2cb 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp index 100d8881127..4ea62662ef9 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -54,10 +54,6 @@ struct TRINITY_DLL_DECL boss_jindoAI : public ScriptedAI uint32 Delusions_Timer; uint32 Teleport_Timer; - Creature *Shade; - Creature *Skeletons; - Creature *HealingWard; - void Reset() { BrainWashTotem_Timer = 20000; @@ -88,7 +84,7 @@ struct TRINITY_DLL_DECL boss_jindoAI : public ScriptedAI if (HealingWard_Timer < diff) { //DoCast(m_creature, SPELL_POWERFULLHEALINGWARD); - HealingWard = m_creature->SummonCreature(14987, m_creature->GetPositionX()+3, m_creature->GetPositionY()-2, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,30000); + m_creature->SummonCreature(14987, m_creature->GetPositionX()+3, m_creature->GetPositionY()-2, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,30000); HealingWard_Timer = 14000 + rand()%6000; }else HealingWard_Timer -= diff; @@ -110,7 +106,8 @@ struct TRINITY_DLL_DECL boss_jindoAI : public ScriptedAI { DoCast(target, SPELL_DELUSIONSOFJINDO); - Shade = m_creature->SummonCreature(14986, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + 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); } @@ -129,23 +126,33 @@ struct TRINITY_DLL_DECL boss_jindoAI : public ScriptedAI if(DoGetThreat(m_creature->getVictim())) DoModifyThreatPercent(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); } diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp index 87939596324..7ad5be3fefd 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp index 69588bdfbb8..44606438a02 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp index 1b01afd9aa1..42742437fec 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -65,9 +65,9 @@ struct TRINITY_DLL_DECL boss_renatakiAI : public ScriptedAI if (Invisible_Timer < diff) { m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); - 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->SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_ID, 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; @@ -99,9 +99,9 @@ struct TRINITY_DLL_DECL boss_renatakiAI : public ScriptedAI m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15268); 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->SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_ID, 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; diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp index 36e9fd9c84d..7a753dc9e01 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -118,7 +118,7 @@ struct TRINITY_DLL_DECL boss_thekalAI : public ScriptedAI { //Resurrect LorKhan Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN)); - pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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)); @@ -128,7 +128,7 @@ struct TRINITY_DLL_DECL boss_thekalAI : public ScriptedAI { //Resurrect Zath Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH)); - pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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)); @@ -153,7 +153,7 @@ struct TRINITY_DLL_DECL boss_thekalAI : public ScriptedAI if (!PhaseTwo && !WasDead && m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.05) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 3); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); m_creature->AttackStop(); if(pInstance) @@ -169,7 +169,7 @@ struct TRINITY_DLL_DECL boss_thekalAI : public ScriptedAI { DoCast(m_creature,SPELL_TIGER_FORM); m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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(); @@ -328,7 +328,7 @@ struct TRINITY_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI { //Resurrect Thekal Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL)); - pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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)); @@ -338,7 +338,7 @@ struct TRINITY_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI { //Resurrect Zath Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH)); - pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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)); @@ -351,7 +351,7 @@ struct TRINITY_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI if (m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.05) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 3); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); m_creature->setFaction(35); m_creature->AttackStop(); @@ -398,7 +398,7 @@ struct TRINITY_DLL_DECL mob_zealot_zathAI : public ScriptedAI if(pInstance) pInstance->SetData(DATA_ZATH_ALIVE, 0); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -459,7 +459,7 @@ struct TRINITY_DLL_DECL mob_zealot_zathAI : public ScriptedAI { //Resurrect LorKhan Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN)); - pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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)); @@ -469,7 +469,7 @@ struct TRINITY_DLL_DECL mob_zealot_zathAI : public ScriptedAI { //Resurrect Thekal Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL)); - pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + 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)); @@ -482,7 +482,7 @@ struct TRINITY_DLL_DECL mob_zealot_zathAI : public ScriptedAI if (m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.05) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 3); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); m_creature->setFaction(35); m_creature->AttackStop(); diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp index 29c79a28187..1dff6b63dbe 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp b/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp index c69e2c6204e..1776dfc5868 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/scripts/zone/zulgurub/def_zulgurub.h b/src/bindings/scripts/scripts/zone/zulgurub/def_zulgurub.h index fd1c905048e..f14bd8eca98 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/def_zulgurub.h +++ b/src/bindings/scripts/scripts/zone/zulgurub/def_zulgurub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp b/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp index a49ff110b2d..eb3cbd1d495 100644 --- a/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp +++ b/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/src/bindings/scripts/system.cpp b/src/bindings/scripts/system.cpp index 893e476e2fd..ab62e530681 100644 --- a/src/bindings/scripts/system.cpp +++ b/src/bindings/scripts/system.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * - * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> + * Thanks to the original authors: MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by |
