diff options
author | megamage <none@none> | 2009-05-20 11:44:38 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-20 11:44:38 -0500 |
commit | 6473e943581439f57918abfa91a4d5a29e2f343c (patch) | |
tree | 01b7419dcc1ac0444375d11b22cd55d72897854a /src/game/AggressorAI.cpp | |
parent | d1d194b4c78aec34d65a15ea68acff5c3a48687c (diff) |
*Update Naxx scripts. Now only Kelthuzad is incompleted
--HG--
branch : trunk
Diffstat (limited to 'src/game/AggressorAI.cpp')
-rw-r--r-- | src/game/AggressorAI.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/game/AggressorAI.cpp b/src/game/AggressorAI.cpp index 218f19a1c21..d827e3e2672 100644 --- a/src/game/AggressorAI.cpp +++ b/src/game/AggressorAI.cpp @@ -85,26 +85,7 @@ void SpellAI::UpdateAI(const uint32 diff) if(uint32 spellId = events.ExecuteEvent()) { - Unit *target = NULL; - //sLog.outError("aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target); - switch(AISpellInfo[spellId].target) - { - default: - case AITARGET_SELF: target = me; break; - case AITARGET_VICTIM: target = me->getVictim(); break; - case AITARGET_ENEMY: target = SelectTarget(SELECT_TARGET_RANDOM); break; - case AITARGET_ALLY: target = me; break; - case AITARGET_BUFF: target = me; break; - case AITARGET_DEBUFF: - { - const SpellEntry * spellInfo = GetSpellStore()->LookupEntry(spellId); - bool playerOnly = spellInfo->AttributesEx3 & SPELL_ATTR_EX3_PLAYERS_ONLY; - float range = GetSpellMaxRange(spellInfo, false); - target = SelectTarget(SELECT_TARGET_RANDOM, 0, range, playerOnly, -(int32)spellId); - break; - } - } - if(target) me->CastSpell(target, spellId, false); + DoCast(spellId); events.ScheduleEvent(spellId, AISpellInfo[spellId].cooldown + rand()%AISpellInfo[spellId].cooldown); } else |