Core/SAI: Add event_parm5 "player only" for EVENT_OOC_LOS and EVENT_IC_LOS
Port From (https://github.com/TrinityCore/TrinityCore/commit/77ee6dca456110336700460b25273a4de8061248)
This commit is contained in:
@@ -3162,9 +3162,11 @@ namespace Game.AI
|
||||
if (me.IsWithinDistInMap(unit, range) && me.IsWithinLOSInMap(unit))
|
||||
{
|
||||
//if friendly event&&who is not hostile OR hostile event&&who is hostile
|
||||
if ((e.Event.los.noHostile != 0 && !me.IsHostileTo(unit)) ||
|
||||
(e.Event.los.noHostile == 0 && me.IsHostileTo(unit)))
|
||||
if ((e.Event.los.noHostile != 0 && !me.IsHostileTo(unit)) || (e.Event.los.noHostile == 0 && me.IsHostileTo(unit)))
|
||||
{
|
||||
if (e.Event.los.playerOnly && !unit.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
RecalcTimer(e, e.Event.los.cooldownMin, e.Event.los.cooldownMax);
|
||||
ProcessAction(e, unit);
|
||||
}
|
||||
@@ -3182,9 +3184,11 @@ namespace Game.AI
|
||||
if (me.IsWithinDistInMap(unit, range) && me.IsWithinLOSInMap(unit))
|
||||
{
|
||||
//if friendly event&&who is not hostile OR hostile event&&who is hostile
|
||||
if ((e.Event.los.noHostile != 0 && !me.IsHostileTo(unit)) ||
|
||||
(e.Event.los.noHostile == 0 && me.IsHostileTo(unit)))
|
||||
if ((e.Event.los.noHostile != 0 && !me.IsHostileTo(unit)) || (e.Event.los.noHostile == 0 && me.IsHostileTo(unit)))
|
||||
{
|
||||
if (e.Event.los.playerOnly && !unit.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
RecalcTimer(e, e.Event.los.cooldownMin, e.Event.los.cooldownMax);
|
||||
ProcessAction(e, unit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user