Core/SAI: Implemented SMART_EVENT_IS_BEHIND_TARGET, it is triggered when the creature is behind its current target.

Signed-off-by: Manuel Carrasco <manue.l@live.com.ar>
This commit is contained in:
Manuel Carrasco
2011-04-14 00:30:32 -03:00
parent c9fb601174
commit 4796848b83
3 changed files with 30 additions and 4 deletions

View File

@@ -450,6 +450,10 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
if (!IsSpellValid(e, e.event.dummy.spell)) return false;
if (e.event.dummy.effIndex > EFFECT_2) return false;
break;
case SMART_EVENT_IS_BEHIND_TARGET:
if (!IsMinMaxValid(e, e.event.behindTarget.cooldownMin, e.event.behindTarget.cooldownMax))
return false;
break;
case SMART_EVENT_TIMED_EVENT_TRIGGERED:
case SMART_EVENT_INSTANCE_PLAYER_ENTER:
case SMART_EVENT_TRANSPORT_RELOCATE: