*Cleanup..
--HG-- branch : trunk
This commit is contained in:
1 parent
9bcb6695af
commit
86c7bbc8bb
66 files changed
+884
-926
No files matched your search
@@ -274,7 +274,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff)
|
||||
//Check if player or any member of his group is within range
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPlayerGUID && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING))
|
||||
{
|
||||
if (m_uiPlayerCheckTimer < uiDiff)
|
||||
if (m_uiPlayerCheckTimer <= uiDiff)
|
||||
{
|
||||
if (DespawnAtFar && !IsPlayerOrGroupInRange())
|
||||
{
|
||||
|
||||
@@ -186,7 +186,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS) && !m_creature->getVictim())
|
||||
{
|
||||
if (m_uiUpdateFollowTimer < uiDiff)
|
||||
if (m_uiUpdateFollowTimer <= uiDiff)
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT))
|
||||
{
|
||||
|
||||
@@ -68,24 +68,24 @@ void guardAI::UpdateAI(const uint32 diff)
|
||||
|
||||
//Buff timer (only buff when we are alive and not in combat
|
||||
if (m_creature->isAlive() && !m_creature->isInCombat())
|
||||
if (BuffTimer < diff)
|
||||
{
|
||||
//Find a spell that targets friendly and applies an aura (these are generally buffs)
|
||||
SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
|
||||
|
||||
if (info && !GlobalCooldown)
|
||||
if (BuffTimer <= diff)
|
||||
{
|
||||
//Cast the buff spell
|
||||
DoCastSpell(m_creature, info);
|
||||
//Find a spell that targets friendly and applies an aura (these are generally buffs)
|
||||
SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA);
|
||||
|
||||
//Set our global cooldown
|
||||
GlobalCooldown = GENERIC_CREATURE_COOLDOWN;
|
||||
if (info && !GlobalCooldown)
|
||||
{
|
||||
//Cast the buff spell
|
||||
DoCastSpell(m_creature, info);
|
||||
|
||||
//Set our timer to 10 minutes before rebuff
|
||||
BuffTimer = 600000;
|
||||
} //Try agian in 30 seconds
|
||||
else BuffTimer = 30000;
|
||||
}else BuffTimer -= diff;
|
||||
//Set our global cooldown
|
||||
GlobalCooldown = GENERIC_CREATURE_COOLDOWN;
|
||||
|
||||
//Set our timer to 10 minutes before rebuff
|
||||
BuffTimer = 600000;
|
||||
} //Try again in 30 seconds
|
||||
else BuffTimer = 30000;
|
||||
} else BuffTimer -= diff;
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -211,7 +211,7 @@ void SimpleAI::UpdateAI(const uint32 diff)
|
||||
if (!Spell[i].Enabled || !Spell[i].Spell_Id)
|
||||
continue;
|
||||
|
||||
if (Spell_Timer[i] < diff)
|
||||
if (Spell_Timer[i] <= diff)
|
||||
{
|
||||
//Check if this is a percentage based
|
||||
if (Spell[i].First_Cast < 0 && Spell[i].First_Cast > -100 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > -Spell[i].First_Cast)
|
||||
|
||||
Reference in new issue
Block a user