aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp104
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp44
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h)20
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp138
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp)2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp (renamed from src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp)14
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp (renamed from src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp (renamed from src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp)0
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h (renamed from src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h)0
-rw-r--r--src/server/scripts/EasternKingdoms/CMakeLists.txt103
-rw-r--r--src/server/scripts/Examples/example_spell.cpp4
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp18
-rw-r--r--src/server/scripts/Kalimdor/zone_durotar.cpp8
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp6
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h8
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp99
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp365
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h16
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp39
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp1354
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h11
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp113
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp19
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp6
-rw-r--r--src/server/scripts/Northrend/Naxxramas/naxxramas.h1
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp8
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp7
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp13
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp6
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp56
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp172
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp138
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp46
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp95
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h21
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp2
-rw-r--r--src/server/scripts/Outland/CMakeLists.txt1
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp2
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp6
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp31
-rw-r--r--src/server/scripts/Spells/spell_item.cpp22
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp92
-rw-r--r--src/server/scripts/World/achievement_scripts.cpp106
-rw-r--r--src/server/scripts/World/npcs_special.cpp2
92 files changed, 2521 insertions, 805 deletions
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 939075690c9..f708acc3dee 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -41,7 +41,7 @@ struct NpcFlagText
#define NPCFLAG_COUNT 24
-const NpcFlagText npcFlagTexts[NPCFLAG_COUNT] =
+NpcFlagText const npcFlagTexts[NPCFLAG_COUNT] =
{
{ UNIT_NPC_FLAG_AUCTIONEER, LANG_NPCINFO_AUCTIONEER },
{ UNIT_NPC_FLAG_BANKER, LANG_NPCINFO_BANKER },
@@ -69,6 +69,91 @@ const NpcFlagText npcFlagTexts[NPCFLAG_COUNT] =
{ UNIT_NPC_FLAG_VENDOR_REAGENT, LANG_NPCINFO_VENDOR_REAGENT }
};
+struct MechanicImmune
+{
+ uint32 flag;
+ char const* text;
+};
+
+MechanicImmune const mechanicImmunes[MAX_MECHANIC] =
+{
+ { MECHANIC_NONE , "MECHANIC_NONE" },
+ { MECHANIC_CHARM , "MECHANIC_CHARM" },
+ { MECHANIC_DISORIENTED , "MECHANIC_DISORIENTED" },
+ { MECHANIC_DISARM , "MECHANIC_DISARM" },
+ { MECHANIC_DISTRACT , "MECHANIC_DISTRACT" },
+ { MECHANIC_FEAR , "MECHANIC_FEAR" },
+ { MECHANIC_GRIP , "MECHANIC_GRIP" },
+ { MECHANIC_ROOT , "MECHANIC_ROOT" },
+ { MECHANIC_SLOW_ATTACK , "MECHANIC_SLOW_ATTACK" },
+ { MECHANIC_SILENCE , "MECHANIC_SILENCE" },
+ { MECHANIC_SLEEP , "MECHANIC_SLEEP" },
+ { MECHANIC_SNARE , "MECHANIC_SNARE" },
+ { MECHANIC_STUN , "MECHANIC_STUN" },
+ { MECHANIC_FREEZE , "MECHANIC_FREEZE" },
+ { MECHANIC_KNOCKOUT , "MECHANIC_KNOCKOUT" },
+ { MECHANIC_BLEED , "MECHANIC_BLEED" },
+ { MECHANIC_BANDAGE , "MECHANIC_BANDAGE" },
+ { MECHANIC_POLYMORPH , "MECHANIC_POLYMORPH" },
+ { MECHANIC_BANISH , "MECHANIC_BANISH" },
+ { MECHANIC_SHIELD , "MECHANIC_SHIELD" },
+ { MECHANIC_SHACKLE , "MECHANIC_SHACKLE" },
+ { MECHANIC_MOUNT , "MECHANIC_MOUNT" },
+ { MECHANIC_INFECTED , "MECHANIC_INFECTED" },
+ { MECHANIC_TURN , "MECHANIC_TURN" },
+ { MECHANIC_HORROR , "MECHANIC_HORROR" },
+ { MECHANIC_INVULNERABILITY , "MECHANIC_INVULNERABILITY" },
+ { MECHANIC_INTERRUPT , "MECHANIC_INTERRUPT" },
+ { MECHANIC_DAZE , "MECHANIC_DAZE" },
+ { MECHANIC_DISCOVERY , "MECHANIC_DISCOVERY" },
+ { MECHANIC_IMMUNE_SHIELD , "MECHANIC_IMMUNE_SHIELD" },
+ { MECHANIC_SAPPED , "MECHANIC_SAPPED" },
+ { MECHANIC_ENRAGED , "MECHANIC_ENRAGED" }
+};
+
+
+struct UnitFlag
+{
+ uint32 flag;
+ char const* text;
+};
+
+UnitFlag const unitFlags[MAX_UNIT_FLAGS] =
+{
+ { UNIT_FLAG_SERVER_CONTROLLED , "UNIT_FLAG_SERVER_CONTROLLED" },
+ { UNIT_FLAG_NON_ATTACKABLE , "UNIT_FLAG_NON_ATTACKABLE" },
+ { UNIT_FLAG_DISABLE_MOVE , "UNIT_FLAG_DISABLE_MOVE" },
+ { UNIT_FLAG_PVP_ATTACKABLE , "UNIT_FLAG_PVP_ATTACKABLE" },
+ { UNIT_FLAG_RENAME , "UNIT_FLAG_RENAME" },
+ { UNIT_FLAG_PREPARATION , "UNIT_FLAG_PREPARATION" },
+ { UNIT_FLAG_UNK_6 , "UNIT_FLAG_UNK_6" },
+ { UNIT_FLAG_NOT_ATTACKABLE_1 , "UNIT_FLAG_NOT_ATTACKABLE_1" },
+ { UNIT_FLAG_IMMUNE_TO_PC , "UNIT_FLAG_IMMUNE_TO_PC" },
+ { UNIT_FLAG_IMMUNE_TO_NPC , "UNIT_FLAG_IMMUNE_TO_NPC" },
+ { UNIT_FLAG_LOOTING , "UNIT_FLAG_LOOTING" },
+ { UNIT_FLAG_PET_IN_COMBAT , "UNIT_FLAG_PET_IN_COMBAT" },
+ { UNIT_FLAG_PVP , "UNIT_FLAG_PVP" },
+ { UNIT_FLAG_SILENCED , "UNIT_FLAG_SILENCED" },
+ { UNIT_FLAG_UNK_14 , "UNIT_FLAG_UNK_14" },
+ { UNIT_FLAG_UNK_15 , "UNIT_FLAG_UNK_15" },
+ { UNIT_FLAG_UNK_16 , "UNIT_FLAG_UNK_16" },
+ { UNIT_FLAG_PACIFIED , "UNIT_FLAG_PACIFIED" },
+ { UNIT_FLAG_STUNNED , "UNIT_FLAG_STUNNED" },
+ { UNIT_FLAG_IN_COMBAT , "UNIT_FLAG_IN_COMBAT" },
+ { UNIT_FLAG_TAXI_FLIGHT , "UNIT_FLAG_TAXI_FLIGHT" },
+ { UNIT_FLAG_DISARMED , "UNIT_FLAG_DISARMED" },
+ { UNIT_FLAG_CONFUSED , "UNIT_FLAG_CONFUSED" },
+ { UNIT_FLAG_FLEEING , "UNIT_FLAG_FLEEING" },
+ { UNIT_FLAG_PLAYER_CONTROLLED , "UNIT_FLAG_PLAYER_CONTROLLED" },
+ { UNIT_FLAG_NOT_SELECTABLE , "UNIT_FLAG_NOT_SELECTABLE" },
+ { UNIT_FLAG_SKINNABLE , "UNIT_FLAG_SKINNABLE" },
+ { UNIT_FLAG_MOUNT , "UNIT_FLAG_MOUNT" },
+ { UNIT_FLAG_UNK_28 , "UNIT_FLAG_UNK_28" },
+ { UNIT_FLAG_UNK_29 , "UNIT_FLAG_UNK_29" },
+ { UNIT_FLAG_SHEATHE , "UNIT_FLAG_SHEATHE" },
+ { UNIT_FLAG_UNK_31 , "UNIT_FLAG_UNK_31" }
+};
+
class npc_commandscript : public CommandScript
{
public:
@@ -630,12 +715,14 @@ public:
return false;
}
+ CreatureTemplate const* cInfo = target->GetCreatureTemplate();
+
uint32 faction = target->getFaction();
uint32 npcflags = target->GetUInt32Value(UNIT_NPC_FLAGS);
+ uint32 mechanicImmuneMask = cInfo->MechanicImmuneMask;
uint32 displayid = target->GetDisplayId();
uint32 nativeid = target->GetNativeDisplayId();
uint32 Entry = target->GetEntry();
- CreatureTemplate const* cInfo = target->GetCreatureTemplate();
int64 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
if (curRespawnDelay < 0)
@@ -647,7 +734,13 @@ public:
handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel());
handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId());
handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
- handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS), target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction());
+
+ handler->PSendSysMessage(LANG_NPCINFO_UNIT_FIELD_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS));
+ for (uint8 i = 0; i < MAX_UNIT_FLAGS; ++i)
+ if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & unitFlags[i].flag)
+ handler->PSendSysMessage(unitFlags[i].text, unitFlags[i].flag);
+
+ handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction());
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid, cInfo->pickpocketLootId, cInfo->SkinLootId);
handler->PSendSysMessage(LANG_NPCINFO_DUNGEON_ID, target->GetInstanceId());
@@ -660,6 +753,11 @@ public:
if (npcflags & npcFlagTexts[i].flag)
handler->PSendSysMessage(npcFlagTexts[i].text, npcFlagTexts[i].flag);
+ handler->PSendSysMessage(LANG_NPCINFO_MECHANIC_IMMUNE, mechanicImmuneMask);
+ for (uint8 i = 0; i < MAX_MECHANIC; ++i)
+ if ((mechanicImmuneMask << 1) & mechanicImmunes[i].flag)
+ handler->PSendSysMessage(mechanicImmunes[i].text, mechanicImmunes[i].flag);
+
return true;
}
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 5351f3edda0..829152b7fa7 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -82,11 +82,11 @@ public:
{ "creature_text", SEC_ADMINISTRATOR, true, &HandleReloadCreatureText, "", NULL },
{ "creature_ai_scripts", SEC_ADMINISTRATOR, true, &HandleReloadEventAIScriptsCommand, "", NULL },
{ "creature_ai_texts", SEC_ADMINISTRATOR, true, &HandleReloadEventAITextsCommand, "", NULL },
- { "creature_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestInvRelationsCommand, "", NULL },
+ { "creature_questender", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestEnderCommand, "", NULL },
{ "creature_linked_respawn", SEC_GAMEMASTER, true, &HandleReloadLinkedRespawnCommand, "", NULL },
{ "creature_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesCreatureCommand, "", NULL },
{ "creature_onkill_reputation", SEC_ADMINISTRATOR, true, &HandleReloadOnKillReputationCommand, "", NULL },
- { "creature_questrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestRelationsCommand, "", NULL },
+ { "creature_queststarter", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestStarterCommand, "", NULL },
{ "creature_summon_groups", SEC_ADMINISTRATOR, true, &HandleReloadCreatureSummonGroupsCommand, "", NULL },
{ "creature_template", SEC_ADMINISTRATOR, true, &HandleReloadCreatureTemplateCommand, "", NULL },
//{ "db_script_string", SEC_ADMINISTRATOR, true, &HandleReloadDbScriptStringCommand, "", NULL },
@@ -96,9 +96,9 @@ public:
{ "fishing_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesFishingCommand, "", NULL },
{ "game_graveyard_zone", SEC_ADMINISTRATOR, true, &HandleReloadGameGraveyardZoneCommand, "", NULL },
{ "game_tele", SEC_ADMINISTRATOR, true, &HandleReloadGameTeleCommand, "", NULL },
- { "gameobject_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestInvRelationsCommand, "", NULL },
+ { "gameobject_questender", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestEnderCommand, "", NULL },
{ "gameobject_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesGameobjectCommand, "", NULL },
- { "gameobject_questrelation", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestRelationsCommand, "", NULL },
+ { "gameobject_queststarter", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestStarterCommand, "", NULL },
{ "gm_tickets", SEC_ADMINISTRATOR, true, &HandleReloadGMTicketsCommand, "", NULL },
{ "gossip_menu", SEC_ADMINISTRATOR, true, &HandleReloadGossipMenuCommand, "", NULL },
{ "gossip_menu_option", SEC_ADMINISTRATOR, true, &HandleReloadGossipMenuOptionCommand, "", NULL },
@@ -249,8 +249,8 @@ public:
HandleReloadQuestTemplateCommand(handler, "a");
TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Quests Relations...");
- sObjectMgr->LoadQuestRelations();
- handler->SendGlobalGMSysMessage("DB tables `*_questrelation` and `*_involvedrelation` reloaded.");
+ sObjectMgr->LoadQuestStartersAndEnders();
+ handler->SendGlobalGMSysMessage("DB tables `*_queststarter` and `*_questender` reloaded.");
return true;
}
@@ -532,11 +532,11 @@ public:
return true;
}
- static bool HandleReloadCreatureQuestRelationsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleReloadCreatureQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_questrelation`)");
- sObjectMgr->LoadCreatureQuestRelations();
- handler->SendGlobalGMSysMessage("DB table `creature_questrelation` (creature quest givers) reloaded.");
+ TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_queststarter`)");
+ sObjectMgr->LoadCreatureQuestStarters();
+ handler->SendGlobalGMSysMessage("DB table `creature_queststarter` reloaded.");
return true;
}
@@ -548,11 +548,11 @@ public:
return true;
}
- static bool HandleReloadCreatureQuestInvRelationsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleReloadCreatureQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_involvedrelation`)");
- sObjectMgr->LoadCreatureInvolvedRelations();
- handler->SendGlobalGMSysMessage("DB table `creature_involvedrelation` (creature quest takers) reloaded.");
+ TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_questender`)");
+ sObjectMgr->LoadCreatureQuestEnders();
+ handler->SendGlobalGMSysMessage("DB table `creature_questender` reloaded.");
return true;
}
@@ -574,19 +574,19 @@ public:
return true;
}
- static bool HandleReloadGOQuestRelationsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleReloadGOQuestStarterCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_questrelation`)");
- sObjectMgr->LoadGameobjectQuestRelations();
- handler->SendGlobalGMSysMessage("DB table `gameobject_questrelation` (gameobject quest givers) reloaded.");
+ TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_queststarter`)");
+ sObjectMgr->LoadGameobjectQuestStarters();
+ handler->SendGlobalGMSysMessage("DB table `gameobject_queststarter` reloaded.");
return true;
}
- static bool HandleReloadGOQuestInvRelationsCommand(ChatHandler* handler, const char* /*args*/)
+ static bool HandleReloadGOQuestEnderCommand(ChatHandler* handler, const char* /*args*/)
{
- TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_involvedrelation`)");
- sObjectMgr->LoadGameobjectInvolvedRelations();
- handler->SendGlobalGMSysMessage("DB table `gameobject_involvedrelation` (gameobject quest takers) reloaded.");
+ TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_questender`)");
+ sObjectMgr->LoadGameobjectQuestEnders();
+ handler->SendGlobalGMSysMessage("DB table `gameobject_questender` reloaded.");
return true;
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
index e9a6b15dcf8..e9a6b15dcf8 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h
index b279012bbf7..b279012bbf7 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
index 3a4f734429c..3a4f734429c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
index 63a94ca616a..63a94ca616a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
index 25f93a2b6b7..25f93a2b6b7 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
index 80bfa651301..80bfa651301 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
index d79c4d191b6..d79c4d191b6 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
index 504fca44c4c..504fca44c4c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
index 7a98cc321dc..7a98cc321dc 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
index 998e7b17897..998e7b17897 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_magmus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
index 9021649a61e..9021649a61e 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
index 55e6862bda7..55e6862bda7 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
index b9ff40f8285..b9ff40f8285 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h
index 5c34a30912a..e2295521a5b 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h
@@ -18,7 +18,7 @@
#ifndef DEF_BLACKROCK_SPIRE_H
#define DEF_BLACKROCK_SPIRE_H
-uint32 const EncounterCount = 22;
+uint32 const EncounterCount = 23;
#define BRSScriptName "instance_blackrock_spire"
@@ -38,15 +38,16 @@ enum DataTypes
DATA_GYTH = 11,
DATA_THE_BEAST = 12,
DATA_GENERAL_DRAKKISATH = 13,
+ DATA_LORD_VALTHALAK = 14,
// Extra
- DATA_DRAGONSPIRE_ROOM = 14,
- DATA_HALL_RUNE_1 = 15,
- DATA_HALL_RUNE_2 = 16,
- DATA_HALL_RUNE_3 = 17,
- DATA_HALL_RUNE_4 = 18,
- DATA_HALL_RUNE_5 = 19,
- DATA_HALL_RUNE_6 = 20,
- DATA_HALL_RUNE_7 = 21
+ DATA_DRAGONSPIRE_ROOM = 15,
+ DATA_HALL_RUNE_1 = 16,
+ DATA_HALL_RUNE_2 = 17,
+ DATA_HALL_RUNE_3 = 18,
+ DATA_HALL_RUNE_4 = 19,
+ DATA_HALL_RUNE_5 = 20,
+ DATA_HALL_RUNE_6 = 21,
+ DATA_HALL_RUNE_7 = 22
};
enum CreaturesIds
@@ -75,6 +76,7 @@ enum CreaturesIds
enum AdditionalData
{
SPELL_SUMMON_ROOKERY_WHELP = 15745,
+ EVENT_UROK_DOOMHOWL = 4845,
EVENT_PYROGUARD_EMBERSEER = 4884,
AREATRIGGER = 1,
AREATRIGGER_DRAGONSPIRE_HALL = 2046,
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
index 59581204b05..59581204b05 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp
index f1bd81f2e6a..f1bd81f2e6a 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp
index dbc3056b1ff..dbc3056b1ff 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
index 630d6ff2a0d..630d6ff2a0d 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_halycon.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
index 54ed5d44e34..54ed5d44e34 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
new file mode 100644
index 00000000000..b54c8f11f34
--- /dev/null
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "blackrock_spire.h"
+
+enum Spells
+{
+ SPELL_FRENZY = 8269,
+ SPELL_SUMMON_SPECTRAL_ASSASSIN = 27249,
+ SPELL_SHADOW_BOLT_VOLLEY = 27382,
+ SPELL_SHADOW_WRATH = 27286
+};
+
+enum Says
+{
+ EMOTE_FRENZY = 0
+};
+
+enum Events
+{
+ EVENT_SUMMON_SPECTRAL_ASSASSIN = 1,
+ EVENT_SHADOW_BOLT_VOLLEY = 2,
+ EVENT_SHADOW_WRATH = 3
+};
+
+class boss_lord_valthalak : public CreatureScript
+{
+public:
+ boss_lord_valthalak() : CreatureScript("boss_lord_valthalak") { }
+
+ struct boss_lord_valthalakAI : public BossAI
+ {
+ boss_lord_valthalakAI(Creature* creature) : BossAI(creature, DATA_LORD_VALTHALAK) {}
+
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ frenzy40 = false;
+ frenzy15 = false;
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ events.ScheduleEvent(EVENT_SUMMON_SPECTRAL_ASSASSIN, urand(6000,8000));
+ events.ScheduleEvent(EVENT_SHADOW_WRATH, urand(9000,18000));
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (instance)
+ instance->SetData(DATA_LORD_VALTHALAK, DONE);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_SUMMON_SPECTRAL_ASSASSIN:
+ DoCast(me, SPELL_SUMMON_SPECTRAL_ASSASSIN);
+ events.ScheduleEvent(EVENT_SUMMON_SPECTRAL_ASSASSIN, urand(30000,35000));
+ break;
+ case EVENT_SHADOW_BOLT_VOLLEY:
+ DoCastVictim(SPELL_SHADOW_BOLT_VOLLEY);
+ events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, urand(4000,6000));
+ break;
+ case EVENT_SHADOW_WRATH:
+ DoCastVictim(SPELL_SHADOW_WRATH);
+ events.ScheduleEvent(EVENT_SHADOW_WRATH, urand(19000,24000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!frenzy40)
+ {
+ if (HealthBelowPct(40))
+ {
+ DoCast(me, SPELL_FRENZY);
+ events.CancelEvent(EVENT_SUMMON_SPECTRAL_ASSASSIN);
+ frenzy40 = true;
+ }
+ }
+
+ if (!frenzy15)
+ {
+ if (HealthBelowPct(15))
+ {
+ DoCast(me, SPELL_FRENZY);
+ events.ScheduleEvent(EVENT_SHADOW_BOLT_VOLLEY, urand(7000,14000));
+ frenzy15 = true;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+ private:
+ bool frenzy40;
+ bool frenzy15;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_lord_valthalakAI(creature);
+ }
+};
+
+void AddSC_boss_lord_valthalak()
+{
+ new boss_lord_valthalak();
+}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp
index 608cb75bbb2..608cb75bbb2 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
index 2b68b640720..2b68b640720 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
index b84be2feb17..57c3dfac7ff 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
@@ -227,7 +227,7 @@ public:
{
creatureList->Respawn();
}
- creatureList->AI()->SetData(1, 2);
+ creatureList->AI()->SetData(1, 1);
}
me->AddAura(SPELL_ENCAGED_EMBERSEER, me);
instance->SetBossState(DATA_PYROGAURD_EMBERSEER, NOT_STARTED);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
index a20822839e6..a20822839e6 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
index 275b3802764..275b3802764 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
index 1936e5e72d0..1936e5e72d0 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
index c4abaac158c..c4abaac158c 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
index afee357aad5..afee357aad5 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
index e3423fd02b6..e3423fd02b6 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
index f07e426c808..f0d252a5c5e 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
@@ -33,7 +33,13 @@ uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUM
enum EventIds
{
EVENT_DARGONSPIRE_ROOM_STORE = 1,
- EVENT_DARGONSPIRE_ROOM_CHECK = 2
+ EVENT_DARGONSPIRE_ROOM_CHECK = 2,
+ EVENT_UROK_DOOMHOWL_SPAWNS_1 = 3,
+ EVENT_UROK_DOOMHOWL_SPAWNS_2 = 4,
+ EVENT_UROK_DOOMHOWL_SPAWNS_3 = 5,
+ EVENT_UROK_DOOMHOWL_SPAWNS_4 = 6,
+ EVENT_UROK_DOOMHOWL_SPAWNS_5 = 7,
+ EVENT_UROK_DOOMHOWL_SPAWN_IN = 8
};
class instance_blackrock_spire : public InstanceMapScript
@@ -275,6 +281,12 @@ public:
Emberseer->AI()->SetData(1, 1);
}
break;
+ case EVENT_UROK_DOOMHOWL:
+ if (GetBossState(NPC_UROK_DOOMHOWL) == NOT_STARTED)
+ {
+
+ }
+ break;
default:
break;
}
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h
index acdbf0cd483..acdbf0cd483 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp
index c9dc3d8f134..c9dc3d8f134 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp
index 05effabe557..05effabe557 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp
index 0d79f3faeee..0d79f3faeee 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp
index 369e4e02f5a..369e4e02f5a 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp
index 060bfeb60b3..060bfeb60b3 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
index d49cca2045f..d49cca2045f 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
index be2aeb9e223..be2aeb9e223 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
index c595f3acaff..c595f3acaff 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
index d904e0a89f8..d904e0a89f8 100644
--- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp
index e9ac15147f9..e9ac15147f9 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
index 5eabc11618b..5eabc11618b 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp
index 15079953a34..15079953a34 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp
index 0fdb88923b3..0fdb88923b3 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp
index 31f4e40552f..31f4e40552f 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_lucifron.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp
index 7d40b9630ae..7d40b9630ae 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_magmadar.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
index 1001516d42e..1001516d42e 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
index d03f756f366..d03f756f366 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp
index 7c1d1af7d29..7c1d1af7d29 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_shazzrah.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp
index 681f4f72bc6..681f4f72bc6 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp
index 04e652b7f80..04e652b7f80 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/instance_molten_core.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h
index 407e3ee5204..407e3ee5204 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/molten_core.h
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h
diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt
index 41d6179b169..53d37d83610 100644
--- a/src/server/scripts/EasternKingdoms/CMakeLists.txt
+++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt
@@ -17,6 +17,58 @@ set(scripts_STAT_SRCS
EasternKingdoms/AlteracValley/boss_drekthar.cpp
EasternKingdoms/AlteracValley/boss_vanndar.cpp
EasternKingdoms/AlteracValley/alterac_valley.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_gorosh_the_dervish.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_anubshiah.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_grizzle.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp
+ EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h
+ EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h
+ EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp
+ EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp
EasternKingdoms/Scholomance/boss_the_ravenian.cpp
EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp
@@ -55,37 +107,12 @@ set(scripts_STAT_SRCS
EasternKingdoms/Gnomeregan/gnomeregan.cpp
EasternKingdoms/Gnomeregan/gnomeregan.h
EasternKingdoms/zone_redridge_mountains.cpp
- EasternKingdoms/BlackrockDepths/boss_high_interrogator_gerstahn.cpp
- EasternKingdoms/BlackrockDepths/boss_gorosh_the_dervish.cpp
- EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
- EasternKingdoms/BlackrockDepths/boss_anubshiah.cpp
- EasternKingdoms/BlackrockDepths/boss_tomb_of_seven.cpp
- EasternKingdoms/BlackrockDepths/boss_general_angerforge.cpp
- EasternKingdoms/BlackrockDepths/boss_grizzle.cpp
- EasternKingdoms/BlackrockDepths/boss_ambassador_flamelash.cpp
- EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp
- EasternKingdoms/BlackrockDepths/boss_moira_bronzebeard.cpp
- EasternKingdoms/BlackrockDepths/blackrock_depths.h
- EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
- EasternKingdoms/BlackrockDepths/boss_magmus.cpp
EasternKingdoms/zone_ironforge.cpp
EasternKingdoms/ScarletEnclave/chapter2.cpp
EasternKingdoms/ScarletEnclave/chapter5.cpp
EasternKingdoms/ScarletEnclave/chapter1.cpp
EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
EasternKingdoms/zone_eastern_plaguelands.cpp
- EasternKingdoms/MoltenCore/boss_gehennas.cpp
- EasternKingdoms/MoltenCore/boss_lucifron.cpp
- EasternKingdoms/MoltenCore/boss_golemagg.cpp
- EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
- EasternKingdoms/MoltenCore/boss_baron_geddon.cpp
- EasternKingdoms/MoltenCore/boss_ragnaros.cpp
- EasternKingdoms/MoltenCore/boss_garr.cpp
- EasternKingdoms/MoltenCore/molten_core.h
- EasternKingdoms/MoltenCore/instance_molten_core.cpp
- EasternKingdoms/MoltenCore/boss_sulfuron_harbinger.cpp
- EasternKingdoms/MoltenCore/boss_magmadar.cpp
- EasternKingdoms/MoltenCore/boss_shazzrah.cpp
EasternKingdoms/Stratholme/boss_baroness_anastari.cpp
EasternKingdoms/Stratholme/boss_nerubenkan.cpp
EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -117,22 +144,6 @@ set(scripts_STAT_SRCS
EasternKingdoms/Uldaman/instance_uldaman.cpp
EasternKingdoms/Uldaman/boss_archaedas.cpp
EasternKingdoms/zone_swamp_of_sorrows.cpp
- EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp
- EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp
- EasternKingdoms/BlackrockSpire/boss_warmaster_voone.cpp
- EasternKingdoms/BlackrockSpire/boss_mother_smolderweb.cpp
- EasternKingdoms/BlackrockSpire/boss_quartermaster_zigris.cpp
- EasternKingdoms/BlackrockSpire/boss_halycon.cpp
- EasternKingdoms/BlackrockSpire/boss_overlord_wyrmthalak.cpp
- EasternKingdoms/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp
- EasternKingdoms/BlackrockSpire/boss_gyth.cpp
- EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp
- EasternKingdoms/BlackrockSpire/boss_highlord_omokk.cpp
- EasternKingdoms/BlackrockSpire/boss_the_beast.cpp
- EasternKingdoms/BlackrockSpire/boss_gizrul_the_slavener.cpp
- EasternKingdoms/BlackrockSpire/boss_urok_doomhowl.cpp
- EasternKingdoms/BlackrockSpire/blackrock_spire.h
- EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp
EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
EasternKingdoms/SunwellPlateau/sunwell_plateau.h
@@ -167,16 +178,6 @@ set(scripts_STAT_SRCS
EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
EasternKingdoms/ShadowfangKeep/shadowfang_keep.h
EasternKingdoms/zone_burning_steppes.cpp
- EasternKingdoms/BlackwingLair/boss_chromaggus.cpp
- EasternKingdoms/BlackwingLair/boss_razorgore.cpp
- EasternKingdoms/BlackwingLair/boss_firemaw.cpp
- EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp
- EasternKingdoms/BlackwingLair/boss_ebonroc.cpp
- EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp
- EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp
- EasternKingdoms/BlackwingLair/boss_nefarian.cpp
- EasternKingdoms/BlackwingLair/boss_flamegor.cpp
- EasternKingdoms/BlackwingLair/blackwing_lair.h
EasternKingdoms/zone_blasted_lands.cpp
EasternKingdoms/zone_stormwind_city.cpp
EasternKingdoms/ZulAman/boss_halazzi.cpp
diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp
index 30206ec555c..8e22c4b66c8 100644
--- a/src/server/scripts/Examples/example_spell.cpp
+++ b/src/server/scripts/Examples/example_spell.cpp
@@ -50,7 +50,7 @@ class spell_ex_5581 : public SpellScriptLoader
// function called on server startup
// checks if script has data required for it to work
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
// check if spellid 70522 exists in dbc, we will trigger it later
if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED))
@@ -208,7 +208,7 @@ class spell_ex_66244 : public SpellScriptLoader
PrepareAuraScript(spell_ex_66244AuraScript);
// function called on server startup
// checks if script has data required for it to work
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
// check if spellid exists in dbc, we will trigger it later
if (!sSpellMgr->GetSpellInfo(SPELL_TRIGGERED))
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index f59dbb785a8..c8d83a54e1e 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -400,12 +400,12 @@ public:
## go_shallow_grave
######*/
-enum
+enum ShallowGrave
{
- ZOMBIE = 7286,
- DEAD_HERO = 7276,
- ZOMBIE_CHANCE = 65,
- DEAD_HERO_CHANCE = 10
+ NPC_ZOMBIE = 7286,
+ NPC_DEAD_HERO = 7276,
+ CHANCE_ZOMBIE = 65,
+ CHANCE_DEAD_HERO = 10
};
class go_shallow_grave : public GameObjectScript
@@ -419,11 +419,11 @@ public:
if (go->GetUseCount() == 0)
{
uint32 randomchance = urand(0, 100);
- if (randomchance < ZOMBIE_CHANCE)
- go->SummonCreature(ZOMBIE, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
+ if (randomchance < CHANCE_ZOMBIE)
+ go->SummonCreature(NPC_ZOMBIE, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
else
- if ((randomchance - ZOMBIE_CHANCE) < DEAD_HERO_CHANCE)
- go->SummonCreature(DEAD_HERO, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
+ if ((randomchance - CHANCE_ZOMBIE) < CHANCE_DEAD_HERO)
+ go->SummonCreature(NPC_DEAD_HERO, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
}
go->AddUse();
return false;
diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp
index 63309c0502d..1eec2c826ea 100644
--- a/src/server/scripts/Kalimdor/zone_durotar.cpp
+++ b/src/server/scripts/Kalimdor/zone_durotar.cpp
@@ -448,7 +448,8 @@ class spell_mount_check : public SpellScriptLoader
class spell_mount_check_AuraScript : public AuraScript
{
PrepareAuraScript(spell_mount_check_AuraScript)
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_MOUNTING_CHECK))
return false;
@@ -495,7 +496,8 @@ class spell_voljin_war_drums : public SpellScriptLoader
class spell_voljin_war_drums_SpellScript : public SpellScript
{
PrepareSpellScript(spell_voljin_war_drums_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_MOTIVATE_1))
return false;
@@ -552,7 +554,7 @@ class spell_voodoo : public SpellScriptLoader
{
PrepareSpellScript(spell_voodoo_SpellScript)
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_BREW) || !sSpellMgr->GetSpellInfo(SPELL_GHOSTLY) ||
!sSpellMgr->GetSpellInfo(SPELL_HEX1) || !sSpellMgr->GetSpellInfo(SPELL_HEX2) ||
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
index b9d3c6f1cc6..33cce095abf 100644
--- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
@@ -612,7 +612,7 @@ class spell_ooze_zap : public SpellScriptLoader
{
PrepareSpellScript(spell_ooze_zap_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_OOZE_ZAP))
return false;
@@ -659,7 +659,7 @@ class spell_ooze_zap_channel_end : public SpellScriptLoader
{
PrepareSpellScript(spell_ooze_zap_channel_end_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_OOZE_ZAP_CHANNEL_END))
return false;
@@ -695,7 +695,7 @@ class spell_energize_aoe : public SpellScriptLoader
{
PrepareSpellScript(spell_energize_aoe_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_ENERGIZED))
return false;
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
index 7771451894e..05e758f5cf9 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp
@@ -52,7 +52,7 @@ enum Yells
SAY_INTRO = 5
};
-enum
+enum Misc
{
ACHIEV_TIMED_START_EVENT = 20381,
};
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index 3dc537b4c23..ce0f8e4778c 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -2312,7 +2312,7 @@ class spell_toc_bloodlust : public SpellScriptLoader
{
PrepareSpellScript(spell_toc_bloodlust_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(AURA_SATED))
return false;
@@ -2353,7 +2353,7 @@ class spell_toc_heroism : public SpellScriptLoader
{
PrepareSpellScript(spell_toc_heroism_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(AURA_EXHAUSTION))
return false;
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index b590b963c34..fdf39519409 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -99,7 +99,7 @@ static _Messages _GossipMessage[]=
{MSG_ANUBARAK, GOSSIP_ACTION_INFO_DEF + 6, true, BOSS_ANUBARAK}
};
-enum
+enum Messages
{
NUM_MESSAGES = 6
};
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
index 0d64655db77..17e4f2869c6 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h
@@ -5,7 +5,7 @@
#ifndef DEF_CRUSADER_H
#define DEF_CRUSADER_H
-enum
+enum DataTypes
{
BOSS_BEASTS = 0,
BOSS_JARAXXUS = 1,
@@ -28,12 +28,18 @@ enum
INCREASE = 501,
DECREASE = 502,
+};
+enum SpellIds
+{
SPELL_WILFRED_PORTAL = 68424,
SPELL_JARAXXUS_CHAINS = 67924,
SPELL_CORPSE_TELEPORT = 69016,
SPELL_DESTROY_FLOOR_KNOCKUP = 68193,
+};
+enum MiscData
+{
DESPAWN_TIME = 300000,
DISPLAYID_DESTROYED_FLOOR = 9060
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
index 785038137d9..0160359f0f2 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_novos.cpp
@@ -20,21 +20,14 @@
#include "ScriptedCreature.h"
#include "drak_tharon_keep.h"
-enum Misc
-{
- ACTION_RESET_CRYSTALS,
- ACTION_ACTIVATE_CRYSTAL,
- ACTION_DEACTIVATE,
- EVENT_ATTACK,
- EVENT_SUMMON_MINIONS,
- DATA_NOVOS_ACHIEV
-};
-
-enum Creatures
+enum Yells
{
- NPC_FETID_TROLL_CORPSE = 27598,
- NPC_RISEN_SHADOWCASTER = 27600,
- NPC_HULKING_CORPSE = 27597
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_DEATH = 2,
+ SAY_SUMMONING_ADDS = 3, // unused
+ SAY_ARCANE_FIELD = 4,
+ EMOTE_SUMMONING_ADDS = 5 // unused
};
enum Spells
@@ -46,6 +39,7 @@ enum Spells
SPELL_SUMMON_FETID_TROLL_CORPSE = 49103,
SPELL_SUMMON_HULKING_CORPSE = 49104,
SPELL_SUMMON_CRYSTAL_HANDLER = 49179,
+ SPELL_SUMMON_COPY_OF_MINIONS = 59933,
SPELL_ARCANE_BLAST = 49198,
SPELL_BLIZZARD = 49034,
@@ -54,6 +48,16 @@ enum Spells
SPELL_SUMMON_MINIONS = 59910
};
+enum Misc
+{
+ ACTION_RESET_CRYSTALS,
+ ACTION_ACTIVATE_CRYSTAL,
+ ACTION_DEACTIVATE,
+ EVENT_ATTACK,
+ EVENT_SUMMON_MINIONS,
+ DATA_NOVOS_ACHIEV
+};
+
struct SummonerInfo
{
uint32 data, spell, timer;
@@ -92,6 +96,7 @@ public:
void EnterCombat(Unit* /* victim */) OVERRIDE
{
_EnterCombat();
+ Talk(SAY_AGGRO);
SetCrystalsStatus(true);
SetSummonerStatus(true);
@@ -107,6 +112,18 @@ public:
DoStartNoMovement(target);
}
+ void KilledUnit(Unit* who) OVERRIDE
+ {
+ if (who->GetTypeId() == TYPEID_PLAYER)
+ Talk(SAY_KILL);
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
+
void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim() || _bubbled)
@@ -210,9 +227,6 @@ public:
void SetCrystalStatus(GameObject* crystal, bool active)
{
- if (!crystal)
- return;
-
crystal->SetGoState(active ? GO_STATE_ACTIVE : GO_STATE_READY);
if (Creature* crystalChannelTarget = crystal->FindNearestCreature(NPC_CRYSTAL_CHANNEL_TARGET, 5.0f))
{
@@ -236,6 +250,7 @@ public:
if (++_crystalHandlerCount >= 4)
{
+ Talk(SAY_ARCANE_FIELD);
SetSummonerStatus(false);
SetBubbled(false);
events.ScheduleEvent(EVENT_ATTACK, 3000);
@@ -332,42 +347,44 @@ public:
}
};
-enum SummonMinions
+class spell_novos_summon_minions : public SpellScriptLoader
{
- SPELL_COPY_OF_SUMMON_MINIONS = 59933
-};
+ public:
+ spell_novos_summon_minions() : SpellScriptLoader("spell_novos_summon_minions") { }
-class spell_summon_minions : public SpellScriptLoader
-{
-public:
- spell_summon_minions() : SpellScriptLoader("spell_summon_minions") { }
+ class spell_novos_summon_minions_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_novos_summon_minions_SpellScript);
- class spell_summon_minions_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_summon_minions_SpellScript);
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_COPY_OF_MINIONS))
+ return false;
+ return true;
+ }
- void HandleScript(SpellEffIndex /*effIndex*/)
- {
- GetCaster()->CastSpell((Unit*)NULL, SPELL_COPY_OF_SUMMON_MINIONS, true);
- GetCaster()->CastSpell((Unit*)NULL, SPELL_COPY_OF_SUMMON_MINIONS, true);
- }
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ for (uint8 i = 0; i < 2; ++i)
+ GetCaster()->CastSpell((Unit*)NULL, SPELL_SUMMON_COPY_OF_MINIONS, true);
+ }
- void Register() OVERRIDE
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_novos_summon_minions_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
{
- OnEffectHitTarget += SpellEffectFn(spell_summon_minions_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ return new spell_novos_summon_minions_SpellScript();
}
- };
-
- SpellScript* GetSpellScript() const OVERRIDE
- {
- return new spell_summon_minions_SpellScript();
- }
};
void AddSC_boss_novos()
{
new boss_novos();
new npc_crystal_channel_target();
- new spell_summon_minions();
+ new spell_novos_summon_minions();
new achievement_oh_novos();
}
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index d126340ef51..d0cec8a4f43 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -15,186 +15,313 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
- * Comment: @todo spawn troll waves
- */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
-#include "SpellAuras.h"
+#include "SpellScript.h"
+#include "SpellAuraEffects.h"
#include "drak_tharon_keep.h"
enum Spells
{
- SPELL_INFECTED_WOUND = 49637,
- SPELL_CRUSH = 49639,
- SPELL_CORPSE_EXPLODE = 49555,
- SPELL_CONSUME = 49380,
- SPELL_CONSUME_AURA = 49381,
- // Heroic spells
- H_SPELL_CORPSE_EXPLODE = 59807,
- H_SPELL_CONSUME = 59803,
- H_SPELL_CONSUME_AURA = 59805,
+ SPELL_INFECTED_WOUND = 49637,
+ SPELL_CRUSH = 49639,
+ SPELL_CORPSE_EXPLODE = 49555,
+ SPELL_CORPSE_EXPLODE_DAMAGE = 49618,
+ SPELL_CONSUME = 49380,
+ SPELL_CONSUME_BUFF = 49381,
+ SPELL_CONSUME_BUFF_H = 59805,
+
+ SPELL_SUMMON_INVADER_A = 49456,
+ SPELL_SUMMON_INVADER_B = 49457,
+ SPELL_SUMMON_INVADER_C = 49458, // can't find any sniffs
+
+ SPELL_INVADER_TAUNT = 49405
};
+#define SPELL_CONSUME_BUFF_HELPER DUNGEON_MODE<uint32>(SPELL_CONSUME_BUFF, SPELL_CONSUME_BUFF_H)
+
enum Yells
{
- SAY_AGGRO = 0,
- SAY_KILL = 1,
- SAY_CONSUME = 2,
- SAY_EXPLODE = 3,
- SAY_DEATH = 4
+ SAY_AGGRO = 0,
+ SAY_KILL = 1,
+ SAY_CONSUME = 2,
+ SAY_EXPLODE = 3,
+ SAY_DEATH = 4
};
-enum Creatures
+enum Misc
{
- NPC_DRAKKARI_INVADER_1 = 27753,
- NPC_DRAKKARI_INVADER_2 = 27709
+ DATA_CONSUMPTION_JUNCTION = 1,
+ POINT_LANDING = 1
};
-enum Misc
+enum Events
{
- DATA_CONSUMPTION_JUNCTION = 1
+ EVENT_CONSUME = 1,
+ EVENT_CRUSH,
+ EVENT_INFECTED_WOUND,
+ EVENT_CORPSE_EXPLODE,
+ EVENT_SPAWN
};
-Position AddSpawnPoint = { -260.493011f, -622.968018f, 26.605301f, 3.036870f };
+Position const Landing = { -263.0534f, -660.8658f, 26.50903f, 0.0f };
class boss_trollgore : public CreatureScript
{
-public:
- boss_trollgore() : CreatureScript("boss_trollgore") { }
+ public:
+ boss_trollgore() : CreatureScript("boss_trollgore") { }
- struct boss_trollgoreAI : public ScriptedAI
- {
- boss_trollgoreAI(Creature* creature) : ScriptedAI(creature), lSummons(me)
+ struct boss_trollgoreAI : public BossAI
{
- instance = creature->GetInstanceScript();
- }
+ boss_trollgoreAI(Creature* creature) : BossAI(creature, DATA_TROLLGORE) { }
- uint32 uiConsumeTimer;
- uint32 uiAuraCountTimer;
- uint32 uiCrushTimer;
- uint32 uiInfectedWoundTimer;
- uint32 uiExplodeCorpseTimer;
- uint32 uiSpawnTimer;
+ void Reset() OVERRIDE
+ {
+ _Reset();
+ _consumptionJunction = true;
+ }
- bool consumptionJunction;
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _EnterCombat();
+ Talk(SAY_AGGRO);
+
+ events.ScheduleEvent(EVENT_CONSUME, 15000);
+ events.ScheduleEvent(EVENT_CRUSH, urand(1000, 5000));
+ events.ScheduleEvent(EVENT_INFECTED_WOUND, urand(10000, 60000));
+ events.ScheduleEvent(EVENT_CORPSE_EXPLODE, 3000);
+ events.ScheduleEvent(EVENT_SPAWN, urand(30000, 40000));
+ }
- SummonList lSummons;
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_CONSUME:
+ Talk(SAY_CONSUME);
+ DoCastAOE(SPELL_CONSUME);
+ events.ScheduleEvent(EVENT_CONSUME, 15000);
+ break;
+ case EVENT_CRUSH:
+ DoCastVictim(SPELL_CRUSH);
+ events.ScheduleEvent(EVENT_CRUSH, urand(10000, 15000));
+ break;
+ case EVENT_INFECTED_WOUND:
+ DoCastVictim(SPELL_INFECTED_WOUND);
+ events.ScheduleEvent(EVENT_INFECTED_WOUND, urand(25000, 35000));
+ break;
+ case EVENT_CORPSE_EXPLODE:
+ Talk(SAY_EXPLODE);
+ DoCastAOE(SPELL_CORPSE_EXPLODE);
+ events.ScheduleEvent(EVENT_CORPSE_EXPLODE, urand(15000, 19000));
+ break;
+ case EVENT_SPAWN:
+ for (uint8 i = 0; i < 3; ++i)
+ if (Creature* trigger = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TROLLGORE_INVADER_SUMMONER_1 + i)))
+ trigger->CastSpell(trigger, RAND(SPELL_SUMMON_INVADER_A, SPELL_SUMMON_INVADER_B, SPELL_SUMMON_INVADER_C), true, NULL, NULL, me->GetGUID());
+
+ events.ScheduleEvent(EVENT_SPAWN, urand(30000, 40000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (_consumptionJunction)
+ {
+ Aura* ConsumeAura = me->GetAura(SPELL_CONSUME_BUFF_HELPER);
+ if (ConsumeAura && ConsumeAura->GetStackAmount() > 9)
+ _consumptionJunction = false;
+ }
+
+ DoMeleeAttackIfReady();
+ }
- InstanceScript* instance;
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
- void Reset() OVERRIDE
- {
- uiConsumeTimer = 15*IN_MILLISECONDS;
- uiAuraCountTimer = 15500;
- uiCrushTimer = urand(1*IN_MILLISECONDS, 5*IN_MILLISECONDS);
- uiInfectedWoundTimer = urand(10*IN_MILLISECONDS, 60*IN_MILLISECONDS);
- uiExplodeCorpseTimer = 3*IN_MILLISECONDS;
- uiSpawnTimer = urand(30*IN_MILLISECONDS, 40*IN_MILLISECONDS);
+ uint32 GetData(uint32 type) const OVERRIDE
+ {
+ if (type == DATA_CONSUMPTION_JUNCTION)
+ return _consumptionJunction ? 1 : 0;
- consumptionJunction = true;
+ return 0;
+ }
- lSummons.DespawnAll();
+ void KilledUnit(Unit* victim) OVERRIDE
+ {
+ if (victim->GetTypeId() != TYPEID_PLAYER)
+ return;
- me->RemoveAura(DUNGEON_MODE(SPELL_CONSUME_AURA, H_SPELL_CONSUME_AURA));
+ Talk(SAY_KILL);
+ }
- instance->SetData(DATA_TROLLGORE, NOT_STARTED);
+ void JustSummoned(Creature* summon) OVERRIDE
+ {
+ summon->GetMotionMaster()->MovePoint(POINT_LANDING, Landing);
+ summons.Summon(summon);
+ }
+
+ private:
+ bool _consumptionJunction;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetDrakTharonKeepAI<boss_trollgoreAI>(creature);
}
+};
- void EnterCombat(Unit* /*who*/) OVERRIDE
+class npc_drakkari_invader : public CreatureScript
+{
+ public:
+ npc_drakkari_invader() : CreatureScript("npc_drakkari_invader") { }
+
+ struct npc_drakkari_invaderAI : public ScriptedAI
{
- Talk(SAY_AGGRO);
- instance->SetBossState(DATA_TROLLGORE, IN_PROGRESS);
+ npc_drakkari_invaderAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void MovementInform(uint32 type, uint32 pointId) OVERRIDE
+ {
+ if (type == POINT_MOTION_TYPE && pointId == POINT_LANDING)
+ {
+ me->Dismount();
+ me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ DoCastAOE(SPELL_INVADER_TAUNT);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetDrakTharonKeepAI<npc_drakkari_invaderAI>(creature);
}
+};
- void UpdateAI(uint32 diff) OVERRIDE
+// 49380, 59803 - Consume
+class spell_trollgore_consume : public SpellScriptLoader
+{
+ public:
+ spell_trollgore_consume() : SpellScriptLoader("spell_trollgore_consume") { }
+
+ class spell_trollgore_consume_SpellScript : public SpellScript
{
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ PrepareSpellScript(spell_trollgore_consume_SpellScript);
- if (uiSpawnTimer <= diff)
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- uint32 spawnNumber = urand(2, DUNGEON_MODE(3, 5));
- for (uint8 i = 0; i < spawnNumber; ++i)
- DoSummon(RAND(NPC_DRAKKARI_INVADER_1, NPC_DRAKKARI_INVADER_2), AddSpawnPoint, 0, TEMPSUMMON_DEAD_DESPAWN);
- uiSpawnTimer = urand(30*IN_MILLISECONDS, 40*IN_MILLISECONDS);
- } else uiSpawnTimer -= diff;
+ if (!sSpellMgr->GetSpellInfo(SPELL_CONSUME_BUFF))
+ return false;
+ return true;
+ }
- if (uiConsumeTimer <= diff)
+ void HandleConsume(SpellEffIndex /*effIndex*/)
{
- Talk(SAY_CONSUME);
- DoCast(SPELL_CONSUME);
- uiConsumeTimer = 15*IN_MILLISECONDS;
- } else uiConsumeTimer -= diff;
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(GetCaster(), SPELL_CONSUME_BUFF, true);
+ }
- if (consumptionJunction)
+ void Register() OVERRIDE
{
- Aura* ConsumeAura = me->GetAura(DUNGEON_MODE(SPELL_CONSUME_AURA, H_SPELL_CONSUME_AURA));
- if (ConsumeAura && ConsumeAura->GetStackAmount() > 9)
- consumptionJunction = false;
+ OnEffectHitTarget += SpellEffectFn(spell_trollgore_consume_SpellScript::HandleConsume, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_trollgore_consume_SpellScript();
+ }
+};
- if (uiCrushTimer <= diff)
+// 49555, 59807 - Corpse Explode
+class spell_trollgore_corpse_explode : public SpellScriptLoader
+{
+ public:
+ spell_trollgore_corpse_explode() : SpellScriptLoader("spell_trollgore_corpse_explode") { }
+
+ class spell_trollgore_corpse_explode_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_trollgore_corpse_explode_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- DoCastVictim(SPELL_CRUSH);
- uiCrushTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
- } else uiCrushTimer -= diff;
+ if (!sSpellMgr->GetSpellInfo(SPELL_CORPSE_EXPLODE_DAMAGE))
+ return false;
+ return true;
+ }
- if (uiInfectedWoundTimer <= diff)
+ void PeriodicTick(AuraEffect const* aurEff)
{
- DoCastVictim(SPELL_INFECTED_WOUND);
- uiInfectedWoundTimer = urand(25*IN_MILLISECONDS, 35*IN_MILLISECONDS);
- } else uiInfectedWoundTimer -= diff;
+ if (aurEff->GetTickNumber() == 2)
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(GetTarget(), SPELL_CORPSE_EXPLODE_DAMAGE, true, NULL, aurEff);
+ }
- if (uiExplodeCorpseTimer <= diff)
+ void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- DoCast(SPELL_CORPSE_EXPLODE);
- Talk(SAY_EXPLODE);
- uiExplodeCorpseTimer = urand(15*IN_MILLISECONDS, 19*IN_MILLISECONDS);
- } else uiExplodeCorpseTimer -= diff;
+ if (Creature* target = GetTarget()->ToCreature())
+ target->DespawnOrUnsummon();
+ }
- DoMeleeAttackIfReady();
- }
+ void Register() OVERRIDE
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_trollgore_corpse_explode_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_trollgore_corpse_explode_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
- void JustDied(Unit* /*killer*/) OVERRIDE
+ AuraScript* GetAuraScript() const OVERRIDE
{
- Talk(SAY_DEATH);
-
- lSummons.DespawnAll();
-
- instance->SetBossState(DATA_TROLLGORE, DONE);
+ return new spell_trollgore_corpse_explode_AuraScript();
}
+};
- uint32 GetData(uint32 type) const OVERRIDE
+// 49405 - Invader Taunt Trigger
+class spell_trollgore_invader_taunt : public SpellScriptLoader
+{
+ public:
+ spell_trollgore_invader_taunt() : SpellScriptLoader("spell_trollgore_invader_taunt") { }
+
+ class spell_trollgore_invader_taunt_SpellScript : public SpellScript
{
- if (type == DATA_CONSUMPTION_JUNCTION)
- return consumptionJunction ? 1 : 0;
+ PrepareSpellScript(spell_trollgore_invader_taunt_SpellScript);
- return 0;
- }
+ bool Validate(SpellInfo const* spellInfo) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].CalcValue()))
+ return false;
+ return true;
+ }
- void KilledUnit(Unit* victim) OVERRIDE
- {
- if (victim->GetTypeId() != TYPEID_PLAYER)
- return;
+ void HandleTaunt(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ target->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
+ }
- Talk(SAY_KILL);
- }
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_trollgore_invader_taunt_SpellScript::HandleTaunt, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
- void JustSummoned(Creature* summon) OVERRIDE
+ SpellScript* GetSpellScript() const OVERRIDE
{
- lSummons.Summon(summon);
- if (summon->AI())
- summon->AI()->AttackStart(me);
+ return new spell_trollgore_invader_taunt_SpellScript();
}
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return GetDrakTharonKeepAI<boss_trollgoreAI>(creature);
- }
};
class achievement_consumption_junction : public AchievementCriteriaScript
@@ -220,5 +347,9 @@ class achievement_consumption_junction : public AchievementCriteriaScript
void AddSC_boss_trollgore()
{
new boss_trollgore();
+ new npc_drakkari_invader();
+ new spell_trollgore_consume();
+ new spell_trollgore_corpse_explode();
+ new spell_trollgore_invader_taunt();
new achievement_consumption_junction();
}
diff --git a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
index cc0fb9a0090..072a5f2f534 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
+++ b/src/server/scripts/Northrend/DraktharonKeep/drak_tharon_keep.h
@@ -36,6 +36,10 @@ enum DataTypes
// Additional data
//DATA_KING_DRED_ACHIEV,
+ DATA_TROLLGORE_INVADER_SUMMONER_1,
+ DATA_TROLLGORE_INVADER_SUMMONER_2,
+ DATA_TROLLGORE_INVADER_SUMMONER_3,
+
DATA_NOVOS_CRYSTAL_1,
DATA_NOVOS_CRYSTAL_2,
DATA_NOVOS_CRYSTAL_3,
@@ -55,13 +59,23 @@ enum CreatureIds
NPC_KING_DRED = 27483,
NPC_THARON_JA = 26632,
+ // Trollgore
+ NPC_DRAKKARI_INVADER_A = 27709,
+ NPC_DRAKKARI_INVADER_B = 27753,
+ NPC_DRAKKARI_INVADER_C = 27754,
+
// Novos
NPC_CRYSTAL_CHANNEL_TARGET = 26712,
NPC_CRYSTAL_HANDLER = 26627,
+ NPC_HULKING_CORPSE = 27597,
+ NPC_FETID_TROLL_CORPSE = 27598,
+ NPC_RISEN_SHADOWCASTER = 27600,
// King Dred
NPC_DRAKKARI_GUTRIPPER = 26641,
- NPC_DRAKKARI_SCYTHECLAW = 26628
+ NPC_DRAKKARI_SCYTHECLAW = 26628,
+
+ NPC_WORLD_TRIGGER = 22515
};
enum GameObjectIds
diff --git a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
index 99a4ce77623..e2ed883ad08 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/instance_drak_tharon_keep.cpp
@@ -36,11 +36,12 @@ class instance_drak_tharon_keep : public InstanceMapScript
KingDredGUID = 0;
TharonJaGUID = 0;
+ memset(TrollgoreInvaderSummonerGuids, 0, 4 * sizeof(uint64));
memset(NovosCrystalGUIDs, 0, 4 * sizeof(uint64));
memset(NovosSummonerGUIDs, 0, 4 * sizeof(uint64));
}
- void OnCreatureCreate(Creature* creature)
+ void OnCreatureCreate(Creature* creature) OVERRIDE
{
switch (creature->GetEntry())
{
@@ -56,6 +57,9 @@ class instance_drak_tharon_keep : public InstanceMapScript
case NPC_THARON_JA:
TharonJaGUID = creature->GetGUID();
break;
+ case NPC_WORLD_TRIGGER:
+ InitializeTrollgoreInvaderSummoner(creature);
+ break;
case NPC_CRYSTAL_CHANNEL_TARGET:
InitializeNovosSummoner(creature);
break;
@@ -64,31 +68,43 @@ class instance_drak_tharon_keep : public InstanceMapScript
}
}
- void OnGameObjectCreate(GameObject* go)
+ void OnGameObjectCreate(GameObject* go) OVERRIDE
{
switch (go->GetEntry())
{
case GO_NOVOS_CRYSTAL_1:
NovosCrystalGUIDs[0] = go->GetGUID();
- go->SetGoState(GO_STATE_READY);
break;
case GO_NOVOS_CRYSTAL_2:
NovosCrystalGUIDs[1] = go->GetGUID();
- go->SetGoState(GO_STATE_READY);
break;
case GO_NOVOS_CRYSTAL_3:
NovosCrystalGUIDs[2] = go->GetGUID();
- go->SetGoState(GO_STATE_READY);
break;
case GO_NOVOS_CRYSTAL_4:
NovosCrystalGUIDs[3] = go->GetGUID();
- go->SetGoState(GO_STATE_READY);
break;
default:
break;
}
}
+ void InitializeTrollgoreInvaderSummoner(Creature* creature)
+ {
+ float y = creature->GetPositionY();
+ float z = creature->GetPositionZ();
+
+ if (z < 50.0f)
+ return;
+
+ if (y < -650.0f && y > -660.0f)
+ TrollgoreInvaderSummonerGuids[0] = creature->GetGUID();
+ else if (y < -660.0f && y > -670.0f)
+ TrollgoreInvaderSummonerGuids[1] = creature->GetGUID();
+ else if (y < -675.0f && y > -685.0f)
+ TrollgoreInvaderSummonerGuids[2] = creature->GetGUID();
+ }
+
void InitializeNovosSummoner(Creature* creature)
{
float x = creature->GetPositionX();
@@ -117,6 +133,10 @@ class instance_drak_tharon_keep : public InstanceMapScript
return KingDredGUID;
case DATA_THARON_JA:
return TharonJaGUID;
+ case DATA_TROLLGORE_INVADER_SUMMONER_1:
+ case DATA_TROLLGORE_INVADER_SUMMONER_2:
+ case DATA_TROLLGORE_INVADER_SUMMONER_3:
+ return TrollgoreInvaderSummonerGuids[type - DATA_TROLLGORE_INVADER_SUMMONER_1];
case DATA_NOVOS_CRYSTAL_1:
case DATA_NOVOS_CRYSTAL_2:
case DATA_NOVOS_CRYSTAL_3:
@@ -132,14 +152,14 @@ class instance_drak_tharon_keep : public InstanceMapScript
return 0;
}
- void OnUnitDeath(Unit* unit)
+ void OnUnitDeath(Unit* unit) OVERRIDE
{
if (unit->GetEntry() == NPC_CRYSTAL_HANDLER)
if (Creature* novos = instance->GetCreature(NovosGUID))
novos->AI()->DoAction(ACTION_CRYSTAL_HANDLER_DIED);
}
- std::string GetSaveData()
+ std::string GetSaveData() OVERRIDE
{
OUT_SAVE_INST_DATA;
@@ -150,7 +170,7 @@ class instance_drak_tharon_keep : public InstanceMapScript
return saveStream.str();
}
- void Load(char const* str)
+ void Load(char const* str) OVERRIDE
{
if (!str)
{
@@ -188,6 +208,7 @@ class instance_drak_tharon_keep : public InstanceMapScript
uint64 KingDredGUID;
uint64 TharonJaGUID;
+ uint64 TrollgoreInvaderSummonerGuids[3];
uint64 NovosCrystalGUIDs[4];
uint64 NovosSummonerGUIDs[4];
};
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index e291ee0de70..6408417e902 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -36,6 +36,17 @@ enum Text
SAY_JAINA_INTRO_11 = 10,
SAY_JAINA_INTRO_END = 11,
+ SAY_JAINA_ESCAPE_1 = 0,
+ SAY_JAINA_ESCAPE_2 = 1,
+ SAY_JAINA_ESCAPE_3 = 2,
+ SAY_JAINA_ESCAPE_4 = 3,
+ SAY_JAINA_ESCAPE_5 = 4,
+ SAY_JAINA_ESCAPE_6 = 5,
+ SAY_JAINA_ESCAPE_7 = 6,
+ SAY_JAINA_ESCAPE_8 = 7,
+ SAY_JAINA_ESCAPE_9 = 8,
+ SAY_JAINA_ESCAPE_10 = 9,
+
SAY_SYLVANAS_INTRO_1 = 0,
SAY_SYLVANAS_INTRO_2 = 1,
SAY_SYLVANAS_INTRO_3 = 2,
@@ -46,6 +57,16 @@ enum Text
SAY_SYLVANAS_INTRO_8 = 7,
SAY_SYLVANAS_INTRO_END = 8,
+ SAY_SYLVANAS_ESCAPE_1 = 0,
+ SAY_SYLVANAS_ESCAPE_2 = 1,
+ SAY_SYLVANAS_ESCAPE_3 = 2,
+ SAY_SYLVANAS_ESCAPE_4 = 3,
+ SAY_SYLVANAS_ESCAPE_5 = 4,
+ SAY_SYLVANAS_ESCAPE_6 = 5,
+ SAY_SYLVANAS_ESCAPE_7 = 6,
+ SAY_SYLVANAS_ESCAPE_8 = 7,
+ SAY_SYLVANAS_ESCAPE_9 = 8,
+
SAY_UTHER_INTRO_A2_1 = 0,
SAY_UTHER_INTRO_A2_2 = 1,
SAY_UTHER_INTRO_A2_3 = 2,
@@ -69,6 +90,18 @@ enum Text
SAY_LK_JAINA_INTRO_END = 3,
SAY_LK_SYLVANAS_INTRO_END = 4,
+ SAY_LK_ESCAPE_1 = 0,
+ SAY_LK_ESCAPE_2 = 1,
+ SAY_LK_ESCAPE_3 = 2,
+ SAY_LK_ESCAPE_4 = 3,
+ SAY_LK_ESCAPE_5 = 4,
+ SAY_LK_ESCAPE_6 = 5,
+ SAY_LK_ESCAPE_7 = 6,
+ SAY_LK_ESCAPE_8 = 7,
+ SAY_LK_ESCAPE_9 = 8,
+ SAY_LK_ESCAPE_10 = 9,
+ SAY_LK_ESCAPE_11 = 10,
+
SAY_FALRIC_INTRO_1 = 5,
SAY_FALRIC_INTRO_2 = 6,
@@ -132,6 +165,35 @@ enum Events
EVENT_INTRO_END,
+ EVENT_ESCAPE,
+ EVENT_ESCAPE_1,
+ EVENT_ESCAPE_2,
+ EVENT_ESCAPE_3,
+ EVENT_ESCAPE_4,
+ EVENT_ESCAPE_5,
+ EVENT_ESCAPE_6,
+ EVENT_ESCAPE_7,
+ EVENT_ESCAPE_8,
+ EVENT_ESCAPE_9,
+ EVENT_ESCAPE_10,
+ EVENT_ESCAPE_11,
+ EVENT_ESCAPE_12,
+ EVENT_ESCAPE_13,
+ EVENT_ESCAPE_14,
+ EVENT_ESCAPE_15,
+ EVENT_ESCAPE_16,
+ EVENT_ESCAPE_17,
+ EVENT_ESCAPE_18,
+ EVENT_ESCAPE_19,
+ EVENT_ESCAPE_20,
+ EVENT_ESCAPE_21,
+ EVENT_ESCAPE_22,
+ EVENT_ESCAPE_23,
+ EVENT_ESCAPE_24,
+ EVENT_ESCAPE_25,
+ EVENT_ESCAPE_26,
+ EVENT_ESCAPE_27,
+
EVENT_OPEN_FROSTWORN_DOOR,
EVENT_CLOSE_FROSTWORN_DOOR,
};
@@ -156,21 +218,79 @@ enum Spells
SPELL_FROSTMOURNE_DESPAWN = 72726,
SPELL_FROSTMOURNE_VISUAL = 73220,
SPELL_FROSTMOURNE_SOUNDS = 70667,
+ SPELL_JAINA_ICEBARRIER = 69787, // Jaina Ice Barrier
+ SPELL_JAINA_ICEPRISON = 69708, // Jaina Ice Prison
+ SPELL_SYLVANAS_CLOAKOFDARKNESS = 70188, // Sylvanas Cloak of Darkness
+ SPELL_SYLVANAS_DARKBINDING = 70194, // Sylvanas Dark Binding
+ SPELL_REMORSELESS_WINTER = 69780, // Lich King Remorseless Winter
+ SPELL_SOUL_REAPER = 69409, // Lich King Soul Reaper
+ SPELL_FURY_OF_FROSTMOURNE = 70063, // Lich King Fury of FrostMourne
+ SPELL_JAINA_DESTROY_ICE_WALL = 69784, // Jaina
+ SPELL_SYLVANAS_DESTROY_ICE_WALL = 70225, // Sylvanas
+ SPELL_SYLVANAS_JUMP = 68339, // Sylvanas Jump
+ SPELL_RAISE_DEAD = 69818,
+ SPELL_HARVEST_SOUL = 70070,
+ SPELL_SUMMON_RISE_WITCH_DOCTOR = 69836,
+ SPELL_SUMMON_LUMBERING_ABOMINATION = 69835,
+ SPELL_SUMMON_ICE_WALL = 69768, // Visual effect and icewall summoning
+
+ //Raging gnoul
+ SPELL_EMERGE_VISUAL = 50142,
+ SPELL_GHOUL_JUMP = 70150,
+
+ //Witch Doctor
+ SPELL_COURSE_OF_DOOM = 70144,
+ SPELL_SHADOW_BOLT_VOLLEY = 70145,
+ SPELL_SHADOW_BOLT = 70080,
+
+ //Lumbering Abomination
+ SPELL_ABON_STRIKE = 40505,
+ SPELL_VOMIT_SPRAY = 70176,
};
-const Position HallsofReflectionLocs[]=
+const Position HallsofReflectionLocs[] =
{
{5283.234863f, 1990.946777f, 707.695679f, 0.929097f}, // 2 Loralen Follows
{5408.031250f, 2102.918213f, 707.695251f, 0.792756f}, // 9 Sylvanas Follows
{5401.866699f, 2110.837402f, 707.695251f, 0.800610f}, // 10 Loralen follows
};
-const Position IntroPos = {5265.89f, 1952.98f, 707.6978f, 0.0f}; // Jaina/Sylvanas Intro Start Position
-const Position MoveThronePos = {5306.952148f, 1998.499023f, 709.341431f, 1.277278f}; // Jaina/Sylvanas walks to throne
-const Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f};
-const Position LichKingSpawnPos = {5362.917480f, 2062.307129f, 707.695374f, 3.945812f};
-const Position LichKingMoveThronePos = {5312.080566f, 2009.172119f, 709.341431f, 3.973301f}; // Lich King walks to throne
-const Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away
+const Position NpcJainaOrSylvanasEscapeRoute[] =
+{
+ {5601.217285f, 2207.652832f, 731.541931f, 5.223304f}, // leave the throne room
+ {5607.224375f, 2173.913330f, 731.126038f, 2.608723f}, // adjust route
+ {5583.427246f, 2138.784180f, 731.150391f, 4.260901f}, // stop for talking
+ {5560.281738f, 2104.025635f, 731.410889f, 4.058383f}, // attack the first icewall
+ {5510.990723f, 2000.772217f, 734.716064f, 3.973213f}, // attack the second icewall
+ {5452.641113f, 1905.762329f, 746.530579f, 4.118834f}, // attack the third icewall
+ {5338.126953f, 1768.429810f, 767.237244f, 3.855189f}, // attack the fourth icewall
+ {5257.712402f, 1669.379395f, 784.300110f, 0.908373f}, // face the Lich king
+ {5261.191895f, 1681.901611f, 784.285278f, 4.410465f}, // final position
+};
+
+const Position IceWalls[] =
+{
+ {5547.833f, 2083.701f,731.4332f,4.24115f}, // first icewall
+ {5503.213f, 1969.547f,737.0245f,4.293779f},// second icewall
+ {5439.976f, 1879.005f,752.7048f,4.207591f},// third icewall
+ {5318.289f, 1749.184f,771.9423f,4.054276f},// fourth icewall
+};
+
+const Position IntroPos = {5265.89f, 1952.98f, 707.6978f, 0.0f}; // Jaina/Sylvanas Intro Start Position
+const Position MoveThronePos = {5306.952148f, 1998.499023f, 709.341431f, 1.277278f}; // Jaina/Sylvanas walks to throne
+const Position UtherSpawnPos = {5308.310059f, 2003.857178f, 709.341431f, 4.650315f};
+const Position LichKingSpawnPos = {5362.917480f, 2062.307129f, 707.695374f, 3.945812f};
+const Position LichKingMoveThronePos = {5312.080566f, 2009.172119f, 709.341431f, 3.973301f}; // Lich King walks to throne
+const Position LichKingMoveAwayPos = {5400.069824f, 2102.7131689f, 707.69525f, 0.843803f}; // Lich King walks away
+const Position LichKingSpawnPos2 = {5552.733398f, 2262.718506f, 733.011047f, 4.009696f}; // Lich King Spawn Position 2
+const Position LichKingFirstSummon = {5600.076172f, 2192.270996f, 731.750488f, 4.330935f}; // Lich King First summons
+const Position JainaShadowThroneDoor = {5577.243f, 2235.852f, 733.0128f, 2.209562f}; // Jaina Spawn Position 2
+const Position SylvanasShadowThroneDoor = {5577.243f, 2235.852f, 733.0128f, 2.209562f}; // Sylvanas Spawn Position 2
+const Position FalricStartPos = {5283.878906f, 2030.459595f, 709.319641f, 5.506670f}; // Falric start position
+const Position MarwynStartPos = {5334.979980f, 1982.399536f, 709.320129f, 2.347014f}; // Marwyn start position
+const Position LichKingFinalPos = {5283.742188f, 1706.335693f, 783.293518f, 4.138510f}; // Lich King Final Pos
+const Position ChestPos = {5246.187500f, 1649.079468f, 784.301758f, 0.901268f}; // Chest position
+const Position FinalPortalPos = {5270.634277f ,1639.101196f, 784.303040f, 1.682743f}; // Final portal position
class npc_jaina_or_sylvanas_hor : public CreatureScript
{
@@ -182,14 +302,14 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
{
npc_jaina_or_sylvanas_horAI(Creature* creature) : ScriptedAI(creature)
{
- instance = me->GetInstanceScript();
+ _instance = me->GetInstanceScript();
}
- InstanceScript* instance;
- uint64 utherGUID;
- uint64 lichkingGUID;
+ InstanceScript* _instance;
+ uint64 _utherGUID;
+ uint64 _lichkingGUID;
- EventMap events;
+ EventMap _events;
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) OVERRIDE
{
@@ -198,12 +318,12 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
{
case 0:
player->CLOSE_GOSSIP_MENU();
- events.ScheduleEvent(EVENT_START_INTRO, 1000);
+ _events.ScheduleEvent(EVENT_START_INTRO, 1000);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER);
break;
case 1:
player->CLOSE_GOSSIP_MENU();
- events.ScheduleEvent(EVENT_SKIP_INTRO, 1000);
+ _events.ScheduleEvent(EVENT_SKIP_INTRO, 1000);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER);
break;
}
@@ -211,36 +331,36 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
void Reset() OVERRIDE
{
- events.Reset();
+ _events.Reset();
- utherGUID = 0;
- lichkingGUID = 0;
+ _utherGUID = 0;
+ _lichkingGUID = 0;
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER);
me->SetStandState(UNIT_STAND_STATE_STAND);
- events.ScheduleEvent(EVENT_WALK_INTRO1, 3000);
+ _events.ScheduleEvent(EVENT_WALK_INTRO1, 3000);
}
void UpdateAI(uint32 diff) OVERRIDE
{
- events.Update(diff);
- switch (events.ExecuteEvent())
+ _events.Update(diff);
+ switch (_events.ExecuteEvent())
{
case EVENT_WALK_INTRO1:
me->GetMotionMaster()->MovePoint(0, IntroPos);
- if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
{
Talk(SAY_JAINA_INTRO_1);
- events.ScheduleEvent(EVENT_WALK_INTRO2, 7000);
+ _events.ScheduleEvent(EVENT_WALK_INTRO2, 7000);
}
else
{
Talk(SAY_SYLVANAS_INTRO_1);
- events.ScheduleEvent(EVENT_WALK_INTRO2, 9000);
+ _events.ScheduleEvent(EVENT_WALK_INTRO2, 9000);
}
break;
case EVENT_WALK_INTRO2:
- if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
Talk(SAY_JAINA_INTRO_2);
else
Talk(SAY_SYLVANAS_INTRO_2);
@@ -249,182 +369,182 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
case EVENT_START_INTRO:
me->GetMotionMaster()->MovePoint(0, MoveThronePos);
// Begining of intro is differents between fActions as the speech sequence and timers are differents.
- if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
- events.ScheduleEvent(EVENT_INTRO_A2_1, 0);
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ _events.ScheduleEvent(EVENT_INTRO_A2_1, 0);
else
- events.ScheduleEvent(EVENT_INTRO_H2_1, 0);
+ _events.ScheduleEvent(EVENT_INTRO_H2_1, 0);
break;
// A2 Intro Events
case EVENT_INTRO_A2_1:
Talk(SAY_JAINA_INTRO_3);
- events.ScheduleEvent(EVENT_INTRO_A2_2, 7000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_2, 7000);
break;
case EVENT_INTRO_A2_2:
Talk(SAY_JAINA_INTRO_4);
- events.ScheduleEvent(EVENT_INTRO_A2_3, 10000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_3, 10000);
break;
case EVENT_INTRO_A2_3:
me->CastSpell(me, SPELL_CAST_VISUAL, false);
me->CastSpell(me, SPELL_FROSTMOURNE_SOUNDS, true);
- instance->HandleGameObject(instance->GetData64(DATA_FROSTMOURNE), true);
- events.ScheduleEvent(EVENT_INTRO_A2_4, 10000);
+ _instance->HandleGameObject(_instance->GetData64(DATA_FROSTMOURNE), true);
+ _events.ScheduleEvent(EVENT_INTRO_A2_4, 10000);
break;
case EVENT_INTRO_A2_4:
if (Creature* uther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
uther->GetMotionMaster()->MoveIdle();
- utherGUID = uther->GetGUID();
+ _utherGUID = uther->GetGUID();
}
- events.ScheduleEvent(EVENT_INTRO_A2_5, 2000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_5, 2000);
break;
case EVENT_INTRO_A2_5:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_A2_1);
- events.ScheduleEvent(EVENT_INTRO_A2_6, 3000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_6, 3000);
break;
case EVENT_INTRO_A2_6:
Talk(SAY_JAINA_INTRO_5);
- events.ScheduleEvent(EVENT_INTRO_A2_7, 7000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_7, 7000);
break;
case EVENT_INTRO_A2_7:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_A2_2);
- events.ScheduleEvent(EVENT_INTRO_A2_8, 7000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_8, 7000);
break;
case EVENT_INTRO_A2_8:
Talk(SAY_JAINA_INTRO_6);
- events.ScheduleEvent(EVENT_INTRO_A2_9, 1200);
+ _events.ScheduleEvent(EVENT_INTRO_A2_9, 1200);
break;
case EVENT_INTRO_A2_9:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_A2_3);
- events.ScheduleEvent(EVENT_INTRO_A2_10, 11000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_10, 11000);
break;
case EVENT_INTRO_A2_10:
Talk(SAY_JAINA_INTRO_7);
- events.ScheduleEvent(EVENT_INTRO_A2_11, 6000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_11, 6000);
break;
case EVENT_INTRO_A2_11:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_A2_4);
- events.ScheduleEvent(EVENT_INTRO_A2_12, 12000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_12, 12000);
break;
case EVENT_INTRO_A2_12:
Talk(SAY_JAINA_INTRO_8);
- events.ScheduleEvent(EVENT_INTRO_A2_13, 6000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_13, 6000);
break;
case EVENT_INTRO_A2_13:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_A2_5);
- events.ScheduleEvent(EVENT_INTRO_A2_14, 13000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_14, 13000);
break;
case EVENT_INTRO_A2_14:
Talk(SAY_JAINA_INTRO_9);
- events.ScheduleEvent(EVENT_INTRO_A2_15, 12000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_15, 12000);
break;
case EVENT_INTRO_A2_15:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_A2_6);
- events.ScheduleEvent(EVENT_INTRO_A2_16, 25000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_16, 25000);
break;
case EVENT_INTRO_A2_16:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_A2_7);
- events.ScheduleEvent(EVENT_INTRO_A2_17, 6000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_17, 6000);
break;
case EVENT_INTRO_A2_17:
Talk(SAY_JAINA_INTRO_10);
- events.ScheduleEvent(EVENT_INTRO_A2_18, 5000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_18, 5000);
break;
case EVENT_INTRO_A2_18:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
{
uther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
uther->AI()->Talk(SAY_UTHER_INTRO_A2_8);
}
- events.ScheduleEvent(EVENT_INTRO_A2_19, 12000);
+ _events.ScheduleEvent(EVENT_INTRO_A2_19, 12000);
break;
case EVENT_INTRO_A2_19:
Talk(SAY_JAINA_INTRO_11);
- events.ScheduleEvent(EVENT_INTRO_LK_1, 3000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_1, 3000);
break;
// H2 Intro Events
case EVENT_INTRO_H2_1:
Talk(SAY_SYLVANAS_INTRO_1);
- events.ScheduleEvent(EVENT_INTRO_H2_2, 8000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_2, 8000);
break;
case EVENT_INTRO_H2_2:
Talk(SAY_SYLVANAS_INTRO_2);
- events.ScheduleEvent(EVENT_INTRO_H2_3, 6000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_3, 6000);
break;
case EVENT_INTRO_H2_3:
Talk(SAY_SYLVANAS_INTRO_3);
me->CastSpell(me, SPELL_CAST_VISUAL, false);
me->CastSpell(me, SPELL_FROSTMOURNE_SOUNDS, true);
- instance->HandleGameObject(instance->GetData64(DATA_FROSTMOURNE), true);
- events.ScheduleEvent(EVENT_INTRO_H2_4, 6000);
+ _instance->HandleGameObject(_instance->GetData64(DATA_FROSTMOURNE), true);
+ _events.ScheduleEvent(EVENT_INTRO_H2_4, 6000);
break;
case EVENT_INTRO_H2_4:
// spawn UTHER during speach 2
if (Creature* uther = me->SummonCreature(NPC_UTHER, UtherSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
{
uther->GetMotionMaster()->MoveIdle();
- utherGUID = uther->GetGUID();
+ _utherGUID = uther->GetGUID();
}
- events.ScheduleEvent(EVENT_INTRO_H2_5, 2000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_5, 2000);
break;
case EVENT_INTRO_H2_5:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_H2_1);
- events.ScheduleEvent(EVENT_INTRO_H2_6, 11000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_6, 11000);
break;
case EVENT_INTRO_H2_6:
Talk(SAY_SYLVANAS_INTRO_4);
- events.ScheduleEvent(EVENT_INTRO_H2_7, 3000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_7, 3000);
break;
case EVENT_INTRO_H2_7:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_H2_2);
- events.ScheduleEvent(EVENT_INTRO_H2_8, 6000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_8, 6000);
break;
case EVENT_INTRO_H2_8:
Talk(SAY_SYLVANAS_INTRO_5);
- events.ScheduleEvent(EVENT_INTRO_H2_9, 5000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_9, 5000);
break;
case EVENT_INTRO_H2_9:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_H2_3);
- events.ScheduleEvent(EVENT_INTRO_H2_10, 19000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_10, 19000);
break;
case EVENT_INTRO_H2_10:
Talk(SAY_SYLVANAS_INTRO_6);
- events.ScheduleEvent(EVENT_INTRO_H2_11, 1500);
+ _events.ScheduleEvent(EVENT_INTRO_H2_11, 1500);
break;
case EVENT_INTRO_H2_11:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_H2_4);
- events.ScheduleEvent(EVENT_INTRO_H2_12, 19500);
+ _events.ScheduleEvent(EVENT_INTRO_H2_12, 19500);
break;
case EVENT_INTRO_H2_12:
Talk(SAY_SYLVANAS_INTRO_7);
- events.ScheduleEvent(EVENT_INTRO_H2_13, 2000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_13, 2000);
break;
case EVENT_INTRO_H2_13:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
{
uther->HandleEmoteCommand(EMOTE_ONESHOT_NO);
uther->AI()->Talk(SAY_UTHER_INTRO_H2_5);
}
- events.ScheduleEvent(EVENT_INTRO_H2_14, 12000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_14, 12000);
break;
case EVENT_INTRO_H2_14:
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
uther->AI()->Talk(SAY_UTHER_INTRO_H2_6);
- events.ScheduleEvent(EVENT_INTRO_H2_15, 8000);
+ _events.ScheduleEvent(EVENT_INTRO_H2_15, 8000);
break;
case EVENT_INTRO_H2_15:
Talk(SAY_SYLVANAS_INTRO_8);
- events.ScheduleEvent(EVENT_INTRO_LK_1, 2000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_1, 2000);
break;
// Remaining Intro Events common for both faction
case EVENT_INTRO_LK_1:
@@ -433,121 +553,126 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
{
lichking->SetWalk(true);
lichking->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
- //lichking->SetReactState(REACT_PASSIVE);
- lichkingGUID = lichking->GetGUID();
- events.ScheduleEvent(EVENT_OPEN_FROSTWORN_DOOR, 0);
- events.ScheduleEvent(EVENT_CLOSE_FROSTWORN_DOOR, 4000);
+ _lichkingGUID = lichking->GetGUID();
+ _events.ScheduleEvent(EVENT_OPEN_FROSTWORN_DOOR, 0);
+ _events.ScheduleEvent(EVENT_CLOSE_FROSTWORN_DOOR, 4000);
}
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
{
uther->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER);
- if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
uther->AI()->Talk(SAY_UTHER_INTRO_A2_9);
else
uther->AI()->Talk(SAY_UTHER_INTRO_H2_7);
}
- events.ScheduleEvent(EVENT_INTRO_LK_2, 10000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_2, 10000);
break;
case EVENT_INTRO_LK_2:
- if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
lichking->AI()->Talk(SAY_LK_INTRO_1);
- events.ScheduleEvent(EVENT_INTRO_LK_3, 1000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_3, 1000);
break;
case EVENT_INTRO_LK_3:
// The Lich King banishes Uther to the abyss.
- if (Creature* uther = me->GetCreature(*me, utherGUID))
+ if (Creature* uther = me->GetCreature(*me, _utherGUID))
{
uther->CastSpell(uther, SPELL_UTHER_DESPAWN, true);
uther->DespawnOrUnsummon(5000);
- utherGUID = 0;
+ _utherGUID = 0;
}
- events.ScheduleEvent(EVENT_INTRO_LK_4, 9000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_4, 9000);
break;
case EVENT_INTRO_LK_4:
// He steps forward and removes the runeblade from the heap of skulls.
- if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
{
- if (GameObject* frostmourne = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_FROSTMOURNE)))
+ if (GameObject* frostmourne = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_FROSTMOURNE)))
frostmourne->SetPhaseMask(2, true);
lichking->CastSpell(lichking, SPELL_TAKE_FROSTMOURNE, true);
lichking->CastSpell(lichking, SPELL_FROSTMOURNE_VISUAL, true);
}
- events.ScheduleEvent(EVENT_INTRO_LK_5, 8000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_5, 8000);
break;
case EVENT_INTRO_LK_5:
- if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
lichking->AI()->Talk(SAY_LK_INTRO_2);
- events.ScheduleEvent(EVENT_INTRO_LK_6, 8000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_6, 10000);
break;
case EVENT_INTRO_LK_6:
// summon Falric and Marwyn. then go back to the door
- if (Creature* falric = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_FALRIC_EVENT)))
+ if (Creature* falric = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_FALRIC_EVENT)))
{
falric->CastSpell(falric, SPELL_BOSS_SPAWN_AURA, true);
falric->SetVisible(true);
}
- if (Creature* marwyn = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MARWYN_EVENT)))
+ if (Creature* marwyn = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_MARWYN_EVENT)))
{
marwyn->CastSpell(marwyn, SPELL_BOSS_SPAWN_AURA, true);
marwyn->SetVisible(true);
}
- if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
{
lichking->AI()->Talk(SAY_LK_INTRO_3);
lichking->SetWalk(true);
lichking->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos);
}
- events.ScheduleEvent(EVENT_INTRO_LK_7, 10000);
- events.ScheduleEvent(EVENT_OPEN_FROSTWORN_DOOR, 5000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_7, 10000);
+ _events.ScheduleEvent(EVENT_OPEN_FROSTWORN_DOOR, 5000);
break;
case EVENT_INTRO_LK_7:
- if (Creature* marwyn = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MARWYN_EVENT)))
+ if (Creature* marwyn = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_MARWYN_EVENT)))
+ {
marwyn->AI()->Talk(SAY_MARWYN_INTRO_1);
- events.ScheduleEvent(EVENT_INTRO_LK_8, 1000);
+ marwyn->SetWalk(true);
+ marwyn->GetMotionMaster()->MovePoint(0, MarwynStartPos);
+ }
+ _events.ScheduleEvent(EVENT_INTRO_LK_8, 1000);
break;
case EVENT_INTRO_LK_8:
- if (Creature* falric = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_FALRIC_EVENT)))
+ if (Creature* falric = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_FALRIC_EVENT)))
+ {
falric->AI()->Talk(SAY_FALRIC_INTRO_1);
- events.ScheduleEvent(EVENT_INTRO_LK_9, 5000);
+ falric->SetWalk(true);
+ falric->GetMotionMaster()->MovePoint(0, FalricStartPos);
+ }
+ _events.ScheduleEvent(EVENT_INTRO_LK_9, 5000);
break;
case EVENT_INTRO_LK_9:
- if (Creature* falric = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_FALRIC_EVENT)))
+ if (Creature* falric = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_FALRIC_EVENT)))
falric->AI()->Talk(SAY_FALRIC_INTRO_2);
- events.ScheduleEvent(EVENT_INTRO_LK_10, 7000);
+ _instance->ProcessEvent(0, EVENT_SPAWN_WAVES);
+ _events.ScheduleEvent(EVENT_INTRO_LK_10, 4000);
break;
case EVENT_INTRO_LK_10:
- if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
Talk(SAY_JAINA_INTRO_END);
else
Talk(SAY_SYLVANAS_INTRO_END);
me->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos);
/// @todo Loralen/Koreln shall run also
- events.ScheduleEvent(EVENT_INTRO_LK_11, 5000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_11, 5000);
break;
case EVENT_INTRO_LK_11:
- if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
{
- if (instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
lichking->AI()->Talk(SAY_LK_JAINA_INTRO_END);
else
lichking->AI()->Talk(SAY_LK_SYLVANAS_INTRO_END);
}
- events.ScheduleEvent(EVENT_INTRO_END, 5000);
+ _events.ScheduleEvent(EVENT_INTRO_END, 5000);
break;
case EVENT_INTRO_END:
- if (instance)
- {
- instance->SetData(DATA_INTRO_EVENT, DONE);
- instance->ProcessEvent(0, EVENT_SPAWN_WAVES);
- }
+ if (_instance)
+ _instance->SetData(DATA_INTRO_EVENT, DONE);
// Loralen or Koreln disappearAndDie()
- if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
{
lichking->DespawnOrUnsummon(5000);
- lichkingGUID = 0;
+ _lichkingGUID = 0;
}
me->DespawnOrUnsummon(10000);
- events.ScheduleEvent(EVENT_CLOSE_FROSTWORN_DOOR, 7000);
+ _events.ScheduleEvent(EVENT_CLOSE_FROSTWORN_DOOR, 7000);
break;
case EVENT_SKIP_INTRO:
me->GetMotionMaster()->MovePoint(0, MoveThronePos);
@@ -557,19 +682,19 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
lichking->SetWalk(true);
lichking->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
lichking->SetReactState(REACT_PASSIVE);
- lichkingGUID = lichking->GetGUID();
- events.ScheduleEvent(EVENT_OPEN_FROSTWORN_DOOR, 0);
- events.ScheduleEvent(EVENT_CLOSE_FROSTWORN_DOOR, 4000);
+ _lichkingGUID = lichking->GetGUID();
+ _events.ScheduleEvent(EVENT_OPEN_FROSTWORN_DOOR, 0);
+ _events.ScheduleEvent(EVENT_CLOSE_FROSTWORN_DOOR, 4000);
}
- events.ScheduleEvent(EVENT_INTRO_LK_4, 15000);
+ _events.ScheduleEvent(EVENT_INTRO_LK_4, 15000);
break;
case EVENT_OPEN_FROSTWORN_DOOR:
- if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_FROSTWORN_DOOR)))
- instance->HandleGameObject(0 ,true, gate);
+ if (GameObject* gate = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_FROSTWORN_DOOR)))
+ _instance->HandleGameObject(0, true, gate);
break;
case EVENT_CLOSE_FROSTWORN_DOOR:
- if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_FROSTWORN_DOOR)))
- instance->HandleGameObject(0 ,false, gate);
+ if (GameObject* gate = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_FROSTWORN_DOOR)))
+ _instance->HandleGameObject(0, false, gate);
break;
}
}
@@ -581,6 +706,432 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
}
};
+class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
+{
+ public:
+ npc_jaina_or_sylvanas_escape_hor() : CreatureScript("npc_jaina_or_sylvanas_escape_hor") { }
+
+ // AI of Part2
+ struct npc_jaina_or_sylvanas_escape_horAI : public ScriptedAI
+ {
+ npc_jaina_or_sylvanas_escape_horAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = me->GetInstanceScript();
+ }
+
+ InstanceScript* _instance;
+ uint64 _lichkingGUID;
+ uint64 _walltargetGUID; // dummy
+ uint64 _icewallGUID; // object
+ uint32 _icewall; // icewall number
+ uint32 _isattackingwall; //sylvannas attacking icewall
+
+ EventMap _events;
+
+
+ void Reset() OVERRIDE
+ {
+ _events.Reset();
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ lichking->DespawnOrUnsummon(1);
+ _lichkingGUID = 0;
+ _walltargetGUID = 0;
+ _icewallGUID = 0;
+ _icewall = 0;
+ _isattackingwall = false;
+ _events.ScheduleEvent(EVENT_ESCAPE, 0);
+ }
+
+ void JustDied(Unit* /*Killer*/) OVERRIDE
+ {
+ if (_instance)
+ _instance->SetData(DATA_ESCAPE_EVENT, FAIL);
+ }
+
+ void DoAction(int32 actionID) OVERRIDE
+ {
+ switch (actionID)
+ {
+ case ACTION_START_ESCAPING: // called by InstanceScript when we need to start the escaping event
+ _events.ScheduleEvent(EVENT_ESCAPE_1, 1000);
+ break;
+ case ACTION_WALL_BROKEN:
+ _icewall++;
+ if (_icewall != 4)
+ _events.ScheduleEvent(EVENT_ESCAPE_17,3000);
+ else
+ _events.ScheduleEvent(EVENT_ESCAPE_23,3000);
+ _isattackingwall = false;
+ break;
+ }
+ }
+
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) OVERRIDE
+ {
+ player->PlayerTalkClass->ClearMenus();
+ switch (action)
+ {
+ case 0:
+ player->CLOSE_GOSSIP_MENU();
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER);
+ _events.ScheduleEvent(EVENT_ESCAPE_7, 0);
+ break;
+ }
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ _events.Update(diff);
+
+ while (uint32 event = _events.ExecuteEvent())
+ {
+ switch (event)
+ {
+ case EVENT_ESCAPE:
+ if (Creature* lichking = me->SummonCreature(NPC_LICH_KING_PART2, LichKingSpawnPos2, TEMPSUMMON_MANUAL_DESPAWN))
+ {
+ me->Attack(lichking,true);
+ lichking->Attack(me,true);
+ me->SetReactState(REACT_PASSIVE);
+ lichking->SetReactState(REACT_PASSIVE);
+ _lichkingGUID = lichking->GetGUID();
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->DoCast(me, SPELL_JAINA_ICEBARRIER);
+ else
+ me->AI()->DoCast(me, SPELL_SYLVANAS_CLOAKOFDARKNESS);
+ }
+ me->SetHealth(252000);
+ break;
+ case EVENT_ESCAPE_1:
+ _instance->SetData(DATA_ESCAPE_EVENT, IN_PROGRESS);
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ lichking->AI()->Talk(SAY_LK_ESCAPE_1);
+ else
+ lichking->AI()->Talk(SAY_LK_ESCAPE_2);
+ _events.ScheduleEvent(EVENT_ESCAPE_2, 8000);
+ }
+ break;
+ case EVENT_ESCAPE_2:
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->DoCast(me,SPELL_CAST_VISUAL,true);
+ else
+ me->AI()->DoCast(me,SPELL_SYLVANAS_JUMP,true);
+ _events.ScheduleEvent(EVENT_ESCAPE_3, 1000);
+ break;
+ case EVENT_ESCAPE_3:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ lichking->AI()->DoCast(lichking, SPELL_JAINA_ICEPRISON, true);
+ else
+ lichking->AI()->DoCast(lichking, SPELL_SYLVANAS_DARKBINDING, true);
+ }
+ _events.ScheduleEvent(EVENT_ESCAPE_4, 2000);
+ break;
+ case EVENT_ESCAPE_4:
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->Talk(SAY_JAINA_ESCAPE_1);
+ else
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_1);
+ _events.ScheduleEvent(EVENT_ESCAPE_5, 2000);
+ break;
+ case EVENT_ESCAPE_5:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ lichking->CombatStop();
+ me->GetMotionMaster()->MovePoint(0, JainaShadowThroneDoor);
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->RemoveAurasDueToSpell(SPELL_JAINA_ICEBARRIER);
+ else
+ me->RemoveAurasDueToSpell(SPELL_SYLVANAS_CLOAKOFDARKNESS);
+ _events.ScheduleEvent(EVENT_ESCAPE_6, 5000);
+ break;
+ case EVENT_ESCAPE_6:
+ me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP|UNIT_NPC_FLAG_QUESTGIVER);
+ break;
+ case EVENT_ESCAPE_7:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ lichking->RemoveAurasDueToSpell(SPELL_JAINA_ICEPRISON);
+ else
+ lichking->RemoveAurasDueToSpell(SPELL_SYLVANAS_DARKBINDING);
+ }
+ _events.ScheduleEvent(EVENT_ESCAPE_8, 1000);
+ break;
+ case EVENT_ESCAPE_8:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ lichking->HandleEmoteCommand(TEXT_EMOTE_ROAR);
+ me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[0]);
+ _events.ScheduleEvent(EVENT_ESCAPE_9, 3000);
+ break;
+ case EVENT_ESCAPE_9:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ lichking->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[0]);
+ _events.ScheduleEvent(EVENT_ESCAPE_10, 1000);
+ break;
+ case EVENT_ESCAPE_10:
+ me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[1]);
+ _events.ScheduleEvent(EVENT_ESCAPE_11, 5000);
+ break;
+ case EVENT_ESCAPE_11:
+ me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[2]);
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ lichking->GetMotionMaster()->MovePoint(0, LichKingFirstSummon);
+ _events.ScheduleEvent(EVENT_ESCAPE_12, 6000);
+ break;
+ case EVENT_ESCAPE_12:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ lichking->AI()->Talk(SAY_LK_ESCAPE_3);
+ lichking->AI()->DoCast(me, SPELL_RAISE_DEAD);
+ lichking->Attack(me,true);
+ }
+ _events.ScheduleEvent(EVENT_ESCAPE_13, 4000);
+ break;
+ case EVENT_ESCAPE_13:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ lichking->AI()->DoCast(lichking, SPELL_REMORSELESS_WINTER, true);
+ lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
+ lichking->GetMotionMaster()->MoveIdle();
+ lichking->GetMotionMaster()->MoveChase(me);
+ }
+ if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL,IceWalls[0].GetPositionX(), IceWalls[0].GetPositionY(), IceWalls[0].GetPositionZ(), IceWalls[0].GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 720000))
+ {
+ _walltargetGUID = walltarget->GetGUID();
+ walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
+ walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->Attack(walltarget,false);
+ }
+ me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[3]);
+ _events.ScheduleEvent(EVENT_ESCAPE_14, 8000);
+ break;
+ case EVENT_ESCAPE_14:
+ if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID))
+ {
+ if (GameObject* icewall = walltarget->FindNearestGameObject(GO_ICE_WALL, 50.00f))
+ {
+ _icewallGUID = icewall->GetGUID();
+ icewall->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ _instance->HandleGameObject(0, false, icewall);
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->Talk(SAY_JAINA_ESCAPE_2);
+ else
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_2);
+ }
+ }
+ _events.ScheduleEvent(EVENT_ESCAPE_15, 1000);
+ break;
+ case EVENT_ESCAPE_15:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ lichking->GetMotionMaster()->MoveIdle();
+ lichking->GetMotionMaster()->MoveChase(me);
+ lichking->SetReactState(REACT_PASSIVE);
+ }
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->DoCast(me, SPELL_JAINA_DESTROY_ICE_WALL, false);
+ else
+ {
+ _isattackingwall = true;
+ me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false);
+ _events.ScheduleEvent(EVENT_ESCAPE_16, 1000);
+ }
+ break;
+ case EVENT_ESCAPE_16:
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
+ {
+ me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false);
+ if (_isattackingwall)
+ _events.ScheduleEvent(EVENT_ESCAPE_16, 1000);
+ }
+ break;
+ case EVENT_ESCAPE_17:// ICEWALL BROKEN
+ me->GetMotionMaster()->MoveIdle();
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ lichking->StopMoving();
+ lichking->AI()->Talk(SAY_LK_ESCAPE_3);
+ lichking->AI()->DoCast(me, SPELL_RAISE_DEAD);
+ }
+ if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID))
+ walltarget->DespawnOrUnsummon(0);
+ if (GameObject* icewall = ObjectAccessor::GetGameObject(*me, _icewallGUID))
+ {
+ _instance->HandleGameObject(0 ,true, icewall);
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->RemoveAurasDueToSpell(SPELL_JAINA_DESTROY_ICE_WALL);
+ else
+ me->RemoveAurasDueToSpell(SPELL_SYLVANAS_DESTROY_ICE_WALL);
+ }
+ if (_icewall && _icewall < 4)
+ me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[_icewall + 3]);
+ _events.ScheduleEvent(EVENT_ESCAPE_18, 2000);
+ break;
+ case EVENT_ESCAPE_18:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ lichking->GetMotionMaster()->MoveIdle();
+ lichking->GetMotionMaster()->MoveChase(me);
+ }
+ _events.ScheduleEvent(EVENT_ESCAPE_19, 6000);
+ break;
+ case EVENT_ESCAPE_19:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ if (_icewall && _icewall < 4)
+ lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
+ lichking->GetMotionMaster()->MoveIdle();
+ lichking->GetMotionMaster()->MoveChase(me);
+ lichking->SetReactState(REACT_PASSIVE);
+ lichking->Attack(me,true);
+ }
+ if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[_icewall].GetPositionX(), IceWalls[_icewall].GetPositionY(), IceWalls[_icewall].GetPositionZ(), IceWalls[_icewall].GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 720000))
+ {
+ _walltargetGUID = walltarget->GetGUID();
+ walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
+ walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
+ me->Attack(walltarget,false);
+ }
+ _events.ScheduleEvent(EVENT_ESCAPE_20, 3000);
+ break;
+ case EVENT_ESCAPE_20:
+ if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID))
+ {
+ if (GameObject* icewall = walltarget->FindNearestGameObject(GO_ICE_WALL, 50.00f))
+ {
+ _icewallGUID = icewall->GetGUID();
+ _instance->HandleGameObject(0, false, icewall);
+ icewall->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ {
+ if (_icewall == 1)
+ me->AI()->Talk(SAY_JAINA_ESCAPE_3);
+ else if (_icewall == 2)
+ me->AI()->Talk(SAY_JAINA_ESCAPE_4);
+ else if (_icewall == 3)
+ me->AI()->Talk(SAY_JAINA_ESCAPE_5);
+ }
+ else if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ {
+ if (_icewall == 1)
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_3);
+ else if (_icewall == 2)
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_4);
+ else if (_icewall == 3)
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_5);
+ }
+ }
+ }
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ if (_icewall && _icewall < 3)
+ lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
+ else
+ lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
+ }
+ if (_icewall == 3)
+ _events.ScheduleEvent(EVENT_ESCAPE_21, 16000); // last wall, really far
+ else
+ _events.ScheduleEvent(EVENT_ESCAPE_21, 9000);
+ break;
+ case EVENT_ESCAPE_21:
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->DoCast(me, SPELL_JAINA_DESTROY_ICE_WALL, false);
+ else
+ {
+ me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false);
+ _isattackingwall = true;
+ _events.ScheduleEvent(EVENT_ESCAPE_22, 1000);
+ }
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ if (_icewall == 1)
+ lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
+ else if (_icewall > 1 && _icewall < 4)
+ lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
+ }
+ break;
+ case EVENT_ESCAPE_22:
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ if (_icewall >= 2 && _icewall < 4)
+ lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
+ }
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
+ {
+ me->AI()->DoCast(me, SPELL_SYLVANAS_DESTROY_ICE_WALL, false);
+ if (_isattackingwall)
+ _events.ScheduleEvent(EVENT_ESCAPE_22, 1000);
+ }
+ break;
+
+ case EVENT_ESCAPE_23:// FINAL PART
+ if (Creature* walltarget = me->GetCreature(*me, _walltargetGUID))
+ walltarget->DespawnOrUnsummon(0);
+ if (GameObject* icewall = ObjectAccessor::GetGameObject(*me, _icewallGUID))
+ {
+ _instance->HandleGameObject(0 ,true, icewall);
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ {
+ me->RemoveAurasDueToSpell(SPELL_JAINA_DESTROY_ICE_WALL);
+ me->AI()->Talk(SAY_JAINA_ESCAPE_6);
+ }
+ else
+ {
+ me->RemoveAurasDueToSpell(SPELL_SYLVANAS_DESTROY_ICE_WALL);
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_6);
+ }
+ }
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ {
+ lichking->GetMotionMaster()->MovePoint(0, LichKingFinalPos);
+ lichking->AI()->Talk(SAY_LK_ESCAPE_11);
+ }
+ me->GetMotionMaster()->MovePoint(0, NpcJainaOrSylvanasEscapeRoute[8]);
+ _events.ScheduleEvent(EVENT_ESCAPE_24, 10000);
+ break;
+ case EVENT_ESCAPE_24:
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->Talk(SAY_JAINA_ESCAPE_8);
+ else
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_8);
+ _events.ScheduleEvent(EVENT_ESCAPE_25, 5000);
+ break;
+ case EVENT_ESCAPE_25:
+ if (GameObject* cave = _instance->instance->GetGameObject(_instance->GetData64(DATA_CAVE_IN)))
+ cave->SetGoState(GO_STATE_READY);
+ _events.ScheduleEvent(EVENT_ESCAPE_26, 4000);
+ break;
+ case EVENT_ESCAPE_26:
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->AI()->Talk(SAY_JAINA_ESCAPE_10);
+ else
+ me->AI()->Talk(SAY_SYLVANAS_ESCAPE_9);
+ _events.ScheduleEvent(EVENT_ESCAPE_27, 4000);
+ break;
+ case EVENT_ESCAPE_27:
+ if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
+ me->SummonGameObject(GO_CAPTAIN_CHEST_1, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
+ else
+ me->SummonGameObject(GO_CAPTAIN_CHEST_3, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
+ me->SummonGameObject(GO_PORTAL, FinalPortalPos.GetPositionX(), FinalPortalPos.GetPositionY(), FinalPortalPos.GetPositionZ(), FinalPortalPos.GetOrientation(), 0, 0, 0, 0, 720000);
+ if (Creature* lichking = me->GetCreature(*me, _lichkingGUID))
+ lichking->DespawnOrUnsummon(1);
+ break;
+ }
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_jaina_or_sylvanas_escape_horAI(creature);
+ }
+};
+
enum TrashSpells
{
// Ghostly Priest
@@ -655,20 +1206,20 @@ enum TrashEvents
struct npc_gauntlet_trash : public ScriptedAI
{
npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature),
- instance(creature->GetInstanceScript())
+ _instance(creature->GetInstanceScript())
{
}
void Reset() OVERRIDE
{
me->CastSpell(me, SPELL_WELL_OF_SOULS, true);
- events.Reset();
+ _events.Reset();
}
void EnterEvadeMode() OVERRIDE
{
- if (instance->GetData(DATA_WAVE_COUNT) != NOT_STARTED)
- instance->SetData(DATA_WAVE_COUNT, NOT_STARTED);
+ if (_instance->GetData(DATA_WAVE_COUNT) != NOT_STARTED)
+ _instance->SetData(DATA_WAVE_COUNT, NOT_STARTED);
}
void SetData(uint32 type, uint32 value) OVERRIDE
@@ -688,8 +1239,8 @@ struct npc_gauntlet_trash : public ScriptedAI
}
protected:
- EventMap events;
- InstanceScript* instance;
+ EventMap _events;
+ InstanceScript* _instance;
uint32 InternalWaveId;
};
@@ -706,10 +1257,10 @@ public:
void EnterCombat(Unit* /*who*/) OVERRIDE
{
- events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 8000); /// @todo adjust timers
- events.ScheduleEvent(EVENT_CIRCLE_OF_DESTRUCTION, 12000);
- events.ScheduleEvent(EVENT_COWER_IN_FEAR, 10000);
- events.ScheduleEvent(EVENT_DARK_MENDING, 20000);
+ _events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 8000); /// @todo adjust timers
+ _events.ScheduleEvent(EVENT_CIRCLE_OF_DESTRUCTION, 12000);
+ _events.ScheduleEvent(EVENT_COWER_IN_FEAR, 10000);
+ _events.ScheduleEvent(EVENT_DARK_MENDING, 20000);
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -717,39 +1268,39 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ switch (_events.ExecuteEvent())
{
case EVENT_SHADOW_WORD_PAIN:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_SHADOW_WORD_PAIN);
- events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 8000);
+ _events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 8000);
break;
case EVENT_CIRCLE_OF_DESTRUCTION:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_CIRCLE_OF_DESTRUCTION);
- events.ScheduleEvent(EVENT_CIRCLE_OF_DESTRUCTION, 12000);
+ _events.ScheduleEvent(EVENT_CIRCLE_OF_DESTRUCTION, 12000);
break;
case EVENT_COWER_IN_FEAR:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_COWER_IN_FEAR);
- events.ScheduleEvent(EVENT_COWER_IN_FEAR, 10000);
+ _events.ScheduleEvent(EVENT_COWER_IN_FEAR, 10000);
break;
case EVENT_DARK_MENDING:
// find an ally with missing HP
if (Unit* target = DoSelectLowestHpFriendly(40, DUNGEON_MODE(30000, 50000)))
{
DoCast(target, SPELL_DARK_MENDING);
- events.ScheduleEvent(EVENT_DARK_MENDING, 20000);
+ _events.ScheduleEvent(EVENT_DARK_MENDING, 20000);
}
else
{
// no friendly unit with missing hp. re-check in just 5 sec.
- events.ScheduleEvent(EVENT_DARK_MENDING, 5000);
+ _events.ScheduleEvent(EVENT_DARK_MENDING, 5000);
}
break;
}
@@ -777,11 +1328,11 @@ public:
void EnterCombat(Unit* /*who*/) OVERRIDE
{
- events.ScheduleEvent(EVENT_FIREBALL, 3000); /// @todo adjust timers
- events.ScheduleEvent(EVENT_FLAMESTRIKE, 6000);
- events.ScheduleEvent(EVENT_FROSTBOLT, 9000);
- events.ScheduleEvent(EVENT_CHAINS_OF_ICE, 12000);
- events.ScheduleEvent(EVENT_HALLUCINATION, 40000);
+ _events.ScheduleEvent(EVENT_FIREBALL, 3000); /// @todo adjust timers
+ _events.ScheduleEvent(EVENT_FLAMESTRIKE, 6000);
+ _events.ScheduleEvent(EVENT_FROSTBOLT, 9000);
+ _events.ScheduleEvent(EVENT_CHAINS_OF_ICE, 12000);
+ _events.ScheduleEvent(EVENT_HALLUCINATION, 40000);
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -789,31 +1340,31 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ switch (_events.ExecuteEvent())
{
case EVENT_FIREBALL:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_FIREBALL);
- events.ScheduleEvent(EVENT_FIREBALL, 15000);
+ _events.ScheduleEvent(EVENT_FIREBALL, 15000);
break;
case EVENT_FLAMESTRIKE:
DoCast(SPELL_FLAMESTRIKE);
- events.ScheduleEvent(EVENT_FLAMESTRIKE, 15000);
+ _events.ScheduleEvent(EVENT_FLAMESTRIKE, 15000);
break;
case EVENT_FROSTBOLT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_FROSTBOLT);
- events.ScheduleEvent(EVENT_FROSTBOLT, 15000);
+ _events.ScheduleEvent(EVENT_FROSTBOLT, 15000);
break;
case EVENT_CHAINS_OF_ICE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_CHAINS_OF_ICE);
- events.ScheduleEvent(EVENT_CHAINS_OF_ICE, 15000);
+ _events.ScheduleEvent(EVENT_CHAINS_OF_ICE, 15000);
break;
case EVENT_HALLUCINATION:
DoCast(SPELL_HALLUCINATION);
@@ -864,10 +1415,10 @@ public:
void EnterCombat(Unit* /*who*/) OVERRIDE
{
- events.ScheduleEvent(EVENT_SHADOW_STEP, 8000); /// @todo adjust timers
- events.ScheduleEvent(EVENT_DEADLY_POISON, 5000);
- events.ScheduleEvent(EVENT_ENVENOMED_DAGGER_THROW, 10000);
- events.ScheduleEvent(EVENT_KIDNEY_SHOT, 12000);
+ _events.ScheduleEvent(EVENT_SHADOW_STEP, 8000); /// @todo adjust timers
+ _events.ScheduleEvent(EVENT_DEADLY_POISON, 5000);
+ _events.ScheduleEvent(EVENT_ENVENOMED_DAGGER_THROW, 10000);
+ _events.ScheduleEvent(EVENT_KIDNEY_SHOT, 12000);
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -875,29 +1426,29 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ switch (_events.ExecuteEvent())
{
case EVENT_SHADOW_STEP:
DoCast(SPELL_SHADOW_STEP);
- events.ScheduleEvent(EVENT_SHADOW_STEP, 8000);
+ _events.ScheduleEvent(EVENT_SHADOW_STEP, 8000);
break;
case EVENT_DEADLY_POISON:
DoCastVictim(SPELL_DEADLY_POISON);
- events.ScheduleEvent(EVENT_DEADLY_POISON, 10000);
+ _events.ScheduleEvent(EVENT_DEADLY_POISON, 10000);
break;
case EVENT_ENVENOMED_DAGGER_THROW:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_ENVENOMED_DAGGER_THROW);
- events.ScheduleEvent(EVENT_ENVENOMED_DAGGER_THROW, 10000);
+ _events.ScheduleEvent(EVENT_ENVENOMED_DAGGER_THROW, 10000);
break;
case EVENT_KIDNEY_SHOT:
DoCastVictim(SPELL_KIDNEY_SHOT);
- events.ScheduleEvent(EVENT_KIDNEY_SHOT, 10000);
+ _events.ScheduleEvent(EVENT_KIDNEY_SHOT, 10000);
break;
}
@@ -924,9 +1475,9 @@ public:
void EnterCombat(Unit* /*who*/) OVERRIDE
{
- events.ScheduleEvent(EVENT_SPECTRAL_STRIKE, 5000); /// @todo adjust timers
- events.ScheduleEvent(EVENT_SHIELD_BASH, 10000);
- events.ScheduleEvent(EVENT_TORTURED_ENRAGE, 15000);
+ _events.ScheduleEvent(EVENT_SPECTRAL_STRIKE, 5000); /// @todo adjust timers
+ _events.ScheduleEvent(EVENT_SHIELD_BASH, 10000);
+ _events.ScheduleEvent(EVENT_TORTURED_ENRAGE, 15000);
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -934,24 +1485,24 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ switch (_events.ExecuteEvent())
{
case EVENT_SPECTRAL_STRIKE:
DoCastVictim(SPELL_SPECTRAL_STRIKE);
- events.ScheduleEvent(EVENT_SPECTRAL_STRIKE, 5000);
+ _events.ScheduleEvent(EVENT_SPECTRAL_STRIKE, 5000);
break;
case EVENT_SHIELD_BASH:
DoCastVictim(SPELL_SHIELD_BASH);
- events.ScheduleEvent(EVENT_SHIELD_BASH, 5000);
+ _events.ScheduleEvent(EVENT_SHIELD_BASH, 5000);
break;
case EVENT_TORTURED_ENRAGE:
DoCast(SPELL_TORTURED_ENRAGE);
- events.ScheduleEvent(EVENT_TORTURED_ENRAGE, 15000);
+ _events.ScheduleEvent(EVENT_TORTURED_ENRAGE, 15000);
break;
}
@@ -978,10 +1529,10 @@ public:
void EnterCombat(Unit* /*who*/) OVERRIDE
{
- events.ScheduleEvent(EVENT_SHOOT, 2000); /// @todo adjust timers
- events.ScheduleEvent(EVENT_CURSED_ARROW, 10000);
- events.ScheduleEvent(EVENT_FROST_TRAP, 1000);
- events.ScheduleEvent(EVENT_ICE_SHOT, 15000);
+ _events.ScheduleEvent(EVENT_SHOOT, 1); /// @todo adjust timers
+ _events.ScheduleEvent(EVENT_CURSED_ARROW, 7000);
+ _events.ScheduleEvent(EVENT_FROST_TRAP, 10000);
+ _events.ScheduleEvent(EVENT_ICE_SHOT, 15000);
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -989,34 +1540,33 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ switch (_events.ExecuteEvent())
{
case EVENT_SHOOT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_SHOOT);
- events.ScheduleEvent(EVENT_SHOOT, 2000);
+ _events.ScheduleEvent(EVENT_SHOOT, 2000);
break;
case EVENT_CURSED_ARROW:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_CURSED_ARROW);
- events.ScheduleEvent(EVENT_CURSED_ARROW, 10000);
+ _events.ScheduleEvent(EVENT_CURSED_ARROW, 10000);
break;
case EVENT_FROST_TRAP:
DoCast(SPELL_FROST_TRAP);
- events.ScheduleEvent(EVENT_FROST_TRAP, 30000);
+ _events.ScheduleEvent(EVENT_FROST_TRAP, 30000);
break;
case EVENT_ICE_SHOT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_ICE_SHOT);
- events.ScheduleEvent(EVENT_ICE_SHOT, 15000);
+ _events.ScheduleEvent(EVENT_ICE_SHOT, 15000);
break;
}
-
DoMeleeAttackIfReady();
}
};
@@ -1031,9 +1581,9 @@ public:
enum GeneralEvents
{
//General
- EVENT_SHIELD = 0,
- EVENT_SPIKE = 1,
- EVENT_CLONE = 2,
+ EVENT_SHIELD = 1,
+ EVENT_SPIKE = 2,
+ EVENT_CLONE = 3,
SAY_AGGRO = 0,
SAY_DEATH = 1,
@@ -1044,7 +1594,7 @@ enum GeneralEvents
SPELL_CLONE_MODEL = 45204,
// Reflection
- EVENT_BALEFUL_STRIKE = 0,
+ EVENT_BALEFUL_STRIKE = 1,
SPELL_BALEFUL_STRIKE = 69933, // 70400 on hc
SPELL_SPIRIT_BURST = 69900, // 73046 on hc
@@ -1059,33 +1609,32 @@ public:
{
npc_frostworn_generalAI(Creature* creature) : ScriptedAI(creature)
{
- instance = me->GetInstanceScript();
+ _instance = me->GetInstanceScript();
Reset();
}
- InstanceScript* instance;
-
- EventMap events;
+ InstanceScript* _instance;
+ EventMap _events;
void Reset() OVERRIDE
{
- events.Reset();
- instance->SetData(DATA_FROSWORN_EVENT, NOT_STARTED);
+ _events.Reset();
+ _instance->SetData(DATA_FROSWORN_EVENT, NOT_STARTED);
}
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
- instance->SetData(DATA_FROSWORN_EVENT, DONE);
+ _instance->SetData(DATA_FROSWORN_EVENT, DONE);
}
void EnterCombat(Unit* /*victim*/) OVERRIDE
{
Talk(SAY_AGGRO);
- events.ScheduleEvent(EVENT_SHIELD, 5000);
- events.ScheduleEvent(EVENT_SPIKE, 14000);
- events.ScheduleEvent(EVENT_CLONE, 22000);
- instance->SetData(DATA_FROSWORN_EVENT, IN_PROGRESS);
+ _events.ScheduleEvent(EVENT_SHIELD, 5000);
+ _events.ScheduleEvent(EVENT_SPIKE, 14000);
+ _events.ScheduleEvent(EVENT_CLONE, 22000);
+ _instance->SetData(DATA_FROSWORN_EVENT, IN_PROGRESS);
}
void UpdateAI(uint32 diff) OVERRIDE
@@ -1093,29 +1642,31 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ while (uint32 event = _events.ExecuteEvent())
{
- case EVENT_SHIELD:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHIELD_THROWN);
- events.ScheduleEvent(EVENT_SHIELD, urand(8000, 12000));
- break;
- case EVENT_SPIKE:
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SPIKE);
- events.ScheduleEvent(EVENT_SPIKE, urand(15000, 20000));
- break;
- case EVENT_CLONE:
- SummonClones();
- events.ScheduleEvent(EVENT_CLONE, 60000);
- break;
+ switch (event)
+ {
+ case EVENT_SHIELD:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_SHIELD_THROWN);
+ _events.ScheduleEvent(EVENT_SHIELD, urand(8000, 12000));
+ break;
+ case EVENT_SPIKE:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_SPIKE);
+ _events.ScheduleEvent(EVENT_SPIKE, urand(15000, 20000));
+ break;
+ case EVENT_CLONE:
+ SummonClones();
+ _events.ScheduleEvent(EVENT_CLONE, 60000);
+ break;
+ }
}
-
DoMeleeAttackIfReady();
}
@@ -1133,7 +1684,6 @@ public:
reflection->setFaction(me->getFaction());
reflection->AI()->AttackStart(temp);
}
-
}
};
@@ -1155,16 +1705,16 @@ public:
Reset();
}
- EventMap events;
+ EventMap _events;
void Reset() OVERRIDE
{
- events.Reset();
+ _events.Reset();
}
void EnterCombat(Unit* /*victim*/) OVERRIDE
{
- events.ScheduleEvent(EVENT_BALEFUL_STRIKE, 3000);
+ _events.ScheduleEvent(EVENT_BALEFUL_STRIKE, 3000);
}
void JustDied(Unit* killer) OVERRIDE
@@ -1177,17 +1727,17 @@ public:
if (!UpdateVictim())
return;
- events.Update(diff);
+ _events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
- switch (events.ExecuteEvent())
+ switch (_events.ExecuteEvent())
{
case EVENT_BALEFUL_STRIKE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_BALEFUL_STRIKE);
- events.ScheduleEvent(EVENT_BALEFUL_STRIKE, urand(3000, 8000));
+ _events.ScheduleEvent(EVENT_BALEFUL_STRIKE, urand(3000, 8000));
}
DoMeleeAttackIfReady();
@@ -1207,15 +1757,13 @@ public:
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
- InstanceScript* instance = player->GetInstanceScript();
+ InstanceScript* _instance = player->GetInstanceScript();
if (player->IsGameMaster())
return true;
- if (instance->GetData(DATA_INTRO_EVENT) == NOT_STARTED)
- {
- instance->SetData(DATA_INTRO_EVENT, IN_PROGRESS);
- }
+ if (_instance->GetData(DATA_INTRO_EVENT) == NOT_STARTED)
+ _instance->SetData(DATA_INTRO_EVENT, IN_PROGRESS);
return true;
}
@@ -1228,24 +1776,24 @@ public:
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
- InstanceScript* instance = player->GetInstanceScript();
+ InstanceScript* _instance = player->GetInstanceScript();
if (player->IsGameMaster())
return true;
- if (instance->GetData(DATA_WAVE_COUNT))
+ if (_instance->GetData(DATA_WAVE_COUNT))
return true;
- if (instance->GetData(DATA_INTRO_EVENT) == DONE && instance->GetBossState(DATA_MARWYN_EVENT) != DONE)
+ if (_instance->GetData(DATA_INTRO_EVENT) == DONE && _instance->GetBossState(DATA_MARWYN_EVENT) != DONE)
{
- instance->ProcessEvent(0, EVENT_SPAWN_WAVES);
+ _instance->ProcessEvent(0, EVENT_SPAWN_WAVES);
- if (Creature* falric = player->GetCreature(*player, instance->GetData64(DATA_FALRIC_EVENT)))
+ if (Creature* falric = player->GetCreature(*player, _instance->GetData64(DATA_FALRIC_EVENT)))
{
falric->CastSpell(falric, SPELL_BOSS_SPAWN_AURA, true);
falric->SetVisible(true);
}
- if (Creature* marwyn = player->GetCreature(*player, instance->GetData64(DATA_MARWYN_EVENT)))
+ if (Creature* marwyn = player->GetCreature(*player, _instance->GetData64(DATA_MARWYN_EVENT)))
{
marwyn->CastSpell(marwyn, SPELL_BOSS_SPAWN_AURA, true);
marwyn->SetVisible(true);
@@ -1255,17 +1803,349 @@ public:
}
};
+class at_shadow_throne : public AreaTriggerScript
+{
+public:
+ at_shadow_throne() : AreaTriggerScript("at_shadow_throne") { }
+
+ bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) OVERRIDE
+ {
+ InstanceScript* _instance = player->GetInstanceScript();
+
+ if (player->IsGameMaster())
+ return true;
+
+ if (_instance->GetData(DATA_ESCAPE_EVENT) == NOT_STARTED)
+ _instance->SetData(DATA_ESCAPE_EVENT, IN_PROGRESS);
+
+ return true;
+ }
+};
+
+class npc_raging_ghoul : public CreatureScript
+{
+public:
+ npc_raging_ghoul() : CreatureScript("npc_raging_ghoul") { }
+
+ struct npc_raging_ghoulAI : public ScriptedAI
+ {
+ npc_raging_ghoulAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = me->GetInstanceScript();
+ }
+
+ InstanceScript* _instance;
+ uint32 _emergeTimer;
+ bool _doEmerge;
+ bool _doJump;
+ uint64 _leaderGUID;
+
+ void Reset() OVERRIDE
+ {
+ _emergeTimer = 4000;
+ _doEmerge = false;
+ _doJump = false;
+ if (_instance && _instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
+ _instance->SetData(DATA_SUMMONS, 1);
+
+ }
+
+ void IsSummonedBy(Unit*) OVERRIDE
+ {
+ DoCast(me, SPELL_EMERGE_VISUAL);
+ DoZoneInCombat(me, 100.00f);
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (_instance)
+ _instance->SetData(DATA_SUMMONS, 0);
+ }
+
+ void AttackStart(Unit* who) OVERRIDE
+ {
+ if (!who)
+ return;
+
+ if (!_doEmerge)
+ return;
+
+ ScriptedAI::AttackStart(who);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!_instance)
+ return;
+
+ if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
+ {
+ _leaderGUID = _instance->GetData64(DATA_ESCAPE_LEADER);
+ Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_ESCAPE_LEADER));
+
+ if (_doEmerge != true)
+ {
+ if (_emergeTimer < diff)
+ {
+ _doEmerge = true;
+ if (leader)
+ {
+ DoResetThreat();
+ me->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->MoveChase(leader);
+ }
+ }
+ else
+ _emergeTimer -= diff;
+ }
+
+ if (me->Attack(leader,true))/*(Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150.0f))*/
+ {
+ if (!_doJump && me->IsWithinDistInMap(leader, 30.0f) && !me->IsWithinDistInMap(leader, 5.0f))
+ {
+ _doJump = true;
+ DoCast(leader, SPELL_GHOUL_JUMP);
+ }
+ }
+ }
+ else if (_instance->GetData(DATA_ESCAPE_EVENT) == FAIL || _instance->GetData(DATA_ESCAPE_EVENT) == NOT_STARTED)
+ me->DespawnOrUnsummon();
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_raging_ghoulAI(creature);
+ }
+};
+
+class npc_risen_witch_doctor : public CreatureScript
+{
+public:
+ npc_risen_witch_doctor() : CreatureScript("npc_risen_witch_doctor") { }
+
+ struct npc_risen_witch_doctorAI : public ScriptedAI
+ {
+ npc_risen_witch_doctorAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = me->GetInstanceScript();
+ }
+
+ InstanceScript* _instance;
+ uint32 _emergeTimer;
+ bool _doEmerge;
+ uint64 _leaderGUID;
+ uint32 _boltTimer;
+ uint32 _boltVolleyTimer;
+ uint32 _curseTimer;
+
+ void Reset() OVERRIDE
+ {
+ _emergeTimer = 5000;
+ _boltTimer = 6000;
+ _boltVolleyTimer = 15000;
+ _curseTimer = 7000;
+ _doEmerge = false;
+ if (_instance)
+ if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
+ _instance->SetData(DATA_SUMMONS, 1);
+ }
+
+ void IsSummonedBy(Unit*) OVERRIDE
+ {
+ DoCast(me, SPELL_EMERGE_VISUAL);
+ DoZoneInCombat(me, 100.00f);
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (_instance)
+ _instance->SetData(DATA_SUMMONS, 0);
+
+ }
+
+ void AttackStart(Unit* who) OVERRIDE
+ {
+ if (!who)
+ return;
+
+ if (_doEmerge == false)
+ return;
+
+ ScriptedAI::AttackStart(who);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!_instance)
+ return;
+
+ if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
+ {
+ if (_doEmerge != true)
+ {
+ if (_emergeTimer < diff)
+ {
+ _doEmerge = true;
+ _leaderGUID = _instance->GetData64(DATA_ESCAPE_LEADER);
+
+ if (Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_ESCAPE_LEADER)))
+ {
+ DoResetThreat();
+ me->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->MoveChase(leader);
+ }
+ }
+ else
+ _emergeTimer -= diff;
+ }
+
+ if (_curseTimer < diff)
+ {
+ if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM))
+ DoCast(target, SPELL_COURSE_OF_DOOM);
+ _curseTimer = urand(10000, 15000);
+ }
+ else
+ _curseTimer -= diff;
+
+ if (_boltTimer < diff)
+ {
+ if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO))
+ DoCast(target, SPELL_SHADOW_BOLT);
+ _boltTimer = urand(2000, 3000);
+ }
+ else
+ _boltTimer -= diff;
+
+ if (_boltVolleyTimer < diff)
+ {
+ if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO))
+ DoCast(target, SPELL_SHADOW_BOLT_VOLLEY);
+ _boltVolleyTimer = urand(15000, 22000);
+ }
+ else
+ _boltVolleyTimer -= diff;
+ }
+ else if (_instance->GetData(DATA_ESCAPE_EVENT) == FAIL || _instance->GetData(DATA_ESCAPE_EVENT) == NOT_STARTED)
+ me->DespawnOrUnsummon();
+ DoMeleeAttackIfReady();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_risen_witch_doctorAI(creature);
+ }
+};
+
+
+class npc_lumbering_abomination : public CreatureScript
+{
+public:
+ npc_lumbering_abomination() : CreatureScript("npc_lumbering_abomination") { }
+
+ struct npc_lumbering_abominationAI : public ScriptedAI
+ {
+ npc_lumbering_abominationAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _instance = me->GetInstanceScript();
+ }
+
+ InstanceScript* _instance;
+ uint64 _leaderGUID;
+ bool _doWalk;
+ uint32 _strikeTimer;
+ uint32 _vomitTimer;
+
+ void Reset() OVERRIDE
+ {
+ _doWalk = false;
+ _vomitTimer = 15000;
+ _strikeTimer = 6000;
+ if (_instance)
+ if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
+ _instance->SetData(DATA_SUMMONS, 1);
+ }
+
+ void IsSummonedBy(Unit*) OVERRIDE
+ {
+ DoCast(me, SPELL_EMERGE_VISUAL);
+ DoZoneInCombat(me, 100.00f);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!_instance)
+ return;
+
+ if (_instance->GetData(DATA_ESCAPE_EVENT) == IN_PROGRESS)
+ {
+ if (_doWalk != true)
+ {
+ _doWalk = true;
+ _leaderGUID = _instance->GetData64(DATA_ESCAPE_LEADER);
+ if (Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_ESCAPE_LEADER)))
+ {
+ DoResetThreat();
+ me->GetMotionMaster()->MoveIdle();
+ me->GetMotionMaster()->MoveChase(leader);
+ }
+ }
+ if (_strikeTimer < diff)
+ {
+ if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO))
+ DoCast(target, SPELL_ABON_STRIKE);
+ _strikeTimer = urand(7000, 9000);
+ }
+ else
+ _strikeTimer -= diff;
+
+ if (_vomitTimer < diff)
+ {
+ if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO))
+ DoCast(target, SPELL_VOMIT_SPRAY);
+ _vomitTimer = urand(15000, 20000);
+ }
+ else
+ _vomitTimer -= diff;
+ }
+ else if (_instance->GetData(DATA_ESCAPE_EVENT) == FAIL || _instance->GetData(DATA_ESCAPE_EVENT) == NOT_STARTED)
+ me->DespawnOrUnsummon();
+ DoMeleeAttackIfReady();
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (_instance)
+ _instance->SetData(DATA_SUMMONS, 0);
+ }
+
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_lumbering_abominationAI(creature);
+ }
+};
+
void AddSC_halls_of_reflection()
{
+ new at_hor_intro_start();
+ new at_hor_waves_restarter();
+ new at_shadow_throne();
new npc_jaina_or_sylvanas_hor();
+ new npc_jaina_or_sylvanas_escape_hor();
new npc_ghostly_priest();
new npc_phantom_mage();
new npc_phantom_hallucination();
new npc_shadowy_mercenary();
new npc_spectral_footman();
new npc_tortured_rifleman();
- new at_hor_intro_start();
- new at_hor_waves_restarter();
+ new npc_raging_ghoul();
+ new npc_risen_witch_doctor();
+ new npc_lumbering_abomination();
new npc_frostworn_general();
new npc_spiritual_reflection();
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
index c5fe115978f..3223ecf66a5 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
@@ -39,6 +39,11 @@ enum Data
DATA_TEAM_IN_INSTANCE = 6,
DATA_FROSTMOURNE = 7,
DATA_FROSTWORN_DOOR = 8,
+ DATA_ESCAPE_EVENT = 9,
+ DATA_ESCAPE_LEADER = 10,
+ DATA_SUMMONS = 11,
+ DATA_ICEWALL = 12,
+ DATA_CAVE_IN = 13
};
enum Creatures
@@ -67,6 +72,10 @@ enum Creatures
NPC_BARTLETT = 37182, // High Captain Justin Bartlett
NPC_KORM = 37833, // Sky-Reaver Korm Blackscar
NPC_ICE_WALL = 37014, // Ice Wall Target
+
+ NPC_RAGING_GNOUL = 36940,
+ NPC_RISEN_WITCH_DOCTOR = 36941,
+ NPC_ABON = 37069
};
enum GameObjects
@@ -102,6 +111,8 @@ enum HorWorldStates
enum Actions
{
ACTION_ENTER_COMBAT,
+ ACTION_START_ESCAPING,
+ ACTION_WALL_BROKEN
};
enum TrashGeneralSpells
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
index 115127b8c2f..a026a6636d4 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
@@ -24,7 +24,9 @@
Position const JainaSpawnPos = {5236.659f, 1929.894f, 707.7781f, 0.8726646f}; // Jaina Spawn Position
Position const SylvanasSpawnPos = {5236.667f, 1929.906f, 707.7781f, 0.8377581f}; // Sylvanas Spawn Position
-Position const GeneralSpawnPos = {5415.538f, 2117.842f, 707.7781f, 3.944444f}; // Frostsworn General
+Position const GeneralSpawnPos = {5415.538f, 2117.842f, 707.7781f, 3.944444f}; // Frostsworn General
+Position const JainaSpawnPos2 = {5549.011f, 2257.041f, 733.0120f, 1.153993f}; // Jaina Spawn Position 2
+Position const SylvanasSpawnPos2 = {5549.011f, 2257.041f, 733.0120f, 1.153993f}; // Sylvanas Spawn Position 2
Position const SpawnPos[] =
{
@@ -73,7 +75,7 @@ public:
{
instance_halls_of_reflection_InstanceMapScript(Map* map) : InstanceScript(map) {}
- void Initialize()
+ void Initialize() OVERRIDE
{
SetBossNumber(MAX_ENCOUNTER);
events.Reset();
@@ -87,17 +89,19 @@ public:
_arthasDoorGUID = 0;
_teamInInstance = 0;
_waveCount = 0;
+ _mobsaticewall = 0;
_introEvent = NOT_STARTED;
_frostwornGeneral = NOT_STARTED;
+ _escapeevent = NOT_STARTED;
}
- void OnPlayerEnter(Player* player)
+ void OnPlayerEnter(Player* player) OVERRIDE
{
if (!_teamInInstance)
_teamInInstance = player->GetTeam();
}
- void OnCreatureCreate(Creature* creature)
+ void OnCreatureCreate(Creature* creature) OVERRIDE
{
Map::PlayerList const& players = instance->GetPlayers();
if (!players.isEmpty())
@@ -122,10 +126,14 @@ public:
if (Creature* general = instance->GetCreature(_frostwornGeneralGUID))
general->SetPhaseMask(1, true);
break;
+ case NPC_JAINA_PART2:
+ case NPC_SYLVANAS_PART2:
+ _jainaOrSylvanasPart2GUID = creature->GetGUID();
+ break;
}
}
- void OnCreatureRemove(Creature* creature)
+ void OnCreatureRemove(Creature* creature) OVERRIDE
{
switch (creature->GetEntry())
{
@@ -142,7 +150,7 @@ public:
}
}
- void OnGameObjectCreate(GameObject* go)
+ void OnGameObjectCreate(GameObject* go) OVERRIDE
{
switch (go->GetEntry())
{
@@ -174,16 +182,20 @@ public:
else
HandleGameObject(0, false, go);
break;
+ case GO_CAVE:
+ _caveGUID = go->GetGUID();
+ go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
+ break;
}
}
- void FillInitialWorldStates(WorldPacket& data)
+ void FillInitialWorldStates(WorldPacket& data) OVERRIDE
{
data << uint32(WORLD_STATE_HOR_WAVES_ENABLED) << uint32(0);
data << uint32(WORLD_STATE_HOR_WAVE_COUNT) << uint32(0);
}
- bool SetBossState(uint32 type, EncounterState state)
+ bool SetBossState(uint32 type, EncounterState state) OVERRIDE
{
if (!InstanceScript::SetBossState(type, state))
return false;
@@ -202,12 +214,12 @@ public:
{
HandleGameObject(_entranceDoorGUID, true);
HandleGameObject(_frostwornDoorGUID, true);
+ DoUpdateWorldState(WORLD_STATE_HOR_WAVES_ENABLED, 0);
if (Creature* general = instance->GetCreature(_frostwornGeneralGUID))
general->SetPhaseMask(1, true);
}
break;
case DATA_LICHKING_EVENT:
- break;
default:
break;
}
@@ -240,11 +252,45 @@ public:
if (data == DONE)
{
HandleGameObject(_arthasDoorGUID, true);
- // spawn Jaina part 2
- // spawn LK part 2
+ if (_teamInInstance == ALLIANCE)
+ instance->SummonCreature(NPC_JAINA_PART2, JainaSpawnPos2);
+ else
+ instance->SummonCreature(NPC_SYLVANAS_PART2, SylvanasSpawnPos2);
}
_frostwornGeneral = data;
break;
+ case DATA_ESCAPE_EVENT:
+ if (data == IN_PROGRESS)
+ {
+ if (!_escapeevent)
+ if (Creature* jaina_or_sylvanas = instance->GetCreature(_jainaOrSylvanasPart2GUID))
+ jaina_or_sylvanas->AI()->DoAction(ACTION_START_ESCAPING);
+ }
+ else if (data == NOT_STARTED)
+ {
+ if (Creature* jaina_or_sylvanas = instance->GetCreature(_jainaOrSylvanasPart2GUID))
+ jaina_or_sylvanas->DespawnOrUnsummon(1);
+ if (_teamInInstance == ALLIANCE)
+ instance->SummonCreature(NPC_JAINA_PART2, JainaSpawnPos2);
+ else
+ instance->SummonCreature(NPC_SYLVANAS_PART2, SylvanasSpawnPos2);
+ SetData(DATA_ESCAPE_EVENT,IN_PROGRESS);
+ }
+ _escapeevent = data;
+ break;
+ case DATA_SUMMONS:
+ if (data == 0)
+ {
+ _mobsaticewall--;
+ if (_mobsaticewall == 0)
+ {
+ if (Creature* jaina_or_sylvanas = instance->GetCreature(_jainaOrSylvanasPart2GUID))
+ jaina_or_sylvanas->AI()->DoAction(ACTION_WALL_BROKEN);
+ }
+ }
+ else if (data == 1)
+ _mobsaticewall++;
+ break;
}
SaveToDB();
@@ -252,7 +298,7 @@ public:
// wave scheduling,checked when wave npcs die
- void OnUnitDeath(Unit* unit)
+ void OnUnitDeath(Unit* unit) OVERRIDE
{
Creature* creature = unit->ToCreature();
if (!creature)
@@ -274,20 +320,19 @@ public:
if (!npc || !npc->IsAlive())
++deadNpcs;
}
-
// because the current npc returns IsAlive when OnUnitDeath happens
// we check if the number of dead npcs is equal to the list-1
if (deadNpcs == waveGuidList[waveId].size() - 1)
{
++_waveCount;
- events.ScheduleEvent(EVENT_NEXT_WAVE, 10000);
+ events.ScheduleEvent(EVENT_NEXT_WAVE, 3000);
}
break;
}
}
}
- void Update(uint32 diff)
+ void Update(uint32 diff) OVERRIDE
{
if (!instance->HavePlayers())
return;
@@ -302,7 +347,7 @@ public:
}
}
- void ProcessEvent(WorldObject* /*go*/, uint32 eventId)
+ void ProcessEvent(WorldObject* /*go*/, uint32 eventId) OVERRIDE
{
switch (eventId)
{
@@ -348,7 +393,7 @@ public:
}
}
}
- events.ScheduleEvent(EVENT_NEXT_WAVE, 10000);
+ events.ScheduleEvent(EVENT_NEXT_WAVE, 5000);
break;
case EVENT_ADD_WAVE:
DoUpdateWorldState(WORLD_STATE_HOR_WAVES_ENABLED, 1);
@@ -364,7 +409,7 @@ public:
{
temp->CastSpell(temp, SPELL_SPIRIT_ACTIVATE, true);
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_NOT_SELECTABLE);
- temp->AI()->DoZoneInCombat();
+ temp->AI()->DoZoneInCombat(temp, 100.00f);
}
}
}
@@ -374,13 +419,12 @@ public:
if (GetBossState(DATA_FALRIC_EVENT + bossIndex) != DONE)
{
if (Creature* boss = instance->GetCreature(bossIndex ? _marwynGUID : _falricGUID))
- if (boss->AI())
- boss->AI()->DoAction(ACTION_ENTER_COMBAT);
+ boss->AI()->DoAction(ACTION_ENTER_COMBAT);
}
else if (_waveCount != 10)
{
++_waveCount;
- events.ScheduleEvent(EVENT_NEXT_WAVE, 10000);
+ events.ScheduleEvent(EVENT_NEXT_WAVE, 5000);
}
}
break;
@@ -395,14 +439,12 @@ public:
falric->SetVisible(false);
if (Creature* marwyn = instance->GetCreature(_marwynGUID))
marwyn->SetVisible(false);
-
//despawn wave npcs
for (uint8 i = 0; i < 8; ++i)
{
for (std::set<uint64>::const_iterator itr = waveGuidList[i].begin(); itr != waveGuidList[i].end(); ++itr)
if (Creature* creature = instance->GetCreature(*itr))
creature->DespawnOrUnsummon(1);
-
waveGuidList[i].clear();
}
break;
@@ -421,6 +463,10 @@ public:
return _introEvent;
case DATA_FROSWORN_EVENT:
return _frostwornGeneral;
+ case DATA_ESCAPE_EVENT:
+ return _escapeevent;
+ case DATA_SUMMONS:
+ return _mobsaticewall;
default:
break;
}
@@ -442,6 +488,10 @@ public:
return _frostwornDoorGUID;
case DATA_FROSTMOURNE:
return _frostmourneGUID;
+ case DATA_ESCAPE_LEADER:
+ return _jainaOrSylvanasPart2GUID;
+ case DATA_CAVE_IN:
+ return _caveGUID;
default:
break;
}
@@ -449,18 +499,18 @@ public:
return 0;
}
- std::string GetSaveData()
+ std::string GetSaveData() OVERRIDE
{
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
- saveStream << "H R " << GetBossSaveData() << _introEvent << ' ' << _frostwornGeneral;
+ saveStream << "H R " << GetBossSaveData() << _introEvent << ' ' << _frostwornGeneral << _escapeevent;
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
}
- void Load(char const* in)
+ void Load(char const* in) OVERRIDE
{
if (!in)
{
@@ -499,6 +549,12 @@ public:
SetData(DATA_FROSWORN_EVENT, DONE);
else
SetData(DATA_FROSWORN_EVENT, NOT_STARTED);
+
+ loadStream >> temp;
+ if (temp == DONE)
+ SetData(DATA_ESCAPE_EVENT, DONE);
+ else
+ SetData(DATA_ESCAPE_EVENT, NOT_STARTED);
}
else
OUT_LOAD_INST_DATA_FAIL;
@@ -510,6 +566,8 @@ public:
uint64 _falricGUID;
uint64 _marwynGUID;
uint64 _jainaOrSylvanasPart1GUID;
+ uint64 _jainaOrSylvanasPart2GUID;
+ uint64 _lichkingPart1GUID;
uint64 _frostwornGeneralGUID;
uint64 _frostmourneGUID;
@@ -517,11 +575,14 @@ public:
uint64 _frostwornDoorGUID;
uint64 _arthasDoorGUID;
uint64 _escapeDoorGUID;
+ uint64 _caveGUID;
uint32 _teamInInstance;
uint32 _waveCount;
uint32 _introEvent;
uint32 _frostwornGeneral;
+ uint32 _escapeevent;
+ uint32 _mobsaticewall;
EventMap events;
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
index 45e0855bb4f..928ffd14dea 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_anubrekhan.cpp
@@ -19,24 +19,21 @@
#include "ScriptedCreature.h"
#include "naxxramas.h"
-enum Anubrekhan
+enum Says
{
SAY_AGGRO = 0,
SAY_GREET = 1,
- SAY_SLAY = 2,
-
- NPC_CRYPT_GUARD = 16573
+ SAY_SLAY = 2
};
-const Position GuardSummonPos = {3333.72f, -3476.30f, 287.1f, 6.2801f};
+Position const GuardSummonPos = {3333.72f, -3476.30f, 287.1f, 6.2801f};
enum Events
{
- EVENT_NONE,
- EVENT_IMPALE,
+ EVENT_IMPALE = 1,
EVENT_LOCUST,
EVENT_SPAWN_GUARDIAN_NORMAL,
- EVENT_BERSERK,
+ EVENT_BERSERK
};
enum Spells
@@ -47,12 +44,12 @@ enum Spells
SPELL_LOCUST_SWARM_25 = 54021,
SPELL_SUMMON_CORPSE_SCARABS_PLR = 29105, // This spawns 5 corpse scarabs on top of player
SPELL_SUMMON_CORPSE_SCARABS_MOB = 28864, // This spawns 10 corpse scarabs on top of dead guards
- SPELL_BERSERK = 27680,
+ SPELL_BERSERK = 27680
};
-enum
+enum Misc
{
- ACHIEV_TIMED_START_EVENT = 9891,
+ ACHIEV_TIMED_START_EVENT = 9891
};
class boss_anubrekhan : public CreatureScript
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
index 935d29ff783..bf3e7706f4d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp
@@ -25,7 +25,7 @@ enum Spells
H_SPELL_HATEFUL_STRIKE = 59192,
SPELL_FRENZY = 28131,
SPELL_BERSERK = 26662,
- SPELL_SLIME_BOLT = 32309,
+ SPELL_SLIME_BOLT = 32309
};
enum Yells
@@ -45,9 +45,9 @@ enum Events
EVENT_SLIME
};
-enum
+enum Misc
{
- ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT = 10286,
+ ACHIEV_MAKE_QUICK_WERK_OF_HIM_STARTING_EVENT = 10286
};
class boss_patchwerk : public CreatureScript
diff --git a/src/server/scripts/Northrend/Naxxramas/naxxramas.h b/src/server/scripts/Northrend/Naxxramas/naxxramas.h
index 10b26e278bb..a71d573bf20 100644
--- a/src/server/scripts/Northrend/Naxxramas/naxxramas.h
+++ b/src/server/scripts/Northrend/Naxxramas/naxxramas.h
@@ -84,6 +84,7 @@ enum CreaturesIds
NPC_STALAGG = 15929,
NPC_SAPPHIRON = 15989,
NPC_KEL_THUZAD = 15990,
+ NPC_CRYPT_GUARD = 16573,
NPC_NAXXRAMAS_FOLLOWER = 16505,
NPC_FOLLOWER_WORSHIPPER = 16506,
NPC_DK_UNDERSTUDY = 16803
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
index e6969d1f519..fd15cd19b37 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp
@@ -535,13 +535,13 @@ class spell_oculus_touch_the_nightmare : public SpellScriptLoader
SetHitDamage(int32(GetCaster()->CountPctFromMaxHealth(30)));
}
- void Register()
+ void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_oculus_touch_the_nightmare_SpellScript::HandleDamageCalc, EFFECT_2, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
- SpellScript* GetSpellScript() const
+ SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_oculus_touch_the_nightmare_SpellScript();
}
@@ -564,14 +564,14 @@ class spell_oculus_dream_funnel: public SpellScriptLoader
canBeRecalculated = false;
}
- void Register()
+ void Register() OVERRIDE
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE);
}
};
- AuraScript* GetAuraScript() const
+ AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_oculus_dream_funnel_AuraScript();
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index d8578b31abb..45c35741c3c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
@@ -432,11 +432,10 @@ class spell_ignis_slag_pot : public SpellScriptLoader
{
PrepareAuraScript(spell_ignis_slag_pot_AuraScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- if (!sSpellMgr->GetSpellInfo(SPELL_SLAG_POT_DAMAGE))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_SLAG_IMBUED))
+ if (!sSpellMgr->GetSpellInfo(SPELL_SLAG_POT_DAMAGE)
+ || !sSpellMgr->GetSpellInfo(SPELL_SLAG_IMBUED))
return false;
return true;
}
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
index 9c086d8bd81..fa28695ff62 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
@@ -163,6 +163,7 @@ enum TickingTimeBomb
{
SPELL_TICKING_TIME_BOMB_EXPLODE = 59687
};
+
class spell_ticking_time_bomb : public SpellScriptLoader
{
public:
@@ -172,9 +173,11 @@ class spell_ticking_time_bomb : public SpellScriptLoader
{
PrepareAuraScript(spell_ticking_time_bomb_AuraScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- return (bool) sSpellMgr->GetSpellInfo(SPELL_TICKING_TIME_BOMB_EXPLODE);
+ if (!sSpellMgr->GetSpellInfo(SPELL_TICKING_TIME_BOMB_EXPLODE))
+ return false;
+ return true;
}
void HandleOnEffectRemove(AuraEffect const* /* aurEff */, AuraEffectHandleModes /* mode */)
@@ -210,9 +213,11 @@ class spell_fixate : public SpellScriptLoader
{
PrepareSpellScript(spell_fixate_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- return (bool) sSpellMgr->GetSpellInfo(SPELL_FIXATE_TRIGGER);
+ if (!sSpellMgr->GetSpellInfo(SPELL_FIXATE_TRIGGER))
+ return false;
+ return true;
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 60ae487daa7..5e9a19685bc 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -1609,7 +1609,7 @@ class spell_random_ingredient_aura : public SpellScriptLoader
{
PrepareAuraScript(spell_random_ingredient_aura_AuraScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_RANDOM_INGREDIENT_EASY) || !sSpellMgr->GetSpellInfo(SPELL_RANDOM_INGREDIENT_MEDIUM) || !sSpellMgr->GetSpellInfo(SPELL_RANDOM_INGREDIENT_HARD))
return false;
@@ -1656,7 +1656,7 @@ class spell_random_ingredient : public SpellScriptLoader
{
PrepareSpellScript(spell_random_ingredient_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_FETCH_KNOTROOT) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PICKLED_EAGLE_EGG) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SPECKLED_GUANO) ||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_WITHERED_BATWING) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SEASONED_SLIDER_CIDER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PULVERIZED_GARGOYLE_TEETH) ||
@@ -1720,7 +1720,7 @@ class spell_pot_check : public SpellScriptLoader
{
PrepareSpellScript(spell_pot_check_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_FETCH_KNOTROOT) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PICKLED_EAGLE_EGG) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SPECKLED_GUANO) ||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_WITHERED_BATWING) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SEASONED_SLIDER_CIDER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PULVERIZED_GARGOYLE_TEETH) ||
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
index 6c0d653f213..83c0cbf04d5 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -365,9 +365,65 @@ public:
};
+enum Yor
+{
+ SPELL_DOUBLE_BREATH = 38361,
+ EVENT_DOUBLE_BREATH = 1
+};
+
+class npc_yor : public CreatureScript
+{
+public:
+ npc_yor() : CreatureScript("npc_yor") { }
+
+ struct npc_yorAI : public ScriptedAI
+ {
+ npc_yorAI(Creature* creature) : ScriptedAI(creature) {}
+
+ void Reset() OVERRIDE {}
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(6000,9000));
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_DOUBLE_BREATH:
+ if (me->IsWithinDist(me->GetVictim(), ATTACK_DISTANCE))
+ DoCastVictim(SPELL_DOUBLE_BREATH);
+ events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(6000,9000));
+ break;
+ default:
+ break;
+ }
+ }
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ EventMap events;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_yorAI(creature);
+ }
+};
+
void AddSC_boss_nexusprince_shaffar()
{
new boss_nexusprince_shaffar();
new npc_ethereal_beacon();
new npc_ethereal_apprentice();
+ new npc_yor();
}
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
new file mode 100644
index 00000000000..707f6c34a90
--- /dev/null
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
@@ -0,0 +1,172 @@
+/*
+ * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+Name: Boss_Anzu
+%Complete: 80%
+Comment:
+Category: Auchindoun, Sethekk Halls
+*/
+
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "sethekk_halls.h"
+
+enum Says
+{
+ SAY_SUMMON_BROOD = 0,
+ SAY_SPELL_BOMB = 1
+};
+
+enum Spells
+{
+ SPELL_PARALYZING_SCREECH = 40184,
+ SPELL_SPELL_BOMB = 40303,
+ SPELL_CYCLONE_OF_FEATHERS = 40321,
+ SPELL_BANISH_SELF = 42354,
+ SPELL_FLESH_RIP = 40199
+};
+
+enum Events
+{
+ EVENT_PARALYZING_SCREECH = 1,
+ EVENT_SPELL_BOMB = 2,
+ EVENT_CYCLONE_OF_FEATHERS = 3,
+ EVENT_SUMMON = 4
+};
+
+Position const PosSummonBrood[7] =
+{
+ { -118.1717f, 284.5299f, 121.2287f, 2.775074f },
+ { -98.15528f, 293.4469f, 109.2385f, 0.174533f },
+ { -99.70160f, 270.1699f, 98.27389f, 6.178465f },
+ { -69.25543f, 303.0768f, 97.84479f, 5.532694f },
+ { -87.59662f, 263.5181f, 92.70478f, 1.658063f },
+ { -73.54323f, 276.6267f, 94.25807f, 2.802979f },
+ { -81.70527f, 280.8776f, 44.58830f, 0.526849f },
+};
+
+class boss_anzu : public CreatureScript
+{
+public:
+ boss_anzu() : CreatureScript("boss_anzu") { }
+
+ struct boss_anzuAI : public BossAI
+ {
+ boss_anzuAI(Creature* creature) : BossAI(creature, DATA_ANZU) { }
+
+ void Reset() OVERRIDE
+ {
+ summon66 = false;
+ summon33 = false;
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 14000);
+ events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 5000);
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (instance)
+ instance->SetData(DATA_ANZU, DONE);
+ }
+
+ void KilledUnit(Unit* /*victim*/) OVERRIDE {}
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_PARALYZING_SCREECH:
+ DoCastVictim(SPELL_PARALYZING_SCREECH);
+ events.ScheduleEvent(EVENT_PARALYZING_SCREECH, 26000);
+ break;
+
+ case EVENT_CYCLONE_OF_FEATHERS:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_CYCLONE_OF_FEATHERS);
+ events.ScheduleEvent(EVENT_CYCLONE_OF_FEATHERS, 21000);
+ break;
+ case EVENT_SUMMON:
+ // TODO: Add pathing for Brood of Anzu
+ me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[0], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
+ me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[1], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
+ me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[2], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
+ me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
+ me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
+ me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[5], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
+ me->SummonCreature(NPC_BROOD_OF_ANZU, PosSummonBrood[6], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 46000);
+ DoCast(me, SPELL_BANISH_SELF);
+ events.ScheduleEvent(EVENT_SPELL_BOMB, 12000);
+ break;
+ case EVENT_SPELL_BOMB:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ if (target->getPowerType() == POWER_MANA)
+ {
+ DoCast(target, SPELL_SPELL_BOMB);
+ Talk(SAY_SPELL_BOMB, target->GetGUID());
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (HealthBelowPct(66) && !summon66)
+ {
+ summon66 = true;
+ Talk(SAY_SUMMON_BROOD);
+ events.ScheduleEvent(EVENT_SUMMON, 3000);
+ }
+
+ if (HealthBelowPct(33) && !summon33)
+ {
+ summon33 = true;
+ Talk(SAY_SUMMON_BROOD);
+ events.ScheduleEvent(EVENT_SUMMON, 3000);
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ bool summon66;
+ bool summon33;
+
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_anzuAI(creature);
+ }
+};
+
+void AddSC_boss_anzu()
+{
+ new boss_anzu();
+}
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
index 7a486876b3f..782db325496 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -25,14 +25,18 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "sethekk_halls.h"
-enum DarkweaverSyth
+enum Says
{
SAY_SUMMON = 0,
SAY_AGGRO = 1,
SAY_SLAY = 2,
- SAY_DEATH = 3,
+ SAY_DEATH = 3
+};
+enum Spells
+{
SPELL_FROST_SHOCK = 21401, //37865
SPELL_FLAME_SHOCK = 34354,
SPELL_SHADOW_SHOCK = 30138,
@@ -51,40 +55,26 @@ enum DarkweaverSyth
SPELL_SHADOW_BUFFET = 33529
};
+enum Events
+{
+ EVENT_FLAME_SHOCK = 1,
+ EVENT_ARCANE_SHOCK = 2,
+ EVENT_FROST_SHOCK = 3,
+ EVENT_SHADOW_SHOCK = 4,
+ EVENT_CHAIN_LIGHTNING = 5
+};
+
class boss_darkweaver_syth : public CreatureScript
{
public:
boss_darkweaver_syth() : CreatureScript("boss_darkweaver_syth") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new boss_darkweaver_sythAI(creature);
- }
-
- struct boss_darkweaver_sythAI : public ScriptedAI
+ struct boss_darkweaver_sythAI : public BossAI
{
- boss_darkweaver_sythAI(Creature* creature) : ScriptedAI(creature)
- {
- }
-
- uint32 flameshock_timer;
- uint32 arcaneshock_timer;
- uint32 frostshock_timer;
- uint32 shadowshock_timer;
- uint32 chainlightning_timer;
-
- bool summon90;
- bool summon50;
- bool summon10;
+ boss_darkweaver_sythAI(Creature* creature) : BossAI(creature, DATA_DARKWEAVER_SYTH) { }
void Reset() OVERRIDE
{
- flameshock_timer = 2000;
- arcaneshock_timer = 4000;
- frostshock_timer = 6000;
- shadowshock_timer = 8000;
- chainlightning_timer = 15000;
-
summon90 = false;
summon50 = false;
summon10 = false;
@@ -92,12 +82,21 @@ public:
void EnterCombat(Unit* /*who*/) OVERRIDE
{
+ events.ScheduleEvent(EVENT_FLAME_SHOCK, 2000);
+ events.ScheduleEvent(EVENT_ARCANE_SHOCK, 4000);
+ events.ScheduleEvent(EVENT_FROST_SHOCK, 6000);
+ events.ScheduleEvent(EVENT_SHADOW_SHOCK, 8000);
+ events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 15000);
+
Talk(SAY_AGGRO);
}
void JustDied(Unit* /*killer*/) OVERRIDE
{
Talk(SAY_DEATH);
+
+ if (instance)
+ instance->SetData(DATA_DARKWEAVER_SYTH, DONE);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
@@ -132,6 +131,42 @@ public:
if (!UpdateVictim())
return;
+ events.Update(diff);
+
+ while (uint32 eventId = events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FLAME_SHOCK:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_FLAME_SHOCK);
+ events.ScheduleEvent(EVENT_FLAME_SHOCK, urand(10000, 15000));
+ break;
+ case EVENT_ARCANE_SHOCK:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_ARCANE_SHOCK);
+ events.ScheduleEvent(EVENT_ARCANE_SHOCK, urand(10000, 15000));
+ break;
+ case EVENT_FROST_SHOCK:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_FROST_SHOCK);
+ events.ScheduleEvent(EVENT_FROST_SHOCK, urand(10000, 15000));
+ break;
+ case EVENT_SHADOW_SHOCK:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_SHADOW_SHOCK);
+ events.ScheduleEvent(EVENT_SHADOW_SHOCK, urand(10000, 15000));
+ break;
+ case EVENT_CHAIN_LIGHTNING:
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ DoCast(target, SPELL_CHAIN_LIGHTNING);
+ events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 25000);
+ break;
+ default:
+ break;
+ }
+ }
+
if (HealthBelowPct(90) && !summon90)
{
SythSummoning();
@@ -150,50 +185,19 @@ public:
summon10 = true;
}
- if (flameshock_timer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_FLAME_SHOCK);
-
- flameshock_timer = urand(10000, 15000);
- } else flameshock_timer -= diff;
-
- if (arcaneshock_timer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_ARCANE_SHOCK);
-
- arcaneshock_timer = urand(10000, 15000);
- } else arcaneshock_timer -= diff;
-
- if (frostshock_timer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_FROST_SHOCK);
-
- frostshock_timer = urand(10000, 15000);
- } else frostshock_timer -= diff;
-
- if (shadowshock_timer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_SHADOW_SHOCK);
-
- shadowshock_timer = urand(10000, 15000);
- } else shadowshock_timer -= diff;
-
- if (chainlightning_timer <= diff)
- {
- if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
- DoCast(target, SPELL_CHAIN_LIGHTNING);
-
- chainlightning_timer = 25000;
- } else chainlightning_timer -= diff;
-
DoMeleeAttackIfReady();
}
+
+ private:
+ bool summon90;
+ bool summon50;
+ bool summon10;
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_darkweaver_sythAI(creature);
+ }
};
/* ELEMENTALS */
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
index 4123da48ba6..9d3aa623011 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
@@ -27,14 +27,17 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "sethekk_halls.h"
-enum TailonkingIkiss
+enum Says
{
SAY_INTRO = 0,
SAY_AGGRO = 1,
SAY_SLAY = 2,
SAY_DEATH = 3,
- EMOTE_ARCANE_EXP = 4,
+ EMOTE_ARCANE_EXP = 4
+};
+enum Spells
+{
SPELL_BLINK = 38194,
SPELL_BLINK_TELEPORT = 38203,
SPELL_MANA_SHIELD = 38151,
@@ -53,28 +56,9 @@ class boss_talon_king_ikiss : public CreatureScript
public:
boss_talon_king_ikiss() : CreatureScript("boss_talon_king_ikiss") { }
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ struct boss_talon_king_ikissAI : public BossAI
{
- return new boss_talon_king_ikissAI(creature);
- }
-
- struct boss_talon_king_ikissAI : public ScriptedAI
- {
- boss_talon_king_ikissAI(Creature* creature) : ScriptedAI(creature)
- {
- instance = creature->GetInstanceScript();
- }
-
- InstanceScript* instance;
-
- uint32 ArcaneVolley_Timer;
- uint32 Sheep_Timer;
- uint32 Blink_Timer;
- uint32 Slow_Timer;
-
- bool ManaShield;
- bool Blink;
- bool Intro;
+ boss_talon_king_ikissAI(Creature* creature) : BossAI(creature, DATA_TALON_KING_IKISS) { }
void Reset() OVERRIDE
{
@@ -120,7 +104,7 @@ public:
Talk(SAY_DEATH);
if (instance)
- instance->SetData(DATA_IKISSDOOREVENT, DONE);
+ instance->SetData(DATA_TALON_KING_IKISS, DONE);
}
void KilledUnit(Unit* /*victim*/) OVERRIDE
@@ -204,8 +188,22 @@ public:
if (!Blink)
DoMeleeAttackIfReady();
}
+
+ private:
+ uint32 ArcaneVolley_Timer;
+ uint32 Sheep_Timer;
+ uint32 Blink_Timer;
+ uint32 Slow_Timer;
+
+ bool ManaShield;
+ bool Blink;
+ bool Intro;
};
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new boss_talon_king_ikissAI(creature);
+ }
};
void AddSC_boss_talon_king_ikiss()
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
index d44789f4c39..67f4dc1423a 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
@@ -27,16 +27,6 @@ EndScriptData */
#include "InstanceScript.h"
#include "sethekk_halls.h"
-enum Creatures
-{
- NPC_ANZU = 23035
-};
-
-enum GameObjects
-{
- GO_IKISS_DOOR = 177203
-};
-
class instance_sethekk_halls : public InstanceMapScript
{
public:
@@ -49,49 +39,102 @@ public:
struct instance_sethekk_halls_InstanceMapScript : public InstanceScript
{
- instance_sethekk_halls_InstanceMapScript(Map* map) : InstanceScript(map) {}
-
- uint32 AnzuEncounter;
- uint64 m_uiIkissDoorGUID;
+ instance_sethekk_halls_InstanceMapScript(Map* map) : InstanceScript(map)
+ {
+ SetBossNumber(EncounterCount);
+ }
void Initialize()
{
- AnzuEncounter = NOT_STARTED;
- m_uiIkissDoorGUID = 0;
+ SetBossState(DATA_ANZU, NOT_STARTED);
+ iIkissDoorGUID = 0;
}
void OnCreatureCreate(Creature* creature)
{
if (creature->GetEntry() == NPC_ANZU)
{
- if (AnzuEncounter >= IN_PROGRESS)
+ if (GetBossState(DATA_ANZU) == DONE)
creature->DisappearAndDie();
else
- AnzuEncounter = IN_PROGRESS;
+ SetBossState(DATA_ANZU, IN_PROGRESS);
}
}
void OnGameObjectCreate(GameObject* go)
{
if (go->GetEntry() == GO_IKISS_DOOR)
- m_uiIkissDoorGUID = go->GetGUID();
+ iIkissDoorGUID = go->GetGUID();
}
- void SetData(uint32 type, uint32 data) OVERRIDE
+ bool SetBossState(uint32 type, EncounterState state)
{
+ if (!InstanceScript::SetBossState(type, state))
+ return false;
+
switch (type)
{
- case DATA_IKISSDOOREVENT:
- if (data == DONE)
- DoUseDoorOrButton(m_uiIkissDoorGUID, DAY*IN_MILLISECONDS);
+ case DATA_DARKWEAVER_SYTH:
+ break;
+ case DATA_TALON_KING_IKISS:
+ if (state == DONE)
+ DoUseDoorOrButton(iIkissDoorGUID, DAY*IN_MILLISECONDS);
+ break;
+ case DATA_ANZU:
break;
- case TYPE_ANZU_ENCOUNTER:
- AnzuEncounter = data;
+ default:
break;
}
+
+ return true;
}
- };
+ std::string GetSaveData()
+ {
+ OUT_SAVE_INST_DATA;
+
+ std::ostringstream saveStream;
+ saveStream << "S H " << GetBossSaveData();
+
+ OUT_SAVE_INST_DATA_COMPLETE;
+ return saveStream.str();
+ }
+
+ void Load(const char* str)
+ {
+ if (!str)
+ {
+ OUT_LOAD_INST_DATA_FAIL;
+ return;
+ }
+
+ OUT_LOAD_INST_DATA(str);
+
+ char dataHead1, dataHead2;
+
+ std::istringstream loadStream(str);
+ loadStream >> dataHead1 >> dataHead2;
+
+ if (dataHead1 == 'S' && dataHead2 == 'H')
+ {
+ for (uint32 i = 0; i < EncounterCount; ++i)
+ {
+ uint32 tmpState;
+ loadStream >> tmpState;
+ if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
+ tmpState = NOT_STARTED;
+ SetBossState(i, EncounterState(tmpState));
+ }
+ }
+ else
+ OUT_LOAD_INST_DATA_FAIL;
+
+ OUT_LOAD_INST_DATA_COMPLETE;
+ }
+
+ protected:
+ uint64 iIkissDoorGUID;
+ };
};
void AddSC_instance_sethekk_halls()
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
index 15ffda4ada9..86789e9982f 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/sethekk_halls.h
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -19,10 +18,24 @@
#ifndef DEF_SETHEKK_HALLS_H
#define DEF_SETHEKK_HALLS_H
+uint32 const EncounterCount = 3;
+
enum DataTypes
{
- DATA_IKISSDOOREVENT = 1,
- TYPE_ANZU_ENCOUNTER = 2,
+ DATA_DARKWEAVER_SYTH = 0,
+ DATA_TALON_KING_IKISS = 1,
+ DATA_ANZU = 2
+};
+
+enum CreatureIds
+{
+ NPC_ANZU = 23035,
+ NPC_BROOD_OF_ANZU = 23132
};
-#endif
+enum GameObjectIds
+{
+ GO_IKISS_DOOR = 177203
+};
+
+#endif
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 3d7a143d59e..290641437f3 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -903,7 +903,7 @@ public:
{
PrepareAuraScript(spell_boss_lady_malande_shield_AuraScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
return sSpellMgr->GetSpellInfo(SPELL_REFLECTIVE_SHIELD_T);
}
diff --git a/src/server/scripts/Outland/CMakeLists.txt b/src/server/scripts/Outland/CMakeLists.txt
index f038af07634..d7b863da0db 100644
--- a/src/server/scripts/Outland/CMakeLists.txt
+++ b/src/server/scripts/Outland/CMakeLists.txt
@@ -76,6 +76,7 @@ set(scripts_STAT_SRCS
Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+ Outland/Auchindoun/SethekkHalls/boss_anzu.cpp
Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
Outland/Auchindoun/SethekkHalls/sethekk_halls.h
Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 597cccda102..3c8627c7058 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -519,7 +519,7 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader
{
PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer_AuraScript);
- bool Validate(SpellInfo const* /*SpellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_WRATH_OF_THE_ASTROMANCER_DOT))
return false;
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index 7c419243c20..7e99275adbd 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -936,10 +936,10 @@ public:
## npc_maxx_a_million
######*/
-enum
+enum MaxxAMillion
{
- QUEST_MARK_V_IS_ALIVE = 10191,
- GO_DRAENEI_MACHINE = 183771
+ QUEST_MARK_V_IS_ALIVE = 10191,
+ GO_DRAENEI_MACHINE = 183771
};
class npc_maxx_a_million_escort : public CreatureScript
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 2e6594714c9..98ed2c8b331 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -619,7 +619,7 @@ class spell_gen_cannibalize : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_cannibalize_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_CANNIBALIZE_TRIGGERED))
return false;
@@ -672,7 +672,7 @@ class spell_gen_chaos_blast : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_chaos_blast_SpellScript)
- bool Validate(SpellInfo const* /*SpellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_CHAOS_BLAST))
return false;
@@ -779,7 +779,7 @@ class spell_gen_clone_weapon_aura : public SpellScriptLoader
uint32 prevItem;
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_AURA) ||
!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_2_AURA) ||
@@ -1021,9 +1021,10 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader
class spell_gen_dalaran_disguise_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gen_dalaran_disguise_SpellScript);
- bool Validate(SpellInfo const* spellEntry) OVERRIDE
+
+ bool Validate(SpellInfo const* spellInfo) OVERRIDE
{
- switch (spellEntry->Id)
+ switch (spellInfo->Id)
{
case SPELL_SUNREAVER_DISGUISE_TRIGGER:
if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_FEMALE) ||
@@ -1093,7 +1094,7 @@ class spell_gen_damage_reduction_aura : public SpellScriptLoader
{
PrepareAuraScript(spell_gen_damage_reduction_AuraScript);
- bool Validate(SpellInfo const* /*SpellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DAMAGE_REDUCTION_AURA))
return false;
@@ -1148,7 +1149,7 @@ class spell_gen_defend : public SpellScriptLoader
{
PrepareAuraScript(spell_gen_defend_AuraScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_1))
return false;
@@ -1270,7 +1271,7 @@ class spell_gen_divine_storm_cd_reset : public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DIVINE_STORM))
return false;
@@ -1348,7 +1349,7 @@ class spell_gen_dummy_trigger : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_dummy_trigger_SpellScript);
- bool Validate(SpellInfo const* /*SpellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PERSISTANT_SHIELD_TRIGGERED) ||
!sSpellMgr->GetSpellInfo(SPELL_PERSISTANT_SHIELD))
@@ -1441,7 +1442,7 @@ class spell_gen_elune_candle : public SpellScriptLoader
class spell_gen_elune_candle_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gen_elune_candle_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HEAD) ||
!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_CHEST) ||
@@ -1508,7 +1509,7 @@ class spell_gen_gadgetzan_transporter_backfire : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_gadgetzan_transporter_backfire_SpellScript)
- bool Validate(SpellInfo const* /*SpellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_MALFUNCTION_POLYMORPH) ||
!sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_EVIL_TWIN) ||
@@ -1609,7 +1610,7 @@ class spell_gen_gnomish_transporter : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_gnomish_transporter_SpellScript)
- bool Validate(SpellInfo const* /*SpellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_SUCCESS) ||
!sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_FAILURE))
@@ -3204,7 +3205,7 @@ class spell_gen_summon_tournament_mount : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_summon_tournament_mount_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_LANCE_EQUIPPED))
return false;
@@ -3253,7 +3254,7 @@ class spell_gen_tournament_duel : public SpellScriptLoader
{
PrepareSpellScript(spell_gen_tournament_duel_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_ON_TOURNAMENT_MOUNT) ||
!sSpellMgr->GetSpellInfo(SPELL_MOUNTED_DUEL))
@@ -3345,7 +3346,7 @@ class spell_pvp_trinket_wotf_shared_cd : public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER) ||
!sSpellMgr->GetSpellInfo(SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER_WOTF))
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 09be427d330..9f7386ab7e6 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -47,7 +47,7 @@ class spell_item_trigger_spell : public SpellScriptLoader
public:
spell_item_trigger_spell_SpellScript(uint32 triggeredSpellId) : SpellScript(), _triggeredSpellId(triggeredSpellId) { }
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(_triggeredSpellId))
return false;
@@ -322,7 +322,7 @@ class spell_item_deviate_fish : public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
for (uint32 spellId = SPELL_SLEEPY; spellId <= SPELL_HEALTHY_SPIRIT; ++spellId)
if (!sSpellMgr->GetSpellInfo(spellId))
@@ -367,7 +367,7 @@ class spell_item_flask_of_the_north : public SpellScriptLoader
{
PrepareSpellScript(spell_item_flask_of_the_north_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_SP) || !sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_AP) || !sSpellMgr->GetSpellInfo(SPELL_FLASK_OF_THE_NORTH_STR))
return false;
@@ -436,7 +436,7 @@ class spell_item_gnomish_death_ray : public SpellScriptLoader
{
PrepareSpellScript(spell_item_gnomish_death_ray_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_SELF) || !sSpellMgr->GetSpellInfo(SPELL_GNOMISH_DEATH_RAY_TARGET))
return false;
@@ -492,7 +492,7 @@ class spell_item_make_a_wish : public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_BLESSING) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_MIGHTY_MR_PINCHY) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_FURIOUS_MR_PINCHY) || !sSpellMgr->GetSpellInfo(SPELL_TINY_MAGICAL_CRAWDAD) || !sSpellMgr->GetSpellInfo(SPELL_MR_PINCHYS_GIFT))
return false;
@@ -646,7 +646,7 @@ class spell_item_net_o_matic : public SpellScriptLoader
{
PrepareSpellScript(spell_item_net_o_matic_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED1) || !sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED2) || !sSpellMgr->GetSpellInfo(SPELL_NET_O_MATIC_TRIGGERED3))
return false;
@@ -703,7 +703,7 @@ class spell_item_noggenfogger_elixir : public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1) || !sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2) || !sSpellMgr->GetSpellInfo(SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3))
return false;
@@ -788,7 +788,7 @@ class spell_item_savory_deviate_delight : public SpellScriptLoader
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
for (uint32 spellId = SPELL_FLIP_OUT_MALE; spellId <= SPELL_YAAARRRR_FEMALE; ++spellId)
if (!sSpellMgr->GetSpellInfo(spellId))
@@ -1112,7 +1112,7 @@ class spell_item_six_demon_bag : public SpellScriptLoader
{
PrepareSpellScript(spell_item_six_demon_bag_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_FROSTBOLT) || !sSpellMgr->GetSpellInfo(SPELL_POLYMORPH) || !sSpellMgr->GetSpellInfo(SPELL_SUMMON_FELHOUND_MINION) || !sSpellMgr->GetSpellInfo(SPELL_FIREBALL) || !sSpellMgr->GetSpellInfo(SPELL_CHAIN_LIGHTNING) || !sSpellMgr->GetSpellInfo(SPELL_ENVELOPING_WINDS))
return false;
@@ -1213,7 +1213,7 @@ class spell_item_underbelly_elixir : public SpellScriptLoader
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
}
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED1) || !sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED2) || !sSpellMgr->GetSpellInfo(SPELL_UNDERBELLY_ELIXIR_TRIGGERED3))
return false;
@@ -1491,7 +1491,7 @@ class spell_item_vanquished_clutches : public SpellScriptLoader
{
PrepareSpellScript(spell_item_vanquished_clutches_SpellScript);
- bool Validate(SpellInfo const* /*spellEntry*/) OVERRIDE
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_CRUSHER) || !sSpellMgr->GetSpellInfo(SPELL_CONSTRICTOR) || !sSpellMgr->GetSpellInfo(SPELL_CORRUPTOR))
return false;
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index d87278cefc0..fcf87e9bfac 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -1785,6 +1785,96 @@ class spell_q12847_summon_soul_moveto_bunny : public SpellScriptLoader
}
};
+enum BearFlankMaster
+{
+ SPELL_BEAR_FLANK_MASTER = 56565,
+ SPELL_CREATE_BEAR_FLANK = 56566,
+ SPELL_BEAR_FLANK_FAIL = 56569
+};
+
+class spell_q13011_bear_flank_master : public SpellScriptLoader
+{
+ public:
+ spell_q13011_bear_flank_master() : SpellScriptLoader("spell_q13011_bear_flank_master") { }
+
+ class spell_q13011_bear_flank_master_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q13011_bear_flank_master_SpellScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_BEAR_FLANK_MASTER) || !sSpellMgr->GetSpellInfo(SPELL_CREATE_BEAR_FLANK))
+ return false;
+ return true;
+ }
+
+ bool Load() OVERRIDE
+ {
+ return GetCaster()->GetTypeId() == TYPEID_UNIT;
+ }
+
+ void HandleScript(SpellEffIndex effIndex)
+ {
+ bool failed = RAND(0, 1); // 50% chance
+ Creature* creature = GetCaster()->ToCreature();
+ if (Player* player = GetHitPlayer())
+ {
+ if (failed)
+ {
+ player->CastSpell(creature, SPELL_BEAR_FLANK_FAIL);
+ creature->AI()->Talk(0, player->GetGUID());
+ }
+ else
+ player->CastSpell(player, SPELL_CREATE_BEAR_FLANK);
+ }
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_q13011_bear_flank_master_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_q13011_bear_flank_master_SpellScript();
+ }
+};
+
+class spell_q13086_cannons_target : public SpellScriptLoader
+{
+ public:
+ spell_q13086_cannons_target() : SpellScriptLoader("spell_q13086_cannons_target") { }
+
+ class spell_q13086_cannons_target_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q13086_cannons_target_SpellScript);
+
+ bool Validate(SpellInfo const* spellInfo) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_0].CalcValue()))
+ return false;
+ return true;
+ }
+
+ void HandleEffectDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (WorldLocation const* pos = GetExplTargetDest())
+ GetCaster()->CastSpell(pos->GetPositionX(), pos->GetPositionY(), pos->GetPositionZ(), GetEffectValue(), true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHit += SpellEffectFn(spell_q13086_cannons_target_SpellScript::HandleEffectDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_q13086_cannons_target_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -1829,4 +1919,6 @@ void AddSC_quest_spell_scripts()
new spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy();
new spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon();
new spell_q12847_summon_soul_moveto_bunny();
+ new spell_q13011_bear_flank_master();
+ new spell_q13086_cannons_target();
}
diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp
index 774c4e63071..94e448bd9bc 100644
--- a/src/server/scripts/World/achievement_scripts.cpp
+++ b/src/server/scripts/World/achievement_scripts.cpp
@@ -16,12 +16,8 @@
*/
#include "ScriptMgr.h"
-
-#include "BattlegroundAB.h"
-#include "BattlegroundWS.h"
-#include "BattlegroundIC.h"
#include "BattlegroundSA.h"
-#include "BattlegroundAV.h"
+#include "BattlegroundIC.h"
#include "Vehicle.h"
#include "Player.h"
#include "Creature.h"
@@ -31,19 +27,12 @@ class achievement_resilient_victory : public AchievementCriteriaScript
public:
achievement_resilient_victory() : AchievementCriteriaScript("achievement_resilient_victory") { }
- bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
+ bool OnCheck(Player* source, Unit* target) OVERRIDE
{
- Battleground* bg = source->GetBattleground();
- if (!bg)
- return false;
-
- if (bg->GetTypeID(true) != BATTLEGROUND_AB)
- return false;
-
- if (!static_cast<BattlegroundAB*>(bg)->IsTeamScores500Disadvantage(source->GetTeam()))
- return false;
+ if (Battleground* bg = source->GetBattleground())
+ return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_RESILIENT_VICTORY, source, target);
- return true;
+ return false;
}
};
@@ -54,14 +43,10 @@ class achievement_bg_control_all_nodes : public AchievementCriteriaScript
bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
{
- Battleground* bg = source->GetBattleground();
- if (!bg)
- return false;
-
- if (!bg->IsAllNodesConrolledByTeam(source->GetTeam()))
- return false;
+ if (Battleground* bg = source->GetBattleground())
+ return bg->IsAllNodesControlledByTeam(source->GetTeam());
- return true;
+ return false;
}
};
@@ -72,21 +57,9 @@ class achievement_save_the_day : public AchievementCriteriaScript
bool OnCheck(Player* source, Unit* target) OVERRIDE
{
- if (!target)
- return false;
-
- if (Player const* player = target->ToPlayer())
- {
- Battleground* bg = source->GetBattleground();
- if (!bg)
- return false;
+ if (Battleground* bg = source->GetBattleground())
+ return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_SAVE_THE_DAY, source, target);
- if (bg->GetTypeID(true) != BATTLEGROUND_WS)
- return false;
-
- if (static_cast<BattlegroundWS*>(bg)->GetFlagState(player->GetTeam()) == BG_WS_FLAG_STATE_ON_BASE)
- return true;
- }
return false;
}
};
@@ -200,17 +173,10 @@ class achievement_everything_counts : public AchievementCriteriaScript
public:
achievement_everything_counts() : AchievementCriteriaScript("achievement_everything_counts") { }
- bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
+ bool OnCheck(Player* source, Unit* target) OVERRIDE
{
- Battleground* bg = source->GetBattleground();
- if (!bg)
- return false;
-
- if (bg->GetTypeID(true) != BATTLEGROUND_AV)
- return false;
-
- if (static_cast<BattlegroundAV*>(bg)->IsBothMinesControlledByTeam(source->GetTeam()))
- return true;
+ if (Battleground* bg = source->GetBattleground())
+ return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_EVERYTHING_COUNTS, source, target);
return false;
}
@@ -221,17 +187,10 @@ class achievement_bg_av_perfection : public AchievementCriteriaScript
public:
achievement_bg_av_perfection() : AchievementCriteriaScript("achievement_bg_av_perfection") { }
- bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
+ bool OnCheck(Player* source, Unit* target) OVERRIDE
{
- Battleground* bg = source->GetBattleground();
- if (!bg)
- return false;
-
- if (bg->GetTypeID(true) != BATTLEGROUND_AV)
- return false;
-
- if (static_cast<BattlegroundAV*>(bg)->IsAllTowersControlledAndCaptainAlive(source->GetTeam()))
- return true;
+ if (Battleground* bg = source->GetBattleground())
+ return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_AV_PERFECTION, source, target);
return false;
}
@@ -240,24 +199,12 @@ class achievement_bg_av_perfection : public AchievementCriteriaScript
class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript
{
public:
- achievement_bg_sa_defense_of_ancients() : AchievementCriteriaScript("achievement_bg_sa_defense_of_ancients")
- {
- }
+ achievement_bg_sa_defense_of_ancients() : AchievementCriteriaScript("achievement_bg_sa_defense_of_ancients") { }
- bool OnCheck(Player* player, Unit* /*target*/) OVERRIDE
+ bool OnCheck(Player* source, Unit* target) OVERRIDE
{
- if (!player)
- return false;
-
- Battleground* battleground = player->GetBattleground();
- if (!battleground)
- return false;
-
- if (player->GetTeamId() == static_cast<BattlegroundSA*>(battleground)->Attackers)
- return false;
-
- if (!static_cast<BattlegroundSA*>(battleground)->gateDestroyed)
- return true;
+ if (Battleground* bg = source->GetBattleground())
+ return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_DEFENSE_OF_THE_ANCIENTS, source, target);
return false;
}
@@ -299,17 +246,10 @@ class achievement_not_even_a_scratch : public AchievementCriteriaScript
public:
achievement_not_even_a_scratch() : AchievementCriteriaScript("achievement_not_even_a_scratch") { }
- bool OnCheck(Player* source, Unit* /*target*/) OVERRIDE
+ bool OnCheck(Player* source, Unit* target) OVERRIDE
{
- if (!source)
- return false;
-
- Battleground* battleground = source->GetBattleground();
- if (!battleground)
- return false;
-
- if (static_cast<BattlegroundSA*>(battleground)->notEvenAScratch(source->GetTeam()))
- return true;
+ if (Battleground* bg = source->GetBattleground())
+ return bg->CheckAchievementCriteriaMeet(BG_CRITERIA_CHECK_NOT_EVEN_A_SCRATCH, source, target);
return false;
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 77bfb2956e8..f3d86c47b21 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -273,7 +273,7 @@ public:
## npc_lunaclaw_spirit
######*/
-enum
+enum LunaclawSpirit
{
QUEST_BODY_HEART_A = 6001,
QUEST_BODY_HEART_H = 6002,