Core/SAI: Add event_parm5 "player only" for EVENT_OOC_LOS and EVENT_IC_LOS

Closes #21497
This commit is contained in:
Killyana authored and Aokromes committed 2018-03-12 12:40:14 +01:00
1 parent ad4d1b20b6
commit 81698da80d
2 files changed
+17 -8

No files matched your search

@@ -3431,10 +3431,14 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
//if friendly event&&who is not hostile OR hostile event&&who is hostile
if ((e.event.los.noHostile && !me->IsHostileTo(unit)) ||
(!e.event.los.noHostile && me->IsHostileTo(unit)))
{
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
ProcessAction(e, unit);
}
if (!me || !unit)
return;
if (e.event.los.playerOnly && unit->GetTypeId() != TYPEID_PLAYER)
return;
if (e.event.los.playerOnly == TYPEID_PLAYER)
return;
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
ProcessAction(e, unit);
}
break;
}
@@ -3451,10 +3455,14 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
//if friendly event&&who is not hostile OR hostile event&&who is hostile
if ((e.event.los.noHostile && !me->IsHostileTo(unit)) ||
(!e.event.los.noHostile && me->IsHostileTo(unit)))
{
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
ProcessAction(e, unit);
}
if (!me || !unit)
return;
if (e.event.los.playerOnly && unit->GetTypeId() != TYPEID_PLAYER)
return;
if (e.event.los.playerOnly == TYPEID_PLAYER)
return;
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
ProcessAction(e, unit);
}
break;
}