mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 16:03:45 +00:00
chore(Core/Misc): Some cleanup (#19970)
* remove weird blanks * update if * ) ) to )) * missed some ) ) * now switch * .
This commit is contained in:
@@ -104,19 +104,19 @@ public:
|
||||
{
|
||||
events.Reset();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(BOSS_ARGENT_CHALLENGE, NOT_STARTED);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if( type == POINT_MOTION_TYPE && id == 1 )
|
||||
if (type == POINT_MOTION_TYPE && id == 1)
|
||||
me->SetFacingTo(3 * M_PI / 2);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if( who->IsPlayer() )
|
||||
if (who->IsPlayer())
|
||||
{
|
||||
Talk(SAY_EADRIC_KILL_PLAYER);
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_HAMMER_RIGHTEOUS, 25000);
|
||||
Talk(SAY_EADRIC_AGGRO);
|
||||
me->CastSpell(me, SPELL_VENGEANCE, false);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(BOSS_ARGENT_CHALLENGE, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if( damage >= me->GetHealth() )
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
damage = me->GetHealth() - 1;
|
||||
if (me->GetFaction() != FACTION_FRIENDLY)
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
_EnterEvadeMode();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(BOSS_ARGENT_CHALLENGE, DONE);
|
||||
}
|
||||
}
|
||||
@@ -164,15 +164,15 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
events.Repeat(16s);
|
||||
break;
|
||||
case EVENT_SPELL_HAMMER_RIGHTEOUS:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 55.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 55.0f, true))
|
||||
{
|
||||
Talk(SAY_EADRIC_EMOTE_HAMMER_RIGHTEOUS, target);
|
||||
Talk(SAY_EADRIC_HAMMER_RIGHTEOUS);
|
||||
@@ -224,26 +224,26 @@ public:
|
||||
{
|
||||
events.Reset();
|
||||
summoned = false;
|
||||
if( MemoryGUID )
|
||||
if (MemoryGUID)
|
||||
{
|
||||
if( Creature* memory = ObjectAccessor::GetCreature(*me, MemoryGUID) )
|
||||
if (Creature* memory = ObjectAccessor::GetCreature(*me, MemoryGUID))
|
||||
memory->DespawnOrUnsummon();
|
||||
MemoryGUID.Clear();
|
||||
}
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(BOSS_ARGENT_CHALLENGE, NOT_STARTED);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if( type == POINT_MOTION_TYPE && id == 1 )
|
||||
if (type == POINT_MOTION_TYPE && id == 1)
|
||||
me->SetFacingTo(3 * M_PI / 2);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if( who->IsPlayer() )
|
||||
if (who->IsPlayer())
|
||||
{
|
||||
Talk(SAY_PALETRESS_KILL_PLAYER);
|
||||
}
|
||||
@@ -256,22 +256,22 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_SMITE, 2s, 3s);
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
Talk(SAY_PALETRESS_AGGRO);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(BOSS_ARGENT_CHALLENGE, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if( param == 1 )
|
||||
if (param == 1)
|
||||
{
|
||||
MemoryGUID.Clear();
|
||||
me->RemoveAura(SPELL_SHIELD);
|
||||
Talk(SAY_PALETRESS_MEMORY_DEATH);
|
||||
}
|
||||
else if( param == (-1) )
|
||||
else if (param == (-1))
|
||||
{
|
||||
if( MemoryGUID )
|
||||
if( Creature* memory = ObjectAccessor::GetCreature(*me, MemoryGUID) )
|
||||
if (MemoryGUID)
|
||||
if (Creature* memory = ObjectAccessor::GetCreature(*me, MemoryGUID))
|
||||
{
|
||||
memory->DespawnOrUnsummon();
|
||||
MemoryGUID.Clear();
|
||||
@@ -281,10 +281,10 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
//if( me->HasAura(SPELL_SHIELD) )
|
||||
//if (me->HasAura(SPELL_SHIELD))
|
||||
// return;
|
||||
|
||||
if( damage >= me->GetHealth() )
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
damage = me->GetHealth() - 1;
|
||||
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
_EnterEvadeMode();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(BOSS_ARGENT_CHALLENGE, DONE);
|
||||
pInstance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 68206);
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MEMORY_ENTRY, summon->GetEntry());
|
||||
MemoryGUID = summon->GetGUID();
|
||||
}
|
||||
@@ -324,12 +324,12 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( !summoned && HealthBelowPct(25) )
|
||||
if (!summoned && HealthBelowPct(25))
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
Talk(SAY_PALETRESS_MEMORY_SUMMON);
|
||||
@@ -343,32 +343,32 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_SMITE:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_SMITE, false);
|
||||
events.Repeat(3s, 4s);
|
||||
break;
|
||||
case EVENT_SPELL_HOLY_FIRE:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
me->CastSpell(target, SPELL_HOLY_FIRE, false);
|
||||
events.Repeat(9s, 12s);
|
||||
break;
|
||||
case EVENT_SPELL_RENEW:
|
||||
if( !MemoryGUID )
|
||||
if (!MemoryGUID)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if( urand(0, 1) )
|
||||
if (urand(0, 1))
|
||||
me->CastSpell(me, SPELL_RENEW, false);
|
||||
else if( Creature* memory = ObjectAccessor::GetCreature(*me, MemoryGUID) )
|
||||
if( memory->IsAlive() )
|
||||
else if (Creature* memory = ObjectAccessor::GetCreature(*me, MemoryGUID))
|
||||
if (memory->IsAlive())
|
||||
me->CastSpell(memory, SPELL_RENEW, false);
|
||||
events.Repeat(15s, 17s);
|
||||
break;
|
||||
@@ -410,8 +410,8 @@ public:
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->DespawnOrUnsummon(20000);
|
||||
if( pInstance )
|
||||
if( Creature* paletress = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_PALETRESS)) )
|
||||
if (pInstance)
|
||||
if (Creature* paletress = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(DATA_PALETRESS)))
|
||||
paletress->AI()->DoAction(1);
|
||||
}
|
||||
|
||||
@@ -421,10 +421,10 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -436,7 +436,7 @@ public:
|
||||
case EVENT_MEMORY_START_ATTACK:
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(false);
|
||||
if( Unit* target = me->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = me->SelectNearestTarget(200.0f))
|
||||
{
|
||||
AttackStart(target);
|
||||
DoZoneInCombat();
|
||||
@@ -447,12 +447,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_WAKING_NIGHTMARE, 20s, 30s);
|
||||
break;
|
||||
case EVENT_SPELL_OLD_WOUNDS:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f, true))
|
||||
me->CastSpell(target, SPELL_OLD_WOUNDS, true);
|
||||
events.Repeat(12s);
|
||||
break;
|
||||
case EVENT_SPELL_SHADOWS_PAST:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_SHADOWS_PAST, false);
|
||||
events.Repeat(15s, 20s);
|
||||
break;
|
||||
@@ -541,9 +541,9 @@ public:
|
||||
|
||||
void WaypointReached(uint32 uiPoint) override
|
||||
{
|
||||
if( uiPoint == 1 )
|
||||
if (uiPoint == 1)
|
||||
{
|
||||
switch( uiWaypoint )
|
||||
switch (uiWaypoint)
|
||||
{
|
||||
case 0:
|
||||
me->SetFacingTo(5.4f);
|
||||
@@ -561,10 +561,10 @@ public:
|
||||
void SetData(uint32 uiType, uint32 /*uiData*/) override
|
||||
{
|
||||
AddWaypoint(0, me->GetPositionX(), 660.0f, 411.80f);
|
||||
switch( me->GetEntry() )
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_ARGENT_LIGHTWIELDER:
|
||||
switch( uiType )
|
||||
switch (uiType)
|
||||
{
|
||||
case 0:
|
||||
AddWaypoint(1, 716.321f, 647.047f, 411.93f);
|
||||
@@ -578,7 +578,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case NPC_ARGENT_MONK:
|
||||
switch( uiType )
|
||||
switch (uiType)
|
||||
{
|
||||
case 0:
|
||||
AddWaypoint(1, 717.86f, 649.0f, 411.923f);
|
||||
@@ -592,7 +592,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case NPC_PRIESTESS:
|
||||
switch( uiType )
|
||||
switch (uiType)
|
||||
{
|
||||
case 0:
|
||||
AddWaypoint(1, 719.872f, 650.94f, 411.93f);
|
||||
@@ -613,7 +613,7 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if( bCheck && damage >= me->GetHealth() )
|
||||
if (bCheck && damage >= me->GetHealth())
|
||||
{
|
||||
bCheck = false;
|
||||
damage = me->GetHealth() - 1;
|
||||
@@ -625,25 +625,25 @@ public:
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
switch( me->GetEntry() )
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_ARGENT_MONK:
|
||||
events.RescheduleEvent(EVENT_MONK_SPELL_FLURRY_OF_BLOWS, 5s);
|
||||
events.RescheduleEvent(EVENT_MONK_SPELL_PUMMEL, 7s);
|
||||
if( IsHeroic() )
|
||||
if (IsHeroic())
|
||||
bCheck = true;
|
||||
break;
|
||||
case NPC_PRIESTESS:
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_HOLY_SMITE, 5s, 8s);
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_SHADOW_WORD_PAIN, 3s, 6s);
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_FOUNTAIN_OF_LIGHT, 8s, 15s);
|
||||
if( IsHeroic() )
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_PRIESTESS_SPELL_MIND_CONTROL_H, 12s);
|
||||
break;
|
||||
case NPC_ARGENT_LIGHTWIELDER:
|
||||
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_BLAZING_LIGHT, 12s, 15s);
|
||||
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_CLEAVE, 3s, 5s);
|
||||
if( IsHeroic() )
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H, 8s, 12s);
|
||||
break;
|
||||
}
|
||||
@@ -653,15 +653,15 @@ public:
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -671,18 +671,18 @@ public:
|
||||
events.Repeat(12s, 18s);
|
||||
break;
|
||||
case EVENT_MONK_SPELL_PUMMEL:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_PUMMEL, false);
|
||||
events.Repeat(8s, 11s);
|
||||
break;
|
||||
|
||||
case EVENT_PRIESTESS_SPELL_HOLY_SMITE:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_HOLY_SMITE, false);
|
||||
events.Repeat(6s, 8s);
|
||||
break;
|
||||
case EVENT_PRIESTESS_SPELL_SHADOW_WORD_PAIN:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_SHADOW_WORD_PAIN, false);
|
||||
events.Repeat(12s, 15s);
|
||||
break;
|
||||
@@ -691,7 +691,7 @@ public:
|
||||
events.Repeat(35s, 45s);
|
||||
break;
|
||||
case EVENT_PRIESTESS_SPELL_MIND_CONTROL_H:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
me->CastSpell(target, SPELL_MIND_CONTROL_H, false);
|
||||
events.Repeat(22s, 30s);
|
||||
break;
|
||||
@@ -699,19 +699,19 @@ public:
|
||||
case EVENT_LIGHTWIELDER_SPELL_BLAZING_LIGHT:
|
||||
{
|
||||
Unit* target = DoSelectLowestHpFriendly(40.0f);
|
||||
if( !target )
|
||||
if (!target)
|
||||
target = me;
|
||||
me->CastSpell(target, SPELL_BLAZING_LIGHT, false);
|
||||
events.Repeat(8s, 12s);
|
||||
}
|
||||
break;
|
||||
case EVENT_LIGHTWIELDER_SPELL_CLEAVE:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_CLEAVE, false);
|
||||
events.Repeat(6s, 8s);
|
||||
break;
|
||||
case EVENT_LIGHTWIELDER_SPELL_UNBALANCING_STRIKE_H:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_UNBALANCING_STRIKE_H, false);
|
||||
events.Repeat(12s, 15s);
|
||||
break;
|
||||
@@ -723,7 +723,7 @@ public:
|
||||
void JustDied(Unit* /*pKiller*/) override
|
||||
{
|
||||
me->DespawnOrUnsummon(10000);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, 0);
|
||||
}
|
||||
};
|
||||
@@ -742,7 +742,7 @@ class spell_eadric_radiance : public SpellScript
|
||||
{
|
||||
std::list<WorldObject*> tmplist;
|
||||
for( std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
if( (*itr)->ToUnit()->HasInArc(M_PI, GetCaster()) )
|
||||
if ((*itr)->ToUnit()->HasInArc(M_PI, GetCaster()))
|
||||
tmplist.push_back(*itr);
|
||||
|
||||
targets.clear();
|
||||
@@ -798,8 +798,8 @@ class spell_reflective_shield_aura : public AuraScript
|
||||
|
||||
void HandleAfterEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32& absorbAmount)
|
||||
{
|
||||
if( Unit* attacker = dmgInfo.GetAttacker() )
|
||||
if( GetOwner() && attacker->GetGUID() != GetOwner()->GetGUID() )
|
||||
if (Unit* attacker = dmgInfo.GetAttacker())
|
||||
if (GetOwner() && attacker->GetGUID() != GetOwner()->GetGUID())
|
||||
{
|
||||
int32 damage = (int32)(absorbAmount * 0.25f);
|
||||
GetOwner()->ToUnit()->CastCustomSpell(attacker, SPELL_REFLECTIVE_SHIELD_DAMAGE, &damage, nullptr, nullptr, true);
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(BOSS_BLACK_KNIGHT, NOT_STARTED);
|
||||
|
||||
//me->SetLootMode(0); // [LOOT]
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if( Phase < 3 && damage >= me->GetHealth() )
|
||||
if (Phase < 3 && damage >= me->GetHealth())
|
||||
{
|
||||
damage = 0;
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
@@ -164,19 +164,19 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if( param == -1 )
|
||||
if (param == -1)
|
||||
{
|
||||
summons.DespawnAll();
|
||||
}
|
||||
else if( param == 1 )
|
||||
else if (param == 1)
|
||||
{
|
||||
if( !pInstance )
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
pInstance->SetData(BOSS_BLACK_KNIGHT, IN_PROGRESS);
|
||||
Talk(SAY_BK_AGGRO);
|
||||
me->CastSpell((Unit*)nullptr, (pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? SPELL_RAISE_DEAD_JAEREN : SPELL_RAISE_DEAD_ARELAS), false);
|
||||
if( Creature* announcer = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_ANNOUNCER)) )
|
||||
if (Creature* announcer = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_ANNOUNCER)))
|
||||
announcer->DespawnOrUnsummon();
|
||||
|
||||
events.Reset();
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spell) override
|
||||
{
|
||||
switch( spell->Id )
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_BLACK_KNIGHT_RES:
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
|
||||
++Phase;
|
||||
|
||||
switch( Phase )
|
||||
switch (Phase)
|
||||
{
|
||||
case 2:
|
||||
me->SetDisplayId(MODEL_SKELETON);
|
||||
@@ -236,46 +236,46 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_ANNOUNCER_SAY_ZOMBIE:
|
||||
if( pInstance && !summons.empty() )
|
||||
if( Creature* ghoul = pInstance->instance->GetCreature(*summons.begin()) )
|
||||
if (pInstance && !summons.empty())
|
||||
if (Creature* ghoul = pInstance->instance->GetCreature(*summons.begin()))
|
||||
if (urand(0, 1))
|
||||
ghoul->Yell("[Zombie] .... . Brains ....", LANG_UNIVERSAL); /// @todo: Multiple variations + not always happening, from video sources, needs sniff to transition from DB.
|
||||
break;
|
||||
case EVENT_SPELL_PLAGUE_STRIKE:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_PLAGUE_STRIKE, false);
|
||||
events.Repeat(10s, 12s);
|
||||
break;
|
||||
case EVENT_SPELL_ICY_TOUCH:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_ICY_TOUCH, false);
|
||||
events.Repeat(5s, 6s);
|
||||
break;
|
||||
case EVENT_SPELL_DEATH_RESPITE:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_DEATH_RESPITE, false);
|
||||
events.Repeat(13s, 15s);
|
||||
break;
|
||||
case EVENT_SPELL_OBLITERATE:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_OBLITERATE, false);
|
||||
events.Repeat(15s, 17s);
|
||||
break;
|
||||
case EVENT_SPELL_DESECRATION:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_DESECRATION, false);
|
||||
events.Repeat(14s, 17s);
|
||||
break;
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
events.Repeat(2s, 4s);
|
||||
break;
|
||||
case EVENT_SPELL_MARKED_DEATH:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.000000f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.000000f, true))
|
||||
me->CastSpell(target, SPELL_MARKED_DEATH, false);
|
||||
events.Repeat(9s);
|
||||
break;
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if( Unit* target = summon->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = summon->SelectNearestTarget(200.0f))
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
DoZoneInCombat(summon);
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if( victim->IsPlayer() )
|
||||
if (victim->IsPlayer())
|
||||
{
|
||||
Talk(SAY_BK_KILL_PLAYER);
|
||||
}
|
||||
@@ -315,9 +315,9 @@ public:
|
||||
{
|
||||
me->CastSpell((Unit*)nullptr, SPELL_BK_KILL_CREDIT, true);
|
||||
Talk(SAY_BK_DEATH);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(BOSS_BLACK_KNIGHT, DONE);
|
||||
if( me->ToTempSummon() )
|
||||
if (me->ToTempSummon())
|
||||
me->ToTempSummon()->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
||||
}
|
||||
};
|
||||
@@ -347,7 +347,7 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if( param == 1 )
|
||||
if (param == 1)
|
||||
{
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->DisableRotate(false);
|
||||
@@ -358,7 +358,7 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i) override
|
||||
{
|
||||
if( i == 12 )
|
||||
if (i == 12)
|
||||
{
|
||||
SetEscortPaused(true);
|
||||
me->SetOrientation(3.62f);
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
me->DisableRotate(true);
|
||||
me->SetFacingTo(3.62f);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_MOUNT_SPECIAL);
|
||||
if( InstanceScript* pInstance = me->GetInstanceScript() )
|
||||
if (InstanceScript* pInstance = me->GetInstanceScript())
|
||||
pInstance->SetData(DATA_SKELETAL_GRYPHON_LANDED, 0);
|
||||
}
|
||||
}
|
||||
@@ -422,7 +422,7 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
switch(spell->Id)
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_CLAW_N:
|
||||
case SPELL_CLAW_H:
|
||||
@@ -443,15 +443,15 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
if (me->IsDuringRemoveFromWorld())
|
||||
return;
|
||||
|
||||
if( apply )
|
||||
if (apply)
|
||||
{
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetSpeed(MOVE_RUN, 2.0f, false);
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
if (me->IsDuringRemoveFromWorld())
|
||||
return;
|
||||
|
||||
if( !apply )
|
||||
if (!apply)
|
||||
{
|
||||
me->RemoveAura(SPELL_PLAYER_VEHICLE_DEFEND);
|
||||
who->RemoveAura(SPELL_PLAYER_VEHICLE_DEFEND);
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( ShieldTimer <= (int32)diff )
|
||||
if (ShieldTimer <= (int32)diff )
|
||||
{
|
||||
me->CastSpell(me, SPELL_MINIONS_DEFEND, true);
|
||||
ShieldTimer = 5000;
|
||||
@@ -268,15 +268,15 @@ public:
|
||||
else
|
||||
ShieldTimer -= diff;
|
||||
|
||||
if ( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -285,22 +285,22 @@ public:
|
||||
GuidVector LIST;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
if( Player* plr = itr->GetSource() )
|
||||
if (Player* plr = itr->GetSource())
|
||||
{
|
||||
if( me->GetExactDist(plr) < 8.0f || me->GetExactDist(plr) > 25.0f || plr->isDead() )
|
||||
if (me->GetExactDist(plr) < 8.0f || me->GetExactDist(plr) > 25.0f || plr->isDead())
|
||||
continue;
|
||||
if( !plr->GetVehicle() )
|
||||
if (!plr->GetVehicle())
|
||||
LIST.push_back(plr->GetGUID());
|
||||
else if( Vehicle* v = plr->GetVehicle() )
|
||||
else if (Vehicle* v = plr->GetVehicle())
|
||||
{
|
||||
if( Unit* mount = v->GetBase() )
|
||||
if (Unit* mount = v->GetBase())
|
||||
LIST.push_back(mount->GetGUID());
|
||||
}
|
||||
}
|
||||
if( !LIST.empty() )
|
||||
if (!LIST.empty())
|
||||
{
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)))
|
||||
{
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
@@ -316,25 +316,25 @@ public:
|
||||
GuidVector LIST;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
if( Player* plr = itr->GetSource() )
|
||||
if (Player* plr = itr->GetSource())
|
||||
{
|
||||
if( me->GetExactDist(plr) < 10.0f || me->GetExactDist(plr) > 30.0f )
|
||||
if (me->GetExactDist(plr) < 10.0f || me->GetExactDist(plr) > 30.0f )
|
||||
continue;
|
||||
if( Vehicle* v = plr->GetVehicle() )
|
||||
if( Unit* mount = v->GetBase() )
|
||||
if (Vehicle* v = plr->GetVehicle())
|
||||
if (Unit* mount = v->GetBase())
|
||||
LIST.push_back(mount->GetGUID());
|
||||
}
|
||||
if( !LIST.empty() )
|
||||
if (!LIST.empty())
|
||||
{
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetCreature(*me, LIST.at(rnd)) )
|
||||
if (Unit* target = ObjectAccessor::GetCreature(*me, LIST.at(rnd)))
|
||||
me->CastSpell(target, SPELL_NPC_SHIELD_BREAKER, false);
|
||||
}
|
||||
events.Repeat(6s, 8s);
|
||||
}
|
||||
break;
|
||||
case EVENT_THRUST:
|
||||
if( me->GetVictim() && me->GetExactDist(me->GetVictim()) <= 5.5f )
|
||||
if (me->GetVictim() && me->GetExactDist(me->GetVictim()) <= 5.5f )
|
||||
me->CastSpell(me->GetVictim(), SPELL_PLAYER_VEHICLE_THRUST, false);
|
||||
events.Repeat(3s, 5s);
|
||||
break;
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
{
|
||||
me->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
|
||||
me->DespawnOrUnsummon(10000);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_MOUNT_DIED, 0);
|
||||
}
|
||||
};
|
||||
@@ -402,7 +402,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if( pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) == INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED )
|
||||
if (pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) == INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED )
|
||||
{
|
||||
DoAction(1);
|
||||
DoAction(2);
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if( pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) == INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED )
|
||||
if (pInstance && pInstance->GetData(DATA_INSTANCE_PROGRESS) == INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED )
|
||||
me->CallForHelp(100.0f);
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ public:
|
||||
{
|
||||
me->m_spellImmune[IMMUNITY_MECHANIC].clear();
|
||||
events.Reset();
|
||||
switch( me->GetEntry() )
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_AMBROSE: // Ambrose Boltspark
|
||||
case NPC_ERESSEA: // Eressea Dawnsinger
|
||||
@@ -485,7 +485,7 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if( param == 1 )
|
||||
if (param == 1)
|
||||
{
|
||||
MountPhase = false;
|
||||
NewMountGUID.Clear();
|
||||
@@ -500,16 +500,16 @@ public:
|
||||
AddCreatureAddonAuras();
|
||||
events.Reset();
|
||||
}
|
||||
else if( param == 2 )
|
||||
else if (param == 2)
|
||||
ScheduleAbilitiesEvents();
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData) override
|
||||
{
|
||||
BossOrder = uiType;
|
||||
if( uiData > 1 )
|
||||
if (uiData > 1)
|
||||
return;
|
||||
switch( BossOrder )
|
||||
switch (BossOrder)
|
||||
{
|
||||
case 0:
|
||||
if (uiData == 0) // 1 == short version
|
||||
@@ -545,11 +545,11 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if( MountPhase )
|
||||
if (MountPhase)
|
||||
{
|
||||
if( me->GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID) == 0 )
|
||||
if (me->GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID) == 0 )
|
||||
damage = 0;
|
||||
else if( damage >= me->GetHealth() )
|
||||
else if (damage >= me->GetHealth())
|
||||
{
|
||||
events.Reset();
|
||||
damage = me->GetHealth() - 1;
|
||||
@@ -565,10 +565,10 @@ public:
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_MOUNT_DIED, BossOrder);
|
||||
if( Creature* mount = me->FindNearestCreature( pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_WARHORSE : VEHICLE_ARGENT_BATTLEWORG, 100.0f, true ) )
|
||||
if (Creature* mount = me->FindNearestCreature( pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_WARHORSE : VEHICLE_ARGENT_BATTLEWORG, 100.0f, true ))
|
||||
{
|
||||
NewMountGUID = mount->GetGUID();
|
||||
me->GetMotionMaster()->MovePoint(7, *mount);
|
||||
@@ -579,7 +579,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
if( damage >= me->GetHealth() )
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
MountPhase = true;
|
||||
events.Reset();
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
me->SetRegeneratingHealth(false);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_GRAND_CHAMPION_DIED, BossOrder);
|
||||
}
|
||||
}
|
||||
@@ -603,26 +603,26 @@ public:
|
||||
|
||||
void WaypointReached(uint32 i) override
|
||||
{
|
||||
if( !pInstance )
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
if( (i == 2 && (BossOrder == 1 || BossOrder == 2)) || (i == 3 && BossOrder == 0) )
|
||||
if ((i == 2 && (BossOrder == 1 || BossOrder == 2)) || (i == 3 && BossOrder == 0))
|
||||
pInstance->SetData(DATA_GRAND_CHAMPION_REACHED_DEST, BossOrder);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if( id < 4 )
|
||||
if (id < 4)
|
||||
npc_escortAI::MovementInform(type, id);
|
||||
|
||||
if( type == POINT_MOTION_TYPE )
|
||||
if (type == POINT_MOTION_TYPE)
|
||||
{
|
||||
if( id == 5 )
|
||||
if (id == 5)
|
||||
me->SetFacingTo(3 * M_PI / 2);
|
||||
else if( id == 7 ) // reached new mount!
|
||||
else if (id == 7) // reached new mount!
|
||||
{
|
||||
if( NewMountGUID )
|
||||
if( Creature* mount = ObjectAccessor::GetCreature(*me, NewMountGUID) )
|
||||
if (NewMountGUID)
|
||||
if (Creature* mount = ObjectAccessor::GetCreature(*me, NewMountGUID))
|
||||
{
|
||||
mount->DespawnOrUnsummon();
|
||||
me->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, mount->GetDisplayId());
|
||||
@@ -637,16 +637,16 @@ public:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(false);
|
||||
if( Unit* target = me->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = me->SelectNearestTarget(200.0f))
|
||||
AttackStart(target);
|
||||
DoZoneInCombat();
|
||||
me->CastSpell(me, SPELL_TRAMPLE_AURA, true);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_REACHED_NEW_MOUNT, 0);
|
||||
NewMountGUID.Clear();
|
||||
}
|
||||
}
|
||||
else if( id == 9 )
|
||||
else if (id == 9)
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
@@ -661,37 +661,37 @@ public:
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if ( !UpdateVictim() && !NewMountGUID )
|
||||
if (!UpdateVictim() && !NewMountGUID )
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) || ((me->GetEntry() == NPC_JACOB || me->GetEntry() == NPC_MOKRA) && me->HasAura(SPELL_BLADESTORM)) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) || ((me->GetEntry() == NPC_JACOB || me->GetEntry() == NPC_MOKRA) && me->HasAura(SPELL_BLADESTORM)))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_FIND_NEW_MOUNT:
|
||||
{
|
||||
if( me->HasAura(SPELL_TRAMPLE_STUN) )
|
||||
if (me->HasAura(SPELL_TRAMPLE_STUN))
|
||||
{
|
||||
events.Repeat(200ms);
|
||||
break;
|
||||
}
|
||||
|
||||
// hackfix, trample won't hit grand champions because of UNIT_FLAG_NON_ATTACKABLE
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
{
|
||||
bool trample = false;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
if( Player* plr = itr->GetSource() )
|
||||
if( me->GetExactDist(plr) <= 5.0f )
|
||||
if( Vehicle* v = plr->GetVehicle() )
|
||||
if( Unit* c = v->GetBase() )
|
||||
if( c->IsCreature() && c->ToCreature()->GetEntry() == (pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_BATTLEWORG : VEHICLE_ARGENT_WARHORSE) )
|
||||
if (Player* plr = itr->GetSource())
|
||||
if (me->GetExactDist(plr) <= 5.0f )
|
||||
if (Vehicle* v = plr->GetVehicle())
|
||||
if (Unit* c = v->GetBase())
|
||||
if (c->IsCreature() && c->ToCreature()->GetEntry() == (pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_BATTLEWORG : VEHICLE_ARGENT_WARHORSE))
|
||||
{
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
@@ -701,23 +701,23 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if( trample )
|
||||
if (trample)
|
||||
{
|
||||
events.Repeat(15s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( Creature* mount = ObjectAccessor::GetCreature(*me, NewMountGUID) )
|
||||
if( mount->IsAlive() )
|
||||
if (Creature* mount = ObjectAccessor::GetCreature(*me, NewMountGUID))
|
||||
if (mount->IsAlive())
|
||||
{
|
||||
if( me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE )
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE )
|
||||
me->GetMotionMaster()->MovePoint(7, *mount);
|
||||
events.Repeat(200ms);
|
||||
break;
|
||||
}
|
||||
|
||||
if( Creature* mount = me->FindNearestCreature( pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_WARHORSE : VEHICLE_ARGENT_BATTLEWORG, 100.0f, true ) )
|
||||
if (Creature* mount = me->FindNearestCreature( pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_HORDE ? VEHICLE_ARGENT_WARHORSE : VEHICLE_ARGENT_BATTLEWORG, 100.0f, true ))
|
||||
{
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
NewMountGUID = mount->GetGUID();
|
||||
@@ -734,22 +734,22 @@ public:
|
||||
GuidVector LIST;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
if( Player* plr = itr->GetSource() )
|
||||
if (Player* plr = itr->GetSource())
|
||||
{
|
||||
if( me->GetExactDist(plr) < 8.0f || me->GetExactDist(plr) > 25.0f || plr->isDead() )
|
||||
if (me->GetExactDist(plr) < 8.0f || me->GetExactDist(plr) > 25.0f || plr->isDead())
|
||||
continue;
|
||||
if( !plr->GetVehicle() )
|
||||
if (!plr->GetVehicle())
|
||||
LIST.push_back(plr->GetGUID());
|
||||
else if( Vehicle* v = plr->GetVehicle() )
|
||||
else if (Vehicle* v = plr->GetVehicle())
|
||||
{
|
||||
if( Unit* mount = v->GetBase() )
|
||||
if (Unit* mount = v->GetBase())
|
||||
LIST.push_back(mount->GetGUID());
|
||||
}
|
||||
}
|
||||
if( !LIST.empty() )
|
||||
if (!LIST.empty())
|
||||
{
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)))
|
||||
{
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
@@ -765,33 +765,33 @@ public:
|
||||
GuidVector LIST;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
if( Player* plr = itr->GetSource() )
|
||||
if (Player* plr = itr->GetSource())
|
||||
{
|
||||
if( me->GetExactDist(plr) < 10.0f || me->GetExactDist(plr) > 30.0f )
|
||||
if (me->GetExactDist(plr) < 10.0f || me->GetExactDist(plr) > 30.0f )
|
||||
continue;
|
||||
if( Vehicle* v = plr->GetVehicle() )
|
||||
if( Unit* mount = v->GetBase() )
|
||||
if (Vehicle* v = plr->GetVehicle())
|
||||
if (Unit* mount = v->GetBase())
|
||||
LIST.push_back(mount->GetGUID());
|
||||
}
|
||||
if( !LIST.empty() )
|
||||
if (!LIST.empty())
|
||||
{
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetCreature(*me, LIST.at(rnd)) )
|
||||
if (Unit* target = ObjectAccessor::GetCreature(*me, LIST.at(rnd)))
|
||||
me->CastSpell(target, SPELL_NPC_SHIELD_BREAKER, false);
|
||||
}
|
||||
events.Repeat(6s, 8s);
|
||||
}
|
||||
break;
|
||||
case EVENT_THRUST:
|
||||
if( Unit* victim = me->GetVictim() )
|
||||
if( me->GetExactDist(victim) <= 6.0f )
|
||||
if (Unit* victim = me->GetVictim())
|
||||
if (me->GetExactDist(victim) <= 6.0f )
|
||||
me->CastSpell(victim, SPELL_PLAYER_VEHICLE_THRUST, false);
|
||||
events.Repeat(3s, 5s);
|
||||
break;
|
||||
|
||||
/******************* MAGE *******************/
|
||||
case EVEMT_MAGE_SPELL_FIREBALL:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_FIREBALL, false);
|
||||
events.Repeat(5s);
|
||||
break;
|
||||
@@ -804,7 +804,7 @@ public:
|
||||
events.Repeat(22s);
|
||||
break;
|
||||
case EVEMT_MAGE_SPELL_POLYMORPH:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
me->CastSpell(target, SPELL_POLYMORPH, false);
|
||||
events.Repeat(8s);
|
||||
break;
|
||||
@@ -812,7 +812,7 @@ public:
|
||||
|
||||
/****************** SHAMAN ******************/
|
||||
case EVENT_SHAMAN_SPELL_CHAIN_LIGHTNING:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
me->CastSpell(target, SPELL_CHAIN_LIGHTNING, false);
|
||||
events.Repeat(16s);
|
||||
break;
|
||||
@@ -823,10 +823,10 @@ public:
|
||||
case EVENT_SHAMAN_SPELL_HEALING_WAVE:
|
||||
{
|
||||
Unit* target = nullptr;
|
||||
if( urand(0, 1) )
|
||||
if (urand(0, 1))
|
||||
{
|
||||
target = DoSelectLowestHpFriendly(40.0f);
|
||||
if( !target )
|
||||
if (!target)
|
||||
target = me;
|
||||
}
|
||||
else
|
||||
@@ -836,7 +836,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case EVENT_SHAMAN_SPELL_HEX_OF_MENDING:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_HEX_OF_MENDING, false);
|
||||
events.Repeat(20s, 25s);
|
||||
break;
|
||||
@@ -852,9 +852,9 @@ public:
|
||||
break;
|
||||
case EVENT_HUNTER_SPELL_MULTI_SHOT:
|
||||
{
|
||||
if( !UnitTargetGUID )
|
||||
if (!UnitTargetGUID)
|
||||
{
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 30.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 30.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_SHOOT, false);
|
||||
UnitTargetGUID = target->GetGUID();
|
||||
@@ -865,7 +865,7 @@ public:
|
||||
else
|
||||
{
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, UnitTargetGUID);
|
||||
if( target && me->IsInRange(target, 5.0f, 30.0f, false) )
|
||||
if (target && me->IsInRange(target, 5.0f, 30.0f, false))
|
||||
me->CastSpell(target, SPELL_MULTI_SHOT, false);
|
||||
else
|
||||
{
|
||||
@@ -873,7 +873,7 @@ public:
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if( player && me->IsInRange(player, 5.0f, 30.0f, false) )
|
||||
if (player && me->IsInRange(player, 5.0f, 30.0f, false))
|
||||
{
|
||||
me->CastSpell(player, SPELL_MULTI_SHOT, false);
|
||||
break;
|
||||
@@ -889,7 +889,7 @@ public:
|
||||
|
||||
/****************** ROGUE *******************/
|
||||
case EVENT_ROGUE_SPELL_EVISCERATE:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_EVISCERATE, false);
|
||||
events.Repeat(8s);
|
||||
break;
|
||||
@@ -898,7 +898,7 @@ public:
|
||||
events.Repeat(14s);
|
||||
break;
|
||||
case EVENT_ROGUE_SPELL_POISON_BOTTLE:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
me->CastSpell(target, SPELL_POISON_BOTTLE, false);
|
||||
events.Repeat(19s);
|
||||
break;
|
||||
@@ -906,12 +906,12 @@ public:
|
||||
|
||||
/***************** WARRIOR ******************/
|
||||
case EVENT_WARRIOR_SPELL_MORTAL_STRIKE:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_MORTAL_STRIKE, false);
|
||||
events.Repeat(8s, 12s);
|
||||
break;
|
||||
case EVENT_WARRIOR_SPELL_BLADESTORM:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_BLADESTORM, false);
|
||||
events.Repeat(15s, 20s);
|
||||
break;
|
||||
@@ -921,7 +921,7 @@ public:
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if( player && me->IsInRange(player, 8.0f, 25.0f, false) )
|
||||
if (player && me->IsInRange(player, 8.0f, 25.0f, false))
|
||||
{
|
||||
DoResetThreatList();
|
||||
me->AddThreat(player, 5.0f);
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for( uint8 i = 0; i < MAX_ENCOUNTER; ++i )
|
||||
if( m_auiEncounter[i] == IN_PROGRESS )
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -112,54 +112,54 @@ public:
|
||||
if (TeamIdInInstance == TEAM_NEUTRAL)
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
if( !players.IsEmpty() )
|
||||
if( Player* pPlayer = players.begin()->GetSource() )
|
||||
if (!players.IsEmpty())
|
||||
if (Player* pPlayer = players.begin()->GetSource())
|
||||
TeamIdInInstance = pPlayer->GetTeamId();
|
||||
}
|
||||
|
||||
switch( creature->GetEntry() )
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
// Grand Champions:
|
||||
case NPC_MOKRA:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_JACOB);
|
||||
break;
|
||||
case NPC_ERESSEA:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_AMBROSE);
|
||||
break;
|
||||
case NPC_RUNOK:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_COLOSOS);
|
||||
break;
|
||||
case NPC_ZULTORE:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_JAELYNE);
|
||||
break;
|
||||
case NPC_VISCERI:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_LANA);
|
||||
break;
|
||||
|
||||
// Grand Champion Minions:
|
||||
case NPC_ORGRIMMAR_MINION:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_STORMWIND_MINION);
|
||||
break;
|
||||
case NPC_SILVERMOON_MINION:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_GNOMEREGAN_MINION);
|
||||
break;
|
||||
case NPC_THUNDER_BLUFF_MINION:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_EXODAR_MINION);
|
||||
break;
|
||||
case NPC_SENJIN_MINION:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_DARNASSUS_MINION);
|
||||
break;
|
||||
case NPC_UNDERCITY_MINION:
|
||||
if( TeamIdInInstance == TEAM_HORDE )
|
||||
if (TeamIdInInstance == TEAM_HORDE)
|
||||
creature->UpdateEntry(NPC_IRONFORGE_MINION);
|
||||
break;
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
case NPC_JAEREN:
|
||||
case NPC_ARELAS:
|
||||
NPC_AnnouncerGUID = creature->GetGUID();
|
||||
//if( TeamIdInInstance == TEAM_ALLIANCE )
|
||||
//if (TeamIdInInstance == TEAM_ALLIANCE)
|
||||
// creature->UpdateEntry(NPC_ARELAS);
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
break;
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
// Beginning vehicles:
|
||||
case VEHICLE_ARGENT_WARHORSE:
|
||||
case VEHICLE_ARGENT_BATTLEWORG:
|
||||
if( InstanceProgress < INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED && m_auiEncounter[0] == NOT_STARTED )
|
||||
if (InstanceProgress < INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED && m_auiEncounter[0] == NOT_STARTED)
|
||||
{
|
||||
creature->DespawnOrUnsummon();
|
||||
creature->SetRespawnTime(3);
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
{
|
||||
switch( go->GetEntry() )
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_MAIN_GATE:
|
||||
GO_MainGateGUID = go->GetGUID();
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_CHECK_PLAYERS, 0ms);
|
||||
|
||||
if( !in )
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
@@ -250,17 +250,17 @@ public:
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3;
|
||||
|
||||
if( dataHead1 == 'T' && dataHead2 == 'C' )
|
||||
if (dataHead1 == 'T' && dataHead2 == 'C')
|
||||
{
|
||||
m_auiEncounter[0] = data0;
|
||||
m_auiEncounter[1] = data1;
|
||||
m_auiEncounter[2] = data2;
|
||||
InstanceProgress = data3;
|
||||
if( InstanceProgress == INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED )
|
||||
if (InstanceProgress == INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED)
|
||||
InstanceProgress = INSTANCE_PROGRESS_INITIAL;
|
||||
|
||||
for( uint8 i = 0; i < MAX_ENCOUNTER; ++i )
|
||||
if( m_auiEncounter[i] == IN_PROGRESS )
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
}
|
||||
else
|
||||
@@ -306,10 +306,10 @@ public:
|
||||
|
||||
void InstanceCleanup()
|
||||
{
|
||||
if( CLEANED )
|
||||
if (CLEANED)
|
||||
return;
|
||||
|
||||
switch( InstanceProgress )
|
||||
switch (InstanceProgress)
|
||||
{
|
||||
case INSTANCE_PROGRESS_INITIAL:
|
||||
case INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST:
|
||||
@@ -328,15 +328,15 @@ public:
|
||||
{
|
||||
for( uint8 j = 0; j < 3; ++j )
|
||||
{
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[i][j]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[i][j]))
|
||||
c->DespawnOrUnsummon();
|
||||
NPC_GrandChampionMinionsGUID[i][j].Clear();
|
||||
}
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]))
|
||||
c->DespawnOrUnsummon();
|
||||
NPC_GrandChampionGUID[i].Clear();
|
||||
}
|
||||
if( Creature* c = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* c = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
c->DespawnOrUnsummon();
|
||||
c->SetHomePosition(748.309f, 619.488f, 411.172f, 4.71239f);
|
||||
@@ -349,7 +349,7 @@ public:
|
||||
break;
|
||||
case INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
announcer->DespawnOrUnsummon();
|
||||
announcer->SetHomePosition(735.81f, 661.92f, 412.39f, 4.714f);
|
||||
@@ -358,28 +358,28 @@ public:
|
||||
announcer->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]))
|
||||
{
|
||||
uint32 entry = c->GetEntry();
|
||||
c->DespawnOrUnsummon();
|
||||
switch( i )
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
if( Creature* pBoss = announcer->SummonCreature(entry, 736.695f, 650.02f, 412.4f, 3 * M_PI / 2) )
|
||||
if (Creature* pBoss = announcer->SummonCreature(entry, 736.695f, 650.02f, 412.4f, 3 * M_PI / 2))
|
||||
{
|
||||
NPC_GrandChampionGUID[0] = pBoss->GetGUID();
|
||||
pBoss->AI()->SetData(0, 2);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if( Creature* pBoss = announcer->SummonCreature(entry, 756.32f, 650.05f, 412.4f, 3 * M_PI / 2) )
|
||||
if (Creature* pBoss = announcer->SummonCreature(entry, 756.32f, 650.05f, 412.4f, 3 * M_PI / 2))
|
||||
{
|
||||
NPC_GrandChampionGUID[1] = pBoss->GetGUID();
|
||||
pBoss->AI()->SetData(1, 2);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if( Creature* pBoss = announcer->SummonCreature(entry, 746.5f, 650.65f, 411.7f, 3 * M_PI / 2) )
|
||||
if (Creature* pBoss = announcer->SummonCreature(entry, 746.5f, 650.65f, 411.7f, 3 * M_PI / 2))
|
||||
{
|
||||
NPC_GrandChampionGUID[2] = pBoss->GetGUID();
|
||||
pBoss->AI()->SetData(2, 2);
|
||||
@@ -397,17 +397,17 @@ public:
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
for( uint8 j = 0; j < 3; ++j )
|
||||
{
|
||||
if( Creature* c = instance->GetCreature(NPC_ArgentSoldierGUID[i][j]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_ArgentSoldierGUID[i][j]))
|
||||
c->DespawnOrUnsummon();
|
||||
NPC_ArgentSoldierGUID[i][j].Clear();
|
||||
}
|
||||
if( Creature* c = instance->GetCreature(NPC_ArgentChampionGUID) )
|
||||
if (Creature* c = instance->GetCreature(NPC_ArgentChampionGUID))
|
||||
{
|
||||
c->AI()->DoAction(-1); // paletress despawn memory
|
||||
c->DespawnOrUnsummon();
|
||||
}
|
||||
NPC_ArgentChampionGUID.Clear();
|
||||
if( Creature* c = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* c = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
c->DespawnOrUnsummon();
|
||||
c->SetHomePosition(743.14f, 628.77f, 411.2f, 4.71239f);
|
||||
@@ -422,16 +422,16 @@ public:
|
||||
case INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED:
|
||||
// revert to INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED
|
||||
{
|
||||
if( Creature* c = instance->GetCreature(NPC_BlackKnightVehicleGUID) )
|
||||
if (Creature* c = instance->GetCreature(NPC_BlackKnightVehicleGUID))
|
||||
c->DespawnOrUnsummon();
|
||||
NPC_BlackKnightVehicleGUID.Clear();
|
||||
if( Creature* c = instance->GetCreature(NPC_BlackKnightGUID) )
|
||||
if (Creature* c = instance->GetCreature(NPC_BlackKnightGUID))
|
||||
{
|
||||
c->AI()->DoAction(-1);
|
||||
c->DespawnOrUnsummon();
|
||||
}
|
||||
NPC_BlackKnightGUID.Clear();
|
||||
if( Creature* c = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* c = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
c->DespawnOrUnsummon();
|
||||
c->SetHomePosition(743.14f, 628.77f, 411.2f, 4.71239f);
|
||||
@@ -443,7 +443,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case INSTANCE_PROGRESS_FINISHED:
|
||||
if( Creature* c = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* c = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
c->DespawnOrUnsummon();
|
||||
break;
|
||||
}
|
||||
@@ -460,7 +460,7 @@ public:
|
||||
|
||||
uint32 GetData(uint32 uiData) const override
|
||||
{
|
||||
switch( uiData )
|
||||
switch (uiData)
|
||||
{
|
||||
case DATA_INSTANCE_PROGRESS:
|
||||
return InstanceProgress;
|
||||
@@ -473,7 +473,7 @@ public:
|
||||
|
||||
ObjectGuid GetGuidData(uint32 uiData) const override
|
||||
{
|
||||
switch( uiData )
|
||||
switch (uiData)
|
||||
{
|
||||
case DATA_ANNOUNCER:
|
||||
return NPC_AnnouncerGUID;
|
||||
@@ -486,21 +486,21 @@ public:
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData) override
|
||||
{
|
||||
switch( uiType )
|
||||
switch (uiType)
|
||||
{
|
||||
case DATA_ANNOUNCER_GOSSIP_SELECT:
|
||||
switch( InstanceProgress )
|
||||
switch (InstanceProgress)
|
||||
{
|
||||
case INSTANCE_PROGRESS_INITIAL:
|
||||
if (uiData == 0) // normal intro
|
||||
{
|
||||
shortver = false;
|
||||
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
if( GameObject* gate = instance->GetGameObject(GO_MainGateGUID) )
|
||||
if (GameObject* gate = instance->GetGameObject(GO_MainGateGUID))
|
||||
announcer->SetFacingToObject(gate);
|
||||
if( Creature* tirion = instance->GetCreature(NPC_TirionGUID) )
|
||||
if (Creature* tirion = instance->GetCreature(NPC_TirionGUID))
|
||||
tirion->AI()->Talk(TEXT_WELCOME);
|
||||
}
|
||||
events.RescheduleEvent(EVENT_YELL_WELCOME_2, 8s);
|
||||
@@ -521,7 +521,7 @@ public:
|
||||
|
||||
InstanceProgress = INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST;
|
||||
uiData = DONE; // save to db
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
announcer->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
|
||||
announcer->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
|
||||
@@ -530,10 +530,10 @@ public:
|
||||
}
|
||||
break;
|
||||
case INSTANCE_PROGRESS_CHAMPIONS_DEAD:
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
Counter = urand(0, 1);
|
||||
if( Counter )
|
||||
if (Counter)
|
||||
announcer->AI()->Talk(SAY_EADRIC_INTRO_ANNOUNCER);
|
||||
else
|
||||
announcer->AI()->Talk(SAY_JAEREN_PALETRESS_INTRO);
|
||||
@@ -542,7 +542,7 @@ public:
|
||||
events.RescheduleEvent(EVENT_START_ARGENT_CHALLENGE_INTRO, 0ms);
|
||||
break;
|
||||
case INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED:
|
||||
if( Creature* tirion = instance->GetCreature(NPC_TirionGUID) )
|
||||
if (Creature* tirion = instance->GetCreature(NPC_TirionGUID))
|
||||
tirion->AI()->Talk(TEXT_BK_INTRO);
|
||||
events.RescheduleEvent(EVENT_SUMMON_BLACK_KNIGHT, 3s);
|
||||
break;
|
||||
@@ -551,7 +551,7 @@ public:
|
||||
case DATA_GRAND_CHAMPION_REACHED_DEST:
|
||||
if (shortver)
|
||||
break;
|
||||
switch( uiData )
|
||||
switch (uiData)
|
||||
{
|
||||
case 0:
|
||||
events.ScheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_2, 0ms);
|
||||
@@ -560,7 +560,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SUMMON_GRAND_CHAMPION_3, 0ms);
|
||||
break;
|
||||
case 2:
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
InstanceProgress = INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST;
|
||||
uiData = DONE; // save to db
|
||||
@@ -572,10 +572,10 @@ public:
|
||||
}
|
||||
break;
|
||||
case DATA_MOUNT_DIED:
|
||||
switch( InstanceProgress )
|
||||
switch (InstanceProgress)
|
||||
{
|
||||
case INSTANCE_PROGRESS_GRAND_CHAMPIONS_REACHED_DEST: // fighting group 1/3
|
||||
if( ++Counter >= 3 )
|
||||
if (++Counter >= 3)
|
||||
{
|
||||
Counter = 0;
|
||||
InstanceProgress = INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1;
|
||||
@@ -584,7 +584,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_1: // fighting group 2/3
|
||||
if( ++Counter >= 3 )
|
||||
if (++Counter >= 3)
|
||||
{
|
||||
Counter = 0;
|
||||
InstanceProgress = INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2;
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_2: // fighting group 3/3
|
||||
if( ++Counter >= 3 )
|
||||
if (++Counter >= 3)
|
||||
{
|
||||
Counter = 0;
|
||||
InstanceProgress = INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3;
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case INSTANCE_PROGRESS_CHAMPION_GROUP_DIED_3: // fighting grand champions (on vehicles)
|
||||
if( ++Counter >= 3 )
|
||||
if (++Counter >= 3)
|
||||
{
|
||||
Counter = 0;
|
||||
InstanceProgress = INSTANCE_PROGRESS_CHAMPIONS_UNMOUNTED;
|
||||
@@ -618,7 +618,7 @@ public:
|
||||
--Counter;
|
||||
break;
|
||||
case DATA_GRAND_CHAMPION_DIED:
|
||||
if( ++Counter >= 3 )
|
||||
if (++Counter >= 3)
|
||||
{
|
||||
Counter = 0;
|
||||
VehicleList.clear();
|
||||
@@ -627,7 +627,7 @@ public:
|
||||
m_auiEncounter[0] = DONE;
|
||||
bool creditCasted = false;
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]))
|
||||
{
|
||||
c->GetMotionMaster()->MovePoint(9, 747.36f, 670.07f, 411.9f);
|
||||
if (!creditCasted)
|
||||
@@ -636,7 +636,7 @@ public:
|
||||
creditCasted = true;
|
||||
}
|
||||
}
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
|
||||
announcer->SummonGameObject(instance->IsHeroic() ? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000); // [LOOT]
|
||||
@@ -645,12 +645,12 @@ public:
|
||||
}
|
||||
|
||||
// bind players to instance
|
||||
if( instance->IsHeroic() )
|
||||
if (instance->IsHeroic())
|
||||
instance->ToInstanceMap()->PermBindAllPlayers();
|
||||
}
|
||||
break;
|
||||
case DATA_ARGENT_SOLDIER_DEFEATED:
|
||||
if( ++Counter >= 9 )
|
||||
if (++Counter >= 9)
|
||||
{
|
||||
Counter = 0;
|
||||
InstanceProgress = INSTANCE_PROGRESS_ARGENT_SOLDIERS_DIED;
|
||||
@@ -661,7 +661,7 @@ public:
|
||||
case BOSS_ARGENT_CHALLENGE:
|
||||
{
|
||||
m_auiEncounter[1] = uiData;
|
||||
if( uiData == DONE )
|
||||
if (uiData == DONE)
|
||||
{
|
||||
HandleGameObject(GO_EnterGateGUID, true);
|
||||
InstanceProgress = INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED;
|
||||
@@ -685,7 +685,7 @@ public:
|
||||
HandleGameObject(GO_EnterGateGUID, false);
|
||||
bAchievIveHadWorse = true;
|
||||
}
|
||||
else if( uiData == DONE )
|
||||
else if (uiData == DONE)
|
||||
{
|
||||
HandleGameObject(GO_EnterGateGUID, true);
|
||||
InstanceProgress = INSTANCE_PROGRESS_FINISHED;
|
||||
@@ -698,7 +698,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if( uiData == DONE )
|
||||
if (uiData == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
@@ -708,7 +708,7 @@ public:
|
||||
uint32 MINION_TO_SUMMON = 0;
|
||||
int32 TEXT_ID = 0;
|
||||
|
||||
switch( BossNumber )
|
||||
switch (BossNumber)
|
||||
{
|
||||
case 0:
|
||||
CHAMPION_TO_SUMMON = NPC_MOKRA;
|
||||
@@ -754,7 +754,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if( Creature* pBoss = instance->SummonCreature(CHAMPION_TO_SUMMON, SpawnPos) )
|
||||
if (Creature* pBoss = instance->SummonCreature(CHAMPION_TO_SUMMON, SpawnPos))
|
||||
{
|
||||
NPC_GrandChampionGUID[BossOrder] = pBoss->GetGUID();
|
||||
pBoss->ToCreature()->SetReactState(REACT_PASSIVE);
|
||||
@@ -764,7 +764,7 @@ public:
|
||||
pBoss->AI()->SetData(BossOrder, (shortver ? 1 : 0));
|
||||
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* pAdd = instance->SummonCreature(MINION_TO_SUMMON, SpawnPos) )
|
||||
if (Creature* pAdd = instance->SummonCreature(MINION_TO_SUMMON, SpawnPos))
|
||||
{
|
||||
NPC_GrandChampionMinionsGUID[BossOrder][i] = pAdd->GetGUID();
|
||||
pAdd->SetReactState(REACT_PASSIVE);
|
||||
@@ -776,7 +776,7 @@ public:
|
||||
}
|
||||
|
||||
if (!shortver)
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
announcer->AI()->Talk(TEXT_ID); /// @todo: Missing Argent Raid Spectator cheers.
|
||||
}
|
||||
@@ -785,7 +785,7 @@ public:
|
||||
void Update(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_NULL:
|
||||
break;
|
||||
@@ -842,15 +842,15 @@ public:
|
||||
}
|
||||
case EVENT_GRAND_GROUP_1_MOVE_MIDDLE:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
announcer->SetFacingTo(4.714f);
|
||||
if( Creature* tirion = instance->GetCreature(NPC_TirionGUID) )
|
||||
if (Creature* tirion = instance->GetCreature(NPC_TirionGUID))
|
||||
tirion->AI()->Talk(TEXT_BEGIN);
|
||||
HandleGameObject(GO_EnterGateGUID, false);
|
||||
}
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[1][i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[1][i]))
|
||||
{
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
|
||||
@@ -862,12 +862,12 @@ public:
|
||||
case EVENT_GRAND_GROUP_1_ATTACK:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[1][i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[1][i]))
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
c->SetImmuneToAll(false);
|
||||
if( Unit* target = c->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = c->SelectNearestTarget(200.0f))
|
||||
c->AI()->AttackStart(target);
|
||||
c->AI()->DoZoneInCombat();
|
||||
}
|
||||
@@ -877,7 +877,7 @@ public:
|
||||
case EVENT_GRAND_GROUP_2_MOVE_MIDDLE:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[0][i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[0][i]))
|
||||
{
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
|
||||
@@ -889,12 +889,12 @@ public:
|
||||
case EVENT_GRAND_GROUP_2_ATTACK:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[0][i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[0][i]))
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
c->SetImmuneToAll(false);
|
||||
if( Unit* target = c->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = c->SelectNearestTarget(200.0f))
|
||||
c->AI()->AttackStart(target);
|
||||
c->AI()->DoZoneInCombat();
|
||||
}
|
||||
@@ -903,7 +903,7 @@ public:
|
||||
case EVENT_GRAND_GROUP_3_MOVE_MIDDLE:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[2][i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[2][i]))
|
||||
{
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
c->GetMotionMaster()->MovePoint(0, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
|
||||
@@ -915,12 +915,12 @@ public:
|
||||
case EVENT_GRAND_GROUP_3_ATTACK:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[2][i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionMinionsGUID[2][i]))
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
c->SetImmuneToAll(false);
|
||||
if( Unit* target = c->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = c->SelectNearestTarget(200.0f))
|
||||
c->AI()->AttackStart(target);
|
||||
c->AI()->DoZoneInCombat();
|
||||
}
|
||||
@@ -929,7 +929,7 @@ public:
|
||||
case EVENT_GRAND_CHAMPIONS_MOVE_MIDDLE:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]))
|
||||
{
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
c->GetMotionMaster()->MovePoint(4, 748.309f + 3.0f * cos(angle), 619.448f + 3.0f * std::sin(angle), 411.3f);
|
||||
@@ -941,12 +941,12 @@ public:
|
||||
case EVENT_GRAND_CHAMPIONS_MOUNTS_ATTACK:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]))
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
c->SetImmuneToAll(false);
|
||||
if( Unit* target = c->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = c->SelectNearestTarget(200.0f))
|
||||
c->AI()->AttackStart(target);
|
||||
c->AI()->DoZoneInCombat();
|
||||
c->CastSpell(c, 67865, true); // SPELL_TRAMPLE_AURA
|
||||
@@ -956,10 +956,10 @@ public:
|
||||
case EVENT_GRAND_CHAMPIONS_MOVE_SIDE:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]))
|
||||
{
|
||||
c->AI()->DoAction(1);
|
||||
switch( i )
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
c->GetMotionMaster()->MovePoint(5, 736.695f, 650.02f, 412.4f);
|
||||
@@ -979,12 +979,12 @@ public:
|
||||
case EVENT_GRAND_CHAMPIONS_ATTACK:
|
||||
{
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_GrandChampionGUID[i]))
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
c->SetImmuneToAll(false);
|
||||
if( Unit* target = c->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = c->SelectNearestTarget(200.0f))
|
||||
c->AI()->AttackStart(target);
|
||||
c->AI()->DoZoneInCombat();
|
||||
c->AI()->DoAction(2);
|
||||
@@ -993,7 +993,7 @@ public:
|
||||
break;
|
||||
case EVENT_GRATZ_SLAIN_CHAMPIONS:
|
||||
{
|
||||
if( Creature* tirion = instance->GetCreature(NPC_TirionGUID) )
|
||||
if (Creature* tirion = instance->GetCreature(NPC_TirionGUID))
|
||||
tirion->AI()->Talk(TEXT_GRATZ_SLAIN_CHAMPIONS);
|
||||
|
||||
HandleGameObject(GO_EnterGateGUID, true);
|
||||
@@ -1001,15 +1001,15 @@ public:
|
||||
break;
|
||||
case EVENT_RESTORE_ANNOUNCER_GOSSIP:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
announcer->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
break;
|
||||
case EVENT_START_ARGENT_CHALLENGE_INTRO:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
if( GameObject* gate = instance->GetGameObject(GO_MainGateGUID) )
|
||||
if (GameObject* gate = instance->GetGameObject(GO_MainGateGUID))
|
||||
{
|
||||
announcer->SetFacingToObject(gate);
|
||||
HandleGameObject(GO_MainGateGUID, true, gate);
|
||||
@@ -1023,19 +1023,19 @@ public:
|
||||
float x = pos.GetPositionX();
|
||||
|
||||
pos.m_positionX = x - 2.0f + (i - 1) * 10.0f;
|
||||
if( Creature* pTrash = instance->SummonCreature(NPC_ARGENT_LIGHTWIELDER, pos) )
|
||||
if (Creature* pTrash = instance->SummonCreature(NPC_ARGENT_LIGHTWIELDER, pos))
|
||||
{
|
||||
pTrash->AI()->SetData(i, 0);
|
||||
NPC_ArgentSoldierGUID[i][0] = pTrash->GetGUID();
|
||||
}
|
||||
pos.m_positionX = x + (i - 1) * 10.0f;
|
||||
if( Creature* pTrash = instance->SummonCreature(NPC_ARGENT_MONK, pos) )
|
||||
if (Creature* pTrash = instance->SummonCreature(NPC_ARGENT_MONK, pos))
|
||||
{
|
||||
pTrash->AI()->SetData(i, 0);
|
||||
NPC_ArgentSoldierGUID[i][1] = pTrash->GetGUID();
|
||||
}
|
||||
pos.m_positionX = x + 2.0f + (i - 1) * 10.0f;
|
||||
if( Creature* pTrash = instance->SummonCreature(NPC_PRIESTESS, pos) )
|
||||
if (Creature* pTrash = instance->SummonCreature(NPC_PRIESTESS, pos))
|
||||
{
|
||||
pTrash->AI()->SetData(i, 0);
|
||||
NPC_ArgentSoldierGUID[i][2] = pTrash->GetGUID();
|
||||
@@ -1046,7 +1046,7 @@ public:
|
||||
break;
|
||||
case EVENT_SUMMON_ARGENT_CHALLENGE:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
announcer->GetMotionMaster()->MovePoint(0, 735.81f, 661.92f, 412.39f);
|
||||
if (Creature* boss = instance->SummonCreature(Counter ? NPC_EADRIC : NPC_PALETRESS, SpawnPosition))
|
||||
boss->GetMotionMaster()->MovePoint(0, 746.881f, 660.263f, 411.7f);
|
||||
@@ -1057,15 +1057,15 @@ public:
|
||||
break;
|
||||
case EVENT_ARGENT_CHALLENGE_SAY_1:
|
||||
{
|
||||
if( Creature* ac = instance->GetCreature(NPC_ArgentChampionGUID) )
|
||||
if (Creature* ac = instance->GetCreature(NPC_ArgentChampionGUID))
|
||||
ac->AI()->Talk(Counter ? SAY_EADRIC_INTRO : SAY_PALETRESS_INTRO_1);
|
||||
if( !Counter )
|
||||
if (!Counter)
|
||||
events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_SAY_2, 6s);
|
||||
}
|
||||
break;
|
||||
case EVENT_ARGENT_CHALLENGE_SAY_2:
|
||||
{
|
||||
if( Creature* ac = instance->GetCreature(NPC_ArgentChampionGUID) )
|
||||
if (Creature* ac = instance->GetCreature(NPC_ArgentChampionGUID))
|
||||
ac->AI()->Talk(SAY_PALETRESS_INTRO_2);
|
||||
}
|
||||
break;
|
||||
@@ -1074,14 +1074,14 @@ public:
|
||||
Counter = 0;
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
for( uint8 j = 0; j < 3; ++j )
|
||||
if( Creature* c = instance->GetCreature(NPC_ArgentSoldierGUID[i][j]) )
|
||||
if (Creature* c = instance->GetCreature(NPC_ArgentSoldierGUID[i][j]))
|
||||
{
|
||||
c->SetReactState(REACT_AGGRESSIVE);
|
||||
c->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
c->SetImmuneToAll(false);
|
||||
//c->AI()->DoZoneInCombat();
|
||||
}
|
||||
if( Creature* tirion = instance->GetCreature(NPC_TirionGUID) )
|
||||
if (Creature* tirion = instance->GetCreature(NPC_TirionGUID))
|
||||
tirion->AI()->Talk(TEXT_YOU_MAY_BEGIN);
|
||||
}
|
||||
break;
|
||||
@@ -1096,12 +1096,12 @@ public:
|
||||
break;
|
||||
case EVENT_ARGENT_CHALLENGE_ATTACK:
|
||||
{
|
||||
if( Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID) )
|
||||
if (Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID))
|
||||
{
|
||||
boss->SetReactState(REACT_AGGRESSIVE);
|
||||
boss->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
boss->SetImmuneToAll(false);
|
||||
if( Unit* target = boss->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = boss->SelectNearestTarget(200.0f))
|
||||
boss->AI()->AttackStart(target);
|
||||
boss->AI()->DoZoneInCombat();
|
||||
}
|
||||
@@ -1109,7 +1109,7 @@ public:
|
||||
break;
|
||||
case EVENT_ARGENT_CHALLENGE_RUN_MIDDLE:
|
||||
{
|
||||
if( Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID) )
|
||||
if (Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID))
|
||||
{
|
||||
boss->GetMotionMaster()->MovePoint(1, 747.13f, 628.037f, 411.2f);
|
||||
events.ScheduleEvent(EVENT_ARGENT_CHALLENGE_LEAVE_CHEST, 6s);
|
||||
@@ -1118,12 +1118,12 @@ public:
|
||||
break;
|
||||
case EVENT_ARGENT_CHALLENGE_LEAVE_CHEST:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if( Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
if (Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID))
|
||||
{
|
||||
announcer->GetMotionMaster()->MovePoint(0, 743.14f, 628.77f, 411.2f);
|
||||
uint32 chest = 0;
|
||||
if( instance->IsHeroic() )
|
||||
if (instance->IsHeroic())
|
||||
chest = (boss->GetEntry() == NPC_EADRIC || boss->GetEntry() == NPC_EADRIC_H) ? GO_EADRIC_LOOT_H : GO_PALETRESS_LOOT_H;
|
||||
else
|
||||
chest = (boss->GetEntry() == NPC_EADRIC || boss->GetEntry() == NPC_EADRIC_H) ? GO_EADRIC_LOOT : GO_PALETRESS_LOOT;
|
||||
@@ -1136,7 +1136,7 @@ public:
|
||||
break;
|
||||
case EVENT_ARGENT_CHALLENGE_DISAPPEAR:
|
||||
{
|
||||
if( Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID) )
|
||||
if (Creature* boss = instance->GetCreature(NPC_ArgentChampionGUID))
|
||||
{
|
||||
boss->GetMotionMaster()->MovePoint(0, SpawnPosition);
|
||||
boss->DespawnOrUnsummon(3000);
|
||||
@@ -1145,18 +1145,18 @@ public:
|
||||
break;
|
||||
case EVENT_SUMMON_BLACK_KNIGHT:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if( Creature* bk_vehicle = announcer->SummonCreature(VEHICLE_BLACK_KNIGHT, 769.834f, 651.915f, 447.035f, 0.0f) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
if (Creature* bk_vehicle = announcer->SummonCreature(VEHICLE_BLACK_KNIGHT, 769.834f, 651.915f, 447.035f, 0.0f))
|
||||
{
|
||||
NPC_BlackKnightVehicleGUID = bk_vehicle->GetGUID();
|
||||
bk_vehicle->SetReactState(REACT_PASSIVE);
|
||||
bk_vehicle->SetFacingTo(M_PI);
|
||||
if( Vehicle* v = bk_vehicle->GetVehicleKit() )
|
||||
if( Unit* bk = v->GetPassenger(0) )
|
||||
if (Vehicle* v = bk_vehicle->GetVehicleKit())
|
||||
if (Unit* bk = v->GetPassenger(0))
|
||||
{
|
||||
NPC_BlackKnightGUID = bk->GetGUID();
|
||||
bk->SendMovementFlagUpdate(); // put him on vehicle visually
|
||||
if( bk->IsCreature() )
|
||||
if (bk->IsCreature())
|
||||
bk->ToCreature()->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
@@ -1167,7 +1167,7 @@ public:
|
||||
break;
|
||||
case EVENT_START_BLACK_KNIGHT_SCENE:
|
||||
{
|
||||
if( Creature* bk = instance->GetCreature(NPC_BlackKnightGUID) )
|
||||
if (Creature* bk = instance->GetCreature(NPC_BlackKnightGUID))
|
||||
{
|
||||
Position exitPos = { 751.003357f, 638.145508f, 411.570129f, M_PI };
|
||||
bk->ExitVehicle(/*&exitPos*/);
|
||||
@@ -1179,9 +1179,9 @@ public:
|
||||
break;
|
||||
case EVENT_BLACK_KNIGHT_CAST_ANNOUNCER:
|
||||
{
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
{
|
||||
if( Creature* bk = instance->GetCreature(NPC_BlackKnightGUID) )
|
||||
if (Creature* bk = instance->GetCreature(NPC_BlackKnightGUID))
|
||||
{
|
||||
bk->SetPosition(745.016f, 631.506f, 411.575f, bk->GetAngle(announcer));
|
||||
bk->SetHomePosition(*bk);
|
||||
@@ -1189,7 +1189,7 @@ public:
|
||||
announcer->SetFacingToObject(bk);
|
||||
announcer->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
bk->AddAura(68306, announcer); // spell has attribute player only
|
||||
if( Creature* tirion = instance->GetCreature(NPC_TirionGUID) )
|
||||
if (Creature* tirion = instance->GetCreature(NPC_TirionGUID))
|
||||
tirion->AI()->Talk(TEXT_BK_MEANING);
|
||||
}
|
||||
}
|
||||
@@ -1198,7 +1198,7 @@ public:
|
||||
break;
|
||||
case EVENT_BLACK_KNIGHT_KILL_ANNOUNCER:
|
||||
{
|
||||
if( Creature* bk_vehicle = instance->GetCreature(NPC_BlackKnightVehicleGUID) )
|
||||
if (Creature* bk_vehicle = instance->GetCreature(NPC_BlackKnightVehicleGUID))
|
||||
bk_vehicle->AI()->DoAction(1);
|
||||
|
||||
events.ScheduleEvent(EVENT_BLACK_KNIGHT_MOVE_FORWARD, 4s);
|
||||
@@ -1206,13 +1206,13 @@ public:
|
||||
break;
|
||||
case EVENT_BLACK_KNIGHT_MOVE_FORWARD:
|
||||
{
|
||||
if( Creature* bk = instance->GetCreature(NPC_BlackKnightGUID) )
|
||||
if (Creature* bk = instance->GetCreature(NPC_BlackKnightGUID))
|
||||
{
|
||||
bk->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
|
||||
bk->GetMotionMaster()->MovePoint(0, 746.81f, 623.15f, 411.42f);
|
||||
bk->AI()->Talk(SAY_BK_INTRO_2);
|
||||
}
|
||||
if( Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID) )
|
||||
if (Creature* announcer = instance->GetCreature(NPC_AnnouncerGUID))
|
||||
if (announcer->IsAlive())
|
||||
Unit::Kill(announcer, announcer);
|
||||
events.ScheduleEvent(EVENT_BLACK_KNIGHT_SAY_TASK, 14s);
|
||||
@@ -1220,7 +1220,7 @@ public:
|
||||
break;
|
||||
case EVENT_BLACK_KNIGHT_SAY_TASK:
|
||||
{
|
||||
if( Creature* bk = instance->GetCreature(NPC_BlackKnightGUID) )
|
||||
if (Creature* bk = instance->GetCreature(NPC_BlackKnightGUID))
|
||||
{
|
||||
bk->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
bk->AI()->Talk(SAY_BK_INTRO_3);
|
||||
@@ -1230,11 +1230,11 @@ public:
|
||||
break;
|
||||
case EVENT_BLACK_KNIGHT_ATTACK:
|
||||
{
|
||||
if( Creature* bk = instance->GetCreature(NPC_BlackKnightGUID) )
|
||||
if (Creature* bk = instance->GetCreature(NPC_BlackKnightGUID))
|
||||
{
|
||||
bk->SetReactState(REACT_AGGRESSIVE);
|
||||
bk->ReplaceAllUnitFlags(UNIT_FLAG_NONE);
|
||||
if( Unit* target = bk->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = bk->SelectNearestTarget(200.0f))
|
||||
bk->AI()->AttackStart(target);
|
||||
bk->AI()->DoZoneInCombat();
|
||||
bk->AI()->DoAction(1);
|
||||
@@ -1246,7 +1246,7 @@ public:
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) override
|
||||
{
|
||||
switch(criteria_id)
|
||||
switch (criteria_id)
|
||||
{
|
||||
case 11789: // I've Had Worse criteria id
|
||||
return bAchievIveHadWorse;
|
||||
|
||||
@@ -88,14 +88,14 @@ public:
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
if(!creature->HasNpcFlag(UNIT_NPC_FLAG_GOSSIP))
|
||||
if (!creature->HasNpcFlag(UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if(!pInstance)
|
||||
if (!pInstance)
|
||||
return true;
|
||||
|
||||
if(uiAction == GOSSIP_ACTION_INFO_DEF + 1 || uiAction == GOSSIP_ACTION_INFO_DEF + 2 || uiAction == GOSSIP_ACTION_INFO_DEF + 3 || uiAction == GOSSIP_ACTION_INFO_DEF + 4)
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1 || uiAction == GOSSIP_ACTION_INFO_DEF + 2 || uiAction == GOSSIP_ACTION_INFO_DEF + 3 || uiAction == GOSSIP_ACTION_INFO_DEF + 4)
|
||||
{
|
||||
pInstance->SetData(DATA_ANNOUNCER_GOSSIP_SELECT, (uiAction == GOSSIP_ACTION_INFO_DEF + 2 ? 1 : 0));
|
||||
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
@@ -117,9 +117,9 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
InstanceScript* pInstance = me->GetInstanceScript();
|
||||
if( !pInstance )
|
||||
if (!pInstance)
|
||||
return;
|
||||
if( pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_ALLIANCE )
|
||||
if (pInstance->GetData(DATA_TEAMID_IN_INSTANCE) == TEAM_ALLIANCE )
|
||||
me->UpdateEntry(NPC_ARELAS);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); // removed during black knight scene
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
if (type != EFFECT_MOTION_TYPE)
|
||||
return;
|
||||
InstanceScript* pInstance = me->GetInstanceScript();
|
||||
if( !pInstance )
|
||||
if (!pInstance)
|
||||
return;
|
||||
if (pInstance->GetData(DATA_INSTANCE_PROGRESS) < INSTANCE_PROGRESS_ARGENT_CHALLENGE_DIED)
|
||||
return;
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
{
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
float dist = rand_norm() * 40.0f;
|
||||
if( Creature* c = me->SummonCreature(NPC_SCARAB, AnubLocs[0].GetPositionX() + cos(angle) * dist, AnubLocs[0].GetPositionY() + std::sin(angle) * dist, AnubLocs[0].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000) )
|
||||
if (Creature* c = me->SummonCreature(NPC_SCARAB, AnubLocs[0].GetPositionX() + cos(angle) * dist, AnubLocs[0].GetPositionY() + std::sin(angle) * dist, AnubLocs[0].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000))
|
||||
{
|
||||
c->SetFaction(FACTION_PREY);
|
||||
c->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
switch( param )
|
||||
switch (param)
|
||||
{
|
||||
case -1:
|
||||
summons.DespawnAll();
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
events.RescheduleEvent(EVENT_SPELL_PENETRATING_COLD, 15s, 20s);
|
||||
events.RescheduleEvent(EVENT_SUMMON_NERUBIAN, 5s, 8s);
|
||||
events.RescheduleEvent(EVENT_SUBMERGE, 80s);
|
||||
if( !IsHeroic() )
|
||||
if (!IsHeroic())
|
||||
events.RescheduleEvent(EVENT_RESPAWN_SPHERE, 4s);
|
||||
|
||||
for (ObjectGuid const& guid : summons)
|
||||
@@ -224,15 +224,15 @@ public:
|
||||
}
|
||||
summons.clear();
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
if( Creature* c = me->SummonCreature(NPC_BURROW, AnubLocs[i + 1]) )
|
||||
if (Creature* c = me->SummonCreature(NPC_BURROW, AnubLocs[i + 1]))
|
||||
BurrowGUID[i] = c->GetGUID();
|
||||
for( uint8 i = 0; i < 6; ++i )
|
||||
if( Creature* c = me->SummonCreature(NPC_FROST_SPHERE, AnubLocs[i + 5]) )
|
||||
if (Creature* c = me->SummonCreature(NPC_FROST_SPHERE, AnubLocs[i + 5]))
|
||||
SphereGUID[i] = c->GetGUID();
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -243,21 +243,21 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if( !bPhase3 && HealthBelowPct(30) && !me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) && !me->HasAura(SPELL_SUBMERGE) && !me->HasAura(SPELL_EMERGE) )
|
||||
if (!bPhase3 && HealthBelowPct(30) && !me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) && !me->HasAura(SPELL_SUBMERGE) && !me->HasAura(SPELL_EMERGE))
|
||||
{
|
||||
bPhase3 = true;
|
||||
events.CancelEvent(EVENT_SUBMERGE);
|
||||
events.CancelEvent(EVENT_EMERGE);
|
||||
events.CancelEvent(EVENT_EMERGE_2);
|
||||
if( !IsHeroic() )
|
||||
if (!IsHeroic())
|
||||
events.CancelEvent(EVENT_SUMMON_NERUBIAN);
|
||||
me->CastSpell((Unit*)nullptr, SPELL_LEECHING_SWARM, false);
|
||||
Talk(EMOTE_LEECHING_SWARM);
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -280,10 +280,10 @@ public:
|
||||
uint8 i = StartAt;
|
||||
do
|
||||
{
|
||||
if( Creature* c = ObjectAccessor::GetCreature(*me, SphereGUID[i]) )
|
||||
if( !c->HasAura(SPELL_FROST_SPHERE) )
|
||||
if (Creature* c = ObjectAccessor::GetCreature(*me, SphereGUID[i]))
|
||||
if (!c->HasAura(SPELL_FROST_SPHERE))
|
||||
{
|
||||
if( Creature* c = me->SummonCreature(NPC_FROST_SPHERE, AnubLocs[i + 5]) )
|
||||
if (Creature* c = me->SummonCreature(NPC_FROST_SPHERE, AnubLocs[i + 5]))
|
||||
SphereGUID[i] = c->GetGUID();
|
||||
break;
|
||||
}
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_FREEZING_SLASH:
|
||||
{
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_FREEZING_SLASH, false);
|
||||
events.Repeat(15s, 20s);
|
||||
}
|
||||
@@ -332,7 +332,7 @@ public:
|
||||
case EVENT_SUMMON_SCARAB:
|
||||
{
|
||||
uint8 i = urand(0, 3);
|
||||
if( Creature* c = ObjectAccessor::GetCreature(*me, BurrowGUID[i]) )
|
||||
if (Creature* c = ObjectAccessor::GetCreature(*me, BurrowGUID[i]))
|
||||
me->CastSpell(c, SPELL_SUMMON_SCARAB, true);
|
||||
events.Repeat(4s);
|
||||
}
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if( !summon )
|
||||
if (!summon)
|
||||
return;
|
||||
|
||||
summons.Summon(summon);
|
||||
@@ -379,13 +379,13 @@ public:
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
Talk(SAY_DEATH);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_ANUBARAK, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if( who->IsPlayer() )
|
||||
if (who->IsPlayer())
|
||||
Talk(SAY_KILL_PLAYER);
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ public:
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_FAILED, 1);
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ public:
|
||||
if (!bIntro)
|
||||
{
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if( !me->IsInCombat() )
|
||||
if (!me->IsInCombat())
|
||||
Talk(SAY_INTRO);
|
||||
bIntro = true;
|
||||
}
|
||||
@@ -442,7 +442,7 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if( param == 1 )
|
||||
if (param == 1)
|
||||
despawnTimer = 2000;
|
||||
}
|
||||
|
||||
@@ -453,11 +453,11 @@ public:
|
||||
determinationTimer = urand(10000, 50000);
|
||||
despawnTimer = 0;
|
||||
if (me->GetFaction() == FACTION_MONSTER_2) // hostile - it's phase 2
|
||||
if( Unit* target = me->SelectNearestTarget(250.0f) )
|
||||
if (Unit* target = me->SelectNearestTarget(250.0f))
|
||||
{
|
||||
AttackStart(target);
|
||||
DoZoneInCombat();
|
||||
if( Unit* t = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true) )
|
||||
if (Unit* t = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true))
|
||||
{
|
||||
me->AddThreat(t, 20000.0f);
|
||||
AttackStart(t);
|
||||
@@ -472,9 +472,9 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( despawnTimer )
|
||||
if (despawnTimer)
|
||||
{
|
||||
if( despawnTimer <= (int32)diff )
|
||||
if (despawnTimer <= (int32)diff )
|
||||
{
|
||||
despawnTimer = 0;
|
||||
me->DisappearAndDie();
|
||||
@@ -485,10 +485,10 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( determinationTimer <= (int32)diff )
|
||||
if (determinationTimer <= (int32)diff )
|
||||
{
|
||||
me->CastSpell(me, SPELL_DETERMINATION, false);
|
||||
determinationTimer = urand(20000, 60000);
|
||||
@@ -556,10 +556,10 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if( me->GetHealth() <= damage )
|
||||
if (me->GetHealth() <= damage )
|
||||
{
|
||||
damage = 0;
|
||||
if( !me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE) )
|
||||
if (!me->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE))
|
||||
{
|
||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if( spell->Id == SPELL_SPIKE_FAIL )
|
||||
if (spell->Id == SPELL_SPIKE_FAIL)
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->DespawnOrUnsummon(1500);
|
||||
@@ -580,9 +580,9 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( permafrostTimer )
|
||||
if (permafrostTimer)
|
||||
{
|
||||
if( permafrostTimer <= diff )
|
||||
if (permafrostTimer <= diff)
|
||||
{
|
||||
permafrostTimer = 0;
|
||||
me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE);
|
||||
@@ -631,9 +631,9 @@ public:
|
||||
me->CastSpell(me, SPELL_SPIDER_FRENZY, true);
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SUBMERGE, 30s);
|
||||
if( IsHeroic() )
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_SPELL_SHADOW_STRIKE, 30s, 45s);
|
||||
if( Unit* target = me->SelectNearestTarget(250.0f) )
|
||||
if (Unit* target = me->SelectNearestTarget(250.0f))
|
||||
{
|
||||
AttackStart(target);
|
||||
DoZoneInCombat();
|
||||
@@ -642,13 +642,13 @@ public:
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if( !target || !spell )
|
||||
if (!target || !spell)
|
||||
return;
|
||||
|
||||
if( spell->Id == SPELL_SHADOW_STRIKE )
|
||||
if (spell->Id == SPELL_SHADOW_STRIKE)
|
||||
{
|
||||
float o = target->GetOrientation();
|
||||
if( o >= M_PI )
|
||||
if (o >= M_PI)
|
||||
o -= M_PI;
|
||||
else
|
||||
o += M_PI;
|
||||
@@ -661,25 +661,25 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_SHADOW_STRIKE:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true))
|
||||
me->CastSpell(target, SPELL_SHADOW_STRIKE, false);
|
||||
events.Repeat(30s, 45s);
|
||||
break;
|
||||
case EVENT_SUBMERGE:
|
||||
if( HealthBelowPct(80) && !me->HasAura(RAID_MODE(66193, 67855, 67856, 67857)) ) // not having permafrost - allow submerge
|
||||
if (HealthBelowPct(80) && !me->HasAura(RAID_MODE(66193, 67855, 67856, 67857))) // not having permafrost - allow submerge
|
||||
{
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -743,9 +743,9 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if( param == -1 )
|
||||
if (param == -1)
|
||||
{
|
||||
if( Unit* target = ObjectAccessor::GetPlayer(*me, TargetGUID) )
|
||||
if (Unit* target = ObjectAccessor::GetPlayer(*me, TargetGUID))
|
||||
target->RemoveAura(SPELL_MARK);
|
||||
TargetGUID.Clear();
|
||||
me->RemoveAllAuras();
|
||||
@@ -758,7 +758,7 @@ public:
|
||||
void SelectNewTarget(bool next)
|
||||
{
|
||||
if (TargetGUID)
|
||||
if( Unit* target = ObjectAccessor::GetPlayer(*me, TargetGUID) )
|
||||
if (Unit* target = ObjectAccessor::GetPlayer(*me, TargetGUID))
|
||||
target->RemoveAura(SPELL_MARK);
|
||||
TargetGUID.Clear();
|
||||
if (!next)
|
||||
@@ -768,7 +768,7 @@ public:
|
||||
}
|
||||
DoZoneInCombat();
|
||||
DoResetThreatList();
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true))
|
||||
{
|
||||
if (!next)
|
||||
{
|
||||
@@ -791,10 +791,10 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( TargetGUID )
|
||||
if (TargetGUID)
|
||||
{
|
||||
Unit* target = ObjectAccessor::GetPlayer(*me, TargetGUID);
|
||||
if( !target || !target->HasAura(SPELL_MARK) || !me->IsValidAttackTarget(target) || me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE || !me->HasUnitState(UNIT_STATE_CHASE_MOVE) )
|
||||
if (!target || !target->HasAura(SPELL_MARK) || !me->IsValidAttackTarget(target) || me->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE || !me->HasUnitState(UNIT_STATE_CHASE_MOVE))
|
||||
{
|
||||
SelectNewTarget(true);
|
||||
return;
|
||||
@@ -803,7 +803,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -840,13 +840,13 @@ public:
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if( Unit* target = GetTarget() )
|
||||
if (Unit* target = GetTarget())
|
||||
{
|
||||
if( Creature* c = target->FindNearestCreature(NPC_FROST_SPHERE, 8.0f, true) )
|
||||
if (Creature* c = target->FindNearestCreature(NPC_FROST_SPHERE, 8.0f, true))
|
||||
{
|
||||
target->UpdatePosition(*c, false);
|
||||
target->CastCustomSpell(SPELL_SPIKE_FAIL, SPELLVALUE_MAX_TARGETS, 1);
|
||||
if( target->IsCreature() )
|
||||
if (target->IsCreature())
|
||||
target->ToCreature()->AI()->DoAction(-1);
|
||||
Remove();
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -116,7 +116,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED);
|
||||
|
||||
std::list<Creature*> creatures;
|
||||
@@ -135,34 +135,34 @@ public:
|
||||
events.RescheduleEvent(EVENT_SPELL_INCINERATE_FLESH, 24s, 26s);
|
||||
events.RescheduleEvent(EVENT_SPELL_NETHER_POWER, 25s, 45s);
|
||||
events.RescheduleEvent(EVENT_SPELL_LEGION_FLAME, 30s);
|
||||
//if( GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC )
|
||||
//if (GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC )
|
||||
// events.RescheduleEvent(EVENT_SPELL_TOUCH_OF_JARAXXUS, 10s, 15s);
|
||||
events.RescheduleEvent(EVENT_SUMMON_NETHER_PORTAL, 20s); // it schedules EVENT_SUMMON_VOLCANO
|
||||
|
||||
me->RemoveAura(SPELL_CHAINS);
|
||||
Talk(SAY_AGGRO);
|
||||
DoZoneInCombat();
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
{
|
||||
switch( spell->Id )
|
||||
switch (spell->Id)
|
||||
{
|
||||
case 66228:
|
||||
case 67106:
|
||||
case 67107:
|
||||
case 67108:
|
||||
if( Aura* a = me->GetAura(spell->Id) )
|
||||
if (Aura* a = me->GetAura(spell->Id))
|
||||
a->SetStackAmount(spell->StackAmount);
|
||||
break;
|
||||
case 30449:
|
||||
{
|
||||
if( !caster )
|
||||
if (!caster)
|
||||
return;
|
||||
uint32 id = 0;
|
||||
switch( me->GetMap()->GetDifficulty() )
|
||||
switch (me->GetMap()->GetDifficulty())
|
||||
{
|
||||
case 0:
|
||||
id = 66228;
|
||||
@@ -177,9 +177,9 @@ public:
|
||||
id = 67108;
|
||||
break;
|
||||
}
|
||||
if( Aura* a = me->GetAura(id) )
|
||||
if (Aura* a = me->GetAura(id))
|
||||
{
|
||||
if( a->GetStackAmount() > 1 )
|
||||
if (a->GetStackAmount() > 1 )
|
||||
a->ModStackAmount(-1);
|
||||
else
|
||||
a->Remove();
|
||||
@@ -194,30 +194,30 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_FEL_FIREBALL:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_FEL_FIREBALL, false);
|
||||
events.Repeat(10s, 15s);
|
||||
break;
|
||||
case EVENT_SPELL_FEL_LIGHTNING:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true))
|
||||
me->CastSpell(target, SPELL_FEL_LIGHTNING, false);
|
||||
events.Repeat(10s, 15s);
|
||||
break;
|
||||
case EVENT_SPELL_INCINERATE_FLESH:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true))
|
||||
{
|
||||
Talk(EMOTE_INCINERATE, target);
|
||||
Talk(SAY_INCINERATE);
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
events.Repeat(25s, 45s);
|
||||
break;
|
||||
case EVENT_SPELL_LEGION_FLAME:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, true))
|
||||
{
|
||||
Talk(EMOTE_LEGION_FLAME, target);
|
||||
me->CastSpell(target, SPELL_LEGION_FLAME, false);
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
events.Repeat(30s);
|
||||
break;
|
||||
case EVENT_SPELL_TOUCH_OF_JARAXXUS:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
me->CastSpell(target, SPELL_TOUCH_OF_JARAXXUS, false);
|
||||
events.Repeat(10s, 15s);
|
||||
break;
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
{
|
||||
summons.DespawnAll();
|
||||
Talk(SAY_DEATH);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_JARAXXUS, DONE);
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_FAILED, 1);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if( Unit* target = me->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = me->SelectNearestTarget(200.0f))
|
||||
{
|
||||
AttackStart(target);
|
||||
DoZoneInCombat();
|
||||
@@ -322,20 +322,20 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_FEL_STEAK:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 44.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 44.0f, true))
|
||||
{
|
||||
DoResetThreatList();
|
||||
me->AddThreat(target, 50000.0f);
|
||||
@@ -381,7 +381,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if( Unit* target = me->SelectNearestTarget(200.0f) )
|
||||
if (Unit* target = me->SelectNearestTarget(200.0f))
|
||||
{
|
||||
AttackStart(target);
|
||||
DoZoneInCombat();
|
||||
@@ -389,7 +389,7 @@ public:
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_SHIVAN_SLASH, 10s, 20s);
|
||||
events.RescheduleEvent(EVENT_SPELL_SPINNING_PAIN_SPIKE, 22s, 30s);
|
||||
if( IsHeroic() )
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_SPELL_MISTRESS_KISS, 10s, 15s);
|
||||
}
|
||||
|
||||
@@ -401,25 +401,25 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_SHIVAN_SLASH:
|
||||
if( me->GetVictim() )
|
||||
if (me->GetVictim())
|
||||
me->CastSpell(me->GetVictim(), SPELL_SHIVAN_SLASH, false);
|
||||
events.Repeat(15s, 25s);
|
||||
break;
|
||||
case EVENT_SPELL_SPINNING_PAIN_SPIKE:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 140.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 140.0f, true))
|
||||
me->CastSpell(target, SPELL_SPINNING_PAIN_SPIKE, false);
|
||||
events.Repeat(25s, 30s);
|
||||
break;
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Unit* target = GetTarget())
|
||||
if( target->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (target->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
caster->CastSpell(target, 66359, true);
|
||||
SetDuration(0);
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if( who->GetGUID() != TargetGUID )
|
||||
if (who->GetGUID() != TargetGUID )
|
||||
return;
|
||||
ScriptedAI::AttackStart(who);
|
||||
}
|
||||
@@ -122,26 +122,26 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !TargetGUID && !me->GetVehicle() )
|
||||
if (!TargetGUID && !me->GetVehicle())
|
||||
return;
|
||||
|
||||
Unit* t = ObjectAccessor::GetUnit(*me, TargetGUID);
|
||||
if( !t && !(t = me->GetVehicleBase()) )
|
||||
if (!t && !(t = me->GetVehicleBase()))
|
||||
return;
|
||||
|
||||
if( t->isDead() )
|
||||
if (t->isDead())
|
||||
{
|
||||
t->RemoveAura(SPELL_CHANGE_VEHICLE);
|
||||
me->RemoveAllAuras();
|
||||
me->GetThreatMgr().ClearAllThreat();
|
||||
me->CombatStop(true);
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
if( pInstance )
|
||||
if( Creature* gormok = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(TYPE_GORMOK)) )
|
||||
if( gormok->IsAlive() )
|
||||
if( Vehicle* vk = gormok->GetVehicleKit() )
|
||||
if (pInstance)
|
||||
if (Creature* gormok = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(TYPE_GORMOK)))
|
||||
if (gormok->IsAlive())
|
||||
if (Vehicle* vk = gormok->GetVehicleKit())
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
if( !vk->GetPassenger(i) )
|
||||
if (!vk->GetPassenger(i))
|
||||
{
|
||||
me->EnterVehicleUnattackable(gormok, i);
|
||||
Reset();
|
||||
@@ -153,26 +153,26 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_SNOBOLLED:
|
||||
if( t->IsPlayer() )
|
||||
if (t->IsPlayer())
|
||||
me->CastSpell((Unit*)nullptr, SPELL_SNOBOLLED, true);
|
||||
|
||||
break;
|
||||
case EVENT_SPELL_BATTER:
|
||||
if( t->IsPlayer() )
|
||||
if (t->IsPlayer())
|
||||
me->CastSpell(t, SPELL_BATTER);
|
||||
events.Repeat(6s, 8s);
|
||||
break;
|
||||
case EVENT_SPELL_FIRE_BOMB:
|
||||
{
|
||||
if( !t->IsPlayer() && pInstance )
|
||||
if (!t->IsPlayer() && pInstance )
|
||||
{
|
||||
GuidVector validPlayers;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
@@ -180,14 +180,14 @@ public:
|
||||
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
{
|
||||
if( Player* p = itr->GetSource() )
|
||||
if( p->IsAlive() && p->GetGUID() != TargetGUID && (!gormok || !p->IsWithinMeleeRange(gormok)) )
|
||||
if (Player* p = itr->GetSource())
|
||||
if (p->IsAlive() && p->GetGUID() != TargetGUID && (!gormok || !p->IsWithinMeleeRange(gormok)))
|
||||
validPlayers.push_back(p->GetGUID());
|
||||
}
|
||||
|
||||
if( !validPlayers.empty() )
|
||||
if( Player* p = ObjectAccessor::GetPlayer(*me, validPlayers.at(urand(0, validPlayers.size() - 1))) )
|
||||
if( Creature* trigger = me->SummonCreature(NPC_FIRE_BOMB, *p, TEMPSUMMON_TIMED_DESPAWN, 60000) )
|
||||
if (!validPlayers.empty())
|
||||
if (Player* p = ObjectAccessor::GetPlayer(*me, validPlayers.at(urand(0, validPlayers.size() - 1))))
|
||||
if (Creature* trigger = me->SummonCreature(NPC_FIRE_BOMB, *p, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
{
|
||||
me->CastSpell(trigger, SPELL_FIRE_BOMB_AURA, true); // periodic damage aura, speed 14.0f
|
||||
me->CastSpell(trigger, SPELL_FIRE_BOMB); // visual + initial damage 4k
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case EVENT_SPELL_HEAD_CRACK:
|
||||
if( t->IsPlayer() )
|
||||
if (t->IsPlayer())
|
||||
me->CastSpell(t, SPELL_HEAD_CRACK);
|
||||
events.Repeat(30s, 35s);
|
||||
break;
|
||||
@@ -209,17 +209,17 @@ public:
|
||||
|
||||
void JustDied(Unit* /*pKiller*/) override
|
||||
{
|
||||
if( Unit* t = ObjectAccessor::GetUnit(*me, TargetGUID))
|
||||
if (Unit* t = ObjectAccessor::GetUnit(*me, TargetGUID))
|
||||
{
|
||||
t->RemoveAura(SPELL_CHANGE_VEHICLE);
|
||||
if( t->IsAlive() )
|
||||
if (t->IsAlive())
|
||||
t->RemoveAurasDueToSpell(SPELL_SNOBOLLED);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
if( param == 1 && !TargetGUID )
|
||||
if (param == 1 && !TargetGUID)
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
};
|
||||
@@ -265,9 +265,9 @@ public:
|
||||
events.RescheduleEvent(EVENT_PICK_SNOBOLD_TARGET, 16s, 24s);
|
||||
|
||||
// refresh snobold position
|
||||
if( Vehicle* vk = me->GetVehicleKit() )
|
||||
if (Vehicle* vk = me->GetVehicleKit())
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
if( Unit* snobold = vk->GetPassenger(i) )
|
||||
if (Unit* snobold = vk->GetPassenger(i))
|
||||
snobold->SendMovementFlagUpdate();
|
||||
}
|
||||
|
||||
@@ -280,22 +280,22 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_IMPALE:
|
||||
if( !me->HasUnitFlag(UNIT_FLAG_DISARMED) )
|
||||
if (!me->HasUnitFlag(UNIT_FLAG_DISARMED))
|
||||
{
|
||||
if( Unit* victim = me->GetVictim() )
|
||||
if (Unit* victim = me->GetVictim())
|
||||
me->CastSpell(victim, SPELL_IMPALE, false);
|
||||
events.Repeat(9s, 10s);
|
||||
}
|
||||
@@ -307,21 +307,21 @@ public:
|
||||
events.Repeat(20s, 25s);
|
||||
break;
|
||||
case EVENT_PICK_SNOBOLD_TARGET:
|
||||
if( Vehicle* vk = me->GetVehicleKit() )
|
||||
if (Vehicle* vk = me->GetVehicleKit())
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
if( Unit* snobold = vk->GetPassenger(i) )
|
||||
if (Unit* snobold = vk->GetPassenger(i))
|
||||
{
|
||||
GuidVector validPlayers;
|
||||
Map::PlayerList const& pl = me->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
{
|
||||
if( Player* p = itr->GetSource() )
|
||||
if( p->IsAlive() && !p->GetVehicleKit() && !p->IsMounted() && !p->GetVehicle() && !p->IsGameMaster() )
|
||||
if (Player* p = itr->GetSource())
|
||||
if (p->IsAlive() && !p->GetVehicleKit() && !p->IsMounted() && !p->GetVehicle() && !p->IsGameMaster())
|
||||
validPlayers.push_back(p->GetGUID());
|
||||
}
|
||||
|
||||
if( !validPlayers.empty() )
|
||||
if( Player* p = ObjectAccessor::GetPlayer(*me, validPlayers.at(urand(0, validPlayers.size() - 1))) )
|
||||
if (!validPlayers.empty())
|
||||
if (Player* p = ObjectAccessor::GetPlayer(*me, validPlayers.at(urand(0, validPlayers.size() - 1))))
|
||||
{
|
||||
snobold->ChangeSeat(4); // switch to hand
|
||||
me->setAttackTimer(BASE_ATTACK, 3000);
|
||||
@@ -337,12 +337,12 @@ public:
|
||||
{
|
||||
me->CastSpell(me, SPELL_RISING_ANGER, true);
|
||||
Player* p = ObjectAccessor::GetPlayer(*me, PlayerGUID);
|
||||
if( p && p->IsAlive() && !p->GetVehicleKit() && !p->IsMounted() && !p->GetVehicle() )
|
||||
if (p && p->IsAlive() && !p->GetVehicleKit() && !p->IsMounted() && !p->GetVehicle())
|
||||
{
|
||||
if( Vehicle* vk = me->GetVehicleKit() )
|
||||
if( Unit* snobold = vk->GetPassenger(4) )
|
||||
if (Vehicle* vk = me->GetVehicleKit())
|
||||
if (Unit* snobold = vk->GetPassenger(4))
|
||||
{
|
||||
if( snobold->IsCreature() )
|
||||
if (snobold->IsCreature())
|
||||
{
|
||||
CAST_AI(npc_snobold_vassal::npc_snobold_vassalAI, snobold->ToCreature()->AI())->TargetGUID = PlayerGUID;
|
||||
snobold->ToCreature()->AI()->AttackStart(p);
|
||||
@@ -353,21 +353,21 @@ public:
|
||||
//snobold->ClearUnitState(UNIT_STATE_ONVEHICLE);
|
||||
}
|
||||
}
|
||||
else if( Vehicle* vk = me->GetVehicleKit() )
|
||||
else if (Vehicle* vk = me->GetVehicleKit())
|
||||
{
|
||||
events.RescheduleEvent(EVENT_PICK_SNOBOLD_TARGET, 5s);
|
||||
if( Unit* snobold = vk->GetPassenger(4) )
|
||||
if( snobold->IsCreature() )
|
||||
if (Unit* snobold = vk->GetPassenger(4))
|
||||
if (snobold->IsCreature())
|
||||
{
|
||||
bool needDespawn = true;
|
||||
for( uint8 i = 0; i < 4; ++i )
|
||||
if( !vk->GetPassenger(i) )
|
||||
if (!vk->GetPassenger(i))
|
||||
{
|
||||
snobold->ChangeSeat(i);
|
||||
needDespawn = false;
|
||||
break;
|
||||
}
|
||||
if( needDespawn )
|
||||
if (needDespawn)
|
||||
snobold->ToCreature()->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
{
|
||||
summons.DoAction(1);
|
||||
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_GORMOK, DONE);
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
switch( param )
|
||||
switch (param)
|
||||
{
|
||||
case -1:
|
||||
summons.DespawnAll();
|
||||
@@ -407,7 +407,7 @@ public:
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_FAILED, 1);
|
||||
}
|
||||
};
|
||||
@@ -488,16 +488,16 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
switch( param )
|
||||
switch (param)
|
||||
{
|
||||
case -1:
|
||||
if( !me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE) )
|
||||
if (!me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
|
||||
events.RescheduleEvent(EVENT_SUBMERGE, 1500ms);
|
||||
break;
|
||||
case -2:
|
||||
if( me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE) )
|
||||
if (me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
|
||||
bIsStationary = true; // it will come out mobile soon
|
||||
else if( me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
else if (me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
events.RescheduleEvent(EVENT_SUBMERGE, 1s);
|
||||
else
|
||||
events.CancelEvent(EVENT_SUBMERGE);
|
||||
@@ -510,7 +510,7 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
void ScheduleEvents()
|
||||
{
|
||||
events.Reset();
|
||||
if( me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
if (me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
{
|
||||
me->SetAttackTime(BASE_ATTACK, 1500);
|
||||
events.RescheduleEvent(EVENT_SPELL_SPRAY, (me->GetEntry() == NPC_ACIDMAW ? 20s : 15s));
|
||||
@@ -523,7 +523,7 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
events.RescheduleEvent(EVENT_SPELL_SPEW, 15s, 30s);
|
||||
events.RescheduleEvent(EVENT_SPELL_SLIME_POOL, 15s);
|
||||
}
|
||||
if( !me->HasAura(SPELL_ENRAGE) )
|
||||
if (!me->HasAura(SPELL_ENRAGE))
|
||||
events.RescheduleEvent(EVENT_SUBMERGE, 45s, 50s);
|
||||
}
|
||||
|
||||
@@ -540,11 +540,11 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if( me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
if (me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
{
|
||||
if( !who )
|
||||
if (!who)
|
||||
return;
|
||||
if( me->Attack(who, true) )
|
||||
if (me->Attack(who, true))
|
||||
DoStartNoMovement(who);
|
||||
}
|
||||
else
|
||||
@@ -553,15 +553,15 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -573,8 +573,8 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
Talk(EMOTE_SUBMERGE);
|
||||
|
||||
// second one submerge 1.5sec after the first one, used also for synchronizing
|
||||
if( pInstance )
|
||||
if( Creature* c = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(_TYPE_OTHER)) )
|
||||
if (pInstance)
|
||||
if (Creature* c = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(_TYPE_OTHER)))
|
||||
c->AI()->DoAction(-1);
|
||||
|
||||
events.Reset();
|
||||
@@ -584,7 +584,7 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
case EVENT_MOVE_UNDERGROUND:
|
||||
{
|
||||
float angle = me->GetAngle(Locs[LOC_CENTER].GetPositionX() + urand(0, 20) - 10.0f, Locs[LOC_CENTER].GetPositionY() + urand(0, 20) - 10.0f), dist = urand(10, 35);
|
||||
if( Creature* c = me->SummonCreature(NPC_WORLD_TRIGGER, *me, TEMPSUMMON_TIMED_DESPAWN, 6000) )
|
||||
if (Creature* c = me->SummonCreature(NPC_WORLD_TRIGGER, *me, TEMPSUMMON_TIMED_DESPAWN, 6000))
|
||||
{
|
||||
c->SetSpeed(MOVE_RUN, 2.5f);
|
||||
c->CastSpell(c, SPELL_CHURNING_GROUND, true);
|
||||
@@ -603,11 +603,11 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->StopMoving();
|
||||
if( bIsStationary )
|
||||
if (bIsStationary)
|
||||
{
|
||||
me->SetNativeDisplayId(_MODEL_MOBILE);
|
||||
me->SetCombatMovement(true);
|
||||
if( Unit* victim = me->GetVictim() )
|
||||
if (Unit* victim = me->GetVictim())
|
||||
me->GetMotionMaster()->MoveChase(victim);
|
||||
}
|
||||
else
|
||||
@@ -623,7 +623,7 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
case EVENT_SPELL_SPRAY:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
me->CastSpell(target, _SPELL_SPRAY, false);
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
@@ -632,7 +632,7 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
events.Repeat(15s, 30s);
|
||||
break;
|
||||
case EVENT_SPELL_BITE:
|
||||
if( Unit* victim = me->GetVictim() )
|
||||
if (Unit* victim = me->GetVictim())
|
||||
me->CastSpell(victim, _SPELL_BITE, false);
|
||||
events.Repeat(20s);
|
||||
break;
|
||||
@@ -641,15 +641,15 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
events.Repeat(15s, 30s);
|
||||
break;
|
||||
case EVENT_SPELL_SLIME_POOL:
|
||||
if( Creature* c = me->SummonCreature(NPC_SLIME_POOL, *me, TEMPSUMMON_TIMED_DESPAWN, 30000) )
|
||||
if (Creature* c = me->SummonCreature(NPC_SLIME_POOL, *me, TEMPSUMMON_TIMED_DESPAWN, 30000))
|
||||
c->CastSpell(c, SPELL_SLIME_POOL_EFFECT, true);
|
||||
events.Repeat(30s);
|
||||
break;
|
||||
}
|
||||
|
||||
if( !me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE) )
|
||||
if (!me->HasUnitFlag(UNIT_FLAG_NON_ATTACKABLE))
|
||||
{
|
||||
if( me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
if (me->GetDisplayId() == _MODEL_STATIONARY )
|
||||
DoSpellAttackIfReady(_SPELL_SPIT);
|
||||
else
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -658,10 +658,10 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* /*pKiller*/) override
|
||||
{
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
{
|
||||
if( Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(_TYPE_OTHER)) )
|
||||
if( c->IsAlive() )
|
||||
if (Creature* c = pInstance->instance->GetCreature(pInstance->GetGuidData(_TYPE_OTHER)))
|
||||
if (c->IsAlive())
|
||||
c->AI()->DoAction(-2);
|
||||
pInstance->SetData(TYPE_JORMUNGAR, DONE);
|
||||
}
|
||||
@@ -671,7 +671,7 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
{
|
||||
events.Reset();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_FAILED, 1);
|
||||
}
|
||||
};
|
||||
@@ -817,8 +817,8 @@ public:
|
||||
{
|
||||
Map::PlayerList const& lPlayers = me->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr )
|
||||
if( Unit* p = itr->GetSource() )
|
||||
if( p->IsAlive() && p->GetExactDist(me) <= 12.0f )
|
||||
if (Unit* p = itr->GetSource())
|
||||
if (p->IsAlive() && p->GetExactDist(me) <= 12.0f )
|
||||
{
|
||||
DoCastAOE(SPELL_TRAMPLE);
|
||||
return true;
|
||||
@@ -829,7 +829,7 @@ public:
|
||||
|
||||
void MovementInform(uint32 /*type*/, uint32 id) override
|
||||
{
|
||||
if( id == EVENT_CHARGE )
|
||||
if (id == EVENT_CHARGE)
|
||||
{
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_FEROCIOUS_BUTT, 5s, 15s);
|
||||
@@ -843,7 +843,7 @@ public:
|
||||
me->UpdatePosition(destX, destY, destZ, angle, true);
|
||||
me->StopMovingOnCurrentPos();
|
||||
|
||||
if( !DoTrampleIfValid() )
|
||||
if (!DoTrampleIfValid())
|
||||
{
|
||||
me->CastSpell(me, SPELL_STAGGERED_DAZE, true);
|
||||
me->CastSpell((Unit*)nullptr, SPELL_TRAMPLE, true);
|
||||
@@ -862,20 +862,20 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_FEROCIOUS_BUTT:
|
||||
if( Unit* victim = me->GetVictim() )
|
||||
if (Unit* victim = me->GetVictim())
|
||||
me->CastSpell(victim, SPELL_FEROCIOUS_BUTT, false);
|
||||
events.Repeat(15s, 30s);
|
||||
break;
|
||||
@@ -884,7 +884,7 @@ public:
|
||||
events.Repeat(15s, 20s);
|
||||
break;
|
||||
case EVENT_SPELL_ARCTIC_BREATH:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 90.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 90.0f, true))
|
||||
me->CastSpell(target, SPELL_ARCTIC_BREATH, false);
|
||||
events.Repeat(20s, 30s);
|
||||
break;
|
||||
@@ -906,7 +906,7 @@ public:
|
||||
events.RescheduleEvent(EVENT_GAZE, 2s);
|
||||
break;
|
||||
case EVENT_GAZE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 500.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 500.0f, true))
|
||||
{
|
||||
TargetGUID = target->GetGUID();
|
||||
me->SetGuidValue(UNIT_FIELD_TARGET, TargetGUID);
|
||||
@@ -929,14 +929,14 @@ public:
|
||||
case EVENT_JUMP_BACK:
|
||||
{
|
||||
float angle;
|
||||
if( Unit* target = ObjectAccessor::GetPlayer(*me, TargetGUID) )
|
||||
if (Unit* target = ObjectAccessor::GetPlayer(*me, TargetGUID))
|
||||
angle = me->GetAngle(target);
|
||||
else // in case something went wrong
|
||||
angle = rand_norm() * 2 * M_PI;
|
||||
|
||||
float jumpangle = angle >= M_PI ? angle - M_PI : angle + M_PI;
|
||||
float dist = 50.0f;
|
||||
if( angle > 1.0f && angle < 2.0f ) // near main gate
|
||||
if (angle > 1.0f && angle < 2.0f) // near main gate
|
||||
dist = 46.0f;
|
||||
destX = Locs[LOC_CENTER].GetPositionX() + cos(angle) * dist;
|
||||
destY = Locs[LOC_CENTER].GetPositionY() + std::sin(angle) * dist;
|
||||
@@ -946,8 +946,8 @@ public:
|
||||
|
||||
events.RescheduleEvent(EVENT_TRAMPLE, 1500ms);
|
||||
|
||||
if( pInstance )
|
||||
switch( GetDifficulty() )
|
||||
if (pInstance)
|
||||
switch (GetDifficulty())
|
||||
{
|
||||
case RAID_DIFFICULTY_10MAN_NORMAL:
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MASSIVE_CRASH);
|
||||
@@ -976,7 +976,7 @@ public:
|
||||
|
||||
break;
|
||||
case EVENT_CHECK_TRAMPLE_PLAYERS:
|
||||
if( DoTrampleIfValid() )
|
||||
if (DoTrampleIfValid())
|
||||
{
|
||||
events.Reset();
|
||||
events.RescheduleEvent(EVENT_SPELL_FEROCIOUS_BUTT, 5s, 15s);
|
||||
@@ -996,7 +996,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if( me->GetReactState() != REACT_PASSIVE )
|
||||
if (me->GetReactState() != REACT_PASSIVE )
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -1004,13 +1004,13 @@ public:
|
||||
{
|
||||
events.Reset();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_FAILED, 1);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if( !pInstance )
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
pInstance->SetData(TYPE_ICEHOWL, DONE);
|
||||
|
||||
@@ -116,9 +116,9 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_HASTE_SPELLS, true);
|
||||
|
||||
events.Reset();
|
||||
if( me->GetEntry() == NPC_LIGHTBANE )
|
||||
if (me->GetEntry() == NPC_LIGHTBANE )
|
||||
{
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, 21853);
|
||||
|
||||
// special events here
|
||||
@@ -127,7 +127,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
events.RescheduleEvent(EVENT_SPECIAL, 45s);
|
||||
}
|
||||
events.RescheduleEvent(EVENT_SPELL_SPIKE, 5s, 8s);
|
||||
if( IsHeroic() )
|
||||
if (IsHeroic())
|
||||
events.RescheduleEvent(EVENT_SPELL_TOUCH, 10s, 25s, 1);
|
||||
|
||||
me->SetCanFly(true);
|
||||
@@ -142,14 +142,14 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
|
||||
void DoAction(int32 a) override
|
||||
{
|
||||
switch( a )
|
||||
switch (a)
|
||||
{
|
||||
case -1:
|
||||
summons.DespawnAll();
|
||||
if( pInstance && me->GetEntry() == NPC_LIGHTBANE )
|
||||
if (pInstance && me->GetEntry() == NPC_LIGHTBANE )
|
||||
{
|
||||
uint32 essenceId1 = 0, empoweredId1 = 0, touchId1 = 0, essenceId2 = 0, empoweredId2 = 0, touchId2 = 0;
|
||||
switch( me->GetMap()->GetDifficulty() )
|
||||
switch (me->GetMap()->GetDifficulty())
|
||||
{
|
||||
case 0:
|
||||
essenceId1 = 65684;
|
||||
@@ -207,7 +207,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
|
||||
/*void AttackStart(Unit* victim)
|
||||
{
|
||||
if( victim && me->Attack(victim, true) )
|
||||
if (victim && me->Attack(victim, true))
|
||||
me->GetMotionMaster()->MoveChase(victim, 0.0f, 0.0f, 6.0f);
|
||||
}*/
|
||||
|
||||
@@ -216,15 +216,15 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
me->setActive(true);
|
||||
me->LowerPlayerDamageReq(me->GetMaxHealth());
|
||||
DoZoneInCombat();
|
||||
if( Creature* twin = GetSister() )
|
||||
if( !twin->IsInCombat() )
|
||||
if( Unit* target = twin->SelectNearestTarget(200.0f) )
|
||||
if (Creature* twin = GetSister())
|
||||
if (!twin->IsInCombat())
|
||||
if (Unit* target = twin->SelectNearestTarget(200.0f))
|
||||
twin->AI()->AttackStart(target);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
me->CastSpell(me, me->GetEntry() == NPC_LIGHTBANE ? SPELL_LIGHT_SURGE : SPELL_DARK_SURGE, true);
|
||||
|
||||
if( pInstance && me->GetEntry() == NPC_LIGHTBANE )
|
||||
if (pInstance && me->GetEntry() == NPC_LIGHTBANE )
|
||||
pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, 21853);
|
||||
}
|
||||
|
||||
@@ -265,13 +265,13 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
void UpdateSharedHealth()
|
||||
{
|
||||
// lightbane synchronizes
|
||||
if( me->GetEntry() == NPC_LIGHTBANE )
|
||||
if( Creature* twin = GetSister() )
|
||||
if( twin->IsAlive() && me->IsAlive() )
|
||||
if (me->GetEntry() == NPC_LIGHTBANE )
|
||||
if (Creature* twin = GetSister())
|
||||
if (twin->IsAlive() && me->IsAlive())
|
||||
{
|
||||
int32 d = CAST_AI(boss_twin_valkyrAI, twin->AI())->LastSynchroHP - (int32)twin->GetHealth();
|
||||
int32 newhealth = (int32)me->GetHealth() - d;
|
||||
if( newhealth <= 0 )
|
||||
if (newhealth <= 0)
|
||||
newhealth = 1;
|
||||
me->SetHealth( (uint32)newhealth );
|
||||
twin->SetHealth(me->GetHealth());
|
||||
@@ -281,25 +281,25 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
UpdateSharedHealth();
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
uint8 eventId = events.ExecuteEvent();
|
||||
|
||||
switch(eventId)
|
||||
switch (eventId)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
Talk(SAY_BERSERK);
|
||||
if( Creature* twin = GetSister() )
|
||||
if (Creature* twin = GetSister())
|
||||
{
|
||||
twin->CastSpell(twin, SPELL_BERSERK, true);
|
||||
twin->AI()->Talk(SAY_BERSERK);
|
||||
@@ -311,18 +311,18 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
case EVENT_SUMMON_BALLS_3:
|
||||
{
|
||||
uint8 count = 0;
|
||||
if( IsHeroic() )
|
||||
if (IsHeroic())
|
||||
count = eventId == EVENT_SUMMON_BALLS_3 ? 36 : 6;
|
||||
else
|
||||
count = eventId == EVENT_SUMMON_BALLS_3 ? 24 : 4;
|
||||
for( uint8 i = 0; i < count; ++i )
|
||||
{
|
||||
float angle = rand_norm() * 2 * M_PI;
|
||||
if( Creature* ball = me->SummonCreature((i % 2) ? NPC_CONCENTRATED_DARK : NPC_CONCENTRATED_LIGHT, Locs[LOC_CENTER].GetPositionX() + cos(angle) * 47.0f, Locs[LOC_CENTER].GetPositionY() + std::sin(angle) * 47.0f, Locs[LOC_CENTER].GetPositionZ() + 1.5f, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1500) )
|
||||
if (Creature* ball = me->SummonCreature((i % 2) ? NPC_CONCENTRATED_DARK : NPC_CONCENTRATED_LIGHT, Locs[LOC_CENTER].GetPositionX() + cos(angle) * 47.0f, Locs[LOC_CENTER].GetPositionY() + std::sin(angle) * 47.0f, Locs[LOC_CENTER].GetPositionZ() + 1.5f, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1500))
|
||||
boss_twin_valkyrAI::JustSummoned(ball);
|
||||
}
|
||||
|
||||
switch( eventId )
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SUMMON_BALLS_1:
|
||||
events.RescheduleEvent(EVENT_SUMMON_BALLS_2, 8s);
|
||||
@@ -343,10 +343,10 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
case EVENT_SPELL_TOUCH:
|
||||
{
|
||||
uint32 essenceId = 0;
|
||||
switch( me->GetEntry() )
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
case NPC_LIGHTBANE:
|
||||
switch( GetDifficulty() )
|
||||
switch (GetDifficulty())
|
||||
{
|
||||
case 0:
|
||||
essenceId = 65684;
|
||||
@@ -363,7 +363,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
case NPC_DARKBANE:
|
||||
switch( GetDifficulty() )
|
||||
switch (GetDifficulty())
|
||||
{
|
||||
case 0:
|
||||
essenceId = 65686;
|
||||
@@ -382,7 +382,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
}
|
||||
|
||||
/*
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, essenceId) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, essenceId))
|
||||
me->CastSpell(target, me->GetEntry()==NPC_LIGHTBANE ? SPELL_LIGHT_TOUCH : SPELL_DARK_TOUCH, false);
|
||||
events.RepeatEvent(urand(45000,50000));
|
||||
*/
|
||||
@@ -414,17 +414,17 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
do s = urand(0, 3);
|
||||
while( SpecialMask & (1 << s) && (SpecialMask & 0xF) != 0xF );
|
||||
SpecialMask |= (1 << s);
|
||||
switch( s )
|
||||
switch (s)
|
||||
{
|
||||
case 0: // light vortex
|
||||
me->CastSpell((Unit*)nullptr, SPELL_LIGHT_VORTEX, false);
|
||||
Talk(EMOTE_VORTEX);
|
||||
Talk(SAY_LIGHT);
|
||||
if( Creature* twin = GetSister() )
|
||||
if (Creature* twin = GetSister())
|
||||
twin->AI()->Talk(SAY_LIGHT);
|
||||
break;
|
||||
case 1: // dark vortex
|
||||
if( Creature* twin = GetSister() )
|
||||
if (Creature* twin = GetSister())
|
||||
{
|
||||
twin->CastSpell((Unit*)nullptr, SPELL_DARK_VORTEX, false);
|
||||
twin->AI()->Talk(EMOTE_VORTEX);
|
||||
@@ -435,7 +435,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
case 2: // light pact
|
||||
Talk(EMOTE_TWINK_PACT);
|
||||
Talk(SAY_TWINK_PACT);
|
||||
if( Creature* twin = GetSister() )
|
||||
if (Creature* twin = GetSister())
|
||||
{
|
||||
twin->AI()->Talk(SAY_TWINK_PACT);
|
||||
twin->AI()->DoAction(-3);
|
||||
@@ -444,7 +444,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
me->CastSpell(me, SPELL_LIGHT_TWIN_PACT, false);
|
||||
break;
|
||||
case 3: // dark pact
|
||||
if( Creature* twin = GetSister() )
|
||||
if (Creature* twin = GetSister())
|
||||
{
|
||||
twin->AI()->Talk(EMOTE_TWINK_PACT);
|
||||
twin->AI()->Talk(SAY_TWINK_PACT);
|
||||
@@ -455,7 +455,7 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
}
|
||||
if( (SpecialMask & 0xF) == 0xF )
|
||||
if ((SpecialMask & 0xF) == 0xF )
|
||||
SpecialMask = 0;
|
||||
events.Repeat(45s);
|
||||
events.DelayEventsToMax(15000, 1); // no touch of light/darkness during special abilities!
|
||||
@@ -474,13 +474,13 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
{
|
||||
DoAction(-1);
|
||||
Talk(SAY_DEATH);
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(TYPE_VALKYR, DONE);
|
||||
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POWERING_UP);
|
||||
}
|
||||
if( Creature* twin = GetSister() )
|
||||
if( twin->IsAlive() )
|
||||
if (Creature* twin = GetSister())
|
||||
if (twin->IsAlive())
|
||||
{
|
||||
twin->SetHealth(1);
|
||||
Unit::Kill(twin, twin);
|
||||
@@ -499,17 +499,17 @@ struct boss_twin_valkyrAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* who) override
|
||||
{
|
||||
if( who->IsPlayer() )
|
||||
if (who->IsPlayer())
|
||||
{
|
||||
Talk(SAY_KILL_PLAYER);
|
||||
if( Creature* twin = GetSister() )
|
||||
if (Creature* twin = GetSister())
|
||||
twin->AI()->Talk(SAY_KILL_PLAYER);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /* why */) override
|
||||
{
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(TYPE_FAILED, 0);
|
||||
}
|
||||
};
|
||||
@@ -530,9 +530,9 @@ public:
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_AURASTATE, 1 << (19 - 1));
|
||||
SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2);
|
||||
if( Creature* c = me->SummonCreature(NPC_DARK_ESSENCE, Locs[LOC_DARKESS_1]) )
|
||||
if (Creature* c = me->SummonCreature(NPC_DARK_ESSENCE, Locs[LOC_DARKESS_1]))
|
||||
boss_twin_valkyrAI::JustSummoned(c);
|
||||
if( Creature* c = me->SummonCreature(NPC_DARK_ESSENCE, Locs[LOC_DARKESS_2]) )
|
||||
if (Creature* c = me->SummonCreature(NPC_DARK_ESSENCE, Locs[LOC_DARKESS_2]))
|
||||
boss_twin_valkyrAI::JustSummoned(c);
|
||||
}
|
||||
|
||||
@@ -556,9 +556,9 @@ public:
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_AURASTATE, 1 << (22 - 1));
|
||||
SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1);
|
||||
if( Creature* c = me->SummonCreature(NPC_LIGHT_ESSENCE, Locs[LOC_LIGHTESS_1]) )
|
||||
if (Creature* c = me->SummonCreature(NPC_LIGHT_ESSENCE, Locs[LOC_LIGHTESS_1]))
|
||||
boss_twin_valkyrAI::JustSummoned(c);
|
||||
if( Creature* c = me->SummonCreature(NPC_LIGHT_ESSENCE, Locs[LOC_LIGHTESS_2]) )
|
||||
if (Creature* c = me->SummonCreature(NPC_LIGHT_ESSENCE, Locs[LOC_LIGHTESS_2]))
|
||||
boss_twin_valkyrAI::JustSummoned(c);
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
switch( creature->GetEntry() )
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_LIGHT_ESSENCE:
|
||||
{
|
||||
@@ -582,7 +582,7 @@ public:
|
||||
//uint32 empoweredId = 0;
|
||||
uint32 touchId1 = 0;
|
||||
//uint32 touchId2 = 0;
|
||||
switch( creature->GetMap()->GetDifficulty() )
|
||||
switch (creature->GetMap()->GetDifficulty())
|
||||
{
|
||||
case 0:
|
||||
essenceId = 65684;
|
||||
@@ -628,7 +628,7 @@ public:
|
||||
//uint32 empoweredId = 0;
|
||||
//uint32 touchId1 = 0;
|
||||
uint32 touchId2 = 0;
|
||||
switch( creature->GetMap()->GetDifficulty() )
|
||||
switch (creature->GetMap()->GetDifficulty())
|
||||
{
|
||||
case 0:
|
||||
essenceId = 65686;
|
||||
@@ -706,10 +706,10 @@ public:
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if( type != POINT_MOTION_TYPE || id != 0 )
|
||||
if (type != POINT_MOTION_TYPE || id != 0)
|
||||
return;
|
||||
|
||||
if( urand(0, 2) )
|
||||
if (urand(0, 2))
|
||||
me->DespawnOrUnsummon(0);
|
||||
}
|
||||
|
||||
@@ -721,10 +721,10 @@ public:
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
{
|
||||
if( despawning )
|
||||
if (despawning)
|
||||
return;
|
||||
|
||||
if( me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE )
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE )
|
||||
MoveToNextPoint();
|
||||
}
|
||||
};
|
||||
@@ -742,15 +742,15 @@ public:
|
||||
void HandleAfterEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo& /*dmgInfo*/, uint32& absorbAmount)
|
||||
{
|
||||
uint16 count = absorbAmount / 1000;
|
||||
if( !count || !GetOwner() )
|
||||
if (!count || !GetOwner())
|
||||
return;
|
||||
|
||||
if( SpellInfo const* se = GetAura()->GetSpellInfo() )
|
||||
if( Unit* owner = GetOwner()->ToUnit() )
|
||||
if (SpellInfo const* se = GetAura()->GetSpellInfo())
|
||||
if (Unit* owner = GetOwner()->ToUnit())
|
||||
{
|
||||
uint32 auraId = 0;
|
||||
uint32 empoweredId = 0;
|
||||
switch( se->Id )
|
||||
switch (se->Id)
|
||||
{
|
||||
case 65686:
|
||||
auraId = 67590;
|
||||
@@ -785,15 +785,15 @@ public:
|
||||
empoweredId = 65724;
|
||||
break;
|
||||
}
|
||||
if( !owner->HasAura(auraId) )
|
||||
if (!owner->HasAura(auraId))
|
||||
{
|
||||
owner->CastSpell(owner, SPELL_POWERING_UP, true);
|
||||
if( --count == 0 )
|
||||
if (--count == 0)
|
||||
return;
|
||||
}
|
||||
if( Aura* aur = owner->GetAura(auraId) )
|
||||
if (Aura* aur = owner->GetAura(auraId))
|
||||
{
|
||||
if( aur->GetStackAmount() + count < 100 )
|
||||
if (aur->GetStackAmount() + count < 100 )
|
||||
{
|
||||
aur->ModStackAmount(count);
|
||||
|
||||
@@ -834,15 +834,15 @@ public:
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = GetCaster();
|
||||
if( !caster )
|
||||
if (!caster)
|
||||
return;
|
||||
if( caster->GetMap()->GetId() == 649 )
|
||||
if (caster->GetMap()->GetId() == 649 )
|
||||
{
|
||||
uint32 excludedID = GetSpellInfo()->ExcludeTargetAuraSpell;
|
||||
Map::PlayerList const& pl = caster->GetMap()->GetPlayers();
|
||||
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
|
||||
if( Player* plr = itr->GetSource() )
|
||||
if( plr->IsAlive() && !plr->HasAura(excludedID) && !plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION) )
|
||||
if (Player* plr = itr->GetSource())
|
||||
if (plr->IsAlive() && !plr->HasAura(excludedID) && !plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
|
||||
{
|
||||
uint32 absorb = 0;
|
||||
uint32 resist = 0;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,15 +36,15 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if(!creature->HasNpcFlag(UNIT_NPC_FLAG_GOSSIP))
|
||||
if (!creature->HasNpcFlag(UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if(!pInstance)
|
||||
if (!pInstance)
|
||||
return true;
|
||||
|
||||
uint32 gossipTextId = 0;
|
||||
switch(pInstance->GetData(TYPE_INSTANCE_PROGRESS))
|
||||
switch (pInstance->GetData(TYPE_INSTANCE_PROGRESS))
|
||||
{
|
||||
case INSTANCE_PROGRESS_INITIAL:
|
||||
gossipTextId = MSG_TESTED;
|
||||
@@ -72,14 +72,14 @@ public:
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 uiAction) override
|
||||
{
|
||||
if( !creature->HasNpcFlag(UNIT_NPC_FLAG_GOSSIP) )
|
||||
if (!creature->HasNpcFlag(UNIT_NPC_FLAG_GOSSIP))
|
||||
return true;
|
||||
|
||||
InstanceScript* pInstance = creature->GetInstanceScript();
|
||||
if( !pInstance )
|
||||
if (!pInstance)
|
||||
return true;
|
||||
|
||||
if( uiAction == GOSSIP_ACTION_INFO_DEF + 1337 )
|
||||
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1337)
|
||||
{
|
||||
pInstance->SetData(TYPE_ANNOUNCER_GOSSIP_SELECT, 0);
|
||||
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
Reference in New Issue
Block a user