mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 13:39:46 -04:00
*AI structure update.
--HG-- branch : trunk
This commit is contained in:
@@ -63,20 +63,6 @@ void SummonList::DespawnAll()
|
||||
clear();
|
||||
}
|
||||
|
||||
bool ScriptedAI::IsVisible(Unit* who) const
|
||||
{
|
||||
if (!who)
|
||||
return false;
|
||||
|
||||
return (m_creature->GetDistance(who) < VISIBLE_RANGE) && who->isVisibleForOrDetect(m_creature,true);
|
||||
}
|
||||
|
||||
void ScriptedAI::MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if(!m_creature->getVictim() && m_creature->canStartAttack(who))
|
||||
AttackStart(who);
|
||||
}
|
||||
|
||||
void ScriptedAI::AttackStart(Unit* who, bool melee)
|
||||
{
|
||||
if (!who)
|
||||
@@ -121,7 +107,7 @@ void ScriptedAI::AttackStart(Unit* who)
|
||||
void ScriptedAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Check if we have a current target
|
||||
if (m_creature->isAlive() && m_creature->SelectHostilTarget() && m_creature->getVictim())
|
||||
if (m_creature->isAlive() && UpdateVictim())
|
||||
{
|
||||
if (m_creature->isAttackReady() )
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ GameObject* FindGameObject(uint32 entry, float range, Unit* Finder);
|
||||
|
||||
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
{
|
||||
ScriptedAI(Creature* creature) : m_creature(creature), InCombat(false), IsFleeing(false) {}
|
||||
ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), InCombat(false), IsFleeing(false) {}
|
||||
~ScriptedAI() {}
|
||||
|
||||
//*************
|
||||
@@ -53,9 +53,6 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
// Called at any Damage from any attacker (before damage apply)
|
||||
void DamageTaken(Unit *done_by, uint32 &damage) {}
|
||||
|
||||
//Is unit visible for MoveInLineOfSight
|
||||
bool IsVisible(Unit *who) const;
|
||||
|
||||
//Called at World update tick
|
||||
void UpdateAI(const uint32);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL boss_emerissAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Sleep_Timer
|
||||
|
||||
@@ -115,7 +115,7 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Sleep_Timer
|
||||
@@ -259,7 +259,7 @@ struct TRINITY_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//PoisonCloud_Timer
|
||||
|
||||
@@ -90,7 +90,7 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Sleep_Timer
|
||||
@@ -206,7 +206,7 @@ struct TRINITY_DLL_DECL mob_dementeddruidsAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//MoonFire_Timer
|
||||
|
||||
@@ -1223,7 +1223,7 @@ struct TRINITY_DLL_DECL Mob_EventAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Check if we are in combat (also updates calls threat update code)
|
||||
bool Combat = InCombat ? m_creature->SelectHostilTarget() : false;
|
||||
bool Combat = InCombat ? UpdateVictim() : false;
|
||||
|
||||
//Must return if creature isn't alive. Normally select hostil target and get victim prevent this
|
||||
if (!m_creature->isAlive())
|
||||
|
||||
@@ -77,7 +77,7 @@ struct TRINITY_DLL_DECL generic_creatureAI : public ScriptedAI
|
||||
}else BuffTimer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//If we are within range melee the target
|
||||
|
||||
@@ -216,7 +216,7 @@ void SimpleAI::DamageTaken(Unit *killer, uint32 &damage)
|
||||
void SimpleAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Spells
|
||||
|
||||
@@ -147,7 +147,7 @@ struct TRINITY_DLL_DECL custom_exampleAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Spell 1 timer
|
||||
|
||||
@@ -92,7 +92,7 @@ void guardAI::UpdateAI(const uint32 diff)
|
||||
}else BuffTimer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
// Make sure our attack is ready and we arn't currently casting
|
||||
|
||||
@@ -2517,7 +2517,7 @@ struct TRINITY_DLL_DECL guard_shattrath_aldorAI : public guardAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( CanTeleport )
|
||||
@@ -2713,7 +2713,7 @@ struct TRINITY_DLL_DECL guard_shattrath_scryerAI : public guardAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( CanTeleport )
|
||||
|
||||
@@ -188,7 +188,7 @@ void npc_escortAI::UpdateAI(const uint32 diff)
|
||||
}
|
||||
|
||||
//Check if we have a current target
|
||||
if( m_creature->isAlive() && m_creature->SelectHostilTarget() && m_creature->getVictim())
|
||||
if( m_creature->isAlive() && UpdateVictim())
|
||||
{
|
||||
//If we are within range melee the target
|
||||
if( m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
|
||||
@@ -73,7 +73,7 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
||||
else ResetFlagTimer -= diff;
|
||||
}
|
||||
|
||||
if(m_creature->SelectHostilTarget() && m_creature->getVictim())
|
||||
if(UpdateVictim())
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
@@ -611,7 +611,7 @@ struct TRINITY_DLL_DECL npc_guardianAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_creature->isAttackReady())
|
||||
|
||||
@@ -119,7 +119,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Rend_Timer < diff)
|
||||
|
||||
+3
-3
@@ -61,7 +61,7 @@ struct TRINITY_DLL_DECL mob_stolen_soulAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Class_Timer < diff)
|
||||
@@ -234,7 +234,7 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!Avatar_summoned && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 25))
|
||||
@@ -319,7 +319,7 @@ struct TRINITY_DLL_DECL mob_avatar_of_martyredAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Mortal_Strike_timer < diff)
|
||||
|
||||
+2
-2
@@ -102,7 +102,7 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
}else Inhibitmagic_Timer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Attractmagic_Timer
|
||||
@@ -173,7 +173,7 @@ struct TRINITY_DLL_DECL mob_focus_fireAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//FieryBlast_Timer
|
||||
|
||||
+2
-2
@@ -136,7 +136,7 @@ struct TRINITY_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( FrostNova_Timer < diff )
|
||||
@@ -234,7 +234,7 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( ArcaneBolt_Timer < diff )
|
||||
|
||||
@@ -86,7 +86,7 @@ struct TRINITY_DLL_DECL boss_pandemoniusAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( VoidBlast_Timer < diff )
|
||||
|
||||
+5
-5
@@ -132,7 +132,7 @@ struct TRINITY_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 90) && !summon90)
|
||||
@@ -228,7 +228,7 @@ struct TRINITY_DLL_DECL mob_syth_fireAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(flameshock_timer < diff)
|
||||
@@ -280,7 +280,7 @@ struct TRINITY_DLL_DECL mob_syth_arcaneAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(arcaneshock_timer < diff)
|
||||
@@ -332,7 +332,7 @@ struct TRINITY_DLL_DECL mob_syth_frostAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(frostshock_timer < diff)
|
||||
@@ -384,7 +384,7 @@ struct TRINITY_DLL_DECL mob_syth_shadowAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(shadowshock_timer < diff)
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ struct TRINITY_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Blink)
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI
|
||||
//DoWhine("I haz no mount!", LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (CorrosiveAcid_Timer < diff)
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ struct TRINITY_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (InciteChaos)
|
||||
|
||||
+1
-1
@@ -254,7 +254,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (ShadowBoltVolley_Timer < diff)
|
||||
|
||||
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//SonicBoom_Timer
|
||||
|
||||
@@ -82,7 +82,7 @@ struct TRINITY_DLL_DECL mobs_spitelashesAI : public ScriptedAI
|
||||
DoCast(m_creature,6924); //visual explosion
|
||||
}
|
||||
}
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//TODO: add abilities for the different creatures
|
||||
|
||||
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL boss_azuregosAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if(Teleport_Timer < diff)
|
||||
|
||||
@@ -235,7 +235,7 @@ struct TRINITY_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI
|
||||
}else Emote_Timer -= diff;
|
||||
}
|
||||
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Dynamite_Timer < diff)
|
||||
|
||||
@@ -148,7 +148,7 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI
|
||||
} else Reset_Timer -= diff;
|
||||
}
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -198,7 +198,7 @@ struct TRINITY_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(ArcingSmashTimer < diff)
|
||||
|
||||
@@ -694,7 +694,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if((!m_creature->SelectHostilTarget() && !m_creature->getVictim()) && Phase < PHASE_TALK_SEQUENCE)
|
||||
if((!UpdateVictim()) && Phase < PHASE_TALK_SEQUENCE)
|
||||
return;
|
||||
|
||||
Event = EVENT_NULL;
|
||||
@@ -942,7 +942,7 @@ struct TRINITY_DLL_DECL flame_of_azzinothAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(FlameBlastTimer < diff)
|
||||
@@ -1353,7 +1353,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
if(!m_creature->SelectHostilTarget() && !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 20)
|
||||
@@ -1494,7 +1494,7 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if((!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if((!UpdateVictim())
|
||||
&& !Timer[EVENT_MAIEV_STEALTH])
|
||||
return;
|
||||
|
||||
@@ -1697,7 +1697,7 @@ struct TRINITY_DLL_DECL shadow_demonAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() && !m_creature->getVictim()) return;
|
||||
if(!UpdateVictim()) return;
|
||||
|
||||
if(m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; // Only cast the below on players.
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !Enraged)
|
||||
|
||||
@@ -397,7 +397,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() && !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Supposed to be cast on nearest target
|
||||
@@ -491,7 +491,7 @@ struct TRINITY_DLL_DECL boss_essence_of_desireAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() && !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(RuneShieldTimer < diff)
|
||||
@@ -580,7 +580,7 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() && !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(!CheckedAggro)
|
||||
|
||||
@@ -748,7 +748,7 @@ struct TRINITY_DLL_DECL npc_akamaAI : public ScriptedAI
|
||||
}
|
||||
}else SoulRetrieveTimer -= diff;
|
||||
|
||||
if(!m_creature->getVictim() || !m_creature->SelectHostilTarget())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(DestructivePoisonTimer < diff)
|
||||
|
||||
@@ -148,7 +148,7 @@ struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(!m_creature->HasAura(SPELL_BERSERK, 0))
|
||||
|
||||
@@ -89,7 +89,7 @@ struct TRINITY_DLL_DECL mob_doom_blossomAI : public ScriptedAI
|
||||
CheckTeronTimer = 5000;
|
||||
}else CheckTeronTimer -= diff;
|
||||
|
||||
if(!m_creature->getVictim() || !m_creature->SelectHostilTarget())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(ShadowBoltTimer < diff)
|
||||
@@ -390,7 +390,7 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
||||
}else AggroTimer -= diff;
|
||||
}
|
||||
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim() || Intro)
|
||||
if(!UpdateVictim() || Intro)
|
||||
return;
|
||||
|
||||
if(SummonShadowsTimer < diff)
|
||||
|
||||
@@ -132,7 +132,7 @@ struct TRINITY_DLL_DECL boss_najentusAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(TidalShieldTimer < diff)
|
||||
|
||||
@@ -325,7 +325,7 @@ struct TRINITY_DLL_DECL mob_illidari_councilAI : public ScriptedAI
|
||||
if(Creature* Member = ((Creature*)Unit::GetUnit((*m_creature), Council[i])))
|
||||
{
|
||||
// This is the evade/death check.
|
||||
if(Member->isAlive() && !Member->SelectHostilTarget())
|
||||
if(Member->isAlive() && !Member->getVictim())
|
||||
++EvadeCheck; //If all members evade, we reset so that players can properly reset the event
|
||||
else if(!Member->isAlive()) // If even one member dies, kill the rest, set instance data, and kill self.
|
||||
{
|
||||
@@ -490,7 +490,7 @@ struct TRINITY_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_coun
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(BlessingTimer < diff)
|
||||
@@ -578,7 +578,7 @@ struct TRINITY_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(Cooldown)
|
||||
@@ -666,7 +666,7 @@ struct TRINITY_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(EmpoweredSmiteTimer < diff)
|
||||
@@ -740,7 +740,7 @@ struct TRINITY_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(!HasVanished)
|
||||
|
||||
@@ -360,7 +360,7 @@ struct TRINITY_DLL_DECL mob_phalanxAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if(!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ThunderClap_Timer
|
||||
|
||||
@@ -67,7 +67,7 @@ struct TRINITY_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//FireBlast_Timer
|
||||
|
||||
@@ -55,7 +55,7 @@ struct TRINITY_DLL_DECL boss_anubshiahAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ShadowBolt_Timer
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (HandOfThaurissan_Timer < diff)
|
||||
|
||||
@@ -103,7 +103,7 @@ struct TRINITY_DLL_DECL boss_general_angerforgeAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//MightyBlow_Timer
|
||||
|
||||
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_gorosh_the_dervishAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//WhirlWind_Timer
|
||||
|
||||
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_grizzleAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//GroundTremor_Timer
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ShadowWordPain_Timer
|
||||
|
||||
@@ -46,7 +46,7 @@ struct TRINITY_DLL_DECL boss_magmusAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//FieryBurst_Timer
|
||||
|
||||
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//MindBlast_Timer
|
||||
|
||||
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_angerrelAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//SunderArmor_Timer
|
||||
@@ -110,7 +110,7 @@ struct TRINITY_DLL_DECL boss_doperelAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//SinisterStrike_Timer
|
||||
@@ -170,7 +170,7 @@ struct TRINITY_DLL_DECL boss_haterelAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//ShadowBolt_Timer
|
||||
@@ -242,7 +242,7 @@ struct TRINITY_DLL_DECL boss_vilerelAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//MindBlast_Timer
|
||||
@@ -315,7 +315,7 @@ struct TRINITY_DLL_DECL boss_seethrelAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//FrostArmor_Timer
|
||||
@@ -391,7 +391,7 @@ struct TRINITY_DLL_DECL boss_gloomrelAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Hamstring_Timer
|
||||
@@ -520,7 +520,7 @@ struct TRINITY_DLL_DECL boss_doomrelAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
|
||||
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_drakkisathAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//FireNova_Timer
|
||||
|
||||
@@ -96,7 +96,7 @@ struct TRINITY_DLL_DECL boss_gythAI : public ScriptedAI
|
||||
//char buf[200];
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (!RootSelf)
|
||||
|
||||
@@ -53,7 +53,7 @@ struct TRINITY_DLL_DECL boss_halyconAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//CrowdPummel_Timer
|
||||
|
||||
@@ -61,7 +61,7 @@ struct TRINITY_DLL_DECL boss_highlordomokkAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//WarStomp_Timer
|
||||
|
||||
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL boss_mothersmolderwebAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Crystalize_Timer
|
||||
|
||||
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//BlastWave_Timer
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//FireNova_Timer
|
||||
|
||||
@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_quatermasterzigrisAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Shoot_Timer
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_rend_blackhandAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//WhirlWind_Timer
|
||||
|
||||
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL boss_shadowvoshAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//CurseOfBlood_Timer
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_thebeastAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Flamebreak_Timer
|
||||
|
||||
@@ -58,7 +58,7 @@ struct TRINITY_DLL_DECL boss_warmastervooneAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Snapkick_Timer
|
||||
|
||||
@@ -61,7 +61,7 @@ struct TRINITY_DLL_DECL boss_broodlordAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//LeashCheck_Timer
|
||||
|
||||
@@ -189,7 +189,7 @@ struct TRINITY_DLL_DECL boss_chromaggusAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Shimmer_Timer Timer
|
||||
|
||||
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_ebonrocAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Shadowflame Timer
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TRINITY_DLL_DECL boss_firemawAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ShadowFlame_Timer
|
||||
|
||||
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL boss_flamegorAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ShadowFlame_Timer
|
||||
|
||||
@@ -112,7 +112,7 @@ struct TRINITY_DLL_DECL boss_nefarianAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ShadowFlame_Timer
|
||||
|
||||
@@ -67,7 +67,7 @@ struct TRINITY_DLL_DECL boss_razorgoreAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Cleave_Timer
|
||||
|
||||
@@ -142,7 +142,7 @@ struct TRINITY_DLL_DECL boss_vaelAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
// Yell if hp lower than 15%
|
||||
|
||||
@@ -221,7 +221,7 @@ struct TRINITY_DLL_DECL boss_victor_nefariusAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Only do this if we haven't spawned nef yet
|
||||
|
||||
@@ -226,7 +226,7 @@ struct TRINITY_DLL_DECL mobs_nether_drakeAI : public ScriptedAI
|
||||
return; //anything below here is not interesting for Nihil, so skip it
|
||||
}
|
||||
|
||||
if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if( !UpdateVictim() )
|
||||
return;
|
||||
|
||||
if( IntangiblePresence_Timer <= diff )
|
||||
|
||||
@@ -93,7 +93,7 @@ struct TRINITY_DLL_DECL boss_kruulAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//ShadowVolley_Timer
|
||||
|
||||
@@ -104,7 +104,7 @@ struct TRINITY_DLL_DECL boss_aeonusAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Sand Breath
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ struct TRINITY_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Arcane Blast
|
||||
|
||||
@@ -102,7 +102,7 @@ struct TRINITY_DLL_DECL boss_temporusAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Attack Haste
|
||||
|
||||
@@ -213,7 +213,7 @@ struct TRINITY_DLL_DECL npc_medivh_bmAI : public ScriptedAI
|
||||
}else Check_Timer -= diff;
|
||||
}
|
||||
|
||||
//if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
//if (!UpdateVictim())
|
||||
//return;
|
||||
|
||||
//DoMeleeAttackIfReady();
|
||||
|
||||
@@ -256,7 +256,7 @@ struct TRINITY_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(SummonTimer < diff)
|
||||
@@ -574,7 +574,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public ScriptedAI
|
||||
}else DrainNordrassilTimer -= diff;
|
||||
}
|
||||
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !BelowTenPercent && !Enraged)
|
||||
|
||||
@@ -433,7 +433,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
|
||||
CheckTimer = 5000;
|
||||
}else CheckTimer -= diff;
|
||||
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
for(uint8 i = 0; i < 3; ++i)
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ struct TRINITY_DLL_DECL boss_captain_skarlocAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Holy_Light
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ struct TRINITY_DLL_DECL boss_epoch_hunterAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Sand Breath
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ struct TRINITY_DLL_DECL boss_lieutenant_drakeAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Whirlwind
|
||||
|
||||
@@ -495,7 +495,7 @@ struct TRINITY_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//TODO: add his abilities'n-crap here
|
||||
|
||||
+4
-4
@@ -232,7 +232,7 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
@@ -381,7 +381,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_sharkkisAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
@@ -512,7 +512,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_tidalvessAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
@@ -627,7 +627,7 @@ struct TRINITY_DLL_DECL boss_fathomguard_caribdisAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
|
||||
+1
-1
@@ -223,7 +223,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
beam=true;
|
||||
}
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
// corrupted form
|
||||
|
||||
+1
-1
@@ -342,7 +342,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
return;
|
||||
}
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if(Phase == 1 || Phase == 3)
|
||||
|
||||
+4
-4
@@ -113,7 +113,7 @@ struct TRINITY_DLL_DECL mob_inner_demonAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_creature->getVictim()->GetGUID() != victimGUID)
|
||||
@@ -403,7 +403,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (m_creature->HasAura(AURA_BANISH, 0) || !m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (m_creature->HasAura(AURA_BANISH, 0) || !UpdateVictim())
|
||||
{
|
||||
if(BanishTimer<diff)
|
||||
{
|
||||
@@ -626,7 +626,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blind_demonformAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
//ChaosBlast_Timer
|
||||
if(m_creature->GetDistance(m_creature->getVictim()) < 30)
|
||||
@@ -723,7 +723,7 @@ struct TRINITY_DLL_DECL mob_greyheart_spellbinderAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
if(!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if(!UpdateVictim())
|
||||
{
|
||||
CastChanneling();
|
||||
return;
|
||||
|
||||
+2
-2
@@ -249,7 +249,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() /*|| !m_creature->getVictim()*/ )//rotate resets target
|
||||
if (!UpdateVictim() /*|| !m_creature->getVictim()*/ )//rotate resets target
|
||||
return;
|
||||
|
||||
//Check if players in water and if in water cast spell
|
||||
@@ -328,7 +328,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
||||
WaterboltTimer = 3000;
|
||||
}else WaterboltTimer -= diff;
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
+2
-2
@@ -183,7 +183,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//Earthquake_Timer
|
||||
@@ -326,7 +326,7 @@ struct TRINITY_DLL_DECL mob_water_globuleAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (Check_Timer < diff)
|
||||
|
||||
+2
-2
@@ -99,7 +99,7 @@ struct TRINITY_DLL_DECL boss_thespiaAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//LightningCloud_Timer
|
||||
@@ -158,7 +158,7 @@ struct TRINITY_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (WaterBoltVolley_Timer < diff)
|
||||
|
||||
+2
-2
@@ -127,7 +127,7 @@ struct TRINITY_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Shrink_Timer < diff)
|
||||
@@ -252,7 +252,7 @@ struct TRINITY_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI
|
||||
}else Repair_Timer = 5000;
|
||||
}else Repair_Timer -= diff;
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ struct TRINITY_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
if (Rage_Timer < diff)
|
||||
|
||||
@@ -52,7 +52,7 @@ struct TRINITY_DLL_DECL boss_hungarfenAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20 )
|
||||
|
||||
@@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( ConsumeFlesh_Timer < diff )
|
||||
|
||||
@@ -282,7 +282,7 @@ struct TRINITY_DLL_DECL npc_secondTrialAI : public ScriptedAI
|
||||
else timer -= diff;
|
||||
}
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
// healer
|
||||
@@ -400,7 +400,7 @@ struct TRINITY_DLL_DECL master_kelerun_bloodmournAI : public ScriptedAI
|
||||
else timer -= diff;
|
||||
}
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -132,7 +132,7 @@ struct TRINITY_DLL_DECL boss_gruulAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
// Growth
|
||||
|
||||
@@ -200,7 +200,7 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
@@ -329,7 +329,7 @@ struct TRINITY_DLL_DECL boss_olm_the_summonerAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
@@ -431,7 +431,7 @@ struct TRINITY_DLL_DECL boss_kiggler_the_crazedAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
@@ -535,7 +535,7 @@ struct TRINITY_DLL_DECL boss_blindeye_the_seerAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
@@ -624,7 +624,7 @@ struct TRINITY_DLL_DECL boss_krosh_firehandAI : public ScriptedAI
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
|
||||
if (!UpdateVictim() )
|
||||
return;
|
||||
|
||||
//someone evaded!
|
||||
|
||||
@@ -54,7 +54,7 @@ struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(AcidSpray_Timer < diff)
|
||||
|
||||
+2
-2
@@ -188,7 +188,7 @@ struct TRINITY_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if(check_Timer < diff)
|
||||
{
|
||||
@@ -309,7 +309,7 @@ struct TRINITY_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if(check_Timer < diff)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (AcidSpray_Timer < diff)
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//only two may be wrong, perhaps increase timer and spawn periodically instead.
|
||||
|
||||
+3
-3
@@ -107,7 +107,7 @@ struct TRINITY_DLL_DECL boss_nazanAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if(UnsummonCheck < diff && m_creature->isAlive())
|
||||
{
|
||||
@@ -220,7 +220,7 @@ struct TRINITY_DLL_DECL boss_vazrudenAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if(UnsummonCheck < diff && m_creature->isAlive())
|
||||
{
|
||||
@@ -430,7 +430,7 @@ struct TRINITY_DLL_DECL mob_hellfire_sentryAI : public ScriptedAI
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(KidneyShot_Timer < diff)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user