// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals // integer PLAYER_NEUTRAL_PASSIVE=0 // integer PLAYER_NEUTRAL_AGGRESSIVE=0 // unitstate UNIT_STATE_MANA=null // playerevent EVENT_PLAYER_LEAVE=null // playerevent EVENT_PLAYER_END_CINEMATIC=null // playerunitevent EVENT_PLAYER_UNIT_ISSUED_ORDER=null // unitevent EVENT_UNIT_DAMAGED=null // playerevent EVENT_PLAYER_ARROW_LEFT_DOWN=null // playerevent EVENT_PLAYER_ARROW_LEFT_UP=null // playerevent EVENT_PLAYER_ARROW_RIGHT_DOWN=null // playerevent EVENT_PLAYER_ARROW_RIGHT_UP=null // playerevent EVENT_PLAYER_ARROW_DOWN_DOWN=null // playerevent EVENT_PLAYER_ARROW_DOWN_UP=null // playerevent EVENT_PLAYER_ARROW_UP_DOWN=null // playerevent EVENT_PLAYER_ARROW_UP_UP=null // playerevent EVENT_PLAYER_MOUSE_DOWN=null // playerevent EVENT_PLAYER_MOUSE_UP=null // playerevent EVENT_PLAYER_MOUSE_MOVE=null // playerunitevent EVENT_PLAYER_UNIT_SPELL_EFFECT=null // originframetype ORIGIN_FRAME_GAME_UI=null // integer bj_MAX_PLAYERS=0 // integer bj_MAX_PLAYER_SLOTS=0 // rect bj_mapInitialPlayableArea=null player Basics_DUMMY_PLAYER=null integer array BitSet_pows playerevent ClosureEvents_EVENT_PLAYER_CHAT_FILTER=null trigger ClosureEvents_unitTrig=null trigger ClosureEvents_leaveTrig=null trigger ClosureEvents_keyTrig=null integer array ClosureEvents_eventidToIndex integer ClosureEvents_eventTypeCounter=0 integer EventListener_castMap=0 integer array EventListener_castMapCasters integer array EventListener_generalListenersFirsts integer array EventListener_unitListenersFirsts boolean EventListener_useMouseEvents=false integer array ClosureForGroups_tempCallbacks integer ClosureForGroups_iterCount=0 integer ClosureTimers_x=0 string array Colors_hexs integer Colors_decs=0 real DummyRecycler_ANGLE_DEGREE=0. integer array DummyRecycler_angleQueues hashtable ErrorHandling_HT=null framehandle Framehandle_GAME_UI=null real GameTimer_currentTime=0. hashtable HashList_ht=null hashtable HashList_occurences=null unit InstantDummyCaster_caster=null boolean MagicFunctions_compiletime=false rect MapBounds_playableMapRect=null rect MapBounds_boundRect=null region MapBounds_boundRegion=null real MapBounds_playableMin_x=0. real MapBounds_playableMin_y=0. real MapBounds_boundMin_x=0. real MapBounds_boundMin_y=0. real MapBounds_boundMax_x=0. real MapBounds_boundMax_y=0. trigger OnUnitEnterLeave_eventTrigger=null group OnUnitEnterLeave_preplacedUnits=null unit array OnUnitEnterLeave_tempUnits integer OnUnitEnterLeave_tempUnitsCount=0 player array Player_players player Player_localPlayer=null group Preloader_dumg=null unit Preloader_dum=null trigger array RegisterEvents_t integer RegisterEvents_onCastMap=0 integer StringUtils_MAX_INDEX=0 hashtable Table_ht=null timer array TimerUtils_freeTimers integer TimerUtils_freeTimersCount=0 integer TimerUtils_timerData=0 integer TypeCasting_typecastdata=0 trigger UnitIndexer_onIndexTrigger=null trigger UnitIndexer_onDeindexTrigger=null unit array UnitIndexer_tempUnits integer UnitIndexer_tempUnitsCount=0 integer nullclosurebug_MAX_PLAYERS=0 integer nullclosurebug_commands=0 hashtable hashtable_compiletime=null hashtable hashtable_compiletime_161=null hashtable hashtable_compiletime_162=null hashtable hashtable_compiletime_163=null integer array CallbackSingle_nextFree integer CallbackSingle_firstFree=0 integer CallbackSingle_maxIndex=0 integer array CallbackSingle_typeId integer EventListener_firstFree=0 integer array EventListener_typeId integer array OnCastListener_nextFree integer OnCastListener_firstFree=0 integer OnCastListener_maxIndex=0 integer array OnCastListener_typeId integer array ForGroupCallback_nextFree integer ForGroupCallback_firstFree=0 integer ForGroupCallback_maxIndex=0 integer array ForGroupCallback_typeId integer Callback_firstFree=0 integer array Callback_typeId integer array DummyCaster_nextFree integer DummyCaster_firstFree=0 integer DummyCaster_maxIndex=0 integer array DummyCaster_typeId integer array HashList_typeId integer array Table_nextFree integer Table_firstFree=0 integer Table_maxIndex=0 integer array Table_typeId integer Comparator_firstFree=0 integer Comparator_maxIndex=0 integer array LLEntry_nextFree integer LLEntry_firstFree=0 integer LLEntry_maxIndex=0 integer array LLEntry_typeId integer array LLItrClosure_nextFree integer LLItrClosure_firstFree=0 integer LLItrClosure_maxIndex=0 integer array LLItrClosure_typeId integer array LinkedList_nextFree integer LinkedList_firstFree=0 integer LinkedList_maxIndex=0 integer array LinkedList_typeId integer array MapClosure_typeId integer array IdGenerator_nextFree integer IdGenerator_firstFree=0 integer IdGenerator_maxIndex=0 integer OrderStringFactory_firstFree=0 integer OrderStringFactory_maxIndex=0 integer array UnitIndex_nextFree integer UnitIndex_firstFree=0 integer UnitIndex_maxIndex=0 integer array UnitIndex_typeId integer array CommandHandler_nextFree integer CommandHandler_firstFree=0 integer CommandHandler_maxIndex=0 integer array CommandHandler_typeId integer array EventListener_eventId integer array EventListener_uid integer array EventListener_next integer array EventListener_prev integer array OnCastListener_next integer array OnCastListener_prev integer array OnCastListener_abilId unit array OnCastListener_eventUnit integer array cb timerdialog array dia timer array CallbackSingle_t integer array DummyCaster_castCount real array DummyCaster_delay player array DummyCaster_owner real array DummyCaster_origin_x real array DummyCaster_origin_y integer array this unit array dummy integer array id unit array u integer array HashList_size integer array HashMap_size integer array IterableMap_keys integer array result integer array LLEntry_elem integer array LLEntry_prev integer array LLEntry_next integer array LinkedList_dummy integer array LinkedList_size integer array output integer array itr unit array UnitIndex__unit unit array a unit array a_153 integer wurst_stack_depth=0 string array wurst_stack code ref_function_init_Abilities=null code ref_function_init_AbilityIds=null code ref_function_init_Real=null code ref_function_init_Integer=null code ref_function_init_BitSet=null code ref_function_init_String=null code ref_function_init_TargetsAllowed=null code ref_function_init_Angle=null code ref_function_init_Vectors=null code ref_function_init_Destructable=null code ref_function_init_Player=null code ref_function_init_Maths=null code ref_function_init_Printing=null code ref_function_init_MagicFunctions=null code ref_function_init_Basics=null code ref_function_init_GameTimer=null code ref_function_init_ErrorHandling=null code ref_function_init_Matrices=null code ref_function_init_Quaternion=null code ref_function_init_Table=null code ref_function_init_Playercolor=null code ref_function_bridge_init_Colors=null code ref_function_bridge_init_Framehandle=null code ref_function_init_Group=null code ref_function_init_Lightning=null code ref_function_init_WeatherEffects=null code ref_function_bridge_init_TypeCasting=null code ref_function_init_HashList=null code ref_function_bridge_init_EventHelper=null code ref_function_init_AbilityObjEditing=null code ref_function_init_AttachmentPoints=null code ref_function_init_BuffIds=null code ref_function_init_Buildings=null code ref_function_init_ClosureForGroups=null code ref_function_bridge_init_LinkedList=null code ref_function_init_ObjectIds=null code ref_function_bridge_init_TimerUtils=null code ref_function_init_ClosureTimers=null code ref_function_init_UnitIds=null code ref_function_init_MapBounds=null code ref_function_bridge_init_Preloader=null code ref_function_bridge_init_ObjectIdGenerator=null code ref_function_init_Icons=null code ref_function_bridge_init_ChannelAbilityPreset=null code ref_function_bridge_init_RegisterEvents=null code ref_function_init_Orders=null code ref_function_bridge_init_OnUnitEnterLeave=null code ref_function_init_UnitIndexer=null code ref_function_bridge_init_ClosureEvents=null code ref_function_init_Doodads=null code ref_function_bridge_init_DummyRecycler=null code ref_function_init_InstantDummyCaster=null code ref_function_init_ItemIds=null code ref_function_init_Objects=null code ref_function_init_Sounds=null code ref_function_init_Soundsets=null code ref_function_bridge_init_StringUtils=null code ref_function_init_Textures=null code ref_function_init_UI=null code ref_function_init_Units=null code ref_function_bridge_init_nullclosurebug=null code ref_function_code__onUnitIndex_ClosureEvents=null code ref_function_bridge_code__onUnitDeindex_ClosureEvents=null code ref_function_bridge_EventListener_generalEventCallback=null code ref_function_bridge_code__Filter_ClosureForGroups=null code ref_function_code__startPeriodic_GameTimer=null code ref_function_bridge_code__onEnter_UnitIndexer=null code ref_function_bridge_code__onLeave_UnitIndexer=null code ref_function_bridge_code__addAction_nullclosurebug=null code ref_function_bridge_code__addAction_nullTimer_ClosureEvents=null code ref_function_bridge_code__addAction_nullTimer_ClosureEvents_172=null code ref_function_bridge_code__addAction_nullTimer_ClosureEvents_173=null code ref_function_bridge_code__registerPlayerUnitEvent_nullTimer_ClosureEvents=null code ref_function_bridge_code__start_CallbackSingle_ClosureTimers=null code ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave=null code ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave=null code ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave=null code ref_function_bridge_code__registerPlayerUnitEvent_RegisterEvents=null endglobals function Loglevel_getTag takes integer this_1 returns string if this_1 == 0 then return "|cffADADADtrace|r" elseif this_1 == 1 then return "|cff2685DCdebug|r" elseif this_1 == 2 then return "|cffFFCC00info|r" elseif this_1 == 3 then return "|cffF47E3Ewarning|r" else return "|cffFB2700error|r" endif endfunction function compileError takes string msg returns nothing endfunction function error takes string msg, string w__wurst_stackPos returns nothing local integer hash local integer stacktraceIndex local integer stacktraceLimit local player showTo set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else set hash = StringHash(msg) if HaveSavedInteger(ErrorHandling_HT, -1, hash) then if LoadInteger(ErrorHandling_HT, -1, hash) + 60 < GameTimer_currentTime then set w__wurst_stackPos = msg set msg = "" set stacktraceIndex = wurst_stack_depth set stacktraceLimit = 0 loop set stacktraceIndex = stacktraceIndex - 1 set stacktraceLimit = stacktraceLimit + 1 exitwhen stacktraceLimit > 20 or stacktraceIndex < 0 set msg = msg + "\n " + wurst_stack[stacktraceIndex] endloop set msg = w__wurst_stackPos + msg set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + msg) endif call SaveInteger(ErrorHandling_HT, -1, hash, R2I(GameTimer_currentTime)) call SaveBoolean(ErrorHandling_HT, -1, hash, false) elseif HaveSavedBoolean(ErrorHandling_HT, -1, hash) then if not LoadBoolean(ErrorHandling_HT, -1, hash) then set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + "|cffFF3A29Excessive repeating errors are being omitted") endif call SaveBoolean(ErrorHandling_HT, -1, hash, true) endif else set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + "|cffFF3A29Excessive repeating errors are being omitted") endif call SaveBoolean(ErrorHandling_HT, -1, hash, true) endif else call SaveInteger(ErrorHandling_HT, -1, hash, R2I(GameTimer_currentTime)) set msg = "Message: " + msg set w__wurst_stackPos = "" set stacktraceIndex = wurst_stack_depth set hash = 0 loop set stacktraceIndex = stacktraceIndex - 1 set hash = hash + 1 exitwhen hash > 20 or stacktraceIndex < 0 set w__wurst_stackPos = w__wurst_stackPos + "\n " + wurst_stack[stacktraceIndex] endloop set msg = msg + w__wurst_stackPos set showTo = Player_localPlayer if 2 <= 4 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(4) + " - " + msg) endif endif call I2S(1 / 0) endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function initCompiletimeState_0 takes nothing returns nothing set hashtable_compiletime_163 = InitHashtable() set hashtable_compiletime_162 = InitHashtable() set hashtable_compiletime_161 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_161, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_161, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_161, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_161, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_161, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_161, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_161, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_161, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_161, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_161, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_161, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_161, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_161, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_161, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_161, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_161, 1, 789744696, 15) call SaveStr(hashtable_compiletime_161, 2, 0, "") call SaveStr(hashtable_compiletime_161, 2, 1804483594, "air") call SaveStr(hashtable_compiletime_161, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime_161, 2, -681966791, "ground") call SaveStr(hashtable_compiletime_161, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime_161, 2, 392811314, "item") call SaveStr(hashtable_compiletime_161, 2, 124309475, "structure") call SaveStr(hashtable_compiletime_161, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime_161, 2, -85648186, "ward") call SaveStr(hashtable_compiletime_161, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime_161, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime_161, 2, -263269125, "AM03") call SaveStr(hashtable_compiletime_161, 2, 512215473, "Agho") endfunction function registerPlayerUnitEvent takes playerunitevent p, code filter, code condition, code action returns nothing local integer hid = GetHandleId(p) local integer k local filterfunc cond_result local trigger temp local player temp_1 if RegisterEvents_t[hid] == null then set RegisterEvents_t[hid] = CreateTrigger() set k = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen k < 0 set temp = RegisterEvents_t[hid] set temp_1 = Player_players[k] if filter != null then set cond_result = Filter(filter) else set cond_result = null endif call TriggerRegisterPlayerUnitEvent(temp, temp_1, p, cond_result) set k = k - 1 endloop endif if condition != null then call TriggerAddCondition(RegisterEvents_t[hid], Filter(condition)) endif if action != null then call TriggerAddAction(RegisterEvents_t[hid], action) endif endfunction function registerEventId takes eventid evnt, string w__wurst_stackPos returns integer local integer eventId local trigger receiver local integer eventId_1 local boolean andLeft set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set eventId = GetHandleId(evnt) set ClosureEvents_eventTypeCounter = ClosureEvents_eventTypeCounter + 1 set ClosureEvents_eventidToIndex[eventId] = ClosureEvents_eventTypeCounter set eventId_1 = GetHandleId(evnt) if (eventId_1 >= 18 and eventId_1 <= 51) or (eventId_1 >= 269 and eventId_1 <= 277) or eventId_1 == 315 or eventId_1 == 308 then call registerPlayerUnitEvent(ConvertPlayerUnitEvent(eventId), null, ref_function_bridge_EventListener_generalEventCallback, null) else if evnt != EVENT_UNIT_DAMAGED and evnt != EVENT_PLAYER_LEAVE and evnt != ClosureEvents_EVENT_PLAYER_CHAT_FILTER then set eventId_1 = GetHandleId(evnt) set andLeft = eventId_1 < 261 or eventId_1 > 268 and eventId_1 != 17 else set andLeft = false endif if andLeft then set eventId_1 = GetHandleId(evnt) set andLeft = eventId_1 < 305 or eventId_1 > 307 else set andLeft = false endif if andLeft then call error("registering handleid: " + I2S(eventId) + " non-playerunitevent. Except EVENT_UNIT_DAMAGED and EVENT_PLAYER_LEAVE these are not supported right now.", "when calling error in ClosureEvents, line 256") endif endif set eventId = GetHandleId(evnt) if eventId >= 305 and eventId <= 307 and ( not EventListener_useMouseEvents) then set EventListener_useMouseEvents = true set eventId = 0 set eventId_1 = bj_MAX_PLAYERS - 1 loop exitwhen eventId > eventId_1 set receiver = ClosureEvents_keyTrig call TriggerRegisterPlayerEvent(receiver, Player_players[eventId], EVENT_PLAYER_MOUSE_UP) call TriggerRegisterPlayerEvent(receiver, Player_players[eventId], EVENT_PLAYER_MOUSE_DOWN) call TriggerRegisterPlayerEvent(receiver, Player_players[eventId], EVENT_PLAYER_MOUSE_MOVE) set eventId = eventId + 1 endloop endif set wurst_stack_depth = wurst_stack_depth - 1 return ClosureEvents_eventTypeCounter endfunction function EventListener_generalEventCallback takes string w__wurst_stackPos returns nothing local unit trigUnit local integer id_1 local integer listener local eventid this_1 local boolean andLeft set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set trigUnit = GetTriggerUnit() set this_1 = GetTriggerEventId() set wurst_stack[wurst_stack_depth] = "when calling toIntId in ClosureEvents, line 180" set wurst_stack_depth = wurst_stack_depth + 1 set id_1 = ClosureEvents_eventidToIndex[GetHandleId(this_1)] if id_1 == 0 then set id_1 = registerEventId(this_1, "when calling registerEventId in ClosureEvents, line 243") endif set wurst_stack_depth = wurst_stack_depth - 1 if trigUnit != null then set andLeft = GetUnitUserData(trigUnit) > 0 else set andLeft = false endif if andLeft then if EventListener_unitListenersFirsts[GetUnitUserData(trigUnit)] != 0 then set listener = EventListener_unitListenersFirsts[GetUnitUserData(trigUnit)] loop exitwhen listener == 0 set listener = EventListener_next[listener] endloop endif endif if EventListener_generalListenersFirsts[id_1] != 0 then set id_1 = EventListener_generalListenersFirsts[id_1] loop exitwhen id_1 == 0 set id_1 = EventListener_next[id_1] endloop endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_EventListener_generalEventCallback takes nothing returns nothing set wurst_stack_depth = 0 call EventListener_generalEventCallback("via function reference ClosureEvents, line 254") endfunction function new_LLEntry takes integer elem, integer prev, integer next, string w__wurst_stackPos returns integer local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_LLEntry in LinkedList, line 434" set wurst_stack_depth = wurst_stack_depth + 1 if LLEntry_firstFree == 0 then if LLEntry_maxIndex < 32768 then set LLEntry_maxIndex = LLEntry_maxIndex + 1 set this_1 = LLEntry_maxIndex set LLEntry_typeId[this_1] = 721 else call error("Out of memory: Could not create LLEntry.", "when calling error in LinkedList, line 429") set this_1 = 0 endif else set LLEntry_firstFree = LLEntry_firstFree - 1 set this_1 = LLEntry_nextFree[LLEntry_firstFree] set LLEntry_typeId[this_1] = 721 endif set wurst_stack_depth = wurst_stack_depth - 1 set LLEntry_elem[this_1] = elem set LLEntry_prev[this_1] = prev set LLEntry_next[this_1] = next set wurst_stack_depth = wurst_stack_depth - 1 return this_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this_1, integer elems_0, string w__wurst_stackPos returns nothing local integer entry set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.add", "when calling error in LinkedList, line 38") else call error("Called LinkedList.add on invalid object.", "when calling error in LinkedList, line 38") endif endif set wurst_stack[wurst_stack_depth] = "when calling add in LinkedList, line 38" set wurst_stack_depth = wurst_stack_depth + 1 set entry = new_LLEntry(elems_0, LLEntry_prev[LinkedList_dummy[this_1]], LinkedList_dummy[this_1], "when calling new_LLEntry in LinkedList, line 40") set LLEntry_next[LLEntry_prev[LinkedList_dummy[this_1]]] = entry set LLEntry_prev[LinkedList_dummy[this_1]] = entry set LinkedList_size[this_1] = LinkedList_size[this_1] + 1 set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback takes integer this_1, unit u_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.callback", "when calling error in ClosureForGroups, line 4") else call error("Called ForGroupCallback.callback on invalid object.", "when calling error in ClosureForGroups, line 4") endif endif if ForGroupCallback_typeId[this_1] <= 667 then set wurst_stack[wurst_stack_depth] = "when calling callback_forEachFrom_LinkedList in ClosureForGroups, line 4" set wurst_stack_depth = wurst_stack_depth + 1 call dispatch_LinkedList_LinkedList_LinkedList_add_1(result[this_1], GetHandleId(u_1), "when calling add in LinkedList, line 574") set wurst_stack_depth = wurst_stack_depth - 1 else call RemoveUnit(u_1) endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_code__Filter_ClosureForGroups takes nothing returns nothing local unit filter set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ClosureForGroups, line 14" set wurst_stack_depth = wurst_stack_depth + 1 set filter = GetFilterUnit() set wurst_stack[wurst_stack_depth] = "when calling filterCallback in ClosureForGroups, line 14" set wurst_stack_depth = wurst_stack_depth + 1 if ClosureForGroups_iterCount < 2147483647 then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(ClosureForGroups_tempCallbacks[-1], filter, "when calling callback in ClosureForGroups, line 18") endif set ClosureForGroups_iterCount = ClosureForGroups_iterCount + 1 set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function bridge_code__addAction_nullTimer_ClosureEvents takes nothing returns nothing set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ClosureEvents, line 299" set wurst_stack_depth = wurst_stack_depth + 1 call EventListener_generalEventCallback("when calling generalEventCallback in ClosureEvents, line 299") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_code__addAction_nullTimer_ClosureEvents_137 takes nothing returns nothing set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ClosureEvents, line 300" set wurst_stack_depth = wurst_stack_depth + 1 call EventListener_generalEventCallback("when calling generalEventCallback in ClosureEvents, line 300") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_code__addAction_nullTimer_ClosureEvents_138 takes nothing returns nothing set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ClosureEvents, line 301" set wurst_stack_depth = wurst_stack_depth + 1 call EventListener_generalEventCallback("when calling generalEventCallback in ClosureEvents, line 301") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function stringToIndex takes string s, string w__wurst_stackPos returns integer local integer hash local integer this_1 local boolean Table_Table_hasString_result set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set hash = StringHash(s) loop set this_1 = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling hasString in TypeCasting, line 26" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.hasString", "when calling error in Table, line 19") else call error("Called Table.hasString on invalid object.", "when calling error in Table, line 19") endif endif set Table_Table_hasString_result = HaveSavedString(Table_ht, this_1, hash) set wurst_stack_depth = wurst_stack_depth - 1 set this_1 = TypeCasting_typecastdata if Table_Table_hasString_result then set wurst_stack[wurst_stack_depth] = "when calling loadString in TypeCasting, line 27" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadString", "when calling error in Table, line 58") else call error("Called Table.loadString on invalid object.", "when calling error in Table, line 58") endif endif set w__wurst_stackPos = LoadStr(Table_ht, this_1, hash) set wurst_stack_depth = wurst_stack_depth - 1 exitwhen w__wurst_stackPos == s else set wurst_stack[wurst_stack_depth] = "when calling saveString in TypeCasting, line 30" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveString", "when calling error in Table, line 61") else call error("Called Table.saveString on invalid object.", "when calling error in Table, line 61") endif endif call SaveStr(Table_ht, this_1, hash, s) set wurst_stack_depth = wurst_stack_depth - 1 exitwhen true endif set hash = hash + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 return hash endfunction function run_wrapper takes integer this_1, integer t, string w__wurst_stackPos returns integer local integer byteno local integer charValue set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set w__wurst_stackPos = "" set this_1 = t set byteno = 0 loop exitwhen byteno > 3 set charValue = ModuloInteger(this_1, 256) set this_1 = this_1 / 256 set w__wurst_stackPos = SubString(".................................!.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~.................................................................................................................................", charValue, charValue + 1) + w__wurst_stackPos set byteno = byteno + 1 endloop set t = stringToIndex(w__wurst_stackPos, "when calling stringToIndex in ObjectIds, line 60") set wurst_stack_depth = wurst_stack_depth - 1 return t endfunction function run_wrapper_284 takes integer this_1, integer t, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling stringFromIndex in nullclosurebug.wurst, line 92" set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling loadString in TypeCasting, line 36" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadString", "when calling error in Table, line 58") else call error("Called Table.loadString on invalid object.", "when calling error in Table, line 58") endif endif set w__wurst_stackPos = LoadStr(Table_ht, this_1, t) set wurst_stack_depth = wurst_stack_depth - 1 - 1 call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., 45., w__wurst_stackPos) set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_LLItrClosure_LinkedList_LLItrClosure_run takes integer this_1, integer t, string w__wurst_stackPos returns nothing local integer temp set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LLItrClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLItrClosure.run", "when calling error in LinkedList, line 549") else call error("Called LLItrClosure.run on invalid object.", "when calling error in LinkedList, line 549") endif endif if LLItrClosure_typeId[this_1] <= 724 then set wurst_stack[wurst_stack_depth] = "when calling run_forEach_LinkedList_LinkedList in LinkedList, line 549" set wurst_stack_depth = wurst_stack_depth + 1 set temp = output[this_1] set this_1 = itr[this_1] set wurst_stack[wurst_stack_depth] = "when calling run in LinkedList, line 297" set wurst_stack_depth = wurst_stack_depth + 1 if MapClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling MapClosure.run", "when calling error in LinkedList, line 555") else call error("Called MapClosure.run on invalid object.", "when calling error in LinkedList, line 555") endif endif set t = run_wrapper(this_1, t, "when calling run_wrapper in LinkedList, line 555") set wurst_stack_depth = wurst_stack_depth - 1 call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp, t, "when calling add in LinkedList, line 297") set wurst_stack_depth = wurst_stack_depth - 1 else call run_wrapper_284(this_1, t, "when calling run_wrapper in LinkedList, line 549") endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_LLItrClosure_destroyLLItrClosure takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LLItrClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLItrClosure.LLItrClosure", "when calling error in LinkedList, line 548") else call error("Called LLItrClosure.LLItrClosure on invalid object.", "when calling error in LinkedList, line 548") endif endif set wurst_stack[wurst_stack_depth] = "when calling destroyLLItrClosure in LinkedList, line 548" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling dealloc_LLItrClosure in LinkedList, line 548" set wurst_stack_depth = wurst_stack_depth + 1 if LLItrClosure_typeId[this_1] == 0 then call error("Double free: object of type LLItrClosure", "when calling error in LinkedList, line 548") else set LLItrClosure_nextFree[LLItrClosure_firstFree] = this_1 set LLItrClosure_firstFree = LLItrClosure_firstFree + 1 set LLItrClosure_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_forEach takes integer this_1, integer itr_1, string w__wurst_stackPos returns integer local integer this_2 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.forEach", "when calling error in LinkedList, line 233") else call error("Called LinkedList.forEach on invalid object.", "when calling error in LinkedList, line 233") endif endif set this_2 = this_1 set wurst_stack[wurst_stack_depth] = "when calling forEach in LinkedList, line 233" set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = LLEntry_next[LinkedList_dummy[this_1]] loop exitwhen this_1 == LinkedList_dummy[this_2] call dispatch_LLItrClosure_LinkedList_LLItrClosure_run(itr_1, LLEntry_elem[this_1], "when calling run in LinkedList, line 236") set this_1 = LLEntry_next[this_1] endloop call dispatch_LLItrClosure_destroyLLItrClosure(itr_1, "when calling dispatch_LLItrClosure_destroyLLItrClosure in LinkedList, line 238") set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this_2 endfunction function run_registerCommandAll_nullclosurebug takes integer this_1, player triggerPlayer, integer args, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., 45., "player " + I2S(GetPlayerId(triggerPlayer))) set wurst_stack[wurst_stack_depth] = "when calling alloc_LLItrClosure_forEach_registerCommandAll_nullclosurebug in nullclosurebug.wurst, line 92" set wurst_stack_depth = wurst_stack_depth + 1 if LLItrClosure_firstFree == 0 then if LLItrClosure_maxIndex < 32768 then set LLItrClosure_maxIndex = LLItrClosure_maxIndex + 1 set this_1 = LLItrClosure_maxIndex set LLItrClosure_typeId[this_1] = 725 else call error("Out of memory: Could not create LLItrClosure_forEach_registerCommandAll_nullclosurebug.", "when calling error in nullclosurebug.wurst, line 92") set this_1 = 0 endif else set LLItrClosure_firstFree = LLItrClosure_firstFree - 1 set this_1 = LLItrClosure_nextFree[LLItrClosure_firstFree] set LLItrClosure_typeId[this_1] = 725 endif set wurst_stack_depth = wurst_stack_depth - 1 call dispatch_LinkedList_LinkedList_LinkedList_forEach(args, this_1, "when calling forEach in nullclosurebug.wurst, line 92") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function InstantDummyCaster_finish takes integer id_1 returns nothing call SetUnitOwner(InstantDummyCaster_caster, Basics_DUMMY_PLAYER, false) call UnitRemoveAbility(InstantDummyCaster_caster, id_1) call SetUnitPosition(InstantDummyCaster_caster, MapBounds_boundMax_x, MapBounds_boundMax_y) endfunction function unit_setXYZ takes unit this_1, real pos_x, real pos_y, real pos_z returns nothing call SetUnitX(this_1, pos_x) call SetUnitY(this_1, pos_y) call SetUnitFlyHeight(this_1, pos_z, 0.) endfunction function InstantDummyCaster_prepare takes player owner, integer id_1, integer lvl, real pos_x, real pos_y, real pos_z returns nothing local unit receiver = InstantDummyCaster_caster call UnitAddAbility(receiver, id_1) call SetUnitState(receiver, UNIT_STATE_MANA, 1000000.) if pos_x > MapBounds_boundMin_x and pos_x < MapBounds_boundMax_x and pos_y > MapBounds_boundMin_y and pos_y < MapBounds_boundMax_y then call unit_setXYZ(InstantDummyCaster_caster, pos_x, pos_y, pos_z) endif if lvl > 1 then call SetUnitAbilityLevel(InstantDummyCaster_caster, id_1, lvl) endif if owner != null then call SetUnitOwner(InstantDummyCaster_caster, owner, false) endif endfunction function InstantDummyCaster_castImmediate takes player owner, integer abilityId, integer lvl, integer orderId, real pos_x, real pos_y, real pos_z returns boolean local boolean success call InstantDummyCaster_prepare(owner, abilityId, lvl, pos_x, pos_y, pos_z) set success = IssueImmediateOrderById(InstantDummyCaster_caster, orderId) call InstantDummyCaster_finish(abilityId) return success endfunction function run_registerCommandAll_nullclosurebug_281 takes integer this_1, player triggerPlayer, integer arguments returns nothing local unit this_2 local real temp local real tuple_temp set triggerPlayer = GetOwningPlayer(a[this_1]) set this_2 = a[this_1] set temp = GetUnitX(this_2) set tuple_temp = GetUnitY(this_2) call InstantDummyCaster_castImmediate(triggerPlayer, 1095267427, 1, OrderId("thunderclap"), temp, tuple_temp, 0.) endfunction function run_registerCommandAll_nullclosurebug_282 takes integer this_1, player triggerPlayer, integer arguments returns nothing local group receiver local unit iterUnit call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., 45., GetUnitName(a_153[this_1])) set receiver = CreateGroup() call GroupEnumUnitsSelected(receiver, triggerPlayer, null) loop exitwhen FirstOfGroup(receiver) == null set iterUnit = FirstOfGroup(receiver) call GroupRemoveUnit(receiver, iterUnit) call SetUnitOwner(iterUnit, Player_players[1], true) endloop endfunction function dispatch_CommandHandler_nullclosurebug_CommandHandler_run takes integer this_1, player triggerPlayer, integer arguments, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if CommandHandler_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CommandHandler.run", "when calling error in nullclosurebug.wurst, line 33") else call error("Called CommandHandler.run on invalid object.", "when calling error in nullclosurebug.wurst, line 33") endif endif if CommandHandler_typeId[this_1] <= 654 then if CommandHandler_typeId[this_1] <= 653 then call run_registerCommandAll_nullclosurebug(this_1, triggerPlayer, arguments, "when calling run_registerCommandAll_nullclosurebug in nullclosurebug.wurst, line 33") else call run_registerCommandAll_nullclosurebug_281(this_1, triggerPlayer, arguments) endif else call run_registerCommandAll_nullclosurebug_282(this_1, triggerPlayer, arguments) endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_HashMap_HashMap_HashMap_get takes integer this_1, integer key, string w__wurst_stackPos returns integer local integer parentKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.get", "when calling error in HashMap, line 23") else call error("Called HashMap.get on invalid object.", "when calling error in HashMap, line 23") endif endif set wurst_stack[wurst_stack_depth] = "when calling get in HashMap, line 23" set wurst_stack_depth = wurst_stack_depth + 1 set parentKey = key set wurst_stack[wurst_stack_depth] = "when calling loadInt in HashMap, line 24" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadInt", "when calling error in Table, line 40") else call error("Called Table.loadInt on invalid object.", "when calling error in Table, line 40") endif endif set this_1 = LoadInteger(Table_ht, this_1, parentKey) set wurst_stack_depth = wurst_stack_depth - 1 set key = this_1 set wurst_stack_depth = wurst_stack_depth - 1 - 1 return key endfunction function dispatch_HashMap_HashMap_HashMap_has takes integer this_1, integer key, string w__wurst_stackPos returns boolean local integer parentKey local boolean Table_Table_hasInt_result set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.has", "when calling error in HashMap, line 13") else call error("Called HashMap.has on invalid object.", "when calling error in HashMap, line 13") endif endif set wurst_stack[wurst_stack_depth] = "when calling has in HashMap, line 13" set wurst_stack_depth = wurst_stack_depth + 1 set parentKey = key set wurst_stack[wurst_stack_depth] = "when calling hasInt in HashMap, line 14" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.hasInt", "when calling error in Table, line 10") else call error("Called Table.hasInt on invalid object.", "when calling error in Table, line 10") endif endif set Table_Table_hasInt_result = HaveSavedInteger(Table_ht, this_1, parentKey) set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 return Table_Table_hasInt_result endfunction function dispatch_LinkedList_LinkedList_LinkedList_get takes integer this_1, integer index, string w__wurst_stackPos returns integer local integer stackTrace_tempReturn local integer entry set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.get", "when calling error in LinkedList, line 65") else call error("Called LinkedList.get on invalid object.", "when calling error in LinkedList, line 65") endif endif set wurst_stack[wurst_stack_depth] = "when calling get in LinkedList, line 65" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling getEntry in LinkedList, line 66" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.getEntry", "when calling error in LinkedList, line 399") else call error("Called LinkedList.getEntry on invalid object.", "when calling error in LinkedList, line 399") endif endif set entry = LinkedList_dummy[this_1] set this_1 = 0 loop exitwhen this_1 > index set entry = LLEntry_next[entry] set this_1 = this_1 + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 set stackTrace_tempReturn = LLEntry_elem[entry] set wurst_stack_depth = wurst_stack_depth - 1 - 1 return stackTrace_tempReturn endfunction function new_LinkedList takes string w__wurst_stackPos returns integer local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_LinkedList in LinkedList, line 32" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_firstFree == 0 then if LinkedList_maxIndex < 32768 then set LinkedList_maxIndex = LinkedList_maxIndex + 1 set this_1 = LinkedList_maxIndex set LinkedList_typeId[this_1] = 726 else call error("Out of memory: Could not create LinkedList.", "when calling error in LinkedList, line 18") set this_1 = 0 endif else set LinkedList_firstFree = LinkedList_firstFree - 1 set this_1 = LinkedList_nextFree[LinkedList_firstFree] set LinkedList_typeId[this_1] = 726 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling construct_LinkedList2 in LinkedList, line 32" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling LinkedList_init in LinkedList, line 32" set wurst_stack_depth = wurst_stack_depth + 1 set LinkedList_dummy[this_1] = new_LLEntry(0, 0, 0, "when calling new_LLEntry in LinkedList, line 19") set LinkedList_size[this_1] = 0 set wurst_stack_depth = wurst_stack_depth - 1 set LLEntry_next[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] set LLEntry_prev[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this_1 endfunction function string_indexOf takes string this_1, string s returns integer local integer i = 0 local integer temp = StringLength(this_1) - StringLength(s) loop exitwhen i > temp if SubString(this_1, i, i + StringLength(s)) == s then return i endif set i = i + 1 endloop return -1 endfunction function string_split takes string this_1, string splitBy, string w__wurst_stackPos returns integer local integer list local integer offset local integer splitIndex set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set list = new_LinkedList("when calling new_LinkedList in StringUtils, line 91") set offset = StringLength(splitBy) set w__wurst_stackPos = this_1 loop set splitIndex = string_indexOf(w__wurst_stackPos, splitBy) if splitIndex == -1 then call dispatch_LinkedList_LinkedList_LinkedList_add_1(list, stringToIndex(w__wurst_stackPos, "when calling stringToIndex in StringUtils, line 97"), "when calling add in StringUtils, line 97") exitwhen true endif set this_1 = SubString(w__wurst_stackPos, 0, splitIndex) set w__wurst_stackPos = SubString(w__wurst_stackPos, splitIndex + offset, StringLength(w__wurst_stackPos)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(list, stringToIndex(this_1, "when calling stringToIndex in StringUtils, line 101"), "when calling add in StringUtils, line 101") endloop set wurst_stack_depth = wurst_stack_depth - 1 return list endfunction function code__addAction_nullclosurebug takes string w__wurst_stackPos returns nothing local player triggerPlayer local integer playerCommands local integer tokens local integer index local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set triggerPlayer = GetTriggerPlayer() set playerCommands = dispatch_HashMap_HashMap_HashMap_get(nullclosurebug_commands, GetPlayerId(triggerPlayer), "when calling get in nullclosurebug.wurst, line 84") set w__wurst_stackPos = GetEventPlayerChatString() set tokens = string_split(SubString(w__wurst_stackPos, 1, StringLength(w__wurst_stackPos)), " ", "when calling split in nullclosurebug.wurst, line 85") set index = dispatch_LinkedList_LinkedList_LinkedList_get(tokens, 0, "when calling get in nullclosurebug.wurst, line 86") set wurst_stack[wurst_stack_depth] = "when calling stringFromIndex in nullclosurebug.wurst, line 86" set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling loadString in TypeCasting, line 36" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadString", "when calling error in Table, line 58") else call error("Called Table.loadString on invalid object.", "when calling error in Table, line 58") endif endif set w__wurst_stackPos = LoadStr(Table_ht, this_1, index) set wurst_stack_depth = wurst_stack_depth - 1 - 1 if dispatch_HashMap_HashMap_HashMap_has(playerCommands, stringToIndex(w__wurst_stackPos, "when calling stringToIndex in nullclosurebug.wurst, line 87"), "when calling has in nullclosurebug.wurst, line 87") then call dispatch_CommandHandler_nullclosurebug_CommandHandler_run(dispatch_HashMap_HashMap_HashMap_get(playerCommands, stringToIndex(w__wurst_stackPos, "when calling stringToIndex in nullclosurebug.wurst, line 88"), "when calling get in nullclosurebug.wurst, line 88"), triggerPlayer, tokens, "when calling run in nullclosurebug.wurst, line 88") endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_code__addAction_nullclosurebug takes nothing returns nothing set wurst_stack_depth = 0 call code__addAction_nullclosurebug("via function reference nullclosurebug.wurst, line 82") endfunction function construct_UnitIndex takes integer this_1, unit whichUnit returns nothing set UnitIndex__unit[this_1] = whichUnit call SetUnitUserData(UnitIndex__unit[this_1], this_1) set UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount] = whichUnit set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount + 1 call TriggerEvaluate(UnitIndexer_onIndexTrigger) set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 endfunction function new_UnitIndex takes unit whichUnit, string w__wurst_stackPos returns integer local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_UnitIndex in UnitIndexer, line 181" set wurst_stack_depth = wurst_stack_depth + 1 if UnitIndex_firstFree == 0 then if UnitIndex_maxIndex < 32768 then set UnitIndex_maxIndex = UnitIndex_maxIndex + 1 set this_1 = UnitIndex_maxIndex set UnitIndex_typeId[this_1] = 774 else call error("Out of memory: Could not create UnitIndex.", "when calling error in UnitIndexer, line 172") set this_1 = 0 endif else set UnitIndex_firstFree = UnitIndex_firstFree - 1 set this_1 = UnitIndex_nextFree[UnitIndex_firstFree] set UnitIndex_typeId[this_1] = 774 endif set wurst_stack_depth = wurst_stack_depth - 1 call construct_UnitIndex(this_1, whichUnit) set wurst_stack_depth = wurst_stack_depth - 1 return this_1 endfunction function code__onEnter_UnitIndexer takes string w__wurst_stackPos returns nothing local unit this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1] set wurst_stack[wurst_stack_depth] = "when calling toUnitIndex in UnitIndexer, line 196" set wurst_stack_depth = wurst_stack_depth + 1 if GetUnitUserData(this_1) == 0 then call new_UnitIndex(this_1, "when calling new_UnitIndex in UnitIndexer, line 135") endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function bridge_code__onEnter_UnitIndexer takes nothing returns nothing set wurst_stack_depth = 0 call code__onEnter_UnitIndexer("via function reference UnitIndexer, line 196") endfunction function UnitIndex_onDestroy takes integer this_1 returns nothing set UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount] = UnitIndex__unit[this_1] set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount + 1 call TriggerEvaluate(UnitIndexer_onDeindexTrigger) set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 call SetUnitUserData(UnitIndex__unit[this_1], 0) endfunction function dispatch_UnitIndex_destroyUnitIndex takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if UnitIndex_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitIndex.UnitIndex", "when calling error in UnitIndexer, line 172") else call error("Called UnitIndex.UnitIndex on invalid object.", "when calling error in UnitIndexer, line 172") endif endif set wurst_stack[wurst_stack_depth] = "when calling destroyUnitIndex in UnitIndexer, line 172" set wurst_stack_depth = wurst_stack_depth + 1 call UnitIndex_onDestroy(this_1) set wurst_stack[wurst_stack_depth] = "when calling dealloc_UnitIndex in UnitIndexer, line 188" set wurst_stack_depth = wurst_stack_depth + 1 if UnitIndex_typeId[this_1] == 0 then call error("Double free: object of type UnitIndex", "when calling error in UnitIndexer, line 172") else set UnitIndex_nextFree[UnitIndex_firstFree] = this_1 set UnitIndex_firstFree = UnitIndex_firstFree + 1 set UnitIndex_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 endfunction function unit_deindex takes unit this_1, string w__wurst_stackPos returns boolean local integer instance set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if GetUnitUserData(this_1) == 0 then set wurst_stack_depth = wurst_stack_depth - 1 return false else set wurst_stack[wurst_stack_depth] = "when calling toUnitIndex in UnitIndexer, line 169" set wurst_stack_depth = wurst_stack_depth + 1 set instance = GetUnitUserData(this_1) if instance == 0 then set instance = new_UnitIndex(this_1, "when calling new_UnitIndex in UnitIndexer, line 135") endif set wurst_stack_depth = wurst_stack_depth - 1 call dispatch_UnitIndex_destroyUnitIndex(instance, "when calling dispatch_UnitIndex_destroyUnitIndex in UnitIndexer, line 169") set wurst_stack_depth = wurst_stack_depth - 1 return true endif endfunction function code__onLeave_UnitIndexer takes string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call unit_deindex(OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1], "when calling deindex in UnitIndexer, line 197") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_code__onLeave_UnitIndexer takes nothing returns nothing set wurst_stack_depth = 0 call code__onLeave_UnitIndexer("via function reference UnitIndexer, line 197") endfunction function HashMap_put takes integer this_1, integer key, integer value, string w__wurst_stackPos returns nothing local integer parentKey local integer value_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if not dispatch_HashMap_HashMap_HashMap_has(this_1, key, "when calling has in HashMap, line 18") then set HashMap_size[this_1] = HashMap_size[this_1] + 1 endif set parentKey = key set value_1 = value set wurst_stack[wurst_stack_depth] = "when calling saveInt in HashMap, line 20" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveInt", "when calling error in Table, line 43") else call error("Called Table.saveInt on invalid object.", "when calling error in Table, line 43") endif endif call SaveInteger(Table_ht, this_1, parentKey, value_1) set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function HashList_incrOccurences takes integer this_1, integer elem, string w__wurst_stackPos returns nothing local hashtable this_2 local integer parentKey local integer childKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_2 = HashList_occurences set parentKey = this_1 set childKey = elem set wurst_stack[wurst_stack_depth] = "when calling count in HashList, line 35" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.count", "when calling error in HashList, line 28") else call error("Called HashList.count on invalid object.", "when calling error in HashList, line 28") endif endif set this_1 = LoadInteger(HashList_occurences, this_1, elem) set wurst_stack_depth = wurst_stack_depth - 1 call SaveInteger(this_2, parentKey, childKey, this_1 + 1) set wurst_stack_depth = wurst_stack_depth - 1 endfunction function HashList_add_1 takes integer this_1, integer elems_0, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call SaveInteger(HashList_ht, this_1, HashList_size[this_1], elems_0) set wurst_stack[wurst_stack_depth] = "when calling incrOccurences in HashList, line 44" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.incrOccurences", "when calling error in HashList, line 34") else call error("Called HashList.incrOccurences on invalid object.", "when calling error in HashList, line 34") endif endif call HashList_incrOccurences(this_1, elems_0, "when calling incrOccurences in HashList, line 34") set wurst_stack_depth = wurst_stack_depth - 1 set HashList_size[this_1] = HashList_size[this_1] + 1 set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_HashList_HashList_HashList_has takes integer this_1, integer elem, string w__wurst_stackPos returns boolean set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.has", "when calling error in HashList, line 108") else call error("Called HashList.has on invalid object.", "when calling error in HashList, line 108") endif endif set wurst_stack[wurst_stack_depth] = "when calling has in HashList, line 108" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling count in HashList, line 109" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.count", "when calling error in HashList, line 28") else call error("Called HashList.count on invalid object.", "when calling error in HashList, line 28") endif endif set this_1 = LoadInteger(HashList_occurences, this_1, elem) set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this_1 > 0 endfunction function IterableMap_put takes integer this_1, integer key, integer value, string w__wurst_stackPos returns nothing local boolean stackTrace_tempReturn set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call HashMap_put(this_1, key, value, "when calling put in HashMap, line 60") set wurst_stack[wurst_stack_depth] = "when calling hasKey in HashMap, line 61" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IterableMap.hasKey", "when calling error in HashMap, line 87") else call error("Called IterableMap.hasKey on invalid object.", "when calling error in HashMap, line 87") endif endif set wurst_stack[wurst_stack_depth] = "when calling hasKey in HashMap, line 87" set wurst_stack_depth = wurst_stack_depth + 1 set stackTrace_tempReturn = dispatch_HashList_HashList_HashList_has(IterableMap_keys[this_1], key, "when calling has in HashMap, line 88") set wurst_stack_depth = wurst_stack_depth - 1 - 1 if not stackTrace_tempReturn then set this_1 = IterableMap_keys[this_1] set wurst_stack[wurst_stack_depth] = "when calling add in HashMap, line 62" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.add", "when calling error in HashList, line 41") else call error("Called HashList.add on invalid object.", "when calling error in HashList, line 41") endif endif call HashList_add_1(this_1, key, "when calling add in HashList, line 41") set wurst_stack_depth = wurst_stack_depth - 1 endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_HashMap_HashMap_HashMap_put takes integer this_1, integer key, integer value, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.put", "when calling error in HashMap, line 17") else call error("Called HashMap.put on invalid object.", "when calling error in HashMap, line 17") endif endif if Table_typeId[this_1] <= 765 then call HashMap_put(this_1, key, value, "when calling put in HashMap, line 17") else call IterableMap_put(this_1, key, value, "when calling put in HashMap, line 17") endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function HashMap_remove takes integer this_1, integer key, string w__wurst_stackPos returns nothing local integer parentKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if dispatch_HashMap_HashMap_HashMap_has(this_1, key, "when calling has in HashMap, line 28") then set HashMap_size[this_1] = HashMap_size[this_1] - 1 endif set parentKey = key set wurst_stack[wurst_stack_depth] = "when calling removeInt in HashMap, line 30" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.removeInt", "when calling error in Table, line 25") else call error("Called Table.removeInt on invalid object.", "when calling error in Table, line 25") endif endif call RemoveSavedInteger(Table_ht, this_1, parentKey) set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function HashList_decrOccurences takes integer this_1, integer elem, string w__wurst_stackPos returns nothing local hashtable this_2 local integer parentKey local integer childKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_2 = HashList_occurences set parentKey = this_1 set childKey = elem set wurst_stack[wurst_stack_depth] = "when calling count in HashList, line 38" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.count", "when calling error in HashList, line 28") else call error("Called HashList.count on invalid object.", "when calling error in HashList, line 28") endif endif set this_1 = LoadInteger(HashList_occurences, this_1, elem) set wurst_stack_depth = wurst_stack_depth - 1 call SaveInteger(this_2, parentKey, childKey, this_1 - 1) set wurst_stack_depth = wurst_stack_depth - 1 endfunction function HashList_removeAt takes integer this_1, integer index, string w__wurst_stackPos returns integer local integer tmp local integer temp set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set tmp = LoadInteger(HashList_ht, this_1, index) set wurst_stack[wurst_stack_depth] = "when calling decrOccurences in HashList, line 77" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.decrOccurences", "when calling error in HashList, line 37") else call error("Called HashList.decrOccurences on invalid object.", "when calling error in HashList, line 37") endif endif call HashList_decrOccurences(this_1, tmp, "when calling decrOccurences in HashList, line 37") set wurst_stack_depth = wurst_stack_depth - 1 set tmp = LoadInteger(HashList_ht, this_1, index) set temp = HashList_size[this_1] loop exitwhen index > temp call SaveInteger(HashList_ht, this_1, index, LoadInteger(HashList_ht, this_1, index + 1)) set index = index + 1 endloop set HashList_size[this_1] = HashList_size[this_1] - 1 set wurst_stack_depth = wurst_stack_depth - 1 return tmp endfunction function HashList_remove takes integer this_1, integer t, string w__wurst_stackPos returns boolean local boolean result_1 local integer i local integer temp set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set result_1 = false set i = 0 set temp = HashList_size[this_1] - 1 loop exitwhen i > temp if t == LoadInteger(HashList_ht, this_1, i) then set result_1 = true set wurst_stack[wurst_stack_depth] = "when calling removeAt in HashList, line 91" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.removeAt", "when calling error in HashList, line 76") else call error("Called HashList.removeAt on invalid object.", "when calling error in HashList, line 76") endif endif call HashList_removeAt(this_1, i, "when calling removeAt in HashList, line 76") set wurst_stack_depth = wurst_stack_depth - 1 exitwhen true endif set i = i + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 return result_1 endfunction function IterableMap_remove takes integer this_1, integer key, string w__wurst_stackPos returns nothing local boolean stackTrace_tempReturn set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call HashMap_remove(this_1, key, "when calling remove in HashMap, line 66") set wurst_stack[wurst_stack_depth] = "when calling hasKey in HashMap, line 67" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IterableMap.hasKey", "when calling error in HashMap, line 87") else call error("Called IterableMap.hasKey on invalid object.", "when calling error in HashMap, line 87") endif endif set wurst_stack[wurst_stack_depth] = "when calling hasKey in HashMap, line 87" set wurst_stack_depth = wurst_stack_depth + 1 set stackTrace_tempReturn = dispatch_HashList_HashList_HashList_has(IterableMap_keys[this_1], key, "when calling has in HashMap, line 88") set wurst_stack_depth = wurst_stack_depth - 1 - 1 if stackTrace_tempReturn then set this_1 = IterableMap_keys[this_1] set wurst_stack[wurst_stack_depth] = "when calling remove in HashMap, line 68" set wurst_stack_depth = wurst_stack_depth + 1 if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.remove", "when calling error in HashList, line 86") else call error("Called HashList.remove on invalid object.", "when calling error in HashList, line 86") endif endif call HashList_remove(this_1, key, "when calling remove in HashList, line 86") set wurst_stack_depth = wurst_stack_depth - 1 endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_HashMap_HashMap_HashMap_remove takes integer this_1, integer key, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.remove", "when calling error in HashMap, line 27") else call error("Called HashMap.remove on invalid object.", "when calling error in HashMap, line 27") endif endif if Table_typeId[this_1] <= 765 then call HashMap_remove(this_1, key, "when calling remove in HashMap, line 27") else call IterableMap_remove(this_1, key, "when calling remove in HashMap, line 27") endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function OnCastListener_onDestroy takes integer this_1, string w__wurst_stackPos returns nothing local integer index set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if OnCastListener_eventUnit[this_1] != null then set index = GetUnitUserData(OnCastListener_eventUnit[this_1]) if EventListener_castMapCasters[index] == this_1 then if OnCastListener_next[this_1] != 0 then set EventListener_castMapCasters[index] = OnCastListener_next[this_1] else set EventListener_castMapCasters[index] = 0 endif elseif OnCastListener_prev[this_1] != 0 then set OnCastListener_next[OnCastListener_prev[this_1]] = OnCastListener_next[this_1] endif elseif dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, OnCastListener_abilId[this_1], "when calling get in ClosureEvents, line 70") == this_1 then if OnCastListener_next[this_1] != 0 then call dispatch_HashMap_HashMap_HashMap_put(EventListener_castMap, OnCastListener_abilId[this_1], OnCastListener_next[this_1], "when calling put in ClosureEvents, line 73") else call dispatch_HashMap_HashMap_HashMap_remove(EventListener_castMap, OnCastListener_abilId[this_1], "when calling remove in ClosureEvents, line 75") endif elseif OnCastListener_prev[this_1] != 0 then set OnCastListener_next[OnCastListener_prev[this_1]] = OnCastListener_next[this_1] endif set OnCastListener_prev[OnCastListener_next[this_1]] = OnCastListener_prev[this_1] set OnCastListener_next[this_1] = 0 set OnCastListener_prev[this_1] = 0 set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_OnCastListener_destroyOnCastListener takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.OnCastListener", "when calling error in ClosureEvents, line 50") else call error("Called OnCastListener.OnCastListener on invalid object.", "when calling error in ClosureEvents, line 50") endif endif set wurst_stack[wurst_stack_depth] = "when calling destroyOnCastListener in ClosureEvents, line 50" set wurst_stack_depth = wurst_stack_depth + 1 call OnCastListener_onDestroy(this_1, "when calling OnCastListener_onDestroy in ClosureEvents, line 58") set wurst_stack[wurst_stack_depth] = "when calling dealloc_OnCastListener in ClosureEvents, line 58" set wurst_stack_depth = wurst_stack_depth + 1 if OnCastListener_typeId[this_1] == 0 then call error("Double free: object of type OnCastListener", "when calling error in ClosureEvents, line 50") else set OnCastListener_nextFree[OnCastListener_firstFree] = this_1 set OnCastListener_firstFree = OnCastListener_firstFree + 1 set OnCastListener_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 endfunction function destroyEventListener takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if EventListener_uid[this_1] < 0 then if EventListener_generalListenersFirsts[EventListener_eventId[this_1]] == this_1 then set EventListener_generalListenersFirsts[EventListener_eventId[this_1]] = EventListener_next[this_1] elseif EventListener_prev[this_1] != 0 then set EventListener_next[EventListener_prev[this_1]] = EventListener_next[this_1] endif elseif EventListener_unitListenersFirsts[EventListener_uid[this_1]] == this_1 then set EventListener_unitListenersFirsts[EventListener_uid[this_1]] = EventListener_next[this_1] elseif EventListener_prev[this_1] != 0 then set EventListener_next[EventListener_prev[this_1]] = EventListener_next[this_1] endif if EventListener_next[this_1] != 0 then set EventListener_prev[EventListener_next[this_1]] = EventListener_prev[this_1] endif set EventListener_next[this_1] = 0 set EventListener_prev[this_1] = 0 set wurst_stack[wurst_stack_depth] = "when calling dealloc_EventListener in ClosureEvents, line 217" set wurst_stack_depth = wurst_stack_depth + 1 if EventListener_typeId[this_1] == 0 then call error("Double free: object of type EventListener", "when calling error in ClosureEvents, line 105") else set EventListener_firstFree = EventListener_firstFree + 1 set EventListener_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function unregisterEvents takes integer id_1, string w__wurst_stackPos returns nothing local integer listener local player showTo set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if id_1 > 0 then if EventListener_unitListenersFirsts[id_1] != 0 then set w__wurst_stackPos = "unregister unit has listeners. startid: " + I2S(id_1) set showTo = Player_localPlayer if 2 <= 0 then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(0) + " - " + w__wurst_stackPos) endif set listener = EventListener_unitListenersFirsts[id_1] set EventListener_unitListenersFirsts[id_1] = 0 loop exitwhen listener == 0 set id_1 = listener set listener = EventListener_next[listener] set wurst_stack[wurst_stack_depth] = "when calling dispatch_EventListener_destroyEventListener in ClosureEvents, line 290" set wurst_stack_depth = wurst_stack_depth + 1 if EventListener_typeId[id_1] == 0 then if id_1 == 0 then call error("Nullpointer exception when calling EventListener.EventListener", "when calling error in ClosureEvents, line 105") else call error("Called EventListener.EventListener on invalid object.", "when calling error in ClosureEvents, line 105") endif endif call destroyEventListener(id_1, "when calling destroyEventListener in ClosureEvents, line 105") set wurst_stack_depth = wurst_stack_depth - 1 endloop endif endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function unregisterEventsForUnit takes unit u_1, string w__wurst_stackPos returns nothing local integer index local integer listener set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set index = GetUnitUserData(u_1) call unregisterEvents(index, "when calling unregisterEvents in ClosureEvents, line 272") if EventListener_castMapCasters[index] != 0 then set listener = EventListener_castMapCasters[index] set EventListener_castMapCasters[index] = 0 loop exitwhen listener == 0 set index = listener set listener = OnCastListener_next[listener] call dispatch_OnCastListener_destroyOnCastListener(index, "when calling dispatch_OnCastListener_destroyOnCastListener in ClosureEvents, line 279") endloop endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_code__onUnitDeindex_ClosureEvents takes nothing returns nothing set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ClosureEvents, line 296" set wurst_stack_depth = wurst_stack_depth + 1 call unregisterEventsForUnit(UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1], "when calling unregisterEventsForUnit in ClosureEvents, line 296") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function triggerFromIndex takes integer index, string w__wurst_stackPos returns trigger local integer this_1 local fogstate value local trigger Table_Table_loadTrigger_result set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = TypeCasting_typecastdata set value = ConvertFogState(index) set wurst_stack[wurst_stack_depth] = "when calling saveFogState in TypeCasting, line 95" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveFogState", "when calling error in Table, line 169") else call error("Called Table.saveFogState on invalid object.", "when calling error in Table, line 169") endif endif call SaveFogStateHandle(Table_ht, this_1, 0, value) set wurst_stack_depth = wurst_stack_depth - 1 set index = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling loadTrigger in TypeCasting, line 96" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[index] == 0 then if index == 0 then call error("Nullpointer exception when calling Table.loadTrigger", "when calling error in Table, line 112") else call error("Called Table.loadTrigger on invalid object.", "when calling error in Table, line 112") endif endif set Table_Table_loadTrigger_result = LoadTriggerHandle(Table_ht, index, 0) set wurst_stack_depth = wurst_stack_depth - 1 - 1 return Table_Table_loadTrigger_result endfunction function code__registerPlayerUnitEvent_RegisterEvents takes string w__wurst_stackPos returns boolean local boolean stackTrace_tempReturn set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set stackTrace_tempReturn = TriggerEvaluate(triggerFromIndex(dispatch_HashMap_HashMap_HashMap_get(RegisterEvents_onCastMap, GetSpellAbilityId(), "when calling get in RegisterEvents, line 58"), "when calling triggerFromIndex in RegisterEvents, line 58")) set wurst_stack_depth = wurst_stack_depth - 1 return stackTrace_tempReturn endfunction function bridge_code__registerPlayerUnitEvent_RegisterEvents takes nothing returns boolean set wurst_stack_depth = 0 return code__registerPlayerUnitEvent_RegisterEvents("via function reference RegisterEvents, line 58") endfunction function timer_setData takes timer this_1, integer data, string w__wurst_stackPos returns nothing local integer this_2 local integer parentKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_2 = TimerUtils_timerData set parentKey = GetHandleId(this_1) set wurst_stack[wurst_stack_depth] = "when calling saveInt in TimerUtils, line 18" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling Table.saveInt", "when calling error in Table, line 43") else call error("Called Table.saveInt on invalid object.", "when calling error in Table, line 43") endif endif call SaveInteger(Table_ht, this_2, parentKey, data) set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function CallbackSingle_start takes integer this_1, timer whichTimer, real time, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call timer_setData(whichTimer, this_1, "when calling setData in ClosureTimers, line 134") call TimerStart(whichTimer, time, false, ref_function_bridge_code__start_CallbackSingle_ClosureTimers) set CallbackSingle_t[this_1] = whichTimer set wurst_stack_depth = wurst_stack_depth - 1 endfunction function getTimer takes string w__wurst_stackPos returns timer local timer receiver set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if TimerUtils_freeTimersCount > 0 then set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount - 1 call timer_setData(TimerUtils_freeTimers[TimerUtils_freeTimersCount], 0, "when calling setData in TimerUtils, line 30") set wurst_stack_depth = wurst_stack_depth - 1 return TimerUtils_freeTimers[TimerUtils_freeTimersCount] else set receiver = CreateTimer() call timer_setData(receiver, 0, "when calling setData in TimerUtils, line 33") set wurst_stack_depth = wurst_stack_depth - 1 return receiver endif endfunction function doAfter takes real timeToWait, integer cb_1, string w__wurst_stackPos returns integer local timer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = getTimer("when calling getTimer in ClosureTimers, line 28") set wurst_stack[wurst_stack_depth] = "when calling doAfter in ClosureTimers, line 28" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling start in ClosureTimers, line 17" set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_typeId[cb_1] == 0 then if cb_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.start", "when calling error in ClosureTimers, line 132") else call error("Called CallbackSingle.start on invalid object.", "when calling error in ClosureTimers, line 132") endif endif call CallbackSingle_start(cb_1, this_1, timeToWait, "when calling start in ClosureTimers, line 132") set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 return cb_1 endfunction function DummyCaster_finish takes integer this_1, unit dummy_1, integer id_1, string w__wurst_stackPos returns nothing local real temp local integer this_2 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set DummyCaster_castCount[this_1] = DummyCaster_castCount[this_1] + 1 set temp = DummyCaster_delay[this_1] set wurst_stack[wurst_stack_depth] = "when calling alloc_CallbackSingle_doAfter_DummyCaster_DummyCaster in DummyCaster, line 89" set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_2 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_2] = 647 else call error("Out of memory: Could not create CallbackSingle_doAfter_DummyCaster_DummyCaster.", "when calling error in DummyCaster, line 89") set this_2 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_2 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_2] = 647 endif set wurst_stack_depth = wurst_stack_depth - 1 set this[this_2] = this_1 set dummy[this_2] = dummy_1 set id[this_2] = id_1 call doAfter(temp, this_2, "when calling doAfter in DummyCaster, line 89") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function createDummy takes real pos_x, real pos_y, real facing_radians returns unit local unit u_1 = CreateUnit(Basics_DUMMY_PLAYER, 2016423985, pos_x, pos_y, facing_radians * 57.295779513) call UnitAddAbility(u_1, 1097691750) call UnitRemoveAbility(u_1, 1097691750) call UnitAddAbility(u_1, 1095577650) call UnitRemoveAbility(u_1, 1095577650) call SetUnitX(u_1, pos_x) call SetUnitY(u_1, pos_y) call SetUnitFacing(u_1, facing_radians * 57.295779513) return u_1 endfunction function dispatch_LLEntry_destroyLLEntry takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LLEntry_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLEntry.LLEntry", "when calling error in LinkedList, line 429") else call error("Called LLEntry.LLEntry on invalid object.", "when calling error in LinkedList, line 429") endif endif set wurst_stack[wurst_stack_depth] = "when calling destroyLLEntry in LinkedList, line 429" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling dealloc_LLEntry in LinkedList, line 429" set wurst_stack_depth = wurst_stack_depth + 1 if LLEntry_typeId[this_1] == 0 then call error("Double free: object of type LLEntry", "when calling error in LinkedList, line 429") else set LLEntry_nextFree[LLEntry_firstFree] = this_1 set LLEntry_firstFree = LLEntry_firstFree + 1 set LLEntry_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_removeEntry takes integer this_1, integer entry, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.removeEntry", "when calling error in LinkedList, line 406") else call error("Called LinkedList.removeEntry on invalid object.", "when calling error in LinkedList, line 406") endif endif set wurst_stack[wurst_stack_depth] = "when calling removeEntry in LinkedList, line 406" set wurst_stack_depth = wurst_stack_depth + 1 set LLEntry_next[LLEntry_prev[entry]] = LLEntry_next[entry] set LLEntry_prev[LLEntry_next[entry]] = LLEntry_prev[entry] call dispatch_LLEntry_destroyLLEntry(entry, "when calling dispatch_LLEntry_destroyLLEntry in LinkedList, line 409") set LinkedList_size[this_1] = LinkedList_size[this_1] - 1 set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_dequeue takes integer this_1, string w__wurst_stackPos returns integer local integer top local integer result_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.dequeue", "when calling error in LinkedList, line 96") else call error("Called LinkedList.dequeue on invalid object.", "when calling error in LinkedList, line 96") endif endif set wurst_stack[wurst_stack_depth] = "when calling dequeue in LinkedList, line 96" set wurst_stack_depth = wurst_stack_depth + 1 set top = LLEntry_next[LinkedList_dummy[this_1]] set result_1 = 0 if top != LinkedList_dummy[this_1] then set result_1 = LLEntry_elem[top] call dispatch_LinkedList_LinkedList_LinkedList_removeEntry(this_1, top, "when calling removeEntry in LinkedList, line 101") endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return result_1 endfunction function unitFromIndex takes integer index, string w__wurst_stackPos returns unit local integer this_1 local fogstate value local unit Table_Table_loadUnit_result set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = TypeCasting_typecastdata set value = ConvertFogState(index) set wurst_stack[wurst_stack_depth] = "when calling saveFogState in TypeCasting, line 53" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveFogState", "when calling error in Table, line 169") else call error("Called Table.saveFogState on invalid object.", "when calling error in Table, line 169") endif endif call SaveFogStateHandle(Table_ht, this_1, 0, value) set wurst_stack_depth = wurst_stack_depth - 1 set index = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling loadUnit in TypeCasting, line 54" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[index] == 0 then if index == 0 then call error("Nullpointer exception when calling Table.loadUnit", "when calling error in Table, line 76") else call error("Called Table.loadUnit on invalid object.", "when calling error in Table, line 76") endif endif set Table_Table_loadUnit_result = LoadUnitHandle(Table_ht, index, 0) set wurst_stack_depth = wurst_stack_depth - 1 - 1 return Table_Table_loadUnit_result endfunction function DummyRecycler_get takes real pos_x, real pos_y, real a_radians, string w__wurst_stackPos returns unit local integer angleIndex local unit stackTrace_tempReturn_2 local real this_1 local integer this_2 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = ModuloReal(a_radians * 57.295779513, 360.) / DummyRecycler_ANGLE_DEGREE if this_1 > 0. then set angleIndex = R2I(this_1 + .5) else set angleIndex = R2I(this_1 - .5) endif set angleIndex = ModuloInteger(angleIndex, 8) set this_2 = DummyRecycler_angleQueues[angleIndex] set wurst_stack[wurst_stack_depth] = "when calling size in DummyRecycler, line 43" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling LinkedList.size", "when calling error in LinkedList, line 158") else call error("Called LinkedList.size on invalid object.", "when calling error in LinkedList, line 158") endif endif set this_2 = LinkedList_size[this_2] set wurst_stack_depth = wurst_stack_depth - 1 if this_2 > 0 then set stackTrace_tempReturn_2 = unitFromIndex(dispatch_LinkedList_LinkedList_LinkedList_dequeue(DummyRecycler_angleQueues[angleIndex], "when calling dequeue in DummyRecycler, line 44"), "when calling unitFromIndex in DummyRecycler, line 44") call SetUnitX(stackTrace_tempReturn_2, pos_x) call SetUnitY(stackTrace_tempReturn_2, pos_y) call PauseUnit(stackTrace_tempReturn_2, false) set wurst_stack_depth = wurst_stack_depth - 1 return stackTrace_tempReturn_2 else set stackTrace_tempReturn_2 = createDummy(pos_x, pos_y, a_radians) set wurst_stack_depth = wurst_stack_depth - 1 return stackTrace_tempReturn_2 endif endfunction function DummyCaster_prepare takes integer this_1, integer id_1, integer lvl, string w__wurst_stackPos returns unit local unit dummy_1 local real tuple_temp local real tuple_temp_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set dummy_1 = DummyRecycler_get(DummyCaster_origin_x[this_1], DummyCaster_origin_y[this_1], 0., "when calling get in DummyCaster, line 78") set tuple_temp_1 = DummyCaster_origin_x[this_1] set tuple_temp = DummyCaster_origin_y[this_1] if tuple_temp_1 > MapBounds_boundMin_x and tuple_temp_1 < MapBounds_boundMax_x and tuple_temp > MapBounds_boundMin_y and tuple_temp < MapBounds_boundMax_y then set tuple_temp = DummyCaster_origin_x[this_1] set tuple_temp_1 = DummyCaster_origin_y[this_1] call SetUnitX(dummy_1, tuple_temp) call SetUnitY(dummy_1, tuple_temp_1) endif call UnitAddAbility(dummy_1, id_1) call SetUnitState(dummy_1, UNIT_STATE_MANA, 1000000.) if lvl > 1 then call SetUnitAbilityLevel(dummy_1, id_1, lvl) endif call SetUnitOwner(dummy_1, DummyCaster_owner[this_1], false) set wurst_stack_depth = wurst_stack_depth - 1 return dummy_1 endfunction function DummyCaster_castPoint takes integer this_1, integer abilityId, integer lvl, integer orderId, real targetPos_x, real targetPos_y, string w__wurst_stackPos returns unit local unit dummy_1 local boolean success local unit DummyCaster_DummyCaster_prepare_result local real temp local real tuple_temp set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling prepare in DummyCaster, line 69" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.prepare", "when calling error in DummyCaster, line 77") else call error("Called DummyCaster.prepare on invalid object.", "when calling error in DummyCaster, line 77") endif endif set DummyCaster_DummyCaster_prepare_result = DummyCaster_prepare(this_1, abilityId, lvl, "when calling prepare in DummyCaster, line 77") set wurst_stack_depth = wurst_stack_depth - 1 set dummy_1 = DummyCaster_DummyCaster_prepare_result set temp = GetUnitX(DummyCaster_DummyCaster_prepare_result) set tuple_temp = GetUnitY(DummyCaster_DummyCaster_prepare_result) set tuple_temp = Atan2(targetPos_y - tuple_temp, targetPos_x - temp) call SetUnitFacing(DummyCaster_DummyCaster_prepare_result, tuple_temp * 57.295779513) set success = IssuePointOrderById(DummyCaster_DummyCaster_prepare_result, orderId, targetPos_x, targetPos_y) set wurst_stack[wurst_stack_depth] = "when calling finish in DummyCaster, line 72" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.finish", "when calling error in DummyCaster, line 87") else call error("Called DummyCaster.finish on invalid object.", "when calling error in DummyCaster, line 87") endif endif call DummyCaster_finish(this_1, DummyCaster_DummyCaster_prepare_result, abilityId, "when calling finish in DummyCaster, line 87") set wurst_stack_depth = wurst_stack_depth - 1 if not success then set dummy_1 = null endif set wurst_stack_depth = wurst_stack_depth - 1 return dummy_1 endfunction function new_DummyCaster takes string w__wurst_stackPos returns integer local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_DummyCaster in DummyCaster, line 34" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_firstFree == 0 then if DummyCaster_maxIndex < 32768 then set DummyCaster_maxIndex = DummyCaster_maxIndex + 1 set this_1 = DummyCaster_maxIndex set DummyCaster_typeId[this_1] = 660 else call error("Out of memory: Could not create DummyCaster.", "when calling error in DummyCaster, line 28") set this_1 = 0 endif else set DummyCaster_firstFree = DummyCaster_firstFree - 1 set this_1 = DummyCaster_nextFree[DummyCaster_firstFree] set DummyCaster_typeId[this_1] = 660 endif set wurst_stack_depth = wurst_stack_depth - 1 set DummyCaster_castCount[this_1] = 0 set DummyCaster_delay[this_1] = 5.0 set DummyCaster_owner[this_1] = Basics_DUMMY_PLAYER set DummyCaster_origin_x[this_1] = 0. set DummyCaster_origin_y[this_1] = 0. set wurst_stack_depth = wurst_stack_depth - 1 return this_1 endfunction function fireEx_onPointCast_nullclosurebug takes integer this_1, unit caster, real target_x, real target_y, string w__wurst_stackPos returns nothing local player owner local real tuple_temp local real tuple_temp_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., 45., "Spell has been casted") set this_1 = new_DummyCaster("when calling new_DummyCaster in nullclosurebug.wurst, line 114") set wurst_stack[wurst_stack_depth] = "when calling delay in nullclosurebug.wurst, line 115" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.delay", "when calling error in DummyCaster, line 45") else call error("Called DummyCaster.delay on invalid object.", "when calling error in DummyCaster, line 45") endif endif set DummyCaster_delay[this_1] = 3. set wurst_stack_depth = wurst_stack_depth - 1 set owner = GetOwningPlayer(caster) set wurst_stack[wurst_stack_depth] = "when calling owner in nullclosurebug.wurst, line 116" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.owner", "when calling error in DummyCaster, line 40") else call error("Called DummyCaster.owner on invalid object.", "when calling error in DummyCaster, line 40") endif endif set DummyCaster_owner[this_1] = owner set wurst_stack_depth = wurst_stack_depth - 1 set tuple_temp_1 = GetUnitX(caster) set tuple_temp = GetUnitY(caster) set tuple_temp_1 = tuple_temp_1 + 100. set tuple_temp = tuple_temp + 0. set wurst_stack[wurst_stack_depth] = "when calling origin in nullclosurebug.wurst, line 117" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.origin", "when calling error in DummyCaster, line 36") else call error("Called DummyCaster.origin on invalid object.", "when calling error in DummyCaster, line 36") endif endif set DummyCaster_origin_x[this_1] = tuple_temp_1 set DummyCaster_origin_y[this_1] = tuple_temp set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling castPoint in nullclosurebug.wurst, line 118" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.castPoint", "when calling error in DummyCaster, line 68") else call error("Called DummyCaster.castPoint on invalid object.", "when calling error in DummyCaster, line 68") endif endif call DummyCaster_castPoint(this_1, 1095262842, 1, 852089, target_x, target_y, "when calling castPoint in DummyCaster, line 68") set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function dispatch_OnCastListener_ClosureEvents_OnCastListener_fire takes integer this_1, unit caster, string w__wurst_stackPos returns nothing local real tuple_temp local real tuple_temp_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.fire", "when calling error in ClosureEvents, line 56") else call error("Called OnCastListener.fire on invalid object.", "when calling error in ClosureEvents, line 56") endif endif if OnCastListener_typeId[this_1] <= 737 then if OnCastListener_typeId[this_1] <= 735 then else set wurst_stack[wurst_stack_depth] = "when calling fire in ClosureEvents, line 56" set wurst_stack_depth = wurst_stack_depth + 1 set tuple_temp = GetSpellTargetX() set tuple_temp_1 = GetSpellTargetY() set wurst_stack[wurst_stack_depth] = "when calling fireEx in ClosureEvents, line 94" set wurst_stack_depth = wurst_stack_depth + 1 if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnPointCast.fireEx", "when calling error in ClosureEvents, line 96") else call error("Called OnPointCast.fireEx on invalid object.", "when calling error in ClosureEvents, line 96") endif endif call fireEx_onPointCast_nullclosurebug(this_1, caster, tuple_temp, tuple_temp_1, "when calling fireEx_onPointCast_nullclosurebug in ClosureEvents, line 96") set wurst_stack_depth = wurst_stack_depth - 1 - 1 endif endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function EventListener_onSpellEffect takes string w__wurst_stackPos returns nothing local unit trigUnit local integer abilId local integer listener local integer nextListener set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set trigUnit = GetTriggerUnit() set abilId = GetSpellAbilityId() set listener = GetUnitUserData(trigUnit) if EventListener_castMapCasters[listener] != 0 then set listener = EventListener_castMapCasters[listener] loop exitwhen listener == 0 set nextListener = OnCastListener_next[listener] if OnCastListener_abilId[listener] == -1 or OnCastListener_abilId[listener] == abilId then call dispatch_OnCastListener_ClosureEvents_OnCastListener_fire(listener, GetSpellAbilityUnit(), "when calling fire in ClosureEvents, line 207") endif set listener = nextListener endloop endif if dispatch_HashMap_HashMap_HashMap_has(EventListener_castMap, abilId, "when calling has in ClosureEvents, line 209") then set listener = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId, "when calling get in ClosureEvents, line 210") loop exitwhen listener == 0 set abilId = OnCastListener_next[listener] if OnCastListener_eventUnit[listener] == null or OnCastListener_eventUnit[listener] == trigUnit then call dispatch_OnCastListener_ClosureEvents_OnCastListener_fire(listener, GetSpellAbilityUnit(), "when calling fire in ClosureEvents, line 214") endif set listener = abilId endloop endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_code__registerPlayerUnitEvent_nullTimer_ClosureEvents takes nothing returns nothing set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ClosureEvents, line 316" set wurst_stack_depth = wurst_stack_depth + 1 call EventListener_onSpellEffect("when calling onSpellEffect in ClosureEvents, line 316") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function timer_getData takes timer this_1, string w__wurst_stackPos returns integer local integer this_2 local integer parentKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_2 = TimerUtils_timerData set parentKey = GetHandleId(this_1) set wurst_stack[wurst_stack_depth] = "when calling loadInt in TimerUtils, line 22" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling Table.loadInt", "when calling error in Table, line 40") else call error("Called Table.loadInt on invalid object.", "when calling error in Table, line 40") endif endif set this_2 = LoadInteger(Table_ht, this_2, parentKey) set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this_2 endfunction function timer_release takes timer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if this_1 == null then call error("Trying to release a null timer", "when calling error in TimerUtils, line 38") set wurst_stack_depth = wurst_stack_depth - 1 return endif if timer_getData(this_1, "when calling getData in TimerUtils, line 40") == 679645218 then call error("ReleaseTimer: Double free!", "when calling error in TimerUtils, line 41") set wurst_stack_depth = wurst_stack_depth - 1 return endif call timer_setData(this_1, 679645218, "when calling setData in TimerUtils, line 43") call PauseTimer(this_1) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this_1 set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 set wurst_stack_depth = wurst_stack_depth - 1 endfunction function destroyCallbackSingle takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling CallbackSingle_onDestroy in ClosureTimers, line 144" set wurst_stack_depth = wurst_stack_depth + 1 call timer_release(CallbackSingle_t[this_1], "when calling release in ClosureTimers, line 145") set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling dealloc_CallbackSingle in ClosureTimers, line 144" set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_typeId[this_1] == 0 then call error("Double free: object of type CallbackSingle", "when calling error in ClosureTimers, line 128") else set CallbackSingle_nextFree[CallbackSingle_firstFree] = this_1 set CallbackSingle_firstFree = CallbackSingle_firstFree + 1 set CallbackSingle_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function DummyRecycler_recycle takes unit u_1, string w__wurst_stackPos returns nothing local integer smallestQueue local integer i local integer temp local integer LinkedList_LinkedList_size_result local integer LinkedList_LinkedList_size_result_1 local integer elem local real tuple_temp local real tuple_temp_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set smallestQueue = 0 set i = 1 set temp = 7 loop exitwhen i > temp set LinkedList_LinkedList_size_result = DummyRecycler_angleQueues[smallestQueue] set wurst_stack[wurst_stack_depth] = "when calling size in DummyRecycler, line 51" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[LinkedList_LinkedList_size_result] == 0 then if LinkedList_LinkedList_size_result == 0 then call error("Nullpointer exception when calling LinkedList.size", "when calling error in LinkedList, line 158") else call error("Called LinkedList.size on invalid object.", "when calling error in LinkedList, line 158") endif endif set LinkedList_LinkedList_size_result = LinkedList_size[LinkedList_LinkedList_size_result] set wurst_stack_depth = wurst_stack_depth - 1 set LinkedList_LinkedList_size_result_1 = DummyRecycler_angleQueues[i] set wurst_stack[wurst_stack_depth] = "when calling size in DummyRecycler, line 51" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[LinkedList_LinkedList_size_result_1] == 0 then if LinkedList_LinkedList_size_result_1 == 0 then call error("Nullpointer exception when calling LinkedList.size", "when calling error in LinkedList, line 158") else call error("Called LinkedList.size on invalid object.", "when calling error in LinkedList, line 158") endif endif set LinkedList_LinkedList_size_result_1 = LinkedList_size[LinkedList_LinkedList_size_result_1] set wurst_stack_depth = wurst_stack_depth - 1 if LinkedList_LinkedList_size_result > LinkedList_LinkedList_size_result_1 then set smallestQueue = i endif set i = i + 1 endloop set temp = DummyRecycler_angleQueues[smallestQueue] set wurst_stack[wurst_stack_depth] = "when calling size in DummyRecycler, line 53" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[temp] == 0 then if temp == 0 then call error("Nullpointer exception when calling LinkedList.size", "when calling error in LinkedList, line 158") else call error("Called LinkedList.size on invalid object.", "when calling error in LinkedList, line 158") endif endif set temp = LinkedList_size[temp] set wurst_stack_depth = wurst_stack_depth - 1 if temp >= 6 then call RemoveUnit(u_1) else set temp = DummyRecycler_angleQueues[smallestQueue] set elem = GetHandleId(u_1) set wurst_stack[wurst_stack_depth] = "when calling enqueue in DummyRecycler, line 56" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[temp] == 0 then if temp == 0 then call error("Nullpointer exception when calling LinkedList.enqueue", "when calling error in LinkedList, line 195") else call error("Called LinkedList.enqueue on invalid object.", "when calling error in LinkedList, line 195") endif endif set wurst_stack[wurst_stack_depth] = "when calling enqueue in LinkedList, line 195" set wurst_stack_depth = wurst_stack_depth + 1 call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp, elem, "when calling add in LinkedList, line 196") set wurst_stack_depth = wurst_stack_depth - 1 - 1 set tuple_temp_1 = MapBounds_boundMax_x set tuple_temp = MapBounds_boundMax_y set tuple_temp_1 = tuple_temp_1 - 16. set tuple_temp = tuple_temp - 16. call SetUnitX(u_1, tuple_temp_1) call SetUnitY(u_1, tuple_temp) call PauseUnit(u_1, true) set tuple_temp_1 = smallestQueue * DummyRecycler_ANGLE_DEGREE * 0.017453293 call SetUnitFacing(u_1, tuple_temp_1 * 57.295779513) call SetUnitScale(u_1, 1., 1., 1.) call SetUnitVertexColor(u_1, 255, 255, 255, 255) call SetUnitOwner(u_1, Basics_DUMMY_PLAYER, true) endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function dispatch_DummyCaster_destroyDummyCaster takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.DummyCaster", "when calling error in DummyCaster, line 28") else call error("Called DummyCaster.DummyCaster on invalid object.", "when calling error in DummyCaster, line 28") endif endif set wurst_stack[wurst_stack_depth] = "when calling destroyDummyCaster in DummyCaster, line 28" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling dealloc_DummyCaster in DummyCaster, line 27" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_1] == 0 then call error("Double free: object of type DummyCaster", "when calling error in DummyCaster, line 28") else set DummyCaster_nextFree[DummyCaster_firstFree] = this_1 set DummyCaster_firstFree = DummyCaster_firstFree + 1 set DummyCaster_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 endfunction function call_doAfter_DummyCaster_DummyCaster takes integer this_1, string w__wurst_stackPos returns nothing local integer this_2 local unit dummy_1 local integer id_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set this_2 = this[this_1] set dummy_1 = dummy[this_1] set id_1 = id[this_1] set wurst_stack[wurst_stack_depth] = "when calling recycleDummy in DummyCaster, line 90" set wurst_stack_depth = wurst_stack_depth + 1 if DummyCaster_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling DummyCaster.recycleDummy", "when calling error in DummyCaster, line 95") else call error("Called DummyCaster.recycleDummy on invalid object.", "when calling error in DummyCaster, line 95") endif endif set wurst_stack[wurst_stack_depth] = "when calling recycleDummy in DummyCaster, line 95" set wurst_stack_depth = wurst_stack_depth + 1 call UnitRemoveAbility(dummy_1, id_1) call DummyRecycler_recycle(dummy_1, "when calling recycle in DummyCaster, line 97") set wurst_stack_depth = wurst_stack_depth - 1 - 1 set DummyCaster_castCount[this[this_1]] = DummyCaster_castCount[this[this_1]] - 1 if DummyCaster_castCount[this[this_1]] == 0 then call dispatch_DummyCaster_destroyDummyCaster(this[this_1], "when calling dispatch_DummyCaster_destroyDummyCaster in DummyCaster, line 93") endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function call_nullTimer_ClosureEvents takes integer this_1 returns nothing local integer temp local trigger receiver call TriggerAddAction(ClosureEvents_unitTrig, ref_function_bridge_code__addAction_nullTimer_ClosureEvents) call TriggerAddAction(ClosureEvents_leaveTrig, ref_function_bridge_code__addAction_nullTimer_ClosureEvents_172) call TriggerAddAction(ClosureEvents_keyTrig, ref_function_bridge_code__addAction_nullTimer_ClosureEvents_173) set this_1 = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen this_1 > temp call TriggerRegisterPlayerEvent(ClosureEvents_leaveTrig, Player_players[this_1], EVENT_PLAYER_LEAVE) set receiver = ClosureEvents_keyTrig call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_DOWN_DOWN) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_DOWN_UP) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_UP_DOWN) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_UP_UP) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_LEFT_DOWN) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_LEFT_UP) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_RIGHT_DOWN) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_RIGHT_UP) call TriggerRegisterPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_END_CINEMATIC) call TriggerRegisterPlayerChatEvent(receiver, Player_players[this_1], "", false) set this_1 = this_1 + 1 endloop call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_bridge_code__registerPlayerUnitEvent_nullTimer_ClosureEvents, null) endfunction function call_nullTimer_OnUnitEnterLeave takes integer this_1 returns nothing local group receiver call TriggerRegisterEnterRegion(CreateTrigger(), MapBounds_boundRegion, Filter(ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave)) call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_ISSUED_ORDER, null, ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave, null) set receiver = OnUnitEnterLeave_preplacedUnits call GroupEnumUnitsInRect(receiver, MapBounds_boundRect, null) call ForGroup(OnUnitEnterLeave_preplacedUnits, ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave) set receiver = OnUnitEnterLeave_preplacedUnits call GroupClear(receiver) call DestroyGroup(receiver) endfunction function dispatch_Callback_destroyCallback takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if Callback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Callback.Callback", "when calling error in ClosureTimers, line 125") else call error("Called Callback.Callback on invalid object.", "when calling error in ClosureTimers, line 125") endif endif set wurst_stack[wurst_stack_depth] = "when calling destroyCallback in ClosureTimers, line 125" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling dealloc_Callback in ClosureTimers, line 125" set wurst_stack_depth = wurst_stack_depth + 1 if Callback_typeId[this_1] == 0 then call error("Double free: object of type Callback", "when calling error in ClosureTimers, line 125") else set Callback_firstFree = Callback_firstFree + 1 set Callback_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 endfunction function dispatch_ForGroupCallback_destroyForGroupCallback takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.ForGroupCallback", "when calling error in ClosureForGroups, line 3") else call error("Called ForGroupCallback.ForGroupCallback on invalid object.", "when calling error in ClosureForGroups, line 3") endif endif set wurst_stack[wurst_stack_depth] = "when calling destroyForGroupCallback in ClosureForGroups, line 3" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling dealloc_ForGroupCallback in ClosureForGroups, line 3" set wurst_stack_depth = wurst_stack_depth + 1 if ForGroupCallback_typeId[this_1] == 0 then call error("Double free: object of type ForGroupCallback", "when calling error in ClosureForGroups, line 3") else set ForGroupCallback_nextFree[ForGroupCallback_firstFree] = this_1 set ForGroupCallback_firstFree = ForGroupCallback_firstFree + 1 set ForGroupCallback_typeId[this_1] = 0 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 endfunction function group_forEachFrom takes group this_1, integer cb_1, string w__wurst_stackPos returns nothing local unit iterUnit set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 loop exitwhen FirstOfGroup(this_1) == null set iterUnit = FirstOfGroup(this_1) call GroupRemoveUnit(this_1, iterUnit) call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(cb_1, iterUnit, "when calling callback in ClosureForGroups, line 40") endloop call dispatch_ForGroupCallback_destroyForGroupCallback(cb_1, "when calling dispatch_ForGroupCallback_destroyForGroupCallback in ClosureForGroups, line 41") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function finishPreload takes string w__wurst_stackPos returns nothing local group temp local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call RemoveUnit(Preloader_dum) set temp = Preloader_dumg set wurst_stack[wurst_stack_depth] = "when calling alloc_ForGroupCallback_forEachFrom_Preloader in Preloader, line 48" set wurst_stack_depth = wurst_stack_depth + 1 if ForGroupCallback_firstFree == 0 then if ForGroupCallback_maxIndex < 32768 then set ForGroupCallback_maxIndex = ForGroupCallback_maxIndex + 1 set this_1 = ForGroupCallback_maxIndex set ForGroupCallback_typeId[this_1] = 668 else call error("Out of memory: Could not create ForGroupCallback_forEachFrom_Preloader.", "when calling error in Preloader, line 48") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 668 endif set wurst_stack_depth = wurst_stack_depth - 1 call group_forEachFrom(temp, this_1, "when calling forEachFrom in Preloader, line 48") call DestroyGroup(Preloader_dumg) set Preloader_dumg = null set wurst_stack_depth = wurst_stack_depth - 1 endfunction function testFail takes string msg returns nothing endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call takes integer this_1, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.call", "when calling error in ClosureTimers, line 130") else call error("Called CallbackSingle.call on invalid object.", "when calling error in ClosureTimers, line 130") endif endif if CallbackSingle_typeId[this_1] <= 647 then if CallbackSingle_typeId[this_1] <= 645 then if CallbackSingle_typeId[this_1] <= 644 then if CallbackSingle_typeId[this_1] <= 643 then set wurst_stack[wurst_stack_depth] = "when calling call_doAfter_ClosureTimers in ClosureTimers, line 130" set wurst_stack_depth = wurst_stack_depth + 1 call dispatch_Callback_destroyCallback(cb[this_1], "when calling dispatch_Callback_destroyCallback in ClosureTimers, line 44") call DestroyTimerDialog(dia[this_1]) set wurst_stack_depth = wurst_stack_depth - 1 else set ClosureTimers_x = ClosureTimers_x + 50 endif else set ClosureTimers_x = ClosureTimers_x * 2 endif elseif CallbackSingle_typeId[this_1] <= 646 then set ClosureTimers_x = ClosureTimers_x / 2 set this_1 = ClosureTimers_x if this_1 != 250 then call testFail("Expected <" + I2S(250) + ">, Actual <" + I2S(this_1) + ">") endif else call call_doAfter_DummyCaster_DummyCaster(this_1, "when calling call_doAfter_DummyCaster_DummyCaster in ClosureTimers, line 130") endif elseif CallbackSingle_typeId[this_1] <= 649 then if CallbackSingle_typeId[this_1] <= 648 then set wurst_stack[wurst_stack_depth] = "when calling call_doAfter_DummyRecycler_DummyRecycler in ClosureTimers, line 130" set wurst_stack_depth = wurst_stack_depth + 1 call DummyRecycler_recycle(u[this_1], "when calling recycle in DummyRecycler, line 66") set wurst_stack_depth = wurst_stack_depth - 1 else call call_nullTimer_ClosureEvents(this_1) endif elseif CallbackSingle_typeId[this_1] <= 650 then call call_nullTimer_OnUnitEnterLeave(this_1) else set wurst_stack[wurst_stack_depth] = "when calling call_nullTimer_Preloader in ClosureTimers, line 130" set wurst_stack_depth = wurst_stack_depth + 1 call finishPreload("when calling finishPreload in Preloader, line 58") set wurst_stack_depth = wurst_stack_depth - 1 endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function CallbackSingle_staticCallback takes string w__wurst_stackPos returns nothing local integer cb_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set cb_1 = timer_getData(GetExpiredTimer(), "when calling getData in ClosureTimers, line 140") call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call(cb_1, "when calling call in ClosureTimers, line 141") set wurst_stack[wurst_stack_depth] = "when calling dispatch_CallbackSingle_destroyCallbackSingle in ClosureTimers, line 142" set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_typeId[cb_1] == 0 then if cb_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.CallbackSingle", "when calling error in ClosureTimers, line 128") else call error("Called CallbackSingle.CallbackSingle on invalid object.", "when calling error in ClosureTimers, line 128") endif endif call destroyCallbackSingle(cb_1, "when calling destroyCallbackSingle in ClosureTimers, line 128") set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function bridge_code__start_CallbackSingle_ClosureTimers takes nothing returns nothing set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ClosureTimers, line 135" set wurst_stack_depth = wurst_stack_depth + 1 call CallbackSingle_staticCallback("when calling staticCallback in ClosureTimers, line 135") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function bridge_init_ChannelAbilityPreset takes nothing returns boolean set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ChannelAbilityPreset, line 1" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling new_OrderStringFactory in ChannelAbilityPreset, line 11" set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_OrderStringFactory in OrderStringFactory, line 9" set wurst_stack_depth = wurst_stack_depth + 1 if OrderStringFactory_firstFree == 0 then if OrderStringFactory_maxIndex < 32768 then set OrderStringFactory_maxIndex = OrderStringFactory_maxIndex + 1 else call error("Out of memory: Could not create OrderStringFactory.", "when calling error in OrderStringFactory, line 9") endif else set OrderStringFactory_firstFree = OrderStringFactory_firstFree - 1 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack_depth = wurst_stack_depth - 1 - 1 return true endfunction function new_HashMap takes string w__wurst_stackPos returns integer local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_HashMap in HashMap, line 7" set wurst_stack_depth = wurst_stack_depth + 1 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this_1 = Table_maxIndex set Table_typeId[this_1] = 765 else call error("Out of memory: Could not create HashMap.", "when calling error in HashMap, line 8") set this_1 = 0 endif else set Table_firstFree = Table_firstFree - 1 set this_1 = Table_nextFree[Table_firstFree] set Table_typeId[this_1] = 765 endif set wurst_stack_depth = wurst_stack_depth - 1 set HashMap_size[this_1] = 0 set wurst_stack_depth = wurst_stack_depth - 1 return this_1 endfunction function init_ClosureEvents takes string w__wurst_stackPos returns boolean local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set ClosureEvents_EVENT_PLAYER_CHAT_FILTER = ConvertPlayerEvent(96) set EventListener_castMap = new_HashMap("when calling new_HashMap in ClosureEvents, line 106") set ClosureEvents_unitTrig = CreateTrigger() set ClosureEvents_leaveTrig = CreateTrigger() set ClosureEvents_keyTrig = CreateTrigger() call TriggerAddCondition(UnitIndexer_onIndexTrigger, Condition(ref_function_code__onUnitIndex_ClosureEvents)) call TriggerAddCondition(UnitIndexer_onDeindexTrigger, Condition(ref_function_bridge_code__onUnitDeindex_ClosureEvents)) set wurst_stack[wurst_stack_depth] = "when calling alloc_CallbackSingle_nullTimer_ClosureEvents in ClosureEvents, line 298" set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 649 else call error("Out of memory: Could not create CallbackSingle_nullTimer_ClosureEvents.", "when calling error in ClosureEvents, line 298") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 649 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling nullTimer in ClosureEvents, line 298" set wurst_stack_depth = wurst_stack_depth + 1 call doAfter(0., this_1, "when calling doAfter in ClosureTimers, line 51") set wurst_stack_depth = wurst_stack_depth - 1 - 1 return true endfunction function bridge_init_ClosureEvents takes nothing returns boolean set wurst_stack_depth = 0 return init_ClosureEvents("via function reference ClosureEvents, line 1") endfunction function initializeTable takes string w__wurst_stackPos returns nothing local integer i local integer this_1 local integer parentKey set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set i = 0 loop exitwhen i > 15 set this_1 = Colors_decs set parentKey = StringHash(Colors_hexs[i]) set wurst_stack[wurst_stack_depth] = "when calling saveInt in Colors, line 299" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveInt", "when calling error in Table, line 43") else call error("Called Table.saveInt on invalid object.", "when calling error in Table, line 43") endif endif call SaveInteger(Table_ht, this_1, parentKey, i) set wurst_stack_depth = wurst_stack_depth - 1 set i = i + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 endfunction function new_Table takes string w__wurst_stackPos returns integer local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Table in Table, line 6" set wurst_stack_depth = wurst_stack_depth + 1 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this_1 = Table_maxIndex set Table_typeId[this_1] = 764 else call error("Out of memory: Could not create Table.", "when calling error in Table, line 7") set this_1 = 0 endif else set Table_firstFree = Table_firstFree - 1 set this_1 = Table_nextFree[Table_firstFree] set Table_typeId[this_1] = 764 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this_1 endfunction function init_Colors takes string w__wurst_stackPos returns boolean set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set Colors_hexs[0] = "0" set Colors_hexs[1] = "1" set Colors_hexs[2] = "2" set Colors_hexs[3] = "3" set Colors_hexs[4] = "4" set Colors_hexs[5] = "5" set Colors_hexs[6] = "6" set Colors_hexs[7] = "7" set Colors_hexs[8] = "8" set Colors_hexs[9] = "9" set Colors_hexs[10] = "A" set Colors_hexs[11] = "B" set Colors_hexs[12] = "C" set Colors_hexs[13] = "D" set Colors_hexs[14] = "E" set Colors_hexs[15] = "F" set Colors_decs = new_Table("when calling new_Table in Colors, line 15") call initializeTable("when calling initializeTable in Colors, line 302") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function bridge_init_Colors takes nothing returns boolean set wurst_stack_depth = 0 return init_Colors("via function reference Colors, line 1") endfunction function init_DummyRecycler takes string w__wurst_stackPos returns boolean local integer i local integer temp local real facing_radians local integer j local integer temp_1 local unit dummy_1 local integer this_1 local integer elem set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set DummyRecycler_ANGLE_DEGREE = 360 * 1. / 8 set i = 0 set temp = 7 loop exitwhen i > temp set DummyRecycler_angleQueues[i] = new_LinkedList("when calling new_LinkedList in DummyRecycler, line 79") set facing_radians = i * DummyRecycler_ANGLE_DEGREE set j = 0 set temp_1 = 5 loop exitwhen j > temp_1 set dummy_1 = createDummy(MapBounds_boundMax_x - 16., MapBounds_boundMax_y - 16., facing_radians) set this_1 = DummyRecycler_angleQueues[i] set elem = GetHandleId(dummy_1) set wurst_stack[wurst_stack_depth] = "when calling enqueue in DummyRecycler, line 83" set wurst_stack_depth = wurst_stack_depth + 1 if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.enqueue", "when calling error in LinkedList, line 195") else call error("Called LinkedList.enqueue on invalid object.", "when calling error in LinkedList, line 195") endif endif set wurst_stack[wurst_stack_depth] = "when calling enqueue in LinkedList, line 195" set wurst_stack_depth = wurst_stack_depth + 1 call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_1, elem, "when calling add in LinkedList, line 196") set wurst_stack_depth = wurst_stack_depth - 1 - 1 set j = j + 1 endloop set i = i + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function bridge_init_DummyRecycler takes nothing returns boolean set wurst_stack_depth = 0 return init_DummyRecycler("via function reference DummyRecycler, line 1") endfunction function bridge_init_EventHelper takes nothing returns boolean set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference EventHelper, line 1" set wurst_stack_depth = wurst_stack_depth + 1 call new_HashMap("when calling new_HashMap in EventHelper, line 7") call new_HashMap("when calling new_HashMap in EventHelper, line 8") call new_Table("when calling new_Table in EventHelper, line 9") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function verifyFrameNameLength takes string name, string w__wurst_stackPos returns boolean set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 if StringLength(name) > 560 then call error("Trying to address frame with exceeding maximum frame name length (" + I2S(560) + ") for: " + name, "when calling error in Framehandle, line 78") set wurst_stack_depth = wurst_stack_depth - 1 return false endif set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function init_Framehandle takes string w__wurst_stackPos returns boolean local framehandle owner set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) set owner = Framehandle_GAME_UI set wurst_stack[wurst_stack_depth] = "when calling createFrame in Framehandle, line 491" set wurst_stack_depth = wurst_stack_depth + 1 call verifyFrameNameLength("SetMousePositionCage", "when calling verifyFrameNameLength in Framehandle, line 144") set owner = BlzCreateFrameByType("FRAME", "SetMousePositionCage", owner, null, 0) set wurst_stack_depth = wurst_stack_depth - 1 call BlzFrameSetSize(owner, 0.0001, 0.0001) set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function bridge_init_Framehandle takes nothing returns boolean set wurst_stack_depth = 0 return init_Framehandle("via function reference Framehandle, line 1") endfunction function init_LinkedList takes string w__wurst_stackPos returns boolean set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Comparator_LinkedList in LinkedList, line 563" set wurst_stack_depth = wurst_stack_depth + 1 if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 else call error("Out of memory: Could not create Comparator_LinkedList.", "when calling error in LinkedList, line 563") endif else set Comparator_firstFree = Comparator_firstFree - 1 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Comparator_LinkedList in LinkedList, line 567" set wurst_stack_depth = wurst_stack_depth + 1 if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 else call error("Out of memory: Could not create Comparator_LinkedList.", "when calling error in LinkedList, line 567") endif else set Comparator_firstFree = Comparator_firstFree - 1 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return true endfunction function bridge_init_LinkedList takes nothing returns boolean set wurst_stack_depth = 0 return init_LinkedList("via function reference LinkedList, line 1") endfunction function new_IdGenerator takes integer start, string w__wurst_stackPos returns integer set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_IdGenerator in ObjectIdGenerator, line 19" set wurst_stack_depth = wurst_stack_depth + 1 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set start = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.", "when calling error in ObjectIdGenerator, line 13") set start = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set start = IdGenerator_nextFree[IdGenerator_firstFree] endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return start endfunction function bridge_init_ObjectIdGenerator takes nothing returns boolean set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference ObjectIdGenerator, line 1" set wurst_stack_depth = wurst_stack_depth + 1 call new_IdGenerator(2016423984, "when calling new_IdGenerator in ObjectIdGenerator, line 6") call new_IdGenerator(1213018160, "when calling new_IdGenerator in ObjectIdGenerator, line 7") call new_IdGenerator(1095577648, "when calling new_IdGenerator in ObjectIdGenerator, line 8") call new_IdGenerator(1112354864, "when calling new_IdGenerator in ObjectIdGenerator, line 9") call new_IdGenerator(1229795376, "when calling new_IdGenerator in ObjectIdGenerator, line 10") call new_IdGenerator(1380790320, "when calling new_IdGenerator in ObjectIdGenerator, line 11") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function init_OnUnitEnterLeave takes string w__wurst_stackPos returns boolean local integer i local integer temp set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set OnUnitEnterLeave_eventTrigger = CreateTrigger() set OnUnitEnterLeave_preplacedUnits = CreateGroup() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call SetPlayerAbilityAvailable(Player_players[i], 1095577649, false) set i = i + 1 endloop set wurst_stack[wurst_stack_depth] = "when calling alloc_CallbackSingle_nullTimer_OnUnitEnterLeave in OnUnitEnterLeave, line 64" set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set i = CallbackSingle_maxIndex set CallbackSingle_typeId[i] = 650 else call error("Out of memory: Could not create CallbackSingle_nullTimer_OnUnitEnterLeave.", "when calling error in OnUnitEnterLeave, line 64") set i = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set i = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[i] = 650 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling nullTimer in OnUnitEnterLeave, line 64" set wurst_stack_depth = wurst_stack_depth + 1 call doAfter(0., i, "when calling doAfter in ClosureTimers, line 51") set wurst_stack_depth = wurst_stack_depth - 1 - 1 return true endfunction function bridge_init_OnUnitEnterLeave takes nothing returns boolean set wurst_stack_depth = 0 return init_OnUnitEnterLeave("via function reference OnUnitEnterLeave, line 1") endfunction function init_Preloader takes string w__wurst_stackPos returns boolean local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set Preloader_dumg = CreateGroup() set Preloader_dum = CreateUnit(Basics_DUMMY_PLAYER, 1970497636, MapBounds_playableMin_x, MapBounds_playableMin_y, 0.0) call SetUnitInvulnerable(Preloader_dum, true) if Preloader_dum == null then call error("DUMMY_UNITID not added correctly to the map.", "when calling error in Preloader, line 56") endif set wurst_stack[wurst_stack_depth] = "when calling alloc_CallbackSingle_nullTimer_Preloader in Preloader, line 58" set wurst_stack_depth = wurst_stack_depth + 1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 651 else call error("Out of memory: Could not create CallbackSingle_nullTimer_Preloader.", "when calling error in Preloader, line 58") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 651 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling nullTimer in Preloader, line 58" set wurst_stack_depth = wurst_stack_depth + 1 call doAfter(0., this_1, "when calling doAfter in ClosureTimers, line 51") set wurst_stack_depth = wurst_stack_depth - 1 - 1 return true endfunction function bridge_init_Preloader takes nothing returns boolean set wurst_stack_depth = 0 return init_Preloader("via function reference Preloader, line 1") endfunction function bridge_init_RegisterEvents takes nothing returns boolean set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference RegisterEvents, line 1" set wurst_stack_depth = wurst_stack_depth + 1 set RegisterEvents_onCastMap = new_HashMap("when calling new_HashMap in RegisterEvents, line 55") call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_bridge_code__registerPlayerUnitEvent_RegisterEvents, null) set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function initialize takes nothing returns nothing local integer i = 0 local integer temp = StringUtils_MAX_INDEX loop exitwhen i > temp set i = i + 1 endloop endfunction function bridge_init_StringUtils takes nothing returns boolean set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference StringUtils, line 1" set wurst_stack_depth = wurst_stack_depth + 1 set StringUtils_MAX_INDEX = 127 call initialize() call stringToIndex("", "when calling stringToIndex in StringUtils, line 187") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function bridge_init_TimerUtils takes nothing returns boolean set wurst_stack_depth = 0 set wurst_stack[wurst_stack_depth] = "via function reference TimerUtils, line 1" set wurst_stack_depth = wurst_stack_depth + 1 set TimerUtils_timerData = new_Table("when calling new_Table in TimerUtils, line 13") call new_HashMap("when calling new_HashMap in TimerUtils, line 59") set wurst_stack_depth = wurst_stack_depth - 1 return true endfunction function init_TypeCasting takes string w__wurst_stackPos returns boolean local integer this_1 set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set TypeCasting_typecastdata = new_Table("when calling new_Table in TypeCasting, line 7") set wurst_stack[wurst_stack_depth] = "when calling initTypecastData in TypeCasting, line 15" set wurst_stack_depth = wurst_stack_depth + 1 set this_1 = TypeCasting_typecastdata set wurst_stack[wurst_stack_depth] = "when calling saveString in TypeCasting, line 12" set wurst_stack_depth = wurst_stack_depth + 1 if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveString", "when calling error in Table, line 61") else call error("Called Table.saveString on invalid object.", "when calling error in Table, line 61") endif endif call SaveStr(Table_ht, this_1, 0, "") set wurst_stack_depth = wurst_stack_depth - 1 - 1 - 1 return true endfunction function bridge_init_TypeCasting takes nothing returns boolean set wurst_stack_depth = 0 return init_TypeCasting("via function reference TypeCasting, line 1") endfunction function EventListener_addSpellInternal takes unit u_1, integer abilId, integer listener, string w__wurst_stackPos returns integer set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set OnCastListener_abilId[listener] = abilId if u_1 != null then set OnCastListener_eventUnit[listener] = u_1 set abilId = GetUnitUserData(u_1) if EventListener_castMapCasters[abilId] != 0 then set OnCastListener_prev[EventListener_castMapCasters[abilId]] = listener set OnCastListener_next[listener] = EventListener_castMapCasters[abilId] endif set EventListener_castMapCasters[abilId] = listener else if dispatch_HashMap_HashMap_HashMap_has(EventListener_castMap, abilId, "when calling has in ClosureEvents, line 171") then set OnCastListener_prev[dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId, "when calling get in ClosureEvents, line 172")] = listener set OnCastListener_next[listener] = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId, "when calling get in ClosureEvents, line 173") endif call dispatch_HashMap_HashMap_HashMap_put(EventListener_castMap, abilId, listener, "when calling put in ClosureEvents, line 175") endif set wurst_stack_depth = wurst_stack_depth - 1 return listener endfunction function registerCommand takes player thePlayer, string command, integer handler, string w__wurst_stackPos returns nothing set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 call dispatch_HashMap_HashMap_HashMap_put(dispatch_HashMap_HashMap_HashMap_get(nullclosurebug_commands, GetPlayerId(thePlayer), "when calling get in nullclosurebug.wurst, line 38"), stringToIndex(command, "when calling stringToIndex in nullclosurebug.wurst, line 38"), handler, "when calling put in nullclosurebug.wurst, line 38") set wurst_stack_depth = wurst_stack_depth - 1 endfunction function init_nullclosurebug takes string w__wurst_stackPos returns boolean local trigger t local unit a_1 local unit receiver local integer handler local integer i local integer temp local player p set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set nullclosurebug_MAX_PLAYERS = PLAYER_NEUTRAL_AGGRESSIVE - 1 set nullclosurebug_commands = new_HashMap("when calling new_HashMap in nullclosurebug.wurst, line 35") set t = CreateTrigger() set handler = 0 set i = nullclosurebug_MAX_PLAYERS loop exitwhen handler > i set p = Player_players[handler] call dispatch_HashMap_HashMap_HashMap_put(nullclosurebug_commands, GetPlayerId(p), new_HashMap("when calling new_HashMap in nullclosurebug.wurst, line 79"), "when calling put in nullclosurebug.wurst, line 79") call TriggerRegisterPlayerChatEvent(t, Player_players[handler], "-", false) set handler = handler + 1 endloop call TriggerAddAction(t, ref_function_bridge_code__addAction_nullclosurebug) set wurst_stack[wurst_stack_depth] = "when calling alloc_CommandHandler_registerCommandAll_nullclosurebug in nullclosurebug.wurst, line 90" set wurst_stack_depth = wurst_stack_depth + 1 if CommandHandler_firstFree == 0 then if CommandHandler_maxIndex < 32768 then set CommandHandler_maxIndex = CommandHandler_maxIndex + 1 set handler = CommandHandler_maxIndex set CommandHandler_typeId[handler] = 653 else call error("Out of memory: Could not create CommandHandler_registerCommandAll_nullclosurebug.", "when calling error in nullclosurebug.wurst, line 90") set handler = 0 endif else set CommandHandler_firstFree = CommandHandler_firstFree - 1 set handler = CommandHandler_nextFree[CommandHandler_firstFree] set CommandHandler_typeId[handler] = 653 endif set wurst_stack_depth = wurst_stack_depth - 1 set w__wurst_stackPos = "test-wurst-commands" set wurst_stack[wurst_stack_depth] = "when calling registerCommandAll in nullclosurebug.wurst, line 90" set wurst_stack_depth = wurst_stack_depth + 1 set i = 0 set temp = nullclosurebug_MAX_PLAYERS loop exitwhen i > temp call registerCommand(Player_players[i], w__wurst_stackPos, handler, "when calling registerCommand in nullclosurebug.wurst, line 42") set i = i + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 set p = Player_players[0] call CreateUnit(p, 1752591476, 0., 0., 0.0) set p = Player_players[0] set receiver = CreateUnit(p, 1214344551, 0., 0., 0.0) call UnitAddAbility(receiver, 1095267427) call SetHeroInt(receiver, 500, true) set a_1 = receiver set wurst_stack[wurst_stack_depth] = "when calling alloc_CommandHandler_registerCommandAll_nullclosurebug in nullclosurebug.wurst, line 100" set wurst_stack_depth = wurst_stack_depth + 1 if CommandHandler_firstFree == 0 then if CommandHandler_maxIndex < 32768 then set CommandHandler_maxIndex = CommandHandler_maxIndex + 1 set handler = CommandHandler_maxIndex set CommandHandler_typeId[handler] = 654 else call error("Out of memory: Could not create CommandHandler_registerCommandAll_nullclosurebug.", "when calling error in nullclosurebug.wurst, line 100") set handler = 0 endif else set CommandHandler_firstFree = CommandHandler_firstFree - 1 set handler = CommandHandler_nextFree[CommandHandler_firstFree] set CommandHandler_typeId[handler] = 654 endif set wurst_stack_depth = wurst_stack_depth - 1 set a[handler] = receiver set w__wurst_stackPos = "cast" set wurst_stack[wurst_stack_depth] = "when calling registerCommandAll in nullclosurebug.wurst, line 100" set wurst_stack_depth = wurst_stack_depth + 1 set i = 0 set temp = nullclosurebug_MAX_PLAYERS loop exitwhen i > temp call registerCommand(Player_players[i], w__wurst_stackPos, handler, "when calling registerCommand in nullclosurebug.wurst, line 42") set i = i + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_CommandHandler_registerCommandAll_nullclosurebug in nullclosurebug.wurst, line 105" set wurst_stack_depth = wurst_stack_depth + 1 if CommandHandler_firstFree == 0 then if CommandHandler_maxIndex < 32768 then set CommandHandler_maxIndex = CommandHandler_maxIndex + 1 set handler = CommandHandler_maxIndex set CommandHandler_typeId[handler] = 655 else call error("Out of memory: Could not create CommandHandler_registerCommandAll_nullclosurebug.", "when calling error in nullclosurebug.wurst, line 105") set handler = 0 endif else set CommandHandler_firstFree = CommandHandler_firstFree - 1 set handler = CommandHandler_nextFree[CommandHandler_firstFree] set CommandHandler_typeId[handler] = 655 endif set wurst_stack_depth = wurst_stack_depth - 1 set a_153[handler] = a_1 set w__wurst_stackPos = "owner" set i = handler set wurst_stack[wurst_stack_depth] = "when calling registerCommandAll in nullclosurebug.wurst, line 105" set wurst_stack_depth = wurst_stack_depth + 1 set temp = 0 set handler = nullclosurebug_MAX_PLAYERS loop exitwhen temp > handler call registerCommand(Player_players[temp], w__wurst_stackPos, i, "when calling registerCommand in nullclosurebug.wurst, line 42") set temp = temp + 1 endloop set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_OnPointCast_onPointCast_nullclosurebug in nullclosurebug.wurst, line 112" set wurst_stack_depth = wurst_stack_depth + 1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < 32768 then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set handler = OnCastListener_maxIndex set OnCastListener_typeId[handler] = 737 else call error("Out of memory: Could not create OnPointCast_onPointCast_nullclosurebug.", "when calling error in nullclosurebug.wurst, line 112") set handler = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set handler = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[handler] = 737 endif set wurst_stack_depth = wurst_stack_depth - 1 set OnCastListener_next[handler] = 0 set OnCastListener_prev[handler] = 0 set OnCastListener_eventUnit[handler] = null set wurst_stack[wurst_stack_depth] = "when calling onPointCast in nullclosurebug.wurst, line 112" set wurst_stack_depth = wurst_stack_depth + 1 call EventListener_addSpellInternal(null, 1095577654, handler, "when calling addSpellInternal in ClosureEvents, line 159") set wurst_stack_depth = wurst_stack_depth - 1 - 1 return true endfunction function bridge_init_nullclosurebug takes nothing returns boolean set wurst_stack_depth = 0 return init_nullclosurebug("via function reference nullclosurebug.wurst, line 1") endfunction function prepareUnit takes unit u_1 returns nothing call UnitAddAbility(u_1, 1095577649) call UnitMakeAbilityPermanent(u_1, true, 1095577649) set OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount] = u_1 set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount + 1 call TriggerEvaluate(OnUnitEnterLeave_eventTrigger) set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount - 1 endfunction function code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetFilterUnit()) endfunction function code__ForGroup_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetEnumUnit()) endfunction function code__onUnitIndex_ClosureEvents takes nothing returns nothing call TriggerRegisterUnitEvent(ClosureEvents_unitTrig, UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1], EVENT_UNIT_DAMAGED) endfunction function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave takes nothing returns nothing local unit leavingUnit = GetTriggerUnit() if GetUnitAbilityLevel(leavingUnit, 1095577649) == 0 and GetIssuedOrderId() == 852056 then set OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount] = leavingUnit set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount + 1 call TriggerExecute(OnUnitEnterLeave_eventTrigger) set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount - 1 endif endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + 0.030 endfunction function init_Abilities takes nothing returns boolean return true endfunction function init_AbilityIds takes nothing returns boolean return true endfunction function init_AbilityObjEditing takes nothing returns boolean return true endfunction function init_Angle takes nothing returns boolean return true endfunction function init_AttachmentPoints takes nothing returns boolean return true endfunction function init_Basics takes nothing returns boolean set Basics_DUMMY_PLAYER = Player_players[PLAYER_NEUTRAL_PASSIVE] return true endfunction function initPows takes nothing returns nothing local integer allPows local integer i local integer temp set BitSet_pows[0] = 1 set allPows = 1 set i = 1 set temp = 31 loop exitwhen i > temp set BitSet_pows[i] = BitSet_pows[i - 1] * 2 set allPows = BlzBitOr(allPows, BitSet_pows[i]) set i = i + 1 endloop set i = 0 set temp = 31 loop exitwhen i > temp set i = i + 1 endloop endfunction function init_BitSet takes nothing returns boolean call initPows() return true endfunction function init_BuffIds takes nothing returns boolean return true endfunction function init_Buildings takes nothing returns boolean return true endfunction function init_ClosureForGroups takes nothing returns boolean call CreateGroup() call Filter(ref_function_bridge_code__Filter_ClosureForGroups) call Rect(0., 0., 0., 0.) return true endfunction function init_ClosureTimers takes nothing returns boolean set ClosureTimers_x = 200 return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_Doodads takes nothing returns boolean return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_HT = hashtable_compiletime return true endfunction function init_GameTimer takes nothing returns boolean call TimerStart(CreateTimer(), 100000., false, null) call TimerStart(CreateTimer(), 0.030, true, ref_function_code__startPeriodic_GameTimer) return true endfunction function init_Group takes nothing returns boolean call CreateGroup() return true endfunction function init_HashList takes nothing returns boolean set HashList_ht = hashtable_compiletime_162 set HashList_occurences = hashtable_compiletime_163 return true endfunction function init_Icons takes nothing returns boolean return true endfunction function init_InstantDummyCaster takes nothing returns boolean local unit receiver = CreateUnit(Basics_DUMMY_PLAYER, 2016423986, MapBounds_boundMax_x, MapBounds_boundMax_y, 0.0) call SetUnitPathing(receiver, false) call UnitAddAbility(receiver, 1097691750) call UnitRemoveAbility(receiver, 1097691750) call UnitAddAbility(receiver, 1095577652) call UnitRemoveAbility(receiver, 1095577652) set InstantDummyCaster_caster = receiver return true endfunction function init_Integer takes nothing returns boolean return true endfunction function init_ItemIds takes nothing returns boolean return true endfunction function init_Lightning takes nothing returns boolean return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true endfunction function initMapBounds takes nothing returns nothing local rect cond_result local region receiver local real tuple_temp local real tuple_temp_1 if MagicFunctions_compiletime then set cond_result = Rect(-1024., -1024., 1024., 1024.) else set cond_result = bj_mapInitialPlayableArea endif set MapBounds_playableMapRect = cond_result set receiver = CreateRegion() call RegionAddRect(receiver, MapBounds_playableMapRect) if MagicFunctions_compiletime then set cond_result = Rect(-1536., -1536., 1536., 1536.) else set cond_result = GetWorldBounds() endif set MapBounds_boundRect = cond_result set receiver = CreateRegion() call RegionAddRect(receiver, MapBounds_boundRect) set MapBounds_boundRegion = receiver set tuple_temp = GetRectMinX(MapBounds_playableMapRect) set tuple_temp_1 = GetRectMinY(MapBounds_playableMapRect) set MapBounds_playableMin_x = tuple_temp set MapBounds_playableMin_y = tuple_temp_1 call GetRectMaxX(MapBounds_playableMapRect) call GetRectMaxY(MapBounds_playableMapRect) set tuple_temp = GetRectMinX(MapBounds_boundRect) set tuple_temp_1 = GetRectMinY(MapBounds_boundRect) set MapBounds_boundMin_x = tuple_temp set MapBounds_boundMin_y = tuple_temp_1 set tuple_temp_1 = GetRectMaxX(MapBounds_boundRect) set tuple_temp = GetRectMaxY(MapBounds_boundRect) set MapBounds_boundMax_x = tuple_temp_1 set MapBounds_boundMax_y = tuple_temp endfunction function init_MapBounds takes nothing returns boolean call initMapBounds() return true endfunction function init_Maths takes nothing returns boolean return true endfunction function init_Matrices takes nothing returns boolean return true endfunction function init_ObjectIds takes nothing returns boolean return true endfunction function init_Objects takes nothing returns boolean return true endfunction function init_Orders takes nothing returns boolean return true endfunction function init_Player takes nothing returns boolean local integer i local integer temp set Player_localPlayer = GetLocalPlayer() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set Player_players[i] = Player(i) set i = i + 1 endloop return true endfunction function init_Playercolor takes nothing returns boolean return true endfunction function init_Printing takes nothing returns boolean return true endfunction function init_Quaternion takes nothing returns boolean return true endfunction function init_Real takes nothing returns boolean return true endfunction function init_Sounds takes nothing returns boolean return true endfunction function init_Soundsets takes nothing returns boolean return true endfunction function init_String takes nothing returns boolean return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_161 return true endfunction function init_TargetsAllowed takes nothing returns boolean return true endfunction function init_Textures takes nothing returns boolean return true endfunction function init_UI takes nothing returns boolean return true endfunction function init_UnitIds takes nothing returns boolean return true endfunction function init_UnitIndexer takes nothing returns boolean set UnitIndexer_onIndexTrigger = CreateTrigger() set UnitIndexer_onDeindexTrigger = CreateTrigger() call TriggerAddCondition(OnUnitEnterLeave_eventTrigger, Filter(ref_function_bridge_code__onEnter_UnitIndexer)) call TriggerAddAction(OnUnitEnterLeave_eventTrigger, ref_function_bridge_code__onLeave_UnitIndexer) return true endfunction function init_Units takes nothing returns boolean return true endfunction function init_Vectors takes nothing returns boolean call Location(0., 0.) return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function initGlobals takes nothing returns nothing set ref_function_init_Abilities = function init_Abilities set ref_function_init_AbilityIds = function init_AbilityIds set ref_function_init_Real = function init_Real set ref_function_init_Integer = function init_Integer set ref_function_init_BitSet = function init_BitSet set ref_function_init_String = function init_String set ref_function_init_TargetsAllowed = function init_TargetsAllowed set ref_function_init_Angle = function init_Angle set ref_function_init_Vectors = function init_Vectors set ref_function_init_Destructable = function init_Destructable set ref_function_init_Player = function init_Player set ref_function_init_Maths = function init_Maths set ref_function_init_Printing = function init_Printing set ref_function_init_MagicFunctions = function init_MagicFunctions set ref_function_init_Basics = function init_Basics set ref_function_init_GameTimer = function init_GameTimer set ref_function_init_ErrorHandling = function init_ErrorHandling set ref_function_init_Matrices = function init_Matrices set ref_function_init_Quaternion = function init_Quaternion set ref_function_init_Table = function init_Table set ref_function_init_Playercolor = function init_Playercolor set ref_function_bridge_init_Colors = function bridge_init_Colors set ref_function_bridge_init_Framehandle = function bridge_init_Framehandle set ref_function_init_Group = function init_Group set ref_function_init_Lightning = function init_Lightning set ref_function_init_WeatherEffects = function init_WeatherEffects set ref_function_bridge_init_TypeCasting = function bridge_init_TypeCasting set ref_function_init_HashList = function init_HashList set ref_function_bridge_init_EventHelper = function bridge_init_EventHelper set ref_function_init_AbilityObjEditing = function init_AbilityObjEditing set ref_function_init_AttachmentPoints = function init_AttachmentPoints set ref_function_init_BuffIds = function init_BuffIds set ref_function_init_Buildings = function init_Buildings set ref_function_init_ClosureForGroups = function init_ClosureForGroups set ref_function_bridge_init_LinkedList = function bridge_init_LinkedList set ref_function_init_ObjectIds = function init_ObjectIds set ref_function_bridge_init_TimerUtils = function bridge_init_TimerUtils set ref_function_init_ClosureTimers = function init_ClosureTimers set ref_function_init_UnitIds = function init_UnitIds set ref_function_init_MapBounds = function init_MapBounds set ref_function_bridge_init_Preloader = function bridge_init_Preloader set ref_function_bridge_init_ObjectIdGenerator = function bridge_init_ObjectIdGenerator set ref_function_init_Icons = function init_Icons set ref_function_bridge_init_ChannelAbilityPreset = function bridge_init_ChannelAbilityPreset set ref_function_bridge_init_RegisterEvents = function bridge_init_RegisterEvents set ref_function_init_Orders = function init_Orders set ref_function_bridge_init_OnUnitEnterLeave = function bridge_init_OnUnitEnterLeave set ref_function_init_UnitIndexer = function init_UnitIndexer set ref_function_bridge_init_ClosureEvents = function bridge_init_ClosureEvents set ref_function_init_Doodads = function init_Doodads set ref_function_bridge_init_DummyRecycler = function bridge_init_DummyRecycler set ref_function_init_InstantDummyCaster = function init_InstantDummyCaster set ref_function_init_ItemIds = function init_ItemIds set ref_function_init_Objects = function init_Objects set ref_function_init_Sounds = function init_Sounds set ref_function_init_Soundsets = function init_Soundsets set ref_function_bridge_init_StringUtils = function bridge_init_StringUtils set ref_function_init_Textures = function init_Textures set ref_function_init_UI = function init_UI set ref_function_init_Units = function init_Units set ref_function_bridge_init_nullclosurebug = function bridge_init_nullclosurebug set ref_function_code__onUnitIndex_ClosureEvents = function code__onUnitIndex_ClosureEvents set ref_function_bridge_code__onUnitDeindex_ClosureEvents = function bridge_code__onUnitDeindex_ClosureEvents set ref_function_bridge_EventListener_generalEventCallback = function bridge_EventListener_generalEventCallback set ref_function_bridge_code__Filter_ClosureForGroups = function bridge_code__Filter_ClosureForGroups set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer set ref_function_bridge_code__onEnter_UnitIndexer = function bridge_code__onEnter_UnitIndexer set ref_function_bridge_code__onLeave_UnitIndexer = function bridge_code__onLeave_UnitIndexer set ref_function_bridge_code__addAction_nullclosurebug = function bridge_code__addAction_nullclosurebug set ref_function_bridge_code__addAction_nullTimer_ClosureEvents = function bridge_code__addAction_nullTimer_ClosureEvents set ref_function_bridge_code__addAction_nullTimer_ClosureEvents_172 = function bridge_code__addAction_nullTimer_ClosureEvents_137 set ref_function_bridge_code__addAction_nullTimer_ClosureEvents_173 = function bridge_code__addAction_nullTimer_ClosureEvents_138 set ref_function_bridge_code__registerPlayerUnitEvent_nullTimer_ClosureEvents = function bridge_code__registerPlayerUnitEvent_nullTimer_ClosureEvents set ref_function_bridge_code__start_CallbackSingle_ClosureTimers = function bridge_code__start_CallbackSingle_ClosureTimers set ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave = function code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave set ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave = function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave set ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave = function code__ForGroup_nullTimer_OnUnitEnterLeave set ref_function_bridge_code__registerPlayerUnitEvent_RegisterEvents = function bridge_code__registerPlayerUnitEvent_RegisterEvents endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call ExecuteFunc("initCompiletimeState_0") set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_Abilities)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Abilities.", "when calling error in Abilities, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityIds.", "when calling error in AbilityIds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Real)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Real.", "when calling error in Real, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Integer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Integer.", "when calling error in Integer, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BitSet)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BitSet.", "when calling error in BitSet, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_String)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package String.", "when calling error in String, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TargetsAllowed)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TargetsAllowed.", "when calling error in TargetsAllowed, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Angle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Angle.", "when calling error in Angle, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Vectors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Vectors.", "when calling error in Vectors, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Destructable)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Destructable.", "when calling error in Destructable, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Player)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Player.", "when calling error in Player, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Maths)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Maths.", "when calling error in Maths, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Printing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Printing.", "when calling error in Printing, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MagicFunctions)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MagicFunctions.", "when calling error in MagicFunctions, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Basics)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Basics.", "when calling error in Basics, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameTimer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameTimer.", "when calling error in GameTimer, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ErrorHandling)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ErrorHandling.", "when calling error in ErrorHandling, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Matrices)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Matrices.", "when calling error in Matrices, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Quaternion)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Quaternion.", "when calling error in Quaternion, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Table)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Table.", "when calling error in Table, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Playercolor)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Playercolor.", "when calling error in Playercolor, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_Colors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Colors.", "when calling error in Colors, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_Framehandle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Framehandle.", "when calling error in Framehandle, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Group)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Group.", "when calling error in Group, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Lightning)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Lightning.", "when calling error in Lightning, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WeatherEffects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WeatherEffects.", "when calling error in WeatherEffects, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_TypeCasting)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TypeCasting.", "when calling error in TypeCasting, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashList.", "when calling error in HashList, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_EventHelper)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EventHelper.", "when calling error in EventHelper, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityObjEditing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityObjEditing.", "when calling error in AbilityObjEditing, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AttachmentPoints)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AttachmentPoints.", "when calling error in AttachmentPoints, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BuffIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BuffIds.", "when calling error in BuffIds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Buildings)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Buildings.", "when calling error in Buildings, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureForGroups)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureForGroups.", "when calling error in ClosureForGroups, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_LinkedList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LinkedList.", "when calling error in LinkedList, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ObjectIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectIds.", "when calling error in ObjectIds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_TimerUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TimerUtils.", "when calling error in TimerUtils, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureTimers)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureTimers.", "when calling error in ClosureTimers, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitIds.", "when calling error in UnitIds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MapBounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MapBounds.", "when calling error in MapBounds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_Preloader)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Preloader.", "when calling error in Preloader, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_ObjectIdGenerator)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectIdGenerator.", "when calling error in ObjectIdGenerator, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Icons)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Icons.", "when calling error in Icons, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_ChannelAbilityPreset)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ChannelAbilityPreset.", "when calling error in ChannelAbilityPreset, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_RegisterEvents)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package RegisterEvents.", "when calling error in RegisterEvents, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Orders)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Orders.", "when calling error in Orders, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_OnUnitEnterLeave)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package OnUnitEnterLeave.", "when calling error in OnUnitEnterLeave, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitIndexer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitIndexer.", "when calling error in UnitIndexer, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_ClosureEvents)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureEvents.", "when calling error in ClosureEvents, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Doodads)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Doodads.", "when calling error in Doodads, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_DummyRecycler)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DummyRecycler.", "when calling error in DummyRecycler, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_InstantDummyCaster)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package InstantDummyCaster.", "when calling error in InstantDummyCaster, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ItemIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ItemIds.", "when calling error in ItemIds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Objects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Objects.", "when calling error in Objects, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Sounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Sounds.", "when calling error in Sounds, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Soundsets)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Soundsets.", "when calling error in Soundsets, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_StringUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package StringUtils.", "when calling error in StringUtils, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Textures)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Textures.", "when calling error in Textures, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UI)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UI.", "when calling error in UI, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Units)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Units.", "when calling error in Units, line 1") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_bridge_init_nullclosurebug)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package nullclosurebug.", "when calling error in nullclosurebug.wurst, line 1") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function config takes nothing returns nothing endfunction