mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-23 15:10:07 -04:00
Core/Scripts: Fixed build of boss_* scripts
This commit is contained in:
@@ -698,7 +698,7 @@ void SmartAI::SetGUID(ObjectGuid /*guid*/, int32 /*id*/) { }
|
||||
|
||||
ObjectGuid SmartAI::GetGUID(int32 /*id*/) const
|
||||
{
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SmartAI::SetRun(bool run)
|
||||
|
||||
+1
-1
@@ -202,7 +202,7 @@ class boss_doomrel : public CreatureScript
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
|
||||
_instance->SetGuidData(DATA_EVENSTARTER, 0);
|
||||
_instance->SetGuidData(DATA_EVENSTARTER, ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
|
||||
@@ -75,10 +75,10 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
ResetTimer = 0;
|
||||
Midnight = 0;
|
||||
Midnight.Clear();
|
||||
}
|
||||
|
||||
uint64 Midnight;
|
||||
ObjectGuid Midnight;
|
||||
uint8 Phase;
|
||||
uint32 CleaveTimer;
|
||||
uint32 CurseTimer;
|
||||
@@ -141,11 +141,11 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
Phase = 1;
|
||||
Attumen = 0;
|
||||
Attumen.Clear();
|
||||
Mount_Timer = 0;
|
||||
}
|
||||
|
||||
uint64 Attumen;
|
||||
ObjectGuid Attumen;
|
||||
uint8 Phase;
|
||||
uint32 Mount_Timer;
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
Mount_Timer = 1000;
|
||||
}
|
||||
|
||||
void SetMidnight(Creature* pAttumen, uint64 value)
|
||||
void SetMidnight(Creature* pAttumen, ObjectGuid value)
|
||||
{
|
||||
ENSURE_AI(boss_attumen::boss_attumenAI, pAttumen->AI())->Midnight = value;
|
||||
}
|
||||
@@ -262,7 +262,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
|
||||
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pMidnight->SetVisible(true);
|
||||
}
|
||||
Midnight = 0;
|
||||
Midnight.Clear();
|
||||
me->SetVisible(false);
|
||||
me->Kill(me);
|
||||
} else ResetTimer -= diff;
|
||||
|
||||
@@ -107,7 +107,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
memset(AddId, 0, sizeof(AddId));
|
||||
memset(AddGUID, 0, sizeof(AddGUID));
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
@@ -126,7 +125,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 AddGUID[4];
|
||||
ObjectGuid AddGUID[4];
|
||||
|
||||
uint32 Vanish_Timer;
|
||||
uint32 Blind_Timer;
|
||||
@@ -339,13 +338,10 @@ struct boss_moroes_guestAI : public ScriptedAI
|
||||
{
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 GuestGUID[4];
|
||||
ObjectGuid GuestGUID[4];
|
||||
|
||||
boss_moroes_guestAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
GuestGUID[i] = 0;
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
@@ -358,13 +354,13 @@ struct boss_moroes_guestAI : public ScriptedAI
|
||||
{
|
||||
if (Creature* Moroes = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOROES)))
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (uint64 GUID = ENSURE_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
|
||||
if (ObjectGuid GUID = ENSURE_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
|
||||
GuestGUID[i] = GUID;
|
||||
}
|
||||
|
||||
Unit* SelectGuestTarget()
|
||||
{
|
||||
uint64 TempGUID = GuestGUID[rand32() % 4];
|
||||
ObjectGuid TempGUID = GuestGUID[rand32() % 4];
|
||||
if (TempGUID)
|
||||
{
|
||||
Unit* unit = ObjectAccessor::GetUnit(*me, TempGUID);
|
||||
|
||||
@@ -81,13 +81,6 @@ public:
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
for (int i=0; i<3; ++i)
|
||||
{
|
||||
PortalGUID[i] = 0;
|
||||
BeamTarget[i] = 0;
|
||||
BeamerGUID[i] = 0;
|
||||
}
|
||||
|
||||
PortalPhase = false;
|
||||
PhaseTimer = 0;
|
||||
EmpowermentTimer = 0;
|
||||
@@ -112,9 +105,9 @@ public:
|
||||
uint32 NetherbreathTimer;
|
||||
uint32 EmpowermentTimer;
|
||||
uint32 PortalTimer; // timer for beam checking
|
||||
uint64 PortalGUID[3]; // guid's of portals
|
||||
uint64 BeamerGUID[3]; // guid's of auxiliary beaming portals
|
||||
uint64 BeamTarget[3]; // guid's of portals' current targets
|
||||
ObjectGuid PortalGUID[3]; // guid's of portals
|
||||
ObjectGuid BeamerGUID[3]; // guid's of auxiliary beaming portals
|
||||
ObjectGuid BeamTarget[3]; // guid's of portals' current targets
|
||||
|
||||
bool IsBetween(WorldObject* u1, WorldObject* target, WorldObject* u2) // the in-line checker
|
||||
{
|
||||
@@ -157,7 +150,7 @@ public:
|
||||
pos[GREEN_PORTAL] = ((r % 2) ? 0 : (r > 1 ? 2 : 1));
|
||||
pos[BLUE_PORTAL] = (r > 1 ? 1 : 2); // Blue Portal not on the left side (0)
|
||||
|
||||
for (int i=0; i<3; ++i)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
if (Creature* portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
{
|
||||
PortalGUID[i] = portal->GetGUID();
|
||||
@@ -173,14 +166,14 @@ public:
|
||||
portal->DisappearAndDie();
|
||||
if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i]))
|
||||
portal->DisappearAndDie();
|
||||
PortalGUID[i] = 0;
|
||||
BeamTarget[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
BeamTarget[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdatePortals() // Here we handle the beams' behavior
|
||||
{
|
||||
for (int j=0; j<3; ++j) // j = color
|
||||
for (int j = 0; j < 3; ++j) // j = color
|
||||
if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[j]))
|
||||
{
|
||||
// the one who's been cast upon before
|
||||
@@ -198,9 +191,9 @@ public:
|
||||
Player* p = i->GetSource();
|
||||
if (p && p->IsAlive() // alive
|
||||
&& (!target || target->GetDistance2d(portal)>p->GetDistance2d(portal)) // closer than current best
|
||||
&& !p->HasAura(PlayerDebuff[j], 0) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j+1)%3], 0) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j+2)%3], 0)
|
||||
&& !p->HasAura(PlayerDebuff[j]) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j + 1) % 3]) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j + 2) % 3])
|
||||
&& IsBetween(me, p, portal)) // on the beam
|
||||
target = p;
|
||||
}
|
||||
@@ -220,7 +213,7 @@ public:
|
||||
{
|
||||
beamer->CastSpell(target, PortalBeam[j], false);
|
||||
beamer->DisappearAndDie();
|
||||
BeamerGUID[j] = 0;
|
||||
BeamerGUID[j].Clear();
|
||||
}
|
||||
// create new one and start beaming on the target
|
||||
if (Creature* beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
|
||||
@@ -110,11 +110,11 @@ public:
|
||||
struct netherspite_infernalAI : public ScriptedAI
|
||||
{
|
||||
netherspite_infernalAI(Creature* creature) : ScriptedAI(creature),
|
||||
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) { }
|
||||
HellfireTimer(0), CleanupTimer(0), point(NULL) { }
|
||||
|
||||
uint32 HellfireTimer;
|
||||
uint32 CleanupTimer;
|
||||
uint64 malchezaar;
|
||||
ObjectGuid malchezaar;
|
||||
InfernalPoint *point;
|
||||
|
||||
void Reset() override { }
|
||||
@@ -189,7 +189,6 @@ public:
|
||||
Initialize();
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
memset(axes, 0, sizeof(axes));
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -208,7 +207,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
enfeeble_targets[i] = 0;
|
||||
enfeeble_targets[i].Clear();
|
||||
enfeeble_health[i] = 0;
|
||||
}
|
||||
}
|
||||
@@ -225,12 +224,12 @@ public:
|
||||
uint32 AxesTargetSwitchTimer;
|
||||
uint32 InfernalCleanupTimer;
|
||||
|
||||
std::vector<uint64> infernals;
|
||||
GuidVector infernals;
|
||||
std::vector<InfernalPoint*> positions;
|
||||
|
||||
uint64 axes[2];
|
||||
uint64 enfeeble_targets[5];
|
||||
uint32 enfeeble_health[5];
|
||||
ObjectGuid axes[2];
|
||||
ObjectGuid enfeeble_targets[5];
|
||||
uint64 enfeeble_health[5];
|
||||
|
||||
uint32 phase;
|
||||
|
||||
@@ -279,7 +278,7 @@ public:
|
||||
void InfernalCleanup()
|
||||
{
|
||||
//Infernal Cleanup
|
||||
for (std::vector<uint64>::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
|
||||
for (GuidVector::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
|
||||
if (Unit* pInfernal = ObjectAccessor::GetUnit(*me, *itr))
|
||||
if (pInfernal->IsAlive())
|
||||
{
|
||||
@@ -297,7 +296,7 @@ public:
|
||||
Unit* axe = ObjectAccessor::GetUnit(*me, axes[i]);
|
||||
if (axe && axe->IsAlive())
|
||||
axe->Kill(axe);
|
||||
axes[i] = 0;
|
||||
axes[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +349,7 @@ public:
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, enfeeble_targets[i]);
|
||||
if (target && target->IsAlive())
|
||||
target->SetHealth(enfeeble_health[i]);
|
||||
enfeeble_targets[i] = 0;
|
||||
enfeeble_targets[i].Clear();
|
||||
enfeeble_health[i] = 0;
|
||||
}
|
||||
}
|
||||
@@ -576,11 +575,13 @@ public:
|
||||
|
||||
void Cleanup(Creature* infernal, InfernalPoint *point)
|
||||
{
|
||||
for (std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
|
||||
if (*itr == infernal->GetGUID())
|
||||
for (GuidVector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
|
||||
{
|
||||
infernals.erase(itr);
|
||||
break;
|
||||
if (*itr == infernal->GetGUID())
|
||||
{
|
||||
infernals.erase(itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
positions.push_back(point);
|
||||
|
||||
@@ -144,10 +144,10 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
SacrificeGUID = 0;
|
||||
SacrificeGUID.Clear();
|
||||
}
|
||||
|
||||
uint64 SacrificeGUID;
|
||||
ObjectGuid SacrificeGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -269,10 +269,8 @@ public:
|
||||
{
|
||||
boss_terestianAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
PortalGUID[i] = 0;
|
||||
instance = creature->GetInstanceScript();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -289,7 +287,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 PortalGUID[2];
|
||||
ObjectGuid PortalGUID[2];
|
||||
uint8 PortalsCount;
|
||||
|
||||
uint32 SacrificeTimer;
|
||||
@@ -312,7 +310,7 @@ public:
|
||||
pPortal->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
PortalGUID[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,7 +365,7 @@ public:
|
||||
if (Creature* pPortal = ObjectAccessor::GetCreature((*me), PortalGUID[i]))
|
||||
pPortal->DespawnOrUnsummon();
|
||||
|
||||
PortalGUID[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -250,11 +250,11 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
DorotheeGUID = 0;
|
||||
DorotheeGUID.Clear();
|
||||
YipTimer = 10000;
|
||||
}
|
||||
|
||||
uint64 DorotheeGUID;
|
||||
ObjectGuid DorotheeGUID;
|
||||
uint32 YipTimer;
|
||||
|
||||
void Reset() override
|
||||
@@ -868,7 +868,7 @@ public:
|
||||
FearTimer = urand(25000, 35000);
|
||||
SwipeTimer = 5000;
|
||||
|
||||
HoodGUID = 0;
|
||||
HoodGUID.Clear();
|
||||
TempThreat = 0;
|
||||
|
||||
IsChasing = false;
|
||||
@@ -880,7 +880,7 @@ public:
|
||||
uint32 FearTimer;
|
||||
uint32 SwipeTimer;
|
||||
|
||||
uint64 HoodGUID;
|
||||
ObjectGuid HoodGUID;
|
||||
float TempThreat;
|
||||
|
||||
bool IsChasing;
|
||||
@@ -947,7 +947,7 @@ public:
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID))
|
||||
{
|
||||
HoodGUID = 0;
|
||||
HoodGUID.Clear();
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
me->AddThreat(target, TempThreat);
|
||||
@@ -1073,7 +1073,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
RomuloGUID = 0;
|
||||
RomuloGUID.Clear();
|
||||
Phase = PHASE_JULIANNE;
|
||||
|
||||
BlindingPassionTimer = 30000;
|
||||
@@ -1093,7 +1093,7 @@ public:
|
||||
uint32 EntryYellTimer;
|
||||
uint32 AggroYellTimer;
|
||||
|
||||
uint64 RomuloGUID;
|
||||
ObjectGuid RomuloGUID;
|
||||
|
||||
uint32 Phase;
|
||||
|
||||
@@ -1197,7 +1197,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
JulianneGUID = 0;
|
||||
JulianneGUID.Clear();
|
||||
Phase = PHASE_ROMULO;
|
||||
|
||||
BackwardLungeTimer = 15000;
|
||||
@@ -1212,7 +1212,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 JulianneGUID;
|
||||
ObjectGuid JulianneGUID;
|
||||
uint32 Phase;
|
||||
|
||||
uint32 EntryYellTimer;
|
||||
|
||||
@@ -548,7 +548,7 @@ public:
|
||||
me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->ClearAllReactives();
|
||||
me->SetTarget(0);
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
|
||||
@@ -360,7 +360,6 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
memset(&m_auiLackeyGUIDs, 0, sizeof(m_auiLackeyGUIDs));
|
||||
AcquireGUIDs();
|
||||
}
|
||||
|
||||
@@ -377,7 +376,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 m_auiLackeyGUIDs[MAX_ACTIVE_LACKEY];
|
||||
ObjectGuid m_auiLackeyGUIDs[MAX_ACTIVE_LACKEY];
|
||||
uint32 ResetThreatTimer;
|
||||
|
||||
bool UsedPotion;
|
||||
|
||||
@@ -220,7 +220,7 @@ class boss_selin_fireheart : public CreatureScript
|
||||
if (CrystalChosen && CrystalChosen->IsAlive())
|
||||
CrystalChosen->Kill(CrystalChosen);
|
||||
|
||||
CrystalGUID = 0;
|
||||
CrystalGUID.Clear();
|
||||
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
|
||||
@@ -240,14 +240,14 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
Phase = 0;
|
||||
bodyGUID = 0;
|
||||
bodyGUID.Clear();
|
||||
die = false;
|
||||
withbody = true;
|
||||
wait = 1000;
|
||||
laugh = urand(15000, 30000);
|
||||
}
|
||||
|
||||
uint64 bodyGUID;
|
||||
ObjectGuid bodyGUID;
|
||||
|
||||
uint32 Phase;
|
||||
uint32 laugh;
|
||||
@@ -390,8 +390,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
headGUID = 0;
|
||||
PlayerGUID = 0;
|
||||
id = 0;
|
||||
whirlwind = 0;
|
||||
wp_reached = false;
|
||||
@@ -417,8 +415,8 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 headGUID;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid headGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
uint32 Phase;
|
||||
uint32 id;
|
||||
@@ -446,9 +444,9 @@ public:
|
||||
if (headGUID)
|
||||
{
|
||||
if (Creature* Head = ObjectAccessor::GetCreature((*me), headGUID))
|
||||
Head->DisappearAndDie();
|
||||
Head->DespawnOrUnsummon();
|
||||
|
||||
headGUID = 0;
|
||||
headGUID.Clear();
|
||||
}
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
@@ -806,18 +804,17 @@ public:
|
||||
npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
sprouted = false;
|
||||
debuffGUID = 0;
|
||||
}
|
||||
|
||||
bool sprouted;
|
||||
uint64 debuffGUID;
|
||||
ObjectGuid debuffGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z); //this visual aura some under ground
|
||||
me->SetPosition(x, y, z + 0.35f, 0.0f);
|
||||
debuffGUID = 0;
|
||||
debuffGUID.Clear();
|
||||
Despawn();
|
||||
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
|
||||
if (debuff)
|
||||
@@ -857,7 +854,7 @@ public:
|
||||
if (debuff)
|
||||
{
|
||||
debuff->SetVisible(false);
|
||||
debuffGUID = 0;
|
||||
debuffGUID.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
if (instance->GetData(TYPE_SH_QUEST))
|
||||
{
|
||||
if (Player* player = killer->ToPlayer())
|
||||
player->KilledMonsterCredit(SH_QUEST_CREDIT, 0);
|
||||
player->KilledMonsterCredit(SH_QUEST_CREDIT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
SathGUID = 0;
|
||||
SathGUID.Clear();
|
||||
ArcaneBuffetTimer = 8000;
|
||||
FrostBreathTimer = 15000;
|
||||
WildMagicTimer = 10000;
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
bool isBanished;
|
||||
bool bJustReset;
|
||||
|
||||
uint64 SathGUID;
|
||||
ObjectGuid SathGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -456,7 +456,7 @@ public:
|
||||
uint32 YellTimer;
|
||||
uint32 YellSequence;
|
||||
|
||||
uint64 SathGUID;
|
||||
ObjectGuid SathGUID;
|
||||
|
||||
bool isEnraged; // if demon is enraged
|
||||
|
||||
@@ -464,7 +464,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
SathGUID = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
|
||||
@@ -742,7 +742,7 @@ public:
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
{
|
||||
pRandomPlayer = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0))
|
||||
if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -835,7 +835,7 @@ public:
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
{
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!target || !target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0)) break;
|
||||
if (!target || !target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT)) break;
|
||||
}
|
||||
if (target)
|
||||
{
|
||||
@@ -962,7 +962,7 @@ public:
|
||||
return;
|
||||
|
||||
// Gain Shadow Infusion at 20% health
|
||||
if (HealthBelowPct(20) && !me->HasAura(SPELL_SHADOW_INFUSION, 0))
|
||||
if (HealthBelowPct(20) && !me->HasAura(SPELL_SHADOW_INFUSION))
|
||||
DoCast(me, SPELL_SHADOW_INFUSION, true);
|
||||
|
||||
// Shadow Bolt Volley - Shoots Shadow Bolts at all enemies within 30 yards, for ~2k Shadow damage.
|
||||
|
||||
@@ -574,7 +574,7 @@ public:
|
||||
case 2:
|
||||
SpellTimer = 400;
|
||||
NeedForAHack = 3;
|
||||
me->RemoveAura(SPELL_BLACKHOLE_GROW, 1);
|
||||
me->RemoveAura(SPELL_BLACKHOLE_GROW);
|
||||
break;
|
||||
case 3:
|
||||
SpellTimer = urand(400, 900);
|
||||
|
||||
@@ -298,7 +298,7 @@ class boss_zuljin : public CreatureScript
|
||||
temp->setDeathState(DEAD);
|
||||
}
|
||||
}
|
||||
SpiritGUID[i] = 0;
|
||||
SpiritGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ class boss_zuljin : public CreatureScript
|
||||
Claw_Rage_Timer = urand(15000, 20000);
|
||||
me->SetSpeed(MOVE_RUN, 1.2f);
|
||||
AttackStart(ObjectAccessor::GetUnit(*me, TankGUID));
|
||||
TankGUID = 0;
|
||||
TankGUID.Clear();
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -512,7 +512,7 @@ class boss_zuljin : public CreatureScript
|
||||
Lynx_Rush_Timer = urand(15000, 20000);
|
||||
me->SetSpeed(MOVE_RUN, 1.2f);
|
||||
AttackStart(ObjectAccessor::GetUnit(*me, TankGUID));
|
||||
TankGUID = 0;
|
||||
TankGUID.Clear();
|
||||
}
|
||||
else
|
||||
AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
MovePoint = urand(0, 5);
|
||||
PointData = GetMoveData();
|
||||
SummonWhelpCount = 0;
|
||||
triggerGUID = 0;
|
||||
tankGUID = 0;
|
||||
triggerGUID.Clear();
|
||||
tankGUID.Clear();
|
||||
IsMoving = false;
|
||||
}
|
||||
|
||||
@@ -474,8 +474,8 @@ public:
|
||||
uint8 Phase;
|
||||
uint8 MovePoint;
|
||||
uint8 SummonWhelpCount;
|
||||
uint64 triggerGUID;
|
||||
uint64 tankGUID;
|
||||
ObjectGuid triggerGUID;
|
||||
ObjectGuid tankGUID;
|
||||
bool IsMoving;
|
||||
};
|
||||
|
||||
|
||||
@@ -95,12 +95,12 @@ class boss_ossirian : public CreatureScript
|
||||
void Initialize()
|
||||
{
|
||||
CrystalIterator = 0;
|
||||
TriggerGUID = 0;
|
||||
CrystalGUID = 0;
|
||||
TriggerGUID.Clear();
|
||||
CrystalGUID.Clear();
|
||||
}
|
||||
|
||||
uint64 TriggerGUID;
|
||||
uint64 CrystalGUID;
|
||||
ObjectGuid TriggerGUID;
|
||||
ObjectGuid CrystalGUID;
|
||||
uint8 CrystalIterator;
|
||||
bool SaidIntro;
|
||||
|
||||
|
||||
@@ -107,8 +107,8 @@ public:
|
||||
if (!bFirstTime)
|
||||
instance->SetBossState(DATA_JEDOGA_SHADOWSEEKER, FAIL);
|
||||
|
||||
instance->SetGuidData(DATA_PL_JEDOGA_TARGET, 0);
|
||||
instance->SetGuidData(DATA_ADD_JEDOGA_OPFER, 0);
|
||||
instance->SetGuidData(DATA_PL_JEDOGA_TARGET, ObjectGuid::Empty);
|
||||
instance->SetGuidData(DATA_ADD_JEDOGA_OPFER, ObjectGuid::Empty);
|
||||
instance->SetData(DATA_JEDOGA_RESET_INITIANDS, 0);
|
||||
MoveUp();
|
||||
|
||||
@@ -248,13 +248,14 @@ public:
|
||||
|
||||
void OpferRufen()
|
||||
{
|
||||
uint64 opfer = instance->GetGuidData(DATA_ADD_JEDOGA_INITIAND);
|
||||
ObjectGuid opfer = instance->GetGuidData(DATA_ADD_JEDOGA_INITIAND);
|
||||
|
||||
if (opfer)
|
||||
{
|
||||
Talk(TEXT_SACRIFICE_1);
|
||||
instance->SetGuidData(DATA_ADD_JEDOGA_OPFER, opfer);
|
||||
} else
|
||||
}
|
||||
else
|
||||
bCanDown = true;
|
||||
}
|
||||
|
||||
@@ -389,7 +390,7 @@ public:
|
||||
boss->AI()->DoAction(ACTION_INITIAND_KILLED);
|
||||
}
|
||||
|
||||
instance->SetGuidData(DATA_ADD_JEDOGA_OPFER, 0);
|
||||
instance->SetGuidData(DATA_ADD_JEDOGA_OPFER, ObjectGuid::Empty);
|
||||
|
||||
bWalking = false;
|
||||
}
|
||||
|
||||
@@ -88,16 +88,14 @@ class boss_prince_taldaram : public CreatureScript
|
||||
boss_prince_taldaramAI(Creature* creature) : BossAI(creature, DATA_PRINCE_TALDARAM)
|
||||
{
|
||||
me->SetDisableGravity(true);
|
||||
_flameSphereTargetGUID = 0;
|
||||
_embraceTargetGUID = 0;
|
||||
_embraceTakenDamage = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
_flameSphereTargetGUID = 0;
|
||||
_embraceTargetGUID = 0;
|
||||
_flameSphereTargetGUID.Clear();
|
||||
_embraceTargetGUID.Clear();
|
||||
_embraceTakenDamage = 0;
|
||||
}
|
||||
|
||||
@@ -194,7 +192,7 @@ class boss_prince_taldaram : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_FEEDING, 20000);
|
||||
break;
|
||||
case EVENT_FEEDING:
|
||||
_embraceTargetGUID = 0;
|
||||
_embraceTargetGUID.Clear();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -213,7 +211,7 @@ class boss_prince_taldaram : public CreatureScript
|
||||
_embraceTakenDamage += damage;
|
||||
if (_embraceTakenDamage > DUNGEON_MODE<uint32>(DATA_EMBRACE_DMG, H_DATA_EMBRACE_DMG))
|
||||
{
|
||||
_embraceTargetGUID = 0;
|
||||
_embraceTargetGUID.Clear();
|
||||
me->CastStop();
|
||||
}
|
||||
}
|
||||
@@ -231,7 +229,7 @@ class boss_prince_taldaram : public CreatureScript
|
||||
return;
|
||||
|
||||
if (victim->GetGUID() == _embraceTargetGUID)
|
||||
_embraceTargetGUID = 0;
|
||||
_embraceTargetGUID.Clear();
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
@@ -267,8 +265,8 @@ class boss_prince_taldaram : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _flameSphereTargetGUID;
|
||||
uint64 _embraceTargetGUID;
|
||||
ObjectGuid _flameSphereTargetGUID;
|
||||
ObjectGuid _embraceTargetGUID;
|
||||
uint32 _embraceTakenDamage;
|
||||
};
|
||||
|
||||
@@ -288,7 +286,6 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
|
||||
{
|
||||
npc_prince_taldaram_flame_sphereAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_flameSphereTargetGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -296,7 +293,7 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
|
||||
DoCast(me, SPELL_FLAME_SPHERE_SPAWN_EFFECT, true);
|
||||
DoCast(me, SPELL_FLAME_SPHERE_VISUAL, true);
|
||||
|
||||
_flameSphereTargetGUID = 0;
|
||||
_flameSphereTargetGUID.Clear();
|
||||
_events.Reset();
|
||||
_events.ScheduleEvent(EVENT_START_MOVE, 3 * IN_MILLISECONDS);
|
||||
_events.ScheduleEvent(EVENT_DESPAWN, 13 * IN_MILLISECONDS);
|
||||
|
||||
@@ -1116,7 +1116,7 @@ class npc_combustion_consumption : public CreatureScript
|
||||
struct npc_combustion_consumptionAI : public ScriptedAI
|
||||
{
|
||||
npc_combustion_consumptionAI(Creature* creature) : ScriptedAI(creature),
|
||||
_instance(creature->GetInstanceScript()), _summonerGuid(0)
|
||||
_instance(creature->GetInstanceScript())
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
@@ -1171,7 +1171,7 @@ class npc_combustion_consumption : public CreatureScript
|
||||
InstanceScript* _instance;
|
||||
uint32 _explosionSpell;
|
||||
uint32 _damageSpell;
|
||||
uint64 _summonerGuid;
|
||||
ObjectGuid _summonerGuid;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -1394,7 +1394,7 @@ class spell_halion_combustion_consumption : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
if (GetTarget()->HasAura(_markSpell))
|
||||
GetTarget()->RemoveAurasDueToSpell(_markSpell, 0, 0, AURA_REMOVE_BY_EXPIRE);
|
||||
GetTarget()->RemoveAurasDueToSpell(_markSpell, ObjectGuid::Empty, 0, AURA_REMOVE_BY_EXPIRE);
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -1455,7 +1455,7 @@ class spell_halion_marks : public SpellScriptLoader
|
||||
|
||||
if (Unit* dispelledUnit = GetUnitOwner())
|
||||
if (dispelledUnit->HasAura(_removeSpellId))
|
||||
dispelledUnit->RemoveAurasDueToSpell(_removeSpellId, 0, 0, AURA_REMOVE_BY_EXPIRE);
|
||||
dispelledUnit->RemoveAurasDueToSpell(_removeSpellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_EXPIRE);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
@@ -1558,7 +1558,7 @@ class spell_halion_twilight_realm_handlers : public SpellScriptLoader
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
target->RemoveAurasDueToSpell(_beforeHitSpellId, 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
target->RemoveAurasDueToSpell(_beforeHitSpellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
if (InstanceScript* instance = target->GetInstanceScript())
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_UNK7);
|
||||
}
|
||||
|
||||
+3
-3
@@ -208,7 +208,7 @@ public:
|
||||
}
|
||||
|
||||
if (uiType <= 3)
|
||||
Start(false, true, 0, NULL);
|
||||
Start(false, true);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
@@ -769,7 +769,7 @@ public:
|
||||
uiMultiShotTimer = 0;
|
||||
uiLightningArrowsTimer = 7000;
|
||||
|
||||
uiTargetGUID = 0;
|
||||
uiTargetGUID.Clear();
|
||||
|
||||
bShoot = false;
|
||||
}
|
||||
@@ -783,7 +783,7 @@ public:
|
||||
uint32 uiMultiShotTimer;
|
||||
uint32 uiLightningArrowsTimer;
|
||||
|
||||
uint64 uiTargetGUID;
|
||||
ObjectGuid uiTargetGUID;
|
||||
|
||||
bool bShoot;
|
||||
bool bDone;
|
||||
|
||||
+1
-1
@@ -483,7 +483,7 @@ class boss_toc_champion_controller : public CreatureScript
|
||||
SummonChampions((Team)uiData);
|
||||
break;
|
||||
case 1:
|
||||
for (std::list<uint64>::iterator i = _summons.begin(); i != _summons.end(); ++i)
|
||||
for (SummonList::iterator i = _summons.begin(); i != _summons.end(); ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, *i))
|
||||
{
|
||||
|
||||
+5
-6
@@ -294,7 +294,6 @@ class npc_snobold_vassal : public CreatureScript
|
||||
{
|
||||
npc_snobold_vassalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_targetGUID = 0;
|
||||
_targetDied = false;
|
||||
_instance = creature->GetInstanceScript();
|
||||
_instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
|
||||
@@ -305,7 +304,7 @@ class npc_snobold_vassal : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_BATTER, 5*IN_MILLISECONDS);
|
||||
_events.ScheduleEvent(EVENT_HEAD_CRACK, 25*IN_MILLISECONDS);
|
||||
|
||||
_targetGUID = 0;
|
||||
_targetGUID.Clear();
|
||||
_targetDied = false;
|
||||
|
||||
//Workaround for Snobold
|
||||
@@ -442,7 +441,7 @@ class npc_snobold_vassal : public CreatureScript
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
uint64 _targetGUID;
|
||||
ObjectGuid _targetGUID;
|
||||
bool _targetDied;
|
||||
};
|
||||
|
||||
@@ -877,7 +876,7 @@ class boss_icehowl : public CreatureScript
|
||||
_movementStarted = false;
|
||||
_movementFinish = false;
|
||||
_trampleCast = false;
|
||||
_trampleTargetGUID = 0;
|
||||
_trampleTargetGUID.Clear();
|
||||
_trampleTargetX = 0;
|
||||
_trampleTargetY = 0;
|
||||
_trampleTargetZ = 0;
|
||||
@@ -1077,7 +1076,7 @@ class boss_icehowl : public CreatureScript
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*me, _trampleTargetGUID))
|
||||
Talk(EMOTE_TRAMPLE_START, target);
|
||||
me->GetMotionMaster()->MoveCharge(_trampleTargetX, _trampleTargetY, _trampleTargetZ, 42, 1);
|
||||
me->SetTarget(0);
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
_stage = 5;
|
||||
break;
|
||||
case 5:
|
||||
@@ -1134,7 +1133,7 @@ class boss_icehowl : public CreatureScript
|
||||
|
||||
private:
|
||||
float _trampleTargetX, _trampleTargetY, _trampleTargetZ;
|
||||
uint64 _trampleTargetGUID;
|
||||
ObjectGuid _trampleTargetGUID;
|
||||
bool _movementStarted;
|
||||
bool _movementFinish;
|
||||
bool _trampleCast;
|
||||
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
void SetSummonerStatus(bool active)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; i++)
|
||||
if (uint64 guid = instance->GetGuidData(summoners[i].data))
|
||||
if (ObjectGuid guid = instance->GetGuidData(summoners[i].data))
|
||||
if (Creature* crystalChannelTarget = ObjectAccessor::GetCreature(*me, guid))
|
||||
{
|
||||
if (active)
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
void SetCrystalsStatus(bool active)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; i++)
|
||||
if (uint64 guid = instance->GetGuidData(DATA_NOVOS_CRYSTAL_1 + i))
|
||||
if (ObjectGuid guid = instance->GetGuidData(DATA_NOVOS_CRYSTAL_1 + i))
|
||||
if (GameObject* crystal = ObjectAccessor::GetGameObject(*me, guid))
|
||||
SetCrystalStatus(crystal, active);
|
||||
}
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
void CrystalHandlerDied()
|
||||
{
|
||||
for (uint8 i = 0; i < 4; i++)
|
||||
if (uint64 guid = instance->GetGuidData(DATA_NOVOS_CRYSTAL_1 + i))
|
||||
if (ObjectGuid guid = instance->GetGuidData(DATA_NOVOS_CRYSTAL_1 + i))
|
||||
if (GameObject* crystal = ObjectAccessor::GetGameObject(*me, guid))
|
||||
if (crystal->GetGoState() == GO_STATE_ACTIVE)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SUMMON_MINIONS, 15000);
|
||||
}
|
||||
else if (uint64 guid = instance->GetGuidData(DATA_NOVOS_SUMMONER_4))
|
||||
else if (ObjectGuid guid = instance->GetGuidData(DATA_NOVOS_SUMMONER_4))
|
||||
if (Creature* crystalChannelTarget = ObjectAccessor::GetCreature(*me, guid))
|
||||
crystalChannelTarget->AI()->SetData(SPELL_SUMMON_CRYSTAL_HANDLER, 15000);
|
||||
}
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
if (uint64 guid = instance->GetGuidData(DATA_NOVOS))
|
||||
if (ObjectGuid guid = instance->GetGuidData(DATA_NOVOS))
|
||||
if (Creature* novos = ObjectAccessor::GetCreature(*me, guid))
|
||||
novos->AI()->JustSummoned(summon);
|
||||
|
||||
|
||||
@@ -293,8 +293,8 @@ class boss_krick : public CreatureScript
|
||||
void Initialize()
|
||||
{
|
||||
_phase = PHASE_COMBAT;
|
||||
_outroNpcGUID = 0;
|
||||
_tyrannusGUID = 0;
|
||||
_outroNpcGUID.Clear();
|
||||
_tyrannusGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -494,8 +494,8 @@ class boss_krick : public CreatureScript
|
||||
EventMap _events;
|
||||
|
||||
KrickPhase _phase;
|
||||
uint64 _outroNpcGUID;
|
||||
uint64 _tyrannusGUID;
|
||||
ObjectGuid _outroNpcGUID;
|
||||
ObjectGuid _tyrannusGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -299,7 +299,7 @@ class boss_rimefang : public CreatureScript
|
||||
void Initialize()
|
||||
{
|
||||
_currentWaypoint = 0;
|
||||
_hoarfrostTargetGUID = 0;
|
||||
_hoarfrostTargetGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -366,7 +366,7 @@ class boss_rimefang : public CreatureScript
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, _hoarfrostTargetGUID))
|
||||
{
|
||||
DoCast(target, SPELL_HOARFROST);
|
||||
_hoarfrostTargetGUID = 0;
|
||||
_hoarfrostTargetGUID.Clear();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -377,7 +377,7 @@ class boss_rimefang : public CreatureScript
|
||||
|
||||
private:
|
||||
Vehicle* _vehicle;
|
||||
uint64 _hoarfrostTargetGUID;
|
||||
ObjectGuid _hoarfrostTargetGUID;
|
||||
EventMap _events;
|
||||
uint8 _currentWaypoint;
|
||||
};
|
||||
@@ -391,7 +391,7 @@ class boss_rimefang : public CreatureScript
|
||||
class player_overlord_brandAI : public PlayerAI
|
||||
{
|
||||
public:
|
||||
player_overlord_brandAI(Player* player, uint64 casterGUID) : PlayerAI(player), _tyrannusGUID(casterGUID) { }
|
||||
player_overlord_brandAI(Player* player, ObjectGuid casterGUID) : PlayerAI(player), _tyrannusGUID(casterGUID) { }
|
||||
|
||||
void DamageDealt(Unit* /*victim*/, uint32& damage, DamageEffectType /*damageType*/) override
|
||||
{
|
||||
@@ -409,7 +409,7 @@ class player_overlord_brandAI : public PlayerAI
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
|
||||
private:
|
||||
uint64 _tyrannusGUID;
|
||||
ObjectGuid _tyrannusGUID;
|
||||
};
|
||||
|
||||
class spell_tyrannus_overlord_brand : public SpellScriptLoader
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
uint32 uiImpalingChargeTimer;
|
||||
uint32 uiStompTimer;
|
||||
uint32 uiTransformationTimer;
|
||||
std::list<uint64> impaledList;
|
||||
GuidList impaledList;
|
||||
uint8 shareTheLove;
|
||||
|
||||
CombatPhase Phase;
|
||||
@@ -247,10 +247,10 @@ public:
|
||||
}
|
||||
|
||||
// 5 UNIQUE party members
|
||||
void CheckAchievement(uint64 guid)
|
||||
void CheckAchievement(ObjectGuid guid)
|
||||
{
|
||||
bool playerExists = false;
|
||||
for (std::list<uint64>::iterator itr = impaledList.begin(); itr != impaledList.end(); ++itr)
|
||||
for (GuidList::iterator itr = impaledList.begin(); itr != impaledList.end(); ++itr)
|
||||
if (guid != *itr)
|
||||
playerExists = true;
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
uint8 uiPhase;
|
||||
|
||||
std::set<uint64> lWrappedPlayers;
|
||||
GuidSet lWrappedPlayers;
|
||||
SummonList lSummons;
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
lWrappedPlayers.insert(guid);
|
||||
}
|
||||
|
||||
bool WasWrapped(uint64 guid)
|
||||
bool WasWrapped(ObjectGuid guid)
|
||||
{
|
||||
return lWrappedPlayers.count(guid) != 0;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ class boss_festergut : public CreatureScript
|
||||
{
|
||||
_maxInoculatedStack = 0;
|
||||
_inhaleCounter = 0;
|
||||
_gasDummyGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -279,7 +278,7 @@ class boss_festergut : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _gasDummyGUID;
|
||||
ObjectGuid _gasDummyGUID;
|
||||
uint32 _maxInoculatedStack;
|
||||
uint32 _inhaleCounter;
|
||||
};
|
||||
|
||||
@@ -383,7 +383,9 @@ public:
|
||||
void ResetSlots(uint32 team)
|
||||
{
|
||||
_transport = NULL;
|
||||
memset(_controlledSlots, 0, sizeof(uint64)* MAX_SLOTS);
|
||||
for (uint32 i = 0; i < MAX_SLOTS; ++i)
|
||||
_controlledSlots[i].Clear();
|
||||
|
||||
memset(_respawnCooldowns, 0, sizeof(time_t)* MAX_SLOTS);
|
||||
_spawnPoint = team == HORDE ? &OrgrimsHammerAddsSpawnPos : &SkybreakerAddsSpawnPos;
|
||||
_slotInfo = team == HORDE ? OrgrimsHammerSlotInfo : SkybreakerSlotInfo;
|
||||
@@ -422,7 +424,7 @@ public:
|
||||
|
||||
void ClearSlot(PassengerSlots slot)
|
||||
{
|
||||
_controlledSlots[slot] = 0;
|
||||
_controlledSlots[slot].Clear();
|
||||
_respawnCooldowns[slot] = time(NULL) + _slotInfo[slot].Cooldown;
|
||||
}
|
||||
|
||||
@@ -448,7 +450,7 @@ private:
|
||||
}
|
||||
|
||||
Transport* _transport;
|
||||
uint64 _controlledSlots[MAX_SLOTS];
|
||||
ObjectGuid _controlledSlots[MAX_SLOTS];
|
||||
time_t _respawnCooldowns[MAX_SLOTS];
|
||||
Position const* _spawnPoint;
|
||||
SlotInfo const* _slotInfo;
|
||||
@@ -482,7 +484,7 @@ private:
|
||||
class ResetEncounterEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
ResetEncounterEvent(Unit* caster, uint32 spellId, uint64 otherTransport) : _caster(caster), _spellId(spellId), _otherTransport(otherTransport) { }
|
||||
ResetEncounterEvent(Unit* caster, uint32 spellId, ObjectGuid otherTransport) : _caster(caster), _spellId(spellId), _otherTransport(otherTransport) { }
|
||||
|
||||
bool Execute(uint64, uint32) override
|
||||
{
|
||||
@@ -498,7 +500,7 @@ public:
|
||||
private:
|
||||
Unit* _caster;
|
||||
uint32 _spellId;
|
||||
uint64 _otherTransport;
|
||||
ObjectGuid _otherTransport;
|
||||
};
|
||||
|
||||
class BattleExperienceEvent : public BasicEvent
|
||||
@@ -801,7 +803,7 @@ class npc_gunship : public CreatureScript
|
||||
if (id != ACTION_SHIP_VISITS)
|
||||
return;
|
||||
|
||||
std::map<uint64, uint32>::iterator itr = _shipVisits.find(guid);
|
||||
std::map<ObjectGuid, uint32>::iterator itr = _shipVisits.find(guid);
|
||||
if (itr == _shipVisits.end())
|
||||
_shipVisits[guid] = 1;
|
||||
else
|
||||
@@ -814,7 +816,7 @@ class npc_gunship : public CreatureScript
|
||||
return 0;
|
||||
|
||||
uint32 max = 0;
|
||||
for (std::map<uint64, uint32>::const_iterator itr = _shipVisits.begin(); itr != _shipVisits.end(); ++itr)
|
||||
for (std::map<ObjectGuid, uint32>::const_iterator itr = _shipVisits.begin(); itr != _shipVisits.end(); ++itr)
|
||||
max = std::max(max, itr->second);
|
||||
|
||||
return max;
|
||||
@@ -822,7 +824,7 @@ class npc_gunship : public CreatureScript
|
||||
|
||||
private:
|
||||
uint32 _teamInInstance;
|
||||
std::map<uint64, uint32> _shipVisits;
|
||||
std::map<ObjectGuid, uint32> _shipVisits;
|
||||
bool _summonedFirstMage;
|
||||
bool _died;
|
||||
};
|
||||
|
||||
@@ -224,8 +224,8 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
void Initialize()
|
||||
{
|
||||
_waveCounter = 0;
|
||||
_nextVengefulShadeTargetGUID = 0;
|
||||
_darnavanGUID = 0;
|
||||
_nextVengefulShadeTargetGUID.Clear();
|
||||
_darnavanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -329,10 +329,10 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
{
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
if (Player* member = itr->GetSource())
|
||||
member->KilledMonsterCredit(NPC_DARNAVAN_CREDIT, 0);
|
||||
member->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
|
||||
}
|
||||
else
|
||||
owner->KilledMonsterCredit(NPC_DARNAVAN_CREDIT, 0);
|
||||
owner->KilledMonsterCredit(NPC_DARNAVAN_CREDIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
if (Creature* darnavan = ObjectAccessor::GetCreature(*me, _darnavanGUID))
|
||||
{
|
||||
darnavan->DespawnOrUnsummon();
|
||||
_darnavanGUID = 0;
|
||||
_darnavanGUID.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
if (summon->GetEntry() == NPC_VENGEFUL_SHADE)
|
||||
{
|
||||
target = ObjectAccessor::GetUnit(*me, _nextVengefulShadeTargetGUID); // Vengeful Shade
|
||||
_nextVengefulShadeTargetGUID = 0;
|
||||
_nextVengefulShadeTargetGUID.Clear();
|
||||
}
|
||||
else
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM); // Wave adds
|
||||
@@ -568,7 +568,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
if (_reanimationQueue.empty())
|
||||
return;
|
||||
|
||||
uint64 cultistGUID = _reanimationQueue.front();
|
||||
ObjectGuid cultistGUID = _reanimationQueue.front();
|
||||
Creature* cultist = ObjectAccessor::GetCreature(*me, cultistGUID);
|
||||
_reanimationQueue.pop_front();
|
||||
if (!cultist)
|
||||
@@ -615,9 +615,9 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _nextVengefulShadeTargetGUID;
|
||||
uint64 _darnavanGUID;
|
||||
std::deque<uint64> _reanimationQueue;
|
||||
ObjectGuid _nextVengefulShadeTargetGUID;
|
||||
ObjectGuid _darnavanGUID;
|
||||
GuidDeque _reanimationQueue;
|
||||
uint32 _waveCounter;
|
||||
uint8 const _dominateMindCount;
|
||||
bool _introDone;
|
||||
|
||||
@@ -133,7 +133,6 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
_coldflameLastPos.Relocate(creature);
|
||||
_introDone = false;
|
||||
_boneSlice = false;
|
||||
_coldflameTarget = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -211,7 +210,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
break;
|
||||
case EVENT_COLDFLAME:
|
||||
_coldflameLastPos.Relocate(me);
|
||||
_coldflameTarget = 0LL;
|
||||
_coldflameTarget.Clear();
|
||||
if (!me->HasAura(SPELL_BONE_STORM))
|
||||
DoCastAOE(SPELL_COLDFLAME_NORMAL);
|
||||
else
|
||||
@@ -307,7 +306,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
return 0LL;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type /*= 0 */) override
|
||||
@@ -333,8 +332,8 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
|
||||
private:
|
||||
Position _coldflameLastPos;
|
||||
std::vector<uint64> _boneSpikeImmune;
|
||||
uint64 _coldflameTarget;
|
||||
GuidVector _boneSpikeImmune;
|
||||
ObjectGuid _coldflameTarget;
|
||||
uint32 _boneStormDuration;
|
||||
float _baseSpeed;
|
||||
bool _introDone;
|
||||
|
||||
@@ -174,7 +174,7 @@ class AbominationDespawner
|
||||
public:
|
||||
explicit AbominationDespawner(Unit* owner) : _owner(owner) { }
|
||||
|
||||
bool operator()(uint64 guid)
|
||||
bool operator()(ObjectGuid guid)
|
||||
{
|
||||
if (Unit* summon = ObjectAccessor::GetUnit(*_owner, guid))
|
||||
{
|
||||
@@ -702,7 +702,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
events.SetPhase(newPhase);
|
||||
}
|
||||
|
||||
uint64 _oozeFloodDummyGUIDs[4];
|
||||
ObjectGuid _oozeFloodDummyGUIDs[4];
|
||||
Phases _phase; // external of EventMap because event phase gets reset on evade
|
||||
float const _baseSpeed;
|
||||
uint8 _oozeFloodStage;
|
||||
|
||||
@@ -469,7 +469,7 @@ class spell_rotface_ooze_flood : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
triggers.sort(Trinity::ObjectDistanceOrderPred(GetHitUnit()));
|
||||
GetHitUnit()->CastSpell(triggers.back(), uint32(GetEffectValue()), false, NULL, NULL, GetOriginalCaster() ? GetOriginalCaster()->GetGUID() : 0);
|
||||
GetHitUnit()->CastSpell(triggers.back(), uint32(GetEffectValue()), false, NULL, NULL, GetOriginalCaster() ? GetOriginalCaster()->GetGUID() : ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
|
||||
@@ -182,7 +182,7 @@ class FrostwyrmLandEvent : public BasicEvent
|
||||
class FrostBombExplosion : public BasicEvent
|
||||
{
|
||||
public:
|
||||
FrostBombExplosion(Creature* owner, uint64 sindragosaGUID) : _owner(owner), _sindragosaGUID(sindragosaGUID) { }
|
||||
FrostBombExplosion(Creature* owner, ObjectGuid sindragosaGUID) : _owner(owner), _sindragosaGUID(sindragosaGUID) { }
|
||||
|
||||
bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ class FrostBombExplosion : public BasicEvent
|
||||
|
||||
private:
|
||||
Creature* _owner;
|
||||
uint64 _sindragosaGUID;
|
||||
ObjectGuid _sindragosaGUID;
|
||||
};
|
||||
|
||||
class FrostBeaconSelector
|
||||
@@ -563,7 +563,6 @@ class npc_ice_tomb : public CreatureScript
|
||||
{
|
||||
npc_ice_tombAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_trappedPlayerGUID = 0;
|
||||
_existenceCheckTimer = 0;
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
@@ -595,7 +594,7 @@ class npc_ice_tomb : public CreatureScript
|
||||
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, _trappedPlayerGUID))
|
||||
{
|
||||
_trappedPlayerGUID = 0;
|
||||
_trappedPlayerGUID.Clear();
|
||||
player->RemoveAurasDueToSpell(SPELL_ICE_TOMB_DAMAGE);
|
||||
player->RemoveAurasDueToSpell(SPELL_ASPHYXIATION);
|
||||
}
|
||||
@@ -623,7 +622,7 @@ class npc_ice_tomb : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _trappedPlayerGUID;
|
||||
ObjectGuid _trappedPlayerGUID;
|
||||
uint32 _existenceCheckTimer;
|
||||
};
|
||||
|
||||
|
||||
@@ -1433,7 +1433,7 @@ class npc_valkyr_shadowguard : public CreatureScript
|
||||
struct npc_valkyr_shadowguardAI : public ScriptedAI
|
||||
{
|
||||
npc_valkyr_shadowguardAI(Creature* creature) : ScriptedAI(creature),
|
||||
_grabbedPlayer(0), _instance(creature->GetInstanceScript())
|
||||
_instance(creature->GetInstanceScript())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1563,7 +1563,7 @@ class npc_valkyr_shadowguard : public CreatureScript
|
||||
private:
|
||||
EventMap _events;
|
||||
Position _dropPoint;
|
||||
uint64 _grabbedPlayer;
|
||||
ObjectGuid _grabbedPlayer;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
@@ -1640,7 +1640,7 @@ class npc_strangulate_vehicle : public CreatureScript
|
||||
else
|
||||
{
|
||||
summoner->CastSpell(summoner, SPELL_HARVEST_SOULS_TELEPORT, true);
|
||||
summoner->RemoveAurasDueToSpell(HARVEST_SOUL, 0, 0, AURA_REMOVE_BY_EXPIRE);
|
||||
summoner->RemoveAurasDueToSpell(HARVEST_SOUL, ObjectGuid::Empty, 0, AURA_REMOVE_BY_EXPIRE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ struct ManaVoidSelector : public std::unary_function<Unit*, bool>
|
||||
class DelayedCastEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
DelayedCastEvent(Creature* trigger, uint32 spellId, uint64 originalCaster, uint32 despawnTime) : _trigger(trigger), _originalCaster(originalCaster), _spellId(spellId), _despawnTime(despawnTime)
|
||||
DelayedCastEvent(Creature* trigger, uint32 spellId, ObjectGuid originalCaster, uint32 despawnTime) : _trigger(trigger), _originalCaster(originalCaster), _spellId(spellId), _despawnTime(despawnTime)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ class DelayedCastEvent : public BasicEvent
|
||||
|
||||
private:
|
||||
Creature* _trigger;
|
||||
uint64 _originalCaster;
|
||||
ObjectGuid _originalCaster;
|
||||
uint32 _spellId;
|
||||
uint32 _despawnTime;
|
||||
};
|
||||
@@ -742,7 +742,7 @@ class npc_risen_archmage : public CreatureScript
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (summon->GetEntry() == NPC_COLUMN_OF_FROST)
|
||||
summon->m_Events.AddEvent(new DelayedCastEvent(summon, SPELL_COLUMN_OF_FROST_DAMAGE, 0, 8000), summon->m_Events.CalculateTime(2000));
|
||||
summon->m_Events.AddEvent(new DelayedCastEvent(summon, SPELL_COLUMN_OF_FROST_DAMAGE, ObjectGuid::Empty, 8000), summon->m_Events.CalculateTime(2000));
|
||||
else if (summon->GetEntry() == NPC_MANA_VOID)
|
||||
summon->DespawnOrUnsummon(36000);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiEventStarterGUID = 0;
|
||||
uiEventStarterGUID.Clear();
|
||||
nextWP = 0;
|
||||
punishTimer = 2000;
|
||||
nextMovementStarted = false;
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
}
|
||||
|
||||
Horsemen id;
|
||||
uint64 uiEventStarterGUID;
|
||||
ObjectGuid uiEventStarterGUID;
|
||||
uint8 nextWP;
|
||||
uint32 punishTimer;
|
||||
bool caster;
|
||||
|
||||
@@ -182,8 +182,8 @@ class boss_gothik : public CreatureScript
|
||||
bool phaseTwo;
|
||||
bool thirtyPercentReached;
|
||||
|
||||
std::vector<uint64> LiveTriggerGUID;
|
||||
std::vector<uint64> DeadTriggerGUID;
|
||||
GuidVector LiveTriggerGUID;
|
||||
GuidVector DeadTriggerGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
me->NearTeleportTo(x, y, z, o - (float(M_PI) / 2));
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetTarget(0);
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
DoCastAOE(SPELL_PLAGUE_CLOUD);
|
||||
events.ScheduleEvent(EVENT_PHASE, 45000);
|
||||
events.ScheduleEvent(EVENT_ERUPT, 8000);
|
||||
|
||||
@@ -285,13 +285,13 @@ public:
|
||||
uint8 nAbomination;
|
||||
uint8 nWeaver;
|
||||
|
||||
std::map<uint64, float> chained;
|
||||
std::map<ObjectGuid, float> chained;
|
||||
|
||||
SummonList spawns; // adds spawn by the trigger. kept in separated list (i.e. not in summons)
|
||||
|
||||
void ResetPlayerScale()
|
||||
{
|
||||
std::map<uint64, float>::const_iterator itr;
|
||||
std::map<ObjectGuid, float>::const_iterator itr;
|
||||
for (itr = chained.begin(); itr != chained.end(); ++itr)
|
||||
{
|
||||
if (Player* charmed = ObjectAccessor::GetPlayer(*me, itr->first))
|
||||
@@ -495,7 +495,7 @@ public:
|
||||
}
|
||||
case EVENT_CHAINED_SPELL:
|
||||
{
|
||||
std::map<uint64, float>::iterator itr;
|
||||
std::map<ObjectGuid, float>::iterator itr;
|
||||
for (itr = chained.begin(); itr != chained.end();)
|
||||
{
|
||||
if (Unit* player = ObjectAccessor::GetPlayer(*me, itr->first))
|
||||
@@ -503,7 +503,7 @@ public:
|
||||
if (!player->IsCharmed())
|
||||
{
|
||||
player->SetObjectScale(itr->second);
|
||||
std::map<uint64, float>::iterator next = itr;
|
||||
std::map<ObjectGuid, float>::iterator next = itr;
|
||||
++next;
|
||||
chained.erase(itr);
|
||||
itr = next;
|
||||
|
||||
@@ -80,7 +80,7 @@ enum Misc
|
||||
MAX_FROST_RESISTANCE = 100
|
||||
};
|
||||
|
||||
typedef std::map<uint64, uint64> IceBlockMap;
|
||||
typedef std::map<ObjectGuid, ObjectGuid> IceBlockMap;
|
||||
|
||||
class boss_sapphiron : public CreatureScript
|
||||
{
|
||||
@@ -313,7 +313,7 @@ class boss_sapphiron : public CreatureScript
|
||||
{
|
||||
std::vector<Unit*>::const_iterator itr = targets.begin();
|
||||
advance(itr, rand32() % targets.size());
|
||||
_iceblocks.insert(std::make_pair((*itr)->GetGUID(), 0));
|
||||
_iceblocks.insert(std::make_pair((*itr)->GetGUID(), ObjectGuid::Empty));
|
||||
DoCast(*itr, SPELL_ICEBOLT);
|
||||
--_iceboltCount;
|
||||
}
|
||||
|
||||
@@ -354,9 +354,10 @@ public:
|
||||
|
||||
_summonDeaths = 0;
|
||||
_preparingPulsesChecker = 0;
|
||||
_arcaneOverloadGUID = 0;
|
||||
_lastHitByArcaneBarrageGUID = 0;
|
||||
memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID));
|
||||
_arcaneOverloadGUID.Clear();
|
||||
_lastHitByArcaneBarrageGUID.Clear();
|
||||
for (ObjectGuid& guid : _surgeTargetGUID)
|
||||
guid.Clear();
|
||||
|
||||
_killSpamFilter = false;
|
||||
_canAttack = false;
|
||||
@@ -424,7 +425,7 @@ public:
|
||||
else if (type == DATA_LAST_TARGET_BARRAGE_GUID)
|
||||
return _lastHitByArcaneBarrageGUID;
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid guid, int32 type) override
|
||||
@@ -441,6 +442,7 @@ public:
|
||||
break;
|
||||
case DATA_LAST_TARGET_BARRAGE_GUID:
|
||||
_lastHitByArcaneBarrageGUID = guid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1030,9 +1032,9 @@ public:
|
||||
uint8 _phase; // Counter for phases used with a getter.
|
||||
uint8 _summonDeaths; // Keeps count of arcane trash.
|
||||
uint8 _preparingPulsesChecker; // In retail they use 2 preparing pulses with 7 sec CD, after they pass 2 seconds.
|
||||
uint64 _arcaneOverloadGUID; // Last Arcane Overload summoned to know to which should visual be cast to (the purple ball, not bubble).
|
||||
uint64 _lastHitByArcaneBarrageGUID; // Last hit player by Arcane Barrage, will be removed if targets > 1.
|
||||
uint64 _surgeTargetGUID[3]; // All these three are used to keep current tagets to which warning should be sent.
|
||||
ObjectGuid _arcaneOverloadGUID; // Last Arcane Overload summoned to know to which should visual be cast to (the purple ball, not bubble).
|
||||
ObjectGuid _lastHitByArcaneBarrageGUID; // Last hit player by Arcane Barrage, will be removed if targets > 1.
|
||||
ObjectGuid _surgeTargetGUID[3]; // All these three are used to keep current tagets to which warning should be sent.
|
||||
|
||||
bool _killSpamFilter; // Prevent text spamming on killed player by helping implement a CD.
|
||||
bool _canAttack; // Used to control attacking (Move Chase not being applied after Stop Attack, only few times should act like this).
|
||||
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
std::list<uint64> intenseColdList;
|
||||
uint64 auiContainmentSphereGUIDs[DATA_CONTAINMENT_SPHERES];
|
||||
GuidList intenseColdList;
|
||||
ObjectGuid auiContainmentSphereGUIDs[DATA_CONTAINMENT_SPHERES];
|
||||
uint32 uiCrystalfireBreathTimer;
|
||||
uint32 uiCrystalChainsCrystalizeTimer;
|
||||
uint32 uiTailSweepTimer;
|
||||
@@ -271,9 +271,9 @@ class achievement_intense_cold : public AchievementCriteriaScript
|
||||
if (!target)
|
||||
return false;
|
||||
|
||||
std::list<uint64> intenseColdList = ENSURE_AI(boss_keristrasza::boss_keristraszaAI, target->ToCreature()->AI())->intenseColdList;
|
||||
GuidList intenseColdList = ENSURE_AI(boss_keristrasza::boss_keristraszaAI, target->ToCreature()->AI())->intenseColdList;
|
||||
if (!intenseColdList.empty())
|
||||
for (std::list<uint64>::iterator itr = intenseColdList.begin(); itr != intenseColdList.end(); ++itr)
|
||||
for (GuidList::iterator itr = intenseColdList.begin(); itr != intenseColdList.end(); ++itr)
|
||||
if (player->GetGUID() == *itr)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 uiFireMagusGUID;
|
||||
uint64 uiFrostMagusGUID;
|
||||
uint64 uiArcaneMagusGUID;
|
||||
ObjectGuid uiFireMagusGUID;
|
||||
ObjectGuid uiFrostMagusGUID;
|
||||
ObjectGuid uiArcaneMagusGUID;
|
||||
|
||||
bool bFireMagusDead;
|
||||
bool bFrostMagusDead;
|
||||
@@ -105,9 +105,9 @@ public:
|
||||
uiGravityWellTimer = 15*IN_MILLISECONDS;
|
||||
uiCooldown = 0;
|
||||
|
||||
uiFireMagusGUID = 0;
|
||||
uiFrostMagusGUID = 0;
|
||||
uiArcaneMagusGUID = 0;
|
||||
uiFireMagusGUID.Clear();
|
||||
uiFrostMagusGUID.Clear();
|
||||
uiArcaneMagusGUID.Clear();
|
||||
|
||||
for (uint8 n = 0; n < 3; ++n)
|
||||
time[n] = 0;
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 SplitPersonality(uint32 entry)
|
||||
ObjectGuid SplitPersonality(uint32 entry)
|
||||
{
|
||||
if (Creature* Summoned = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1*IN_MILLISECONDS))
|
||||
{
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
Summoned->AI()->AttackStart(target);
|
||||
return Summoned->GetGUID();
|
||||
}
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
@@ -246,9 +246,9 @@ public:
|
||||
Phase = 2;
|
||||
if (Phase == 3)
|
||||
Phase = 4;
|
||||
uiFireMagusGUID = 0;
|
||||
uiFrostMagusGUID = 0;
|
||||
uiArcaneMagusGUID = 0;
|
||||
uiFireMagusGUID.Clear();
|
||||
uiFrostMagusGUID.Clear();
|
||||
uiArcaneMagusGUID.Clear();
|
||||
bIsWaitingToAppear = true;
|
||||
uiIsWaitingToAppearTimer = 4*IN_MILLISECONDS;
|
||||
Talk(SAY_MERGE);
|
||||
|
||||
@@ -175,7 +175,7 @@ class npc_azure_ring_captain : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
targetGUID = 0;
|
||||
targetGUID.Clear();
|
||||
|
||||
me->SetWalk(true);
|
||||
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
|
||||
@@ -232,7 +232,7 @@ class npc_azure_ring_captain : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 targetGUID;
|
||||
ObjectGuid targetGUID;
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
Position pos = me->GetPosition();
|
||||
|
||||
for (uint64 guid : lSparkList)
|
||||
for (ObjectGuid guid : lSparkList)
|
||||
{
|
||||
if (Creature* pSpark = ObjectAccessor::GetCreature(*me, guid))
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
std::list<uint64> m_lGolemGUIDList;
|
||||
GuidList m_lGolemGUIDList;
|
||||
|
||||
bool m_bHasTemper;
|
||||
bool m_bIsStriking;
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
if (m_lGolemGUIDList.empty())
|
||||
return;
|
||||
|
||||
for (uint64 guid : m_lGolemGUIDList)
|
||||
for (ObjectGuid guid : m_lGolemGUIDList)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, guid))
|
||||
if (temp->IsAlive())
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
if (m_lGolemGUIDList.empty())
|
||||
return;
|
||||
|
||||
for (uint64 guid : m_lGolemGUIDList)
|
||||
for (ObjectGuid guid : m_lGolemGUIDList)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, guid))
|
||||
{
|
||||
|
||||
@@ -266,7 +266,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
_Reset();
|
||||
//resets shutdown counter to 0. 2 or 4 depending on raid mode
|
||||
Shutdown = 0;
|
||||
_pursueTarget = 0;
|
||||
_pursueTarget.Clear();
|
||||
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
}
|
||||
@@ -550,7 +550,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 _pursueTarget;
|
||||
ObjectGuid _pursueTarget;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -978,7 +978,7 @@ public:
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
Start(false, true, 0, NULL, false, true);
|
||||
Start(false, true, ObjectGuid::Empty, NULL, false, true);
|
||||
else
|
||||
{
|
||||
if (infernoTimer <= diff)
|
||||
|
||||
@@ -226,7 +226,6 @@ class npc_iron_roots : public CreatureScript
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip
|
||||
me->setFaction(14);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
summonerGUID = 0;
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
@@ -251,7 +250,7 @@ class npc_iron_roots : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 summonerGUID;
|
||||
ObjectGuid summonerGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -269,7 +268,7 @@ class boss_freya : public CreatureScript
|
||||
{
|
||||
boss_freyaAI(Creature* creature) : BossAI(creature, BOSS_FREYA) { }
|
||||
|
||||
uint64 ElementalGUID[3][2];
|
||||
ObjectGuid ElementalGUID[3][2];
|
||||
|
||||
uint32 deforestation[6][2];
|
||||
uint32 elementalTimer[2];
|
||||
@@ -294,7 +293,7 @@ class boss_freya : public CreatureScript
|
||||
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
for (uint8 n = 0; n < 2; ++n)
|
||||
ElementalGUID[i][n] = 0;
|
||||
ElementalGUID[i][n].Clear();
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
for (uint8 n = 0; n < 2; ++n)
|
||||
deforestation[i][n] = 0;
|
||||
@@ -1544,17 +1543,17 @@ class spell_freya_attuned_to_nature_dose_reduction : public SpellScriptLoader
|
||||
case SPELL_ATTUNED_TO_NATURE_2_DOSE_REDUCTION:
|
||||
if (target->HasAura(GetEffectValue()))
|
||||
for (uint8 n = 0; n < 2; ++n)
|
||||
target->RemoveAuraFromStack(GetEffectValue(), 0, AURA_REMOVE_BY_DEFAULT);
|
||||
target->RemoveAuraFromStack(GetEffectValue());
|
||||
break;
|
||||
case SPELL_ATTUNED_TO_NATURE_10_DOSE_REDUCTION:
|
||||
if (target->HasAura(GetEffectValue()))
|
||||
for (uint8 n = 0; n < 10; ++n)
|
||||
target->RemoveAuraFromStack(GetEffectValue(), 0, AURA_REMOVE_BY_DEFAULT);
|
||||
target->RemoveAuraFromStack(GetEffectValue());
|
||||
break;
|
||||
case SPELL_ATTUNED_TO_NATURE_25_DOSE_REDUCTION:
|
||||
if (target->HasAura(GetEffectValue()))
|
||||
for (uint8 n = 0; n < 25; ++n)
|
||||
target->RemoveAuraFromStack(GetEffectValue(), 0, AURA_REMOVE_BY_DEFAULT);
|
||||
target->RemoveAuraFromStack(GetEffectValue());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -188,12 +188,12 @@ class npc_flash_freeze : public CreatureScript
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 targetGUID;
|
||||
ObjectGuid targetGUID;
|
||||
uint32 checkDespawnTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
targetGUID = 0;
|
||||
targetGUID.Clear();
|
||||
checkDespawnTimer = 1000;
|
||||
}
|
||||
|
||||
@@ -254,12 +254,11 @@ class npc_ice_block : public CreatureScript
|
||||
instance = me->GetInstanceScript();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED);
|
||||
targetGUID = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 targetGUID;
|
||||
ObjectGuid targetGUID;
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
{
|
||||
@@ -966,7 +965,7 @@ class spell_biting_cold : public SpellScriptLoader
|
||||
}
|
||||
|
||||
private:
|
||||
typedef std::list< std::pair<uint64, uint8> > TargetList;
|
||||
typedef std::list<std::pair<ObjectGuid, uint8>> TargetList;
|
||||
TargetList listOfTargets;
|
||||
};
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ class boss_ignis : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CONSTRUCT, 15000);
|
||||
events.ScheduleEvent(EVENT_END_POT, 40000);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 480000);
|
||||
_slagPotGUID = 0;
|
||||
_slagPotGUID.Clear();
|
||||
_shattered = false;
|
||||
_firstConstructKill = 0;
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEVEMENT_IGNIS_START_EVENT);
|
||||
@@ -245,7 +245,7 @@ class boss_ignis : public CreatureScript
|
||||
{
|
||||
slagPotTarget->ExitVehicle();
|
||||
slagPotTarget = NULL;
|
||||
_slagPotGUID = 0;
|
||||
_slagPotGUID.Clear();
|
||||
events.CancelEvent(EVENT_END_POT);
|
||||
}
|
||||
break;
|
||||
@@ -276,7 +276,7 @@ class boss_ignis : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _slagPotGUID;
|
||||
ObjectGuid _slagPotGUID;
|
||||
Vehicle* _vehicle;
|
||||
time_t _firstConstructKill;
|
||||
bool _shattered;
|
||||
@@ -370,7 +370,6 @@ class npc_scorch_ground : public CreatureScript
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
|
||||
{
|
||||
if (!_heat)
|
||||
{
|
||||
@@ -389,7 +388,7 @@ class npc_scorch_ground : public CreatureScript
|
||||
{
|
||||
_heat = false;
|
||||
DoCast(me, SPELL_GROUND);
|
||||
_constructGUID = 0;
|
||||
_constructGUID.Clear();
|
||||
_heatTimer = 0;
|
||||
}
|
||||
|
||||
@@ -412,7 +411,7 @@ class npc_scorch_ground : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _constructGUID;
|
||||
ObjectGuid _constructGUID;
|
||||
uint32 _heatTimer;
|
||||
bool _heat;
|
||||
};
|
||||
|
||||
@@ -115,7 +115,7 @@ class boss_kologarn : public CreatureScript
|
||||
|
||||
Vehicle* vehicle;
|
||||
bool left, right;
|
||||
uint64 eyebeamTarget;
|
||||
ObjectGuid eyebeamTarget;
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
@@ -139,7 +139,7 @@ class boss_kologarn : public CreatureScript
|
||||
{
|
||||
_Reset();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
eyebeamTarget = 0;
|
||||
eyebeamTarget.Clear();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -339,7 +339,7 @@ class spell_ulduar_rubble_summon : public SpellScriptLoader
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
uint64 originalCaster = caster->GetInstanceScript() ? caster->GetInstanceScript()->GetGuidData(BOSS_KOLOGARN) : 0;
|
||||
ObjectGuid originalCaster = caster->GetInstanceScript() ? caster->GetInstanceScript()->GetGuidData(BOSS_KOLOGARN) : ObjectGuid::Empty;
|
||||
uint32 spellId = GetEffectValue();
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
caster->CastSpell(caster, spellId, true, NULL, NULL, originalCaster);
|
||||
|
||||
@@ -592,14 +592,14 @@ class npc_expedition_commander : public CreatureScript
|
||||
|
||||
struct npc_expedition_commanderAI : public ScriptedAI
|
||||
{
|
||||
npc_expedition_commanderAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_expedition_commanderAI(Creature* creature) : ScriptedAI(creature), summons(creature)
|
||||
{
|
||||
instance = me->GetInstanceScript();
|
||||
Greet = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
std::list<uint64> summons;
|
||||
SummonList summons;
|
||||
|
||||
bool Greet;
|
||||
uint32 AttackStartTimer;
|
||||
@@ -612,7 +612,7 @@ class npc_expedition_commander : public CreatureScript
|
||||
AttackStartTimer = 0;
|
||||
Phase = 0;
|
||||
Greet = false;
|
||||
summons.clear();
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
@@ -627,7 +627,7 @@ class npc_expedition_commander : public CreatureScript
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summons.push_back(summoned->GetGUID());
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
@@ -638,7 +638,7 @@ class npc_expedition_commander : public CreatureScript
|
||||
Talk(SAY_GROUND_PHASE);
|
||||
break;
|
||||
case ACTION_COMMANDER_RESET:
|
||||
summons.clear();
|
||||
summons.DespawnAll();
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
break;
|
||||
}
|
||||
@@ -652,7 +652,7 @@ class npc_expedition_commander : public CreatureScript
|
||||
{
|
||||
case 1:
|
||||
instance->SetBossState(BOSS_RAZORSCALE, IN_PROGRESS);
|
||||
summons.clear();
|
||||
summons.DespawnAll();
|
||||
AttackStartTimer = 1000;
|
||||
Phase = 2;
|
||||
break;
|
||||
|
||||
@@ -666,23 +666,23 @@ class boss_sara : public CreatureScript
|
||||
{
|
||||
boss_saraAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
|
||||
uint64 GetLinkedPlayerGUID(uint64 guid) const
|
||||
ObjectGuid GetLinkedPlayerGUID(ObjectGuid guid) const
|
||||
{
|
||||
std::map<uint64, uint64>::const_iterator itr = _linkData.find(guid);
|
||||
std::map<ObjectGuid, ObjectGuid>::const_iterator itr = _linkData.find(guid);
|
||||
if (itr != _linkData.end())
|
||||
return itr->second;
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetLinkBetween(uint64 player1, uint64 player2)
|
||||
void SetLinkBetween(ObjectGuid player1, ObjectGuid player2)
|
||||
{
|
||||
_linkData[player1] = player2;
|
||||
_linkData[player2] = player1;
|
||||
}
|
||||
|
||||
// called once for each target on aura remove
|
||||
void RemoveLinkFrom(uint64 player1)
|
||||
void RemoveLinkFrom(ObjectGuid player1)
|
||||
{
|
||||
_linkData.erase(player1);
|
||||
}
|
||||
@@ -870,7 +870,7 @@ class boss_sara : public CreatureScript
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
std::map<uint64, uint64> _linkData;
|
||||
std::map<ObjectGuid, ObjectGuid> _linkData;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -2782,7 +2782,7 @@ class spell_yogg_saron_induce_madness : public SpellScriptLoader // 64059
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
target->CastSpell(target, SPELL_TELEPORT_BACK_TO_MAIN_ROOM);
|
||||
target->RemoveAurasDueToSpell(SPELL_SANITY, 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
target->RemoveAurasDueToSpell(SPELL_SANITY, ObjectGuid::Empty, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
target->RemoveAurasDueToSpell(uint32(GetEffectValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,13 +170,11 @@ public:
|
||||
boss_skadiAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
m_uiGraufGUID = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
SummonList Summons;
|
||||
uint64 m_uiGraufGUID;
|
||||
std::vector<uint64> triggersGUID;
|
||||
ObjectGuid m_uiGraufGUID;
|
||||
|
||||
uint32 m_uiCrushTimer;
|
||||
uint32 m_uiPoisonedSpearTimer;
|
||||
@@ -192,8 +190,6 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
triggersGUID.clear();
|
||||
|
||||
m_uiCrushTimer = 8000;
|
||||
m_uiPoisonedSpearTimer = 10000;
|
||||
m_uiWhirlwindTimer = 20000;
|
||||
@@ -266,7 +262,7 @@ public:
|
||||
void SummonedCreatureDespawn(Creature* summoned) override
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_GRAUF)
|
||||
m_uiGraufGUID = 0;
|
||||
m_uiGraufGUID.Clear();
|
||||
Summons.Despawn(summoned);
|
||||
}
|
||||
|
||||
|
||||
@@ -153,9 +153,9 @@ class boss_svala : public CreatureScript
|
||||
|
||||
me->SetDisableGravity(events.IsInPhase(NORMAL));
|
||||
|
||||
_arthasGUID = 0;
|
||||
_arthasGUID.Clear();
|
||||
|
||||
instance->SetGuidData(DATA_SACRIFICED_PLAYER, 0);
|
||||
instance->SetGuidData(DATA_SACRIFICED_PLAYER, ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -181,7 +181,7 @@ class boss_svala : public CreatureScript
|
||||
events.SetPhase(INTRO);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_UTGARDE_MIRROR)))
|
||||
mirror->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (Creature* arthas = me->SummonCreature(NPC_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
@@ -324,12 +324,12 @@ class boss_svala : public CreatureScript
|
||||
break;
|
||||
}
|
||||
case EVENT_INTRO_DESPAWN_ARTHAS:
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_UTGARDE_MIRROR)))
|
||||
mirror->SetGoState(GO_STATE_ACTIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (Creature* arthas = ObjectAccessor::GetCreature(*me, _arthasGUID))
|
||||
arthas->DespawnOrUnsummon();
|
||||
_arthasGUID = 0;
|
||||
_arthasGUID.Clear();
|
||||
events.SetPhase(NORMAL);
|
||||
_introCompleted = true;
|
||||
events.ScheduleEvent(EVENT_SINISTER_STRIKE, 7 * IN_MILLISECONDS, 0, NORMAL);
|
||||
@@ -378,7 +378,7 @@ class boss_svala : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _arthasGUID;
|
||||
ObjectGuid _arthasGUID;
|
||||
bool _sacrificed;
|
||||
bool _introCompleted;
|
||||
};
|
||||
|
||||
@@ -138,8 +138,8 @@ public:
|
||||
uint32 m_uiHealthAmountModifier;
|
||||
uint32 m_uiHealthAmountMultipler;
|
||||
|
||||
uint64 m_uiActivedCreatureGUID;
|
||||
uint64 m_uiOrbGUID;
|
||||
ObjectGuid m_uiActivedCreatureGUID;
|
||||
ObjectGuid m_uiOrbGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -167,8 +167,8 @@ public:
|
||||
m_uiHealthAmountModifier = 1;
|
||||
m_uiHealthAmountMultipler = DUNGEON_MODE(20, 25);
|
||||
|
||||
m_uiActivedCreatureGUID = 0;
|
||||
m_uiOrbGUID = 0;
|
||||
m_uiActivedCreatureGUID.Clear();
|
||||
m_uiOrbGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -361,13 +361,13 @@ public:
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void DespawnBoatGhosts(uint64& m_uiCreatureGUID)
|
||||
void DespawnBoatGhosts(ObjectGuid& m_uiCreatureGUID)
|
||||
{
|
||||
if (m_uiCreatureGUID)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, m_uiCreatureGUID))
|
||||
temp->DisappearAndDie();
|
||||
|
||||
m_uiCreatureGUID = 0;
|
||||
m_uiCreatureGUID.Clear();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class boss_emalon : public CreatureScript
|
||||
{
|
||||
if (!summons.empty())
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
Creature* minion = ObjectAccessor::GetCreature(*me, *itr);
|
||||
if (minion && minion->IsAlive() && !minion->GetVictim() && minion->AI())
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
|
||||
if (uiChainHealTimer <= diff)
|
||||
{
|
||||
if (uint64 TargetGUID = GetChainHealTargetGUID())
|
||||
if (ObjectGuid TargetGUID = GetChainHealTargetGUID())
|
||||
{
|
||||
if (Creature* target = ObjectAccessor::GetCreature(*me, TargetGUID))
|
||||
DoCast(target, SPELL_CHAIN_HEAL);
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
uint64 GetChainHealTargetGUID()
|
||||
ObjectGuid GetChainHealTargetGUID()
|
||||
{
|
||||
if (HealthBelowPct(85))
|
||||
return me->GetGUID();
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
if (pGuard2 && pGuard2->IsAlive() && !pGuard2->HealthAbovePct(75))
|
||||
return pGuard2->GetGUID();
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
{
|
||||
if (!bIsExploded)
|
||||
{
|
||||
if (!me->HasAura(SPELL_PROTECTIVE_BUBBLE, 0))
|
||||
if (!me->HasAura(SPELL_PROTECTIVE_BUBBLE))
|
||||
{
|
||||
Talk(SAY_SHATTER);
|
||||
DoCast(me, SPELL_WATER_BLAST);
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
bool bIsWaterElementsAlive = false;
|
||||
if (!m_waterElements.empty())
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = m_waterElements.begin(); itr != m_waterElements.end(); ++itr)
|
||||
for (SummonList::const_iterator itr = m_waterElements.begin(); itr != m_waterElements.end(); ++itr)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, *itr))
|
||||
if (temp->IsAlive())
|
||||
{
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
}
|
||||
|
||||
uint32 soulmodel;
|
||||
uint64 soulholder;
|
||||
ObjectGuid soulholder;
|
||||
uint8 soulclass;
|
||||
|
||||
uint32 Fear_timer;
|
||||
@@ -187,7 +187,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
soulmodel = 0;
|
||||
soulholder = 0;
|
||||
soulholder.Clear();
|
||||
soulclass = 0;
|
||||
|
||||
Fear_timer = 15000 + rand32() % 5000;
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ public:
|
||||
uint32 Carnivorousbite_Timer;
|
||||
uint32 FocusFire_Timer;
|
||||
|
||||
uint64 FocusedTargetGUID;
|
||||
ObjectGuid FocusedTargetGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
Attractmagic_Timer = 28000;
|
||||
Carnivorousbite_Timer = 10000;
|
||||
FocusFire_Timer = 17000;
|
||||
FocusedTargetGUID = 0;
|
||||
FocusedTargetGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 TargetGUID;
|
||||
ObjectGuid TargetGUID;
|
||||
|
||||
float TargetThreat;
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
{
|
||||
instance->SetBossState(DATA_GURTOGG_BLOODBOIL, NOT_STARTED);
|
||||
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
|
||||
TargetThreat = 0;
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void RevertThreatOnTarget(uint64 guid)
|
||||
void RevertThreatOnTarget(ObjectGuid guid)
|
||||
{
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*me, guid))
|
||||
{
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
{
|
||||
if (TargetGUID)
|
||||
RevertThreatOnTarget(TargetGUID);
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
Phase1 = true;
|
||||
BloodboilTimer = 10000;
|
||||
BloodboilCount = 0;
|
||||
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
{
|
||||
FlameBlastTimer = 15000;
|
||||
CheckTimer = 5000;
|
||||
GlaiveGUID = 0;
|
||||
GlaiveGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -426,7 +426,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGlaiveGUID(uint64 guid)
|
||||
void SetGlaiveGUID(ObjectGuid guid)
|
||||
{
|
||||
GlaiveGUID = guid;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
private:
|
||||
uint32 FlameBlastTimer;
|
||||
uint32 CheckTimer;
|
||||
uint64 GlaiveGUID;
|
||||
ObjectGuid GlaiveGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -478,7 +478,6 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
DoCast(me, SPELL_DUAL_WIELD, true);
|
||||
AkamaGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override;
|
||||
@@ -491,7 +490,7 @@ public:
|
||||
{
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
if (summon->GetGUID() == FlameGUID[i])
|
||||
FlameGUID[i] = 0;
|
||||
FlameGUID[i].Clear();
|
||||
|
||||
if (!FlameGUID[0] && !FlameGUID[1] && Phase != PHASE_ILLIDAN_NULL)
|
||||
{
|
||||
@@ -575,7 +574,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteFromThreatList(uint64 TargetGUID)
|
||||
void DeleteFromThreatList(ObjectGuid TargetGUID)
|
||||
{
|
||||
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
|
||||
@@ -852,7 +851,7 @@ public:
|
||||
if (Creature* glaive = ObjectAccessor::GetCreature(*me, GlaiveGUID[i]))
|
||||
glaive->DespawnOrUnsummon();
|
||||
|
||||
GlaiveGUID[i] = 0;
|
||||
GlaiveGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
Timer[EVENT_FLIGHT_SEQUENCE] = 2000;
|
||||
@@ -1105,7 +1104,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
uint64 AkamaGUID;
|
||||
ObjectGuid AkamaGUID;
|
||||
uint32 Timer[EVENT_ENRAGE + 1];
|
||||
PhaseIllidan Phase;
|
||||
private:
|
||||
@@ -1115,9 +1114,9 @@ public:
|
||||
uint32 TransformCount;
|
||||
uint32 FlightCount;
|
||||
uint32 HoverPoint;
|
||||
uint64 MaievGUID;
|
||||
uint64 FlameGUID[2];
|
||||
uint64 GlaiveGUID[2];
|
||||
ObjectGuid MaievGUID;
|
||||
ObjectGuid FlameGUID[2];
|
||||
ObjectGuid GlaiveGUID[2];
|
||||
SummonList Summons;
|
||||
};
|
||||
|
||||
@@ -1143,7 +1142,7 @@ public:
|
||||
{
|
||||
MaxTimer = 0;
|
||||
Phase = PHASE_NORMAL_MAIEV;
|
||||
IllidanGUID = 0;
|
||||
IllidanGUID.Clear();
|
||||
Timer[EVENT_MAIEV_STEALTH] = 0;
|
||||
Timer[EVENT_MAIEV_TAUNT] = urand(22, 43) * 1000;
|
||||
Timer[EVENT_MAIEV_SHADOW_STRIKE] = 30000;
|
||||
@@ -1156,7 +1155,7 @@ public:
|
||||
|
||||
void EnterEvadeMode() override { }
|
||||
|
||||
void GetIllidanGUID(uint64 guid)
|
||||
void GetIllidanGUID(ObjectGuid guid)
|
||||
{
|
||||
IllidanGUID = guid;
|
||||
}
|
||||
@@ -1336,7 +1335,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 IllidanGUID;
|
||||
ObjectGuid IllidanGUID;
|
||||
PhaseIllidan Phase;
|
||||
EventMaiev Event;
|
||||
uint32 Timer[5];
|
||||
@@ -1388,9 +1387,9 @@ public:
|
||||
instance->HandleGameObject(DoorGUID[i], true);
|
||||
}
|
||||
|
||||
ChannelGUID = 0;
|
||||
SpiritGUID[0] = 0;
|
||||
SpiritGUID[1] = 0;
|
||||
ChannelGUID.Clear();
|
||||
SpiritGUID[0].Clear();
|
||||
SpiritGUID[1].Clear();
|
||||
|
||||
Phase = PHASE_AKAMA_NULL;
|
||||
Timer = 0;
|
||||
@@ -1761,11 +1760,11 @@ public:
|
||||
PhaseAkama Phase;
|
||||
bool Event;
|
||||
uint32 Timer;
|
||||
uint64 IllidanGUID;
|
||||
uint64 ChannelGUID;
|
||||
uint64 SpiritGUID[2];
|
||||
uint64 GateGUID;
|
||||
uint64 DoorGUID[2];
|
||||
ObjectGuid IllidanGUID;
|
||||
ObjectGuid ChannelGUID;
|
||||
ObjectGuid SpiritGUID[2];
|
||||
ObjectGuid GateGUID;
|
||||
ObjectGuid DoorGUID[2];
|
||||
uint32 ChannelCount;
|
||||
uint32 WalkCount;
|
||||
uint32 TalkCount;
|
||||
@@ -1790,11 +1789,11 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset()
|
||||
akama->AI()->EnterEvadeMode();
|
||||
}
|
||||
|
||||
MaievGUID = 0;
|
||||
MaievGUID.Clear();
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
{
|
||||
FlameGUID[i] = 0;
|
||||
GlaiveGUID[i] = 0;
|
||||
FlameGUID[i].Clear();
|
||||
GlaiveGUID[i].Clear();
|
||||
}
|
||||
|
||||
Phase = PHASE_ILLIDAN_NULL;
|
||||
@@ -1959,7 +1958,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
IllidanGUID = 0;
|
||||
IllidanGUID.Clear();
|
||||
|
||||
Active = false;
|
||||
SummonedBeams = false;
|
||||
@@ -2017,7 +2016,7 @@ public:
|
||||
public:
|
||||
bool Active;
|
||||
private:
|
||||
uint64 IllidanGUID;
|
||||
ObjectGuid IllidanGUID;
|
||||
uint32 DespawnTimer;
|
||||
bool SummonedBeams;
|
||||
};
|
||||
@@ -2062,7 +2061,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
DoCast(me, SPELL_SHADOW_DEMON_PASSIVE, true);
|
||||
}
|
||||
|
||||
@@ -2093,7 +2092,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 TargetGUID;
|
||||
ObjectGuid TargetGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -2198,7 +2197,7 @@ public:
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
uint64 IllidanGUID;
|
||||
ObjectGuid IllidanGUID;
|
||||
uint32 CheckTimer;
|
||||
};
|
||||
|
||||
|
||||
@@ -112,8 +112,8 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
for (uint8 i = 0; i<3; ++i)
|
||||
TargetGUID[i] = 0;
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
TargetGUID[i].Clear();
|
||||
|
||||
BeamCount = 0;
|
||||
CurrentBeam = SINISTER_BEAM; // 0 - Sinister, 1 - Vile, 2 - Wicked, 3 - Sinful
|
||||
@@ -236,7 +236,7 @@ public:
|
||||
{
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*me, TargetGUID[i]))
|
||||
unit->CastSpell(unit, SPELL_ATTRACTION, true);
|
||||
TargetGUID[i] = 0;
|
||||
TargetGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
++ExplosionCount;
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 TargetGUID[3];
|
||||
ObjectGuid TargetGUID[3];
|
||||
uint32 BeamCount;
|
||||
uint32 CurrentBeam;
|
||||
uint32 ExplosionCount;
|
||||
|
||||
@@ -113,9 +113,12 @@ public:
|
||||
{
|
||||
npc_enslaved_soulAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint64 ReliquaryGUID;
|
||||
ObjectGuid ReliquaryGUID;
|
||||
|
||||
void Reset() override { ReliquaryGUID = 0; }
|
||||
void Reset() override
|
||||
{
|
||||
ReliquaryGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
@@ -142,12 +145,11 @@ public:
|
||||
boss_reliquary_of_soulsAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
EssenceGUID = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 EssenceGUID;
|
||||
ObjectGuid EssenceGUID;
|
||||
|
||||
uint32 Phase;
|
||||
uint32 Counter;
|
||||
@@ -165,7 +167,7 @@ public:
|
||||
if (Creature* essence = ObjectAccessor::GetCreature(*me, EssenceGUID))
|
||||
essence->DespawnOrUnsummon();
|
||||
|
||||
EssenceGUID = 0;
|
||||
EssenceGUID.Clear();
|
||||
}
|
||||
|
||||
Phase = 0;
|
||||
@@ -334,17 +336,15 @@ public:
|
||||
if (Essence)
|
||||
{
|
||||
if (Phase == 1)
|
||||
{
|
||||
Essence->AI()->Talk(SUFF_SAY_AFTER);
|
||||
}
|
||||
else
|
||||
{
|
||||
Essence->AI()->Talk(DESI_SAY_AFTER);
|
||||
}
|
||||
|
||||
Essence->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||
EssenceGUID = 0;
|
||||
EssenceGUID.Clear();
|
||||
SoulCount = 0;
|
||||
SoulDeathCount = 0;
|
||||
Timer = 3000;
|
||||
@@ -624,7 +624,7 @@ public:
|
||||
{
|
||||
boss_essence_of_angerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint64 AggroTargetGUID;
|
||||
ObjectGuid AggroTargetGUID;
|
||||
|
||||
uint32 CheckTankTimer;
|
||||
uint32 SoulScreamTimer;
|
||||
@@ -636,7 +636,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
AggroTargetGUID = 0;
|
||||
AggroTargetGUID.Clear();
|
||||
|
||||
CheckTankTimer = 5000;
|
||||
SoulScreamTimer = 10000;
|
||||
|
||||
@@ -175,11 +175,11 @@ public:
|
||||
{
|
||||
if (!HasKilledAkamaAndReseting)
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
|
||||
if (Creature* Channeler = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Channeler->DespawnOrUnsummon();
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Spawner->AI()->SetData(SETDATA_DATA, SETDATA_DESPAWN_ALL_SPAWNS);
|
||||
|
||||
@@ -307,17 +307,13 @@ public:
|
||||
{
|
||||
case EVENT_SET_CHANNELERS_SPAWNERS:
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
|
||||
{
|
||||
for (GuidList::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
|
||||
if (Creature* Channeler = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
{
|
||||
for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Spawner->AI()->SetData(SETDATA_DATA, SETDATA_START_SPAWNING);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVENT_START_ATTACK_AKAMA:
|
||||
@@ -350,11 +346,11 @@ public:
|
||||
if (Creature* Akama = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE)))
|
||||
Akama->DespawnOrUnsummon();
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = Channelers.begin(); itr != Channelers.end(); ++itr)
|
||||
if (Creature* Channeler = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Channeler->DespawnOrUnsummon();
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Spawner->AI()->SetData(SETDATA_DATA, SETDATA_DESPAWN_ALL_SPAWNS);
|
||||
|
||||
@@ -379,7 +375,7 @@ public:
|
||||
events.CancelEvent(EVENT_START_ATTACK_AKAMA);
|
||||
events.ScheduleEvent(EVENT_ADD_THREAT, 100);
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = Spawners.begin(); itr != Spawners.end(); ++itr)
|
||||
if (Creature* Spawner = ObjectAccessor::GetCreature(*me, *itr))
|
||||
Spawner->AI()->SetData(SETDATA_DATA, SETDATA_STOP_SPAWNING);
|
||||
}
|
||||
@@ -395,8 +391,8 @@ public:
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
std::list<uint64> Channelers;
|
||||
std::list<uint64> Spawners;
|
||||
GuidList Channelers;
|
||||
GuidList Spawners;
|
||||
bool akamaReached;
|
||||
bool combatStarted;
|
||||
bool HasKilledAkamaAndReseting;
|
||||
@@ -763,7 +759,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
summonerGuid = 0;
|
||||
summonerGuid.Clear();
|
||||
startedBanishing = false;
|
||||
switchToCombat = false;
|
||||
}
|
||||
@@ -841,7 +837,7 @@ public:
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
uint64 summonerGuid;
|
||||
ObjectGuid summonerGuid;
|
||||
bool startedBanishing;
|
||||
bool switchToCombat;
|
||||
};
|
||||
@@ -870,7 +866,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
summonerGuid = 0;
|
||||
summonerGuid.Clear();
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE)))
|
||||
AttackStart(target);
|
||||
@@ -933,7 +929,7 @@ public:
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
uint64 summonerGuid;
|
||||
ObjectGuid summonerGuid;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -960,7 +956,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
summonerGuid = 0;
|
||||
summonerGuid.Clear();
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE)))
|
||||
AttackStart(target);
|
||||
@@ -1013,7 +1009,7 @@ public:
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
uint64 summonerGuid;
|
||||
ObjectGuid summonerGuid;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -1040,7 +1036,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
summonerGuid = 0;
|
||||
summonerGuid.Clear();
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE)))
|
||||
AttackStart(target);
|
||||
@@ -1093,7 +1089,7 @@ public:
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
uint64 summonerGuid;
|
||||
ObjectGuid summonerGuid;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -1122,7 +1118,7 @@ public:
|
||||
{
|
||||
spiritMend = false;
|
||||
chainHeal = false;
|
||||
summonerGuid = 0;
|
||||
summonerGuid.Clear();
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AKAMA_SHADE)))
|
||||
AttackStart(target);
|
||||
@@ -1188,7 +1184,7 @@ public:
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
uint64 summonerGuid;
|
||||
ObjectGuid summonerGuid;
|
||||
bool spiritMend;
|
||||
bool chainHeal;
|
||||
};
|
||||
|
||||
@@ -67,13 +67,13 @@ public:
|
||||
|
||||
uint32 CheckTeronTimer;
|
||||
uint32 ShadowBoltTimer;
|
||||
uint64 TeronGUID;
|
||||
ObjectGuid TeronGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
CheckTeronTimer = 5000;
|
||||
ShadowBoltTimer = 12000;
|
||||
TeronGUID = 0;
|
||||
TeronGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
void SetTeronGUID(uint64 guid)
|
||||
void SetTeronGUID(ObjectGuid guid)
|
||||
{
|
||||
TeronGUID = guid;
|
||||
}
|
||||
@@ -134,16 +134,16 @@ public:
|
||||
{
|
||||
npc_shadowy_constructAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint64 GhostGUID;
|
||||
uint64 TeronGUID;
|
||||
ObjectGuid GhostGUID;
|
||||
ObjectGuid TeronGUID;
|
||||
|
||||
uint32 CheckPlayerTimer;
|
||||
uint32 CheckTeronTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
GhostGUID = 0;
|
||||
TeronGUID = 0;
|
||||
GhostGUID.Clear();
|
||||
TeronGUID.Clear();
|
||||
|
||||
CheckPlayerTimer = 2000;
|
||||
CheckTeronTimer = 5000;
|
||||
@@ -238,8 +238,8 @@ public:
|
||||
uint32 RandomYellTimer;
|
||||
uint32 AggroTimer;
|
||||
|
||||
uint64 AggroTargetGUID;
|
||||
uint64 GhostGUID; // Player that gets killed by Shadow of Death and gets turned into a ghost
|
||||
ObjectGuid AggroTargetGUID;
|
||||
ObjectGuid GhostGUID; // Player that gets killed by Shadow of Death and gets turned into a ghost
|
||||
|
||||
bool Intro;
|
||||
bool Done;
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
AggroTimer = 20000;
|
||||
AggroTargetGUID = 0;
|
||||
AggroTargetGUID.Clear();
|
||||
Intro = false;
|
||||
Done = false;
|
||||
}
|
||||
|
||||
@@ -67,13 +67,12 @@ public:
|
||||
{
|
||||
boss_najentusAI(Creature* creature) : BossAI(creature, DATA_HIGH_WARLORD_NAJENTUS)
|
||||
{
|
||||
SpineTargetGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
SpineTargetGUID = 0;
|
||||
SpineTargetGUID.Clear();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -115,7 +114,7 @@ public:
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, SpineTargetGUID);
|
||||
if (target && target->HasAura(SPELL_IMPALING_SPINE))
|
||||
target->RemoveAurasDueToSpell(SPELL_IMPALING_SPINE);
|
||||
SpineTargetGUID=0;
|
||||
SpineTargetGUID.Clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -181,7 +180,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 SpineTargetGUID;
|
||||
ObjectGuid SpineTargetGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
+5
-9
@@ -112,9 +112,6 @@ public:
|
||||
boss_fathomlord_karathressAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
Advisors[0] = 0;
|
||||
Advisors[1] = 0;
|
||||
Advisors[2] = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -125,7 +122,7 @@ public:
|
||||
|
||||
bool BlessingOfTides;
|
||||
|
||||
uint64 Advisors[MAX_ADVISORS];
|
||||
ObjectGuid Advisors[MAX_ADVISORS];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -135,7 +132,7 @@ public:
|
||||
|
||||
BlessingOfTides = false;
|
||||
|
||||
uint64 RAdvisors[MAX_ADVISORS];
|
||||
ObjectGuid RAdvisors[MAX_ADVISORS];
|
||||
RAdvisors[0] = instance->GetGuidData(DATA_SHARKKIS);
|
||||
RAdvisors[1] = instance->GetGuidData(DATA_TIDALVESS);
|
||||
RAdvisors[2] = instance->GetGuidData(DATA_CARIBDIS);
|
||||
@@ -308,7 +305,6 @@ public:
|
||||
boss_fathomguard_sharkkisAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
SummonedPet = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -320,7 +316,7 @@ public:
|
||||
|
||||
bool pet;
|
||||
|
||||
uint64 SummonedPet;
|
||||
ObjectGuid SummonedPet;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -335,7 +331,7 @@ public:
|
||||
if (Pet && Pet->IsAlive())
|
||||
Pet->DealDamage(Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
|
||||
SummonedPet = 0;
|
||||
SummonedPet.Clear();
|
||||
|
||||
instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
|
||||
}
|
||||
@@ -515,7 +511,7 @@ public:
|
||||
if (Spitfire_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SPITFIRE_TOTEM);
|
||||
if (Unit* SpitfireTotem = ObjectAccessor::GetUnit(*me, CREATURE_SPITFIRE_TOTEM))
|
||||
if (Unit* SpitfireTotem = me->FindNearestCreature(CREATURE_SPITFIRE_TOTEM, 100.0f))
|
||||
SpitfireTotem->ToCreature()->AI()->AttackStart(me->GetVictim());
|
||||
|
||||
Spitfire_Timer = 60000;
|
||||
|
||||
+5
-7
@@ -94,13 +94,11 @@ public:
|
||||
boss_hydross_the_unstableAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
beams[0] = 0;
|
||||
beams[1] = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 beams[2];
|
||||
ObjectGuid beams[2];
|
||||
uint32 PosCheck_Timer;
|
||||
uint32 MarkOfHydross_Timer;
|
||||
uint32 MarkOfCorruption_Timer;
|
||||
@@ -116,8 +114,8 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
DeSummonBeams();
|
||||
beams[0] = 0;
|
||||
beams[1] = 0;
|
||||
beams[0].Clear();
|
||||
beams[1].Clear();
|
||||
PosCheck_Timer = 2500;
|
||||
MarkOfHydross_Timer = 15000;
|
||||
MarkOfCorruption_Timer = 15000;
|
||||
@@ -147,7 +145,7 @@ public:
|
||||
beamer->CastSpell(me, SPELL_BLUE_BEAM, true);
|
||||
beamer->SetDisplayId(11686); //invisible
|
||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
beams[0]=beamer->GetGUID();
|
||||
beams[0] = beamer->GetGUID();
|
||||
}
|
||||
beamer = me->SummonCreature(ENTRY_BEAM_DUMMY, -219.918f, -371.308f, 22.0042f, 2.73072f, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
if (beamer)
|
||||
@@ -155,7 +153,7 @@ public:
|
||||
beamer->CastSpell(me, SPELL_BLUE_BEAM, true);
|
||||
beamer->SetDisplayId(11686); //invisible
|
||||
beamer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
beams[1]=beamer->GetGUID();
|
||||
beams[1] = beamer->GetGUID();
|
||||
}
|
||||
}
|
||||
void DeSummonBeams()
|
||||
|
||||
@@ -151,13 +151,11 @@ public:
|
||||
Intro = false;
|
||||
JustCreated = true;
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // set it only once on Creature create (no need do intro if wiped)
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
ShieldGeneratorChannel[i] = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 ShieldGeneratorChannel[4];
|
||||
ObjectGuid ShieldGeneratorChannel[4];
|
||||
|
||||
uint32 AggroTimer;
|
||||
uint32 ShockBlastTimer;
|
||||
@@ -210,7 +208,7 @@ public:
|
||||
if (Unit* remo = ObjectAccessor::GetUnit(*me, ShieldGeneratorChannel[i]))
|
||||
{
|
||||
remo->setDeathState(JUST_DIED);
|
||||
ShieldGeneratorChannel[i] = 0;
|
||||
ShieldGeneratorChannel[i].Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -565,7 +563,7 @@ public:
|
||||
uint32 Phase;
|
||||
float X, Y, Z;
|
||||
|
||||
uint64 VashjGUID;
|
||||
ObjectGuid VashjGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
|
||||
+17
-24
@@ -83,13 +83,12 @@ public:
|
||||
{
|
||||
npc_inner_demonAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
victimGUID = 0;
|
||||
}
|
||||
|
||||
uint32 ShadowBolt_Timer;
|
||||
|
||||
uint32 Link_Timer;
|
||||
uint64 victimGUID;
|
||||
ObjectGuid victimGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -190,10 +189,6 @@ public:
|
||||
{
|
||||
creature->GetPosition(x, y, z);
|
||||
instance = creature->GetInstanceScript();
|
||||
Demon = 0;
|
||||
|
||||
for (uint8 i = 0; i < 3; ++i)//clear guids
|
||||
SpellBinderGUID[i] = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -213,10 +208,10 @@ public:
|
||||
bool EnrageUsed;
|
||||
float x, y, z;
|
||||
|
||||
uint64 InnderDemon[5];
|
||||
ObjectGuid InnderDemon[5];
|
||||
uint32 InnerDemon_Count;
|
||||
uint64 Demon;
|
||||
uint64 SpellBinderGUID[3];
|
||||
ObjectGuid Demon;
|
||||
ObjectGuid SpellBinderGUID[3];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -349,13 +344,12 @@ public:
|
||||
{
|
||||
if (InnderDemon[i])
|
||||
{
|
||||
//delete creature
|
||||
Creature* creature = ObjectAccessor::GetCreature((*me), InnderDemon[i]);
|
||||
if (creature && creature->IsAlive())
|
||||
{
|
||||
creature->DespawnOrUnsummon();
|
||||
}
|
||||
InnderDemon[i] = 0;
|
||||
//delete creature
|
||||
Creature* creature = ObjectAccessor::GetCreature((*me), InnderDemon[i]);
|
||||
if (creature && creature->IsAlive())
|
||||
creature->DespawnOrUnsummon();
|
||||
|
||||
InnderDemon[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,9 +358,9 @@ public:
|
||||
|
||||
void CastConsumingMadness() //remove this once SPELL_INSIDIOUS_WHISPER is supported by core
|
||||
{
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
if (InnderDemon[i] > 0)
|
||||
if (InnderDemon[i])
|
||||
{
|
||||
Creature* unit = ObjectAccessor::GetCreature((*me), InnderDemon[i]);
|
||||
if (unit && unit->IsAlive())
|
||||
@@ -481,7 +475,7 @@ public:
|
||||
if (SwitchToDemon_Timer <= diff)
|
||||
{
|
||||
//switch to demon form
|
||||
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND, 0);
|
||||
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND);
|
||||
me->SetDisplayId(MODEL_DEMON);
|
||||
Talk(SAY_SWITCH_TO_DEMON);
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||
@@ -576,8 +570,8 @@ public:
|
||||
Creature* Copy = NULL;
|
||||
Copy = DoSpawnCreature(DEMON_FORM, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 6000);
|
||||
if (Copy)
|
||||
{
|
||||
Demon = Copy->GetGUID();
|
||||
{
|
||||
Demon = Copy->GetGUID();
|
||||
if (me->GetVictim())
|
||||
Copy->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
@@ -682,13 +676,12 @@ public:
|
||||
npc_greyheart_spellbinderAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
leotherasGUID = 0;
|
||||
AddedBanish = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 leotherasGUID;
|
||||
ObjectGuid leotherasGUID;
|
||||
|
||||
uint32 Mindblast_Timer;
|
||||
uint32 Earthshock_Timer;
|
||||
@@ -700,7 +693,7 @@ public:
|
||||
Mindblast_Timer = urand(3000, 8000);
|
||||
Earthshock_Timer = urand(5000, 10000);
|
||||
|
||||
instance->SetGuidData(DATA_LEOTHERAS_EVENT_STARTER, 0);
|
||||
instance->SetGuidData(DATA_LEOTHERAS_EVENT_STARTER, ObjectGuid::Empty);
|
||||
Creature* leotheras = ObjectAccessor::GetCreature(*me, leotherasGUID);
|
||||
if (leotheras && leotheras->IsAlive())
|
||||
ENSURE_AI(boss_leotheras_the_blind::boss_leotheras_the_blindAI, leotheras->AI())->CheckChannelers(/*false*/);
|
||||
|
||||
+10
-10
@@ -215,8 +215,8 @@ public:
|
||||
{
|
||||
//Teleport 4 players under the waterfalls
|
||||
Unit* target;
|
||||
std::set<uint64> list;
|
||||
std::set<uint64>::const_iterator itr;
|
||||
GuidSet targets;
|
||||
GuidSet::const_iterator itr;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
counter = 0;
|
||||
@@ -226,13 +226,13 @@ public:
|
||||
if (counter < Playercount)
|
||||
break;
|
||||
if (target)
|
||||
itr = list.find(target->GetGUID());
|
||||
itr = targets.find(target->GetGUID());
|
||||
++counter;
|
||||
} while (itr != list.end());
|
||||
} while (itr != targets.end());
|
||||
|
||||
if (target)
|
||||
{
|
||||
list.insert(target->GetGUID());
|
||||
targets.insert(target->GetGUID());
|
||||
ApplyWateryGrave(target, i);
|
||||
}
|
||||
}
|
||||
@@ -253,8 +253,8 @@ public:
|
||||
if (WateryGlobules_Timer <= diff)
|
||||
{
|
||||
Unit* pGlobuleTarget;
|
||||
std::set<uint64> globulelist;
|
||||
std::set<uint64>::const_iterator itr;
|
||||
GuidSet globules;
|
||||
GuidSet::const_iterator itr;
|
||||
for (uint8 g = 0; g < 4; g++) //one unit can't cast more than one spell per update, so some players have to cast for us XD
|
||||
{
|
||||
counter = 0;
|
||||
@@ -262,14 +262,14 @@ public:
|
||||
{
|
||||
pGlobuleTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true);
|
||||
if (pGlobuleTarget)
|
||||
itr = globulelist.find(pGlobuleTarget->GetGUID());
|
||||
itr = globules.find(pGlobuleTarget->GetGUID());
|
||||
if (counter > Playercount)
|
||||
break;
|
||||
++counter;
|
||||
} while (itr != globulelist.end());
|
||||
} while (itr != globules.end());
|
||||
if (pGlobuleTarget)
|
||||
{
|
||||
globulelist.insert(pGlobuleTarget->GetGUID());
|
||||
globules.insert(pGlobuleTarget->GetGUID());
|
||||
pGlobuleTarget->CastSpell(pGlobuleTarget, globulespell[g], true);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-12
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
struct boss_the_black_stalkerAI : public ScriptedAI
|
||||
{
|
||||
boss_the_black_stalkerAI(Creature* creature) : ScriptedAI(creature)
|
||||
boss_the_black_stalkerAI(Creature* creature) : ScriptedAI(creature), Striders(creature)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -62,11 +62,11 @@ public:
|
||||
uint32 Levitate_Timer;
|
||||
uint32 ChainLightning_Timer;
|
||||
uint32 StaticCharge_Timer;
|
||||
uint64 LevitatedTarget;
|
||||
ObjectGuid LevitatedTarget;
|
||||
uint32 LevitatedTarget_Timer;
|
||||
bool InAir;
|
||||
uint32 check_Timer;
|
||||
std::list<uint64> Striders;
|
||||
SummonList Striders;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -75,9 +75,9 @@ public:
|
||||
StaticCharge_Timer = 10000;
|
||||
SporeStriders_Timer = 10000 + rand32() % 5000;
|
||||
check_Timer = 5000;
|
||||
LevitatedTarget = 0;
|
||||
LevitatedTarget.Clear();
|
||||
LevitatedTarget_Timer = 0;
|
||||
Striders.clear();
|
||||
Striders.DespawnAll();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
{
|
||||
if (summon && summon->GetEntry() == ENTRY_SPORE_STRIDER)
|
||||
{
|
||||
Striders.push_back(summon->GetGUID());
|
||||
Striders.Summon(summon);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
summon->AI()->AttackStart(target);
|
||||
else
|
||||
@@ -97,9 +97,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
for (std::list<uint64>::const_iterator i = Striders.begin(); i != Striders.end(); ++i)
|
||||
if (Creature* strider = ObjectAccessor::GetCreature(*me, *i))
|
||||
strider->DisappearAndDie();
|
||||
Striders.DespawnAll();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -136,13 +134,13 @@ public:
|
||||
{
|
||||
if (!target->HasAura(SPELL_LEVITATE))
|
||||
{
|
||||
LevitatedTarget = 0;
|
||||
LevitatedTarget.Clear();
|
||||
return;
|
||||
}
|
||||
if (InAir)
|
||||
{
|
||||
target->AddAura(SPELL_SUSPENSION, target);
|
||||
LevitatedTarget = 0;
|
||||
LevitatedTarget.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -152,7 +150,7 @@ public:
|
||||
}
|
||||
}
|
||||
else
|
||||
LevitatedTarget = 0;
|
||||
LevitatedTarget.Clear();
|
||||
} else LevitatedTarget_Timer -= diff;
|
||||
}
|
||||
if (Levitate_Timer <= diff)
|
||||
|
||||
+13
-12
@@ -65,8 +65,6 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
{
|
||||
boss_kelidan_the_breakerAI(Creature* creature) : BossAI(creature, DATA_KELIDAN_THE_BREAKER)
|
||||
{
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
Channelers[i] = 0;
|
||||
}
|
||||
|
||||
uint32 ShadowVolley_Timer;
|
||||
@@ -76,7 +74,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
uint32 check_Timer;
|
||||
bool Firenova;
|
||||
bool addYell;
|
||||
uint64 Channelers[5];
|
||||
ObjectGuid Channelers[5];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -116,7 +114,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
addYell = true;
|
||||
Talk(SAY_ADD_AGGRO);
|
||||
}
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
for (uint8 i = 0; i<5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (who && channeler && !channeler->IsInCombat())
|
||||
@@ -126,7 +124,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
|
||||
void ChannelerDied(Unit* killer)
|
||||
{
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (channeler && channeler->IsAlive())
|
||||
@@ -138,25 +136,25 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
AttackStart(killer);
|
||||
}
|
||||
|
||||
uint64 GetChanneled(Creature* channeler1)
|
||||
ObjectGuid GetChanneled(Creature* channeler1)
|
||||
{
|
||||
SummonChannelers();
|
||||
if (!channeler1)
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
|
||||
uint8 i;
|
||||
for (i=0; i<5; ++i)
|
||||
for (i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (channeler && channeler->GetGUID() == channeler1->GetGUID())
|
||||
break;
|
||||
}
|
||||
return Channelers[(i+2)%5];
|
||||
return Channelers[(i + 2) % 5];
|
||||
}
|
||||
|
||||
void SummonChannelers()
|
||||
{
|
||||
for (uint8 i=0; i<5; ++i)
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature* channeler = ObjectAccessor::GetCreature(*me, Channelers[i]);
|
||||
if (!channeler || channeler->isDead())
|
||||
@@ -164,7 +162,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
if (channeler)
|
||||
Channelers[i] = channeler->GetGUID();
|
||||
else
|
||||
Channelers[i] = 0;
|
||||
Channelers[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,16 +308,19 @@ class npc_shadowmoon_channeler : public CreatureScript
|
||||
if (check_Timer <= diff)
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCast(false))
|
||||
{
|
||||
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
{
|
||||
uint64 channeler = ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(me);
|
||||
ObjectGuid channeler = ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->GetChanneled(me);
|
||||
if (Unit* channeled = ObjectAccessor::GetUnit(*me, channeler))
|
||||
DoCast(channeled, SPELL_CHANNELING);
|
||||
}
|
||||
}
|
||||
check_Timer = 5000;
|
||||
}
|
||||
else
|
||||
check_Timer -= diff;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -74,7 +74,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
Shadowbolt_Timer = 2000;
|
||||
Summon_Timer = 10000;
|
||||
SummonedCount = 0;
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
CanPullBack = false;
|
||||
|
||||
_Reset();
|
||||
@@ -141,7 +141,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
DoCast(temp, SPELL_SHADOW_WHIP);
|
||||
}
|
||||
}
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
ShadowWhip_Timer = 2000;
|
||||
CanPullBack = false;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ class boss_omor_the_unscarred : public CreatureScript
|
||||
uint32 Shadowbolt_Timer;
|
||||
uint32 Summon_Timer;
|
||||
uint32 SummonedCount;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
bool CanPullBack;
|
||||
};
|
||||
|
||||
|
||||
+5
-8
@@ -70,7 +70,6 @@ class boss_nazan : public CreatureScript
|
||||
{
|
||||
boss_nazanAI(Creature* creature) : BossAI(creature, DATA_NAZAN)
|
||||
{
|
||||
VazrudenGUID = 0;
|
||||
flight = true;
|
||||
}
|
||||
|
||||
@@ -183,7 +182,7 @@ class boss_nazan : public CreatureScript
|
||||
uint32 Fly_Timer;
|
||||
uint32 Turn_Timer;
|
||||
bool flight;
|
||||
uint64 VazrudenGUID;
|
||||
ObjectGuid VazrudenGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -282,8 +281,6 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
summoned = false;
|
||||
sentryDown = false;
|
||||
lootSpawned = false;
|
||||
NazanGUID = 0;
|
||||
VazrudenGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -304,7 +301,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
if (Nazan)
|
||||
{
|
||||
Nazan->DisappearAndDie();
|
||||
NazanGUID = 0;
|
||||
NazanGUID.Clear();
|
||||
}
|
||||
|
||||
Creature* Vazruden = ObjectAccessor::GetCreature(*me, VazrudenGUID);
|
||||
@@ -313,7 +310,7 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
if (Vazruden)
|
||||
{
|
||||
Vazruden->DisappearAndDie();
|
||||
VazrudenGUID = 0;
|
||||
VazrudenGUID.Clear();
|
||||
}
|
||||
summoned = false;
|
||||
me->ClearUnitState(UNIT_STATE_ROOT);
|
||||
@@ -435,8 +432,8 @@ class boss_vazruden_the_herald : public CreatureScript
|
||||
uint32 waypoint;
|
||||
uint32 check;
|
||||
bool sentryDown;
|
||||
uint64 NazanGUID;
|
||||
uint64 VazrudenGUID;
|
||||
ObjectGuid NazanGUID;
|
||||
ObjectGuid VazrudenGUID;
|
||||
bool summoned;
|
||||
bool lootSpawned;
|
||||
};
|
||||
|
||||
@@ -85,7 +85,7 @@ enum Spells
|
||||
//count of clickers needed to interrupt blast nova
|
||||
#define CLICKERS_COUNT 5
|
||||
|
||||
typedef std::map<uint64, uint64> CubeMap;
|
||||
typedef std::map<ObjectGuid, ObjectGuid> CubeMap;
|
||||
|
||||
class npc_abyssal : public CreatureScript
|
||||
{
|
||||
@@ -253,10 +253,10 @@ class boss_magtheridon : public CreatureScript
|
||||
instance->SetData(DATA_COLLAPSE, false);
|
||||
}
|
||||
|
||||
void SetClicker(uint64 cubeGUID, uint64 clickerGUID)
|
||||
void SetClicker(ObjectGuid cubeGUID, ObjectGuid clickerGUID)
|
||||
{
|
||||
// to avoid multiclicks from 1 cube
|
||||
if (uint64 guid = Cube[cubeGUID])
|
||||
if (ObjectGuid guid = Cube[cubeGUID])
|
||||
DebuffClicker(ObjectAccessor::GetUnit(*me, guid));
|
||||
Cube[cubeGUID] = clickerGUID;
|
||||
NeedCheckCube = true;
|
||||
@@ -284,7 +284,7 @@ class boss_magtheridon : public CreatureScript
|
||||
if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP))
|
||||
{
|
||||
DebuffClicker(clicker);
|
||||
(*i).second = 0;
|
||||
(*i).second.Clear();
|
||||
}
|
||||
else
|
||||
++ClickerNum;
|
||||
|
||||
+4
-6
@@ -136,8 +136,6 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
{
|
||||
boss_warbringer_omroggAI(Creature* creature) : BossAI(creature, DATA_OMROGG)
|
||||
{
|
||||
LeftHeadGUID = 0;
|
||||
RightHeadGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -145,13 +143,13 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
if (Unit* LeftHead = ObjectAccessor::GetUnit(*me, LeftHeadGUID))
|
||||
{
|
||||
LeftHead->setDeathState(JUST_DIED);
|
||||
LeftHeadGUID = 0;
|
||||
LeftHeadGUID.Clear();
|
||||
}
|
||||
|
||||
if (Unit* RightHead = ObjectAccessor::GetUnit(*me, RightHeadGUID))
|
||||
{
|
||||
RightHead->setDeathState(JUST_DIED);
|
||||
RightHeadGUID = 0;
|
||||
RightHeadGUID.Clear();
|
||||
}
|
||||
|
||||
AggroYell = false;
|
||||
@@ -363,8 +361,8 @@ class boss_warbringer_omrogg : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 LeftHeadGUID;
|
||||
uint64 RightHeadGUID;
|
||||
ObjectGuid LeftHeadGUID;
|
||||
ObjectGuid RightHeadGUID;
|
||||
int iaggro;
|
||||
int ithreat;
|
||||
int ikilling;
|
||||
|
||||
+4
-4
@@ -143,7 +143,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
|
||||
void removeAdds()
|
||||
{
|
||||
for (std::vector<uint64>::const_iterator itr = adds.begin(); itr!= adds.end(); ++itr)
|
||||
for (GuidVector::const_iterator itr = adds.begin(); itr!= adds.end(); ++itr)
|
||||
{
|
||||
Creature* creature = ObjectAccessor::GetCreature(*me, *itr);
|
||||
if (creature && creature->IsAlive())
|
||||
@@ -155,7 +155,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
}
|
||||
adds.clear();
|
||||
|
||||
for (std::vector<uint64>::const_iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
|
||||
for (GuidVector::const_iterator itr = assassins.begin(); itr!= assassins.end(); ++itr)
|
||||
{
|
||||
Creature* creature = ObjectAccessor::GetCreature(*me, *itr);
|
||||
if (creature && creature->IsAlive())
|
||||
@@ -295,8 +295,8 @@ class boss_warchief_kargath_bladefist : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<uint64> adds;
|
||||
std::vector<uint64> assassins;
|
||||
GuidVector adds;
|
||||
GuidVector assassins;
|
||||
uint32 Charge_timer;
|
||||
uint32 Blade_Dance_Timer;
|
||||
uint32 Summon_Assistant_Timer;
|
||||
|
||||
@@ -163,7 +163,7 @@ struct advisorbase_ai : public ScriptedAI
|
||||
bool FakeDeath;
|
||||
bool m_bDoubled_Health;
|
||||
uint32 DelayRes_Timer;
|
||||
uint64 DelayRes_Target;
|
||||
ObjectGuid DelayRes_Target;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -175,7 +175,7 @@ struct advisorbase_ai : public ScriptedAI
|
||||
|
||||
FakeDeath = false;
|
||||
DelayRes_Timer = 0;
|
||||
DelayRes_Target = 0;
|
||||
DelayRes_Target.Clear();
|
||||
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -245,7 +245,7 @@ struct advisorbase_ai : public ScriptedAI
|
||||
me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->ClearAllReactives();
|
||||
me->SetTarget(0);
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
@@ -290,7 +290,6 @@ class boss_kaelthas : public CreatureScript
|
||||
boss_kaelthasAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
memset(&m_auiAdvisorGuid, 0, sizeof(m_auiAdvisorGuid));
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -316,7 +315,7 @@ class boss_kaelthas : public CreatureScript
|
||||
|
||||
SummonList summons;
|
||||
|
||||
uint64 m_auiAdvisorGuid[MAX_ADVISORS];
|
||||
ObjectGuid m_auiAdvisorGuid[MAX_ADVISORS];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
|
||||
@@ -137,7 +137,7 @@ class boss_void_reaver : public CreatureScript
|
||||
target = me->GetVictim();
|
||||
|
||||
if (target)
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false, NULL, NULL, 0);
|
||||
me->CastSpell(target, SPELL_ARCANE_ORB, false, NULL, NULL);
|
||||
ArcaneOrb_Timer = 3000;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -66,8 +66,6 @@ class boss_high_botanist_freywinn : public CreatureScript
|
||||
{
|
||||
boss_high_botanist_freywinnAI(Creature* creature) : BossAI(creature, DATA_HIGH_BOTANIST_FREYWINN) { }
|
||||
|
||||
std::list<uint64> Adds_List;
|
||||
|
||||
uint32 SummonSeedling_Timer;
|
||||
uint32 TreeForm_Timer;
|
||||
uint32 MoveCheck_Timer;
|
||||
@@ -76,7 +74,7 @@ class boss_high_botanist_freywinn : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Adds_List.clear();
|
||||
summons.DespawnAll();
|
||||
|
||||
SummonSeedling_Timer = 6000;
|
||||
TreeForm_Timer = 30000;
|
||||
@@ -93,7 +91,12 @@ class boss_high_botanist_freywinn : public CreatureScript
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_FRAYER)
|
||||
Adds_List.push_back(summoned->GetGUID());
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void DoSummonSeedling()
|
||||
@@ -147,18 +150,15 @@ class boss_high_botanist_freywinn : public CreatureScript
|
||||
{
|
||||
if (MoveCheck_Timer <= diff)
|
||||
{
|
||||
if (!Adds_List.empty())
|
||||
for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
for (std::list<uint64>::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr)
|
||||
if (Unit* temp = ObjectAccessor::GetUnit(*me, *itr))
|
||||
{
|
||||
if (Unit* temp = ObjectAccessor::GetUnit(*me, *itr))
|
||||
if (!temp->IsAlive())
|
||||
{
|
||||
if (!temp->IsAlive())
|
||||
{
|
||||
Adds_List.erase(itr);
|
||||
++DeadAddsCount;
|
||||
break;
|
||||
}
|
||||
summons.erase(itr);
|
||||
++DeadAddsCount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ class boss_high_botanist_freywinn : public CreatureScript
|
||||
|
||||
if (DeadAddsCount >= 3)
|
||||
{
|
||||
Adds_List.clear();
|
||||
summons.DespawnAll();
|
||||
DeadAddsCount = 0;
|
||||
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
|
||||
@@ -74,10 +74,9 @@ class npc_warp_splinter_treant : public CreatureScript
|
||||
{
|
||||
npc_warp_splinter_treantAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
WarpGuid = 0;
|
||||
}
|
||||
|
||||
uint64 WarpGuid;
|
||||
ObjectGuid WarpGuid;
|
||||
uint32 check_Timer;
|
||||
|
||||
void Reset() override
|
||||
|
||||
Reference in New Issue
Block a user