// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals // integer PLAYER_NEUTRAL_PASSIVE=0 // originframetype ORIGIN_FRAME_GAME_UI=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_iterCount=0 integer ClosureTimers_x=0 string array Colors_hexs integer Colors_decs=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_89=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 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 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 real real_asAngleDegrees_return_radians=0. real vec2_op_minus_return_x=0. real vec2_op_minus_return_y=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_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 if this == 0 then return "|cffADADADtrace|r" elseif this == 1 then return "|cff2685DCdebug|r" elseif this == 2 then return "|cffFFCC00info|r" elseif this == 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, integer parentKey, integer childKey returns boolean return HaveSavedBoolean(this, parentKey, childKey) endfunction function hashtable_hasInt takes hashtable this, integer parentKey, integer childKey returns boolean return HaveSavedInteger(this, parentKey, childKey) endfunction function hashtable_loadBoolean takes hashtable this, integer parentKey, integer childKey returns boolean return LoadBoolean(this, parentKey, childKey) endfunction function hashtable_loadInt takes hashtable this, integer parentKey, integer childKey returns integer return LoadInteger(this, parentKey, childKey) endfunction function hashtable_saveBoolean takes hashtable this, integer parentKey, integer childKey, boolean value returns nothing call SaveBoolean(this, parentKey, childKey, value) endfunction function hashtable_saveInt takes hashtable this, integer parentKey, integer childKey, integer value returns nothing call SaveInteger(this, parentKey, childKey, value) endfunction function real_toInt takes real this returns integer return R2I(this) endfunction function string_getHash takes string this returns integer return StringHash(this) 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 call InitHashtable() call InitHashtable() set hashtable_compiletime_89 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_89, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_89, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_89, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_89, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_89, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_89, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_89, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_89, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_89, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_89, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_89, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_89, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_89, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_89, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_89, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_89, 1, 789744696, 15) call SaveStr(hashtable_compiletime_89, 2, 0, "") call SaveStr(hashtable_compiletime_89, 2, 1804483594, "air") call SaveStr(hashtable_compiletime_89, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime_89, 2, -681966791, "ground") call SaveStr(hashtable_compiletime_89, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime_89, 2, 392811314, "item") call SaveStr(hashtable_compiletime_89, 2, 124309475, "structure") call SaveStr(hashtable_compiletime_89, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime_89, 2, -85648186, "ward") call SaveStr(hashtable_compiletime_89, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime_89, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime_89, 2, -844489484, "AM02") endfunction function initCompiletimeState takes nothing returns nothing call ExecuteFunc("initCompiletimeState_0") endfunction function real_toString takes real this returns string return R2S(this) endfunction function texttag_setText takes texttag this, string text, real size returns nothing call SetTextTagText(this, text, size * 0.0023) endfunction function ChannelData_onTimedLoop takes integer this returns nothing set ChannelData_currentAmount[this] = ChannelData_currentAmount[this] + ChannelData_incAmount[this] call texttag_setText(ChannelData_tt[this], real_toString(ChannelData_currentAmount[this]), 0.0345) endfunction function dispatch_ChannelData_SpellEnergyBarrier_ChannelData_onTimedLoop takes integer this returns nothing 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 call ChannelData_onTimedLoop(this) endfunction function ChannelData_TimedLoop_stopTimedLoop takes integer this returns nothing set ChannelData_TimedLoop_mode[this] = 2 endfunction function dispatch_ChannelData_SpellEnergyBarrier_ChannelData_TimedLoop_stopTimedLoop takes integer this returns nothing if ChannelData_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling ChannelData.stopTimedLoop") else call error("Called ChannelData.stopTimedLoop on invalid object.") endif endif call ChannelData_TimedLoop_stopTimedLoop(this) endfunction function ChannelData_onDestroy takes integer this returns nothing if ChannelData_TimedLoop_mode[this] != 1 then call dispatch_ChannelData_SpellEnergyBarrier_ChannelData_TimedLoop_stopTimedLoop(this) endif endfunction function dealloc_ChannelData takes integer obj returns nothing 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 destroyChannelData takes integer this returns nothing call ChannelData_onDestroy(this) call dealloc_ChannelData(this) endfunction function dispatch_ChannelData_destroyChannelData takes integer this returns nothing 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) endfunction function ChannelData_TimedLoop_onExpire takes nothing returns boolean local integer i = ChannelData_TimedLoop_instanceCount - 1 local integer t loop exitwhen 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 call dispatch_ChannelData_destroyChannelData(t) 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 unit_getUserData takes unit this returns integer return GetUnitUserData(this) endfunction function UnitEntity_onDamage takes nothing returns nothing call unit_getUserData(GetTriggerUnit()) call unit_getUserData(GetAttacker()) endfunction function currentCallback takes nothing returns integer return ClosureForGroups_tempCallbacks[-1] endfunction function alloc_LLEntry takes nothing returns integer local integer this if LLEntry_firstFree == 0 then if LLEntry_maxIndex < 32768 then set LLEntry_maxIndex = LLEntry_maxIndex + 1 set this = LLEntry_maxIndex else call error("Out of memory: Could not create LLEntry.") set this = 0 endif else set LLEntry_firstFree = LLEntry_firstFree - 1 set this = LLEntry_nextFree[LLEntry_firstFree] endif return this endfunction function LLEntry_init takes integer this returns nothing endfunction function construct_LLEntry takes integer this, integer elem, integer prev, integer next returns nothing call LLEntry_init(this) set LLEntry_prev[this] = prev endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this = alloc_LLEntry() call construct_LLEntry(this, elem, prev, next) return this endfunction function LinkedList_add_1 takes integer this, integer elems_0 returns nothing local integer entry = new_LLEntry(elems_0, LLEntry_prev[LinkedList_dummy[this]], LinkedList_dummy[this]) set LLEntry_prev[LinkedList_dummy[this]] = entry set LinkedList_size[this] = LinkedList_size[this] + 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this, integer elems_0 returns nothing 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 call LinkedList_add_1(this, elems_0) endfunction function handle_getHandleId takes handle this returns integer return GetHandleId(this) endfunction function unitToIndex takes unit object returns integer return handle_getHandleId(object) endfunction function callback_forEachFrom_LinkedList takes integer this, unit u_1 returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(result[this], unitToIndex(u_1)) endfunction function unit_remove takes unit this returns nothing call RemoveUnit(this) endfunction function callback_forEachFrom_Preloader takes integer this, unit u_1 returns nothing call unit_remove(u_1) endfunction function dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback takes integer this, unit u_1 returns nothing 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 call callback_forEachFrom_LinkedList(this, u_1) else call callback_forEachFrom_Preloader(this, 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 code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + 0.030 endfunction function dispatch_Callback_ClosureTimers_Callback_call takes integer this 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 returns nothing call dealloc_Callback(this) endfunction function dispatch_Callback_destroyCallback takes integer this returns nothing 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 call destroyCallback(this) endfunction function timerdialog_destr takes timerdialog this returns nothing call DestroyTimerDialog(this) endfunction function call_doAfter_ClosureTimers takes integer this returns nothing call dispatch_Callback_ClosureTimers_Callback_call(cb[this]) call dispatch_Callback_destroyCallback(cb[this]) call timerdialog_destr(dia[this]) endfunction function call_doAfter_ClosureTimers_107 takes integer this returns nothing set ClosureTimers_x = ClosureTimers_x + 50 endfunction function call_doAfter_ClosureTimers_108 takes integer this returns nothing set ClosureTimers_x = ClosureTimers_x * 2 endfunction function int_toString takes integer this returns string return I2S(this) endfunction function testFail takes string msg returns nothing endfunction function int_assertEquals takes integer this, integer expected returns nothing if this != expected then call testFail("Expected <" + int_toString(expected) + ">, Actual <" + int_toString(this) + ">") endif endfunction function call_doAfter_ClosureTimers_109 takes integer this returns nothing set ClosureTimers_x = ClosureTimers_x / 2 call int_assertEquals(ClosureTimers_x, 250) endfunction function LinkedList_enqueue takes integer this, integer elem returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(this, elem) endfunction function dispatch_LinkedList_LinkedList_LinkedList_enqueue takes integer this, integer elem returns nothing if LinkedList_typeId[this] == 0 then if this == 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, elem) endfunction function LinkedList_size_1 takes integer this returns integer return LinkedList_size[this] endfunction function dispatch_LinkedList_LinkedList_LinkedList_size takes integer this returns integer 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 return LinkedList_size_1(this) endfunction function real_asAngleDegrees takes real this returns real set real_asAngleDegrees_return_radians = this * 0.017453293 return real_asAngleDegrees_return_radians endfunction function unit_pause takes unit this returns nothing call PauseUnit(this, true) endfunction function angle_degrees takes real this_radians returns real return this_radians * 57.295779513 endfunction function unit_setFacing takes unit this, real a_radians returns nothing call SetUnitFacing(this, angle_degrees(a_radians)) endfunction function unit_setOwner takes unit this, player p, boolean changeColor returns nothing call SetUnitOwner(this, p, changeColor) endfunction function unit_setScale takes unit this, real scale returns nothing call SetUnitScale(this, scale, scale, scale) endfunction function unit_setVertexColor takes unit this, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing call SetUnitVertexColor(this, col_red, col_green, col_blue, col_alpha) endfunction function unit_setX takes unit this, real x returns nothing call SetUnitX(this, x) endfunction function unit_setY takes unit this, real y returns nothing call SetUnitY(this, y) endfunction function unit_setXY takes unit this, real pos_x, real pos_y returns nothing call unit_setX(this, pos_x) call unit_setY(this, pos_y) 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 call_doAfter_DummyRecycler_DummyRecycler takes integer this returns nothing call DummyRecycler_recycle(u[this]) endfunction function alloc_ForGroupCallback_forEachFrom_Preloader takes nothing returns integer local integer this if ForGroupCallback_firstFree == 0 then if ForGroupCallback_maxIndex < 32768 then set ForGroupCallback_maxIndex = ForGroupCallback_maxIndex + 1 set this = ForGroupCallback_maxIndex set ForGroupCallback_typeId[this] = 657 else call error("Out of memory: Could not create ForGroupCallback_forEachFrom_Preloader.") set this = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this] = 657 endif return this endfunction function group_destr takes group this returns nothing call DestroyGroup(this) 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 returns nothing call dealloc_ForGroupCallback(this) endfunction function dispatch_ForGroupCallback_destroyForGroupCallback takes integer this returns nothing 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 call destroyForGroupCallback(this) endfunction function group_hasNext takes group this returns boolean return FirstOfGroup(this) != null endfunction function group_next takes group this returns unit local unit iterUnit = FirstOfGroup(this) call GroupRemoveUnit(this, iterUnit) return iterUnit endfunction function group_forEachFrom takes group this, integer cb_1 returns nothing loop exitwhen not group_hasNext(this) call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(cb_1, group_next(this)) 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 returns nothing call finishPreload() endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call takes integer this returns nothing 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 call call_doAfter_ClosureTimers_107(this) endif else call call_doAfter_ClosureTimers_108(this) endif elseif CallbackSingle_typeId[this] <= 641 then if CallbackSingle_typeId[this] <= 640 then call call_doAfter_ClosureTimers_109(this) else call call_doAfter_DummyRecycler_DummyRecycler(this) endif else call call_nullTimer_Preloader(this) endif endfunction function Table_loadInt takes integer this, integer parentKey returns integer return hashtable_loadInt(Table_ht, this, parentKey) endfunction function dispatch_Table_Table_Table_loadInt takes integer this, integer parentKey returns integer 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 return Table_loadInt(this, parentKey) endfunction function timer_getHandleId takes timer this returns integer return GetHandleId(this) endfunction function timer_getData takes timer this returns integer return dispatch_Table_Table_Table_loadInt(TimerUtils_timerData, timer_getHandleId(this)) endfunction function timer_pause takes timer this returns nothing call PauseTimer(this) endfunction function Table_saveInt takes integer this, integer parentKey, integer value returns nothing call hashtable_saveInt(Table_ht, this, parentKey, value) endfunction function dispatch_Table_Table_Table_saveInt takes integer this, integer parentKey, integer value returns nothing 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 call Table_saveInt(this, parentKey, value) endfunction function timer_setData takes timer this, integer data returns nothing call dispatch_Table_Table_Table_saveInt(TimerUtils_timerData, timer_getHandleId(this), data) endfunction function timer_release takes timer this returns nothing if this == null then call error("Trying to release a null timer") return endif if timer_getData(this) == 679645218 then call error("ReleaseTimer: Double free!") return endif call timer_setData(this, 679645218) call timer_pause(this) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 endfunction function CallbackSingle_onDestroy takes integer this returns nothing call timer_release(CallbackSingle_t[this]) 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 returns nothing call CallbackSingle_onDestroy(this) call dealloc_CallbackSingle(this) endfunction function dispatch_CallbackSingle_destroyCallbackSingle takes integer this returns nothing 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 call destroyCallbackSingle(this) 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_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 int_bitOr takes integer this, integer other returns integer return BlzBitOr(this, other) endfunction function int_bitXor takes integer this, integer other returns integer return BlzBitXor(this, 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_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 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this = Table_maxIndex set Table_typeId[this] = 731 else call error("Out of memory: Could not create Table.") set this = 0 endif else set Table_firstFree = Table_firstFree - 1 set this = Table_nextFree[Table_firstFree] set Table_typeId[this] = 731 endif return this endfunction function Table_init takes integer this returns nothing endfunction function construct_Table takes integer this returns nothing call Table_init(this) endfunction function new_Table takes nothing returns integer local integer this = alloc_Table() call construct_Table(this) return this 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 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_addAbility takes unit this, integer abil returns boolean return UnitAddAbility(this, abil) endfunction function unit_removeAbility takes unit this, integer abil returns boolean return UnitRemoveAbility(this, abil) 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, 1095577649) call unit_removeAbility(u_1, 1095577649) call unit_setXY(u_1, pos_x, pos_y) call unit_setFacing(u_1, facing_radians) return u_1 endfunction function alloc_LinkedList takes nothing returns integer local integer this if LinkedList_firstFree == 0 then if LinkedList_maxIndex < 32768 then set LinkedList_maxIndex = LinkedList_maxIndex + 1 set this = LinkedList_maxIndex set LinkedList_typeId[this] = 710 else call error("Out of memory: Could not create LinkedList.") set this = 0 endif else set LinkedList_firstFree = LinkedList_firstFree - 1 set this = LinkedList_nextFree[LinkedList_firstFree] set LinkedList_typeId[this] = 710 endif return this endfunction function LinkedList_init takes integer this returns nothing set LinkedList_dummy[this] = new_LLEntry(0, 0, 0) set LinkedList_size[this] = 0 endfunction function construct_LinkedList2 takes integer this returns nothing call LinkedList_init(this) set LLEntry_prev[LinkedList_dummy[this]] = LinkedList_dummy[this] endfunction function new_LinkedList takes nothing returns integer local integer this = alloc_LinkedList() call construct_LinkedList2(this) return this 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 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 = 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)) set j = j + 1 endloop set i = i + 1 endloop return true endfunction function alloc_BackIterator takes nothing returns integer local integer this if BackIterator_firstFree == 0 then if BackIterator_maxIndex < 32768 then set BackIterator_maxIndex = BackIterator_maxIndex + 1 set this = BackIterator_maxIndex else call error("Out of memory: Could not create BackIterator.") set this = 0 endif else set BackIterator_firstFree = BackIterator_firstFree - 1 set this = BackIterator_nextFree[BackIterator_firstFree] endif return this endfunction function BackIterator_init takes integer this returns nothing endfunction function construct_BackIterator takes integer this, boolean destroyOnClose returns nothing call BackIterator_init(this) endfunction function new_BackIterator takes boolean destroyOnClose returns integer local integer this = alloc_BackIterator() call construct_BackIterator(this, destroyOnClose) return this endfunction function alloc_Iterator takes nothing returns integer local integer this 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 return this endfunction function Iterator_init takes integer this returns nothing endfunction function construct_Iterator takes integer this, boolean destroyOnClose returns nothing call Iterator_init(this) endfunction function new_Iterator takes boolean destroyOnClose returns integer local integer this = alloc_Iterator() call construct_Iterator(this, destroyOnClose) return this endfunction function trigger_addAction takes trigger this, code actionFunc returns triggeraction return TriggerAddAction(this, actionFunc) endfunction function init_Entity takes nothing returns boolean call new_Iterator(false) call new_BackIterator(false) set UnitEntity_dmgTrig = CreateTrigger() call trigger_addAction(UnitEntity_dmgTrig, ref_function_UnitEntity_onDamage) return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_HT = hashtable_compiletime return true endfunction function alloc_HashMap takes nothing returns integer local integer this if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this = Table_maxIndex set Table_typeId[this] = 732 else call error("Out of memory: Could not create HashMap.") set this = 0 endif else set Table_firstFree = Table_firstFree - 1 set this = Table_nextFree[Table_firstFree] set Table_typeId[this] = 732 endif return this endfunction function HashMap_init takes integer this returns nothing endfunction function construct_HashMap takes integer this returns nothing call construct_Table(this) call HashMap_init(this) endfunction function new_HashMap takes nothing returns integer local integer this = alloc_HashMap() call construct_HashMap(this) return this endfunction function init_EventHelper takes nothing returns boolean call new_HashMap() call new_HashMap() call new_Table() return true endfunction function string_length takes string this returns integer return StringLength(this) 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, real width, real height returns nothing call BlzFrameSetSize(this, 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_start takes timer this, real time, code timerCallBack returns nothing call TimerStart(this, time, false, timerCallBack) endfunction function timer_startPeriodic takes timer this, real time, code timerCallBack returns nothing call TimerStart(this, 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 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 alloc_Comparator_LinkedList takes nothing returns integer local integer this if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 set this = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this = Comparator_nextFree[Comparator_firstFree] endif return this endfunction function alloc_Comparator_LinkedList_97 takes nothing returns integer local integer this if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 set this = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this = Comparator_nextFree[Comparator_firstFree] endif return this endfunction function init_LinkedList takes nothing returns boolean call alloc_Comparator_LinkedList() call alloc_Comparator_LinkedList_97() 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 returns real return GetRectMaxX(this) endfunction function rect_getMaxY takes rect this returns real return GetRectMaxY(this) endfunction function rect_getMinX takes rect this returns real return GetRectMinX(this) endfunction function rect_getMinY takes rect this returns real return GetRectMinY(this) endfunction function region_addRect takes region this, rect rct returns nothing call RegionAddRect(this, 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 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 initMapBounds takes nothing returns nothing local rect cond_result 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 call region_addRect(CreateRegion(), MapBounds_boundRect) 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 = rect_getMaxX(MapBounds_playableMapRect) set tuple_temp_1 = rect_getMaxY(MapBounds_playableMapRect) set MapBounds_playableMax_x = tuple_temp set MapBounds_playableMax_y = tuple_temp_1 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 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 return this endfunction function IdGenerator_init takes integer this returns nothing endfunction function construct_IdGenerator takes integer this, integer start returns nothing call IdGenerator_init(this) endfunction function new_IdGenerator takes integer start returns integer local integer this = alloc_IdGenerator() call construct_IdGenerator(this, start) return this 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 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 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this = CallbackSingle_maxIndex set CallbackSingle_typeId[this] = 642 else call error("Out of memory: Could not create CallbackSingle_nullTimer_Preloader.") set this = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this] = 642 endif return this endfunction function CallbackSingle_init takes integer this returns nothing endfunction function construct_CallbackSingle takes integer this returns nothing call CallbackSingle_init(this) 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 CallbackSingle_start takes integer this, timer whichTimer, real time returns nothing call timer_setData(whichTimer, this) call timer_start(whichTimer, time, ref_function_code__start_CallbackSingle_ClosureTimers) set CallbackSingle_t[this] = whichTimer endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start takes integer this, timer whichTimer, real time returns nothing if CallbackSingle_typeId[this] == 0 then if this == 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, whichTimer, time) endfunction function timer_doAfter takes timer this, real timeToWait, integer cb_1 returns integer call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_1, this, timeToWait) return cb_1 endfunction function doAfter takes real timeToWait, integer cb_1 returns integer return timer_doAfter(getTimer(), timeToWait, cb_1) endfunction function nullTimer takes integer cb_1 returns integer return doAfter(0., cb_1) endfunction function unit_setInvulnerable takes unit this, boolean flag returns nothing call SetUnitInvulnerable(this, 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_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 call string_length("0123456789") call string_length("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_89 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 hashtable_saveString takes hashtable this, integer parentKey, integer childKey, string value returns nothing call SaveStr(this, parentKey, childKey, value) endfunction function Table_saveString takes integer this, integer parentKey, string value returns nothing call hashtable_saveString(Table_ht, this, parentKey, value) endfunction function dispatch_Table_Table_Table_saveString takes integer this, integer parentKey, string value returns nothing 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 call Table_saveString(this, parentKey, value) 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_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 initCompiletimeState() 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