mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 11:43:18 -04:00
Core/SAI: Add event_parm5 "player only" for EVENT_OOC_LOS and EVENT_IC_LOS
Closes #21497
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user