Merge remote-tracking branch 'origin/master' into 4.3.4
This commit is contained in:
commit
6885eb4f2c
87 files changed
+4785
-639
No files matched your search
@@ -239,7 +239,7 @@ public:
|
||||
ticket->SetCompleted();
|
||||
ticket->SaveToDB(trans);
|
||||
|
||||
std::string msg = ticket->FormatMessageString(*handler, NULL, NULL,
|
||||
std::string msg = ticket->FormatMessageString(*handler, NULL, NULL,
|
||||
NULL, NULL, handler->GetSession() ? handler->GetSession()->GetPlayer()->GetName().c_str() : "Console");
|
||||
handler->SendGlobalGMSysMessage(msg.c_str());
|
||||
sTicketMgr->UpdateLastChange();
|
||||
|
||||
@@ -23,19 +23,16 @@ enum Spells
|
||||
SPELL_ARCANE_EXPLOSION = 46608,
|
||||
SPELL_CONE_OF_COLD = 38384,
|
||||
SPELL_FIREBALL = 46988,
|
||||
SPELL_FROSTBOLT = 46987
|
||||
SPELL_FROSTBOLT = 46987,
|
||||
SPELL_SUMMON_WATER_ELEMENTAL = 45067,
|
||||
SPELL_ICEBLOCK = 46604
|
||||
};
|
||||
|
||||
enum Yells
|
||||
enum Texts
|
||||
{
|
||||
YELL_AGGRO = 0,
|
||||
YELL_EVADE = 1,
|
||||
YELL_SALVATION = 2,
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_WATER_ELEMENTAL = 25040
|
||||
SAY_AGGRO = 0,
|
||||
SAY_EVADE = 1,
|
||||
SAY_SALVATION = 2,
|
||||
};
|
||||
|
||||
enum Action
|
||||
@@ -43,64 +40,15 @@ enum Action
|
||||
ACTION_BUFF_YELL = -30001 // shared from Battleground
|
||||
};
|
||||
|
||||
enum WaterElementalSpells
|
||||
enum Events
|
||||
{
|
||||
SPELL_WATERBOLT = 46983
|
||||
};
|
||||
|
||||
class npc_water_elemental : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_water_elemental() : CreatureScript("npc_water_elemental") { }
|
||||
|
||||
struct npc_water_elementalAI : public ScriptedAI
|
||||
{
|
||||
npc_water_elementalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
waterBoltTimer = 3 * IN_MILLISECONDS;
|
||||
resetTimer = 5 * IN_MILLISECONDS;
|
||||
balindaGUID = 0;
|
||||
}
|
||||
|
||||
uint32 waterBoltTimer;
|
||||
uint64 balindaGUID;
|
||||
uint32 resetTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
waterBoltTimer = 3 * IN_MILLISECONDS;
|
||||
resetTimer = 5 * IN_MILLISECONDS;
|
||||
balindaGUID = 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (waterBoltTimer < diff)
|
||||
{
|
||||
DoCastVictim(SPELL_WATERBOLT);
|
||||
waterBoltTimer = 5 * IN_MILLISECONDS;
|
||||
} else waterBoltTimer -= diff;
|
||||
|
||||
// check if creature is not outside of building
|
||||
if (resetTimer < diff)
|
||||
{
|
||||
if (Creature* pBalinda = ObjectAccessor::GetCreature(*me, balindaGUID))
|
||||
if (me->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
|
||||
EnterEvadeMode();
|
||||
resetTimer = 5 * IN_MILLISECONDS;
|
||||
} else resetTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_water_elementalAI(creature);
|
||||
}
|
||||
// Balinda
|
||||
EVENT_ARCANE_EXPLOSION = 1,
|
||||
EVENT_CONE_OF_COLD,
|
||||
EVENT_FIREBOLT,
|
||||
EVENT_FROSTBOLT,
|
||||
EVENT_SUMMON_WATER_ELEMENTAL,
|
||||
EVENT_CHECK_RESET, // Checks if Balinda or the Water Elemental are outside of building.
|
||||
};
|
||||
|
||||
class boss_balinda : public CreatureScript
|
||||
@@ -117,23 +65,10 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
|
||||
coneOfColdTimer = 8 * IN_MILLISECONDS;
|
||||
fireBoltTimer = 1 * IN_MILLISECONDS;
|
||||
frostboltTimer = 4 * IN_MILLISECONDS;
|
||||
resetTimer = 5 * IN_MILLISECONDS;
|
||||
waterElementalTimer = 0;
|
||||
WaterElementalGUID = 0;
|
||||
HasCastIceblock = false;
|
||||
}
|
||||
|
||||
uint32 arcaneExplosionTimer;
|
||||
uint32 coneOfColdTimer;
|
||||
uint32 fireBoltTimer;
|
||||
uint32 frostboltTimer;
|
||||
uint32 resetTimer;
|
||||
uint32 waterElementalTimer;
|
||||
|
||||
SummonList summons;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
@@ -143,22 +78,28 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
Talk(YELL_AGGRO);
|
||||
}
|
||||
|
||||
void JustRespawned() override
|
||||
{
|
||||
Reset();
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS));
|
||||
events.ScheduleEvent(EVENT_CONE_OF_COLD, 8 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_FIREBOLT, 1 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_FROSTBOLT, 4 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_SUMMON_WATER_ELEMENTAL, 3 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_CHECK_RESET, 5 * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
ENSURE_AI(npc_water_elemental::npc_water_elementalAI, summoned->AI())->balindaGUID = me->GetGUID();
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
|
||||
summoned->setFaction(me->getFaction());
|
||||
WaterElementalGUID = summoned->GetGUID();
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summoned) override
|
||||
{
|
||||
summons.Despawn(summoned);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
summons.DespawnAll();
|
||||
@@ -167,7 +108,16 @@ public:
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
if (actionId == ACTION_BUFF_YELL)
|
||||
Talk(YELL_AGGRO);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(40, damage) && !HasCastIceblock)
|
||||
{
|
||||
DoCast(SPELL_ICEBLOCK);
|
||||
HasCastIceblock = true;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -175,50 +125,60 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (waterElementalTimer < diff)
|
||||
{
|
||||
if (summons.empty())
|
||||
me->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45 * IN_MILLISECONDS);
|
||||
waterElementalTimer = 50 * IN_MILLISECONDS;
|
||||
} else waterElementalTimer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
if (arcaneExplosionTimer < diff)
|
||||
{
|
||||
DoCastVictim(SPELL_ARCANE_EXPLOSION);
|
||||
arcaneExplosionTimer = urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
|
||||
} else arcaneExplosionTimer -= diff;
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (coneOfColdTimer < diff)
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
DoCastVictim(SPELL_CONE_OF_COLD);
|
||||
coneOfColdTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
|
||||
} else coneOfColdTimer -= diff;
|
||||
|
||||
if (fireBoltTimer < diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FIREBALL);
|
||||
fireBoltTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
|
||||
} else fireBoltTimer -= diff;
|
||||
|
||||
if (frostboltTimer < diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
frostboltTimer = urand(4 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
|
||||
} else frostboltTimer -= diff;
|
||||
|
||||
// check if creature is not outside of building
|
||||
if (resetTimer < diff)
|
||||
{
|
||||
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
|
||||
switch (eventId)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
Talk(YELL_EVADE);
|
||||
case EVENT_ARCANE_EXPLOSION:
|
||||
DoCastVictim(SPELL_ARCANE_EXPLOSION);
|
||||
events.ScheduleEvent(EVENT_ARCANE_EXPLOSION, urand(5 * IN_MILLISECONDS, 15 * IN_MILLISECONDS));
|
||||
break;
|
||||
case EVENT_CONE_OF_COLD:
|
||||
DoCastVictim(SPELL_CONE_OF_COLD);
|
||||
events.ScheduleEvent(EVENT_CONE_OF_COLD, urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS));
|
||||
break;
|
||||
case EVENT_FIREBOLT:
|
||||
DoCastVictim(SPELL_FIREBALL);
|
||||
events.ScheduleEvent(EVENT_FIREBOLT, urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS));
|
||||
break;
|
||||
case EVENT_FROSTBOLT:
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
events.ScheduleEvent(EVENT_FROSTBOLT, urand(4 * IN_MILLISECONDS, 12 * IN_MILLISECONDS));
|
||||
break;
|
||||
case EVENT_SUMMON_WATER_ELEMENTAL:
|
||||
if (summons.empty())
|
||||
DoCast(SPELL_SUMMON_WATER_ELEMENTAL);
|
||||
events.ScheduleEvent(EVENT_SUMMON_WATER_ELEMENTAL, 50 * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_CHECK_RESET:
|
||||
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
Talk(SAY_EVADE);
|
||||
}
|
||||
if (Creature* elemental = ObjectAccessor::GetCreature(*me, WaterElementalGUID))
|
||||
if (elemental->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
|
||||
elemental->AI()->EnterEvadeMode();
|
||||
events.ScheduleEvent(EVENT_CHECK_RESET, 5 * IN_MILLISECONDS);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
resetTimer = 5 * IN_MILLISECONDS;
|
||||
} else resetTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint64 WaterElementalGUID;
|
||||
bool HasCastIceblock;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -230,5 +190,4 @@ public:
|
||||
void AddSC_boss_balinda()
|
||||
{
|
||||
new boss_balinda;
|
||||
new npc_water_elemental;
|
||||
}
|
||||
@@ -75,6 +75,9 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
Breath1_Spell = 0;
|
||||
Breath2_Spell = 0;
|
||||
|
||||
// Select the 2 breaths that we are going to use until despawned
|
||||
// 5 possiblities for the first breath, 4 for the second, 20 total possiblites
|
||||
// This way we don't end up casting 2 of the same breath
|
||||
|
||||
@@ -81,6 +81,9 @@ public:
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
Intro = true;
|
||||
RainBones = false;
|
||||
Skeletons = false;
|
||||
FlyTimer = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
|
||||
@@ -1068,6 +1068,7 @@ public:
|
||||
EntryYellTimer = 1000;
|
||||
AggroYellTimer = 10000;
|
||||
IsFakingDeath = false;
|
||||
ResurrectTimer = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
|
||||
@@ -412,7 +412,7 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
{
|
||||
if (movementType == WAYPOINT_MOTION_TYPE && pointId == POINT_EYE_MOVE_END - 1)
|
||||
{
|
||||
me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
|
||||
me->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
|
||||
me->RemoveAllAuras();
|
||||
|
||||
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
|
||||
|
||||
@@ -391,6 +391,10 @@ public:
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
headGUID = 0;
|
||||
PlayerGUID = 0;
|
||||
id = 0;
|
||||
whirlwind = 0;
|
||||
wp_reached = false;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Interrogator_Vishas
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Scarlet Monastery
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "scarlet_monastery.h"
|
||||
@@ -38,94 +30,93 @@ enum Says
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_SHADOWWORDPAIN = 2767
|
||||
SPELL_SHADOW_WORD_PAIN = 2767
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SHADOW_WORD_PAIN = 1
|
||||
};
|
||||
|
||||
class boss_interrogator_vishas : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_interrogator_vishas() : CreatureScript("boss_interrogator_vishas") { }
|
||||
public:
|
||||
boss_interrogator_vishas() : CreatureScript("boss_interrogator_vishas") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_interrogator_vishasAI>(creature);
|
||||
}
|
||||
|
||||
struct boss_interrogator_vishasAI : public ScriptedAI
|
||||
{
|
||||
boss_interrogator_vishasAI(Creature* creature) : ScriptedAI(creature)
|
||||
struct boss_interrogator_vishasAI : public BossAI
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
ShadowWordPain_Timer = 5000;
|
||||
Yell60 = false;
|
||||
Yell30 = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool Yell30;
|
||||
bool Yell60;
|
||||
uint32 ShadowWordPain_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
instance->SetBossState(DATA_INTERROGATOR_VISHAS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
instance->SetBossState(DATA_INTERROGATOR_VISHAS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*Victim*/) override
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
//Any other Actions to do with vorrel? setStandState?
|
||||
if (Creature* vorrel = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VORREL)))
|
||||
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
|
||||
instance->SetBossState(DATA_INTERROGATOR_VISHAS, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//If we are low on hp Do sayings
|
||||
if (!Yell60 && !HealthAbovePct(60))
|
||||
boss_interrogator_vishasAI(Creature* creature) : BossAI(creature, DATA_INTERROGATOR_VISHAS)
|
||||
{
|
||||
Talk(SAY_HEALTH1);
|
||||
Yell60 = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
if (!Yell30 && !HealthAbovePct(30))
|
||||
void Initialize()
|
||||
{
|
||||
Talk(SAY_HEALTH2);
|
||||
Yell30 = true;
|
||||
_yellCount = 0;
|
||||
}
|
||||
|
||||
//ShadowWordPain_Timer
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
void Reset() override
|
||||
{
|
||||
DoCastVictim(SPELL_SHADOWWORDPAIN);
|
||||
ShadowWordPain_Timer = urand(5000, 15000);
|
||||
Initialize();
|
||||
_Reset();
|
||||
}
|
||||
else ShadowWordPain_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, 5000);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
if (Creature* vorrel = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VORREL)))
|
||||
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32 &damage) override
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(60, damage) && _yellCount < 1)
|
||||
{
|
||||
Talk(SAY_HEALTH1);
|
||||
++_yellCount;
|
||||
}
|
||||
|
||||
if (me->HealthBelowPctDamaged(30, damage) && _yellCount < 2)
|
||||
{
|
||||
Talk(SAY_HEALTH2);
|
||||
++_yellCount;
|
||||
}
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SHADOW_WORD_PAIN:
|
||||
DoCastVictim(SPELL_SHADOW_WORD_PAIN);
|
||||
events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, urand(5000, 15000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _yellCount;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_interrogator_vishasAI>(creature);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_interrogator_vishas()
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
SummonList Summons;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,20 +15,31 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Kormok
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Scholomance
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "scholomance.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_SHADOWBOLTVOLLEY = 20741,
|
||||
SPELL_BONESHIELD = 27688
|
||||
SPELL_SHADOWBOLT_VOLLEY = 20741,
|
||||
SPELL_BONE_SHIELD = 27688,
|
||||
|
||||
SPELL_SUMMON_BONE_MAGES = 27695,
|
||||
|
||||
SPELL_SUMMON_BONE_MAGE_FRONT_LEFT = 27696,
|
||||
SPELL_SUMMON_BONE_MAGE_FRONT_RIGHT = 27697,
|
||||
SPELL_SUMMON_BONE_MAGE_BACK_RIGHT = 27698,
|
||||
SPELL_SUMMON_BONE_MAGE_BACK_LEFT = 27699,
|
||||
|
||||
SPELL_SUMMON_BONE_MINIONS = 27687
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SHADOWBOLT_VOLLEY = 1,
|
||||
EVENT_BONE_SHIELD,
|
||||
EVENT_SUMMON_MINIONS
|
||||
};
|
||||
|
||||
class boss_kormok : public CreatureScript
|
||||
@@ -37,11 +47,6 @@ class boss_kormok : public CreatureScript
|
||||
public:
|
||||
boss_kormok() : CreatureScript("boss_kormok") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_kormokAI(creature);
|
||||
}
|
||||
|
||||
struct boss_kormokAI : public ScriptedAI
|
||||
{
|
||||
boss_kormokAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -51,38 +56,34 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
ShadowVolley_Timer = 10000;
|
||||
BoneShield_Timer = 2000;
|
||||
Minion_Timer = 15000;
|
||||
Mage_Timer = 0;
|
||||
Mages = false;
|
||||
}
|
||||
|
||||
uint32 ShadowVolley_Timer;
|
||||
uint32 BoneShield_Timer;
|
||||
uint32 Minion_Timer;
|
||||
uint32 Mage_Timer;
|
||||
bool Mages;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, 10000);
|
||||
events.ScheduleEvent(EVENT_BONE_SHIELD, 2000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_MINIONS, 15000);
|
||||
}
|
||||
|
||||
void SummonMinions(Unit* victim)
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
if (Creature* SummonedMinion = DoSpawnCreature(16119, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMinion->AI()->AttackStart(victim);
|
||||
summoned->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
|
||||
void SummonMages(Unit* victim)
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (Creature* SummonedMage = DoSpawnCreature(16120, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
SummonedMage->AI()->AttackStart(victim);
|
||||
if (me->HealthBelowPctDamaged(25, damage) && !Mages)
|
||||
{
|
||||
DoCast(SPELL_SUMMON_BONE_MAGES);
|
||||
Mages = true;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -90,48 +91,132 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
if (ShadowVolley_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_SHADOWBOLTVOLLEY);
|
||||
ShadowVolley_Timer = 15000;
|
||||
} else ShadowVolley_Timer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
//BoneShield_Timer
|
||||
if (BoneShield_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_BONESHIELD);
|
||||
BoneShield_Timer = 45000;
|
||||
} else BoneShield_Timer -= diff;
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
//Minion_Timer
|
||||
if (Minion_Timer <= diff)
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
//Cast
|
||||
SummonMinions(me->GetVictim());
|
||||
SummonMinions(me->GetVictim());
|
||||
SummonMinions(me->GetVictim());
|
||||
SummonMinions(me->GetVictim());
|
||||
|
||||
Minion_Timer = 12000;
|
||||
} else Minion_Timer -= diff;
|
||||
|
||||
//Summon 2 Bone Mages
|
||||
if (!Mages && HealthBelowPct(26))
|
||||
{
|
||||
//Cast
|
||||
SummonMages(me->GetVictim());
|
||||
SummonMages(me->GetVictim());
|
||||
Mages = true;
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SHADOWBOLT_VOLLEY:
|
||||
DoCastVictim(SPELL_SHADOWBOLT_VOLLEY);
|
||||
events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, 15000);
|
||||
break;
|
||||
case EVENT_BONE_SHIELD:
|
||||
DoCastVictim(SPELL_BONE_SHIELD);
|
||||
events.ScheduleEvent(EVENT_BONE_SHIELD, 45000);
|
||||
break;
|
||||
case EVENT_SUMMON_MINIONS:
|
||||
DoCast(SPELL_SUMMON_BONE_MINIONS);
|
||||
events.ScheduleEvent(EVENT_SUMMON_MINIONS, 12000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
bool Mages;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_kormokAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
uint32 const SummonMageSpells[4] =
|
||||
{
|
||||
SPELL_SUMMON_BONE_MAGE_FRONT_LEFT,
|
||||
SPELL_SUMMON_BONE_MAGE_FRONT_RIGHT,
|
||||
SPELL_SUMMON_BONE_MAGE_BACK_RIGHT,
|
||||
SPELL_SUMMON_BONE_MAGE_BACK_LEFT,
|
||||
};
|
||||
|
||||
// 27695 - Summon Bone Mages
|
||||
class spell_kormok_summon_bone_mages : SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_kormok_summon_bone_mages() : SpellScriptLoader("spell_kormok_summon_bone_mages") { }
|
||||
|
||||
class spell_kormok_summon_bone_magesSpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_kormok_summon_bone_magesSpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
for (uint32 i = 0; i < 4; ++i)
|
||||
if (!sSpellMgr->GetSpellInfo(SummonMageSpells[i]))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
for (uint32 i = 0; i < 2; ++i)
|
||||
GetCaster()->CastSpell(GetCaster(), SummonMageSpells[urand(0, 3)], true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_kormok_summon_bone_magesSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_kormok_summon_bone_magesSpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 27687 - Summon Bone Minions
|
||||
class spell_kormok_summon_bone_minions : SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_kormok_summon_bone_minions() : SpellScriptLoader("spell_kormok_summon_bone_minions") { }
|
||||
|
||||
class spell_kormok_summon_bone_minionsSpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_kormok_summon_bone_minionsSpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_BONE_MINIONS))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
|
||||
// Possible spells to handle this not found.
|
||||
for (uint32 i = 0; i < 4; ++i)
|
||||
GetCaster()->SummonCreature(NPC_BONE_MINION, GetCaster()->GetPositionX() + float(irand(-7, 7)), GetCaster()->GetPositionY() + float(irand(-7, 7)), GetCaster()->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_kormok_summon_bone_minionsSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_kormok_summon_bone_minionsSpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_kormok()
|
||||
{
|
||||
new boss_kormok();
|
||||
new spell_kormok_summon_bone_mages();
|
||||
new spell_kormok_summon_bone_minions();
|
||||
}
|
||||
@@ -53,8 +53,8 @@ public:
|
||||
DoCast(me, SPELL_ICE_ARMOR);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_ICE_ARMOR, 2000);
|
||||
events.ScheduleEvent(EVENT_FROSTBOLT, 8000);
|
||||
events.ScheduleEvent(EVENT_CHILL_NOVA, 12000);
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
@@ -36,7 +36,8 @@ enum DataTypes
|
||||
|
||||
enum CreatureIds
|
||||
{
|
||||
NPC_DARKMASTER_GANDLING = 1853
|
||||
NPC_DARKMASTER_GANDLING = 1853,
|
||||
NPC_BONE_MINION = 16119
|
||||
};
|
||||
|
||||
enum GameobjectIds
|
||||
|
||||
@@ -80,38 +80,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_freed_soul
|
||||
######*/
|
||||
enum FreedSoul
|
||||
{
|
||||
SAY_ZAPPED = 0
|
||||
};
|
||||
|
||||
class npc_freed_soul : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_freed_soul() : CreatureScript("npc_freed_soul") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_freed_soulAI(creature);
|
||||
}
|
||||
|
||||
struct npc_freed_soulAI : public ScriptedAI
|
||||
{
|
||||
npc_freed_soulAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Talk(SAY_ZAPPED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_restless_soul
|
||||
######*/
|
||||
@@ -181,6 +149,9 @@ public:
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->CastSpell(summoned, SPELL_SOUL_FREED, false);
|
||||
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, Tagger))
|
||||
summoned->GetMotionMaster()->MoveFollow(player, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -318,7 +289,6 @@ public:
|
||||
void AddSC_stratholme()
|
||||
{
|
||||
new go_gauntlet_gate();
|
||||
new npc_freed_soul();
|
||||
new npc_restless_soul();
|
||||
new npc_spectral_ghostly_citizen();
|
||||
}
|
||||
@@ -503,6 +503,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
speechPhaseEnd = 0;
|
||||
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
@@ -301,10 +301,19 @@ public:
|
||||
{
|
||||
npc_muru_portalAI(Creature* creature) : ScriptedAI(creature), Summons(creature)
|
||||
{
|
||||
Initialize();
|
||||
SetCombatMovement(false);
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
SummonTimer = 5000;
|
||||
|
||||
InAction = false;
|
||||
SummonSentinel = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
SummonList Summons;
|
||||
@@ -316,10 +325,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
SummonTimer = 5000;
|
||||
|
||||
InAction = false;
|
||||
SummonSentinel = false;
|
||||
Initialize();
|
||||
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
|
||||
@@ -383,15 +389,23 @@ public:
|
||||
|
||||
struct npc_dark_fiendAI : public ScriptedAI
|
||||
{
|
||||
npc_dark_fiendAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_dark_fiendAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
WaitTimer = 2000;
|
||||
InAction = false;
|
||||
}
|
||||
|
||||
uint32 WaitTimer;
|
||||
bool InAction;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
WaitTimer = 2000;
|
||||
InAction = false;
|
||||
Initialize();
|
||||
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
}
|
||||
@@ -444,15 +458,23 @@ public:
|
||||
|
||||
struct npc_void_sentinelAI : public ScriptedAI
|
||||
{
|
||||
npc_void_sentinelAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_void_sentinelAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PulseTimer = 3000;
|
||||
VoidBlastTimer = 45000; //is this a correct timer?
|
||||
}
|
||||
|
||||
uint32 PulseTimer;
|
||||
uint32 VoidBlastTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
PulseTimer = 3000;
|
||||
VoidBlastTimer = 45000; //is this a correct timer?
|
||||
Initialize();
|
||||
|
||||
float x, y, z, o;
|
||||
me->GetHomePosition(x, y, z, o);
|
||||
@@ -502,9 +524,18 @@ public:
|
||||
{
|
||||
npc_blackholeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
DespawnTimer = 15000;
|
||||
SpellTimer = 5000;
|
||||
Phase = 0;
|
||||
NeedForAHack = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 DespawnTimer;
|
||||
@@ -514,10 +545,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
DespawnTimer = 15000;
|
||||
SpellTimer = 5000;
|
||||
Phase = 0;
|
||||
NeedForAHack = 0;
|
||||
Initialize();
|
||||
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
DoCastAOE(SPELL_BLACKHOLE_SPAWN, true);
|
||||
|
||||
@@ -335,6 +335,7 @@ hyjalAI::hyjalAI(Creature* creature) : npc_escortAI(creature), Summons(me)
|
||||
DoRespawn = false;
|
||||
MassTeleportTimer = 0;
|
||||
DoMassTeleport = false;
|
||||
DummyGuid = 0;
|
||||
}
|
||||
|
||||
void hyjalAI::Initialize()
|
||||
|
||||
@@ -69,9 +69,6 @@ public:
|
||||
uint32 SpawnHatchlings_Timer;
|
||||
uint32 SpawnSpawns_Timer;
|
||||
|
||||
Creature* Hatchling;
|
||||
Creature* Spawn;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
@@ -99,7 +96,7 @@ public:
|
||||
case 1: RandY = 0.0f + Rand; break;
|
||||
}
|
||||
Rand = 0;
|
||||
Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
Creature* Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
if (Spawn)
|
||||
Spawn->AI()->AttackStart(victim);
|
||||
}
|
||||
@@ -155,6 +152,7 @@ public:
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
|
||||
Creature* Hatchling = nullptr;
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
@@ -174,7 +172,7 @@ public:
|
||||
break;
|
||||
case 1:
|
||||
DoTeleportPlayer(target, -7990.135354f, 1155.1907f, -78.849319f, 2.608f);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX() - 3, target->GetPositionY() - 3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
@@ -189,7 +187,7 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
DoTeleportPlayer(target, -8159.7753f, 1127.9064f, -76.868660f, 0.675f);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX() - 3, target->GetPositionY() - 3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Hatchling)
|
||||
Hatchling->AI()->AttackStart(target);
|
||||
Hatchling = me->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
|
||||
@@ -417,8 +417,6 @@ public:
|
||||
uint32 UnbalancingStrike_Timer;
|
||||
uint32 Scarabs_Timer;
|
||||
|
||||
Creature* Summoned;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
TwinReset();
|
||||
@@ -509,8 +507,6 @@ public:
|
||||
uint32 ArcaneBurst_Timer;
|
||||
uint32 Scorpions_Timer;
|
||||
|
||||
Creature* Summoned;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
TwinReset();
|
||||
|
||||
@@ -161,19 +161,25 @@ struct dummy_dragonAI : public ScriptedAI
|
||||
{
|
||||
dummy_dragonAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
waypointId = 0;
|
||||
portalRespawnTime = 30000;
|
||||
_canMoveFree = false;
|
||||
_canLoot = true;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
events.Reset();
|
||||
waypointId = 0;
|
||||
portalRespawnTime = 30000;
|
||||
_canMoveFree = false;
|
||||
_canLoot = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
+7
-1
@@ -73,15 +73,21 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
{
|
||||
boss_baltharus_the_warbornAI(Creature* creature) : BossAI(creature, DATA_BALTHARUS_THE_WARBORN)
|
||||
{
|
||||
Initialize();
|
||||
_introDone = false;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_cloneCount = RAID_MODE<uint8>(1, 2, 2, 2);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
events.SetPhase(PHASE_INTRO);
|
||||
events.ScheduleEvent(EVENT_OOC_CHANNEL, 0, 0, PHASE_INTRO);
|
||||
_cloneCount = RAID_MODE<uint8>(1, 2, 2, 2);
|
||||
Initialize();
|
||||
instance->SetData(DATA_BALTHARUS_SHARED_HEALTH, me->GetMaxHealth());
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -204,12 +204,18 @@ class npc_onyx_flamecaller : public CreatureScript
|
||||
{
|
||||
npc_onyx_flamecallerAI(Creature* creature) : npc_escortAI(creature), _instance(creature->GetInstanceScript())
|
||||
{
|
||||
Initialize();
|
||||
npc_escortAI::SetDespawnAtEnd(false);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_lavaGoutCount = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_lavaGoutCount = 0;
|
||||
Initialize();
|
||||
me->setActive(true);
|
||||
AddWaypoints();
|
||||
Start(true, true);
|
||||
|
||||
@@ -595,16 +595,22 @@ class npc_halion_controller : public CreatureScript
|
||||
npc_halion_controllerAI(Creature* creature) : ScriptedAI(creature),
|
||||
_instance(creature->GetInstanceScript()), _summons(me)
|
||||
{
|
||||
Initialize();
|
||||
me->SetPhaseMask(me->GetPhaseMask() | 0x20, true);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_materialCorporealityValue = 5;
|
||||
_materialDamageTaken = 0;
|
||||
_twilightDamageTaken = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_summons.DespawnAll();
|
||||
_events.Reset();
|
||||
_materialCorporealityValue = 5;
|
||||
_materialDamageTaken = 0;
|
||||
_twilightDamageTaken = 0;
|
||||
Initialize();
|
||||
|
||||
DoCast(me, SPELL_CLEAR_DEBUFFS);
|
||||
}
|
||||
@@ -1207,11 +1213,20 @@ class npc_living_ember : public CreatureScript
|
||||
|
||||
struct npc_living_emberAI : public ScriptedAI
|
||||
{
|
||||
npc_living_emberAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_living_emberAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_enrageTimer = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_hasEnraged = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_hasEnraged = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -54,6 +54,7 @@ class instance_ruby_sanctum : public InstanceMapScript
|
||||
BaltharusSharedHealth = 0;
|
||||
FlameWallsGUID = 0;
|
||||
FlameRingGUID = 0;
|
||||
TwilightFlameRingGUID = 0;
|
||||
|
||||
memset(ZarithrianSpawnStalkerGUID, 0, 2 * sizeof(uint64));
|
||||
memset(BurningTreeGUID, 0, 4 * sizeof(uint64));
|
||||
|
||||
+38
-18
@@ -156,11 +156,22 @@ public:
|
||||
{
|
||||
boss_eadricAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiVenganceTimer = 10000;
|
||||
uiRadianceTimer = 16000;
|
||||
uiHammerJusticeTimer = 25000;
|
||||
uiResetTimer = 5000;
|
||||
|
||||
bDone = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiVenganceTimer;
|
||||
@@ -172,12 +183,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiVenganceTimer = 10000;
|
||||
uiRadianceTimer = 16000;
|
||||
uiHammerJusticeTimer = 25000;
|
||||
uiResetTimer = 5000;
|
||||
|
||||
bDone = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) override
|
||||
@@ -260,6 +266,7 @@ public:
|
||||
{
|
||||
boss_paletressAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
MemoryGUID = 0;
|
||||
@@ -268,6 +275,18 @@ public:
|
||||
creature->RestoreFaction();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiHolyFireTimer = urand(9000, 12000);
|
||||
uiHolySmiteTimer = urand(5000, 7000);
|
||||
uiRenewTimer = urand(2000, 5000);
|
||||
|
||||
uiResetTimer = 7000;
|
||||
|
||||
bHealth = false;
|
||||
bDone = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
uint64 MemoryGUID;
|
||||
|
||||
@@ -283,14 +302,7 @@ public:
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
|
||||
uiHolyFireTimer = urand(9000, 12000);
|
||||
uiHolySmiteTimer = urand(5000, 7000);
|
||||
uiRenewTimer = urand(2000, 5000);
|
||||
|
||||
uiResetTimer = 7000;
|
||||
|
||||
bHealth = false;
|
||||
bDone = false;
|
||||
Initialize();
|
||||
|
||||
if (Creature* pMemory = ObjectAccessor::GetCreature(*me, MemoryGUID))
|
||||
if (pMemory->IsAlive())
|
||||
@@ -415,7 +427,17 @@ public:
|
||||
|
||||
struct npc_memoryAI : public ScriptedAI
|
||||
{
|
||||
npc_memoryAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_memoryAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiOldWoundsTimer = 12000;
|
||||
uiShadowPastTimer = 5000;
|
||||
uiWakingNightmare = 7000;
|
||||
}
|
||||
|
||||
uint32 uiOldWoundsTimer;
|
||||
uint32 uiShadowPastTimer;
|
||||
@@ -423,9 +445,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiOldWoundsTimer = 12000;
|
||||
uiShadowPastTimer = 5000;
|
||||
uiWakingNightmare = 7000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) override
|
||||
|
||||
+33
-19
@@ -83,9 +83,31 @@ public:
|
||||
{
|
||||
boss_black_knightAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
bEventInProgress = false;
|
||||
bEvent = false;
|
||||
bSummonArmy = false;
|
||||
bDeathArmyDone = false;
|
||||
|
||||
uiPhase = PHASE_UNDEAD;
|
||||
|
||||
uiIcyTouchTimer = urand(5000, 9000);
|
||||
uiPlagueStrikeTimer = urand(10000, 13000);
|
||||
uiDeathRespiteTimer = urand(15000, 16000);
|
||||
uiObliterateTimer = urand(17000, 19000);
|
||||
uiDesecration = urand(15000, 16000);
|
||||
uiDeathArmyCheckTimer = 7000;
|
||||
uiResurrectTimer = 4000;
|
||||
uiGhoulExplodeTimer = 8000;
|
||||
uiDeathBiteTimer = urand(2000, 4000);
|
||||
uiMarkedDeathTimer = urand(5000, 7000);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
std::list<uint64> SummonList;
|
||||
@@ -114,23 +136,7 @@ public:
|
||||
me->SetDisplayId(me->GetNativeDisplayId());
|
||||
me->ClearUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED);
|
||||
|
||||
bEventInProgress = false;
|
||||
bEvent = false;
|
||||
bSummonArmy = false;
|
||||
bDeathArmyDone = false;
|
||||
|
||||
uiPhase = PHASE_UNDEAD;
|
||||
|
||||
uiIcyTouchTimer = urand(5000, 9000);
|
||||
uiPlagueStrikeTimer = urand(10000, 13000);
|
||||
uiDeathRespiteTimer = urand(15000, 16000);
|
||||
uiObliterateTimer = urand(17000, 19000);
|
||||
uiDesecration = urand(15000, 16000);
|
||||
uiDeathArmyCheckTimer = 7000;
|
||||
uiResurrectTimer = 4000;
|
||||
uiGhoulExplodeTimer = 8000;
|
||||
uiDeathBiteTimer = urand(2000, 4000);
|
||||
uiMarkedDeathTimer = urand(5000, 7000);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void RemoveSummons()
|
||||
@@ -310,13 +316,21 @@ public:
|
||||
|
||||
struct npc_risen_ghoulAI : public ScriptedAI
|
||||
{
|
||||
npc_risen_ghoulAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_risen_ghoulAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiAttackTimer = 3500;
|
||||
}
|
||||
|
||||
uint32 uiAttackTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiAttackTimer = 3500;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) override
|
||||
|
||||
+60
-24
@@ -155,12 +155,20 @@ public:
|
||||
{
|
||||
generic_vehicleAI_toc5AI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
SetDespawnAtEnd(false);
|
||||
uiWaypointPath = 0;
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiChargeTimer = 5000;
|
||||
uiShieldBreakerTimer = 8000;
|
||||
uiBuffTimer = urand(30000, 60000);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiChargeTimer;
|
||||
@@ -171,9 +179,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiChargeTimer = 5000;
|
||||
uiShieldBreakerTimer = 8000;
|
||||
uiBuffTimer = urand(30000, 60000);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 /*uiData*/) override
|
||||
@@ -311,6 +317,7 @@ public:
|
||||
{
|
||||
boss_warrior_toc5AI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
bDone = false;
|
||||
@@ -324,6 +331,13 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiBladeStormTimer = urand(15000, 20000);
|
||||
uiInterceptTimer = 7000;
|
||||
uiMortalStrikeTimer = urand(8000, 12000);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint8 uiPhase;
|
||||
@@ -339,9 +353,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiBladeStormTimer = urand(15000, 20000);
|
||||
uiInterceptTimer = 7000;
|
||||
uiMortalStrikeTimer = urand(8000, 12000);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
@@ -443,6 +455,7 @@ public:
|
||||
{
|
||||
boss_mage_toc5AI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
bDone = false;
|
||||
@@ -456,6 +469,14 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiFireBallTimer = 5000;
|
||||
uiPolymorphTimer = 8000;
|
||||
uiBlastWaveTimer = 12000;
|
||||
uiHasteTimer = 22000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint8 uiPhase;
|
||||
@@ -471,10 +492,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiFireBallTimer = 5000;
|
||||
uiPolymorphTimer = 8000;
|
||||
uiBlastWaveTimer = 12000;
|
||||
uiHasteTimer = 22000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
@@ -580,6 +598,7 @@ public:
|
||||
{
|
||||
boss_shaman_toc5AI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
bDone = false;
|
||||
@@ -593,6 +612,14 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiChainLightningTimer = 16000;
|
||||
uiHealingWaveTimer = 12000;
|
||||
uiEartShieldTimer = urand(30000, 35000);
|
||||
uiHexMendingTimer = urand(20000, 25000);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint8 uiPhase;
|
||||
@@ -608,10 +635,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiChainLightningTimer = 16000;
|
||||
uiHealingWaveTimer = 12000;
|
||||
uiEartShieldTimer = urand(30000, 35000);
|
||||
uiHexMendingTimer = urand(20000, 25000);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
@@ -725,6 +749,7 @@ public:
|
||||
{
|
||||
boss_hunter_toc5AI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
bDone = false;
|
||||
@@ -738,6 +763,17 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiShootTimer = 12000;
|
||||
uiMultiShotTimer = 0;
|
||||
uiLightningArrowsTimer = 7000;
|
||||
|
||||
uiTargetGUID = 0;
|
||||
|
||||
bShoot = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint8 uiPhase;
|
||||
@@ -755,13 +791,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiShootTimer = 12000;
|
||||
uiMultiShotTimer = 0;
|
||||
uiLightningArrowsTimer = 7000;
|
||||
|
||||
uiTargetGUID = 0;
|
||||
|
||||
bShoot = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
@@ -879,6 +909,7 @@ public:
|
||||
{
|
||||
boss_rouge_toc5AI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
bDone = false;
|
||||
@@ -892,6 +923,13 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiEviscerateTimer = 8000;
|
||||
uiFanKivesTimer = 14000;
|
||||
uiPosionBottleTimer = 19000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint8 uiPhase;
|
||||
@@ -905,9 +943,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiEviscerateTimer = 8000;
|
||||
uiFanKivesTimer = 14000;
|
||||
uiPosionBottleTimer = 19000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
|
||||
-2
@@ -115,8 +115,6 @@ public:
|
||||
uint64 uiVehicle2GUID;
|
||||
uint64 uiVehicle3GUID;
|
||||
|
||||
uint64 uiGrandChampionBoss1;
|
||||
|
||||
std::list<uint64> Champion1List;
|
||||
std::list<uint64> Champion2List;
|
||||
std::list<uint64> Champion3List;
|
||||
|
||||
+30
-6
@@ -166,6 +166,13 @@ class boss_anubarak_trial : public CreatureScript
|
||||
{
|
||||
boss_anubarak_trialAI(Creature* creature) : BossAI(creature, BOSS_ANUBARAK)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_intro = true;
|
||||
_reachedPhase3 = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -183,8 +190,7 @@ class boss_anubarak_trial : public CreatureScript
|
||||
if (!IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SUMMON_FROST_SPHERE, 20*IN_MILLISECONDS);
|
||||
|
||||
_intro = true;
|
||||
_reachedPhase3 = false;
|
||||
Initialize();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
// clean up spawned Frost Spheres
|
||||
std::list<Creature*> FrostSphereList;
|
||||
@@ -436,13 +442,19 @@ class npc_swarm_scarab : public CreatureScript
|
||||
{
|
||||
npc_swarm_scarabAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_determinationTimer = urand(5 * IN_MILLISECONDS, 60 * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->SetCorpseDelay(0);
|
||||
_determinationTimer = urand(5*IN_MILLISECONDS, 60*IN_MILLISECONDS);
|
||||
Initialize();
|
||||
DoCast(me, SPELL_ACID_MANDIBLE);
|
||||
me->SetInCombatWithZone();
|
||||
if (me->IsInCombat())
|
||||
@@ -508,13 +520,19 @@ class npc_nerubian_burrower : public CreatureScript
|
||||
{
|
||||
npc_nerubian_burrowerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_submergeTimer = 30 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->SetCorpseDelay(10);
|
||||
_submergeTimer = 30*IN_MILLISECONDS;
|
||||
Initialize();
|
||||
DoCast(me, SPELL_EXPOSE_WEAKNESS);
|
||||
DoCast(me, SPELL_SPIDER_FRENZY);
|
||||
DoCast(me, SPELL_AWAKENED);
|
||||
@@ -669,12 +687,18 @@ class npc_anubarak_spike : public CreatureScript
|
||||
{
|
||||
npc_anubarak_spikeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_phase = PHASE_NO_MOVEMENT;
|
||||
_phaseSwitchTimer = 1;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_phase = PHASE_NO_MOVEMENT;
|
||||
_phaseSwitchTimer = 1;
|
||||
Initialize();
|
||||
// make sure the spike has everyone on threat list
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
+29
-7
@@ -348,10 +348,11 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
{
|
||||
boss_toc_champion_controllerAI(Creature* creature) : ScriptedAI(creature), _summons(me)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
_championsNotStarted = 0;
|
||||
_championsFailed = 0;
|
||||
@@ -359,6 +360,11 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
_inProgress = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
std::vector<uint32> SelectChampions(Team playerTeam)
|
||||
{
|
||||
std::vector<uint32> vHealersEntries;
|
||||
@@ -1908,7 +1914,17 @@ class npc_toc_enh_shaman : public CreatureScript
|
||||
|
||||
struct npc_toc_enh_shamanAI : public boss_faction_championsAI
|
||||
{
|
||||
npc_toc_enh_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE) { }
|
||||
npc_toc_enh_shamanAI(Creature* creature) : boss_faction_championsAI(creature, AI_MELEE)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_totemCount = 0;
|
||||
_totemOldCenterX = me->GetPositionX();
|
||||
_totemOldCenterY = me->GetPositionY();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -1920,9 +1936,7 @@ class npc_toc_enh_shaman : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_DEPLOY_TOTEM, 1*IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_WINDFURY, urand(20*IN_MILLISECONDS, 50*IN_MILLISECONDS));
|
||||
|
||||
_totemCount = 0;
|
||||
_totemOldCenterX = me->GetPositionX();
|
||||
_totemOldCenterY = me->GetPositionY();
|
||||
Initialize();
|
||||
SetEquipmentSlots(false, 51803, 48013, EQUIP_NO_CHANGE);
|
||||
summons.DespawnAll();
|
||||
}
|
||||
@@ -2192,12 +2206,20 @@ class npc_toc_pet_hunter : public CreatureScript
|
||||
|
||||
struct npc_toc_pet_hunterAI : public boss_faction_championsAI
|
||||
{
|
||||
npc_toc_pet_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET) { }
|
||||
npc_toc_pet_hunterAI(Creature* creature) : boss_faction_championsAI(creature, AI_PET)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_clawTimer = urand(5 * IN_MILLISECONDS, 10 * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
boss_faction_championsAI::Reset();
|
||||
_clawTimer = urand(5*IN_MILLISECONDS, 10*IN_MILLISECONDS);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
+7
-1
@@ -315,12 +315,18 @@ class npc_fel_infernal : public CreatureScript
|
||||
{
|
||||
npc_fel_infernalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_felStreakTimer = 30 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_felStreakTimer = 30*IN_MILLISECONDS;
|
||||
Initialize();
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
|
||||
+30
-6
@@ -492,6 +492,18 @@ struct boss_jormungarAI : public BossAI
|
||||
{
|
||||
boss_jormungarAI(Creature* creature) : BossAI(creature, BOSS_BEASTS)
|
||||
{
|
||||
OtherWormEntry = 0;
|
||||
ModelStationary = 0;
|
||||
ModelMobile = 0;
|
||||
|
||||
BiteSpell = 0;
|
||||
SpewSpell = 0;
|
||||
SpitSpell = 0;
|
||||
SpraySpell = 0;
|
||||
|
||||
Phase = PHASE_MOBILE;
|
||||
Enraged = false;
|
||||
WasMobile = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -780,12 +792,18 @@ class npc_slime_pool : public CreatureScript
|
||||
{
|
||||
npc_slime_poolAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_cast = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_cast = false;
|
||||
Initialize();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
@@ -851,14 +869,11 @@ class boss_icehowl : public CreatureScript
|
||||
{
|
||||
boss_icehowlAI(Creature* creature) : BossAI(creature, BOSS_BEASTS)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FEROCIOUS_BUTT, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
|
||||
events.ScheduleEvent(EVENT_ARCTIC_BREATH, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
|
||||
events.ScheduleEvent(EVENT_WHIRL, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
|
||||
events.ScheduleEvent(EVENT_MASSIVE_CRASH, 30*IN_MILLISECONDS);
|
||||
_movementStarted = false;
|
||||
_movementFinish = false;
|
||||
_trampleCast = false;
|
||||
@@ -869,6 +884,15 @@ class boss_icehowl : public CreatureScript
|
||||
_stage = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FEROCIOUS_BUTT, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
|
||||
events.ScheduleEvent(EVENT_ARCTIC_BREATH, urand(15*IN_MILLISECONDS, 25*IN_MILLISECONDS));
|
||||
events.ScheduleEvent(EVENT_WHIRL, urand(15*IN_MILLISECONDS, 30*IN_MILLISECONDS));
|
||||
events.ScheduleEvent(EVENT_MASSIVE_CRASH, 30*IN_MILLISECONDS);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
|
||||
+35
-7
@@ -143,6 +143,33 @@ struct boss_twin_baseAI : public BossAI
|
||||
{
|
||||
boss_twin_baseAI(Creature* creature) : BossAI(creature, BOSS_VALKIRIES)
|
||||
{
|
||||
Initialize();
|
||||
AuraState = AURA_STATE_NONE;
|
||||
|
||||
Stage = 0;
|
||||
|
||||
Weapon = 0;
|
||||
|
||||
VortexEmote = 0;
|
||||
SisterNpcId = 0;
|
||||
MyEmphatySpellId = 0;
|
||||
OtherEssenceSpellId = 0;
|
||||
SurgeSpellId = 0;
|
||||
VortexSpellId = 0;
|
||||
ShieldSpellId = 0;
|
||||
TwinPactSpellId = 0;
|
||||
SpikeSpellId = 0;
|
||||
TouchSpellId = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
IsBerserk = false;
|
||||
|
||||
SpecialAbilityTimer = 1 * MINUTE*IN_MILLISECONDS;
|
||||
SpikeTimer = 20 * IN_MILLISECONDS;
|
||||
TouchTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
|
||||
BerserkTimer = IsHeroic() ? 6 * MINUTE*IN_MILLISECONDS : 10 * MINUTE*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -153,12 +180,7 @@ struct boss_twin_baseAI : public BossAI
|
||||
/* Uncomment this once that they are floating above the ground
|
||||
me->SetLevitate(true);
|
||||
me->SetFlying(true); */
|
||||
IsBerserk = false;
|
||||
|
||||
SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
|
||||
SpikeTimer = 20*IN_MILLISECONDS;
|
||||
TouchTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
|
||||
BerserkTimer = IsHeroic() ? 6*MINUTE*IN_MILLISECONDS : 10*MINUTE*IN_MILLISECONDS;
|
||||
Initialize();
|
||||
|
||||
summons.DespawnAll();
|
||||
}
|
||||
@@ -524,6 +546,12 @@ struct npc_unleashed_ballAI : public ScriptedAI
|
||||
{
|
||||
npc_unleashed_ballAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
RangeCheckTimer = 0.5*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void MoveToNextPoint()
|
||||
@@ -548,7 +576,7 @@ struct npc_unleashed_ballAI : public ScriptedAI
|
||||
me->SetCanFly(true);
|
||||
SetCombatMovement(false);
|
||||
MoveToNextPoint();
|
||||
RangeCheckTimer = 0.5*IN_MILLISECONDS;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 uiId) override
|
||||
|
||||
+13
-12
@@ -240,7 +240,6 @@ class boss_lich_king_toc : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_updateTimer = 0;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if (Creature* summoned = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5, TEMPSUMMON_TIMED_DESPAWN, 1*MINUTE*IN_MILLISECONDS))
|
||||
{
|
||||
@@ -278,7 +277,7 @@ class boss_lich_king_toc : public CreatureScript
|
||||
if (_instance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING)
|
||||
return;
|
||||
|
||||
_updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
uint32 _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (_updateTimer <= uiDiff)
|
||||
{
|
||||
switch (_instance->GetData(TYPE_EVENT))
|
||||
@@ -352,7 +351,6 @@ class boss_lich_king_toc : public CreatureScript
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
uint32 _updateTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -370,7 +368,14 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
{
|
||||
npc_fizzlebang_tocAI(Creature* creature) : ScriptedAI(creature), _summons(me)
|
||||
{
|
||||
Initialize();
|
||||
_instance = me->GetInstanceScript();
|
||||
_triggerGUID = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_portalGUID = 0;
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
@@ -388,7 +393,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
void Reset() override
|
||||
{
|
||||
me->SetWalk(true);
|
||||
_portalGUID = 0;
|
||||
Initialize();
|
||||
me->GetMotionMaster()->MovePoint(1, ToCCommonLoc[10].GetPositionX(), ToCCommonLoc[10].GetPositionY()-60, ToCCommonLoc[10].GetPositionZ());
|
||||
}
|
||||
|
||||
@@ -423,7 +428,7 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
if (_instance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG)
|
||||
return;
|
||||
|
||||
_updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
uint32 _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (_updateTimer <= uiDiff)
|
||||
{
|
||||
switch (_instance->GetData(TYPE_EVENT))
|
||||
@@ -521,7 +526,6 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
SummonList _summons;
|
||||
uint32 _updateTimer;
|
||||
uint64 _portalGUID;
|
||||
uint64 _triggerGUID;
|
||||
};
|
||||
@@ -556,7 +560,7 @@ class npc_tirion_toc : public CreatureScript
|
||||
if (_instance->GetData(TYPE_EVENT_NPC) != NPC_TIRION)
|
||||
return;
|
||||
|
||||
_updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
uint32 _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (_updateTimer <= uiDiff)
|
||||
{
|
||||
switch (_instance->GetData(TYPE_EVENT))
|
||||
@@ -811,7 +815,6 @@ class npc_tirion_toc : public CreatureScript
|
||||
}
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
uint32 _updateTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -844,7 +847,7 @@ class npc_garrosh_toc : public CreatureScript
|
||||
if (_instance->GetData(TYPE_EVENT_NPC) != NPC_GARROSH)
|
||||
return;
|
||||
|
||||
_updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
uint32 _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (_updateTimer <= uiDiff)
|
||||
{
|
||||
switch (_instance->GetData(TYPE_EVENT))
|
||||
@@ -895,7 +898,6 @@ class npc_garrosh_toc : public CreatureScript
|
||||
}
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
uint32 _updateTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -928,7 +930,7 @@ class npc_varian_toc : public CreatureScript
|
||||
if (_instance->GetData(TYPE_EVENT_NPC) != NPC_VARIAN)
|
||||
return;
|
||||
|
||||
_updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
uint32 _updateTimer = _instance->GetData(TYPE_EVENT_TIMER);
|
||||
if (_updateTimer <= uiDiff)
|
||||
{
|
||||
switch (_instance->GetData(TYPE_EVENT))
|
||||
@@ -979,7 +981,6 @@ class npc_varian_toc : public CreatureScript
|
||||
}
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
uint32 _updateTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -58,10 +58,19 @@ class boss_king_dred : public CreatureScript
|
||||
|
||||
struct boss_king_dredAI : public BossAI
|
||||
{
|
||||
boss_king_dredAI(Creature* creature) : BossAI(creature, DATA_KING_DRED) { }
|
||||
boss_king_dredAI(Creature* creature) : BossAI(creature, DATA_KING_DRED)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
raptorsKilled = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
_Reset();
|
||||
}
|
||||
|
||||
@@ -166,16 +175,22 @@ class npc_drakkari_gutripper : public CreatureScript
|
||||
{
|
||||
npc_drakkari_gutripperAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
GutRipTimer = urand(10000, 15000);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 GutRipTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
GutRipTimer = urand(10000, 15000);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -216,16 +231,22 @@ class npc_drakkari_scytheclaw : public CreatureScript
|
||||
{
|
||||
npc_drakkari_scytheclawAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiRendTimer = urand(10000, 15000);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiRendTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiRendTimer = urand(10000, 15000);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -80,14 +80,23 @@ public:
|
||||
|
||||
struct boss_novosAI : public BossAI
|
||||
{
|
||||
boss_novosAI(Creature* creature) : BossAI(creature, DATA_NOVOS) { }
|
||||
boss_novosAI(Creature* creature) : BossAI(creature, DATA_NOVOS)
|
||||
{
|
||||
Initialize();
|
||||
_bubbled = false;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_ohNovos = true;
|
||||
_crystalHandlerCount = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
|
||||
_ohNovos = true;
|
||||
_crystalHandlerCount = 0;
|
||||
Initialize();
|
||||
SetCrystalsStatus(false);
|
||||
SetSummonerStatus(false);
|
||||
SetBubbled(false);
|
||||
@@ -280,15 +289,23 @@ public:
|
||||
|
||||
struct npc_crystal_channel_targetAI : public ScriptedAI
|
||||
{
|
||||
npc_crystal_channel_targetAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_crystal_channel_targetAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
void Initialize()
|
||||
{
|
||||
_spell = 0;
|
||||
_timer = 0;
|
||||
_temp = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (_spell)
|
||||
|
||||
@@ -73,12 +73,20 @@ class boss_trollgore : public CreatureScript
|
||||
|
||||
struct boss_trollgoreAI : public BossAI
|
||||
{
|
||||
boss_trollgoreAI(Creature* creature) : BossAI(creature, DATA_TROLLGORE) { }
|
||||
boss_trollgoreAI(Creature* creature) : BossAI(creature, DATA_TROLLGORE)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_consumptionJunction = true;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
_consumptionJunction = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -71,14 +71,6 @@ class boss_bronjahm : public CreatureScript
|
||||
DoCast(me, SPELL_SOULSTORM_CHANNEL, true);
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(FoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
@@ -188,7 +180,7 @@ class boss_bronjahm : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_bronjahmAI>(creature);
|
||||
return GetInstanceAI<boss_bronjahmAI>(creature, FoSScriptName);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -130,14 +130,15 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
{
|
||||
boss_devourer_of_soulsAI(Creature* creature) : BossAI(creature, DATA_DEVOURER_EVENT)
|
||||
{
|
||||
Initialize();
|
||||
beamAngle = 0.f;
|
||||
beamAngleDiff = 0.f;
|
||||
wailingSoulTick = 0;
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
void Initialize()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(FoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
threeFaced = true;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -149,7 +150,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
|
||||
threeFaced = true;
|
||||
Initialize();
|
||||
|
||||
instance->SetData(DATA_DEVOURER_EVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -345,7 +346,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_devourer_of_soulsAI>(creature);
|
||||
return GetInstanceAI<boss_devourer_of_soulsAI>(creature, FoSScriptName);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -80,10 +80,16 @@ public:
|
||||
{
|
||||
npc_sylvanas_fosAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
phase = PHASE_NORMAL;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
EventMap events;
|
||||
@@ -92,7 +98,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
phase = PHASE_NORMAL;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
@@ -203,10 +209,16 @@ public:
|
||||
{
|
||||
npc_jaina_fosAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
phase = PHASE_NORMAL;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
EventMap events;
|
||||
@@ -215,7 +227,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
phase = PHASE_NORMAL;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
|
||||
@@ -55,12 +55,20 @@ class boss_falric : public CreatureScript
|
||||
|
||||
struct boss_falricAI : public boss_horAI
|
||||
{
|
||||
boss_falricAI(Creature* creature) : boss_horAI(creature, DATA_FALRIC) { }
|
||||
boss_falricAI(Creature* creature) : boss_horAI(creature, DATA_FALRIC)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_hopelessnessCount = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
boss_horAI::Reset();
|
||||
_hopelessnessCount = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -82,14 +82,22 @@ class boss_garfrost : public CreatureScript
|
||||
|
||||
struct boss_garfrostAI : public BossAI
|
||||
{
|
||||
boss_garfrostAI(Creature* creature) : BossAI(creature, DATA_GARFROST) { }
|
||||
boss_garfrostAI(Creature* creature) : BossAI(creature, DATA_GARFROST)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_permafrostStack = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
events.SetPhase(PHASE_ONE);
|
||||
SetEquipmentSlots(true);
|
||||
_permafrostStack = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -140,6 +140,7 @@ class boss_ick : public CreatureScript
|
||||
boss_ickAI(Creature* creature) : BossAI(creature, DATA_ICK), _vehicle(creature->GetVehicleKit())
|
||||
{
|
||||
ASSERT(_vehicle);
|
||||
_tempThreat = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -286,14 +287,20 @@ class boss_krick : public CreatureScript
|
||||
{
|
||||
boss_krickAI(Creature* creature) : ScriptedAI(creature), _instanceScript(creature->GetInstanceScript()), _summons(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_phase = PHASE_COMBAT;
|
||||
_outroNpcGUID = 0;
|
||||
_tyrannusGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
_phase = PHASE_COMBAT;
|
||||
_outroNpcGUID = 0;
|
||||
_tyrannusGUID = 0;
|
||||
Initialize();
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
@@ -293,14 +293,20 @@ class boss_rimefang : public CreatureScript
|
||||
boss_rimefangAI(Creature* creature) : ScriptedAI(creature), _vehicle(creature->GetVehicleKit())
|
||||
{
|
||||
ASSERT(_vehicle);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_currentWaypoint = 0;
|
||||
_hoarfrostTargetGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
_events.SetPhase(PHASE_NONE);
|
||||
_currentWaypoint = 0;
|
||||
_hoarfrostTargetGUID = 0;
|
||||
Initialize();
|
||||
me->SetCanFly(true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
@@ -52,6 +52,7 @@ class instance_pit_of_saron : public InstanceMapScript
|
||||
_jainaOrSylvanas1GUID = 0;
|
||||
_jainaOrSylvanas2GUID = 0;
|
||||
_teamInInstance = 0;
|
||||
_tyrannusEventGUID = 0;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) override
|
||||
|
||||
@@ -113,11 +113,17 @@ class npc_iceborn_protodrake : public CreatureScript
|
||||
npc_iceborn_protodrakeAI(Creature* creature) : ScriptedAI(creature), _vehicle(creature->GetVehicleKit())
|
||||
{
|
||||
ASSERT(_vehicle);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_frostBreathCooldown = 5000;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_frostBreathCooldown = 5000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -161,11 +167,17 @@ class npc_geist_ambusher : public CreatureScript
|
||||
{
|
||||
npc_geist_ambusherAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_leapingFaceMaulCooldown = 9000;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_leapingFaceMaulCooldown = 9000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
|
||||
@@ -82,14 +82,14 @@ class boss_drakkari_colossus : public CreatureScript
|
||||
{
|
||||
boss_drakkari_colossusAI(Creature* creature) : BossAI(creature, DATA_DRAKKARI_COLOSSUS_EVENT)
|
||||
{
|
||||
Initialize();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
introDone = false;
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
void Initialize()
|
||||
{
|
||||
if (!me->isDead())
|
||||
Reset();
|
||||
phase = COLOSSUS_PHASE_NORMAL;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -106,7 +106,7 @@ class boss_drakkari_colossus : public CreatureScript
|
||||
//events.Reset(); -> done in _Reset();
|
||||
events.ScheduleEvent(EVENT_MIGHTY_BLOW, urand(10000, 30000));
|
||||
|
||||
phase = COLOSSUS_PHASE_NORMAL;
|
||||
Initialize();
|
||||
|
||||
// Note: This should not be called, but before use SetBossState function we should use BossAI
|
||||
// in all the bosses of the instance
|
||||
@@ -393,13 +393,19 @@ public:
|
||||
{
|
||||
npc_living_mojoAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
mojoWaveTimer = 2 * IN_MILLISECONDS;
|
||||
mojoPuddleTimer = 7 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
mojoWaveTimer = 2*IN_MILLISECONDS;
|
||||
mojoPuddleTimer = 7*IN_MILLISECONDS;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void MoveMojos(Creature* boss)
|
||||
|
||||
@@ -44,9 +44,20 @@ public:
|
||||
{
|
||||
boss_eckAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiBerserkTimer = urand(60 * IN_MILLISECONDS, 90 * IN_MILLISECONDS); //60-90 secs according to wowwiki
|
||||
uiBiteTimer = 5 * IN_MILLISECONDS;
|
||||
uiSpitTimer = 10 * IN_MILLISECONDS;
|
||||
uiSpringTimer = 8 * IN_MILLISECONDS;
|
||||
|
||||
bBerserk = false;
|
||||
}
|
||||
|
||||
uint32 uiBerserkTimer;
|
||||
uint32 uiBiteTimer;
|
||||
uint32 uiSpitTimer;
|
||||
@@ -58,12 +69,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiBerserkTimer = urand(60*IN_MILLISECONDS, 90*IN_MILLISECONDS); //60-90 secs according to wowwiki
|
||||
uiBiteTimer = 5*IN_MILLISECONDS;
|
||||
uiSpitTimer = 10*IN_MILLISECONDS;
|
||||
uiSpringTimer = 8*IN_MILLISECONDS;
|
||||
|
||||
bBerserk = false;
|
||||
Initialize();
|
||||
|
||||
instance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -77,9 +77,26 @@ public:
|
||||
{
|
||||
boss_gal_darahAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiStampedeTimer = 10 * IN_MILLISECONDS;
|
||||
uiWhirlingSlashTimer = 21 * IN_MILLISECONDS;
|
||||
uiPunctureTimer = 10 * IN_MILLISECONDS;
|
||||
uiEnrageTimer = 15 * IN_MILLISECONDS;
|
||||
uiImpalingChargeTimer = 21 * IN_MILLISECONDS;
|
||||
uiStompTimer = 25 * IN_MILLISECONDS;
|
||||
uiTransformationTimer = 9 * IN_MILLISECONDS;
|
||||
uiPhaseCounter = 0;
|
||||
|
||||
shareTheLove = 0;
|
||||
bStartOfTransformation = true;
|
||||
Phase = TROLL;
|
||||
}
|
||||
|
||||
uint32 uiStampedeTimer;
|
||||
uint32 uiWhirlingSlashTimer;
|
||||
uint32 uiPunctureTimer;
|
||||
@@ -100,21 +117,9 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiStampedeTimer = 10*IN_MILLISECONDS;
|
||||
uiWhirlingSlashTimer = 21*IN_MILLISECONDS;
|
||||
uiPunctureTimer = 10*IN_MILLISECONDS;
|
||||
uiEnrageTimer = 15*IN_MILLISECONDS;
|
||||
uiImpalingChargeTimer = 21*IN_MILLISECONDS;
|
||||
uiStompTimer = 25*IN_MILLISECONDS;
|
||||
uiTransformationTimer = 9*IN_MILLISECONDS;
|
||||
uiPhaseCounter = 0;
|
||||
Initialize();
|
||||
|
||||
impaledList.clear();
|
||||
shareTheLove = 0;
|
||||
|
||||
bStartOfTransformation = true;
|
||||
|
||||
Phase = TROLL;
|
||||
|
||||
me->SetDisplayId(DISPLAY_TROLL);
|
||||
|
||||
|
||||
@@ -61,9 +61,19 @@ public:
|
||||
{
|
||||
boss_moorabiAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiGroundTremorTimer = 18 * IN_MILLISECONDS;
|
||||
uiNumblingShoutTimer = 10 * IN_MILLISECONDS;
|
||||
uiDeterminedStabTimer = 20 * IN_MILLISECONDS;
|
||||
uiTransformationTImer = 12 * IN_MILLISECONDS;
|
||||
bPhase = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool bPhase;
|
||||
@@ -75,11 +85,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiGroundTremorTimer = 18*IN_MILLISECONDS;
|
||||
uiNumblingShoutTimer = 10*IN_MILLISECONDS;
|
||||
uiDeterminedStabTimer = 20*IN_MILLISECONDS;
|
||||
uiTransformationTImer = 12*IN_MILLISECONDS;
|
||||
bPhase = false;
|
||||
Initialize();
|
||||
|
||||
instance->SetData(DATA_MOORABI_EVENT, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -83,9 +83,19 @@ public:
|
||||
{
|
||||
boss_slad_ranAI(Creature* creature) : ScriptedAI(creature), lSummons(me)
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiPoisonNovaTimer = 10 * IN_MILLISECONDS;
|
||||
uiPowerfullBiteTimer = 3 * IN_MILLISECONDS;
|
||||
uiVenomBoltTimer = 15 * IN_MILLISECONDS;
|
||||
uiSpawnTimer = 5 * IN_MILLISECONDS;
|
||||
uiPhase = 0;
|
||||
}
|
||||
|
||||
uint32 uiPoisonNovaTimer;
|
||||
uint32 uiPowerfullBiteTimer;
|
||||
uint32 uiVenomBoltTimer;
|
||||
@@ -100,11 +110,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiPoisonNovaTimer = 10*IN_MILLISECONDS;
|
||||
uiPowerfullBiteTimer = 3*IN_MILLISECONDS;
|
||||
uiVenomBoltTimer = 15*IN_MILLISECONDS;
|
||||
uiSpawnTimer = 5*IN_MILLISECONDS;
|
||||
uiPhase = 0;
|
||||
Initialize();
|
||||
lWrappedPlayers.clear();
|
||||
|
||||
lSummons.DespawnAll();
|
||||
|
||||
@@ -182,14 +182,20 @@ class boss_blood_council_controller : public CreatureScript
|
||||
{
|
||||
boss_blood_council_controllerAI(Creature* creature) : BossAI(creature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_invocationStage = 0;
|
||||
_resetCounter = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
_invocationStage = 0;
|
||||
_resetCounter = 0;
|
||||
Initialize();
|
||||
|
||||
instance->SetBossState(DATA_BLOOD_PRINCE_COUNCIL, NOT_STARTED);
|
||||
}
|
||||
@@ -1142,6 +1148,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
npc_ball_of_flameAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
|
||||
{
|
||||
_despawnTimer = 0;
|
||||
_chaseGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -1224,7 +1231,12 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
|
||||
struct npc_kinetic_bombAI : public ScriptedAI
|
||||
{
|
||||
npc_kinetic_bombAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_kinetic_bombAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_x = 0.f;
|
||||
_y = 0.f;
|
||||
_groundZ = 0.f;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
|
||||
@@ -143,6 +143,14 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
{
|
||||
boss_blood_queen_lana_thelAI(Creature* creature) : BossAI(creature, DATA_BLOOD_QUEEN_LANA_THEL)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_offtankGUID = 0;
|
||||
_creditBloodQuickening = false;
|
||||
_killMinchar = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -157,10 +165,8 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_TWILIGHT_BLOODBOLT, urand(20000, 25000), EVENT_GROUP_NORMAL);
|
||||
events.ScheduleEvent(EVENT_AIR_PHASE, 124000 + uint32(Is25ManRaid() ? 3000 : 0));
|
||||
CleanAuras();
|
||||
_offtankGUID = 0;
|
||||
_vampires.clear();
|
||||
_creditBloodQuickening = false;
|
||||
_killMinchar = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
|
||||
@@ -249,18 +249,24 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
{
|
||||
boss_deathbringer_saurfangAI(Creature* creature) : BossAI(creature, DATA_DEATHBRINGER_SAURFANG)
|
||||
{
|
||||
Initialize();
|
||||
ASSERT(creature->GetVehicleKit()); // we dont actually use it, just check if exists
|
||||
_introDone = false;
|
||||
_fallenChampionCastCount = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_frenzied = false;
|
||||
_dead = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
events.SetPhase(PHASE_COMBAT);
|
||||
_frenzied = false;
|
||||
_dead = false;
|
||||
Initialize();
|
||||
me->SetPower(POWER_ENERGY, 0);
|
||||
DoCast(me, SPELL_ZERO_POWER, true);
|
||||
DoCast(me, SPELL_BLOOD_LINK, true);
|
||||
|
||||
@@ -218,6 +218,14 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
boss_lady_deathwhisperAI(Creature* creature) : BossAI(creature, DATA_LADY_DEATHWHISPER),
|
||||
_dominateMindCount(RAID_MODE<uint8>(0, 1, 1, 3)), _introDone(false)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_waveCounter = 0;
|
||||
_nextVengefulShadeTargetGUID = 0;
|
||||
_darnavanGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -225,9 +233,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
_Reset();
|
||||
me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA));
|
||||
events.SetPhase(PHASE_ONE);
|
||||
_waveCounter = 0;
|
||||
_nextVengefulShadeTargetGUID = 0;
|
||||
_darnavanGUID = 0;
|
||||
Initialize();
|
||||
DoCast(me, SPELL_SHADOW_CHANNELING);
|
||||
me->RemoveAurasDueToSpell(SPELL_BERSERK);
|
||||
me->RemoveAurasDueToSpell(SPELL_MANA_BARRIER);
|
||||
@@ -837,6 +843,13 @@ class npc_darnavan : public CreatureScript
|
||||
{
|
||||
npc_darnavanAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_canCharge = true;
|
||||
_canShatter = true;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -846,8 +859,7 @@ class npc_darnavan : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_DARNAVAN_INTIMIDATING_SHOUT, urand(20000, 25000));
|
||||
_events.ScheduleEvent(EVENT_DARNAVAN_MORTAL_STRIKE, urand(25000, 30000));
|
||||
_events.ScheduleEvent(EVENT_DARNAVAN_SUNDER_ARMOR, urand(5000, 8000));
|
||||
_canCharge = true;
|
||||
_canShatter = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
|
||||
@@ -133,6 +133,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
_coldflameLastPos.Relocate(creature);
|
||||
_introDone = false;
|
||||
_boneSlice = false;
|
||||
_coldflameTarget = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
|
||||
@@ -223,6 +223,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
_baseSpeed(creature->GetSpeedRate(MOVE_RUN)), _experimentState(EXPERIMENT_STATE_OOZE)
|
||||
{
|
||||
_phase = PHASE_NONE;
|
||||
_oozeFloodStage = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
|
||||
@@ -221,6 +221,14 @@ class boss_sindragosa : public CreatureScript
|
||||
{
|
||||
boss_sindragosaAI(Creature* creature) : BossAI(creature, DATA_SINDRAGOSA), _summoned(false)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_mysticBuffetStack = 0;
|
||||
_isInAirPhase = false;
|
||||
_isThirdPhase = false;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -235,9 +243,7 @@ class boss_sindragosa : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_UNCHAINED_MAGIC, urand(9000, 14000), EVENT_GROUP_LAND_PHASE);
|
||||
events.ScheduleEvent(EVENT_ICY_GRIP, 33500, EVENT_GROUP_LAND_PHASE);
|
||||
events.ScheduleEvent(EVENT_AIR_PHASE, 50000);
|
||||
_mysticBuffetStack = 0;
|
||||
_isInAirPhase = false;
|
||||
_isThirdPhase = false;
|
||||
Initialize();
|
||||
|
||||
if (!_summoned)
|
||||
{
|
||||
@@ -558,6 +564,7 @@ class npc_ice_tomb : public CreatureScript
|
||||
npc_ice_tombAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_trappedPlayerGUID = 0;
|
||||
_existenceCheckTimer = 0;
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
@@ -765,6 +772,12 @@ class npc_rimefang : public CreatureScript
|
||||
{
|
||||
npc_rimefangAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()), _summoned(false)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_icyBlastCounter = 0;
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
@@ -783,7 +796,7 @@ class npc_rimefang : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_FROST_BREATH_RIMEFANG, urand(12000, 15000));
|
||||
_events.ScheduleEvent(EVENT_ICY_BLAST, urand(30000, 35000));
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
_icyBlastCounter = 0;
|
||||
Initialize();
|
||||
|
||||
if (!_summoned)
|
||||
{
|
||||
@@ -922,7 +935,14 @@ class npc_sindragosa_trash : public CreatureScript
|
||||
{
|
||||
npc_sindragosa_trashAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
_instance = creature->GetInstanceScript();
|
||||
_frostwyrmId = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_isTaunted = false;
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
@@ -946,7 +966,7 @@ class npc_sindragosa_trash : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_CONCUSSIVE_SHOCK, urand(8000, 10000));
|
||||
}
|
||||
|
||||
_isTaunted = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustRespawned() override
|
||||
|
||||
@@ -483,6 +483,13 @@ class boss_the_lich_king : public CreatureScript
|
||||
{
|
||||
boss_the_lich_kingAI(Creature* creature) : BossAI(creature, DATA_THE_LICH_KING)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_necroticPlagueStack = 0;
|
||||
_vileSpiritExplosions = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -490,8 +497,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
_Reset();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
events.SetPhase(PHASE_INTRO);
|
||||
_necroticPlagueStack = 0;
|
||||
_vileSpiritExplosions = 0;
|
||||
Initialize();
|
||||
SetEquipmentSlots(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -282,6 +282,17 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
boss_valithria_dreamwalkerAI(Creature* creature) : ScriptedAI(creature),
|
||||
_instance(creature->GetInstanceScript()), _portalCount(RAID_MODE<uint32>(3, 8, 3, 8))
|
||||
{
|
||||
Initialize();
|
||||
_spawnHealth = me->GetHealth();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_missedPortals = 0;
|
||||
_under25PercentTalkDone = false;
|
||||
_over75PercentTalkDone = false;
|
||||
_justDied = false;
|
||||
_done = false;
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
@@ -305,11 +316,7 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
// Glyph of Dispel Magic - not a percent heal by effect, its cast with custom basepoints
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, 56131, true);
|
||||
_instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
_missedPortals = 0;
|
||||
_under25PercentTalkDone = false;
|
||||
_over75PercentTalkDone = false;
|
||||
_justDied = false;
|
||||
_done = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*target*/) override
|
||||
@@ -680,6 +687,12 @@ class npc_risen_archmage : public CreatureScript
|
||||
npc_risen_archmageAI(Creature* creature) : ScriptedAI(creature),
|
||||
_instance(creature->GetInstanceScript())
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_canCallEnterCombat = true;
|
||||
}
|
||||
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
@@ -693,7 +706,7 @@ class npc_risen_archmage : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_FROSTBOLT_VOLLEY, urand(5000, 15000));
|
||||
_events.ScheduleEvent(EVENT_MANA_VOID, urand(20000, 25000));
|
||||
_events.ScheduleEvent(EVENT_COLUMN_OF_FROST, urand(10000, 20000));
|
||||
_canCallEnterCombat = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*target*/) override
|
||||
|
||||
@@ -385,15 +385,21 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
|
||||
{
|
||||
npc_highlord_tirion_fordringAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_theLichKing = 0;
|
||||
_bolvarFordragon = 0;
|
||||
_factionNPC = 0;
|
||||
_damnedKills = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
_theLichKing = 0;
|
||||
_bolvarFordragon = 0;
|
||||
_factionNPC = 0;
|
||||
_damnedKills = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
// IMPORTANT NOTE: This is triggered from per-GUID scripts
|
||||
@@ -939,11 +945,18 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
_instance(creature->GetInstanceScript()), _respawnTime(creature->GetRespawnDelay()),
|
||||
_corpseDelay(creature->GetCorpseDelay())
|
||||
{
|
||||
Initialize();
|
||||
SetDespawnAtEnd(false);
|
||||
SetDespawnAtFar(false);
|
||||
_isEventActive = false;
|
||||
_isEventDone = _instance->GetBossState(DATA_SISTER_SVALNA) == DONE;
|
||||
_currentWPid = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_didUnderTenPercentText = false;
|
||||
_wipeCheckTimer = 1000;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -952,8 +965,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_SCOURGE_STRIKE, urand(7500, 12500));
|
||||
_events.ScheduleEvent(EVENT_DEATH_STRIKE, urand(25000, 30000));
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
_didUnderTenPercentText = false;
|
||||
_wipeCheckTimer = 1000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
@@ -1647,12 +1659,18 @@ class npc_impaling_spear : public CreatureScript
|
||||
{
|
||||
npc_impaling_spearAI(Creature* creature) : CreatureAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_vehicleCheckTimer = 500;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
_vehicleCheckTimer = 500;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -174,6 +174,9 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
UpperSpireTeleporterActiveState = NOT_STARTED;
|
||||
BloodQuickeningState = NOT_STARTED;
|
||||
BloodQuickeningMinutes = 0;
|
||||
FrozenBolvarGUID = 0;
|
||||
PillarsChainedGUID = 0;
|
||||
PillarsUnchainedGUID = 0;
|
||||
}
|
||||
|
||||
// A function to help reduce the number of lines for teleporter management.
|
||||
|
||||
@@ -62,7 +62,15 @@ public:
|
||||
|
||||
struct boss_anubrekhanAI : public BossAI
|
||||
{
|
||||
boss_anubrekhanAI(Creature* creature) : BossAI(creature, BOSS_ANUBREKHAN) { }
|
||||
boss_anubrekhanAI(Creature* creature) : BossAI(creature, BOSS_ANUBREKHAN)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
hasTaunted = false;
|
||||
}
|
||||
|
||||
bool hasTaunted;
|
||||
|
||||
@@ -70,7 +78,7 @@ public:
|
||||
{
|
||||
_Reset();
|
||||
|
||||
hasTaunted = false;
|
||||
Initialize();
|
||||
|
||||
if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
|
||||
{
|
||||
|
||||
@@ -96,12 +96,25 @@ public:
|
||||
{
|
||||
boss_four_horsemenAI(Creature* creature) : BossAI(creature, BOSS_HORSEMEN)
|
||||
{
|
||||
Initialize();
|
||||
id = Horsemen(0);
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (me->GetEntry() == NPC_HORSEMEN[i])
|
||||
id = Horsemen(i);
|
||||
caster = (id == HORSEMEN_LADY || id == HORSEMEN_SIR);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiEventStarterGUID = 0;
|
||||
nextWP = 0;
|
||||
punishTimer = 2000;
|
||||
nextMovementStarted = false;
|
||||
movementCompleted = false;
|
||||
movementStarted = false;
|
||||
encounterActionAttack = false;
|
||||
encounterActionReset = false;
|
||||
doDelayPunish = false;
|
||||
}
|
||||
|
||||
Horsemen id;
|
||||
@@ -124,15 +137,7 @@ public:
|
||||
instance->SetData(DATA_HORSEMEN0 + id, NOT_STARTED);
|
||||
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
uiEventStarterGUID = 0;
|
||||
nextWP = 0;
|
||||
punishTimer = 2000;
|
||||
nextMovementStarted = false;
|
||||
movementCompleted = false;
|
||||
movementStarted = false;
|
||||
encounterActionAttack = false;
|
||||
encounterActionReset = false;
|
||||
doDelayPunish = false;
|
||||
Initialize();
|
||||
_Reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +162,18 @@ class boss_gothik : public CreatureScript
|
||||
|
||||
struct boss_gothikAI : public BossAI
|
||||
{
|
||||
boss_gothikAI(Creature* creature) : BossAI(creature, BOSS_GOTHIK) { }
|
||||
boss_gothikAI(Creature* creature) : BossAI(creature, BOSS_GOTHIK)
|
||||
{
|
||||
Initialize();
|
||||
waveCount = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
mergedSides = false;
|
||||
phaseTwo = false;
|
||||
thirtyPercentReached = false;
|
||||
}
|
||||
|
||||
uint32 waveCount;
|
||||
typedef std::vector<Creature*> TriggerVct;
|
||||
@@ -182,9 +193,7 @@ class boss_gothik : public CreatureScript
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
instance->SetData(DATA_GOTHIK_GATE, GO_STATE_ACTIVE);
|
||||
_Reset();
|
||||
mergedSides = false;
|
||||
phaseTwo = false;
|
||||
thirtyPercentReached = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -66,7 +66,13 @@ public:
|
||||
|
||||
struct boss_heiganAI : public BossAI
|
||||
{
|
||||
boss_heiganAI(Creature* creature) : BossAI(creature, BOSS_HEIGAN) { }
|
||||
boss_heiganAI(Creature* creature) : BossAI(creature, BOSS_HEIGAN)
|
||||
{
|
||||
eruptSection = 0;
|
||||
eruptDirection = false;
|
||||
safetyDance = false;
|
||||
phase = PHASE_FIGHT;
|
||||
}
|
||||
|
||||
uint32 eruptSection;
|
||||
bool eruptDirection;
|
||||
|
||||
@@ -263,9 +263,20 @@ public:
|
||||
{
|
||||
boss_kelthuzadAI(Creature* creature) : BossAI(creature, BOSS_KELTHUZAD), spawns(creature)
|
||||
{
|
||||
Initialize();
|
||||
uiFaction = me->getFaction();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
nGuardiansOfIcecrownCount = 0;
|
||||
uiGuardiansOfIcecrownTimer = 5000; // 5 seconds for summoning each Guardian of Icecrown in phase 3
|
||||
|
||||
Phase = 0;
|
||||
nAbomination = 0;
|
||||
nWeaver = 0;
|
||||
}
|
||||
|
||||
uint32 Phase;
|
||||
uint32 uiGuardiansOfIcecrownTimer;
|
||||
uint32 uiFaction;
|
||||
@@ -315,12 +326,7 @@ public:
|
||||
portal->ResetDoorOrButton();
|
||||
}
|
||||
|
||||
nGuardiansOfIcecrownCount = 0;
|
||||
uiGuardiansOfIcecrownTimer = 5000; // 5 seconds for summoning each Guardian of Icecrown in phase 3
|
||||
|
||||
Phase = 0;
|
||||
nAbomination = 0;
|
||||
nWeaver = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
|
||||
@@ -60,13 +60,19 @@ class boss_loatheb : public CreatureScript
|
||||
{
|
||||
boss_loathebAI(Creature* creature) : BossAI(creature, BOSS_LOATHEB)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_doomCounter = 0;
|
||||
_sporeLoserData = true;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
_doomCounter = 0;
|
||||
_sporeLoserData = true;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Pandemonius
|
||||
SD%Complete: 75
|
||||
SDComment: Not known how void blast is done (amount of rapid cast seems to be related to players in party). All mobs remaining in surrounding area should aggro when engaged.
|
||||
SDCategory: Auchindoun, Mana Tombs
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "mana_tombs.h"
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
++BeamCount;
|
||||
uint32 Beam = CurrentBeam;
|
||||
if (BeamCount > 3)
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
uint64 TargetGUID[3];
|
||||
uint32 BeamCount;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Warlord_Najentus
|
||||
SD%Complete: 95
|
||||
SDComment:
|
||||
SDCategory: Black Temple
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "black_temple.h"
|
||||
@@ -187,7 +179,7 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
uint64 SpineTargetGUID;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -16,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Broggok
|
||||
SD%Complete: 70
|
||||
SDComment: pre-event not made
|
||||
SDCategory: Hellfire Citadel, Blood Furnace
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
@@ -587,7 +587,7 @@ class boss_taerar : public CreatureScript
|
||||
void Reset() override
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_SHADE);
|
||||
|
||||
|
||||
Initialize();
|
||||
|
||||
emerald_dragonAI::Reset();
|
||||
|
||||
@@ -36,7 +36,6 @@ go_jotunheim_cage
|
||||
go_table_theka
|
||||
go_soulwell
|
||||
go_bashir_crystalforge
|
||||
go_ethereal_teleport_pad
|
||||
go_soulwell
|
||||
go_dragonflayer_cage
|
||||
go_tadpole_cage
|
||||
@@ -840,32 +839,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_ethereal_teleport_pad
|
||||
######*/
|
||||
|
||||
enum EtherealTeleportPad
|
||||
{
|
||||
NPC_IMAGE_WIND_TRADER = 20518,
|
||||
ITEM_TELEPORTER_POWER_PACK = 28969,
|
||||
};
|
||||
|
||||
class go_ethereal_teleport_pad : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_ethereal_teleport_pad() : GameObjectScript("go_ethereal_teleport_pad") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (!player->HasItemCount(ITEM_TELEPORTER_POWER_PACK))
|
||||
return false;
|
||||
|
||||
go->SummonCreature(NPC_IMAGE_WIND_TRADER, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), go->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_soulwell
|
||||
######*/
|
||||
@@ -1263,7 +1236,6 @@ void AddSC_go_scripts()
|
||||
new go_jotunheim_cage();
|
||||
new go_table_theka();
|
||||
new go_inconspicuous_landmark();
|
||||
new go_ethereal_teleport_pad();
|
||||
new go_soulwell();
|
||||
new go_tadpole_cage();
|
||||
new go_dragonflayer_cage();
|
||||
|
||||
Reference in new issue
Block a user