--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-12 14:22:59 -06:00
24 changed files with 170 additions and 305 deletions

View File

@@ -169,29 +169,6 @@ void ScriptedAI::DoStartNoMovement(Unit* victim)
m_creature->StopMoving();
}
void ScriptedAI::DoMeleeAttackIfReady()
{
//Make sure our attack is ready before checking distance
if (m_creature->isAttackReady())
{
//If we are within range melee the target
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
{
m_creature->AttackerStateUpdate(m_creature->getVictim());
m_creature->resetAttackTimer();
}
}
if (m_creature->haveOffhandWeapon() && m_creature->isAttackReady(OFF_ATTACK) && !m_creature->hasUnitState(UNIT_STAT_CASTING))
{
//If we are within range melee the target
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
{
m_creature->AttackerStateUpdate(m_creature->getVictim(), OFF_ATTACK);
m_creature->resetAttackTimer(OFF_ATTACK);
}
}
}
void ScriptedAI::DoStopAttack()
{
if (m_creature->getVictim() != NULL)

View File

@@ -113,9 +113,6 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
//Start no movement on victim
void DoStartNoMovement(Unit* victim);
//Do melee swing of current victim if in rnage and ready and not casting
void DoMeleeAttackIfReady();
//Stop attack of current victim
void DoStopAttack();