* Merged ScriptDev2 897

* TODO:
- fix mob_eventai.cpp line 613 DisplayID_A
- merge boss_kaelthas.cpp with sd2
- fix azuremyst.cpp line 108 Spell->SpellFamilyFlags2

--HG--
branch : trunk
This commit is contained in:
Muhaha
2009-02-20 14:14:16 +01:00
parent 53d0bf87ad
commit 04560f0437
49 changed files with 5583 additions and 5616 deletions
+4 -5
View File
@@ -108,9 +108,9 @@ void ScriptedAI::AttackStart(Unit* who)
void ScriptedAI::UpdateAI(const uint32 diff)
{
//Check if we have a current target
if (m_creature->isAlive() && UpdateVictim())
if (UpdateVictim())
{
if (m_creature->isAttackReady() )
if (m_creature->isAttackReady())
{
//If we are within range melee the target
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
@@ -169,11 +169,10 @@ void ScriptedAI::DoStartNoMovement(Unit* victim)
m_creature->StopMoving();
}
void ScriptedAI::DoMeleeAttackIfReady()
{
//Make sure our attack is ready and we aren't currently casting before checking distance
if (m_creature->isAttackReady() && !m_creature->hasUnitState(UNIT_STAT_CASTING))
//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()))