struct trigcontest extends array
static method a takes nothing returns boolean
return true
endmethod
static method onInit takes nothing returns nothing
local trigger trig = CreateTrigger()
local boolexpr bool = Condition(function thistype.a)
local triggercondition con1 = TriggerAddCondition(trig, bool)
local triggercondition con2
local triggercondition con3
call TriggerRemoveCondition(trig, con1)
set con2 = TriggerAddCondition(trig, bool)
set con3 = TriggerAddCondition(trig, bool)
if(con1 == con2) then
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "A")
endif
if(con3 == con2) then
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "B")
endif
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, I2S(GetHandleId(bool)))
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, I2S(GetHandleId(con1)))
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, I2S(GetHandleId(con2)))
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, I2S(GetHandleId(con3)))
endmethod
endstruct