// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals // integer PLAYER_NEUTRAL_PASSIVE=0 // originframetype ORIGIN_FRAME_GAME_UI=null // originframetype ORIGIN_FRAME_WORLD_FRAME=null // integer bj_MAX_PLAYER_SLOTS=0 // rect bj_mapInitialPlayableArea=null player Basics_DUMMY_PLAYER=null integer array BitSet_pows integer array ClosureForGroups_tempCallbacks integer ClosureForGroups_maxCount=0 integer ClosureForGroups_iterCount=0 integer ClosureTimers_x=0 string array Colors_hexs integer Colors_decs=0 integer Colors_COLOR_WHITE_red=0 integer Colors_COLOR_WHITE_green=0 integer Colors_COLOR_WHITE_blue=0 integer Colors_COLOR_WHITE_alpha=0 integer Colors_COLOR_BLACK_red=0 integer Colors_COLOR_BLACK_green=0 integer Colors_COLOR_BLACK_blue=0 integer Colors_COLOR_BLACK_alpha=0 integer Colors_COLOR_GOLD_red=0 integer Colors_COLOR_GOLD_green=0 integer Colors_COLOR_GOLD_blue=0 integer Colors_COLOR_GOLD_alpha=0 real DummyRecycler_ANGLE_DEGREE=0. integer array DummyRecycler_angleQueues trigger UnitEntity_dmgTrig=null hashtable ErrorHandling_HT=null framehandle Framehandle_GAME_UI=null real GameTimer_currentTime=0. boolean MagicFunctions_compiletime=false rect MapBounds_playableMapRect=null rect MapBounds_boundRect=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. player array Player_players player Player_localPlayer=null group Preloader_dumg=null unit Preloader_dum=null integer array ChannelData_TimedLoop_instances integer ChannelData_TimedLoop_instanceCount=0 triggercondition ChannelData_TimedLoop_triggerCond=null hashtable Table_ht=null item Terrain_dItem=null trigger TimedLoop_timedLoopTrig=null integer TimedLoop_conditionCount=0 timer array TimerUtils_freeTimers integer TimerUtils_freeTimersCount=0 integer TimerUtils_timerData=0 integer TypeCasting_typecastdata=0 hashtable hashtable_compiletime=null hashtable hashtable_compiletime_102=null integer array ForGroupCallback_nextFree integer ForGroupCallback_firstFree=0 integer ForGroupCallback_maxIndex=0 integer array ForGroupCallback_typeId integer array CallbackSingle_nextFree integer CallbackSingle_firstFree=0 integer CallbackSingle_maxIndex=0 integer array CallbackSingle_typeId integer Callback_firstFree=0 integer array Callback_typeId integer array BackIterator_nextFree integer BackIterator_firstFree=0 integer BackIterator_maxIndex=0 integer array Iterator_nextFree integer Iterator_firstFree=0 integer Iterator_maxIndex=0 integer array Table_nextFree integer Table_firstFree=0 integer Table_maxIndex=0 integer array Table_typeId integer Comparator_firstFree=0 integer Comparator_maxIndex=0 integer array LLEntry_nextFree integer LLEntry_firstFree=0 integer LLEntry_maxIndex=0 integer array LinkedList_nextFree integer LinkedList_firstFree=0 integer LinkedList_maxIndex=0 integer array LinkedList_typeId integer array IdGenerator_nextFree integer IdGenerator_firstFree=0 integer IdGenerator_maxIndex=0 integer ChannelData_firstFree=0 integer array ChannelData_typeId integer array cb timerdialog array dia timer array CallbackSingle_t unit array u integer array result integer array LLEntry_prev integer array LinkedList_dummy integer array LinkedList_size texttag array ChannelData_tt real array ChannelData_currentAmount real array ChannelData_incAmount integer array ChannelData_TimedLoop_mode 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_ClosureForGroups=null code ref_function_init_TimerUtils=null code ref_function_init_ClosureTimers=null code ref_function_init_MapBounds=null code ref_function_init_LinkedList=null code ref_function_init_ObjectIds=null code ref_function_init_UnitIds=null code ref_function_init_Icons=null code ref_function_init_Preloader=null code ref_function_init_ObjectIdGenerator=null code ref_function_init_DummyRecycler=null code ref_function_init_Terrain=null code ref_function_init_Entity=null code ref_function_init_TimedLoop=null code ref_function_init_SpellEnergyBarrier=null code ref_function_code__Filter_ClosureForGroups=null code ref_function_UnitEntity_onDamage=null code ref_function_code__startPeriodic_GameTimer=null code ref_function_ChannelData_TimedLoop_onExpire=null code ref_function_code__start_CallbackSingle_ClosureTimers=null endglobals function Loglevel_getTag takes integer this returns string local integer temp = this if temp == 0 then return "|cffADADADtrace|r" elseif temp == 1 then return "|cff2685DCdebug|r" elseif temp == 2 then return "|cffFFCC00info|r" elseif temp == 3 then return "|cffF47E3Ewarning|r" else return "|cffFB2700error|r" endif endfunction function compileError takes string msg returns nothing endfunction function error takes string msg returns nothing local integer hash local string this local hashtable this_1 local integer parentKey local integer childKey local hashtable this_2 local integer parentKey_1 local integer childKey_1 local string msg_1 local player showTo local integer loglvl local string msg_2 local string compositeMsg local hashtable this_3 local integer parentKey_2 local integer childKey_2 local integer value local real this_4 local hashtable this_5 local integer parentKey_3 local integer childKey_3 local boolean value_1 local hashtable this_6 local integer parentKey_4 local integer childKey_4 local hashtable this_7 local integer parentKey_5 local integer childKey_5 local string msg_3 local player showTo_1 local integer loglvl_1 local string msg_4 local string compositeMsg_1 local hashtable this_8 local integer parentKey_6 local integer childKey_6 local boolean value_2 local string msg_5 local player showTo_2 local integer loglvl_2 local string msg_6 local string compositeMsg_2 local hashtable this_9 local integer parentKey_7 local integer childKey_7 local boolean value_3 local hashtable this_10 local integer parentKey_8 local integer childKey_8 local integer value_4 local real this_11 local string msg_7 local player showTo_3 local integer loglvl_3 local string msg_8 local string compositeMsg_3 if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else if not false then set this = msg set hash = StringHash(this) set this_1 = ErrorHandling_HT set parentKey = -1 set childKey = hash if HaveSavedInteger(this_1, parentKey, childKey) then set this_2 = ErrorHandling_HT set parentKey_1 = -1 set childKey_1 = hash if LoadInteger(this_2, parentKey_1, childKey_1) + 60 < GameTimer_currentTime then set msg_1 = msg + "" set showTo = Player_localPlayer set loglvl = 4 set msg_2 = msg_1 if 2 <= loglvl then set compositeMsg = Loglevel_getTag(loglvl) + " - " + msg_2 call DisplayTimedTextToPlayer(showTo, 0., 0., 45., compositeMsg) endif set this_3 = ErrorHandling_HT set parentKey_2 = -1 set childKey_2 = hash set this_4 = GameTimer_currentTime set value = R2I(this_4) call SaveInteger(this_3, parentKey_2, childKey_2, value) set this_5 = ErrorHandling_HT set parentKey_3 = -1 set childKey_3 = hash set value_1 = false call SaveBoolean(this_5, parentKey_3, childKey_3, value_1) else set this_6 = ErrorHandling_HT set parentKey_4 = -1 set childKey_4 = hash if HaveSavedBoolean(this_6, parentKey_4, childKey_4) then set this_7 = ErrorHandling_HT set parentKey_5 = -1 set childKey_5 = hash if not LoadBoolean(this_7, parentKey_5, childKey_5) then set msg_3 = "|cffFF3A29Excessive repeating errors are being omitted" set showTo_1 = Player_localPlayer set loglvl_1 = 4 set msg_4 = msg_3 if 2 <= loglvl_1 then set compositeMsg_1 = Loglevel_getTag(loglvl_1) + " - " + msg_4 call DisplayTimedTextToPlayer(showTo_1, 0., 0., 45., compositeMsg_1) endif set this_8 = ErrorHandling_HT set parentKey_6 = -1 set childKey_6 = hash set value_2 = true call SaveBoolean(this_8, parentKey_6, childKey_6, value_2) endif else set msg_5 = "|cffFF3A29Excessive repeating errors are being omitted" set showTo_2 = Player_localPlayer set loglvl_2 = 4 set msg_6 = msg_5 if 2 <= loglvl_2 then set compositeMsg_2 = Loglevel_getTag(loglvl_2) + " - " + msg_6 call DisplayTimedTextToPlayer(showTo_2, 0., 0., 45., compositeMsg_2) endif set this_9 = ErrorHandling_HT set parentKey_7 = -1 set childKey_7 = hash set value_3 = true call SaveBoolean(this_9, parentKey_7, childKey_7, value_3) endif endif else set this_10 = ErrorHandling_HT set parentKey_8 = -1 set childKey_8 = hash set this_11 = GameTimer_currentTime set value_4 = R2I(this_11) call SaveInteger(this_10, parentKey_8, childKey_8, value_4) set msg_7 = "Message: " + msg + "" set showTo_3 = Player_localPlayer set loglvl_3 = 4 set msg_8 = msg_7 if 2 <= loglvl_3 then set compositeMsg_3 = Loglevel_getTag(loglvl_3) + " - " + msg_8 call DisplayTimedTextToPlayer(showTo_3, 0., 0., 45., compositeMsg_3) endif endif endif call I2S(1 / 0) endif endfunction function initCompiletimeState_0 takes nothing returns nothing call InitHashtable() call InitHashtable() set hashtable_compiletime_102 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_102, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_102, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_102, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_102, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_102, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_102, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_102, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_102, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_102, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_102, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_102, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_102, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_102, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_102, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_102, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_102, 1, 789744696, 15) call SaveStr(hashtable_compiletime_102, 2, 0, "") call SaveStr(hashtable_compiletime_102, 2, 1804483594, "air") call SaveStr(hashtable_compiletime_102, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime_102, 2, -681966791, "ground") call SaveStr(hashtable_compiletime_102, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime_102, 2, 392811314, "item") call SaveStr(hashtable_compiletime_102, 2, 124309475, "structure") call SaveStr(hashtable_compiletime_102, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime_102, 2, -85648186, "ward") call SaveStr(hashtable_compiletime_102, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime_102, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime_102, 2, -844489484, "AM02") endfunction function destroyChannelData takes integer this returns nothing local integer this_1 = this local integer this_2 local integer this_3 local integer obj if ChannelData_TimedLoop_mode[this_1] != 1 then set this_2 = this_1 if ChannelData_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling ChannelData.stopTimedLoop") else call error("Called ChannelData.stopTimedLoop on invalid object.") endif endif set this_3 = this_2 set ChannelData_TimedLoop_mode[this_3] = 2 endif set obj = this if ChannelData_typeId[obj] == 0 then call error("Double free: object of type ChannelData") else set ChannelData_firstFree = ChannelData_firstFree + 1 set ChannelData_typeId[obj] = 0 endif endfunction function dispatch_ChannelData_SpellEnergyBarrier_ChannelData_onTimedLoop takes integer this returns nothing local integer this_1 local texttag this_2 local string text local real size local real this_3 if ChannelData_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling ChannelData.onTimedLoop") else call error("Called ChannelData.onTimedLoop on invalid object.") endif endif set this_1 = this set ChannelData_currentAmount[this_1] = ChannelData_currentAmount[this_1] + ChannelData_incAmount[this_1] set this_2 = ChannelData_tt[this_1] set this_3 = ChannelData_currentAmount[this_1] set text = R2S(this_3) set size = 15. * 0.0023 call SetTextTagText(this_2, text, size * 0.0023) endfunction function ChannelData_TimedLoop_onExpire takes nothing returns boolean local integer i = ChannelData_TimedLoop_instanceCount - 1 local integer t local integer this loop exitwhen not (i >= 0) set t = ChannelData_TimedLoop_instances[i] call dispatch_ChannelData_SpellEnergyBarrier_ChannelData_onTimedLoop(t) if ChannelData_TimedLoop_mode[t] != 0 then set ChannelData_TimedLoop_instanceCount = ChannelData_TimedLoop_instanceCount - 1 set ChannelData_TimedLoop_instances[i] = ChannelData_TimedLoop_instances[ChannelData_TimedLoop_instanceCount] if ChannelData_TimedLoop_mode[t] == 3 then set ChannelData_TimedLoop_mode[t] = 1 set this = t if ChannelData_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling ChannelData.ChannelData") else call error("Called ChannelData.ChannelData on invalid object.") endif endif call destroyChannelData(this) else set ChannelData_TimedLoop_mode[t] = 1 endif endif set i = i - 1 endloop if ChannelData_TimedLoop_instanceCount == 0 then call TriggerRemoveCondition(TimedLoop_timedLoopTrig, ChannelData_TimedLoop_triggerCond) set ChannelData_TimedLoop_triggerCond = null set TimedLoop_conditionCount = TimedLoop_conditionCount - 1 endif return false endfunction function UnitEntity_onDamage takes nothing returns nothing local unit this = GetTriggerUnit() local unit this_1 call GetUnitUserData(this) set this_1 = GetAttacker() call GetUnitUserData(this_1) endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this local integer this_1 local integer this_2 local integer prev_1 if LLEntry_firstFree == 0 then if LLEntry_maxIndex < 32768 then set LLEntry_maxIndex = LLEntry_maxIndex + 1 set this_1 = LLEntry_maxIndex 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] endif set this = this_1 set this_2 = this set prev_1 = prev set LLEntry_prev[this_2] = prev_1 return this endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this, integer elems_0 returns nothing local integer this_1 local integer elems_0_1 local integer entry if LinkedList_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling LinkedList.add") else call error("Called LinkedList.add on invalid object.") endif endif set this_1 = this set elems_0_1 = elems_0 set entry = new_LLEntry(elems_0_1, LLEntry_prev[LinkedList_dummy[this_1]], LinkedList_dummy[this_1]) set LLEntry_prev[LinkedList_dummy[this_1]] = entry set LinkedList_size[this_1] = LinkedList_size[this_1] + 1 endfunction function dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback takes integer this, unit u_1 returns nothing local integer this_1 local unit u_2 local unit object local handle this_2 local unit u_3 local unit this_3 local integer temp if ForGroupCallback_typeId[this] == 0 then if this == 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] <= 656 then set this_1 = this set u_2 = u_1 set temp = result[this_1] set object = u_2 set this_2 = object call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp, GetHandleId(this_2)) else set u_3 = u_1 set this_3 = u_3 call RemoveUnit(this_3) endif endfunction function code__Filter_ClosureForGroups takes nothing returns nothing local unit filter = GetFilterUnit() if ClosureForGroups_iterCount < ClosureForGroups_maxCount then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(ClosureForGroups_tempCallbacks[0 - 1], filter) endif set ClosureForGroups_iterCount = ClosureForGroups_iterCount + 1 endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + 0.030 endfunction function DummyRecycler_recycle takes unit u_1 returns nothing local integer smallestQueue = 0 local integer i = 1 local integer temp = 8 - 1 local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 local integer this local integer LinkedList_LinkedList_size_result local integer this_1 local integer this_2 local integer LinkedList_LinkedList_size_result_1 local integer this_3 local integer this_4 local integer LinkedList_LinkedList_size_result_2 local integer this_5 local unit this_6 local integer this_7 local integer elem local integer this_8 local integer elem_1 local unit object local handle this_9 local unit this_10 local real pos_x local real pos_y local unit receiver_6 local unit receiver_7 local unit this_11 local real x local unit this_12 local real y local real this_x local real this_y local real v_x local real v_y local unit this_13 local unit this_14 local real a_radians local real this_radians local real this_15 local unit this_16 local real scale local unit this_17 local integer col_red local integer col_green local integer col_blue local integer col_alpha local unit this_18 local player p local boolean changeColor local integer temp_1 local unit temp_2 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 local integer tuple_temp_8 local integer tuple_temp_9 local integer tuple_temp_10 local integer tuple_temp_11 loop exitwhen i > temp set this = DummyRecycler_angleQueues[smallestQueue] if LinkedList_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif set this_1 = this set LinkedList_LinkedList_size_result = LinkedList_size[this_1] set temp_1 = LinkedList_LinkedList_size_result set this_2 = DummyRecycler_angleQueues[i] if LinkedList_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif set this_3 = this_2 set LinkedList_LinkedList_size_result_1 = LinkedList_size[this_3] if temp_1 > LinkedList_LinkedList_size_result_1 then set smallestQueue = i endif set i = i + 1 endloop set this_4 = DummyRecycler_angleQueues[smallestQueue] if LinkedList_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif set this_5 = this_4 set LinkedList_LinkedList_size_result_2 = LinkedList_size[this_5] if LinkedList_LinkedList_size_result_2 >= 6 then set this_6 = u_1 call RemoveUnit(this_6) else set this_7 = DummyRecycler_angleQueues[smallestQueue] set object = u_1 set this_9 = object set elem = GetHandleId(this_9) if LinkedList_typeId[this_7] == 0 then if this_7 == 0 then call error("Nullpointer exception when calling LinkedList.enqueue") else call error("Called LinkedList.enqueue on invalid object.") endif endif set this_8 = this_7 set elem_1 = elem call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_8, elem_1) set receiver = u_1 set this_10 = receiver set tuple_temp = MapBounds_boundMax_x set tuple_temp_1 = MapBounds_boundMax_y set this_x = tuple_temp set this_y = tuple_temp_1 set tuple_temp_2 = 16. set tuple_temp_3 = 16. set v_x = tuple_temp_2 set v_y = tuple_temp_3 set tuple_temp_4 = this_x - v_x set tuple_temp_5 = this_y - v_y set pos_x = tuple_temp_4 set pos_y = tuple_temp_5 set receiver_6 = this_10 set this_11 = receiver_6 set x = pos_x call SetUnitX(this_11, x) set receiver_7 = receiver_6 set this_12 = receiver_7 set y = pos_y call SetUnitY(this_12, y) set receiver_1 = receiver set this_13 = receiver_1 call PauseUnit(this_13, true) set receiver_2 = receiver_1 set this_14 = receiver_2 set this_15 = smallestQueue * DummyRecycler_ANGLE_DEGREE set tuple_temp_6 = this_15 * 0.017453293 set a_radians = tuple_temp_6 set temp_2 = this_14 set tuple_temp_7 = a_radians set this_radians = tuple_temp_7 call SetUnitFacing(temp_2, this_radians * 57.295779513) set receiver_3 = receiver_2 set this_16 = receiver_3 set scale = 1. call SetUnitScale(this_16, scale, scale, scale) set receiver_4 = receiver_3 set this_17 = receiver_4 set tuple_temp_8 = Colors_COLOR_WHITE_red set tuple_temp_9 = Colors_COLOR_WHITE_green set tuple_temp_10 = Colors_COLOR_WHITE_blue set tuple_temp_11 = Colors_COLOR_WHITE_alpha set col_red = tuple_temp_8 set col_green = tuple_temp_9 set col_blue = tuple_temp_10 set col_alpha = tuple_temp_11 call SetUnitVertexColor(this_17, col_red, col_green, col_blue, col_alpha) set receiver_5 = receiver_4 set this_18 = receiver_5 set p = Basics_DUMMY_PLAYER set changeColor = true call SetUnitOwner(this_18, p, changeColor) endif endfunction function dispatch_Callback_destroyCallback takes integer this returns nothing local integer this_1 local integer obj if Callback_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Callback.Callback") else call error("Called Callback.Callback on invalid object.") endif endif set this_1 = this set obj = this_1 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 call_doAfter_ClosureTimers takes integer this returns nothing local timerdialog this_1 call dispatch_Callback_destroyCallback(cb[this]) set this_1 = dia[this] call DestroyTimerDialog(this_1) endfunction function dispatch_ForGroupCallback_destroyForGroupCallback takes integer this returns nothing local integer this_1 local integer obj if ForGroupCallback_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling ForGroupCallback.ForGroupCallback") else call error("Called ForGroupCallback.ForGroupCallback on invalid object.") endif endif set this_1 = this set obj = this_1 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 group_forEachFrom takes group this, integer cb_1 returns nothing local group from = this local unit u_1 local group this_1 local group this_2 local unit iterUnit loop set this_1 = from exitwhen not (FirstOfGroup(this_1) != null) set this_2 = from set iterUnit = FirstOfGroup(this_2) call GroupRemoveUnit(this_2, iterUnit) set u_1 = iterUnit call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(cb_1, u_1) endloop call dispatch_ForGroupCallback_destroyForGroupCallback(cb_1) endfunction function finishPreload takes nothing returns nothing local unit this = Preloader_dum local integer clVar local group temp local integer this_1 local group this_2 call RemoveUnit(this) set temp = Preloader_dumg 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] = 657 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] = 657 endif set clVar = this_1 call group_forEachFrom(temp, clVar) set this_2 = Preloader_dumg call DestroyGroup(this_2) set Preloader_dumg = null endfunction function testFail takes string msg returns nothing endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call takes integer this returns nothing local integer this_1 local integer expected local integer this_2 local integer this_3 local integer this_4 local string temp if CallbackSingle_typeId[this] == 0 then if this == 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] <= 639 then if CallbackSingle_typeId[this] <= 638 then if CallbackSingle_typeId[this] <= 637 then call call_doAfter_ClosureTimers(this) else set ClosureTimers_x = ClosureTimers_x + 50 endif else set ClosureTimers_x = ClosureTimers_x * 2 endif elseif CallbackSingle_typeId[this] <= 641 then if CallbackSingle_typeId[this] <= 640 then set ClosureTimers_x = ClosureTimers_x / 2 set this_1 = ClosureTimers_x set expected = 250 if this_1 != expected then set this_2 = expected set temp = "Expected <" + I2S(this_2) + ">, Actual <" set this_3 = this_1 call testFail(temp + I2S(this_3) + ">") endif else set this_4 = this call DummyRecycler_recycle(u[this_4]) endif else call finishPreload() endif endfunction function dispatch_Table_Table_Table_loadInt takes integer this, integer parentKey returns integer local integer Table_Table_loadInt_result local integer this_1 local integer parentKey_1 local hashtable this_2 local integer parentKey_2 local integer childKey if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.loadInt") else call error("Called Table.loadInt on invalid object.") endif endif set this_1 = this set parentKey_1 = parentKey set this_2 = Table_ht set parentKey_2 = this_1 set childKey = parentKey_1 set Table_Table_loadInt_result = LoadInteger(this_2, parentKey_2, childKey) return Table_Table_loadInt_result endfunction function dispatch_Table_Table_Table_saveInt takes integer this, integer parentKey, integer value returns nothing local integer this_1 local integer parentKey_1 local integer value_1 local hashtable this_2 local integer parentKey_2 local integer childKey local integer value_2 if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveInt") else call error("Called Table.saveInt on invalid object.") endif endif set this_1 = this set parentKey_1 = parentKey set value_1 = value set this_2 = Table_ht set parentKey_2 = this_1 set childKey = parentKey_1 set value_2 = value_1 call SaveInteger(this_2, parentKey_2, childKey, value_2) endfunction function timer_release takes timer this returns nothing local timer this_1 local timer this_2 local timer this_3 local integer data local timer this_4 local timer this_5 local integer temp local integer temp_1 if this == null then call error("Trying to release a null timer") return endif set this_1 = this set temp = TimerUtils_timerData set this_2 = this_1 if dispatch_Table_Table_Table_loadInt(temp, GetHandleId(this_2)) == 679645218 then call error("ReleaseTimer: Double free!") return endif set this_3 = this set data = 679645218 set temp_1 = TimerUtils_timerData set this_4 = this_3 call dispatch_Table_Table_Table_saveInt(temp_1, GetHandleId(this_4), data) set this_5 = this call PauseTimer(this_5) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 endfunction function dispatch_CallbackSingle_destroyCallbackSingle takes integer this returns nothing local integer this_1 local integer this_2 local integer obj if CallbackSingle_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling CallbackSingle.CallbackSingle") else call error("Called CallbackSingle.CallbackSingle on invalid object.") endif endif set this_1 = this set this_2 = this_1 call timer_release(CallbackSingle_t[this_2]) set obj = this_1 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 CallbackSingle_staticCallback takes nothing returns nothing local timer t = GetExpiredTimer() local timer this = t local integer temp = TimerUtils_timerData local timer this_1 = this local integer cb_1 = dispatch_Table_Table_Table_loadInt(temp, GetHandleId(this_1)) 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_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_Basics takes nothing returns boolean set Basics_DUMMY_PLAYER = Player_players[PLAYER_NEUTRAL_PASSIVE] return true endfunction function initPows takes nothing returns nothing local integer allPows local integer i local integer temp local integer i_1 local integer temp_1 local integer this local integer other local integer this_1 local integer other_1 set BitSet_pows[0] = 1 set allPows = 1 set i = 1 set temp = 32 - 1 loop exitwhen i > temp set BitSet_pows[i] = BitSet_pows[i - 1] * 2 set this = allPows set other = BitSet_pows[i] set allPows = BlzBitOr(this, other) set i = i + 1 endloop set i_1 = 0 set temp_1 = 32 - 1 loop exitwhen i_1 > temp_1 set this_1 = allPows set other_1 = BitSet_pows[i_1] call BlzBitXor(this_1, other_1) set i_1 = i_1 + 1 endloop endfunction function init_BitSet takes nothing returns boolean call initPows() return true endfunction function init_ClosureForGroups takes nothing returns boolean call CreateGroup() set ClosureForGroups_maxCount = 2147483647 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 new_Table takes nothing returns integer local integer this 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] = 731 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] = 731 endif set this = this_1 return this endfunction function init_Colors takes nothing returns boolean local integer this_red local integer this_green local integer this_blue local integer this_alpha local integer number local integer firstpart local integer secondpart local integer number_1 local integer firstpart_1 local integer secondpart_1 local integer number_2 local integer firstpart_2 local integer number_3 local integer this_red_1 local integer this_green_1 local integer this_blue_1 local integer this_alpha_1 local integer number_4 local integer firstpart_3 local integer secondpart_2 local integer number_5 local integer firstpart_4 local integer secondpart_3 local integer number_6 local integer firstpart_5 local integer number_7 local integer this_red_2 local integer this_green_2 local integer this_blue_2 local integer this_alpha_2 local integer number_8 local integer firstpart_6 local integer secondpart_4 local integer number_9 local integer firstpart_7 local integer secondpart_5 local integer number_10 local integer firstpart_8 local integer number_11 local integer i local string this local string temp local string temp_1 local string temp_2 local integer temp_3 local integer tuple_temp local integer tuple_temp_1 local integer tuple_temp_2 local integer tuple_temp_3 local integer tuple_temp_4 local integer tuple_temp_5 local integer tuple_temp_6 local integer tuple_temp_7 local integer tuple_temp_8 local integer tuple_temp_9 local integer tuple_temp_10 local integer tuple_temp_11 local integer tuple_temp_12 local integer tuple_temp_13 local integer tuple_temp_14 local integer tuple_temp_15 local integer tuple_temp_16 local integer tuple_temp_17 local integer tuple_temp_18 local integer tuple_temp_19 local integer tuple_temp_20 local integer tuple_temp_21 local integer tuple_temp_22 local integer tuple_temp_23 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() set tuple_temp = 255 set tuple_temp_1 = 255 set tuple_temp_2 = 255 set tuple_temp_3 = 255 set Colors_COLOR_WHITE_red = tuple_temp set Colors_COLOR_WHITE_green = tuple_temp_1 set Colors_COLOR_WHITE_blue = tuple_temp_2 set Colors_COLOR_WHITE_alpha = tuple_temp_3 set tuple_temp_4 = 0 set tuple_temp_5 = 0 set tuple_temp_6 = 0 set tuple_temp_7 = 0 set Colors_COLOR_BLACK_red = tuple_temp_4 set Colors_COLOR_BLACK_green = tuple_temp_5 set Colors_COLOR_BLACK_blue = tuple_temp_6 set Colors_COLOR_BLACK_alpha = tuple_temp_7 set tuple_temp_8 = 255 set tuple_temp_9 = 204 set tuple_temp_10 = 0 set tuple_temp_11 = 255 set Colors_COLOR_GOLD_red = tuple_temp_8 set Colors_COLOR_GOLD_green = tuple_temp_9 set Colors_COLOR_GOLD_blue = tuple_temp_10 set Colors_COLOR_GOLD_alpha = tuple_temp_11 set tuple_temp_12 = Colors_COLOR_WHITE_red set tuple_temp_13 = Colors_COLOR_WHITE_green set tuple_temp_14 = Colors_COLOR_WHITE_blue set tuple_temp_15 = Colors_COLOR_WHITE_alpha set this_red = tuple_temp_12 set this_green = tuple_temp_13 set this_blue = tuple_temp_14 set this_alpha = tuple_temp_15 set number = this_alpha set firstpart = number / 16 set secondpart = number - firstpart * 16 set temp = "|c" + Colors_hexs[firstpart] + Colors_hexs[secondpart] set number_1 = this_red set firstpart_1 = number_1 / 16 set secondpart_1 = number_1 - firstpart_1 * 16 set number_2 = this_green set firstpart_2 = number_2 / 16 set number_3 = this_blue set tuple_temp_16 = Colors_COLOR_BLACK_red set tuple_temp_17 = Colors_COLOR_BLACK_green set tuple_temp_18 = Colors_COLOR_BLACK_blue set tuple_temp_19 = Colors_COLOR_BLACK_alpha set this_red_1 = tuple_temp_16 set this_green_1 = tuple_temp_17 set this_blue_1 = tuple_temp_18 set this_alpha_1 = tuple_temp_19 set number_4 = this_alpha_1 set firstpart_3 = number_4 / 16 set secondpart_2 = number_4 - firstpart_3 * 16 set temp_1 = "|c" + Colors_hexs[firstpart_3] + Colors_hexs[secondpart_2] set number_5 = this_red_1 set firstpart_4 = number_5 / 16 set secondpart_3 = number_5 - firstpart_4 * 16 set number_6 = this_green_1 set firstpart_5 = number_6 / 16 set number_7 = this_blue_1 set tuple_temp_20 = Colors_COLOR_GOLD_red set tuple_temp_21 = Colors_COLOR_GOLD_green set tuple_temp_22 = Colors_COLOR_GOLD_blue set tuple_temp_23 = Colors_COLOR_GOLD_alpha set this_red_2 = tuple_temp_20 set this_green_2 = tuple_temp_21 set this_blue_2 = tuple_temp_22 set this_alpha_2 = tuple_temp_23 set number_8 = this_alpha_2 set firstpart_6 = number_8 / 16 set secondpart_4 = number_8 - firstpart_6 * 16 set temp_2 = "|c" + Colors_hexs[firstpart_6] + Colors_hexs[secondpart_4] set number_9 = this_red_2 set firstpart_7 = number_9 / 16 set secondpart_5 = number_9 - firstpart_7 * 16 set number_10 = this_green_2 set firstpart_8 = number_10 / 16 set number_11 = this_blue_2 set i = 0 loop exitwhen i > 15 set temp_3 = Colors_decs set this = Colors_hexs[i] call dispatch_Table_Table_Table_saveInt(temp_3, StringHash(this), i) set i = i + 1 endloop return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function createDummy takes real pos_x, real pos_y, real facing_radians returns unit local player p = Basics_DUMMY_PLAYER local integer unitId = 2016423985 local real tuple_temp = pos_x local real tuple_temp_1 = pos_y local real pos_x_1 = tuple_temp local real pos_y_1 = tuple_temp_1 local real tuple_temp_2 = facing_radians local real facing_radians_1 = tuple_temp_2 local player temp = p local integer temp_1 = unitId local real temp_2 = pos_x_1 local real temp_3 = pos_y_1 local real tuple_temp_3 = facing_radians_1 local real this_radians = tuple_temp_3 local unit u_1 = CreateUnit(temp, temp_1, temp_2, temp_3, this_radians * 57.295779513) local unit receiver = u_1 local unit this = receiver local integer abil = 1097691750 local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 local unit this_1 local integer abil_1 local unit this_2 local integer abil_2 local unit this_3 local integer abil_3 local unit this_4 local real pos_x_2 local real pos_y_2 local unit receiver_6 local unit receiver_7 local unit this_5 local real x local unit this_6 local real y local unit this_7 local real a_radians local real this_radians_1 local unit temp_4 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 call UnitAddAbility(this, abil) set receiver_1 = receiver set this_1 = receiver_1 set abil_1 = 1097691750 call UnitRemoveAbility(this_1, abil_1) set receiver_2 = receiver_1 set this_2 = receiver_2 set abil_2 = 1095577649 call UnitAddAbility(this_2, abil_2) set receiver_3 = receiver_2 set this_3 = receiver_3 set abil_3 = 1095577649 call UnitRemoveAbility(this_3, abil_3) set receiver_4 = receiver_3 set this_4 = receiver_4 set tuple_temp_4 = pos_x set tuple_temp_5 = pos_y set pos_x_2 = tuple_temp_4 set pos_y_2 = tuple_temp_5 set receiver_6 = this_4 set this_5 = receiver_6 set x = pos_x_2 call SetUnitX(this_5, x) set receiver_7 = receiver_6 set this_6 = receiver_7 set y = pos_y_2 call SetUnitY(this_6, y) set receiver_5 = receiver_4 set this_7 = receiver_5 set tuple_temp_6 = facing_radians set a_radians = tuple_temp_6 set temp_4 = this_7 set tuple_temp_7 = a_radians set this_radians_1 = tuple_temp_7 call SetUnitFacing(temp_4, this_radians_1 * 57.295779513) return u_1 endfunction function new_LinkedList takes nothing returns integer local integer this local integer this_1 local integer this_2 local integer this_3 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] = 710 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] = 710 endif set this = this_1 set this_2 = this set this_3 = this_2 set LinkedList_dummy[this_3] = new_LLEntry(0, 0, 0) set LinkedList_size[this_3] = 0 set LLEntry_prev[LinkedList_dummy[this_2]] = LinkedList_dummy[this_2] return this 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 local real r local real this local real this_x local real this_y local real v_x local real v_y local integer this_1 local integer elem local integer this_2 local integer elem_1 local unit object local handle this_3 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 set DummyRecycler_ANGLE_DEGREE = 360 * 1. / 8 set r = 1. set this = r * 1000. call R2I(this) set i = 0 set temp = 8 - 1 loop exitwhen i > temp set DummyRecycler_angleQueues[i] = new_LinkedList() set tuple_temp = i * DummyRecycler_ANGLE_DEGREE set facing_radians = tuple_temp set j = 0 set temp_1 = 6 - 1 loop exitwhen j > temp_1 set tuple_temp_1 = MapBounds_boundMax_x set tuple_temp_2 = MapBounds_boundMax_y set this_x = tuple_temp_1 set this_y = tuple_temp_2 set tuple_temp_3 = 16. set tuple_temp_4 = 16. set v_x = tuple_temp_3 set v_y = tuple_temp_4 set dummy = createDummy(this_x - v_x, this_y - v_y, facing_radians) set this_1 = DummyRecycler_angleQueues[i] set object = dummy set this_3 = object set elem = GetHandleId(this_3) 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 set this_2 = this_1 set elem_1 = elem call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_2, elem_1) set j = j + 1 endloop set i = i + 1 endloop return true endfunction function init_Entity takes nothing returns boolean local integer this local integer this_1 local trigger this_2 local code actionFunc if Iterator_firstFree == 0 then if Iterator_maxIndex < 32768 then set Iterator_maxIndex = Iterator_maxIndex + 1 set this = Iterator_maxIndex else call error("Out of memory: Could not create Iterator.") set this = 0 endif else set Iterator_firstFree = Iterator_firstFree - 1 set this = Iterator_nextFree[Iterator_firstFree] endif if BackIterator_firstFree == 0 then if BackIterator_maxIndex < 32768 then set BackIterator_maxIndex = BackIterator_maxIndex + 1 set this_1 = BackIterator_maxIndex else call error("Out of memory: Could not create BackIterator.") set this_1 = 0 endif else set BackIterator_firstFree = BackIterator_firstFree - 1 set this_1 = BackIterator_nextFree[BackIterator_firstFree] endif set UnitEntity_dmgTrig = CreateTrigger() set this_2 = UnitEntity_dmgTrig set actionFunc = ref_function_UnitEntity_onDamage call TriggerAddAction(this_2, actionFunc) return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_HT = hashtable_compiletime return true endfunction function new_HashMap takes nothing returns integer local integer this 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] = 732 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] = 732 endif set this = this_1 return this 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 local string this = name local integer this_1 if StringLength(this) > 560 then set this_1 = 560 call error("Trying to address frame with exceeding maximum frame name length (" + I2S(this_1) + ") for: " + name) return false endif return true endfunction function init_Framehandle takes nothing returns boolean local framehandle receiver local string typeName local string name local framehandle owner local string inherits local integer createContext local framehandle this local real width local real height set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) call BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0) set typeName = "FRAME" set name = "SetMousePositionCage" set owner = Framehandle_GAME_UI set inherits = null set createContext = 0 call verifyFrameNameLength(name) set receiver = BlzCreateFrameByType(typeName, name, owner, inherits, createContext) set this = receiver set width = 0.0001 set height = 0.0001 call BlzFrameSetSize(this, width, height) return true endfunction function init_GameTimer takes nothing returns boolean local timer receiver = CreateTimer() local timer this = receiver local real time = 100000. local code timerCallBack = null local timer this_1 local real time_1 local code timerCallBack_1 call TimerStart(this, time, false, timerCallBack) set this_1 = CreateTimer() set time_1 = 0.030 set timerCallBack_1 = ref_function_code__startPeriodic_GameTimer call TimerStart(this_1, time_1, true, timerCallBack_1) return true endfunction function init_Group takes nothing returns boolean call CreateGroup() return true endfunction function init_HashList takes nothing returns boolean return true endfunction function init_Icons takes nothing returns boolean return true endfunction function init_Integer takes nothing returns boolean return true endfunction function init_Lightning takes nothing returns boolean return true endfunction function init_LinkedList takes nothing returns boolean local real r local real this if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 else call error("Out of memory: Could not create Comparator_LinkedList.") endif else set Comparator_firstFree = Comparator_firstFree - 1 endif if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 else call error("Out of memory: Could not create Comparator_LinkedList.") endif else set Comparator_firstFree = Comparator_firstFree - 1 endif set r = 0. set this = r * 1000. call R2I(this) return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true endfunction function initMapBounds takes nothing returns nothing local rect cond_result local region receiver local rect cond_result_1 local region receiver_1 local region this local rect rct local region this_1 local rect rct_1 local rect this_2 local rect this_3 local rect this_4 local rect this_5 local rect this_6 local rect this_7 local rect this_8 local rect this_9 local real this_x local real this_y local real v_x local real v_y local real this_x_1 local real this_y_1 local real v_x_1 local real v_y_1 local real temp local real temp_1 local real temp_2 local real temp_3 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 local real tuple_temp_8 local real tuple_temp_9 local real tuple_temp_10 local real tuple_temp_11 local real tuple_temp_12 local real tuple_temp_13 local real tuple_temp_14 local real tuple_temp_15 if MagicFunctions_compiletime then set cond_result = Rect(-1024., -1024., 1024., 1024.) else set cond_result = bj_mapInitialPlayableArea endif set MapBounds_playableMapRect = cond_result set receiver = CreateRegion() set this = receiver set rct = MapBounds_playableMapRect call RegionAddRect(this, rct) if MagicFunctions_compiletime then set cond_result_1 = Rect(-1536., -1536., 1536., 1536.) else set cond_result_1 = GetWorldBounds() endif set MapBounds_boundRect = cond_result_1 set receiver_1 = CreateRegion() set this_1 = receiver_1 set rct_1 = MapBounds_boundRect call RegionAddRect(this_1, rct_1) set this_2 = MapBounds_playableMapRect set temp = GetRectMinX(this_2) set this_3 = MapBounds_playableMapRect set tuple_temp = temp set tuple_temp_1 = GetRectMinY(this_3) set MapBounds_playableMin_x = tuple_temp set MapBounds_playableMin_y = tuple_temp_1 set this_4 = MapBounds_playableMapRect set temp_1 = GetRectMaxX(this_4) set this_5 = MapBounds_playableMapRect set tuple_temp_2 = temp_1 set tuple_temp_3 = GetRectMaxY(this_5) set MapBounds_playableMax_x = tuple_temp_2 set MapBounds_playableMax_y = tuple_temp_3 set this_6 = MapBounds_boundRect set temp_2 = GetRectMinX(this_6) set this_7 = MapBounds_boundRect set tuple_temp_4 = temp_2 set tuple_temp_5 = GetRectMinY(this_7) set MapBounds_boundMin_x = tuple_temp_4 set MapBounds_boundMin_y = tuple_temp_5 set this_8 = MapBounds_boundRect set temp_3 = GetRectMaxX(this_8) set this_9 = MapBounds_boundRect set tuple_temp_6 = temp_3 set tuple_temp_7 = GetRectMaxY(this_9) set MapBounds_boundMax_x = tuple_temp_6 set MapBounds_boundMax_y = tuple_temp_7 set tuple_temp_8 = MapBounds_playableMin_x set tuple_temp_9 = MapBounds_playableMin_y set this_x = tuple_temp_8 set this_y = tuple_temp_9 set tuple_temp_10 = MapBounds_playableMax_x set tuple_temp_11 = MapBounds_playableMax_y set v_x = tuple_temp_10 set v_y = tuple_temp_11 set tuple_temp_12 = MapBounds_boundMin_x set tuple_temp_13 = MapBounds_boundMin_y set this_x_1 = tuple_temp_12 set this_y_1 = tuple_temp_13 set tuple_temp_14 = MapBounds_boundMax_x set tuple_temp_15 = MapBounds_boundMax_y set v_x_1 = tuple_temp_14 set v_y_1 = tuple_temp_15 endfunction function init_MapBounds takes nothing returns boolean call initMapBounds() return true endfunction function init_Maths takes nothing returns boolean return true endfunction function init_Matrices takes nothing returns boolean return true endfunction function init_ObjectIdGenerator takes nothing returns boolean local integer this local integer this_1 local integer this_2 local integer this_3 local integer this_4 local integer this_5 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this = IdGenerator_nextFree[IdGenerator_firstFree] endif 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 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_2 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_2 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_2 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_3 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_3 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_3 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_4 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_4 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_4 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_5 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_5 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_5 = IdGenerator_nextFree[IdGenerator_firstFree] endif return true endfunction function init_ObjectIds takes nothing returns boolean return true endfunction function init_Player takes nothing returns boolean local integer i local integer temp set Player_localPlayer = GetLocalPlayer() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set Player_players[i] = Player(i) set i = i + 1 endloop return true endfunction function init_Playercolor takes nothing returns boolean call ConvertPlayerColor(24) call ConvertPlayerColor(25) call ConvertPlayerColor(26) call ConvertPlayerColor(27) return true endfunction function CallbackSingle_start takes integer this, timer whichTimer, real time returns nothing local timer receiver = whichTimer local timer this_1 = receiver local integer data = this local integer temp = TimerUtils_timerData local timer this_2 = this_1 local timer receiver_1 local timer this_3 local real time_1 local code timerCallBack call dispatch_Table_Table_Table_saveInt(temp, GetHandleId(this_2), data) set receiver_1 = receiver set this_3 = receiver_1 set time_1 = time set timerCallBack = ref_function_code__start_CallbackSingle_ClosureTimers call TimerStart(this_3, time_1, false, timerCallBack) set CallbackSingle_t[this] = receiver_1 endfunction function getTimer takes nothing returns timer local timer receiver local timer this local integer data local timer this_1 local timer this_2 local integer data_1 local timer this_3 local integer temp local integer temp_1 if TimerUtils_freeTimersCount > 0 then set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount - 1 set this = TimerUtils_freeTimers[TimerUtils_freeTimersCount] set data = 0 set temp = TimerUtils_timerData set this_1 = this call dispatch_Table_Table_Table_saveInt(temp, GetHandleId(this_1), data) return TimerUtils_freeTimers[TimerUtils_freeTimersCount] else set receiver = CreateTimer() set this_2 = receiver set data_1 = 0 set temp_1 = TimerUtils_timerData set this_3 = this_2 call dispatch_Table_Table_Table_saveInt(temp_1, GetHandleId(this_3), data_1) return receiver endif endfunction function init_Preloader takes nothing returns boolean local integer clVar local player p local integer unitId local real pos_x local real pos_y local real facing_radians local real this_radians local unit this local boolean flag local integer this_1 local integer cb_1 local real timeToWait local integer cb_2 local timer this_2 local real timeToWait_1 local integer cb_3 local integer this_3 local timer whichTimer local real time local player temp local integer temp_1 local real temp_2 local real temp_3 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 set Preloader_dumg = CreateGroup() set p = Basics_DUMMY_PLAYER set unitId = 1970497636 set tuple_temp = MapBounds_playableMin_x set tuple_temp_1 = MapBounds_playableMin_y set pos_x = tuple_temp set pos_y = tuple_temp_1 set tuple_temp_2 = 0. set facing_radians = tuple_temp_2 set temp = p set temp_1 = unitId set temp_2 = pos_x set temp_3 = pos_y set tuple_temp_3 = facing_radians set this_radians = tuple_temp_3 set Preloader_dum = CreateUnit(temp, temp_1, temp_2, temp_3, this_radians * 57.295779513) set this = Preloader_dum set flag = true call SetUnitInvulnerable(this, flag) if Preloader_dum == null then call error("DUMMY_UNITID not added correctly to the map.") endif if true then 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] = 642 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] = 642 endif set clVar = this_1 set cb_1 = clVar set timeToWait = 0. set cb_2 = cb_1 set this_2 = getTimer() set timeToWait_1 = timeToWait set cb_3 = cb_2 set this_3 = cb_3 set whichTimer = this_2 set time = timeToWait_1 if CallbackSingle_typeId[this_3] == 0 then if this_3 == 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_3, whichTimer, time) endif 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_SpellEnergyBarrier takes nothing returns boolean set ChannelData_TimedLoop_triggerCond = null call Condition(ref_function_ChannelData_TimedLoop_onExpire) return true endfunction function init_String takes nothing returns boolean local string this = "0123456789" local string this_1 call StringLength(this) set this_1 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" call StringLength(this_1) return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_102 return true endfunction function init_TargetsAllowed takes nothing returns boolean return true endfunction function init_Terrain takes nothing returns boolean call Location(0., 0.) set Terrain_dItem = null call Rect(0., 0., 128., 128.) set Terrain_dItem = CreateItem(2003790951, 0., 0.) call SetItemVisible(Terrain_dItem, false) return true endfunction function init_TimedLoop takes nothing returns boolean call CreateTimer() set TimedLoop_timedLoopTrig = CreateTrigger() set TimedLoop_conditionCount = 0 return true endfunction function init_TimerUtils takes nothing returns boolean set TimerUtils_timerData = new_Table() call new_HashMap() return true endfunction function init_TypeCasting takes nothing returns boolean local integer this local integer parentKey local string value local integer this_1 local integer parentKey_1 local string value_1 local hashtable this_2 local integer parentKey_2 local integer childKey local string value_2 set TypeCasting_typecastdata = new_Table() set this = TypeCasting_typecastdata set parentKey = 0 set value = "" if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveString") else call error("Called Table.saveString on invalid object.") endif endif set this_1 = this set parentKey_1 = parentKey set value_1 = value set this_2 = Table_ht set parentKey_2 = this_1 set childKey = parentKey_1 set value_2 = value_1 call SaveStr(this_2, parentKey_2, childKey, value_2) return true endfunction function init_UnitIds takes nothing returns boolean return true endfunction function init_Vectors takes nothing returns boolean call Location(0., 0.) return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function initGlobals takes nothing returns nothing set ref_function_init_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_ClosureForGroups = function init_ClosureForGroups set ref_function_init_TimerUtils = function init_TimerUtils set ref_function_init_ClosureTimers = function init_ClosureTimers set ref_function_init_MapBounds = function init_MapBounds set ref_function_init_LinkedList = function init_LinkedList set ref_function_init_ObjectIds = function init_ObjectIds set ref_function_init_UnitIds = function init_UnitIds set ref_function_init_Icons = function init_Icons set ref_function_init_Preloader = function init_Preloader set ref_function_init_ObjectIdGenerator = function init_ObjectIdGenerator set ref_function_init_DummyRecycler = function init_DummyRecycler set ref_function_init_Terrain = function init_Terrain set ref_function_init_Entity = function init_Entity set ref_function_init_TimedLoop = function init_TimedLoop set ref_function_init_SpellEnergyBarrier = function init_SpellEnergyBarrier set ref_function_code__Filter_ClosureForGroups = function code__Filter_ClosureForGroups set ref_function_UnitEntity_onDamage = function UnitEntity_onDamage set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer set ref_function_ChannelData_TimedLoop_onExpire = function ChannelData_TimedLoop_onExpire set ref_function_code__start_CallbackSingle_ClosureTimers = function code__start_CallbackSingle_ClosureTimers endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call ExecuteFunc("initCompiletimeState_0") set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_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_ClosureForGroups)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureForGroups.") 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_MapBounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MapBounds.") 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_UnitIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitIds.") 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_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_DummyRecycler)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DummyRecycler.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Terrain)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Terrain.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Entity)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Entity.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TimedLoop)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TimedLoop.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SpellEnergyBarrier)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SpellEnergyBarrier.") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function config takes nothing returns nothing endfunction