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

Closes #21497
This commit is contained in:
Killyana
2018-03-11 18:46:07 +01:00
parent 8f0af67bcb
commit 5ad38c31b0
2 changed files with 17 additions and 8 deletions

View File

@@ -3001,10 +3001,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;
}
@@ -3021,10 +3025,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;
}