mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 20:22:23 -04:00
Core/Conditions: Allow to set SAI conditions to both the invoker and the object using ConditionTarget column.
ConditionTarget 0 = invoker ConditionTarget 1 = object Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
@@ -85,14 +85,9 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3
|
||||
if (eventType == e/* && (!(*i).event.event_phase_mask || IsInPhase((*i).event.event_phase_mask)) && !((*i).event.event_flags & SMART_EVENT_FLAG_NOT_REPEATABLE && (*i).runOnce)*/)
|
||||
{
|
||||
bool meets = true;
|
||||
if (unit)
|
||||
{
|
||||
if (Player* player = unit->ToPlayer())
|
||||
{
|
||||
ConditionList conds = sConditionMgr->GetConditionsForSmartEvent((*i).entryOrGuid, (*i).event_id, (*i).source_type);
|
||||
meets = sConditionMgr->IsObjectMeetToConditions(player, conds);
|
||||
}
|
||||
}
|
||||
ConditionList conds = sConditionMgr->GetConditionsForSmartEvent((*i).entryOrGuid, (*i).event_id, (*i).source_type);
|
||||
ConditionSourceInfo info = ConditionSourceInfo(unit, GetBaseObject());
|
||||
meets = sConditionMgr->IsObjectMeetToConditionList(info, conds);
|
||||
|
||||
if (meets)
|
||||
ProcessEvent(*i, unit, var0, var1, bvar, spell, gob);
|
||||
|
||||
Reference in New Issue
Block a user