// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 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_playableMax_x=0. real MapBounds_playableMax_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 string array StringUtils_c2s 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_169=null hashtable hashtable_compiletime_170=null hashtable hashtable_compiletime_171=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 array Comparator_nextFree 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 array OrderStringFactory_nextFree 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_161 real real_asAngleDegrees_return_radians=0. real real_asAngleRadians_return_radians=0. real unit_getPos_return_x=0. real unit_getPos_return_y=0. real vec2_op_minus_return_x=0. real vec2_op_minus_return_y=0. real EventData_getAbilityTargetPos_return_x=0. real EventData_getAbilityTargetPos_return_y=0. real EventData_getSpellTargetPos_return_x=0. real EventData_getSpellTargetPos_return_y=0. real vec2_angleTo_return_radians=0. real vec2_toVec3_return_x=0. real vec2_toVec3_return_y=0. real vec2_toVec3_return_z=0. real vec2_op_plus_return_x=0. real vec2_op_plus_return_y=0. real vec2_op_mult_return_x=0. 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_init_Colors=null code ref_function_init_Framehandle=null code ref_function_init_Group=null code ref_function_init_Lightning=null code ref_function_init_WeatherEffects=null code ref_function_init_TypeCasting=null code ref_function_init_HashList=null code ref_function_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_init_LinkedList=null code ref_function_init_ObjectIds=null code ref_function_init_TimerUtils=null code ref_function_init_ClosureTimers=null code ref_function_init_UnitIds=null code ref_function_init_MapBounds=null code ref_function_init_Preloader=null code ref_function_init_ObjectIdGenerator=null code ref_function_init_Icons=null code ref_function_init_ChannelAbilityPreset=null code ref_function_init_RegisterEvents=null code ref_function_init_Orders=null code ref_function_init_OnUnitEnterLeave=null code ref_function_init_UnitIndexer=null code ref_function_init_ClosureEvents=null code ref_function_init_Doodads=null code ref_function_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_init_StringUtils=null code ref_function_init_Textures=null code ref_function_init_UI=null code ref_function_init_Units=null code ref_function_init_nullclosurebug=null code ref_function_code__onUnitIndex_ClosureEvents=null code ref_function_code__onUnitDeindex_ClosureEvents=null code ref_function_EventListener_generalEventCallback=null code ref_function_code__Filter_ClosureForGroups=null code ref_function_code__startPeriodic_GameTimer=null code ref_function_code__registerPlayerUnitEvent_RegisterEvents=null code ref_function_code__onEnter_UnitIndexer=null code ref_function_code__onLeave_UnitIndexer=null code ref_function_code__addAction_nullclosurebug=null code ref_function_code__addAction_nullTimer_ClosureEvents=null code ref_function_code__addAction_nullTimer_ClosureEvents_184=null code ref_function_code__addAction_nullTimer_ClosureEvents_185=null code ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents=null code ref_function_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 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 printLog takes player showTo, integer loglvl, string msg returns nothing if 2 <= loglvl then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(loglvl) + " - " + msg) endif endfunction function Log_error takes string msg returns nothing call printLog(Player_localPlayer, 4, msg) endfunction function compileError takes string msg returns nothing endfunction function hashtable_hasBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedBoolean(this_1, parentKey, childKey) endfunction function hashtable_hasInt takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedInteger(this_1, parentKey, childKey) endfunction function hashtable_loadBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return LoadBoolean(this_1, parentKey, childKey) endfunction function hashtable_loadInt takes hashtable this_1, integer parentKey, integer childKey returns integer return LoadInteger(this_1, parentKey, childKey) endfunction function hashtable_saveBoolean takes hashtable this_1, integer parentKey, integer childKey, boolean value returns nothing call SaveBoolean(this_1, parentKey, childKey, value) endfunction function hashtable_saveInt takes hashtable this_1, integer parentKey, integer childKey, integer value returns nothing call SaveInteger(this_1, parentKey, childKey, value) endfunction function real_toInt takes real this_1 returns integer return R2I(this_1) endfunction function string_getHash takes string this_1 returns integer return StringHash(this_1) endfunction function error takes string msg returns nothing local integer hash if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else set hash = string_getHash(msg) if hashtable_hasInt(ErrorHandling_HT, -1, hash) then if hashtable_loadInt(ErrorHandling_HT, -1, hash) + 60 < GameTimer_currentTime then call Log_error(msg + "") call hashtable_saveInt(ErrorHandling_HT, -1, hash, real_toInt(GameTimer_currentTime)) call hashtable_saveBoolean(ErrorHandling_HT, -1, hash, false) elseif hashtable_hasBoolean(ErrorHandling_HT, -1, hash) then if not hashtable_loadBoolean(ErrorHandling_HT, -1, hash) then call Log_error("|cffFF3A29Excessive repeating errors are being omitted") call hashtable_saveBoolean(ErrorHandling_HT, -1, hash, true) endif else call Log_error("|cffFF3A29Excessive repeating errors are being omitted") call hashtable_saveBoolean(ErrorHandling_HT, -1, hash, true) endif else call hashtable_saveInt(ErrorHandling_HT, -1, hash, real_toInt(GameTimer_currentTime)) call Log_error("Message: " + msg + "") endif call I2S(1 / 0) endif endfunction function initCompiletimeState_0 takes nothing returns nothing set hashtable_compiletime_171 = InitHashtable() set hashtable_compiletime_170 = InitHashtable() set hashtable_compiletime_169 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_169, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_169, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_169, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_169, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_169, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_169, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_169, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_169, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_169, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_169, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_169, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_169, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_169, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_169, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_169, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_169, 1, 789744696, 15) call SaveStr(hashtable_compiletime_169, 2, 0, "") call SaveStr(hashtable_compiletime_169, 2, 1804483594, "air") call SaveStr(hashtable_compiletime_169, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime_169, 2, -681966791, "ground") call SaveStr(hashtable_compiletime_169, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime_169, 2, 392811314, "item") call SaveStr(hashtable_compiletime_169, 2, 124309475, "structure") call SaveStr(hashtable_compiletime_169, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime_169, 2, -85648186, "ward") call SaveStr(hashtable_compiletime_169, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime_169, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime_169, 2, -263269125, "AM03") call SaveStr(hashtable_compiletime_169, 2, 512215473, "Agho") endfunction function initCompiletimeState takes nothing returns nothing call ExecuteFunc("initCompiletimeState_0") endfunction function dispatch_EventListener_ClosureEvents_EventListener_onEvent takes integer this_1 returns nothing endfunction function handle_getHandleId takes handle this_1 returns integer return GetHandleId(this_1) endfunction function eventid_isKeyboardEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return (eventId >= 261 and eventId <= 268) or eventId == 17 endfunction function eventid_isMouseEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return eventId >= 305 and eventId <= 307 endfunction function eventid_isPlayerunitEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return (eventId >= 18 and eventId <= 51) or (eventId >= 269 and eventId <= 277) or eventId == 315 or eventId == 308 endfunction function int_toString takes integer this_1 returns string return I2S(this_1) endfunction function trigger_addAction takes trigger this_1, code actionFunc returns triggeraction return TriggerAddAction(this_1, actionFunc) endfunction function trigger_addCondition takes trigger this_1, boolexpr condition returns triggercondition return TriggerAddCondition(this_1, condition) endfunction function trigger_registerPlayerUnitEvent takes trigger this_1, player whichPlayer, playerunitevent whichPlayerUnitEvent, boolexpr filter returns event return TriggerRegisterPlayerUnitEvent(this_1, whichPlayer, whichPlayerUnitEvent, filter) endfunction function registerPlayerUnitEvent_482 takes playerunitevent p, code filter, code condition, code action returns nothing local integer hid = handle_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 trigger_registerPlayerUnitEvent(temp, temp_1, p, cond_result) set k = k - 1 endloop endif if condition != null then call trigger_addCondition(RegisterEvents_t[hid], Filter(condition)) endif if action != null then call trigger_addAction(RegisterEvents_t[hid], action) endif endfunction function registerPlayerUnitEvent takes playerunitevent p, code c returns nothing call registerPlayerUnitEvent_482(p, null, c, null) endfunction function trigger_registerPlayerEvent takes trigger this_1, player whichPlayer, playerevent whichPlayerEvent returns event return TriggerRegisterPlayerEvent(this_1, whichPlayer, whichPlayerEvent) endfunction function registerEventId takes eventid evnt returns integer local integer i = handle_getHandleId(evnt) local integer temp local trigger receiver set ClosureEvents_eventTypeCounter = ClosureEvents_eventTypeCounter + 1 set ClosureEvents_eventidToIndex[i] = ClosureEvents_eventTypeCounter if eventid_isPlayerunitEvent(evnt) then call registerPlayerUnitEvent(ConvertPlayerUnitEvent(i), ref_function_EventListener_generalEventCallback) elseif evnt != EVENT_UNIT_DAMAGED and evnt != EVENT_PLAYER_LEAVE and evnt != ClosureEvents_EVENT_PLAYER_CHAT_FILTER and ( not eventid_isKeyboardEvent(evnt)) and ( not eventid_isMouseEvent(evnt)) then call error("registering handleid: " + int_toString(i) + " non-playerunitevent. Except EVENT_UNIT_DAMAGED and EVENT_PLAYER_LEAVE these are not supported right now.") endif if eventid_isMouseEvent(evnt) and ( not EventListener_useMouseEvents) then set EventListener_useMouseEvents = true set i = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen i > temp set receiver = ClosureEvents_keyTrig call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_UP) call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_MOVE) set i = i + 1 endloop endif return ClosureEvents_eventTypeCounter endfunction function eventid_toIntId takes eventid this_1 returns integer local integer id_1 = ClosureEvents_eventidToIndex[handle_getHandleId(this_1)] if id_1 == 0 then set id_1 = registerEventId(this_1) endif return id_1 endfunction function fireEvents takes unit w_u returns boolean return true endfunction function unit_getUserData takes unit this_1 returns integer return GetUnitUserData(this_1) endfunction function unit_getIndex takes unit this_1 returns integer return unit_getUserData(this_1) endfunction function EventListener_generalEventCallback takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer id_1 = eventid_toIntId(GetTriggerEventId()) local integer listener local integer nextListener if trigUnit != null and fireEvents(trigUnit) and unit_getIndex(trigUnit) > 0 then if EventListener_unitListenersFirsts[unit_getIndex(trigUnit)] != 0 then set listener = EventListener_unitListenersFirsts[unit_getIndex(trigUnit)] loop exitwhen listener == 0 set nextListener = EventListener_next[listener] if EventListener_eventId[listener] == id_1 then call dispatch_EventListener_ClosureEvents_EventListener_onEvent(listener) endif set listener = nextListener endloop endif endif if EventListener_generalListenersFirsts[id_1] != 0 then set nextListener = EventListener_generalListenersFirsts[id_1] loop exitwhen nextListener == 0 set id_1 = EventListener_next[nextListener] call dispatch_EventListener_ClosureEvents_EventListener_onEvent(nextListener) set nextListener = id_1 endloop endif endfunction function currentCallback takes nothing returns integer return ClosureForGroups_tempCallbacks[-1] endfunction function alloc_LLEntry takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function LLEntry_init takes integer this_1 returns nothing endfunction function construct_LLEntry takes integer this_1, integer elem, integer prev, integer next returns nothing call LLEntry_init(this_1) set LLEntry_elem[this_1] = elem set LLEntry_prev[this_1] = prev set LLEntry_next[this_1] = next endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this_1 = alloc_LLEntry() call construct_LLEntry(this_1, elem, prev, next) return this_1 endfunction function LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing local integer entry = new_LLEntry(elems_0, LLEntry_prev[LinkedList_dummy[this_1]], LinkedList_dummy[this_1]) 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 endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.add") else call error("Called LinkedList.add on invalid object.") endif endif call LinkedList_add_1(this_1, elems_0) endfunction function unitToIndex takes unit object returns integer return handle_getHandleId(object) endfunction function callback_forEachFrom_LinkedList takes integer this_1, unit u_1 returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(result[this_1], unitToIndex(u_1)) endfunction function unit_remove takes unit this_1 returns nothing call RemoveUnit(this_1) endfunction function callback_forEachFrom_Preloader takes integer this_1, unit u_1 returns nothing call unit_remove(u_1) endfunction function dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback takes integer this_1, unit u_1 returns nothing if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.callback") else call error("Called ForGroupCallback.callback on invalid object.") endif endif if ForGroupCallback_typeId[this_1] <= 667 then call callback_forEachFrom_LinkedList(this_1, u_1) else call callback_forEachFrom_Preloader(this_1, u_1) endif endfunction function filterCallback takes unit filter returns nothing if ClosureForGroups_iterCount < 2147483647 then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(currentCallback(), filter) endif set ClosureForGroups_iterCount = ClosureForGroups_iterCount + 1 endfunction function code__Filter_ClosureForGroups takes nothing returns nothing call filterCallback(GetFilterUnit()) endfunction function popUnit takes nothing returns nothing set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount - 1 endfunction function pushUnit takes unit u_1 returns nothing set OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount] = u_1 set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount + 1 endfunction function trigger_evaluate takes trigger this_1 returns boolean return TriggerEvaluate(this_1) endfunction function unit_addAbility takes unit this_1, integer abil returns boolean return UnitAddAbility(this_1, abil) endfunction function unit_makeAbilityPermanent takes unit this_1, integer abil, boolean flag returns boolean return UnitMakeAbilityPermanent(this_1, flag, abil) endfunction function prepareUnit takes unit u_1 returns nothing call unit_addAbility(u_1, 1095577649) call unit_makeAbilityPermanent(u_1, 1095577649, true) call pushUnit(u_1) call trigger_evaluate(OnUnitEnterLeave_eventTrigger) call popUnit() 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__addAction_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_226 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_227 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function alloc_LLItrClosure_forEach_registerCommandAll_nullclosurebug takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function string_charAt takes string this_1, integer index returns string return SubString(this_1, index, index + 1) endfunction function toRawCode takes integer value returns string local string result_1 = "" local integer byteno = 0 local integer charValue loop exitwhen byteno > 3 set charValue = ModuloInteger(value, 256) set value = value / 256 set result_1 = string_charAt(".................................!.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~.................................................................................................................................", charValue) + result_1 set byteno = byteno + 1 endloop return result_1 endfunction function int_toRawCode takes integer this_1 returns string return toRawCode(this_1) endfunction function run_map_ObjectIds takes integer this_1, integer t returns string return int_toRawCode(t) endfunction function hashtable_hasString takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedString(this_1, parentKey, childKey) endfunction function Table_hasString takes integer this_1, integer parentKey returns boolean return hashtable_hasString(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_hasString takes integer this_1, integer parentKey returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.hasString") else call error("Called Table.hasString on invalid object.") endif endif return Table_hasString(this_1, parentKey) endfunction function hashtable_loadString takes hashtable this_1, integer parentKey, integer childKey returns string return LoadStr(this_1, parentKey, childKey) endfunction function Table_loadString takes integer this_1, integer parentKey returns string return hashtable_loadString(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadString takes integer this_1, integer parentKey returns string if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadString") else call error("Called Table.loadString on invalid object.") endif endif return Table_loadString(this_1, parentKey) endfunction function hashtable_saveString takes hashtable this_1, integer parentKey, integer childKey, string value returns nothing call SaveStr(this_1, parentKey, childKey, value) endfunction function Table_saveString takes integer this_1, integer parentKey, string value returns nothing call hashtable_saveString(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveString takes integer this_1, integer parentKey, string value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveString") else call error("Called Table.saveString on invalid object.") endif endif call Table_saveString(this_1, parentKey, value) endfunction function stringToIndex takes string s returns integer local integer hash = string_getHash(s) loop if dispatch_Table_Table_Table_hasString(TypeCasting_typecastdata, hash) then exitwhen dispatch_Table_Table_Table_loadString(TypeCasting_typecastdata, hash) == s else call dispatch_Table_Table_Table_saveString(TypeCasting_typecastdata, hash, s) exitwhen true endif set hash = hash + 1 endloop return hash endfunction function run_wrapper takes integer this_1, integer t returns integer return stringToIndex(run_map_ObjectIds(this_1, t)) endfunction function dispatch_MapClosure_LinkedList_MapClosure_run takes integer this_1, integer t returns integer if MapClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling MapClosure.run") else call error("Called MapClosure.run on invalid object.") endif endif return run_wrapper(this_1, t) endfunction function run_forEach_LinkedList_LinkedList takes integer this_1, integer t returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(output[this_1], dispatch_MapClosure_LinkedList_MapClosure_run(itr[this_1], t)) endfunction function print takes string msg returns nothing call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., 45., msg) endfunction function run_forEach_registerCommandAll_nullclosurebug takes integer this_1, string i returns nothing call print(i) endfunction function stringFromIndex takes integer index returns string return dispatch_Table_Table_Table_loadString(TypeCasting_typecastdata, index) endfunction function run_wrapper_490 takes integer this_1, integer t returns nothing call run_forEach_registerCommandAll_nullclosurebug(this_1, stringFromIndex(t)) endfunction function dispatch_LLItrClosure_LinkedList_LLItrClosure_run takes integer this_1, integer t returns nothing if LLItrClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLItrClosure.run") else call error("Called LLItrClosure.run on invalid object.") endif endif if LLItrClosure_typeId[this_1] <= 724 then call run_forEach_LinkedList_LinkedList(this_1, t) else call run_wrapper_490(this_1, t) endif endfunction function dealloc_LLItrClosure takes integer obj returns nothing if LLItrClosure_typeId[obj] == 0 then call error("Double free: object of type LLItrClosure") else set LLItrClosure_nextFree[LLItrClosure_firstFree] = obj set LLItrClosure_firstFree = LLItrClosure_firstFree + 1 set LLItrClosure_typeId[obj] = 0 endif endfunction function destroyLLItrClosure takes integer this_1 returns nothing call dealloc_LLItrClosure(this_1) endfunction function dispatch_LLItrClosure_destroyLLItrClosure takes integer this_1 returns nothing if LLItrClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLItrClosure.LLItrClosure") else call error("Called LLItrClosure.LLItrClosure on invalid object.") endif endif call destroyLLItrClosure(this_1) endfunction function LinkedList_forEach takes integer this_1, integer itr_1 returns integer local integer r = LLEntry_next[LinkedList_dummy[this_1]] loop exitwhen r == LinkedList_dummy[this_1] call dispatch_LLItrClosure_LinkedList_LLItrClosure_run(itr_1, LLEntry_elem[r]) set r = LLEntry_next[r] endloop call dispatch_LLItrClosure_destroyLLItrClosure(itr_1) return this_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_forEach takes integer this_1, integer itr_1 returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.forEach") else call error("Called LinkedList.forEach on invalid object.") endif endif return LinkedList_forEach(this_1, itr_1) endfunction function player_getId takes player this_1 returns integer return GetPlayerId(this_1) endfunction function run_registerCommandAll_nullclosurebug takes integer this_1, player triggerPlayer, integer args returns nothing call print("player " + int_toString(player_getId(triggerPlayer))) call dispatch_LinkedList_LinkedList_LinkedList_forEach(args, alloc_LLItrClosure_forEach_registerCommandAll_nullclosurebug()) endfunction function unit_removeAbility takes unit this_1, integer abil returns boolean return UnitRemoveAbility(this_1, abil) endfunction function unit_setOwner takes unit this_1, player p, boolean changeColor returns nothing call SetUnitOwner(this_1, p, changeColor) endfunction function unit_setPos takes unit this_1, real pos_x, real pos_y returns nothing call SetUnitPosition(this_1, pos_x, pos_y) endfunction function InstantDummyCaster_finish takes integer id_1 returns nothing call unit_setOwner(InstantDummyCaster_caster, Basics_DUMMY_PLAYER, false) call unit_removeAbility(InstantDummyCaster_caster, id_1) call unit_setPos(InstantDummyCaster_caster, MapBounds_boundMax_x, MapBounds_boundMax_y) endfunction function unit_setAbilityLevel takes unit this_1, integer abilId, integer lvl returns nothing call SetUnitAbilityLevel(this_1, abilId, lvl) endfunction function unit_setState takes unit this_1, unitstate state, real value returns nothing call SetUnitState(this_1, state, value) endfunction function unit_setMana takes unit this_1, real wval returns nothing call unit_setState(this_1, UNIT_STATE_MANA, wval) endfunction function unit_setFlyHeight takes unit this_1, real height, real rate returns nothing call SetUnitFlyHeight(this_1, height, rate) endfunction function unit_setX takes unit this_1, real x returns nothing call SetUnitX(this_1, x) endfunction function unit_setY takes unit this_1, real y returns nothing call SetUnitY(this_1, y) endfunction function unit_setXYZ takes unit this_1, real pos_x, real pos_y, real pos_z returns nothing call unit_setX(this_1, pos_x) call unit_setY(this_1, pos_y) call unit_setFlyHeight(this_1, pos_z, 0.) endfunction function inBoundsXY takes real x, real y returns boolean return x > MapBounds_boundMin_x and x < MapBounds_boundMax_x and y > MapBounds_boundMin_y and y < MapBounds_boundMax_y endfunction function vec3_inBounds takes real this_x, real this_y, real this_z returns boolean return inBoundsXY(this_x, this_y) 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 unit_addAbility(receiver, id_1) call unit_setMana(receiver, 1000000.) if vec3_inBounds(pos_x, pos_y, pos_z) then call unit_setXYZ(InstantDummyCaster_caster, pos_x, pos_y, pos_z) endif if lvl > 1 then call unit_setAbilityLevel(InstantDummyCaster_caster, id_1, lvl) endif if owner != null then call unit_setOwner(InstantDummyCaster_caster, owner, false) endif endfunction function unit_issueImmediateOrderById takes unit this_1, integer id_1 returns boolean return IssueImmediateOrderById(this_1, id_1) 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 = unit_issueImmediateOrderById(InstantDummyCaster_caster, orderId) call InstantDummyCaster_finish(abilityId) return success endfunction function vec2_toVec3 takes real this_x, real this_y returns real set vec2_toVec3_return_x = this_x set vec2_toVec3_return_y = this_y set vec2_toVec3_return_z = 0. return vec2_toVec3_return_x endfunction function InstantDummyCaster_castImmediate_95 takes player owner, integer abilityId, integer lvl, string order, real pos_x, real pos_y returns boolean return InstantDummyCaster_castImmediate(owner, abilityId, lvl, OrderId(order), vec2_toVec3(pos_x, pos_y), vec2_toVec3_return_y, vec2_toVec3_return_z) endfunction function unit_getOwner takes unit this_1 returns player return GetOwningPlayer(this_1) endfunction function unit_getX takes unit this_1 returns real return GetUnitX(this_1) endfunction function unit_getY takes unit this_1 returns real return GetUnitY(this_1) endfunction function unit_getPos takes unit this_1 returns real set unit_getPos_return_x = unit_getX(this_1) set unit_getPos_return_y = unit_getY(this_1) return unit_getPos_return_x endfunction function run_registerCommandAll_nullclosurebug_487 takes integer this_1, player triggerPlayer, integer arguments returns nothing call InstantDummyCaster_castImmediate_95(unit_getOwner(a[this_1]), 1095267427, 1, "thunderclap", unit_getPos(a[this_1]), unit_getPos_return_y) endfunction function group_enumUnitsSelected takes group this_1, player p, boolexpr filter returns nothing call GroupEnumUnitsSelected(this_1, p, filter) endfunction function group_hasNext takes group this_1 returns boolean return FirstOfGroup(this_1) != null endfunction function group_next takes group this_1 returns unit local unit iterUnit = FirstOfGroup(this_1) call GroupRemoveUnit(this_1, iterUnit) return iterUnit endfunction function unit_getName takes unit this_1 returns string return GetUnitName(this_1) endfunction function run_registerCommandAll_nullclosurebug_488 takes integer this_1, player triggerPlayer, integer arguments returns nothing local group receiver call print(unit_getName(a_161[this_1])) set receiver = CreateGroup() call group_enumUnitsSelected(receiver, triggerPlayer, null) loop exitwhen not group_hasNext(receiver) call unit_setOwner(group_next(receiver), Player_players[1], true) endloop endfunction function dispatch_CommandHandler_nullclosurebug_CommandHandler_run takes integer this_1, player triggerPlayer, integer arguments returns nothing if CommandHandler_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CommandHandler.run") else call error("Called CommandHandler.run on invalid object.") endif endif if CommandHandler_typeId[this_1] <= 654 then if CommandHandler_typeId[this_1] <= 653 then call run_registerCommandAll_nullclosurebug(this_1, triggerPlayer, arguments) else call run_registerCommandAll_nullclosurebug_487(this_1, triggerPlayer, arguments) endif else call run_registerCommandAll_nullclosurebug_488(this_1, triggerPlayer, arguments) endif endfunction function Table_loadInt takes integer this_1, integer parentKey returns integer return hashtable_loadInt(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadInt takes integer this_1, integer parentKey returns integer if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadInt") else call error("Called Table.loadInt on invalid object.") endif endif return Table_loadInt(this_1, parentKey) endfunction function HashMap_get takes integer this_1, integer key returns integer return dispatch_Table_Table_Table_loadInt(this_1, key) endfunction function dispatch_HashMap_HashMap_HashMap_get takes integer this_1, integer key returns integer if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.get") else call error("Called HashMap.get on invalid object.") endif endif return HashMap_get(this_1, key) endfunction function Table_hasInt takes integer this_1, integer parentKey returns boolean return hashtable_hasInt(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_hasInt takes integer this_1, integer parentKey returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.hasInt") else call error("Called Table.hasInt on invalid object.") endif endif return Table_hasInt(this_1, parentKey) endfunction function HashMap_has takes integer this_1, integer key returns boolean return dispatch_Table_Table_Table_hasInt(this_1, key) endfunction function dispatch_HashMap_HashMap_HashMap_has takes integer this_1, integer key returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.has") else call error("Called HashMap.has on invalid object.") endif endif return HashMap_has(this_1, key) endfunction function LinkedList_getEntry takes integer this_1, integer index returns integer local integer i set this_1 = LinkedList_dummy[this_1] set i = 0 loop exitwhen i > index set this_1 = LLEntry_next[this_1] set i = i + 1 endloop return this_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_getEntry takes integer this_1, integer index returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.getEntry") else call error("Called LinkedList.getEntry on invalid object.") endif endif return LinkedList_getEntry(this_1, index) endfunction function LinkedList_get takes integer this_1, integer index returns integer return LLEntry_elem[dispatch_LinkedList_LinkedList_LinkedList_getEntry(this_1, index)] endfunction function dispatch_LinkedList_LinkedList_LinkedList_get takes integer this_1, integer index returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.get") else call error("Called LinkedList.get on invalid object.") endif endif return LinkedList_get(this_1, index) endfunction function playerToIndex takes player object returns integer return player_getId(object) endfunction function alloc_LinkedList takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function LinkedList_init takes integer this_1 returns nothing set LinkedList_dummy[this_1] = new_LLEntry(0, 0, 0) set LinkedList_size[this_1] = 0 endfunction function construct_LinkedList2 takes integer this_1 returns nothing call LinkedList_init(this_1) set LLEntry_next[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] set LLEntry_prev[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] endfunction function new_LinkedList takes nothing returns integer local integer this_1 = alloc_LinkedList() call construct_LinkedList2(this_1) return this_1 endfunction function string_length takes string this_1 returns integer return StringLength(this_1) endfunction function string_substring takes string this_1, integer start, integer stop returns string return SubString(this_1, start, stop) endfunction function string_indexOf takes string this_1, string s returns integer local integer i = 0 local integer temp = string_length(this_1) - string_length(s) loop exitwhen i > temp if string_substring(this_1, i, i + string_length(s)) == s then return i endif set i = i + 1 endloop return -1 endfunction function string_split takes string this_1, string splitBy returns integer local integer list = new_LinkedList() local integer offset = string_length(splitBy) local string second = this_1 local integer splitIndex loop set splitIndex = string_indexOf(second, splitBy) if splitIndex == -1 then call dispatch_LinkedList_LinkedList_LinkedList_add_1(list, stringToIndex(second)) exitwhen true endif set this_1 = string_substring(second, 0, splitIndex) set second = string_substring(second, splitIndex + offset, string_length(second)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(list, stringToIndex(this_1)) endloop return list endfunction function string_substring_501 takes string this_1, integer start returns string return SubString(this_1, start, string_length(this_1)) endfunction function code__addAction_nullclosurebug takes nothing returns nothing local player triggerPlayer = GetTriggerPlayer() local integer playerCommands = dispatch_HashMap_HashMap_HashMap_get(nullclosurebug_commands, playerToIndex(triggerPlayer)) local integer tokens = string_split(string_substring_501(GetEventPlayerChatString(), 1), " ") local string command = stringFromIndex(dispatch_LinkedList_LinkedList_LinkedList_get(tokens, 0)) if dispatch_HashMap_HashMap_HashMap_has(playerCommands, stringToIndex(command)) then call dispatch_CommandHandler_nullclosurebug_CommandHandler_run(dispatch_HashMap_HashMap_HashMap_get(playerCommands, stringToIndex(command)), triggerPlayer, tokens) endif endfunction function getEnterLeaveUnit takes nothing returns unit return OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1] endfunction function shouldIndex takes unit w_u returns boolean return true endfunction function alloc_UnitIndex takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function UnitIndex_init takes integer this_1 returns nothing endfunction function popUnit_461 takes nothing returns nothing set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 endfunction function pushUnit_466 takes unit u_1 returns nothing set UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount] = u_1 set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount + 1 endfunction function unit_setUserData takes unit this_1, integer data returns nothing call SetUnitUserData(this_1, data) endfunction function construct_UnitIndex takes integer this_1, unit whichUnit returns nothing call UnitIndex_init(this_1) set UnitIndex__unit[this_1] = whichUnit call unit_setUserData(UnitIndex__unit[this_1], this_1) call pushUnit_466(whichUnit) call trigger_evaluate(UnitIndexer_onIndexTrigger) call popUnit_461() endfunction function new_UnitIndex takes unit whichUnit returns integer local integer this_1 = alloc_UnitIndex() call construct_UnitIndex(this_1, whichUnit) return this_1 endfunction function unit_toUnitIndex takes unit this_1 returns integer local integer instance = unit_getUserData(this_1) if instance == 0 then set instance = new_UnitIndex(this_1) endif return instance endfunction function code__onEnter_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_toUnitIndex(getEnterLeaveUnit()) endif endfunction function UnitIndex_onDestroy takes integer this_1 returns nothing call pushUnit_466(UnitIndex__unit[this_1]) call trigger_evaluate(UnitIndexer_onDeindexTrigger) call popUnit_461() call unit_setUserData(UnitIndex__unit[this_1], 0) endfunction function dealloc_UnitIndex takes integer obj returns nothing if UnitIndex_typeId[obj] == 0 then call error("Double free: object of type UnitIndex") else set UnitIndex_nextFree[UnitIndex_firstFree] = obj set UnitIndex_firstFree = UnitIndex_firstFree + 1 set UnitIndex_typeId[obj] = 0 endif endfunction function destroyUnitIndex takes integer this_1 returns nothing call UnitIndex_onDestroy(this_1) call dealloc_UnitIndex(this_1) endfunction function dispatch_UnitIndex_destroyUnitIndex takes integer this_1 returns nothing if UnitIndex_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitIndex.UnitIndex") else call error("Called UnitIndex.UnitIndex on invalid object.") endif endif call destroyUnitIndex(this_1) endfunction function unit_deindex takes unit this_1 returns boolean if unit_getUserData(this_1) == 0 then return false else call dispatch_UnitIndex_destroyUnitIndex(unit_toUnitIndex(this_1)) return true endif endfunction function code__onLeave_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_deindex(getEnterLeaveUnit()) endif endfunction function getIndexingUnit takes nothing returns unit return UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1] endfunction function Table_saveInt takes integer this_1, integer parentKey, integer value returns nothing call hashtable_saveInt(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveInt takes integer this_1, integer parentKey, integer value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveInt") else call error("Called Table.saveInt on invalid object.") endif endif call Table_saveInt(this_1, parentKey, value) endfunction function HashMap_put takes integer this_1, integer key, integer value returns nothing if not dispatch_HashMap_HashMap_HashMap_has(this_1, key) then set HashMap_size[this_1] = HashMap_size[this_1] + 1 endif call dispatch_Table_Table_Table_saveInt(this_1, key, value) endfunction function HashList_count takes integer this_1, integer elem returns integer return hashtable_loadInt(HashList_occurences, this_1, elem) endfunction function dispatch_HashList_HashList_HashList_count takes integer this_1, integer elem returns integer if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.count") else call error("Called HashList.count on invalid object.") endif endif return HashList_count(this_1, elem) endfunction function HashList_incrOccurences takes integer this_1, integer elem returns nothing call hashtable_saveInt(HashList_occurences, this_1, elem, dispatch_HashList_HashList_HashList_count(this_1, elem) + 1) endfunction function dispatch_HashList_HashList_HashList_incrOccurences takes integer this_1, integer elem returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.incrOccurences") else call error("Called HashList.incrOccurences on invalid object.") endif endif call HashList_incrOccurences(this_1, elem) endfunction function HashList_add_1 takes integer this_1, integer elems_0 returns nothing call hashtable_saveInt(HashList_ht, this_1, HashList_size[this_1], elems_0) call dispatch_HashList_HashList_HashList_incrOccurences(this_1, elems_0) set HashList_size[this_1] = HashList_size[this_1] + 1 endfunction function dispatch_HashList_HashList_HashList_add_1 takes integer this_1, integer elems_0 returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.add") else call error("Called HashList.add on invalid object.") endif endif call HashList_add_1(this_1, elems_0) endfunction function HashList_has takes integer this_1, integer elem returns boolean return dispatch_HashList_HashList_HashList_count(this_1, elem) > 0 endfunction function dispatch_HashList_HashList_HashList_has takes integer this_1, integer elem returns boolean if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.has") else call error("Called HashList.has on invalid object.") endif endif return HashList_has(this_1, elem) endfunction function IterableMap_hasKey takes integer this_1, integer key returns boolean return dispatch_HashList_HashList_HashList_has(IterableMap_keys[this_1], key) endfunction function dispatch_IterableMap_HashMap_IterableMap_hasKey takes integer this_1, integer key returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IterableMap.hasKey") else call error("Called IterableMap.hasKey on invalid object.") endif endif return IterableMap_hasKey(this_1, key) endfunction function IterableMap_put takes integer this_1, integer key, integer value returns nothing call HashMap_put(this_1, key, value) if not dispatch_IterableMap_HashMap_IterableMap_hasKey(this_1, key) then call dispatch_HashList_HashList_HashList_add_1(IterableMap_keys[this_1], key) endif endfunction function dispatch_HashMap_HashMap_HashMap_put takes integer this_1, integer key, integer value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.put") else call error("Called HashMap.put on invalid object.") endif endif if Table_typeId[this_1] <= 765 then call HashMap_put(this_1, key, value) else call IterableMap_put(this_1, key, value) endif endfunction function Table_removeInt takes integer this_1, integer parentKey returns nothing call RemoveSavedInteger(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_removeInt takes integer this_1, integer parentKey returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.removeInt") else call error("Called Table.removeInt on invalid object.") endif endif call Table_removeInt(this_1, parentKey) endfunction function HashMap_remove takes integer this_1, integer key returns nothing if dispatch_HashMap_HashMap_HashMap_has(this_1, key) then set HashMap_size[this_1] = HashMap_size[this_1] - 1 endif call dispatch_Table_Table_Table_removeInt(this_1, key) endfunction function HashList_decrOccurences takes integer this_1, integer elem returns nothing call hashtable_saveInt(HashList_occurences, this_1, elem, dispatch_HashList_HashList_HashList_count(this_1, elem) - 1) endfunction function dispatch_HashList_HashList_HashList_decrOccurences takes integer this_1, integer elem returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.decrOccurences") else call error("Called HashList.decrOccurences on invalid object.") endif endif call HashList_decrOccurences(this_1, elem) endfunction function HashList_removeAt takes integer this_1, integer index returns integer local integer tmp local integer temp call dispatch_HashList_HashList_HashList_decrOccurences(this_1, hashtable_loadInt(HashList_ht, this_1, index)) set tmp = hashtable_loadInt(HashList_ht, this_1, index) set temp = HashList_size[this_1] loop exitwhen index > temp call hashtable_saveInt(HashList_ht, this_1, index, hashtable_loadInt(HashList_ht, this_1, index + 1)) set index = index + 1 endloop set HashList_size[this_1] = HashList_size[this_1] - 1 return tmp endfunction function dispatch_HashList_HashList_HashList_removeAt takes integer this_1, integer index returns integer if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.removeAt") else call error("Called HashList.removeAt on invalid object.") endif endif return HashList_removeAt(this_1, index) endfunction function HashList_remove takes integer this_1, integer t returns boolean local boolean result_1 = false local integer i = 0 local integer temp = HashList_size[this_1] - 1 loop exitwhen i > temp if t == hashtable_loadInt(HashList_ht, this_1, i) then set result_1 = true call dispatch_HashList_HashList_HashList_removeAt(this_1, i) exitwhen true endif set i = i + 1 endloop return result_1 endfunction function dispatch_HashList_HashList_HashList_remove takes integer this_1, integer t returns boolean if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.remove") else call error("Called HashList.remove on invalid object.") endif endif return HashList_remove(this_1, t) endfunction function IterableMap_remove takes integer this_1, integer key returns nothing call HashMap_remove(this_1, key) if dispatch_IterableMap_HashMap_IterableMap_hasKey(this_1, key) then call dispatch_HashList_HashList_HashList_remove(IterableMap_keys[this_1], key) endif endfunction function dispatch_HashMap_HashMap_HashMap_remove takes integer this_1, integer key returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.remove") else call error("Called HashMap.remove on invalid object.") endif endif if Table_typeId[this_1] <= 765 then call HashMap_remove(this_1, key) else call IterableMap_remove(this_1, key) endif endfunction function OnCastListener_onDestroy takes integer this_1 returns nothing local integer index if OnCastListener_eventUnit[this_1] != null then set index = unit_getIndex(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]) == 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]) else call dispatch_HashMap_HashMap_HashMap_remove(EventListener_castMap, OnCastListener_abilId[this_1]) 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 endfunction function dealloc_OnCastListener takes integer obj returns nothing if OnCastListener_typeId[obj] == 0 then call error("Double free: object of type OnCastListener") else set OnCastListener_nextFree[OnCastListener_firstFree] = obj set OnCastListener_firstFree = OnCastListener_firstFree + 1 set OnCastListener_typeId[obj] = 0 endif endfunction function destroyOnCastListener takes integer this_1 returns nothing call OnCastListener_onDestroy(this_1) call dealloc_OnCastListener(this_1) endfunction function dispatch_OnCastListener_destroyOnCastListener takes integer this_1 returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.OnCastListener") else call error("Called OnCastListener.OnCastListener on invalid object.") endif endif call destroyOnCastListener(this_1) endfunction function Log_trace takes string msg returns nothing call printLog(Player_localPlayer, 0, msg) endfunction function EventListener_onDestroy takes integer this_1 returns nothing 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 endfunction function dealloc_EventListener takes integer obj returns nothing if EventListener_typeId[obj] == 0 then call error("Double free: object of type EventListener") else set EventListener_firstFree = EventListener_firstFree + 1 set EventListener_typeId[obj] = 0 endif endfunction function destroyEventListener takes integer this_1 returns nothing call EventListener_onDestroy(this_1) call dealloc_EventListener(this_1) endfunction function dispatch_EventListener_destroyEventListener takes integer this_1 returns nothing if EventListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EventListener.EventListener") else call error("Called EventListener.EventListener on invalid object.") endif endif call destroyEventListener(this_1) endfunction function unregisterEvents takes integer id_1 returns nothing local integer listener if id_1 > 0 then if EventListener_unitListenersFirsts[id_1] != 0 then call Log_trace("unregister unit has listeners. startid: " + int_toString(id_1)) 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] call dispatch_EventListener_destroyEventListener(id_1) endloop endif endif endfunction function unregisterEventsForUnit takes unit u_1 returns nothing local integer index local integer listener if fireEvents(u_1) then set index = unit_getIndex(u_1) call unregisterEvents(index) 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) endloop endif endif endfunction function code__onUnitDeindex_ClosureEvents takes nothing returns nothing call unregisterEventsForUnit(getIndexingUnit()) endfunction function trigger_registerUnitEvent takes trigger this_1, unit whichUnit, unitevent whichEvent returns event return TriggerRegisterUnitEvent(this_1, whichUnit, whichEvent) endfunction function registerEventsForUnit takes unit u_1 returns nothing if fireEvents(u_1) then call trigger_registerUnitEvent(ClosureEvents_unitTrig, u_1, EVENT_UNIT_DAMAGED) endif endfunction function code__onUnitIndex_ClosureEvents takes nothing returns nothing call registerEventsForUnit(getIndexingUnit()) endfunction function hashtable_loadTriggerHandle takes hashtable this_1, integer parentKey, integer childKey returns trigger return LoadTriggerHandle(this_1, parentKey, childKey) endfunction function Table_loadTrigger takes integer this_1, integer parentKey returns trigger return hashtable_loadTriggerHandle(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadTrigger takes integer this_1, integer parentKey returns trigger if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadTrigger") else call error("Called Table.loadTrigger on invalid object.") endif endif return Table_loadTrigger(this_1, parentKey) endfunction function hashtable_saveFogStateHandle takes hashtable this_1, integer parentKey, integer childKey, fogstate value returns nothing call SaveFogStateHandle(this_1, parentKey, childKey, value) endfunction function Table_saveFogState takes integer this_1, integer parentKey, fogstate value returns nothing call hashtable_saveFogStateHandle(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveFogState takes integer this_1, integer parentKey, fogstate value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveFogState") else call error("Called Table.saveFogState on invalid object.") endif endif call Table_saveFogState(this_1, parentKey, value) endfunction function triggerFromIndex takes integer index returns trigger call dispatch_Table_Table_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_Table_Table_loadTrigger(TypeCasting_typecastdata, 0) endfunction function code__registerPlayerUnitEvent_RegisterEvents takes nothing returns boolean return trigger_evaluate(triggerFromIndex(dispatch_HashMap_HashMap_HashMap_get(RegisterEvents_onCastMap, GetSpellAbilityId()))) endfunction function dispatch_OnCast_ClosureEvents_OnCast_fireEx takes integer this_1, integer id_1 returns nothing endfunction function OnCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnCast_ClosureEvents_OnCast_fireEx(this_1, GetSpellAbilityId()) endfunction function EventData_getAbilityTargetPos takes nothing returns real set EventData_getAbilityTargetPos_return_x = GetSpellTargetX() set EventData_getAbilityTargetPos_return_y = GetSpellTargetY() return EventData_getAbilityTargetPos_return_x endfunction function EventData_getSpellTargetPos takes nothing returns real set EventData_getSpellTargetPos_return_x = EventData_getAbilityTargetPos() set EventData_getSpellTargetPos_return_y = EventData_getAbilityTargetPos_return_y return EventData_getSpellTargetPos_return_x endfunction function alloc_CallbackSingle_doAfter_DummyCaster_DummyCaster takes nothing returns integer local integer this_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] = 647 else call error("Out of memory: Could not create CallbackSingle_doAfter_DummyCaster_DummyCaster.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 647 endif return this_1 endfunction function CallbackSingle_init takes integer this_1 returns nothing endfunction function construct_CallbackSingle takes integer this_1 returns nothing call CallbackSingle_init(this_1) endfunction function timer_getHandleId takes timer this_1 returns integer return GetHandleId(this_1) endfunction function timer_setData takes timer this_1, integer data returns nothing call dispatch_Table_Table_Table_saveInt(TimerUtils_timerData, timer_getHandleId(this_1), data) endfunction function getTimer takes nothing returns timer local timer receiver if TimerUtils_freeTimersCount > 0 then set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount - 1 call timer_setData(TimerUtils_freeTimers[TimerUtils_freeTimersCount], 0) return TimerUtils_freeTimers[TimerUtils_freeTimersCount] else set receiver = CreateTimer() call timer_setData(receiver, 0) return receiver endif endfunction function timer_start takes timer this_1, real time, code timerCallBack returns nothing call TimerStart(this_1, time, false, timerCallBack) endfunction function CallbackSingle_start takes integer this_1, timer whichTimer, real time returns nothing call timer_setData(whichTimer, this_1) call timer_start(whichTimer, time, ref_function_code__start_CallbackSingle_ClosureTimers) set CallbackSingle_t[this_1] = whichTimer endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start takes integer this_1, timer whichTimer, real time returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.start") else call error("Called CallbackSingle.start on invalid object.") endif endif call CallbackSingle_start(this_1, whichTimer, time) endfunction function timer_doAfter takes timer this_1, real timeToWait, integer cb_1 returns integer call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_1, this_1, timeToWait) return cb_1 endfunction function doAfter takes real timeToWait, integer cb_1 returns integer return timer_doAfter(getTimer(), timeToWait, cb_1) endfunction function DummyCaster_finish takes integer this_1, unit dummy_1, integer id_1 returns nothing local integer clVar local real temp set DummyCaster_castCount[this_1] = DummyCaster_castCount[this_1] + 1 set temp = DummyCaster_delay[this_1] set clVar = alloc_CallbackSingle_doAfter_DummyCaster_DummyCaster() call construct_CallbackSingle(clVar) set this[clVar] = this_1 set dummy[clVar] = dummy_1 set id[clVar] = id_1 call doAfter(temp, clVar) endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_finish takes integer this_1, unit dummy_1, integer id_1 returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.finish") else call error("Called DummyCaster.finish on invalid object.") endif endif call DummyCaster_finish(this_1, dummy_1, id_1) endfunction function angle_degrees takes real this_radians returns real return this_radians * 57.295779513 endfunction function createUnit takes player p, integer unitId, real pos_x, real pos_y, real facing_radians returns unit return CreateUnit(p, unitId, pos_x, pos_y, angle_degrees(facing_radians)) endfunction function unit_setFacing takes unit this_1, real a_radians returns nothing call SetUnitFacing(this_1, angle_degrees(a_radians)) endfunction function unit_setXY takes unit this_1, real pos_x, real pos_y returns nothing call unit_setX(this_1, pos_x) call unit_setY(this_1, pos_y) 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) call unit_addAbility(u_1, 1097691750) call unit_removeAbility(u_1, 1097691750) call unit_addAbility(u_1, 1095577650) call unit_removeAbility(u_1, 1095577650) call unit_setXY(u_1, pos_x, pos_y) call unit_setFacing(u_1, facing_radians) return u_1 endfunction function LLEntry_onDestroy takes integer this_1 returns nothing endfunction function dealloc_LLEntry takes integer obj returns nothing if LLEntry_typeId[obj] == 0 then call error("Double free: object of type LLEntry") else set LLEntry_nextFree[LLEntry_firstFree] = obj set LLEntry_firstFree = LLEntry_firstFree + 1 set LLEntry_typeId[obj] = 0 endif endfunction function destroyLLEntry takes integer this_1 returns nothing call LLEntry_onDestroy(this_1) call dealloc_LLEntry(this_1) endfunction function dispatch_LLEntry_destroyLLEntry takes integer this_1 returns nothing if LLEntry_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLEntry.LLEntry") else call error("Called LLEntry.LLEntry on invalid object.") endif endif call destroyLLEntry(this_1) endfunction function LinkedList_removeEntry takes integer this_1, integer entry returns nothing set LLEntry_next[LLEntry_prev[entry]] = LLEntry_next[entry] set LLEntry_prev[LLEntry_next[entry]] = LLEntry_prev[entry] call dispatch_LLEntry_destroyLLEntry(entry) set LinkedList_size[this_1] = LinkedList_size[this_1] - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_removeEntry takes integer this_1, integer entry returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.removeEntry") else call error("Called LinkedList.removeEntry on invalid object.") endif endif call LinkedList_removeEntry(this_1, entry) endfunction function LinkedList_dequeue takes integer this_1 returns integer local integer top = LLEntry_next[LinkedList_dummy[this_1]] local integer 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) endif return result_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_dequeue takes integer this_1 returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.dequeue") else call error("Called LinkedList.dequeue on invalid object.") endif endif return LinkedList_dequeue(this_1) endfunction function LinkedList_size_1 takes integer this_1 returns integer return LinkedList_size[this_1] endfunction function dispatch_LinkedList_LinkedList_LinkedList_size takes integer this_1 returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif return LinkedList_size_1(this_1) endfunction function real_round takes real this_1 returns integer local integer cond_result if this_1 > 0. then set cond_result = real_toInt(this_1 + .5) else set cond_result = real_toInt(this_1 - .5) endif return cond_result endfunction function hashtable_loadUnitHandle takes hashtable this_1, integer parentKey, integer childKey returns unit return LoadUnitHandle(this_1, parentKey, childKey) endfunction function Table_loadUnit takes integer this_1, integer parentKey returns unit return hashtable_loadUnitHandle(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadUnit takes integer this_1, integer parentKey returns unit if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadUnit") else call error("Called Table.loadUnit on invalid object.") endif endif return Table_loadUnit(this_1, parentKey) endfunction function unitFromIndex takes integer index returns unit call dispatch_Table_Table_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_Table_Table_loadUnit(TypeCasting_typecastdata, 0) endfunction function unit_unpause takes unit this_1 returns nothing call PauseUnit(this_1, false) endfunction function DummyRecycler_get takes real pos_x, real pos_y, real a_radians returns unit local integer angleIndex = ModuloInteger(real_round(ModuloReal(angle_degrees(a_radians), 360.) / DummyRecycler_ANGLE_DEGREE), 8) local unit receiver if dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[angleIndex]) > 0 then set receiver = unitFromIndex(dispatch_LinkedList_LinkedList_LinkedList_dequeue(DummyRecycler_angleQueues[angleIndex])) call unit_setXY(receiver, pos_x, pos_y) call unit_unpause(receiver) return receiver else return createDummy(pos_x, pos_y, a_radians) endif endfunction function vec2_inBounds takes real this_x, real this_y returns boolean return inBoundsXY(this_x, this_y) endfunction function DummyCaster_prepare takes integer this_1, integer id_1, integer lvl returns unit local unit dummy_1 = DummyRecycler_get(DummyCaster_origin_x[this_1], DummyCaster_origin_y[this_1], 0.) if vec2_inBounds(DummyCaster_origin_x[this_1], DummyCaster_origin_y[this_1]) then call unit_setXY(dummy_1, DummyCaster_origin_x[this_1], DummyCaster_origin_y[this_1]) endif call unit_addAbility(dummy_1, id_1) call unit_setMana(dummy_1, 1000000.) if lvl > 1 then call unit_setAbilityLevel(dummy_1, id_1, lvl) endif call unit_setOwner(dummy_1, DummyCaster_owner[this_1], false) return dummy_1 endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_prepare takes integer this_1, integer id_1, integer lvl returns unit if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.prepare") else call error("Called DummyCaster.prepare on invalid object.") endif endif return DummyCaster_prepare(this_1, id_1, lvl) endfunction function unit_issuePointOrderById takes unit this_1, integer id_1, real target_x, real target_y returns boolean return IssuePointOrderById(this_1, id_1, target_x, target_y) endfunction function real_asAngleRadians takes real this_1 returns real set real_asAngleRadians_return_radians = this_1 return real_asAngleRadians_return_radians endfunction function vec2_angleTo takes real this_x, real this_y, real v_x, real v_y returns real set vec2_angleTo_return_radians = real_asAngleRadians(Atan2(v_y - this_y, v_x - this_x)) return vec2_angleTo_return_radians endfunction function DummyCaster_castPoint takes integer this_1, integer abilityId, integer lvl, integer orderId, real targetPos_x, real targetPos_y returns unit local unit dummy_1 = dispatch_DummyCaster_DummyCaster_DummyCaster_prepare(this_1, abilityId, lvl) local boolean success call unit_setFacing(dummy_1, vec2_angleTo(unit_getPos(dummy_1), unit_getPos_return_y, targetPos_x, targetPos_y)) set success = unit_issuePointOrderById(dummy_1, orderId, targetPos_x, targetPos_y) call dispatch_DummyCaster_DummyCaster_DummyCaster_finish(this_1, dummy_1, abilityId) if not success then set dummy_1 = null endif return dummy_1 endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_castPoint takes integer this_1, integer abilityId, integer lvl, integer orderId, real targetPos_x, real targetPos_y returns unit if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.castPoint") else call error("Called DummyCaster.castPoint on invalid object.") endif endif return DummyCaster_castPoint(this_1, abilityId, lvl, orderId, targetPos_x, targetPos_y) endfunction function DummyCaster_delay_1 takes integer this_1, real delay returns nothing set DummyCaster_delay[this_1] = delay endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_delay takes integer this_1, real delay returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.delay") else call error("Called DummyCaster.delay on invalid object.") endif endif call DummyCaster_delay_1(this_1, delay) endfunction function DummyCaster_origin takes integer this_1, real pos_x, real pos_y returns nothing set DummyCaster_origin_x[this_1] = pos_x set DummyCaster_origin_y[this_1] = pos_y endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_origin takes integer this_1, real pos_x, real pos_y returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.origin") else call error("Called DummyCaster.origin on invalid object.") endif endif call DummyCaster_origin(this_1, pos_x, pos_y) endfunction function DummyCaster_owner_1 takes integer this_1, player owner returns nothing set DummyCaster_owner[this_1] = owner endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_owner takes integer this_1, player owner returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.owner") else call error("Called DummyCaster.owner on invalid object.") endif endif call DummyCaster_owner_1(this_1, owner) endfunction function alloc_DummyCaster takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function DummyCaster_init takes integer this_1 returns nothing 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. endfunction function construct_DummyCaster takes integer this_1 returns nothing call DummyCaster_init(this_1) endfunction function new_DummyCaster takes nothing returns integer local integer this_1 = alloc_DummyCaster() call construct_DummyCaster(this_1) return this_1 endfunction function vec2_op_plus takes real this_x, real this_y, real v_x, real v_y returns real set vec2_op_plus_return_x = this_x + v_x set vec2_op_plus_return_y = this_y + v_y return vec2_op_plus_return_x endfunction function fireEx_onPointCast_nullclosurebug takes integer this_1, unit caster, real target_x, real target_y returns nothing call print("Spell has been casted") set this_1 = new_DummyCaster() call dispatch_DummyCaster_DummyCaster_DummyCaster_delay(this_1, 3.) call dispatch_DummyCaster_DummyCaster_DummyCaster_owner(this_1, unit_getOwner(caster)) call dispatch_DummyCaster_DummyCaster_DummyCaster_origin(this_1, vec2_op_plus(unit_getPos(caster), unit_getPos_return_y, 100., 0.), vec2_op_plus_return_y) call dispatch_DummyCaster_DummyCaster_DummyCaster_castPoint(this_1, 1095262842, 1, 852089, target_x, target_y) endfunction function dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx takes integer this_1, unit caster, real target_x, real target_y returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnPointCast.fireEx") else call error("Called OnPointCast.fireEx on invalid object.") endif endif call fireEx_onPointCast_nullclosurebug(this_1, caster, target_x, target_y) endfunction function OnPointCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx(this_1, caster, EventData_getSpellTargetPos(), EventData_getSpellTargetPos_return_y) endfunction function dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx takes integer this_1, unit caster, unit target returns nothing endfunction function OnUnitCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx(this_1, caster, GetSpellTargetUnit()) endfunction function dispatch_OnCastListener_ClosureEvents_OnCastListener_fire takes integer this_1, unit caster returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.fire") else call error("Called OnCastListener.fire on invalid object.") endif endif if OnCastListener_typeId[this_1] <= 737 then if OnCastListener_typeId[this_1] <= 735 then call OnCast_fire(this_1, caster) else call OnPointCast_fire(this_1, caster) endif else call OnUnitCast_fire(this_1, caster) endif endfunction function EventListener_onSpellEffect takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer abilId = GetSpellAbilityId() local integer listener = unit_getIndex(trigUnit) local integer nextListener 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()) endif set listener = nextListener endloop endif if dispatch_HashMap_HashMap_HashMap_has(EventListener_castMap, abilId) then set listener = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId) 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()) endif set listener = abilId endloop endif endfunction function code__registerPlayerUnitEvent_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_onSpellEffect() endfunction function trigger_execute takes trigger this_1 returns nothing call TriggerExecute(this_1) endfunction function unit_getAbilityLevel takes unit this_1, integer id_1 returns integer return GetUnitAbilityLevel(this_1, id_1) endfunction function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave takes nothing returns nothing local unit leavingUnit = GetTriggerUnit() if unit_getAbilityLevel(leavingUnit, 1095577649) == 0 and GetIssuedOrderId() == 852056 then call pushUnit(leavingUnit) call trigger_execute(OnUnitEnterLeave_eventTrigger) call popUnit() endif endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + 0.030 endfunction function dispatch_Callback_ClosureTimers_Callback_call takes integer this_1 returns nothing endfunction function dealloc_Callback takes integer obj returns nothing if Callback_typeId[obj] == 0 then call error("Double free: object of type Callback") else set Callback_firstFree = Callback_firstFree + 1 set Callback_typeId[obj] = 0 endif endfunction function destroyCallback takes integer this_1 returns nothing call dealloc_Callback(this_1) endfunction function dispatch_Callback_destroyCallback takes integer this_1 returns nothing if Callback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Callback.Callback") else call error("Called Callback.Callback on invalid object.") endif endif call destroyCallback(this_1) endfunction function timerdialog_destr takes timerdialog this_1 returns nothing call DestroyTimerDialog(this_1) endfunction function call_doAfter_ClosureTimers takes integer this_1 returns nothing call dispatch_Callback_ClosureTimers_Callback_call(cb[this_1]) call dispatch_Callback_destroyCallback(cb[this_1]) call timerdialog_destr(dia[this_1]) endfunction function call_doAfter_ClosureTimers_212 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x + 50 endfunction function call_doAfter_ClosureTimers_213 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x * 2 endfunction function testFail takes string msg returns nothing endfunction function int_assertEquals takes integer this_1, integer expected returns nothing if this_1 != expected then call testFail("Expected <" + int_toString(expected) + ">, Actual <" + int_toString(this_1) + ">") endif endfunction function call_doAfter_ClosureTimers_214 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x / 2 call int_assertEquals(ClosureTimers_x, 250) endfunction function LinkedList_enqueue takes integer this_1, integer elem returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_1, elem) endfunction function dispatch_LinkedList_LinkedList_LinkedList_enqueue takes integer this_1, integer elem returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.enqueue") else call error("Called LinkedList.enqueue on invalid object.") endif endif call LinkedList_enqueue(this_1, elem) endfunction function real_asAngleDegrees takes real this_1 returns real set real_asAngleDegrees_return_radians = this_1 * 0.017453293 return real_asAngleDegrees_return_radians endfunction function unit_pause takes unit this_1 returns nothing call PauseUnit(this_1, true) endfunction function unit_setScale takes unit this_1, real scale returns nothing call SetUnitScale(this_1, scale, scale, scale) endfunction function unit_setVertexColor takes unit this_1, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing call SetUnitVertexColor(this_1, col_red, col_green, col_blue, col_alpha) endfunction function vec2_op_minus takes real this_x, real this_y, real v_x, real v_y returns real set vec2_op_minus_return_x = this_x - v_x set vec2_op_minus_return_y = this_y - v_y return vec2_op_minus_return_x endfunction function DummyRecycler_recycle takes unit u_1 returns nothing local integer smallestQueue = 0 local integer i = 1 local integer temp = 7 loop exitwhen i > temp if dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[smallestQueue]) > dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[i]) then set smallestQueue = i endif set i = i + 1 endloop if dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[smallestQueue]) >= 6 then call unit_remove(u_1) else call dispatch_LinkedList_LinkedList_LinkedList_enqueue(DummyRecycler_angleQueues[smallestQueue], unitToIndex(u_1)) call unit_setXY(u_1, vec2_op_minus(MapBounds_boundMax_x, MapBounds_boundMax_y, 16., 16.), vec2_op_minus_return_y) call unit_pause(u_1) call unit_setFacing(u_1, real_asAngleDegrees(smallestQueue * DummyRecycler_ANGLE_DEGREE)) call unit_setScale(u_1, 1.) call unit_setVertexColor(u_1, 255, 255, 255, 255) call unit_setOwner(u_1, Basics_DUMMY_PLAYER, true) endif endfunction function DummyCaster_recycleDummy takes integer this_1, unit dummy_1, integer id_1 returns nothing call unit_removeAbility(dummy_1, id_1) call DummyRecycler_recycle(dummy_1) endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy takes integer this_1, unit dummy_1, integer id_1 returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.recycleDummy") else call error("Called DummyCaster.recycleDummy on invalid object.") endif endif call DummyCaster_recycleDummy(this_1, dummy_1, id_1) endfunction function DummyCaster_onDestroy takes integer this_1 returns nothing endfunction function dealloc_DummyCaster takes integer obj returns nothing if DummyCaster_typeId[obj] == 0 then call error("Double free: object of type DummyCaster") else set DummyCaster_nextFree[DummyCaster_firstFree] = obj set DummyCaster_firstFree = DummyCaster_firstFree + 1 set DummyCaster_typeId[obj] = 0 endif endfunction function destroyDummyCaster takes integer this_1 returns nothing call DummyCaster_onDestroy(this_1) call dealloc_DummyCaster(this_1) endfunction function dispatch_DummyCaster_destroyDummyCaster takes integer this_1 returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.DummyCaster") else call error("Called DummyCaster.DummyCaster on invalid object.") endif endif call destroyDummyCaster(this_1) endfunction function call_doAfter_DummyCaster_DummyCaster takes integer this_1 returns nothing call dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy(this[this_1], dummy[this_1], id[this_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]) endif endfunction function call_doAfter_DummyRecycler_DummyRecycler takes integer this_1 returns nothing call DummyRecycler_recycle(u[this_1]) endfunction function trigger_registerPlayerChatEvent takes trigger this_1, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns event return TriggerRegisterPlayerChatEvent(this_1, whichPlayer, chatMessageToDetect, exactMatchOnly) endfunction function call_nullTimer_ClosureEvents takes integer this_1 returns nothing local integer temp local trigger receiver call trigger_addAction(ClosureEvents_unitTrig, ref_function_code__addAction_nullTimer_ClosureEvents) call trigger_addAction(ClosureEvents_leaveTrig, ref_function_code__addAction_nullTimer_ClosureEvents_184) call trigger_addAction(ClosureEvents_keyTrig, ref_function_code__addAction_nullTimer_ClosureEvents_185) set this_1 = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen this_1 > temp call trigger_registerPlayerEvent(ClosureEvents_leaveTrig, Player_players[this_1], EVENT_PLAYER_LEAVE) set receiver = ClosureEvents_keyTrig call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_DOWN_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_DOWN_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_UP_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_UP_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_LEFT_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_LEFT_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_RIGHT_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_RIGHT_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_END_CINEMATIC) call trigger_registerPlayerChatEvent(receiver, Player_players[this_1], "", false) set this_1 = this_1 + 1 endloop call registerPlayerUnitEvent_482(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents, null) endfunction function group_clear takes group this_1 returns nothing call GroupClear(this_1) endfunction function group_destr takes group this_1 returns nothing call DestroyGroup(this_1) endfunction function group_enumUnitsInRect_349 takes group this_1, rect rec, boolexpr filter returns nothing call GroupEnumUnitsInRect(this_1, rec, filter) endfunction function group_enumUnitsInRect takes group this_1, rect rec returns nothing call group_enumUnitsInRect_349(this_1, rec, null) endfunction function trigger_registerEnterRegion takes trigger this_1, region whichRegion, boolexpr filter returns event return TriggerRegisterEnterRegion(this_1, whichRegion, filter) endfunction function call_nullTimer_OnUnitEnterLeave takes integer this_1 returns nothing local group receiver call trigger_registerEnterRegion(CreateTrigger(), MapBounds_boundRegion, Filter(ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave)) call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_ISSUED_ORDER, ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave) call group_enumUnitsInRect(OnUnitEnterLeave_preplacedUnits, MapBounds_boundRect) call ForGroup(OnUnitEnterLeave_preplacedUnits, ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave) set receiver = OnUnitEnterLeave_preplacedUnits call group_clear(receiver) call group_destr(receiver) endfunction function alloc_ForGroupCallback_forEachFrom_Preloader takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function dealloc_ForGroupCallback takes integer obj returns nothing if ForGroupCallback_typeId[obj] == 0 then call error("Double free: object of type ForGroupCallback") else set ForGroupCallback_nextFree[ForGroupCallback_firstFree] = obj set ForGroupCallback_firstFree = ForGroupCallback_firstFree + 1 set ForGroupCallback_typeId[obj] = 0 endif endfunction function destroyForGroupCallback takes integer this_1 returns nothing call dealloc_ForGroupCallback(this_1) endfunction function dispatch_ForGroupCallback_destroyForGroupCallback takes integer this_1 returns nothing if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.ForGroupCallback") else call error("Called ForGroupCallback.ForGroupCallback on invalid object.") endif endif call destroyForGroupCallback(this_1) endfunction function group_forEachFrom takes group this_1, integer cb_1 returns nothing loop exitwhen not group_hasNext(this_1) call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(cb_1, group_next(this_1)) endloop call dispatch_ForGroupCallback_destroyForGroupCallback(cb_1) endfunction function finishPreload takes nothing returns nothing call unit_remove(Preloader_dum) call group_forEachFrom(Preloader_dumg, alloc_ForGroupCallback_forEachFrom_Preloader()) call group_destr(Preloader_dumg) set Preloader_dumg = null endfunction function call_nullTimer_Preloader takes integer this_1 returns nothing call finishPreload() endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call takes integer this_1 returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.call") else call error("Called CallbackSingle.call on invalid object.") 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 call call_doAfter_ClosureTimers(this_1) else call call_doAfter_ClosureTimers_212(this_1) endif else call call_doAfter_ClosureTimers_213(this_1) endif elseif CallbackSingle_typeId[this_1] <= 646 then call call_doAfter_ClosureTimers_214(this_1) else call call_doAfter_DummyCaster_DummyCaster(this_1) endif elseif CallbackSingle_typeId[this_1] <= 649 then if CallbackSingle_typeId[this_1] <= 648 then call call_doAfter_DummyRecycler_DummyRecycler(this_1) else call call_nullTimer_ClosureEvents(this_1) endif elseif CallbackSingle_typeId[this_1] <= 650 then call call_nullTimer_OnUnitEnterLeave(this_1) else call call_nullTimer_Preloader(this_1) endif endfunction function timer_getData takes timer this_1 returns integer return dispatch_Table_Table_Table_loadInt(TimerUtils_timerData, timer_getHandleId(this_1)) endfunction function timer_pause takes timer this_1 returns nothing call PauseTimer(this_1) endfunction function timer_release takes timer this_1 returns nothing if this_1 == null then call error("Trying to release a null timer") return endif if timer_getData(this_1) == 679645218 then call error("ReleaseTimer: Double free!") return endif call timer_setData(this_1, 679645218) call timer_pause(this_1) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this_1 set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 endfunction function CallbackSingle_onDestroy takes integer this_1 returns nothing call timer_release(CallbackSingle_t[this_1]) endfunction function dealloc_CallbackSingle takes integer obj returns nothing if CallbackSingle_typeId[obj] == 0 then call error("Double free: object of type CallbackSingle") else set CallbackSingle_nextFree[CallbackSingle_firstFree] = obj set CallbackSingle_firstFree = CallbackSingle_firstFree + 1 set CallbackSingle_typeId[obj] = 0 endif endfunction function destroyCallbackSingle takes integer this_1 returns nothing call CallbackSingle_onDestroy(this_1) call dealloc_CallbackSingle(this_1) endfunction function dispatch_CallbackSingle_destroyCallbackSingle takes integer this_1 returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.CallbackSingle") else call error("Called CallbackSingle.CallbackSingle on invalid object.") endif endif call destroyCallbackSingle(this_1) endfunction function CallbackSingle_staticCallback takes nothing returns nothing local integer cb_1 = timer_getData(GetExpiredTimer()) call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call(cb_1) call dispatch_CallbackSingle_destroyCallbackSingle(cb_1) endfunction function code__start_CallbackSingle_ClosureTimers takes nothing returns nothing call CallbackSingle_staticCallback() 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 int_bitOr takes integer this_1, integer other returns integer return BlzBitOr(this_1, other) endfunction function int_bitXor takes integer this_1, integer other returns integer return BlzBitXor(this_1, other) 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 = int_bitOr(allPows, BitSet_pows[i]) set i = i + 1 endloop set i = 0 set temp = 31 loop exitwhen i > temp call int_bitXor(allPows, BitSet_pows[i]) 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 alloc_OrderStringFactory takes nothing returns integer local integer this_1 if OrderStringFactory_firstFree == 0 then if OrderStringFactory_maxIndex < 32768 then set OrderStringFactory_maxIndex = OrderStringFactory_maxIndex + 1 set this_1 = OrderStringFactory_maxIndex else call error("Out of memory: Could not create OrderStringFactory.") set this_1 = 0 endif else set OrderStringFactory_firstFree = OrderStringFactory_firstFree - 1 set this_1 = OrderStringFactory_nextFree[OrderStringFactory_firstFree] endif return this_1 endfunction function OrderStringFactory_init takes integer this_1 returns nothing endfunction function construct_OrderStringFactory takes integer this_1 returns nothing call OrderStringFactory_init(this_1) endfunction function new_OrderStringFactory takes nothing returns integer local integer this_1 = alloc_OrderStringFactory() call construct_OrderStringFactory(this_1) return this_1 endfunction function init_ChannelAbilityPreset takes nothing returns boolean call new_OrderStringFactory() return true endfunction function alloc_CallbackSingle_nullTimer_ClosureEvents takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function alloc_HashMap takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function HashMap_init takes integer this_1 returns nothing set HashMap_size[this_1] = 0 endfunction function Table_init takes integer this_1 returns nothing endfunction function construct_Table takes integer this_1 returns nothing call Table_init(this_1) endfunction function construct_HashMap takes integer this_1 returns nothing call construct_Table(this_1) call HashMap_init(this_1) endfunction function new_HashMap takes nothing returns integer local integer this_1 = alloc_HashMap() call construct_HashMap(this_1) return this_1 endfunction function nullTimer takes integer cb_1 returns integer return doAfter(0., cb_1) endfunction function onUnitDeindex takes code func returns nothing call trigger_addCondition(UnitIndexer_onDeindexTrigger, Condition(func)) endfunction function onUnitIndex takes code func returns nothing call trigger_addCondition(UnitIndexer_onIndexTrigger, Condition(func)) endfunction function init_ClosureEvents takes nothing returns boolean local integer clVar set ClosureEvents_EVENT_PLAYER_CHAT_FILTER = ConvertPlayerEvent(96) set EventListener_castMap = new_HashMap() set ClosureEvents_unitTrig = CreateTrigger() set ClosureEvents_leaveTrig = CreateTrigger() set ClosureEvents_keyTrig = CreateTrigger() call onUnitIndex(ref_function_code__onUnitIndex_ClosureEvents) call onUnitDeindex(ref_function_code__onUnitDeindex_ClosureEvents) set clVar = alloc_CallbackSingle_nullTimer_ClosureEvents() call construct_CallbackSingle(clVar) call nullTimer(clVar) return true endfunction function init_ClosureForGroups takes nothing returns boolean call CreateGroup() call Filter(ref_function_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 toHex takes integer number returns string local integer firstpart = number / 16 return Colors_hexs[firstpart] + Colors_hexs[number - firstpart * 16] endfunction function colorA_toColorString takes integer this_red, integer this_green, integer this_blue, integer this_alpha returns string return "|c" + toHex(this_alpha) + toHex(this_red) + toHex(this_green) + toHex(this_blue) endfunction function initializeTable takes nothing returns nothing local integer i = 0 loop exitwhen i > 15 call dispatch_Table_Table_Table_saveInt(Colors_decs, string_getHash(Colors_hexs[i]), i) set i = i + 1 endloop endfunction function alloc_Table takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function new_Table takes nothing returns integer local integer this_1 = alloc_Table() call construct_Table(this_1) return this_1 endfunction function init_Colors takes nothing returns boolean 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() call colorA_toColorString(255, 255, 255, 255) call colorA_toColorString(0, 0, 0, 0) call colorA_toColorString(255, 204, 0, 255) call initializeTable() return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_Doodads takes nothing returns boolean return true endfunction function realToIndex takes real r returns integer return real_toInt(r * 1000.) endfunction function init_DummyRecycler takes nothing returns boolean local integer i local integer temp local real facing_radians local integer j local integer temp_1 local unit dummy_1 set DummyRecycler_ANGLE_DEGREE = 360 * 1. / 8 call realToIndex(1.) set i = 0 set temp = 7 loop exitwhen i > temp set DummyRecycler_angleQueues[i] = new_LinkedList() set facing_radians = i * DummyRecycler_ANGLE_DEGREE set j = 0 set temp_1 = 5 loop exitwhen j > temp_1 set dummy_1 = createDummy(vec2_op_minus(MapBounds_boundMax_x, MapBounds_boundMax_y, 16., 16.), vec2_op_minus_return_y, facing_radians) call dispatch_LinkedList_LinkedList_LinkedList_enqueue(DummyRecycler_angleQueues[i], unitToIndex(dummy_1)) set j = j + 1 endloop set i = i + 1 endloop return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_HT = hashtable_compiletime return true endfunction function init_EventHelper takes nothing returns boolean call new_HashMap() call new_HashMap() call new_Table() return true endfunction function verifyFrameNameLength takes string name returns boolean if string_length(name) > 560 then call error("Trying to address frame with exceeding maximum frame name length (" + int_toString(560) + ") for: " + name) return false endif return true endfunction function createFrame takes string typeName, string name, framehandle owner, string inherits, integer createContext returns framehandle call verifyFrameNameLength(name) return BlzCreateFrameByType(typeName, name, owner, inherits, createContext) endfunction function framehandle_setSize takes framehandle this_1, real width, real height returns nothing call BlzFrameSetSize(this_1, width, height) endfunction function init_Framehandle takes nothing returns boolean set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) call framehandle_setSize(createFrame("FRAME", "SetMousePositionCage", Framehandle_GAME_UI, null, 0), 0.0001, 0.0001) return true endfunction function timer_startPeriodic takes timer this_1, real time, code timerCallBack returns nothing call TimerStart(this_1, time, true, timerCallBack) endfunction function init_GameTimer takes nothing returns boolean call timer_start(CreateTimer(), 100000., null) call timer_startPeriodic(CreateTimer(), 0.030, 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_170 set HashList_occurences = hashtable_compiletime_171 return true endfunction function init_Icons takes nothing returns boolean return true endfunction function unit_setPathing takes unit this_1, boolean value returns nothing call SetUnitPathing(this_1, value) endfunction function init_InstantDummyCaster takes nothing returns boolean local unit receiver = createUnit(Basics_DUMMY_PLAYER, 2016423986, MapBounds_boundMax_x, MapBounds_boundMax_y, 0.) call unit_setPathing(receiver, false) call unit_addAbility(receiver, 1097691750) call unit_removeAbility(receiver, 1097691750) call unit_addAbility(receiver, 1095577652) call unit_removeAbility(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 alloc_Comparator_LinkedList takes nothing returns integer local integer this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 set this_1 = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] endif return this_1 endfunction function alloc_Comparator_LinkedList_197 takes nothing returns integer local integer this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 set this_1 = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] endif return this_1 endfunction function init_LinkedList takes nothing returns boolean call alloc_Comparator_LinkedList() call alloc_Comparator_LinkedList_197() call realToIndex(0.) return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true endfunction function rect_getMaxX takes rect this_1 returns real return GetRectMaxX(this_1) endfunction function rect_getMaxY takes rect this_1 returns real return GetRectMaxY(this_1) endfunction function rect_getMinX takes rect this_1 returns real return GetRectMinX(this_1) endfunction function rect_getMinY takes rect this_1 returns real return GetRectMinY(this_1) endfunction function region_addRect takes region this_1, rect rct returns nothing call RegionAddRect(this_1, rct) endfunction function vec2_op_mult takes real this_x, real this_y, real factor returns real set vec2_op_mult_return_x = this_x * factor return vec2_op_mult_return_x 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 = GetPlayableMapRect() endif set MapBounds_playableMapRect = cond_result call region_addRect(CreateRegion(), 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 region_addRect(receiver, MapBounds_boundRect) set MapBounds_boundRegion = receiver set tuple_temp = rect_getMinX(MapBounds_playableMapRect) set tuple_temp_1 = rect_getMinY(MapBounds_playableMapRect) set MapBounds_playableMin_x = tuple_temp set MapBounds_playableMin_y = tuple_temp_1 set tuple_temp_1 = rect_getMaxX(MapBounds_playableMapRect) set tuple_temp = rect_getMaxY(MapBounds_playableMapRect) set MapBounds_playableMax_x = tuple_temp_1 set MapBounds_playableMax_y = tuple_temp set tuple_temp = rect_getMinX(MapBounds_boundRect) set tuple_temp_1 = rect_getMinY(MapBounds_boundRect) set MapBounds_boundMin_x = tuple_temp set MapBounds_boundMin_y = tuple_temp_1 set tuple_temp_1 = rect_getMaxX(MapBounds_boundRect) set tuple_temp = rect_getMaxY(MapBounds_boundRect) set MapBounds_boundMax_x = tuple_temp_1 set MapBounds_boundMax_y = tuple_temp call vec2_op_mult(vec2_op_plus(MapBounds_playableMin_x, MapBounds_playableMin_y, MapBounds_playableMax_x, MapBounds_playableMax_y), vec2_op_plus_return_y, .5) call vec2_op_mult(vec2_op_plus(MapBounds_boundMin_x, MapBounds_boundMin_y, MapBounds_boundMax_x, MapBounds_boundMax_y), vec2_op_plus_return_y, .5) 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 alloc_IdGenerator takes nothing returns integer local integer this_1 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_1 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_1 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_1 = IdGenerator_nextFree[IdGenerator_firstFree] endif return this_1 endfunction function IdGenerator_init takes integer this_1 returns nothing endfunction function construct_IdGenerator takes integer this_1, integer start returns nothing call IdGenerator_init(this_1) endfunction function new_IdGenerator takes integer start returns integer local integer this_1 = alloc_IdGenerator() call construct_IdGenerator(this_1, start) return this_1 endfunction function init_ObjectIdGenerator takes nothing returns boolean call new_IdGenerator(2016423984) call new_IdGenerator(1213018160) call new_IdGenerator(1095577648) call new_IdGenerator(1112354864) call new_IdGenerator(1229795376) call new_IdGenerator(1380790320) return true endfunction function init_ObjectIds takes nothing returns boolean return true endfunction function init_Objects takes nothing returns boolean return true endfunction function alloc_CallbackSingle_nullTimer_OnUnitEnterLeave takes nothing returns integer local integer this_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] = 650 else call error("Out of memory: Could not create CallbackSingle_nullTimer_OnUnitEnterLeave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 650 endif return this_1 endfunction function player_setAbilityAvailable takes player this_1, integer abilityId, boolean avail returns nothing call SetPlayerAbilityAvailable(this_1, abilityId, avail) endfunction function init_OnUnitEnterLeave takes nothing returns boolean local integer i local integer temp set OnUnitEnterLeave_eventTrigger = CreateTrigger() set OnUnitEnterLeave_preplacedUnits = CreateGroup() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call player_setAbilityAvailable(Player_players[i], 1095577649, false) set i = i + 1 endloop set i = alloc_CallbackSingle_nullTimer_OnUnitEnterLeave() call construct_CallbackSingle(i) call nullTimer(i) return true endfunction function init_Orders takes nothing returns boolean return true endfunction function initPlayerArray takes nothing returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set Player_players[i] = Player(i) set i = i + 1 endloop endfunction function init_Player takes nothing returns boolean set Player_localPlayer = GetLocalPlayer() call initPlayerArray() return true endfunction function init_Playercolor takes nothing returns boolean return true endfunction function alloc_CallbackSingle_nullTimer_Preloader takes nothing returns integer local integer this_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.") 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 return this_1 endfunction function unit_setInvulnerable takes unit this_1, boolean flag returns nothing call SetUnitInvulnerable(this_1, flag) endfunction function init_Preloader takes nothing returns boolean local integer clVar set Preloader_dumg = CreateGroup() set Preloader_dum = createUnit(Basics_DUMMY_PLAYER, 1970497636, MapBounds_playableMin_x, MapBounds_playableMin_y, 0.) call unit_setInvulnerable(Preloader_dum, true) if Preloader_dum == null then call error("DUMMY_UNITID not added correctly to the map.") endif set clVar = alloc_CallbackSingle_nullTimer_Preloader() call construct_CallbackSingle(clVar) call nullTimer(clVar) 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_RegisterEvents takes nothing returns boolean set RegisterEvents_onCastMap = new_HashMap() call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, ref_function_code__registerPlayerUnitEvent_RegisterEvents) 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 call string_length("0123456789") call string_length("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") return true endfunction function c2sInit takes nothing returns nothing set StringUtils_c2s[0] = "" set StringUtils_c2s[1] = "" set StringUtils_c2s[2] = "" set StringUtils_c2s[3] = "" set StringUtils_c2s[4] = "" set StringUtils_c2s[5] = "" set StringUtils_c2s[6] = "" set StringUtils_c2s[7] = "" set StringUtils_c2s[8] = "" set StringUtils_c2s[9] = "\t" set StringUtils_c2s[10] = "\n" set StringUtils_c2s[11] = "" set StringUtils_c2s[12] = "" set StringUtils_c2s[13] = "\r" set StringUtils_c2s[14] = "" set StringUtils_c2s[15] = "" set StringUtils_c2s[16] = "" set StringUtils_c2s[17] = "" set StringUtils_c2s[18] = "" set StringUtils_c2s[19] = "" set StringUtils_c2s[20] = "" set StringUtils_c2s[21] = "" set StringUtils_c2s[22] = "" set StringUtils_c2s[23] = "" set StringUtils_c2s[24] = "" set StringUtils_c2s[25] = "" set StringUtils_c2s[26] = "" set StringUtils_c2s[27] = "" set StringUtils_c2s[28] = "" set StringUtils_c2s[29] = "" set StringUtils_c2s[30] = "" set StringUtils_c2s[31] = "" set StringUtils_c2s[32] = " " set StringUtils_c2s[33] = "!" set StringUtils_c2s[34] = "\"" set StringUtils_c2s[35] = "#" set StringUtils_c2s[36] = "$" set StringUtils_c2s[37] = "%" set StringUtils_c2s[38] = "&" set StringUtils_c2s[39] = "'" set StringUtils_c2s[40] = "(" set StringUtils_c2s[41] = ")" set StringUtils_c2s[42] = "*" set StringUtils_c2s[43] = "+" set StringUtils_c2s[44] = "," set StringUtils_c2s[45] = "-" set StringUtils_c2s[46] = "." set StringUtils_c2s[47] = "/" set StringUtils_c2s[48] = "0" set StringUtils_c2s[49] = "1" set StringUtils_c2s[50] = "2" set StringUtils_c2s[51] = "3" set StringUtils_c2s[52] = "4" set StringUtils_c2s[53] = "5" set StringUtils_c2s[54] = "6" set StringUtils_c2s[55] = "7" set StringUtils_c2s[56] = "8" set StringUtils_c2s[57] = "9" set StringUtils_c2s[58] = ":" set StringUtils_c2s[59] = ";" set StringUtils_c2s[60] = "<" set StringUtils_c2s[61] = "=" set StringUtils_c2s[62] = ">" set StringUtils_c2s[63] = "?" set StringUtils_c2s[64] = "@" set StringUtils_c2s[65] = "A" set StringUtils_c2s[66] = "B" set StringUtils_c2s[67] = "C" set StringUtils_c2s[68] = "D" set StringUtils_c2s[69] = "E" set StringUtils_c2s[70] = "F" set StringUtils_c2s[71] = "G" set StringUtils_c2s[72] = "H" set StringUtils_c2s[73] = "I" set StringUtils_c2s[74] = "J" set StringUtils_c2s[75] = "K" set StringUtils_c2s[76] = "L" set StringUtils_c2s[77] = "M" set StringUtils_c2s[78] = "N" set StringUtils_c2s[79] = "O" set StringUtils_c2s[80] = "P" set StringUtils_c2s[81] = "Q" set StringUtils_c2s[82] = "R" set StringUtils_c2s[83] = "S" set StringUtils_c2s[84] = "T" set StringUtils_c2s[85] = "U" set StringUtils_c2s[86] = "V" set StringUtils_c2s[87] = "W" set StringUtils_c2s[88] = "X" set StringUtils_c2s[89] = "Y" set StringUtils_c2s[90] = "Z" set StringUtils_c2s[91] = "[" set StringUtils_c2s[92] = "\\" set StringUtils_c2s[93] = "]" set StringUtils_c2s[94] = "^" set StringUtils_c2s[95] = "_" set StringUtils_c2s[96] = "`" set StringUtils_c2s[97] = "a" set StringUtils_c2s[98] = "b" set StringUtils_c2s[99] = "c" set StringUtils_c2s[100] = "d" set StringUtils_c2s[101] = "e" set StringUtils_c2s[102] = "f" set StringUtils_c2s[103] = "g" set StringUtils_c2s[104] = "h" set StringUtils_c2s[105] = "i" set StringUtils_c2s[106] = "j" set StringUtils_c2s[107] = "k" set StringUtils_c2s[108] = "l" set StringUtils_c2s[109] = "m" set StringUtils_c2s[110] = "n" set StringUtils_c2s[111] = "o" set StringUtils_c2s[112] = "p" set StringUtils_c2s[113] = "q" set StringUtils_c2s[114] = "r" set StringUtils_c2s[115] = "s" set StringUtils_c2s[116] = "t" set StringUtils_c2s[117] = "u" set StringUtils_c2s[118] = "v" set StringUtils_c2s[119] = "w" set StringUtils_c2s[120] = "x" set StringUtils_c2s[121] = "y" set StringUtils_c2s[122] = "z" set StringUtils_c2s[123] = "{" set StringUtils_c2s[124] = "|" set StringUtils_c2s[125] = "}" set StringUtils_c2s[126] = "~" set StringUtils_c2s[127] = "" endfunction function string_toUpperCase takes string this_1 returns string return StringCase(this_1, true) endfunction function s2cInit takes nothing returns nothing local integer i = 0 local integer temp = 127 loop exitwhen i > temp call string_toUpperCase(StringUtils_c2s[i]) set i = i + 1 endloop endfunction function widthInit takes nothing returns nothing endfunction function initialize takes nothing returns nothing call c2sInit() call s2cInit() call widthInit() endfunction function init_StringUtils takes nothing returns boolean call initialize() call stringToIndex("") return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_169 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_TimerUtils takes nothing returns boolean set TimerUtils_timerData = new_Table() call new_HashMap() return true endfunction function initTypecastData takes nothing returns nothing call dispatch_Table_Table_Table_saveString(TypeCasting_typecastdata, 0, "") endfunction function init_TypeCasting takes nothing returns boolean set TypeCasting_typecastdata = new_Table() call initTypecastData() return true endfunction function init_UI takes nothing returns boolean return true endfunction function init_UnitIds takes nothing returns boolean return true endfunction function onEnter takes code c returns nothing call trigger_addCondition(OnUnitEnterLeave_eventTrigger, Filter(c)) endfunction function onLeave takes code c returns nothing call trigger_addAction(OnUnitEnterLeave_eventTrigger, c) endfunction function init_UnitIndexer takes nothing returns boolean set UnitIndexer_onIndexTrigger = CreateTrigger() set UnitIndexer_onDeindexTrigger = CreateTrigger() call onEnter(ref_function_code__onEnter_UnitIndexer) call onLeave(ref_function_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 EventListener_addSpellInternal takes unit u_1, integer abilId, integer listener returns integer set OnCastListener_abilId[listener] = abilId if u_1 != null then set OnCastListener_eventUnit[listener] = u_1 set abilId = unit_getIndex(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) then set OnCastListener_prev[dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId)] = listener set OnCastListener_next[listener] = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId) endif call dispatch_HashMap_HashMap_HashMap_put(EventListener_castMap, abilId, listener) endif return listener endfunction function EventListener_onPointCast takes integer abilId, integer listener returns integer return EventListener_addSpellInternal(null, abilId, listener) endfunction function alloc_CommandHandler_registerCommandAll_nullclosurebug takes nothing returns integer local integer this_1 if CommandHandler_firstFree == 0 then if CommandHandler_maxIndex < 32768 then set CommandHandler_maxIndex = CommandHandler_maxIndex + 1 set this_1 = CommandHandler_maxIndex set CommandHandler_typeId[this_1] = 653 else call error("Out of memory: Could not create CommandHandler_registerCommandAll_nullclosurebug.") set this_1 = 0 endif else set CommandHandler_firstFree = CommandHandler_firstFree - 1 set this_1 = CommandHandler_nextFree[CommandHandler_firstFree] set CommandHandler_typeId[this_1] = 653 endif return this_1 endfunction function alloc_CommandHandler_registerCommandAll_nullclosurebug_194 takes nothing returns integer local integer this_1 if CommandHandler_firstFree == 0 then if CommandHandler_maxIndex < 32768 then set CommandHandler_maxIndex = CommandHandler_maxIndex + 1 set this_1 = CommandHandler_maxIndex set CommandHandler_typeId[this_1] = 654 else call error("Out of memory: Could not create CommandHandler_registerCommandAll_nullclosurebug.") set this_1 = 0 endif else set CommandHandler_firstFree = CommandHandler_firstFree - 1 set this_1 = CommandHandler_nextFree[CommandHandler_firstFree] set CommandHandler_typeId[this_1] = 654 endif return this_1 endfunction function alloc_CommandHandler_registerCommandAll_nullclosurebug_195 takes nothing returns integer local integer this_1 if CommandHandler_firstFree == 0 then if CommandHandler_maxIndex < 32768 then set CommandHandler_maxIndex = CommandHandler_maxIndex + 1 set this_1 = CommandHandler_maxIndex set CommandHandler_typeId[this_1] = 655 else call error("Out of memory: Could not create CommandHandler_registerCommandAll_nullclosurebug.") set this_1 = 0 endif else set CommandHandler_firstFree = CommandHandler_firstFree - 1 set this_1 = CommandHandler_nextFree[CommandHandler_firstFree] set CommandHandler_typeId[this_1] = 655 endif return this_1 endfunction function alloc_OnPointCast_onPointCast_nullclosurebug takes nothing returns integer local integer this_1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < 32768 then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set this_1 = OnCastListener_maxIndex set OnCastListener_typeId[this_1] = 737 else call error("Out of memory: Could not create OnPointCast_onPointCast_nullclosurebug.") set this_1 = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set this_1 = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[this_1] = 737 endif return this_1 endfunction function OnPointCast_init takes integer this_1 returns nothing endfunction function OnCastListener_init takes integer this_1 returns nothing set OnCastListener_next[this_1] = 0 set OnCastListener_prev[this_1] = 0 set OnCastListener_eventUnit[this_1] = null endfunction function construct_OnCastListener takes integer this_1 returns nothing call OnCastListener_init(this_1) endfunction function construct_OnPointCast takes integer this_1 returns nothing call construct_OnCastListener(this_1) call OnPointCast_init(this_1) endfunction function registerCommand takes player thePlayer, string command, integer handler returns nothing call dispatch_HashMap_HashMap_HashMap_put(dispatch_HashMap_HashMap_HashMap_get(nullclosurebug_commands, playerToIndex(thePlayer)), stringToIndex(command), handler) endfunction function registerCommandAll takes string command, integer handler returns nothing local integer i = 0 local integer temp = nullclosurebug_MAX_PLAYERS loop exitwhen i > temp call registerCommand(Player_players[i], command, handler) set i = i + 1 endloop endfunction function unit_setInt takes unit this_1, integer value returns nothing call SetHeroInt(this_1, value, true) endfunction function init_nullclosurebug takes nothing returns boolean local trigger t local integer i local integer temp local unit receiver set nullclosurebug_MAX_PLAYERS = PLAYER_NEUTRAL_AGGRESSIVE - 1 set nullclosurebug_commands = new_HashMap() set t = CreateTrigger() set i = 0 set temp = nullclosurebug_MAX_PLAYERS loop exitwhen i > temp call dispatch_HashMap_HashMap_HashMap_put(nullclosurebug_commands, playerToIndex(Player_players[i]), new_HashMap()) call trigger_registerPlayerChatEvent(t, Player_players[i], "-", false) set i = i + 1 endloop call trigger_addAction(t, ref_function_code__addAction_nullclosurebug) call registerCommandAll("test-wurst-commands", alloc_CommandHandler_registerCommandAll_nullclosurebug()) call createUnit(Player_players[0], 1752591476, 0., 0., 0.) set receiver = createUnit(Player_players[0], 1214344551, 0., 0., 0.) call unit_addAbility(receiver, 1095267427) call unit_setInt(receiver, 500) set i = alloc_CommandHandler_registerCommandAll_nullclosurebug_194() set a[i] = receiver call registerCommandAll("cast", i) set i = alloc_CommandHandler_registerCommandAll_nullclosurebug_195() set a_161[i] = receiver call registerCommandAll("owner", i) set i = alloc_OnPointCast_onPointCast_nullclosurebug() call construct_OnPointCast(i) call EventListener_onPointCast(1095577654, i) 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_init_Colors = function init_Colors set ref_function_init_Framehandle = function 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_init_TypeCasting = function init_TypeCasting set ref_function_init_HashList = function init_HashList set ref_function_init_EventHelper = function 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_init_LinkedList = function init_LinkedList set ref_function_init_ObjectIds = function init_ObjectIds set ref_function_init_TimerUtils = function 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_init_Preloader = function init_Preloader set ref_function_init_ObjectIdGenerator = function init_ObjectIdGenerator set ref_function_init_Icons = function init_Icons set ref_function_init_ChannelAbilityPreset = function init_ChannelAbilityPreset set ref_function_init_RegisterEvents = function init_RegisterEvents set ref_function_init_Orders = function init_Orders set ref_function_init_OnUnitEnterLeave = function init_OnUnitEnterLeave set ref_function_init_UnitIndexer = function init_UnitIndexer set ref_function_init_ClosureEvents = function init_ClosureEvents set ref_function_init_Doodads = function init_Doodads set ref_function_init_DummyRecycler = function 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_init_StringUtils = function 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_init_nullclosurebug = function init_nullclosurebug set ref_function_code__onUnitIndex_ClosureEvents = function code__onUnitIndex_ClosureEvents set ref_function_code__onUnitDeindex_ClosureEvents = function code__onUnitDeindex_ClosureEvents set ref_function_EventListener_generalEventCallback = function EventListener_generalEventCallback set ref_function_code__Filter_ClosureForGroups = function code__Filter_ClosureForGroups set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer set ref_function_code__registerPlayerUnitEvent_RegisterEvents = function code__registerPlayerUnitEvent_RegisterEvents set ref_function_code__onEnter_UnitIndexer = function code__onEnter_UnitIndexer set ref_function_code__onLeave_UnitIndexer = function code__onLeave_UnitIndexer set ref_function_code__addAction_nullclosurebug = function code__addAction_nullclosurebug set ref_function_code__addAction_nullTimer_ClosureEvents = function code__addAction_nullTimer_ClosureEvents set ref_function_code__addAction_nullTimer_ClosureEvents_184 = function code__addAction_nullTimer_ClosureEvents_226 set ref_function_code__addAction_nullTimer_ClosureEvents_185 = function code__addAction_nullTimer_ClosureEvents_227 set ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents = function code__registerPlayerUnitEvent_nullTimer_ClosureEvents set ref_function_code__start_CallbackSingle_ClosureTimers = function 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 endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call initCompiletimeState() set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_Abilities)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Abilities.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Real)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Real.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Integer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Integer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BitSet)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BitSet.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_String)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package String.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TargetsAllowed)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TargetsAllowed.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Angle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Angle.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Vectors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Vectors.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Destructable)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Destructable.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Player)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Player.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Maths)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Maths.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Printing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Printing.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MagicFunctions)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MagicFunctions.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Basics)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Basics.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameTimer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameTimer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ErrorHandling)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ErrorHandling.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Matrices)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Matrices.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Quaternion)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Quaternion.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Table)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Table.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Playercolor)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Playercolor.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Colors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Colors.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Framehandle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Framehandle.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Group)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Group.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Lightning)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Lightning.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WeatherEffects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WeatherEffects.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TypeCasting)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TypeCasting.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashList.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_EventHelper)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EventHelper.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityObjEditing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityObjEditing.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AttachmentPoints)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AttachmentPoints.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BuffIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BuffIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Buildings)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Buildings.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureForGroups)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureForGroups.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_LinkedList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LinkedList.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ObjectIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TimerUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TimerUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureTimers)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureTimers.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MapBounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MapBounds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Preloader)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Preloader.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ObjectIdGenerator)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectIdGenerator.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Icons)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Icons.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ChannelAbilityPreset)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ChannelAbilityPreset.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_RegisterEvents)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package RegisterEvents.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Orders)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Orders.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_OnUnitEnterLeave)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package OnUnitEnterLeave.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitIndexer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitIndexer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureEvents)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureEvents.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Doodads)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Doodads.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_DummyRecycler)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DummyRecycler.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_InstantDummyCaster)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package InstantDummyCaster.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ItemIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ItemIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Objects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Objects.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Sounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Sounds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Soundsets)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Soundsets.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_StringUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package StringUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Textures)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Textures.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UI)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UI.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Units)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Units.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_nullclosurebug)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package nullclosurebug.") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function config takes nothing returns nothing endfunction