add event FRAME_UPDATE in Power prototype for non milti unit units, player, target and etc (aka UNIT_POWER_FREQUENT in retail)
This commit is contained in:
@@ -563,6 +563,8 @@ local function RunTriggerFunc(allStates, data, id, triggernum, event, arg1, arg2
|
||||
else
|
||||
arg1 = data.trigger.unit
|
||||
end
|
||||
elseif event == "FRAME_UPDATE" and not Private.multiUnitUnits[data.trigger.unit] then
|
||||
arg1 = data.trigger.unit
|
||||
end
|
||||
if arg1 then
|
||||
if Private.multiUnitUnits[data.trigger.unit] then
|
||||
|
||||
@@ -1560,11 +1560,15 @@ Private.event_prototypes = {
|
||||
AddUnitEventForEvents(result, unit, "UNIT_DISPLAYPOWER")
|
||||
AddUnitEventForEvents(result, unit, "UNIT_HAPPINESS")
|
||||
AddUnitEventForEvents(result, unit, "UNIT_NAME_UPDATE")
|
||||
|
||||
if trigger.use_ignoreDead or trigger.use_ignoreDisconnected then
|
||||
AddUnitEventForEvents(result, unit, "UNIT_FLAGS")
|
||||
end
|
||||
|
||||
if unit and not Private.multiUnitUnits[unit] then
|
||||
if not result.events then
|
||||
result.events = {}
|
||||
end
|
||||
tinsert(result.events, "FRAME_UPDATE")
|
||||
end
|
||||
return result;
|
||||
end,
|
||||
internal_events = function(trigger)
|
||||
|
||||
Reference in New Issue
Block a user