Core/SmartAI: fix logic in HAS_AURA event

note: copy-paste from eai is bad idea ..

--HG--
branch : trunk
This commit is contained in:
Rat
2010-10-31 22:11:56 +01:00
parent 32f088558d
commit 96df97c5ae

View File

@@ -1408,10 +1408,11 @@ void SmartScript::ProcessEvent(SmartScriptHolder &e, Unit* unit, uint32 var0, ui
{
if (!me) return;
uint32 count = me->GetAuraCount(e.event.aura.spell);
if (count < e.event.aura.count)
return;
ProcessAction(e);
RecalcTimer(e, e.event.aura.repeatMin, e.event.aura.repeatMax);
if ((!e.event.aura.count && !count) || (e.event.aura.count && count >= e.event.aura.count))
{
ProcessAction(e);
RecalcTimer(e, e.event.aura.repeatMin, e.event.aura.repeatMax);
}
break;
}
case SMART_EVENT_TARGET_BUFFED: