// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals // integer JASS_MAX_ARRAY_SIZE=0 // integer PLAYER_NEUTRAL_PASSIVE=0 // attacktype ATTACK_TYPE_NORMAL=null // mapcontrol MAP_CONTROL_USER=null // playerslotstate PLAYER_SLOT_STATE_PLAYING=null // playerevent EVENT_PLAYER_LEAVE=null // playerevent EVENT_PLAYER_END_CINEMATIC=null // playerunitevent EVENT_PLAYER_UNIT_ISSUED_ORDER=null // playerunitevent EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER=null // playerunitevent EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER=null // playerunitevent EVENT_PLAYER_UNIT_DAMAGED=null // playerunitevent EVENT_PLAYER_UNIT_DAMAGING=null // unitevent EVENT_UNIT_DAMAGED=null // playerevent EVENT_PLAYER_ARROW_LEFT_DOWN=null // playerevent EVENT_PLAYER_ARROW_LEFT_UP=null // playerevent EVENT_PLAYER_ARROW_RIGHT_DOWN=null // playerevent EVENT_PLAYER_ARROW_RIGHT_UP=null // playerevent EVENT_PLAYER_ARROW_DOWN_DOWN=null // playerevent EVENT_PLAYER_ARROW_DOWN_UP=null // playerevent EVENT_PLAYER_ARROW_UP_DOWN=null // playerevent EVENT_PLAYER_ARROW_UP_UP=null // playerevent EVENT_PLAYER_MOUSE_DOWN=null // playerevent EVENT_PLAYER_MOUSE_UP=null // playerevent EVENT_PLAYER_MOUSE_MOVE=null // playerunitevent EVENT_PLAYER_UNIT_SPELL_EFFECT=null // blendmode BLEND_MODE_BLEND=null // texmapflags TEXMAP_FLAG_NONE=null // originframetype ORIGIN_FRAME_GAME_UI=null // integer bj_MAX_PLAYERS=0 // integer bj_MAX_PLAYER_SLOTS=0 // rect bj_mapInitialPlayableArea=null string array Base64_CHARMAP integer array Base64_REVERSE_CHARMAP player Basics_DUMMY_PLAYER=null integer array BitSet_pows integer array BitwiseInit_powShift playerevent ClosureEvents_EVENT_PLAYER_CHAT_FILTER=null trigger ClosureEvents_unitTrig=null trigger ClosureEvents_leaveTrig=null trigger ClosureEvents_keyTrig=null integer array ClosureEvents_eventidToIndex integer ClosureEvents_eventTypeCounter=0 integer EventListener_castMap=0 integer array EventListener_castMapCasters integer array EventListener_generalListenersFirsts integer array EventListener_unitListenersFirsts boolean EventListener_useMouseEvents=false integer array ClosureForGroups_tempCallbacks integer ClosureForGroups_iterCount=0 integer ClosureFrames_FRAME_MAP=0 integer ClosureKeyPresses_KEY_MAP=0 integer ClosureTimers_x=0 string array Colors_hexs integer Colors_decs=0 boolexpr array DamageDetection_func trigger DamageDetection_current=null trigger DamageDetection_toDestroy=null filterfunc DamageDetection_filter=null integer DamageEvent_DAMAGE_ELEMENT_ATTACK=0 integer DamageEvent_nextDamageId=0 integer DamageEvent_nextDamageType=0 integer DamageEvent_nextDamageElement=0 boolean DamageEvent_abort=false integer array DamageEvent_firstListeners integer array DamageEvent_firstUnreducedListeners integer DamageInstance_current=0 integer array DamageInstance_stack integer DamageInstance_count=0 real DummyRecycler_ANGLE_DEGREE=0. integer array DummyRecycler_angleQueues hashtable ErrorHandling_HT=null string ErrorHandling_lastError=null boolean ErrorHandling_suppressErrorMessages=false force Execute_executeForce=null boolean array Execute_tempCallbacksSuccess integer array Execute_tempCallbacks integer Execute_tempCallbacksCount=0 string FileIO_FILE_IO_ABIL_ID_STR=null integer ForceTests_testInt=0 framehandle Framehandle_GAME_UI=null integer GameStatus_gameStatus=0 real GameTimer_currentTime=0. integer GroupUtils_used=0 group array GroupUtils_stack integer GroupUtils_numStack=0 integer GroupUtils_numTotal=0 boolean GroupUtils_shownMaxError=false group Group_ENUM_GROUP=null hashtable HashList_ht=null hashtable HashList_occurences=null hashtable HashSet_position=null integer array LastOrder_lastOrder boolean MagicFunctions_compiletime=false rect MapBounds_playableMapRect=null rect MapBounds_boundRect=null region MapBounds_boundRegion=null real MapBounds_playableMin_x=0. real MapBounds_playableMin_y=0. real MapBounds_playableMax_x=0. real MapBounds_playableMax_y=0. real MapBounds_boundMin_x=0. real MapBounds_boundMin_y=0. real MapBounds_boundMax_x=0. real MapBounds_boundMax_y=0. trigger OnUnitEnterLeave_eventTrigger=null group OnUnitEnterLeave_preplacedUnits=null unit array OnUnitEnterLeave_tempUnits integer OnUnitEnterLeave_tempUnitsCount=0 player array Player_players player Player_localPlayer=null group Preloader_dumg=null unit Preloader_dum=null trigger array RegisterEvents_t integer RegisterEvents_onCastMap=0 string array StringUtils_c2s integer array StringUtils_s2c integer SyncSimple_syncQueue=0 hashtable Table_ht=null timer array TimerUtils_freeTimers integer TimerUtils_freeTimersCount=0 integer TimerUtils_timerData=0 integer TypeCasting_typecastdata=0 trigger UnitIndexer_onIndexTrigger=null trigger UnitIndexer_onDeindexTrigger=null unit array UnitIndexer_tempUnits integer UnitIndexer_tempUnitsCount=0 hashtable hashtable_compiletime=null hashtable hashtable_compiletime_342=null hashtable hashtable_compiletime_343=null hashtable hashtable_compiletime_344=null hashtable hashtable_compiletime_345=null integer array Base64Decoder_typeId integer array ForForceCallback_nextFree integer ForForceCallback_firstFree=0 integer ForForceCallback_maxIndex=0 integer array ForForceCallback_typeId integer array Base64Encoder_typeId integer array ByteBuffer_typeId integer array ChunkedString_nextFree integer ChunkedString_firstFree=0 integer ChunkedString_maxIndex=0 integer array ChunkedString_typeId integer array CineSeq_typeId integer array Cinematic_typeId integer array CallbackSingle_nextFree integer CallbackSingle_firstFree=0 integer CallbackSingle_maxIndex=0 integer array CallbackSingle_typeId integer array EventListener_nextFree integer EventListener_firstFree=0 integer EventListener_maxIndex=0 integer array EventListener_typeId integer OnCastListener_firstFree=0 integer array OnCastListener_typeId integer array ForGroupCallback_nextFree integer ForGroupCallback_firstFree=0 integer ForGroupCallback_maxIndex=0 integer array ForGroupCallback_typeId integer Callback_firstFree=0 integer array Callback_typeId integer array DamageElement_nextFree integer DamageElement_firstFree=0 integer DamageElement_maxIndex=0 integer array DamageInstance_nextFree integer DamageInstance_firstFree=0 integer DamageInstance_maxIndex=0 integer array DamageInstance_typeId integer DummyCaster_firstFree=0 integer array DummyCaster_typeId integer array File_nextFree integer File_firstFree=0 integer File_maxIndex=0 integer array File_typeId integer HashList_firstFree=0 integer array HashList_typeId integer array Table_nextFree integer Table_firstFree=0 integer Table_maxIndex=0 integer array Table_typeId integer array TerrainZProvider_nextFree integer TerrainZProvider_firstFree=0 integer TerrainZProvider_maxIndex=0 integer array WallHitTransform_nextFree integer WallHitTransform_firstFree=0 integer WallHitTransform_maxIndex=0 integer array UnitFilter_nextFree integer UnitFilter_firstFree=0 integer UnitFilter_maxIndex=0 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 Order_nextFree integer Order_firstFree=0 integer Order_maxIndex=0 integer array Order_typeId integer array BackIterator_nextFree_7 integer BackIterator_firstFree_3=0 integer BackIterator_maxIndex_5=0 integer array Iterator_nextFree_194 integer Iterator_firstFree_190=0 integer Iterator_maxIndex_192=0 integer array Comparator_nextFree integer Comparator_firstFree=0 integer Comparator_maxIndex=0 integer array LLEntry_nextFree integer LLEntry_firstFree=0 integer LLEntry_maxIndex=0 integer array LLEntry_typeId integer array 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 array OrderStringFactory_nextFree integer OrderStringFactory_firstFree=0 integer OrderStringFactory_maxIndex=0 integer BufferSyncListener_firstFree=0 integer array BufferSyncListener_typeId integer Sim3DSound_firstFree=0 integer array Sim3DSound_typeId integer array SoundDefinition_typeId integer SoundInstance_firstFree=0 integer array SoundInstance_typeId integer array StringIterator_nextFree integer StringIterator_firstFree=0 integer StringIterator_maxIndex=0 integer array StringIterator_typeId integer StringSyncListener_firstFree=0 integer array StringSyncListener_typeId integer BoolSyncListener_firstFree=0 integer array BoolSyncListener_typeId integer IntSyncListener_firstFree=0 integer array IntSyncListener_typeId integer RealSyncListener_firstFree=0 integer array RealSyncListener_typeId integer SyncData_firstFree=0 integer array SyncData_typeId integer array UnitIndex_nextFree integer UnitIndex_firstFree=0 integer UnitIndex_maxIndex=0 integer array UnitIndex_typeId integer array Base64Decoder_byteBuffer string array Base64Decoder_buffer integer array Base64Decoder_bufferLength integer array data_333 integer array this_486 integer array Base64Encoder_chunkedString string array Base64Encoder_stringBuffer integer array Base64Encoder_chars integer array Base64Encoder_buffer integer array Base64Encoder_bytes integer array data integer array this_485 integer array ByteBuffer_storage integer array ByteBuffer_intCount integer array ByteBuffer_buffer integer array ByteBuffer_bufferLength integer array ByteBuffer_readBuffer integer array ByteBuffer_readBufferIndex integer array ByteBuffer_readIndex integer array ChunkedString_table integer array ChunkedString_chunkSize integer array ChunkedString_chunkCount integer array ChunkedString_readIndex string array ChunkedString_buffer boolean array Cinematic_running integer array this_487 integer array sequence integer array ending real array duration_seconds real array duration_seconds_338 camerasetup array setup real array pos_x real array pos_y real array duration_seconds_339 integer array EventListener_eventId integer array EventListener_uid integer array EventListener_next integer array EventListener_prev integer array OnCastListener_next integer array OnCastListener_prev integer array OnCastListener_abilId unit array OnCastListener_eventUnit frameeventtype array FrameHandleListener_eventType integer array FrameHandleListener_next integer array KeyPressListener_metaKey boolean array KeyPressListener_onKeyDown integer array KeyPressListener_next integer array cb timerdialog array dia timer array CallbackSingle_t real array DamageInstance_amount attacktype array DamageInstance_nativeAttackType damagetype array DamageInstance_nativeDamageType weapontype array DamageInstance_nativeWeaponType integer array DamageListener_next integer array DummyCaster_castCount integer array this unit array dummy integer array id unit array u effect array this_488 effect array this_489 integer array condition integer array resetCount integer array action string array File_filename integer array createNow integer array HashList_size integer array HashMap_size integer array IterableMap_keys boolean array IterableMap__destroyed integer array Order_prev unit array Order_orderedUnit integer array result integer array LLEntry_elem integer array LLEntry_prev integer array LLEntry_next integer array LinkedList_dummy integer array LinkedList_size integer array listener integer array SoundDefinition_soundStack integer array SoundDefinition_duration integer array this_490 integer array snd integer array this_491 integer array snd_481 integer array this_492 integer array snd_482 integer array this_493 integer array instance real array SoundInstance_pos_x real array SoundInstance_pos_y real array SoundInstance_pos_z sound array SoundInstance_snd integer array SoundInstance_soundDef unit array SoundInstance_onUnit player array SoundInstance_p integer array SoundInstance_s3s string array StringIterator_s integer array StringIterator_currentpos integer array StringIterator_stringLen integer array listener_349 integer array listener_350 integer array listener_351 integer array SyncData_slistener integer array SyncData_blistener player array SyncData_syncer string array SyncData_data integer array SyncData_buffer integer array SyncData_syncBuffer unit array UnitIndex__unit real real_asAngleDegrees_return_radians=0. integer string_toChar_return_c=0 real unit_getPos_return_x=0. real unit_getPos_return_y=0. real vec2_op_minus_return_x=0. real vec2_op_minus_return_y=0. real EventData_getOrderPos_return_x=0. real EventData_getOrderPos_return_y=0. real EventData_getOrderTargetPos_return_x=0. real EventData_getOrderTargetPos_return_y=0. real EventData_getAbilityTargetPos_return_x=0. real EventData_getAbilityTargetPos_return_y=0. real EventData_getSpellTargetPos_return_x=0. real EventData_getSpellTargetPos_return_y=0. real vec2_toVec3_return_x=0. real vec2_toVec3_return_y=0. real vec2_toVec3_return_z=0. real vec2_op_plus_return_x=0. real vec2_op_plus_return_y=0. real vec2_op_mult_return_x=0. integer char_return_c=0 real real_seconds_return_seconds=0. real dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds=0. real apply_Cinematic_Cinematic_return_seconds=0. real apply_Cinematic_Cinematic_return_seconds_321=0. real apply_Cinematic_Cinematic_return_seconds_322=0. real apply_Cinematic_Cinematic_return_seconds_323=0. real apply_Cinematic_Cinematic_return_seconds_324=0. code ref_function_init_Abilities=null code ref_function_init_AbilityIds=null code ref_function_init_Real=null code ref_function_init_Integer=null code ref_function_init_BitSet=null code ref_function_init_String=null code ref_function_init_TargetsAllowed=null code ref_function_init_Angle=null code ref_function_init_Vectors=null code ref_function_init_Destructable=null code ref_function_init_Player=null code ref_function_init_Maths=null code ref_function_init_Printing=null code ref_function_init_MagicFunctions=null code ref_function_init_Basics=null code ref_function_init_GameTimer=null code ref_function_init_ErrorHandling=null code ref_function_init_Matrices=null code ref_function_init_Quaternion=null code ref_function_init_Table=null code ref_function_init_Playercolor=null code ref_function_init_Colors=null code ref_function_init_Framehandle=null code ref_function_init_Group=null code ref_function_init_Lightning=null code ref_function_init_WeatherEffects=null code ref_function_init_TypeCasting=null code ref_function_init_HashList=null code ref_function_init_EventHelper=null code ref_function_init_AbilityObjEditing=null code ref_function_init_AttachmentPoints=null code ref_function_init_BitwiseInit=null code ref_function_init_ClosureForGroups=null code ref_function_init_LinkedList=null code ref_function_init_StringUtils=null code ref_function_init_SafetyChecks=null code ref_function_init_ChunkedString=null code ref_function_init_Execute=null code ref_function_init_Base64=null code ref_function_init_Base64Tests=null code ref_function_init_BigNum=null code ref_function_init_BuffIds=null code ref_function_init_Buildings=null code ref_function_init_ObjectIds=null code ref_function_init_TimerUtils=null code ref_function_init_ClosureTimers=null code ref_function_init_UnitIds=null code ref_function_init_MapBounds=null code ref_function_init_Preloader=null code ref_function_init_ObjectIdGenerator=null code ref_function_init_Icons=null code ref_function_init_ChannelAbilityPreset=null code ref_function_init_RegisterEvents=null code ref_function_init_Orders=null code ref_function_init_OnUnitEnterLeave=null code ref_function_init_UnitIndexer=null code ref_function_init_ClosureEvents=null code ref_function_init_ClosureFrames=null code ref_function_init_ClosureKeyPresses=null code ref_function_init_DamageDetection=null code ref_function_init_DamageEvent=null code ref_function_init_DialogBox=null code ref_function_init_Doodads=null code ref_function_init_DummyRecycler=null code ref_function_init_FileIO=null code ref_function_init_ForceTests=null code ref_function_init_FramehandleNames=null code ref_function_init_GameStatus=null code ref_function_init_GroupUtils=null code ref_function_init_HashListTests=null code ref_function_init_HashSet=null code ref_function_init_InstantDummyCaster=null code ref_function_init_ItemIds=null code ref_function_init_TerrainUtils=null code ref_function_init_Objects=null code ref_function_init_Knockback3=null code ref_function_init_LastOrder=null code ref_function_init_LinkedListModuleTests=null code ref_function_init_PathingMaps=null code ref_function_init_Raycast=null code ref_function_init_SyncSimple=null code ref_function_init_SaveLoadData=null code ref_function_init_Serializable=null code ref_function_init_Simulate3dSound=null code ref_function_init_Sounds=null code ref_function_init_SoundUtils=null code ref_function_init_Soundsets=null code ref_function_init_StandardTextTags=null code ref_function_init_Textures=null code ref_function_init_Tiles=null code ref_function_init_UI=null code ref_function_init_UnitAnimations=null code ref_function_init_Units=null code ref_function_init_UpgradeObjEditing=null code ref_function_code__onUnitIndex_ClosureEvents=null code ref_function_code__onUnitDeindex_ClosureEvents=null code ref_function_EventListener_generalEventCallback=null code ref_function_code__Filter_ClosureForGroups=null code ref_function_onEvent=null code ref_function_onEvent_473=null code ref_function_code__Filter_DamageDetection=null code ref_function_code__onEnter_DamageDetection=null code ref_function_swap=null code ref_function_executeCurrentCallback=null code ref_function_code__startPeriodic_GameTimer=null code ref_function_actions=null code ref_function_spellActions=null code ref_function_code__onUnitDeindex_LastOrder=null code ref_function_code__registerPlayerUnitEvent_RegisterEvents=null code ref_function_code__addAction_SyncSimple=null code ref_function_code__onEnter_UnitIndexer=null code ref_function_code__onLeave_UnitIndexer=null code ref_function_code__addAction_nullTimer_ClosureEvents=null code ref_function_code__addAction_nullTimer_ClosureEvents_364=null code ref_function_code__addAction_nullTimer_ClosureEvents_365=null code ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents=null code ref_function_code__start_CallbackSingle_ClosureTimers=null code ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave=null code ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave=null code ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave=null endglobals function Loglevel_getTag takes integer this_1 returns string if this_1 == 0 then return "|cffADADADtrace|r" elseif this_1 == 1 then return "|cff2685DCdebug|r" elseif this_1 == 2 then return "|cffFFCC00info|r" elseif this_1 == 3 then return "|cffF47E3Ewarning|r" else return "|cffFB2700error|r" endif endfunction function printLog takes player showTo, integer loglvl, string msg returns nothing if 2 <= loglvl then call DisplayTimedTextToPlayer(showTo, 0., 0., 45., Loglevel_getTag(loglvl) + " - " + msg) endif endfunction function Log_error takes string msg returns nothing call printLog(Player_localPlayer, 4, msg) endfunction function compileError takes string msg returns nothing endfunction function hashtable_hasBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedBoolean(this_1, parentKey, childKey) endfunction function hashtable_hasInt takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedInteger(this_1, parentKey, childKey) endfunction function hashtable_loadBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return LoadBoolean(this_1, parentKey, childKey) endfunction function hashtable_loadInt takes hashtable this_1, integer parentKey, integer childKey returns integer return LoadInteger(this_1, parentKey, childKey) endfunction function hashtable_saveBoolean takes hashtable this_1, integer parentKey, integer childKey, boolean value returns nothing call SaveBoolean(this_1, parentKey, childKey, value) endfunction function hashtable_saveInt takes hashtable this_1, integer parentKey, integer childKey, integer value returns nothing call SaveInteger(this_1, parentKey, childKey, value) endfunction function real_toInt takes real this_1 returns integer return R2I(this_1) endfunction function string_getHash takes string this_1 returns integer return StringHash(this_1) endfunction function error takes string msg returns nothing local integer hash if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else if not ErrorHandling_suppressErrorMessages then 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 endif set ErrorHandling_lastError = msg call I2S(1 / 0) endif endfunction function initCompiletimeState_0 takes nothing returns nothing set hashtable_compiletime_345 = InitHashtable() set hashtable_compiletime_344 = InitHashtable() set hashtable_compiletime_343 = InitHashtable() set hashtable_compiletime_342 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_344, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_344, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_344, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_344, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_344, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_344, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_344, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_344, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_344, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_344, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_344, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_344, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_344, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_344, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_344, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_344, 1, 789744696, 15) call SaveStr(hashtable_compiletime_344, 2, 0, "") call SaveStr(hashtable_compiletime_344, 2, 1804483594, "air") call SaveStr(hashtable_compiletime_344, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime_344, 2, -681966791, "ground") call SaveStr(hashtable_compiletime_344, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime_344, 2, 392811314, "item") call SaveStr(hashtable_compiletime_344, 2, 124309475, "structure") call SaveStr(hashtable_compiletime_344, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime_344, 2, -85648186, "ward") call SaveStr(hashtable_compiletime_344, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime_344, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime_344, 2, -844489484, "AM02") call SaveStr(hashtable_compiletime_344, 2, 512215473, "Agho") call SaveInteger(hashtable_compiletime_344, 58, 0, 0) call SaveInteger(hashtable_compiletime_344, 58, 1, 0) call SaveInteger(hashtable_compiletime_344, 58, 2, 0) call SaveInteger(hashtable_compiletime_344, 58, 3, 0) call SaveInteger(hashtable_compiletime_344, 58, 4, 0) call SaveInteger(hashtable_compiletime_344, 58, 5, 0) call SaveInteger(hashtable_compiletime_344, 58, 6, 0) call SaveInteger(hashtable_compiletime_344, 58, 7, 0) call SaveInteger(hashtable_compiletime_344, 58, 8, 0) call SaveInteger(hashtable_compiletime_344, 58, 9, 0) call SaveInteger(hashtable_compiletime_344, 58, 10, 0) call SaveInteger(hashtable_compiletime_344, 58, 11, 0) call SaveInteger(hashtable_compiletime_344, 58, 12, 0) call SaveInteger(hashtable_compiletime_344, 58, 13, 0) call SaveInteger(hashtable_compiletime_344, 58, 14, 0) call SaveInteger(hashtable_compiletime_344, 58, 15, 0) call SaveInteger(hashtable_compiletime_344, 58, 16, 0) call SaveInteger(hashtable_compiletime_344, 58, 17, 0) call SaveInteger(hashtable_compiletime_344, 58, 18, 0) call SaveInteger(hashtable_compiletime_344, 58, 19, 0) call SaveInteger(hashtable_compiletime_344, 58, 20, 0) call SaveInteger(hashtable_compiletime_344, 58, 21, 0) call SaveInteger(hashtable_compiletime_344, 58, 22, 0) call SaveInteger(hashtable_compiletime_344, 58, 23, 0) call SaveInteger(hashtable_compiletime_344, 58, 24, 0) call SaveInteger(hashtable_compiletime_344, 58, 25, 0) call SaveInteger(hashtable_compiletime_344, 58, 26, 0) call SaveInteger(hashtable_compiletime_344, 58, 27, 0) call SaveInteger(hashtable_compiletime_344, 58, 28, 0) call SaveInteger(hashtable_compiletime_344, 58, 29, 0) call SaveInteger(hashtable_compiletime_344, 58, 30, 0) call SaveInteger(hashtable_compiletime_344, 58, 31, 0) call SaveInteger(hashtable_compiletime_344, 58, 32, 0) call SaveInteger(hashtable_compiletime_344, 58, 33, 0) call SaveInteger(hashtable_compiletime_344, 58, 34, 0) call SaveInteger(hashtable_compiletime_344, 58, 35, 0) call SaveInteger(hashtable_compiletime_344, 58, 36, 0) call SaveInteger(hashtable_compiletime_344, 58, 37, 0) call SaveInteger(hashtable_compiletime_344, 58, 38, 0) call SaveInteger(hashtable_compiletime_344, 58, 39, 0) call SaveInteger(hashtable_compiletime_344, 58, 40, 0) call SaveInteger(hashtable_compiletime_344, 58, 41, 0) call SaveInteger(hashtable_compiletime_344, 58, 42, 0) call SaveInteger(hashtable_compiletime_344, 58, 43, 0) call SaveInteger(hashtable_compiletime_344, 58, 44, 0) call SaveInteger(hashtable_compiletime_344, 58, 45, 0) call SaveInteger(hashtable_compiletime_344, 58, 46, 0) call SaveInteger(hashtable_compiletime_344, 58, 47, 0) call SaveInteger(hashtable_compiletime_344, 58, 48, 0) call SaveInteger(hashtable_compiletime_344, 58, 49, 0) call SaveInteger(hashtable_compiletime_344, 58, 50, 0) call SaveInteger(hashtable_compiletime_344, 58, 51, 0) call SaveInteger(hashtable_compiletime_344, 58, 52, 0) call SaveInteger(hashtable_compiletime_344, 58, 53, 0) call SaveInteger(hashtable_compiletime_344, 58, 54, 0) call SaveInteger(hashtable_compiletime_344, 58, 55, 0) call SaveInteger(hashtable_compiletime_344, 58, 56, 0) call SaveInteger(hashtable_compiletime_344, 58, 57, 0) call SaveInteger(hashtable_compiletime_344, 58, 58, 0) call SaveInteger(hashtable_compiletime_344, 58, 59, 0) call SaveInteger(hashtable_compiletime_344, 58, 60, 0) call SaveInteger(hashtable_compiletime_344, 58, 61, 0) call SaveInteger(hashtable_compiletime_344, 58, 62, 0) call SaveInteger(hashtable_compiletime_344, 58, 63, 0) endfunction function initCompiletimeState takes nothing returns nothing call ExecuteFunc("initCompiletimeState_0") endfunction function dispatch_DamageListener_DamageEvent_DamageListener_onEvent takes integer this_1 returns nothing endfunction function alloc_DamageInstance takes nothing returns integer local integer this_1 if DamageInstance_firstFree == 0 then if DamageInstance_maxIndex < 32768 then set DamageInstance_maxIndex = DamageInstance_maxIndex + 1 set this_1 = DamageInstance_maxIndex set DamageInstance_typeId[this_1] = 1700 else call error("Out of memory: Could not create DamageInstance.") set this_1 = 0 endif else set DamageInstance_firstFree = DamageInstance_firstFree - 1 set this_1 = DamageInstance_nextFree[DamageInstance_firstFree] set DamageInstance_typeId[this_1] = 1700 endif return this_1 endfunction function DamageInstance_init takes integer this_1 returns nothing endfunction function construct_DamageInstance takes integer this_1, integer id_1, unit source, unit target, real unreducedAmount, attacktype nativeAttackType, damagetype nativeDamageType, weapontype nativeWeaponType, integer damageType, integer damageElement returns nothing call DamageInstance_init(this_1) set DamageInstance_amount[this_1] = unreducedAmount set DamageInstance_nativeAttackType[this_1] = nativeAttackType set DamageInstance_nativeDamageType[this_1] = nativeDamageType set DamageInstance_nativeWeaponType[this_1] = nativeWeaponType set DamageInstance_count = DamageInstance_count + 1 set DamageInstance_stack[DamageInstance_count] = this_1 set DamageInstance_current = this_1 endfunction function new_DamageInstance takes integer id_1, unit source, unit target, real unreducedAmount, attacktype nativeAttackType, damagetype nativeDamageType, weapontype nativeWeaponType, integer damageType, integer damageElement returns integer local integer this_1 = alloc_DamageInstance() call construct_DamageInstance(this_1, id_1, source, target, unreducedAmount, nativeAttackType, nativeDamageType, nativeWeaponType, damageType, damageElement) return this_1 endfunction function DamageEvent_onUnreducedDamage takes nothing returns nothing local real amount = GetEventDamage() local attacktype attackType = BlzGetEventAttackType() local integer dmg local integer i local integer temp local integer listener_1 if DamageEvent_nextDamageType == 4 then if attackType == ATTACK_TYPE_NORMAL then set DamageEvent_nextDamageType = 1 else set DamageEvent_nextDamageType = 0 set DamageEvent_nextDamageElement = DamageEvent_DAMAGE_ELEMENT_ATTACK endif endif set dmg = new_DamageInstance(DamageEvent_nextDamageId, GetEventDamageSource(), GetTriggerUnit(), amount, attackType, BlzGetEventDamageType(), BlzGetEventWeaponType(), DamageEvent_nextDamageType, DamageEvent_nextDamageElement) set DamageEvent_nextDamageId = 0 set DamageEvent_nextDamageType = 4 set DamageEvent_nextDamageElement = 0 set i = 0 set temp = 0 loop exitwhen i > temp set listener_1 = DamageEvent_firstUnreducedListeners[i] loop exitwhen listener_1 == 0 call dispatch_DamageListener_DamageEvent_DamageListener_onEvent(listener_1) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener_1 = DamageListener_next[listener_1] endif endloop exitwhen DamageEvent_abort set i = i + 1 endloop call BlzSetEventAttackType(DamageInstance_nativeAttackType[dmg]) call BlzSetEventDamageType(DamageInstance_nativeDamageType[dmg]) call BlzSetEventWeaponType(DamageInstance_nativeWeaponType[dmg]) call BlzSetEventDamage(DamageInstance_amount[dmg]) endfunction function onEvent_add_DamageEvent takes integer this_1 returns nothing call DamageEvent_onUnreducedDamage() endfunction function DamageInstance_setReducedAmount takes integer this_1, real amount returns nothing set DamageInstance_amount[this_1] = amount endfunction function dispatch_DamageInstance_DamageEvent_DamageInstance_setReducedAmount takes integer this_1, real amount returns nothing if DamageInstance_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DamageInstance.setReducedAmount") else call error("Called DamageInstance.setReducedAmount on invalid object.") endif endif call DamageInstance_setReducedAmount(this_1, amount) endfunction function DamageInstance_onDestroy takes integer this_1 returns nothing set DamageInstance_count = DamageInstance_count - 1 set DamageInstance_current = DamageInstance_stack[DamageInstance_count] endfunction function dealloc_DamageInstance takes integer obj returns nothing if DamageInstance_typeId[obj] == 0 then call error("Double free: object of type DamageInstance") else set DamageInstance_nextFree[DamageInstance_firstFree] = obj set DamageInstance_firstFree = DamageInstance_firstFree + 1 set DamageInstance_typeId[obj] = 0 endif endfunction function destroyDamageInstance takes integer this_1 returns nothing call DamageInstance_onDestroy(this_1) call dealloc_DamageInstance(this_1) endfunction function dispatch_DamageInstance_destroyDamageInstance takes integer this_1 returns nothing if DamageInstance_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DamageInstance.DamageInstance") else call error("Called DamageInstance.DamageInstance on invalid object.") endif endif call destroyDamageInstance(this_1) endfunction function DamageEvent_onDamage takes nothing returns nothing local integer dmg = DamageInstance_current local integer i local integer temp local integer listener_1 if not DamageEvent_abort then call dispatch_DamageInstance_DamageEvent_DamageInstance_setReducedAmount(dmg, GetEventDamage()) set i = 0 set temp = 0 loop exitwhen i > temp set listener_1 = DamageEvent_firstListeners[i] loop exitwhen listener_1 == 0 call dispatch_DamageListener_DamageEvent_DamageListener_onEvent(listener_1) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener_1 = DamageListener_next[listener_1] endif endloop exitwhen DamageEvent_abort set i = i + 1 endloop call BlzSetEventAttackType(DamageInstance_nativeAttackType[dmg]) call BlzSetEventDamageType(DamageInstance_nativeDamageType[dmg]) call BlzSetEventWeaponType(DamageInstance_nativeWeaponType[dmg]) call BlzSetEventDamage(DamageInstance_amount[dmg]) endif call dispatch_DamageInstance_destroyDamageInstance(dmg) set DamageEvent_abort = false endfunction function onEvent_add_DamageEvent_784 takes integer this_1 returns nothing call DamageEvent_onDamage() endfunction function dispatch_EventListener_ClosureEvents_EventListener_onEvent takes integer this_1 returns nothing if EventListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EventListener.onEvent") else call error("Called EventListener.onEvent on invalid object.") endif endif if EventListener_typeId[this_1] <= 1920 then call onEvent_add_DamageEvent(this_1) else call onEvent_add_DamageEvent_784(this_1) endif endfunction function handle_getHandleId takes handle this_1 returns integer return GetHandleId(this_1) endfunction function eventid_isKeyboardEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return (eventId >= 261 and eventId <= 268) or eventId == 17 endfunction function eventid_isMouseEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return eventId >= 305 and eventId <= 307 endfunction function eventid_isPlayerunitEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return (eventId >= 18 and eventId <= 51) or (eventId >= 269 and eventId <= 277) or eventId == 315 or eventId == 308 endfunction function int_toString takes integer this_1 returns string return I2S(this_1) endfunction function trigger_addAction takes trigger this_1, code actionFunc returns triggeraction return TriggerAddAction(this_1, actionFunc) endfunction function trigger_addCondition takes trigger this_1, boolexpr condition_1 returns triggercondition return TriggerAddCondition(this_1, condition_1) endfunction function trigger_registerPlayerUnitEvent takes trigger this_1, player whichPlayer, playerunitevent whichPlayerUnitEvent, boolexpr filter returns event return TriggerRegisterPlayerUnitEvent(this_1, whichPlayer, whichPlayerUnitEvent, filter) endfunction function registerPlayerUnitEvent_816 takes playerunitevent p, code filter, code condition_1, code action_1 returns nothing local integer hid = handle_getHandleId(p) local integer k local filterfunc cond_result local trigger temp local player temp_1 if RegisterEvents_t[hid] == null then set RegisterEvents_t[hid] = CreateTrigger() set k = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen k < 0 set temp = RegisterEvents_t[hid] set temp_1 = Player_players[k] if filter != null then set cond_result = Filter(filter) else set cond_result = null endif call trigger_registerPlayerUnitEvent(temp, temp_1, p, cond_result) set k = k - 1 endloop endif if condition_1 != null then call trigger_addCondition(RegisterEvents_t[hid], Filter(condition_1)) endif if action_1 != null then call trigger_addAction(RegisterEvents_t[hid], action_1) endif endfunction function registerPlayerUnitEvent takes playerunitevent p, code c returns nothing call registerPlayerUnitEvent_816(p, null, c, null) endfunction function trigger_registerPlayerEvent takes trigger this_1, player whichPlayer, playerevent whichPlayerEvent returns event return TriggerRegisterPlayerEvent(this_1, whichPlayer, whichPlayerEvent) endfunction function registerEventId takes eventid evnt returns integer local integer i = handle_getHandleId(evnt) local integer temp local trigger receiver set ClosureEvents_eventTypeCounter = ClosureEvents_eventTypeCounter + 1 set ClosureEvents_eventidToIndex[i] = ClosureEvents_eventTypeCounter if eventid_isPlayerunitEvent(evnt) then call registerPlayerUnitEvent(ConvertPlayerUnitEvent(i), ref_function_EventListener_generalEventCallback) elseif evnt != EVENT_UNIT_DAMAGED and evnt != EVENT_PLAYER_LEAVE and evnt != ClosureEvents_EVENT_PLAYER_CHAT_FILTER and ( not eventid_isKeyboardEvent(evnt)) and ( not eventid_isMouseEvent(evnt)) then call error("registering handleid: " + int_toString(i) + " non-playerunitevent. Except EVENT_UNIT_DAMAGED and EVENT_PLAYER_LEAVE these are not supported right now.") endif if eventid_isMouseEvent(evnt) and ( not EventListener_useMouseEvents) then set EventListener_useMouseEvents = true set i = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen i > temp set receiver = ClosureEvents_keyTrig call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_UP) call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_MOVE) set i = i + 1 endloop endif return ClosureEvents_eventTypeCounter endfunction function eventid_toIntId takes eventid this_1 returns integer local integer id_1 = ClosureEvents_eventidToIndex[handle_getHandleId(this_1)] if id_1 == 0 then set id_1 = registerEventId(this_1) endif return id_1 endfunction function fireEvents takes unit w_u returns boolean return true endfunction function unit_getUserData takes unit this_1 returns integer return GetUnitUserData(this_1) endfunction function unit_getIndex takes unit this_1 returns integer return unit_getUserData(this_1) endfunction function EventListener_generalEventCallback takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer id_1 = eventid_toIntId(GetTriggerEventId()) local integer listener_1 local integer nextListener if trigUnit != null and fireEvents(trigUnit) and unit_getIndex(trigUnit) > 0 then if EventListener_unitListenersFirsts[unit_getIndex(trigUnit)] != 0 then set listener_1 = EventListener_unitListenersFirsts[unit_getIndex(trigUnit)] loop exitwhen listener_1 == 0 set nextListener = EventListener_next[listener_1] if EventListener_eventId[listener_1] == id_1 then call dispatch_EventListener_ClosureEvents_EventListener_onEvent(listener_1) endif set listener_1 = nextListener endloop endif endif if EventListener_generalListenersFirsts[id_1] != 0 then set nextListener = EventListener_generalListenersFirsts[id_1] loop exitwhen nextListener == 0 set id_1 = EventListener_next[nextListener] call dispatch_EventListener_ClosureEvents_EventListener_onEvent(nextListener) set nextListener = id_1 endloop endif endfunction function EventData_getOrderPos takes nothing returns real set EventData_getOrderPos_return_x = GetOrderPointX() set EventData_getOrderPos_return_y = GetOrderPointY() return EventData_getOrderPos_return_x endfunction function EventData_getOrderTargetUnit takes nothing returns unit return GetOrderTargetUnit() endfunction function unit_getX takes unit this_1 returns real return GetUnitX(this_1) endfunction function unit_getY takes unit this_1 returns real return GetUnitY(this_1) endfunction function unit_getPos takes unit this_1 returns real set unit_getPos_return_x = unit_getX(this_1) set unit_getPos_return_y = unit_getY(this_1) return unit_getPos_return_x endfunction function EventData_getOrderTargetPos takes nothing returns real set EventData_getOrderTargetPos_return_x = unit_getPos(EventData_getOrderTargetUnit()) set EventData_getOrderTargetPos_return_y = unit_getPos_return_y return EventData_getOrderTargetPos_return_x endfunction function Log_trace takes string msg returns nothing call printLog(Player_localPlayer, 0, msg) endfunction function badOrderList takes integer id_1 returns boolean return id_1 == 852055 or id_1 == 852056 or id_1 == 852064 or id_1 == 852065 or id_1 == 852067 or id_1 == 852068 or id_1 == 852076 or id_1 == 852077 or id_1 == 852090 or id_1 == 852091 or id_1 == 852100 or id_1 == 852102 or id_1 == 852103 or id_1 == 852107 or id_1 == 852108 or id_1 == 852129 or id_1 == 852130 or id_1 == 852133 or id_1 == 852134 or id_1 == 852136 or id_1 == 852137 or id_1 == 852150 or id_1 == 852151 or id_1 == 852174 or id_1 == 852158 or id_1 == 852159 or id_1 == 852162 or id_1 == 852163 or id_1 == 852174 or id_1 == 852175 or id_1 == 852177 or id_1 == 852178 or id_1 == 852191 or id_1 == 852192 or id_1 == 852198 or id_1 == 852199 or id_1 == 852203 or id_1 == 852204 or id_1 == 852212 or id_1 == 852213 or id_1 == 852244 or id_1 == 852245 or id_1 == 852249 or id_1 == 852250 or id_1 == 852255 or id_1 == 852256 or id_1 == 852458 or id_1 == 852459 or id_1 == 852478 or id_1 == 852479 or id_1 == 852484 or id_1 == 852485 or id_1 == 852515 or id_1 == 852516 or id_1 == 852522 or id_1 == 852523 or id_1 == 852540 or id_1 == 852541 or id_1 == 852543 or id_1 == 852544 or id_1 == 852546 or id_1 == 852547 or id_1 == 852549 or id_1 == 852550 or id_1 == 852552 or id_1 == 852553 or id_1 == 852562 or id_1 == 852563 or id_1 == 852571 or id_1 == 852578 or id_1 == 852579 or id_1 == 852589 or id_1 == 852590 or id_1 == 852602 or id_1 == 852603 or id_1 == 852671 or id_1 == 852672 endfunction function unit_orderFilter takes unit this_1, integer id_1 returns boolean return id_1 == 851971 or id_1 == 851986 or id_1 == 851983 or id_1 == 851984 or id_1 == 851990 or id_1 == 851993 or (id_1 >= 852055 and id_1 <= 852762) and ( not badOrderList(id_1)) endfunction function conditions takes nothing returns boolean return unit_orderFilter(GetTriggerUnit(), GetIssuedOrderId()) endfunction function alloc_Order takes nothing returns integer local integer this_1 if Order_firstFree == 0 then if Order_maxIndex < 32768 then set Order_maxIndex = Order_maxIndex + 1 set this_1 = Order_maxIndex set Order_typeId[this_1] = 3293 else call error("Out of memory: Could not create Order.") set this_1 = 0 endif else set Order_firstFree = Order_firstFree - 1 set this_1 = Order_nextFree[Order_firstFree] set Order_typeId[this_1] = 3293 endif return this_1 endfunction function Order_init takes integer this_1 returns nothing set Order_prev[this_1] = 0 set Order_orderedUnit[this_1] = null endfunction function dealloc_Order takes integer obj returns nothing if Order_typeId[obj] == 0 then call error("Double free: object of type Order") else set Order_nextFree[Order_firstFree] = obj set Order_firstFree = Order_firstFree + 1 set Order_typeId[obj] = 0 endif endfunction function cyc_Order_onDestroy takes integer funcChoice, integer this_1 returns nothing if funcChoice == 0 then if Order_prev[this_1] != 0 then call cyc_Order_onDestroy(2, Order_prev[this_1]) set Order_prev[this_1] = 0 endif elseif funcChoice == 1 then call cyc_Order_onDestroy(0, this_1) call dealloc_Order(this_1) elseif funcChoice == 2 then if Order_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Order.Order") else call error("Called Order.Order on invalid object.") endif endif call cyc_Order_onDestroy(1, this_1) endif endfunction function construct_Order takes integer this_1, unit ordered, integer orderId, integer ordtype, widget target, real targetPos_x, real targetPos_y returns nothing local integer i call Order_init(this_1) set Order_orderedUnit[this_1] = ordered if ordered != null then set orderId = unit_getIndex(ordered) if LastOrder_lastOrder[orderId] != 0 then if Order_orderedUnit[LastOrder_lastOrder[orderId]] == Order_orderedUnit[this_1] then set Order_prev[this_1] = LastOrder_lastOrder[orderId] else call cyc_Order_onDestroy(2, LastOrder_lastOrder[orderId]) endif endif set i = 0 set ordtype = this_1 loop exitwhen Order_prev[ordtype] == 0 set i = i + 1 if i > 3 then call cyc_Order_onDestroy(2, Order_prev[ordtype]) set Order_prev[ordtype] = 0 exitwhen true endif set ordtype = Order_prev[ordtype] endloop set LastOrder_lastOrder[orderId] = this_1 endif endfunction function new_Order takes unit ordered, integer orderId, integer ordtype, widget target, real targetPos_x, real targetPos_y returns integer local integer this_1 = alloc_Order() call construct_Order(this_1, ordered, orderId, ordtype, target, targetPos_x, targetPos_y) return this_1 endfunction function actions takes nothing returns nothing local unit u_1 local widget t local integer oid if conditions() then set u_1 = GetTriggerUnit() set t = GetOrderTarget() set oid = GetIssuedOrderId() call Log_trace("ordered: <" + OrderId2StringBJ(oid) + ">") if GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER then call new_Order(u_1, oid, 0, t, EventData_getOrderTargetPos(), EventData_getOrderTargetPos_return_y) elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER then call new_Order(u_1, oid, 1, null, EventData_getOrderPos(), EventData_getOrderPos_return_y) elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_ORDER then call new_Order(u_1, oid, 2, null, unit_getPos(u_1), unit_getPos_return_y) endif endif endfunction function currentCallback takes nothing returns integer return ClosureForGroups_tempCallbacks[-1] endfunction function alloc_LLEntry takes nothing returns integer local integer this_1 if LLEntry_firstFree == 0 then if LLEntry_maxIndex < 32768 then set LLEntry_maxIndex = LLEntry_maxIndex + 1 set this_1 = LLEntry_maxIndex set LLEntry_typeId[this_1] = 2715 else call error("Out of memory: Could not create LLEntry.") set this_1 = 0 endif else set LLEntry_firstFree = LLEntry_firstFree - 1 set this_1 = LLEntry_nextFree[LLEntry_firstFree] set LLEntry_typeId[this_1] = 2715 endif return this_1 endfunction function LLEntry_init takes integer this_1 returns nothing endfunction function construct_LLEntry takes integer this_1, integer elem, integer prev, integer next returns nothing call LLEntry_init(this_1) set LLEntry_elem[this_1] = elem set LLEntry_prev[this_1] = prev set LLEntry_next[this_1] = next endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this_1 = alloc_LLEntry() call construct_LLEntry(this_1, elem, prev, next) return this_1 endfunction function LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing local integer entry = new_LLEntry(elems_0, LLEntry_prev[LinkedList_dummy[this_1]], LinkedList_dummy[this_1]) set LLEntry_next[LLEntry_prev[LinkedList_dummy[this_1]]] = entry set LLEntry_prev[LinkedList_dummy[this_1]] = entry set LinkedList_size[this_1] = LinkedList_size[this_1] + 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.add") else call error("Called LinkedList.add on invalid object.") endif endif call LinkedList_add_1(this_1, elems_0) endfunction function unitToIndex takes unit object returns integer return handle_getHandleId(object) endfunction function callback_forEachFrom_LinkedList takes integer this_1, unit u_1 returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(result[this_1], unitToIndex(u_1)) endfunction function unit_remove takes unit this_1 returns nothing call RemoveUnit(this_1) endfunction function callback_forEachFrom_Preloader takes integer this_1, unit u_1 returns nothing call unit_remove(u_1) endfunction function dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback takes integer this_1, unit u_1 returns nothing if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.callback") else call error("Called ForGroupCallback.callback on invalid object.") endif endif if ForGroupCallback_typeId[this_1] <= 2071 then call callback_forEachFrom_LinkedList(this_1, u_1) else call callback_forEachFrom_Preloader(this_1, u_1) endif endfunction function filterCallback takes unit filter returns nothing if ClosureForGroups_iterCount < 2147483647 then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(currentCallback(), filter) endif set ClosureForGroups_iterCount = ClosureForGroups_iterCount + 1 endfunction function code__Filter_ClosureForGroups takes nothing returns nothing call filterCallback(GetFilterUnit()) endfunction function trigger_registerUnitEvent takes trigger this_1, unit whichUnit, unitevent whichEvent returns event return TriggerRegisterUnitEvent(this_1, whichUnit, whichEvent) endfunction function addUnit takes unit u_1 returns nothing call trigger_registerUnitEvent(DamageDetection_current, u_1, EVENT_UNIT_DAMAGED) endfunction function code__Filter_DamageDetection takes nothing returns nothing call addUnit(GetFilterUnit()) endfunction function popUnit takes nothing returns nothing set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount - 1 endfunction function pushUnit takes unit u_1 returns nothing set OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount] = u_1 set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount + 1 endfunction function trigger_evaluate takes trigger this_1 returns boolean return TriggerEvaluate(this_1) endfunction function unit_addAbility takes unit this_1, integer abil returns boolean return UnitAddAbility(this_1, abil) endfunction function unit_makeAbilityPermanent takes unit this_1, integer abil, boolean flag returns boolean return UnitMakeAbilityPermanent(this_1, flag, abil) endfunction function prepareUnit takes unit u_1 returns nothing call unit_addAbility(u_1, 1095577652) call unit_makeAbilityPermanent(u_1, 1095577652, true) call pushUnit(u_1) call trigger_evaluate(OnUnitEnterLeave_eventTrigger) call popUnit() endfunction function code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetFilterUnit()) endfunction function code__ForGroup_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetEnumUnit()) endfunction function ChunkedString_hasChunk takes integer this_1 returns boolean return ChunkedString_readIndex[this_1] < ChunkedString_chunkCount[this_1] endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk takes integer this_1 returns boolean if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.hasChunk") else call error("Called ChunkedString.hasChunk on invalid object.") endif endif return ChunkedString_hasChunk(this_1) endfunction function hashtable_loadString takes hashtable this_1, integer parentKey, integer childKey returns string return LoadStr(this_1, parentKey, childKey) endfunction function Table_loadString takes integer this_1, integer parentKey returns string return hashtable_loadString(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadString takes integer this_1, integer parentKey returns string if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadString") else call error("Called Table.loadString on invalid object.") endif endif return Table_loadString(this_1, parentKey) endfunction function ChunkedString_getChunk takes integer this_1, integer index returns string if index == ChunkedString_chunkCount[this_1] then return ChunkedString_buffer[this_1] endif return dispatch_Table_Table_Table_loadString(ChunkedString_table[this_1], index) endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk takes integer this_1, integer index returns string if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunk") else call error("Called ChunkedString.getChunk on invalid object.") endif endif return ChunkedString_getChunk(this_1, index) endfunction function ChunkedString_readChunk takes integer this_1 returns string set ChunkedString_readIndex[this_1] = ChunkedString_readIndex[this_1] + 1 return dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(this_1, ChunkedString_readIndex[this_1]) endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk takes integer this_1 returns string if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.readChunk") else call error("Called ChunkedString.readChunk on invalid object.") endif endif return ChunkedString_readChunk(this_1) endfunction function LinkedList_getFirst takes integer this_1 returns integer return LLEntry_elem[LLEntry_next[LinkedList_dummy[this_1]]] endfunction function dispatch_LinkedList_LinkedList_LinkedList_getFirst takes integer this_1 returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.getFirst") else call error("Called LinkedList.getFirst on invalid object.") endif endif return LinkedList_getFirst(this_1) endfunction function LinkedList_isEmpty takes integer this_1 returns boolean return LinkedList_size[this_1] == 0 endfunction function dispatch_LinkedList_LinkedList_LinkedList_isEmpty takes integer this_1 returns boolean if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.isEmpty") else call error("Called LinkedList.isEmpty on invalid object.") endif endif return LinkedList_isEmpty(this_1) endfunction function checkQueue takes nothing returns nothing local integer syncData local string data_1 local boolean hasChunk if not dispatch_LinkedList_LinkedList_LinkedList_isEmpty(SyncSimple_syncQueue) then set syncData = dispatch_LinkedList_LinkedList_LinkedList_getFirst(SyncSimple_syncQueue) if SyncData_data[syncData] != null then if Player_localPlayer == SyncData_syncer[syncData] then call BlzSendSyncData("S", SyncData_data[syncData]) endif else set data_1 = dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(SyncData_buffer[syncData]) set hasChunk = dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk(SyncData_buffer[syncData]) if Player_localPlayer == SyncData_syncer[syncData] then if hasChunk then call BlzSendSyncData("S", data_1) else call BlzSendSyncData("T", data_1) endif endif endif endif endfunction function string_length takes string this_1 returns integer return StringLength(this_1) endfunction function ChunkedString_length takes integer this_1 returns integer return ChunkedString_chunkCount[this_1] * ChunkedString_chunkSize[this_1] + string_length(ChunkedString_buffer[this_1]) endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_length takes integer this_1 returns integer if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.length") else call error("Called ChunkedString.length on invalid object.") endif endif return ChunkedString_length(this_1) endfunction function ChunkedString_resetRead takes integer this_1 returns nothing set ChunkedString_readIndex[this_1] = -1 endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_resetRead takes integer this_1 returns nothing if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.resetRead") else call error("Called ChunkedString.resetRead on invalid object.") endif endif call ChunkedString_resetRead(this_1) endfunction function dispatch_LoadListener_SaveLoadData_LoadListener_onLoad takes integer this_1, integer status, integer data_1 returns nothing endfunction function onDataSynced_sync_SaveLoadData takes integer this_1, integer syncedBuffer returns nothing if dispatch_ChunkedString_ChunkedString_ChunkedString_length(syncedBuffer) == 0 then call dispatch_LoadListener_SaveLoadData_LoadListener_onLoad(listener[this_1], 2, syncedBuffer) elseif dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(syncedBuffer) == "-" then call dispatch_LoadListener_SaveLoadData_LoadListener_onLoad(listener[this_1], 3, syncedBuffer) else call dispatch_ChunkedString_ChunkedString_ChunkedString_resetRead(syncedBuffer) call dispatch_LoadListener_SaveLoadData_LoadListener_onLoad(listener[this_1], 0, syncedBuffer) endif endfunction function dispatch_BufferSyncListener_SyncSimple_BufferSyncListener_onDataSynced takes integer this_1, integer buffer returns nothing if BufferSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BufferSyncListener.onDataSynced") else call error("Called BufferSyncListener.onDataSynced on invalid object.") endif endif call onDataSynced_sync_SaveLoadData(this_1, buffer) endfunction function hashtable_saveString takes hashtable this_1, integer parentKey, integer childKey, string value returns nothing call SaveStr(this_1, parentKey, childKey, value) endfunction function Table_saveString takes integer this_1, integer parentKey, string value returns nothing call hashtable_saveString(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveString takes integer this_1, integer parentKey, string value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveString") else call error("Called Table.saveString on invalid object.") endif endif call Table_saveString(this_1, parentKey, value) endfunction function min_2 takes integer numbers_0, integer numbers_1 returns integer if numbers_0 < 2147483647 then else set numbers_0 = 2147483647 endif if numbers_1 < numbers_0 then set numbers_0 = numbers_1 endif return numbers_0 endfunction function string_substring takes string this_1, integer start, integer stop returns string return SubString(this_1, start, stop) endfunction function string_substring_836 takes string this_1, integer start returns string return SubString(this_1, start, string_length(this_1)) endfunction function ChunkedString_append takes integer this_1, string pdata returns nothing local integer remain loop set remain = ChunkedString_chunkSize[this_1] - string_length(ChunkedString_buffer[this_1]) set ChunkedString_buffer[this_1] = ChunkedString_buffer[this_1] + string_substring(pdata, 0, remain) if string_length(ChunkedString_buffer[this_1]) >= ChunkedString_chunkSize[this_1] then call dispatch_Table_Table_Table_saveString(ChunkedString_table[this_1], ChunkedString_chunkCount[this_1], ChunkedString_buffer[this_1]) set ChunkedString_buffer[this_1] = "" set ChunkedString_chunkCount[this_1] = ChunkedString_chunkCount[this_1] + 1 endif set pdata = string_substring_836(pdata, min_2(remain, string_length(pdata))) exitwhen string_length(pdata) == 0 endloop endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_append takes integer this_1, string pdata returns nothing if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.append") else call error("Called ChunkedString.append on invalid object.") endif endif call ChunkedString_append(this_1, pdata) endfunction function LLEntry_onDestroy takes integer this_1 returns nothing endfunction function dealloc_LLEntry takes integer obj returns nothing if LLEntry_typeId[obj] == 0 then call error("Double free: object of type LLEntry") else set LLEntry_nextFree[LLEntry_firstFree] = obj set LLEntry_firstFree = LLEntry_firstFree + 1 set LLEntry_typeId[obj] = 0 endif endfunction function destroyLLEntry takes integer this_1 returns nothing call LLEntry_onDestroy(this_1) call dealloc_LLEntry(this_1) endfunction function dispatch_LLEntry_destroyLLEntry takes integer this_1 returns nothing if LLEntry_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLEntry.LLEntry") else call error("Called LLEntry.LLEntry on invalid object.") endif endif call destroyLLEntry(this_1) endfunction function LinkedList_removeEntry takes integer this_1, integer entry returns nothing set LLEntry_next[LLEntry_prev[entry]] = LLEntry_next[entry] set LLEntry_prev[LLEntry_next[entry]] = LLEntry_prev[entry] call dispatch_LLEntry_destroyLLEntry(entry) set LinkedList_size[this_1] = LinkedList_size[this_1] - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_removeEntry takes integer this_1, integer entry returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.removeEntry") else call error("Called LinkedList.removeEntry on invalid object.") endif endif call LinkedList_removeEntry(this_1, entry) endfunction function LinkedList_dequeue takes integer this_1 returns integer local integer top = LLEntry_next[LinkedList_dummy[this_1]] local integer result_1 = 0 if top != LinkedList_dummy[this_1] then set result_1 = LLEntry_elem[top] call dispatch_LinkedList_LinkedList_LinkedList_removeEntry(this_1, top) endif return result_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_dequeue takes integer this_1 returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.dequeue") else call error("Called LinkedList.dequeue on invalid object.") endif endif return LinkedList_dequeue(this_1) endfunction function dispatch_BoolSyncListener_SyncSimple_BoolSyncListener_onDataSynced takes integer this_1, boolean data_1 returns nothing endfunction function dealloc_BoolSyncListener takes integer obj returns nothing if BoolSyncListener_typeId[obj] == 0 then call error("Double free: object of type BoolSyncListener") else set BoolSyncListener_firstFree = BoolSyncListener_firstFree + 1 set BoolSyncListener_typeId[obj] = 0 endif endfunction function destroyBoolSyncListener takes integer this_1 returns nothing call dealloc_BoolSyncListener(this_1) endfunction function dispatch_BoolSyncListener_destroyBoolSyncListener takes integer this_1 returns nothing if BoolSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BoolSyncListener.BoolSyncListener") else call error("Called BoolSyncListener.BoolSyncListener on invalid object.") endif endif call destroyBoolSyncListener(this_1) endfunction function string_toBool takes string this_1 returns boolean local boolean cond_result if this_1 == "1" or this_1 == "true" then set cond_result = true else set cond_result = false endif return cond_result endfunction function onDataSynced_sync_SyncSimple takes integer this_1, string data_1 returns nothing call dispatch_BoolSyncListener_SyncSimple_BoolSyncListener_onDataSynced(listener_349[this_1], string_toBool(data_1)) call dispatch_BoolSyncListener_destroyBoolSyncListener(listener_349[this_1]) endfunction function dispatch_IntSyncListener_SyncSimple_IntSyncListener_onDataSynced takes integer this_1, integer data_1 returns nothing endfunction function dealloc_IntSyncListener takes integer obj returns nothing if IntSyncListener_typeId[obj] == 0 then call error("Double free: object of type IntSyncListener") else set IntSyncListener_firstFree = IntSyncListener_firstFree + 1 set IntSyncListener_typeId[obj] = 0 endif endfunction function destroyIntSyncListener takes integer this_1 returns nothing call dealloc_IntSyncListener(this_1) endfunction function dispatch_IntSyncListener_destroyIntSyncListener takes integer this_1 returns nothing if IntSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IntSyncListener.IntSyncListener") else call error("Called IntSyncListener.IntSyncListener on invalid object.") endif endif call destroyIntSyncListener(this_1) endfunction function string_toInt takes string this_1 returns integer return S2I(this_1) endfunction function onDataSynced_sync_SyncSimple_778 takes integer this_1, string data_1 returns nothing call dispatch_IntSyncListener_SyncSimple_IntSyncListener_onDataSynced(listener_350[this_1], string_toInt(data_1)) call dispatch_IntSyncListener_destroyIntSyncListener(listener_350[this_1]) endfunction function dispatch_RealSyncListener_SyncSimple_RealSyncListener_onDataSynced takes integer this_1, real data_1 returns nothing endfunction function dealloc_RealSyncListener takes integer obj returns nothing if RealSyncListener_typeId[obj] == 0 then call error("Double free: object of type RealSyncListener") else set RealSyncListener_firstFree = RealSyncListener_firstFree + 1 set RealSyncListener_typeId[obj] = 0 endif endfunction function destroyRealSyncListener takes integer this_1 returns nothing call dealloc_RealSyncListener(this_1) endfunction function dispatch_RealSyncListener_destroyRealSyncListener takes integer this_1 returns nothing if RealSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling RealSyncListener.RealSyncListener") else call error("Called RealSyncListener.RealSyncListener on invalid object.") endif endif call destroyRealSyncListener(this_1) endfunction function string_toReal takes string this_1 returns real return S2R(this_1) endfunction function onDataSynced_sync_SyncSimple_779 takes integer this_1, string data_1 returns nothing call dispatch_RealSyncListener_SyncSimple_RealSyncListener_onDataSynced(listener_351[this_1], string_toReal(data_1)) call dispatch_RealSyncListener_destroyRealSyncListener(listener_351[this_1]) endfunction function dispatch_StringSyncListener_SyncSimple_StringSyncListener_onDataSynced takes integer this_1, string data_1 returns nothing if StringSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling StringSyncListener.onDataSynced") else call error("Called StringSyncListener.onDataSynced on invalid object.") endif endif if StringSyncListener_typeId[this_1] <= 4086 then if StringSyncListener_typeId[this_1] <= 4085 then call onDataSynced_sync_SyncSimple(this_1, data_1) else call onDataSynced_sync_SyncSimple_778(this_1, data_1) endif else call onDataSynced_sync_SyncSimple_779(this_1, data_1) endif endfunction function dealloc_BufferSyncListener takes integer obj returns nothing if BufferSyncListener_typeId[obj] == 0 then call error("Double free: object of type BufferSyncListener") else set BufferSyncListener_firstFree = BufferSyncListener_firstFree + 1 set BufferSyncListener_typeId[obj] = 0 endif endfunction function destroyBufferSyncListener takes integer this_1 returns nothing call dealloc_BufferSyncListener(this_1) endfunction function dispatch_BufferSyncListener_destroyBufferSyncListener takes integer this_1 returns nothing if BufferSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BufferSyncListener.BufferSyncListener") else call error("Called BufferSyncListener.BufferSyncListener on invalid object.") endif endif call destroyBufferSyncListener(this_1) endfunction function hashtable_flushChild takes hashtable this_1, integer parentKey returns nothing call FlushChildHashtable(this_1, parentKey) endfunction function Table_flush takes integer this_1 returns nothing call hashtable_flushChild(Table_ht, this_1) endfunction function HashMap_flush takes integer this_1 returns nothing set HashMap_size[this_1] = 0 call Table_flush(this_1) endfunction function HashList_clear takes integer this_1 returns nothing call hashtable_flushChild(HashList_ht, this_1) call hashtable_flushChild(HashList_occurences, this_1) set HashList_size[this_1] = 0 endfunction function HashSet_clear takes integer this_1 returns nothing call HashList_clear(this_1) call hashtable_flushChild(HashSet_position, this_1) endfunction function dispatch_HashList_HashList_HashList_clear takes integer this_1 returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.clear") else call error("Called HashList.clear on invalid object.") endif endif if HashList_typeId[this_1] <= 2302 then call HashList_clear(this_1) else call HashSet_clear(this_1) endif endfunction function IterableMap_flush takes integer this_1 returns nothing if not IterableMap__destroyed[this_1] then call dispatch_HashList_HashList_HashList_clear(IterableMap_keys[this_1]) endif call HashMap_flush(this_1) endfunction function dispatch_Table_Table_Table_flush takes integer this_1 returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.flush") else call error("Called Table.flush on invalid object.") endif endif if Table_typeId[this_1] <= 4108 then if Table_typeId[this_1] <= 4107 then call Table_flush(this_1) else call HashMap_flush(this_1) endif else call IterableMap_flush(this_1) endif endfunction function Table_onDestroy takes integer this_1 returns nothing call dispatch_Table_Table_Table_flush(this_1) endfunction function HashMap_onDestroy takes integer this_1 returns nothing call Table_onDestroy(this_1) endfunction function HashList_onDestroy takes integer this_1 returns nothing call dispatch_HashList_HashList_HashList_clear(this_1) endfunction function dealloc_HashList takes integer obj returns nothing if HashList_typeId[obj] == 0 then call error("Double free: object of type HashList") else set HashList_firstFree = HashList_firstFree + 1 set HashList_typeId[obj] = 0 endif endfunction function destroyHashList takes integer this_1 returns nothing call HashList_onDestroy(this_1) call dealloc_HashList(this_1) endfunction function HashSet_onDestroy takes integer this_1 returns nothing call hashtable_flushChild(HashSet_position, this_1) call HashList_onDestroy(this_1) endfunction function dealloc_HashSet takes integer obj returns nothing if HashList_typeId[obj] == 0 then call error("Double free: object of type HashSet") else set HashList_firstFree = HashList_firstFree + 1 set HashList_typeId[obj] = 0 endif endfunction function destroyHashSet takes integer this_1 returns nothing call HashSet_onDestroy(this_1) call dealloc_HashSet(this_1) endfunction function dispatch_HashList_destroyHashList takes integer this_1 returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.HashList") else call error("Called HashList.HashList on invalid object.") endif endif if HashList_typeId[this_1] <= 2302 then call destroyHashList(this_1) else call destroyHashSet(this_1) endif endfunction function IterableMap_onDestroy takes integer this_1 returns nothing call dispatch_HashList_destroyHashList(IterableMap_keys[this_1]) set IterableMap__destroyed[this_1] = true call HashMap_onDestroy(this_1) endfunction function dealloc_IterableMap takes integer obj returns nothing if Table_typeId[obj] == 0 then call error("Double free: object of type IterableMap") else set Table_nextFree[Table_firstFree] = obj set Table_firstFree = Table_firstFree + 1 set Table_typeId[obj] = 0 endif endfunction function destroyIterableMap takes integer this_1 returns nothing call IterableMap_onDestroy(this_1) call dealloc_IterableMap(this_1) endfunction function dealloc_Table takes integer obj returns nothing if Table_typeId[obj] == 0 then call error("Double free: object of type Table") else set Table_nextFree[Table_firstFree] = obj set Table_firstFree = Table_firstFree + 1 set Table_typeId[obj] = 0 endif endfunction function destroyTable takes integer this_1 returns nothing call Table_onDestroy(this_1) call dealloc_Table(this_1) endfunction function dispatch_Table_destroyTable takes integer this_1 returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.Table") else call error("Called Table.Table on invalid object.") endif endif if Table_typeId[this_1] <= 4108 then call destroyTable(this_1) else call destroyIterableMap(this_1) endif endfunction function ChunkedString_onDestroy takes integer this_1 returns nothing call dispatch_Table_destroyTable(ChunkedString_table[this_1]) endfunction function dealloc_ChunkedString takes integer obj returns nothing if ChunkedString_typeId[obj] == 0 then call error("Double free: object of type ChunkedString") else set ChunkedString_nextFree[ChunkedString_firstFree] = obj set ChunkedString_firstFree = ChunkedString_firstFree + 1 set ChunkedString_typeId[obj] = 0 endif endfunction function destroyChunkedString takes integer this_1 returns nothing call ChunkedString_onDestroy(this_1) call dealloc_ChunkedString(this_1) endfunction function dispatch_ChunkedString_destroyChunkedString takes integer this_1 returns nothing if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.ChunkedString") else call error("Called ChunkedString.ChunkedString on invalid object.") endif endif call destroyChunkedString(this_1) endfunction function dealloc_StringSyncListener takes integer obj returns nothing if StringSyncListener_typeId[obj] == 0 then call error("Double free: object of type StringSyncListener") else set StringSyncListener_firstFree = StringSyncListener_firstFree + 1 set StringSyncListener_typeId[obj] = 0 endif endfunction function destroyStringSyncListener takes integer this_1 returns nothing call dealloc_StringSyncListener(this_1) endfunction function dispatch_StringSyncListener_destroyStringSyncListener takes integer this_1 returns nothing if StringSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling StringSyncListener.StringSyncListener") else call error("Called StringSyncListener.StringSyncListener on invalid object.") endif endif call destroyStringSyncListener(this_1) endfunction function SyncData_onDestroy takes integer this_1 returns nothing if SyncData_slistener[this_1] != 0 then call dispatch_StringSyncListener_destroyStringSyncListener(SyncData_slistener[this_1]) endif if SyncData_blistener[this_1] != 0 then call dispatch_BufferSyncListener_destroyBufferSyncListener(SyncData_blistener[this_1]) endif if SyncData_buffer[this_1] != 0 then call dispatch_ChunkedString_destroyChunkedString(SyncData_buffer[this_1]) endif endfunction function dealloc_SyncData takes integer obj returns nothing if SyncData_typeId[obj] == 0 then call error("Double free: object of type SyncData") else set SyncData_firstFree = SyncData_firstFree + 1 set SyncData_typeId[obj] = 0 endif endfunction function destroySyncData takes integer this_1 returns nothing call SyncData_onDestroy(this_1) call dealloc_SyncData(this_1) endfunction function dispatch_SyncData_destroySyncData takes integer this_1 returns nothing if SyncData_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SyncData.SyncData") else call error("Called SyncData.SyncData on invalid object.") endif endif call destroySyncData(this_1) endfunction function shouldSync takes nothing returns boolean return GameStatus_gameStatus != 3 endfunction function code__addAction_SyncSimple takes nothing returns nothing local string eventData = BlzGetTriggerSyncData() local string eventPrefix = BlzGetTriggerSyncPrefix() local integer syncData = dispatch_LinkedList_LinkedList_LinkedList_getFirst(SyncSimple_syncQueue) if SyncData_data[syncData] != null then call dispatch_StringSyncListener_SyncSimple_StringSyncListener_onDataSynced(SyncData_slistener[syncData], eventData) call dispatch_LinkedList_LinkedList_LinkedList_dequeue(SyncSimple_syncQueue) call dispatch_SyncData_destroySyncData(syncData) else call dispatch_ChunkedString_ChunkedString_ChunkedString_append(SyncData_syncBuffer[syncData], eventData) if eventPrefix == "T" then call dispatch_BufferSyncListener_SyncSimple_BufferSyncListener_onDataSynced(SyncData_blistener[syncData], SyncData_syncBuffer[syncData]) call dispatch_LinkedList_LinkedList_LinkedList_dequeue(SyncSimple_syncQueue) call dispatch_SyncData_destroySyncData(syncData) endif endif if shouldSync() then call checkQueue() endif endfunction function code__addAction_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_384 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_385 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function getEnterLeaveUnit takes nothing returns unit return OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1] endfunction function code__onEnter_DamageDetection takes nothing returns nothing call addUnit(getEnterLeaveUnit()) endfunction function shouldIndex takes unit w_u returns boolean return true endfunction function alloc_UnitIndex takes nothing returns integer local integer this_1 if UnitIndex_firstFree == 0 then if UnitIndex_maxIndex < 32768 then set UnitIndex_maxIndex = UnitIndex_maxIndex + 1 set this_1 = UnitIndex_maxIndex set UnitIndex_typeId[this_1] = 4310 else call error("Out of memory: Could not create UnitIndex.") set this_1 = 0 endif else set UnitIndex_firstFree = UnitIndex_firstFree - 1 set this_1 = UnitIndex_nextFree[UnitIndex_firstFree] set UnitIndex_typeId[this_1] = 4310 endif return this_1 endfunction function UnitIndex_init takes integer this_1 returns nothing endfunction function popUnit_795 takes nothing returns nothing set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 endfunction function pushUnit_801 takes unit u_1 returns nothing set UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount] = u_1 set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount + 1 endfunction function unit_setUserData takes unit this_1, integer data_1 returns nothing call SetUnitUserData(this_1, data_1) endfunction function construct_UnitIndex takes integer this_1, unit whichUnit returns nothing call UnitIndex_init(this_1) set UnitIndex__unit[this_1] = whichUnit call unit_setUserData(UnitIndex__unit[this_1], this_1) call pushUnit_801(whichUnit) call trigger_evaluate(UnitIndexer_onIndexTrigger) call popUnit_795() endfunction function new_UnitIndex takes unit whichUnit returns integer local integer this_1 = alloc_UnitIndex() call construct_UnitIndex(this_1, whichUnit) return this_1 endfunction function unit_toUnitIndex takes unit this_1 returns integer local integer instance_1 = unit_getUserData(this_1) if instance_1 == 0 then set instance_1 = new_UnitIndex(this_1) endif return instance_1 endfunction function code__onEnter_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_toUnitIndex(getEnterLeaveUnit()) endif endfunction function UnitIndex_onDestroy takes integer this_1 returns nothing call pushUnit_801(UnitIndex__unit[this_1]) call trigger_evaluate(UnitIndexer_onDeindexTrigger) call popUnit_795() call unit_setUserData(UnitIndex__unit[this_1], 0) endfunction function dealloc_UnitIndex takes integer obj returns nothing if UnitIndex_typeId[obj] == 0 then call error("Double free: object of type UnitIndex") else set UnitIndex_nextFree[UnitIndex_firstFree] = obj set UnitIndex_firstFree = UnitIndex_firstFree + 1 set UnitIndex_typeId[obj] = 0 endif endfunction function destroyUnitIndex takes integer this_1 returns nothing call UnitIndex_onDestroy(this_1) call dealloc_UnitIndex(this_1) endfunction function dispatch_UnitIndex_destroyUnitIndex takes integer this_1 returns nothing if UnitIndex_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitIndex.UnitIndex") else call error("Called UnitIndex.UnitIndex on invalid object.") endif endif call destroyUnitIndex(this_1) endfunction function unit_deindex takes unit this_1 returns boolean if unit_getUserData(this_1) == 0 then return false else call dispatch_UnitIndex_destroyUnitIndex(unit_toUnitIndex(this_1)) return true endif endfunction function code__onLeave_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_deindex(getEnterLeaveUnit()) endif endfunction function getIndexingUnit takes nothing returns unit return UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1] endfunction function Table_loadInt takes integer this_1, integer parentKey returns integer return hashtable_loadInt(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadInt takes integer this_1, integer parentKey returns integer if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadInt") else call error("Called Table.loadInt on invalid object.") endif endif return Table_loadInt(this_1, parentKey) endfunction function HashMap_get takes integer this_1, integer key returns integer return dispatch_Table_Table_Table_loadInt(this_1, key) endfunction function dispatch_HashMap_HashMap_HashMap_get takes integer this_1, integer key returns integer if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.get") else call error("Called HashMap.get on invalid object.") endif endif return HashMap_get(this_1, key) endfunction function Table_hasInt takes integer this_1, integer parentKey returns boolean return hashtable_hasInt(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_hasInt takes integer this_1, integer parentKey returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.hasInt") else call error("Called Table.hasInt on invalid object.") endif endif return Table_hasInt(this_1, parentKey) endfunction function HashMap_has takes integer this_1, integer key returns boolean return dispatch_Table_Table_Table_hasInt(this_1, key) endfunction function dispatch_HashMap_HashMap_HashMap_has takes integer this_1, integer key returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.has") else call error("Called HashMap.has on invalid object.") endif endif return HashMap_has(this_1, key) endfunction function Table_saveInt takes integer this_1, integer parentKey, integer value returns nothing call hashtable_saveInt(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveInt takes integer this_1, integer parentKey, integer value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveInt") else call error("Called Table.saveInt on invalid object.") endif endif call Table_saveInt(this_1, parentKey, value) endfunction function HashMap_put takes integer this_1, integer key, integer value returns nothing if not dispatch_HashMap_HashMap_HashMap_has(this_1, key) then set HashMap_size[this_1] = HashMap_size[this_1] + 1 endif call dispatch_Table_Table_Table_saveInt(this_1, key, value) endfunction function HashList_count takes integer this_1, integer elem returns integer return hashtable_loadInt(HashList_occurences, this_1, elem) endfunction function dispatch_HashList_HashList_HashList_count takes integer this_1, integer elem returns integer if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.count") else call error("Called HashList.count on invalid object.") endif endif return HashList_count(this_1, elem) endfunction function HashList_incrOccurences takes integer this_1, integer elem returns nothing call hashtable_saveInt(HashList_occurences, this_1, elem, dispatch_HashList_HashList_HashList_count(this_1, elem) + 1) endfunction function dispatch_HashList_HashList_HashList_incrOccurences takes integer this_1, integer elem returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.incrOccurences") else call error("Called HashList.incrOccurences on invalid object.") endif endif call HashList_incrOccurences(this_1, elem) endfunction function HashList_add_1 takes integer this_1, integer elems_0 returns nothing call hashtable_saveInt(HashList_ht, this_1, HashList_size[this_1], elems_0) call dispatch_HashList_HashList_HashList_incrOccurences(this_1, elems_0) set HashList_size[this_1] = HashList_size[this_1] + 1 endfunction function HashList_size_1 takes integer this_1 returns integer return HashList_size[this_1] endfunction function dispatch_HashList_HashList_HashList_size takes integer this_1 returns integer if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.size") else call error("Called HashList.size on invalid object.") endif endif return HashList_size_1(this_1) endfunction function HashSet_add_1 takes integer this_1, integer elems_0 returns nothing if dispatch_HashList_HashList_HashList_count(this_1, elems_0) <= 0 then call hashtable_saveInt(HashSet_position, this_1, elems_0, dispatch_HashList_HashList_HashList_size(this_1)) call HashList_add_1(this_1, elems_0) endif endfunction function dispatch_HashList_HashList_HashList_add_1 takes integer this_1, integer elems_0 returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.add") else call error("Called HashList.add on invalid object.") endif endif if HashList_typeId[this_1] <= 2302 then call HashList_add_1(this_1, elems_0) else call HashSet_add_1(this_1, elems_0) endif endfunction function HashList_has takes integer this_1, integer elem returns boolean return dispatch_HashList_HashList_HashList_count(this_1, elem) > 0 endfunction function dispatch_HashList_HashList_HashList_has takes integer this_1, integer elem returns boolean if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.has") else call error("Called HashList.has on invalid object.") endif endif return HashList_has(this_1, elem) endfunction function IterableMap_hasKey takes integer this_1, integer key returns boolean return dispatch_HashList_HashList_HashList_has(IterableMap_keys[this_1], key) endfunction function dispatch_IterableMap_HashMap_IterableMap_hasKey takes integer this_1, integer key returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IterableMap.hasKey") else call error("Called IterableMap.hasKey on invalid object.") endif endif return IterableMap_hasKey(this_1, key) endfunction function IterableMap_put takes integer this_1, integer key, integer value returns nothing call HashMap_put(this_1, key, value) if not dispatch_IterableMap_HashMap_IterableMap_hasKey(this_1, key) then call dispatch_HashList_HashList_HashList_add_1(IterableMap_keys[this_1], key) endif endfunction function dispatch_HashMap_HashMap_HashMap_put takes integer this_1, integer key, integer value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.put") else call error("Called HashMap.put on invalid object.") endif endif if Table_typeId[this_1] <= 4108 then call HashMap_put(this_1, key, value) else call IterableMap_put(this_1, key, value) endif endfunction function Table_removeInt takes integer this_1, integer parentKey returns nothing call RemoveSavedInteger(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_removeInt takes integer this_1, integer parentKey returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.removeInt") else call error("Called Table.removeInt on invalid object.") endif endif call Table_removeInt(this_1, parentKey) endfunction function HashMap_remove takes integer this_1, integer key returns nothing if dispatch_HashMap_HashMap_HashMap_has(this_1, key) then set HashMap_size[this_1] = HashMap_size[this_1] - 1 endif call dispatch_Table_Table_Table_removeInt(this_1, key) endfunction function HashList_decrOccurences takes integer this_1, integer elem returns nothing call hashtable_saveInt(HashList_occurences, this_1, elem, dispatch_HashList_HashList_HashList_count(this_1, elem) - 1) endfunction function dispatch_HashList_HashList_HashList_decrOccurences takes integer this_1, integer elem returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.decrOccurences") else call error("Called HashList.decrOccurences on invalid object.") endif endif call HashList_decrOccurences(this_1, elem) endfunction function HashList_removeAt takes integer this_1, integer index returns integer local integer tmp local integer temp call dispatch_HashList_HashList_HashList_decrOccurences(this_1, hashtable_loadInt(HashList_ht, this_1, index)) set tmp = hashtable_loadInt(HashList_ht, this_1, index) set temp = HashList_size[this_1] loop exitwhen index > temp call hashtable_saveInt(HashList_ht, this_1, index, hashtable_loadInt(HashList_ht, this_1, index + 1)) set index = index + 1 endloop set HashList_size[this_1] = HashList_size[this_1] - 1 return tmp endfunction function HashList_get takes integer this_1, integer index returns integer return hashtable_loadInt(HashList_ht, this_1, index) endfunction function dispatch_HashList_HashList_HashList_get takes integer this_1, integer index returns integer if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.get") else call error("Called HashList.get on invalid object.") endif endif return HashList_get(this_1, index) endfunction function hashtable_removeInt takes hashtable this_1, integer parentKey, integer childKey returns nothing call RemoveSavedInteger(this_1, parentKey, childKey) endfunction function HashSet_removeAt takes integer this_1, integer index returns integer local integer i local integer temp call hashtable_removeInt(HashSet_position, this_1, dispatch_HashList_HashList_HashList_get(this_1, index)) set i = index + 1 set temp = dispatch_HashList_HashList_HashList_size(this_1) loop exitwhen i > temp call hashtable_saveInt(HashSet_position, this_1, dispatch_HashList_HashList_HashList_get(this_1, i), hashtable_loadInt(HashSet_position, this_1, dispatch_HashList_HashList_HashList_get(this_1, i)) - 1) set i = i + 1 endloop return HashList_removeAt(this_1, index) endfunction function dispatch_HashList_HashList_HashList_removeAt takes integer this_1, integer index returns integer local integer HashList_HashList_removeAt_result if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.removeAt") else call error("Called HashList.removeAt on invalid object.") endif endif if HashList_typeId[this_1] <= 2302 then set HashList_HashList_removeAt_result = HashList_removeAt(this_1, index) else set HashList_HashList_removeAt_result = HashSet_removeAt(this_1, index) endif return HashList_HashList_removeAt_result endfunction function HashList_remove takes integer this_1, integer t returns boolean local boolean result_1 = false local integer i = 0 local integer temp = HashList_size[this_1] - 1 loop exitwhen i > temp if t == hashtable_loadInt(HashList_ht, this_1, i) then set result_1 = true call dispatch_HashList_HashList_HashList_removeAt(this_1, i) exitwhen true endif set i = i + 1 endloop return result_1 endfunction function dispatch_HashSet_HashSet_HashSet_removeAt takes integer this_1, integer index returns integer if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashSet.removeAt") else call error("Called HashSet.removeAt on invalid object.") endif endif return HashSet_removeAt(this_1, index) endfunction function HashSet_remove takes integer this_1, integer elem returns boolean local boolean result_1 = false if dispatch_HashList_HashList_HashList_count(this_1, elem) > 0 then call dispatch_HashSet_HashSet_HashSet_removeAt(this_1, hashtable_loadInt(HashSet_position, this_1, elem)) set result_1 = true endif return result_1 endfunction function dispatch_HashList_HashList_HashList_remove takes integer this_1, integer t returns boolean local boolean HashList_HashList_remove_result if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.remove") else call error("Called HashList.remove on invalid object.") endif endif if HashList_typeId[this_1] <= 2302 then set HashList_HashList_remove_result = HashList_remove(this_1, t) else set HashList_HashList_remove_result = HashSet_remove(this_1, t) endif return HashList_HashList_remove_result endfunction function IterableMap_remove takes integer this_1, integer key returns nothing call HashMap_remove(this_1, key) if dispatch_IterableMap_HashMap_IterableMap_hasKey(this_1, key) then call dispatch_HashList_HashList_HashList_remove(IterableMap_keys[this_1], key) endif endfunction function dispatch_HashMap_HashMap_HashMap_remove takes integer this_1, integer key returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.remove") else call error("Called HashMap.remove on invalid object.") endif endif if Table_typeId[this_1] <= 4108 then call HashMap_remove(this_1, key) else call IterableMap_remove(this_1, key) endif endfunction function OnCastListener_onDestroy takes integer this_1 returns nothing local integer index if OnCastListener_eventUnit[this_1] != null then set index = unit_getIndex(OnCastListener_eventUnit[this_1]) if EventListener_castMapCasters[index] == this_1 then if OnCastListener_next[this_1] != 0 then set EventListener_castMapCasters[index] = OnCastListener_next[this_1] else set EventListener_castMapCasters[index] = 0 endif elseif OnCastListener_prev[this_1] != 0 then set OnCastListener_next[OnCastListener_prev[this_1]] = OnCastListener_next[this_1] endif elseif dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, OnCastListener_abilId[this_1]) == this_1 then if OnCastListener_next[this_1] != 0 then call dispatch_HashMap_HashMap_HashMap_put(EventListener_castMap, OnCastListener_abilId[this_1], OnCastListener_next[this_1]) else call dispatch_HashMap_HashMap_HashMap_remove(EventListener_castMap, OnCastListener_abilId[this_1]) endif elseif OnCastListener_prev[this_1] != 0 then set OnCastListener_next[OnCastListener_prev[this_1]] = OnCastListener_next[this_1] endif set OnCastListener_prev[OnCastListener_next[this_1]] = OnCastListener_prev[this_1] set OnCastListener_next[this_1] = 0 set OnCastListener_prev[this_1] = 0 endfunction function dealloc_OnCastListener takes integer obj returns nothing if OnCastListener_typeId[obj] == 0 then call error("Double free: object of type OnCastListener") else set OnCastListener_firstFree = OnCastListener_firstFree + 1 set OnCastListener_typeId[obj] = 0 endif endfunction function destroyOnCastListener takes integer this_1 returns nothing call OnCastListener_onDestroy(this_1) call dealloc_OnCastListener(this_1) endfunction function dispatch_OnCastListener_destroyOnCastListener takes integer this_1 returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.OnCastListener") else call error("Called OnCastListener.OnCastListener on invalid object.") endif endif call destroyOnCastListener(this_1) endfunction function EventListener_onDestroy takes integer this_1 returns nothing if EventListener_uid[this_1] < 0 then if EventListener_generalListenersFirsts[EventListener_eventId[this_1]] == this_1 then set EventListener_generalListenersFirsts[EventListener_eventId[this_1]] = EventListener_next[this_1] elseif EventListener_prev[this_1] != 0 then set EventListener_next[EventListener_prev[this_1]] = EventListener_next[this_1] endif elseif EventListener_unitListenersFirsts[EventListener_uid[this_1]] == this_1 then set EventListener_unitListenersFirsts[EventListener_uid[this_1]] = EventListener_next[this_1] elseif EventListener_prev[this_1] != 0 then set EventListener_next[EventListener_prev[this_1]] = EventListener_next[this_1] endif if EventListener_next[this_1] != 0 then set EventListener_prev[EventListener_next[this_1]] = EventListener_prev[this_1] endif set EventListener_next[this_1] = 0 set EventListener_prev[this_1] = 0 endfunction function dealloc_EventListener takes integer obj returns nothing if EventListener_typeId[obj] == 0 then call error("Double free: object of type EventListener") else set EventListener_nextFree[EventListener_firstFree] = obj set EventListener_firstFree = EventListener_firstFree + 1 set EventListener_typeId[obj] = 0 endif endfunction function destroyEventListener takes integer this_1 returns nothing call EventListener_onDestroy(this_1) call dealloc_EventListener(this_1) endfunction function dispatch_EventListener_destroyEventListener takes integer this_1 returns nothing if EventListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EventListener.EventListener") else call error("Called EventListener.EventListener on invalid object.") endif endif call destroyEventListener(this_1) endfunction function unregisterEvents takes integer id_1 returns nothing local integer listener_1 if id_1 > 0 then if EventListener_unitListenersFirsts[id_1] != 0 then call Log_trace("unregister unit has listeners. startid: " + int_toString(id_1)) set listener_1 = EventListener_unitListenersFirsts[id_1] set EventListener_unitListenersFirsts[id_1] = 0 loop exitwhen listener_1 == 0 set id_1 = listener_1 set listener_1 = EventListener_next[listener_1] call dispatch_EventListener_destroyEventListener(id_1) endloop endif endif endfunction function unregisterEventsForUnit takes unit u_1 returns nothing local integer index local integer listener_1 if fireEvents(u_1) then set index = unit_getIndex(u_1) call unregisterEvents(index) if EventListener_castMapCasters[index] != 0 then set listener_1 = EventListener_castMapCasters[index] set EventListener_castMapCasters[index] = 0 loop exitwhen listener_1 == 0 set index = listener_1 set listener_1 = OnCastListener_next[listener_1] call dispatch_OnCastListener_destroyOnCastListener(index) endloop endif endif endfunction function code__onUnitDeindex_ClosureEvents takes nothing returns nothing call unregisterEventsForUnit(getIndexingUnit()) endfunction function unit_clearLastOrders takes unit this_1 returns nothing local integer index = unit_getIndex(this_1) if LastOrder_lastOrder[index] != 0 then call cyc_Order_onDestroy(2, LastOrder_lastOrder[index]) set LastOrder_lastOrder[index] = 0 endif endfunction function code__onUnitDeindex_LastOrder takes nothing returns nothing call unit_clearLastOrders(getIndexingUnit()) endfunction function registerEventsForUnit takes unit u_1 returns nothing if fireEvents(u_1) then call trigger_registerUnitEvent(ClosureEvents_unitTrig, u_1, EVENT_UNIT_DAMAGED) endif endfunction function code__onUnitIndex_ClosureEvents takes nothing returns nothing call registerEventsForUnit(getIndexingUnit()) endfunction function hashtable_loadTriggerHandle takes hashtable this_1, integer parentKey, integer childKey returns trigger return LoadTriggerHandle(this_1, parentKey, childKey) endfunction function Table_loadTrigger takes integer this_1, integer parentKey returns trigger return hashtable_loadTriggerHandle(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadTrigger takes integer this_1, integer parentKey returns trigger if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadTrigger") else call error("Called Table.loadTrigger on invalid object.") endif endif return Table_loadTrigger(this_1, parentKey) endfunction function hashtable_saveFogStateHandle takes hashtable this_1, integer parentKey, integer childKey, fogstate value returns nothing call SaveFogStateHandle(this_1, parentKey, childKey, value) endfunction function Table_saveFogState takes integer this_1, integer parentKey, fogstate value returns nothing call hashtable_saveFogStateHandle(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveFogState takes integer this_1, integer parentKey, fogstate value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveFogState") else call error("Called Table.saveFogState on invalid object.") endif endif call Table_saveFogState(this_1, parentKey, value) endfunction function triggerFromIndex takes integer index returns trigger call dispatch_Table_Table_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_Table_Table_loadTrigger(TypeCasting_typecastdata, 0) endfunction function code__registerPlayerUnitEvent_RegisterEvents takes nothing returns boolean return trigger_evaluate(triggerFromIndex(dispatch_HashMap_HashMap_HashMap_get(RegisterEvents_onCastMap, GetSpellAbilityId()))) endfunction function dispatch_OnCast_ClosureEvents_OnCast_fireEx takes integer this_1, integer id_1 returns nothing endfunction function OnCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnCast_ClosureEvents_OnCast_fireEx(this_1, GetSpellAbilityId()) endfunction function EventData_getAbilityTargetPos takes nothing returns real set EventData_getAbilityTargetPos_return_x = GetSpellTargetX() set EventData_getAbilityTargetPos_return_y = GetSpellTargetY() return EventData_getAbilityTargetPos_return_x endfunction function EventData_getSpellTargetPos takes nothing returns real set EventData_getSpellTargetPos_return_x = EventData_getAbilityTargetPos() set EventData_getSpellTargetPos_return_y = EventData_getAbilityTargetPos_return_y return EventData_getSpellTargetPos_return_x endfunction function dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx takes integer this_1, unit caster, real target_x, real target_y returns nothing endfunction function OnPointCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx(this_1, caster, EventData_getSpellTargetPos(), EventData_getSpellTargetPos_return_y) endfunction function dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx takes integer this_1, unit caster, unit target returns nothing endfunction function OnUnitCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx(this_1, caster, GetSpellTargetUnit()) endfunction function dispatch_OnCastListener_ClosureEvents_OnCastListener_fire takes integer this_1, unit caster returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.fire") else call error("Called OnCastListener.fire on invalid object.") endif endif if OnCastListener_typeId[this_1] <= 3241 then if OnCastListener_typeId[this_1] <= 3240 then call OnCast_fire(this_1, caster) else call OnPointCast_fire(this_1, caster) endif else call OnUnitCast_fire(this_1, caster) endif endfunction function EventListener_onSpellEffect takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer abilId = GetSpellAbilityId() local integer listener_1 = unit_getIndex(trigUnit) local integer nextListener if EventListener_castMapCasters[listener_1] != 0 then set listener_1 = EventListener_castMapCasters[listener_1] loop exitwhen listener_1 == 0 set nextListener = OnCastListener_next[listener_1] if OnCastListener_abilId[listener_1] == -1 or OnCastListener_abilId[listener_1] == abilId then call dispatch_OnCastListener_ClosureEvents_OnCastListener_fire(listener_1, GetSpellAbilityUnit()) endif set listener_1 = nextListener endloop endif if dispatch_HashMap_HashMap_HashMap_has(EventListener_castMap, abilId) then set listener_1 = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId) loop exitwhen listener_1 == 0 set abilId = OnCastListener_next[listener_1] if OnCastListener_eventUnit[listener_1] == null or OnCastListener_eventUnit[listener_1] == trigUnit then call dispatch_OnCastListener_ClosureEvents_OnCastListener_fire(listener_1, GetSpellAbilityUnit()) endif set listener_1 = abilId endloop endif endfunction function code__registerPlayerUnitEvent_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_onSpellEffect() endfunction function trigger_execute takes trigger this_1 returns nothing call TriggerExecute(this_1) endfunction function unit_getAbilityLevel takes unit this_1, integer id_1 returns integer return GetUnitAbilityLevel(this_1, id_1) endfunction function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave takes nothing returns nothing local unit leavingUnit = GetTriggerUnit() if unit_getAbilityLevel(leavingUnit, 1095577652) == 0 and GetIssuedOrderId() == 852056 then call pushUnit(leavingUnit) call trigger_execute(OnUnitEnterLeave_eventTrigger) call popUnit() endif endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + 0.030 endfunction function alloc_CallbackSingle_doAfter_Cinematic_Cinematic takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1105 else call error("Out of memory: Could not create CallbackSingle_doAfter_Cinematic_Cinematic.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1105 endif return this_1 endfunction function CallbackSingle_init takes integer this_1 returns nothing endfunction function construct_CallbackSingle takes integer this_1 returns nothing call CallbackSingle_init(this_1) endfunction function Cinematic_fadeOut takes real duration_seconds_1 returns nothing call EnableUserUI(false) call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\White_mask.blp") call SetCineFilterBlendMode(BLEND_MODE_BLEND) call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE) call SetCineFilterStartUV(0., 0., 1., 1.) call SetCineFilterEndUV(0., 0., 1., 1.) call SetCineFilterStartColor(0, 0, 0, 0) call SetCineFilterEndColor(0, 0, 0, 255) call SetCineFilterDuration(duration_seconds_1) call DisplayCineFilter(true) endfunction function apply_Cinematic_Cinematic takes integer this_1 returns real call Cinematic_fadeOut(duration_seconds[this_1]) set apply_Cinematic_Cinematic_return_seconds = duration_seconds[this_1] return apply_Cinematic_Cinematic_return_seconds endfunction function Cinematic_fadeIn takes real duration_seconds_1 returns nothing call EnableUserUI(true) call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\White_mask.blp") call SetCineFilterBlendMode(BLEND_MODE_BLEND) call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE) call SetCineFilterStartUV(0., 0., 1., 1.) call SetCineFilterEndUV(0., 0., 1., 1.) call SetCineFilterStartColor(0, 0, 0, 255) call SetCineFilterEndColor(0, 0, 0, 0) call SetCineFilterDuration(duration_seconds_1) call DisplayCineFilter(true) endfunction function apply_Cinematic_Cinematic_348 takes integer this_1 returns real call Cinematic_fadeIn(duration_seconds_338[this_1]) set apply_Cinematic_Cinematic_return_seconds_321 = duration_seconds_338[this_1] return apply_Cinematic_Cinematic_return_seconds_321 endfunction function real_seconds takes real this_1 returns real set real_seconds_return_seconds = this_1 return real_seconds_return_seconds endfunction function apply_Cinematic_Cinematic_349 takes integer this_1 returns real call CameraSetupApply(setup[this_1], true, true) set apply_Cinematic_Cinematic_return_seconds_322 = real_seconds(0.) return apply_Cinematic_Cinematic_return_seconds_322 endfunction function setCameraPosition takes real pos_x_1, real pos_y_1 returns nothing call SetCameraPosition(pos_x_1, pos_y_1) endfunction function apply_Cinematic_Cinematic_350 takes integer this_1 returns real call setCameraPosition(pos_x[this_1], pos_y[this_1]) set apply_Cinematic_Cinematic_return_seconds_323 = real_seconds(0.) return apply_Cinematic_Cinematic_return_seconds_323 endfunction function apply_Cinematic_Cinematic_351 takes integer this_1 returns real set apply_Cinematic_Cinematic_return_seconds_324 = duration_seconds_339[this_1] return apply_Cinematic_Cinematic_return_seconds_324 endfunction function dispatch_CineSeq_Cinematic_CineSeq_apply takes integer this_1 returns real local real Cinematic_CineSeq_apply_result_seconds if CineSeq_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CineSeq.apply") else call error("Called CineSeq.apply on invalid object.") endif endif if CineSeq_typeId[this_1] <= 1212 then if CineSeq_typeId[this_1] <= 1211 then if CineSeq_typeId[this_1] <= 1210 then set Cinematic_CineSeq_apply_result_seconds = apply_Cinematic_Cinematic(this_1) else set Cinematic_CineSeq_apply_result_seconds = apply_Cinematic_Cinematic_348(this_1) endif else set Cinematic_CineSeq_apply_result_seconds = apply_Cinematic_Cinematic_349(this_1) endif elseif CineSeq_typeId[this_1] <= 1213 then set Cinematic_CineSeq_apply_result_seconds = apply_Cinematic_Cinematic_350(this_1) else set Cinematic_CineSeq_apply_result_seconds = apply_Cinematic_Cinematic_351(this_1) endif set dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds = Cinematic_CineSeq_apply_result_seconds return dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds endfunction function Cinematic_endCinematic takes integer this_1 returns nothing set Cinematic_running[this_1] = false call ShowInterface(true, .5) call EnableUserControl(true) call Cinematic_fadeIn(real_seconds(0.)) endfunction function dispatch_Cinematic_Cinematic_Cinematic_endCinematic takes integer this_1 returns nothing if Cinematic_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Cinematic.endCinematic") else call error("Called Cinematic.endCinematic on invalid object.") endif endif call Cinematic_endCinematic(this_1) endfunction function timer_getHandleId takes timer this_1 returns integer return GetHandleId(this_1) endfunction function timer_setData takes timer this_1, integer data_1 returns nothing call dispatch_Table_Table_Table_saveInt(TimerUtils_timerData, timer_getHandleId(this_1), data_1) endfunction function getTimer takes nothing returns timer local timer receiver if TimerUtils_freeTimersCount > 0 then set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount - 1 call timer_setData(TimerUtils_freeTimers[TimerUtils_freeTimersCount], 0) return TimerUtils_freeTimers[TimerUtils_freeTimersCount] else set receiver = CreateTimer() call timer_setData(receiver, 0) return receiver endif endfunction function timer_start takes timer this_1, real time, code timerCallBack returns nothing call TimerStart(this_1, time, false, timerCallBack) endfunction function CallbackSingle_start takes integer this_1, timer whichTimer, real time returns nothing call timer_setData(whichTimer, this_1) call timer_start(whichTimer, time, ref_function_code__start_CallbackSingle_ClosureTimers) set CallbackSingle_t[this_1] = whichTimer endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start takes integer this_1, timer whichTimer, real time returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.start") else call error("Called CallbackSingle.start on invalid object.") endif endif call CallbackSingle_start(this_1, whichTimer, time) endfunction function timer_doAfter takes timer this_1, real timeToWait, integer cb_1 returns integer call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_1, this_1, timeToWait) return cb_1 endfunction function doAfter takes real timeToWait, integer cb_1 returns integer return timer_doAfter(getTimer(), timeToWait, cb_1) endfunction function Cinematic_controller takes integer this_1, integer sequence_1, integer ending_1 returns nothing local integer clVar local real tuple_temp if Cinematic_running[this_1] and ( not dispatch_LinkedList_LinkedList_LinkedList_isEmpty(sequence_1)) then set tuple_temp = dispatch_CineSeq_Cinematic_CineSeq_apply(dispatch_LinkedList_LinkedList_LinkedList_dequeue(sequence_1)) set clVar = alloc_CallbackSingle_doAfter_Cinematic_Cinematic() call construct_CallbackSingle(clVar) set this_487[clVar] = this_1 set sequence[clVar] = sequence_1 set ending[clVar] = ending_1 call doAfter(tuple_temp, clVar) else call dispatch_Cinematic_Cinematic_Cinematic_endCinematic(this_1) call dispatch_CineSeq_Cinematic_CineSeq_apply(ending_1) endif endfunction function call_doAfter_Cinematic_Cinematic takes integer this_1 returns nothing call Cinematic_controller(this_487[this_1], sequence[this_1], ending[this_1]) endfunction function dispatch_Callback_ClosureTimers_Callback_call takes integer this_1 returns nothing endfunction function dealloc_Callback takes integer obj returns nothing if Callback_typeId[obj] == 0 then call error("Double free: object of type Callback") else set Callback_firstFree = Callback_firstFree + 1 set Callback_typeId[obj] = 0 endif endfunction function destroyCallback takes integer this_1 returns nothing call dealloc_Callback(this_1) endfunction function dispatch_Callback_destroyCallback takes integer this_1 returns nothing if Callback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Callback.Callback") else call error("Called Callback.Callback on invalid object.") endif endif call destroyCallback(this_1) endfunction function timerdialog_destr takes timerdialog this_1 returns nothing call DestroyTimerDialog(this_1) endfunction function call_doAfter_ClosureTimers takes integer this_1 returns nothing call dispatch_Callback_ClosureTimers_Callback_call(cb[this_1]) call dispatch_Callback_destroyCallback(cb[this_1]) call timerdialog_destr(dia[this_1]) endfunction function call_doAfter_ClosureTimers_359 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x + 50 endfunction function call_doAfter_ClosureTimers_360 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x * 2 endfunction function testFail takes string msg returns nothing endfunction function int_assertEquals takes integer this_1, integer expected returns nothing if this_1 != expected then call testFail("Expected <" + int_toString(expected) + ">, Actual <" + int_toString(this_1) + ">") endif endfunction function call_doAfter_ClosureTimers_361 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x / 2 call int_assertEquals(ClosureTimers_x, 250) endfunction function LinkedList_enqueue takes integer this_1, integer elem returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_1, elem) endfunction function dispatch_LinkedList_LinkedList_LinkedList_enqueue takes integer this_1, integer elem returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.enqueue") else call error("Called LinkedList.enqueue on invalid object.") endif endif call LinkedList_enqueue(this_1, elem) endfunction function LinkedList_size_1 takes integer this_1 returns integer return LinkedList_size[this_1] endfunction function dispatch_LinkedList_LinkedList_LinkedList_size takes integer this_1 returns integer if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif return LinkedList_size_1(this_1) endfunction function real_asAngleDegrees takes real this_1 returns real set real_asAngleDegrees_return_radians = this_1 * 0.017453293 return real_asAngleDegrees_return_radians endfunction function unit_pause takes unit this_1 returns nothing call PauseUnit(this_1, true) endfunction function angle_degrees takes real this_radians returns real return this_radians * 57.295779513 endfunction function unit_setFacing takes unit this_1, real a_radians returns nothing call SetUnitFacing(this_1, angle_degrees(a_radians)) endfunction function unit_setOwner takes unit this_1, player p, boolean changeColor returns nothing call SetUnitOwner(this_1, p, changeColor) endfunction function unit_setScale takes unit this_1, real scale returns nothing call SetUnitScale(this_1, scale, scale, scale) endfunction function unit_setVertexColor takes unit this_1, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing call SetUnitVertexColor(this_1, col_red, col_green, col_blue, col_alpha) endfunction function unit_setX takes unit this_1, real x returns nothing call SetUnitX(this_1, x) endfunction function unit_setY takes unit this_1, real y returns nothing call SetUnitY(this_1, y) endfunction function unit_setXY takes unit this_1, real pos_x_1, real pos_y_1 returns nothing call unit_setX(this_1, pos_x_1) call unit_setY(this_1, pos_y_1) 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 unit_removeAbility takes unit this_1, integer abil returns boolean return UnitRemoveAbility(this_1, abil) endfunction function DummyCaster_recycleDummy takes integer this_1, unit dummy_1, integer id_1 returns nothing call unit_removeAbility(dummy_1, id_1) call DummyRecycler_recycle(dummy_1) endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy takes integer this_1, unit dummy_1, integer id_1 returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.recycleDummy") else call error("Called DummyCaster.recycleDummy on invalid object.") endif endif call DummyCaster_recycleDummy(this_1, dummy_1, id_1) endfunction function DummyCaster_onDestroy takes integer this_1 returns nothing endfunction function dealloc_DummyCaster takes integer obj returns nothing if DummyCaster_typeId[obj] == 0 then call error("Double free: object of type DummyCaster") else set DummyCaster_firstFree = DummyCaster_firstFree + 1 set DummyCaster_typeId[obj] = 0 endif endfunction function destroyDummyCaster takes integer this_1 returns nothing call DummyCaster_onDestroy(this_1) call dealloc_DummyCaster(this_1) endfunction function dispatch_DummyCaster_destroyDummyCaster takes integer this_1 returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.DummyCaster") else call error("Called DummyCaster.DummyCaster on invalid object.") endif endif call destroyDummyCaster(this_1) endfunction function call_doAfter_DummyCaster_DummyCaster takes integer this_1 returns nothing call dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy(this[this_1], dummy[this_1], id[this_1]) set DummyCaster_castCount[this[this_1]] = DummyCaster_castCount[this[this_1]] - 1 if DummyCaster_castCount[this[this_1]] == 0 then call dispatch_DummyCaster_destroyDummyCaster(this[this_1]) endif endfunction function call_doAfter_DummyRecycler_DummyRecycler takes integer this_1 returns nothing call DummyRecycler_recycle(u[this_1]) endfunction function effect_destr takes effect this_1 returns nothing call DestroyEffect(this_1) endfunction function call_doAfter_EffectUtils takes integer this_1 returns nothing call effect_destr(this_488[this_1]) endfunction function effect_setColor takes effect this_1, integer color_red, integer color_green, integer color_blue, integer color_alpha returns nothing call BlzSetSpecialEffectColor(this_1, color_red, color_green, color_blue) call BlzSetSpecialEffectAlpha(this_1, color_alpha) endfunction function effect_setPos takes effect this_1, real pos_x_1, real pos_y_1, real pos_z returns nothing call BlzSetSpecialEffectPosition(this_1, pos_x_1, pos_y_1, pos_z) endfunction function effect_setTime takes effect this_1, real time returns nothing call BlzSetSpecialEffectTime(this_1, time) endfunction function effect_setTimeScale takes effect this_1, real timeScale returns nothing call BlzSetSpecialEffectTimeScale(this_1, timeScale) endfunction function effect_destrHidden takes effect this_1 returns nothing call effect_setColor(this_1, 0, 0, 0, 0) call effect_setPos(this_1, MapBounds_boundMin_x, MapBounds_boundMin_y, 5000.) call effect_setTime(this_1, 1.) call effect_setTimeScale(this_1, 10.) call effect_destr(this_1) endfunction function call_doAfter_EffectUtils_365 takes integer this_1 returns nothing call effect_destrHidden(this_489[this_1]) endfunction function LinkedList_push takes integer this_1, integer elem returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_1, elem) endfunction function dispatch_LinkedList_LinkedList_LinkedList_push takes integer this_1, integer elem returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.push") else call error("Called LinkedList.push on invalid object.") endif endif call LinkedList_push(this_1, elem) endfunction function Sim3DSound_onDestroy takes integer this_1 returns nothing endfunction function dealloc_Sim3DSound takes integer obj returns nothing if Sim3DSound_typeId[obj] == 0 then call error("Double free: object of type Sim3DSound") else set Sim3DSound_firstFree = Sim3DSound_firstFree + 1 set Sim3DSound_typeId[obj] = 0 endif endfunction function destroySim3DSound takes integer this_1 returns nothing call Sim3DSound_onDestroy(this_1) call dealloc_Sim3DSound(this_1) endfunction function dispatch_Sim3DSound_destroySim3DSound takes integer this_1 returns nothing if Sim3DSound_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Sim3DSound.Sim3DSound") else call error("Called Sim3DSound.Sim3DSound on invalid object.") endif endif call destroySim3DSound(this_1) endfunction function sound_stop takes sound this_1, boolean killWhenDone, boolean fadeOut returns nothing call StopSound(this_1, killWhenDone, fadeOut) endfunction function SoundInstance_onDestroy takes integer this_1 returns nothing call sound_stop(SoundInstance_snd[this_1], true, false) endfunction function dealloc_SoundInstance takes integer obj returns nothing if SoundInstance_typeId[obj] == 0 then call error("Double free: object of type SoundInstance") else set SoundInstance_firstFree = SoundInstance_firstFree + 1 set SoundInstance_typeId[obj] = 0 endif endfunction function destroySoundInstance takes integer this_1 returns nothing call SoundInstance_onDestroy(this_1) call dealloc_SoundInstance(this_1) endfunction function dispatch_SoundInstance_destroySoundInstance takes integer this_1 returns nothing if SoundInstance_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundInstance.SoundInstance") else call error("Called SoundInstance.SoundInstance on invalid object.") endif endif call destroySoundInstance(this_1) endfunction function SoundDefinition_recycle takes integer this_1, integer instance_1 returns nothing set SoundInstance_p[instance_1] = null if SoundInstance_s3s[instance_1] != 0 then call dispatch_Sim3DSound_destroySim3DSound(SoundInstance_s3s[instance_1]) endif if dispatch_LinkedList_LinkedList_LinkedList_size(SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]]) < 4 then call dispatch_LinkedList_LinkedList_LinkedList_push(SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]], instance_1) else call dispatch_SoundInstance_destroySoundInstance(instance_1) endif endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_recycle takes integer this_1, integer instance_1 returns nothing if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.recycle") else call error("Called SoundDefinition.recycle on invalid object.") endif endif call SoundDefinition_recycle(this_1, instance_1) endfunction function call_doAfter_SoundDefinition_SoundUtils takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_recycle(this_493[this_1], instance[this_1]) endfunction function trigger_registerPlayerChatEvent takes trigger this_1, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns event return TriggerRegisterPlayerChatEvent(this_1, whichPlayer, chatMessageToDetect, exactMatchOnly) endfunction function call_nullTimer_ClosureEvents takes integer this_1 returns nothing local integer temp local trigger receiver call trigger_addAction(ClosureEvents_unitTrig, ref_function_code__addAction_nullTimer_ClosureEvents) call trigger_addAction(ClosureEvents_leaveTrig, ref_function_code__addAction_nullTimer_ClosureEvents_364) call trigger_addAction(ClosureEvents_keyTrig, ref_function_code__addAction_nullTimer_ClosureEvents_365) set this_1 = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen this_1 > temp call trigger_registerPlayerEvent(ClosureEvents_leaveTrig, Player_players[this_1], EVENT_PLAYER_LEAVE) set receiver = ClosureEvents_keyTrig call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_DOWN_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_DOWN_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_UP_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_UP_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_LEFT_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_LEFT_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_RIGHT_DOWN) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_ARROW_RIGHT_UP) call trigger_registerPlayerEvent(receiver, Player_players[this_1], EVENT_PLAYER_END_CINEMATIC) call trigger_registerPlayerChatEvent(receiver, Player_players[this_1], "", false) set this_1 = this_1 + 1 endloop call registerPlayerUnitEvent_816(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents, null) endfunction function group_clear takes group this_1 returns nothing call GroupClear(this_1) endfunction function group_destr takes group this_1 returns nothing call DestroyGroup(this_1) endfunction function group_enumUnitsInRect_617 takes group this_1, rect rec, boolexpr filter returns nothing call GroupEnumUnitsInRect(this_1, rec, filter) endfunction function group_enumUnitsInRect takes group this_1, rect rec returns nothing call group_enumUnitsInRect_617(this_1, rec, null) endfunction function trigger_registerEnterRegion takes trigger this_1, region whichRegion, boolexpr filter returns event return TriggerRegisterEnterRegion(this_1, whichRegion, filter) endfunction function call_nullTimer_OnUnitEnterLeave takes integer this_1 returns nothing local group receiver call trigger_registerEnterRegion(CreateTrigger(), MapBounds_boundRegion, Filter(ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave)) call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_ISSUED_ORDER, ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave) call group_enumUnitsInRect(OnUnitEnterLeave_preplacedUnits, MapBounds_boundRect) call ForGroup(OnUnitEnterLeave_preplacedUnits, ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave) set receiver = OnUnitEnterLeave_preplacedUnits call group_clear(receiver) call group_destr(receiver) endfunction function alloc_ForGroupCallback_forEachFrom_Preloader takes nothing returns integer local integer this_1 if ForGroupCallback_firstFree == 0 then if ForGroupCallback_maxIndex < 32768 then set ForGroupCallback_maxIndex = ForGroupCallback_maxIndex + 1 set this_1 = ForGroupCallback_maxIndex set ForGroupCallback_typeId[this_1] = 2072 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] = 2072 endif return this_1 endfunction function dealloc_ForGroupCallback takes integer obj returns nothing if ForGroupCallback_typeId[obj] == 0 then call error("Double free: object of type ForGroupCallback") else set ForGroupCallback_nextFree[ForGroupCallback_firstFree] = obj set ForGroupCallback_firstFree = ForGroupCallback_firstFree + 1 set ForGroupCallback_typeId[obj] = 0 endif endfunction function destroyForGroupCallback takes integer this_1 returns nothing call dealloc_ForGroupCallback(this_1) endfunction function dispatch_ForGroupCallback_destroyForGroupCallback takes integer this_1 returns nothing if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.ForGroupCallback") else call error("Called ForGroupCallback.ForGroupCallback on invalid object.") endif endif call destroyForGroupCallback(this_1) endfunction function group_hasNext takes group this_1 returns boolean return FirstOfGroup(this_1) != null endfunction function group_next takes group this_1 returns unit local unit iterUnit = FirstOfGroup(this_1) call GroupRemoveUnit(this_1, iterUnit) return iterUnit endfunction function group_forEachFrom takes group this_1, integer cb_1 returns nothing loop exitwhen not group_hasNext(this_1) call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(cb_1, group_next(this_1)) endloop call dispatch_ForGroupCallback_destroyForGroupCallback(cb_1) endfunction function finishPreload takes nothing returns nothing call unit_remove(Preloader_dum) call group_forEachFrom(Preloader_dumg, alloc_ForGroupCallback_forEachFrom_Preloader()) call group_destr(Preloader_dumg) set Preloader_dumg = null endfunction function call_nullTimer_Preloader takes integer this_1 returns nothing call finishPreload() endfunction function alloc_CallbackSingle_doAfter_SoundDefinition_SoundUtils takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1114 else call error("Out of memory: Could not create CallbackSingle_doAfter_SoundDefinition_SoundUtils.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1114 endif return this_1 endfunction function sound_play takes sound this_1 returns nothing call StartSound(this_1) endfunction function SoundDefinition_playSound takes integer this_1, integer instance_1 returns nothing local integer clVar local real temp if SoundInstance_onUnit[instance_1] != null then call AttachSoundToUnit(SoundInstance_snd[instance_1], SoundInstance_onUnit[instance_1]) endif if SoundInstance_pos_x[instance_1] != 0. or SoundInstance_pos_y[instance_1] != 0. then call SetSoundPosition(SoundInstance_snd[instance_1], SoundInstance_pos_x[instance_1], SoundInstance_pos_y[instance_1], SoundInstance_pos_z[instance_1]) endif if SoundInstance_p[instance_1] != null then if GetLocalPlayer() == SoundInstance_p[instance_1] then call StartSound(SoundInstance_snd[instance_1]) endif else call sound_play(SoundInstance_snd[instance_1]) endif set temp = SoundDefinition_duration[SoundInstance_soundDef[instance_1]] * 0.001 set clVar = alloc_CallbackSingle_doAfter_SoundDefinition_SoundUtils() call construct_CallbackSingle(clVar) set this_493[clVar] = this_1 set instance[clVar] = instance_1 call doAfter(temp, clVar) endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound takes integer this_1, integer instance_1 returns nothing if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.playSound") else call error("Called SoundDefinition.playSound on invalid object.") endif endif call SoundDefinition_playSound(this_1, instance_1) endfunction function call_nullTimer_SoundDefinition_SoundUtils takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_490[this_1], snd[this_1]) endfunction function call_nullTimer_SoundDefinition_SoundUtils_371 takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_491[this_1], snd_481[this_1]) endfunction function call_nullTimer_SoundDefinition_SoundUtils_372 takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_492[this_1], snd_482[this_1]) endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call takes integer this_1 returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.call") else call error("Called CallbackSingle.call on invalid object.") endif endif if CallbackSingle_typeId[this_1] <= 1112 then if CallbackSingle_typeId[this_1] <= 1108 then if CallbackSingle_typeId[this_1] <= 1106 then if CallbackSingle_typeId[this_1] <= 1105 then call call_doAfter_Cinematic_Cinematic(this_1) else call call_doAfter_ClosureTimers(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1107 then call call_doAfter_ClosureTimers_359(this_1) else call call_doAfter_ClosureTimers_360(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1110 then if CallbackSingle_typeId[this_1] <= 1109 then call call_doAfter_ClosureTimers_361(this_1) else call call_doAfter_DummyCaster_DummyCaster(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1111 then call call_doAfter_DummyRecycler_DummyRecycler(this_1) else call call_doAfter_EffectUtils(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1116 then if CallbackSingle_typeId[this_1] <= 1114 then if CallbackSingle_typeId[this_1] <= 1113 then call call_doAfter_EffectUtils_365(this_1) else call call_doAfter_SoundDefinition_SoundUtils(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1115 then call call_nullTimer_ClosureEvents(this_1) else call call_nullTimer_OnUnitEnterLeave(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1118 then if CallbackSingle_typeId[this_1] <= 1117 then call call_nullTimer_Preloader(this_1) else call call_nullTimer_SoundDefinition_SoundUtils(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1119 then call call_nullTimer_SoundDefinition_SoundUtils_371(this_1) else call call_nullTimer_SoundDefinition_SoundUtils_372(this_1) endif endfunction function timer_getData takes timer this_1 returns integer return dispatch_Table_Table_Table_loadInt(TimerUtils_timerData, timer_getHandleId(this_1)) endfunction function timer_pause takes timer this_1 returns nothing call PauseTimer(this_1) endfunction function timer_release takes timer this_1 returns nothing if this_1 == null then call error("Trying to release a null timer") return endif if timer_getData(this_1) == 679645218 then call error("ReleaseTimer: Double free!") return endif call timer_setData(this_1, 679645218) call timer_pause(this_1) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this_1 set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 endfunction function CallbackSingle_onDestroy takes integer this_1 returns nothing call timer_release(CallbackSingle_t[this_1]) endfunction function dealloc_CallbackSingle takes integer obj returns nothing if CallbackSingle_typeId[obj] == 0 then call error("Double free: object of type CallbackSingle") else set CallbackSingle_nextFree[CallbackSingle_firstFree] = obj set CallbackSingle_firstFree = CallbackSingle_firstFree + 1 set CallbackSingle_typeId[obj] = 0 endif endfunction function destroyCallbackSingle takes integer this_1 returns nothing call CallbackSingle_onDestroy(this_1) call dealloc_CallbackSingle(this_1) endfunction function dispatch_CallbackSingle_destroyCallbackSingle takes integer this_1 returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.CallbackSingle") else call error("Called CallbackSingle.CallbackSingle on invalid object.") endif endif call destroyCallbackSingle(this_1) endfunction function CallbackSingle_staticCallback takes nothing returns nothing local integer cb_1 = timer_getData(GetExpiredTimer()) call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call(cb_1) call dispatch_CallbackSingle_destroyCallbackSingle(cb_1) endfunction function code__start_CallbackSingle_ClosureTimers takes nothing returns nothing call CallbackSingle_staticCallback() endfunction function alloc_ForForceCallback_execute_Base64Decoder_Base64 takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < 32768 then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2065 else call error("Out of memory: Could not create ForForceCallback_execute_Base64Decoder_Base64.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 2065 endif return this_1 endfunction function force_forEach takes force this_1, code callback returns nothing call ForForce(this_1, callback) endfunction function isLastCallbackSuccessful takes nothing returns boolean return Execute_tempCallbacksSuccess[Execute_tempCallbacksCount] endfunction function dealloc_ForForceCallback takes integer obj returns nothing if ForForceCallback_typeId[obj] == 0 then call error("Double free: object of type ForForceCallback") else set ForForceCallback_nextFree[ForForceCallback_firstFree] = obj set ForForceCallback_firstFree = ForForceCallback_firstFree + 1 set ForForceCallback_typeId[obj] = 0 endif endfunction function destroyForForceCallback takes integer this_1 returns nothing call dealloc_ForForceCallback(this_1) endfunction function dispatch_ForForceCallback_destroyForForceCallback takes integer this_1 returns nothing if ForForceCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForForceCallback.ForForceCallback") else call error("Called ForForceCallback.ForForceCallback on invalid object.") endif endif call destroyForForceCallback(this_1) endfunction function popCallback takes nothing returns nothing set Execute_tempCallbacksCount = Execute_tempCallbacksCount - 1 call dispatch_ForForceCallback_destroyForForceCallback(Execute_tempCallbacks[Execute_tempCallbacksCount]) endfunction function pushCallback takes integer c returns nothing set Execute_tempCallbacks[Execute_tempCallbacksCount] = c set Execute_tempCallbacksSuccess[Execute_tempCallbacksCount] = false set Execute_tempCallbacksCount = Execute_tempCallbacksCount + 1 endfunction function try takes integer c returns boolean local boolean suppressErrors call pushCallback(c) set suppressErrors = ErrorHandling_suppressErrorMessages set ErrorHandling_suppressErrorMessages = true call force_forEach(Execute_executeForce, ref_function_executeCurrentCallback) set ErrorHandling_suppressErrorMessages = suppressErrors call popCallback() return isLastCallbackSuccessful() endfunction function execute takes integer c returns nothing if not try(c) then call error("execute: thread has crashed. caused by:\n| - " + ErrorHandling_lastError) endif endfunction function Base64Decoder_appendData takes integer this_1, integer data_1 returns nothing local integer clVar = alloc_ForForceCallback_execute_Base64Decoder_Base64() set data_333[clVar] = data_1 set this_486[clVar] = this_1 call execute(clVar) endfunction function char_toInt takes integer this_c returns integer return this_c endfunction function char takes string s returns integer local integer a if s == "/" then set char_return_c = 47 return char_return_c elseif "\\" == s then set char_return_c = 92 return char_return_c endif set a = StringUtils_s2c[string_getHash(s) / 2033480 + 1002] if s != StringUtils_c2s[a] then set char_return_c = a + 32 return char_return_c endif set char_return_c = a return char_return_c endfunction function string_toChar takes string this_1 returns integer set string_toChar_return_c = char(this_1) return string_toChar_return_c endfunction function Base64Decoder_decode takes string char_1 returns integer return Base64_REVERSE_CHARMAP[char_toInt(string_toChar(char_1))] endfunction function ByteBuffer_flushBuffer takes integer this_1 returns nothing call dispatch_Table_Table_Table_saveInt(ByteBuffer_storage[this_1], ByteBuffer_intCount[this_1], ByteBuffer_buffer[this_1]) set ByteBuffer_intCount[this_1] = ByteBuffer_intCount[this_1] + 1 set ByteBuffer_buffer[this_1] = 0 set ByteBuffer_bufferLength[this_1] = 0 endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_flushBuffer takes integer this_1 returns nothing if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.flushBuffer") else call error("Called ByteBuffer.flushBuffer on invalid object.") endif endif call ByteBuffer_flushBuffer(this_1) endfunction function bwShiftl32 takes integer num, integer shift returns integer return num * BitwiseInit_powShift[shift] endfunction function int_shiftl takes integer this_1, integer amount returns integer return bwShiftl32(this_1, amount) endfunction function ByteBuffer_writeByteUnsafe takes integer this_1, integer n returns nothing if n < 0 or n > 255 then call error("ByteBuffer#writeByteUnsafe ERROR: provided argument (" + int_toString(n) + ") is not in the range [0, 255].") endif set ByteBuffer_buffer[this_1] = ByteBuffer_buffer[this_1] + int_shiftl(n, 8 * ByteBuffer_bufferLength[this_1]) set ByteBuffer_bufferLength[this_1] = ByteBuffer_bufferLength[this_1] + 1 if ByteBuffer_bufferLength[this_1] > 3 then call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_flushBuffer(this_1) endif endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByteUnsafe takes integer this_1, integer n returns nothing if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.writeByteUnsafe") else call error("Called ByteBuffer.writeByteUnsafe on invalid object.") endif endif call ByteBuffer_writeByteUnsafe(this_1, n) endfunction function int_bitAnd takes integer this_1, integer other returns integer return BlzBitAnd(this_1, other) endfunction function ByteBuffer_writeByte takes integer this_1, integer n returns nothing call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByteUnsafe(this_1, int_bitAnd(n, 255)) endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte takes integer this_1, integer n returns nothing if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.writeByte") else call error("Called ByteBuffer.writeByte on invalid object.") endif endif call ByteBuffer_writeByte(this_1, n) endfunction function bwShiftr32 takes integer num, integer shift returns integer local integer value = num local integer isNegative = 0 if num < 0 then set value = -2147483648 + num set isNegative = 1 endif return isNegative * BitwiseInit_powShift[31 - shift] + value / BitwiseInit_powShift[shift] endfunction function int_shiftr takes integer this_1, integer amount returns integer return bwShiftr32(this_1, amount) endfunction function string_charAt takes string this_1, integer index returns string return SubString(this_1, index, index + 1) endfunction function Base64Decoder_writeBytes takes integer this_1, string chars returns nothing local integer data_1 = int_shiftl(Base64Decoder_decode(string_charAt(chars, 0)), 18) + int_shiftl(Base64Decoder_decode(string_charAt(chars, 1)), 12) + int_shiftl(Base64Decoder_decode(string_charAt(chars, 2)), 6) + Base64Decoder_decode(string_charAt(chars, 3)) call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte(Base64Decoder_byteBuffer[this_1], int_shiftr(int_bitAnd(data_1, 16777215), 16)) set data_1 = int_shiftl(data_1, 8) call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte(Base64Decoder_byteBuffer[this_1], int_shiftr(int_bitAnd(data_1, 16777215), 16)) set data_1 = int_shiftl(data_1, 8) call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte(Base64Decoder_byteBuffer[this_1], int_shiftr(int_bitAnd(data_1, 16777215), 16)) endfunction function dispatch_Base64Decoder_Base64_Base64Decoder_writeBytes takes integer this_1, string chars returns nothing if Base64Decoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Decoder.writeBytes") else call error("Called Base64Decoder.writeBytes on invalid object.") endif endif call Base64Decoder_writeBytes(this_1, chars) endfunction function Base64Decoder_append takes integer this_1, string data_1 returns nothing local integer len = string_length(data_1) local integer i if Base64Decoder_bufferLength[this_1] + len < 4 then set Base64Decoder_buffer[this_1] = Base64Decoder_buffer[this_1] + data_1 set Base64Decoder_bufferLength[this_1] = Base64Decoder_bufferLength[this_1] + len return endif set i = 4 - Base64Decoder_bufferLength[this_1] call dispatch_Base64Decoder_Base64_Base64Decoder_writeBytes(this_1, Base64Decoder_buffer[this_1] + string_substring(data_1, 0, i)) loop exitwhen i + 4 > len call dispatch_Base64Decoder_Base64_Base64Decoder_writeBytes(this_1, string_substring(data_1, i, i + 4)) set i = i + 4 endloop set Base64Decoder_buffer[this_1] = string_substring_836(data_1, i) set Base64Decoder_bufferLength[this_1] = len - i endfunction function dispatch_Base64Decoder_Base64_Base64Decoder_append takes integer this_1, string data_1 returns nothing if Base64Decoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Decoder.append") else call error("Called Base64Decoder.append on invalid object.") endif endif call Base64Decoder_append(this_1, data_1) endfunction function run_execute_Base64Decoder_Base64 takes integer this_1 returns nothing local integer i = 0 loop exitwhen ( not dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk(data_333[this_1])) or i >= 25 call dispatch_Base64Decoder_Base64_Base64Decoder_append(this_486[this_1], dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(data_333[this_1])) set i = i + 1 endloop if dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk(data_333[this_1]) then call Base64Decoder_appendData(this_486[this_1], data_333[this_1]) endif endfunction function alloc_ForForceCallback_execute_Base64Encoder_Base64 takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < 32768 then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2066 else call error("Out of memory: Could not create ForForceCallback_execute_Base64Encoder_Base64.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 2066 endif return this_1 endfunction function Base64Encoder_writeData takes integer this_1, integer data_1 returns nothing local integer clVar = alloc_ForForceCallback_execute_Base64Encoder_Base64() set data[clVar] = data_1 set this_485[clVar] = this_1 call execute(clVar) endfunction function Base64Encoder_flushStringBuffer takes integer this_1 returns nothing call dispatch_ChunkedString_ChunkedString_ChunkedString_append(Base64Encoder_chunkedString[this_1], Base64Encoder_stringBuffer[this_1]) set Base64Encoder_stringBuffer[this_1] = "" set Base64Encoder_chars[this_1] = 0 endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_flushStringBuffer takes integer this_1 returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.flushStringBuffer") else call error("Called Base64Encoder.flushStringBuffer on invalid object.") endif endif call Base64Encoder_flushStringBuffer(this_1) endfunction function Base64Encoder_append takes integer this_1, string char_1 returns nothing set Base64Encoder_stringBuffer[this_1] = Base64Encoder_stringBuffer[this_1] + char_1 set Base64Encoder_chars[this_1] = Base64Encoder_chars[this_1] + 1 if Base64Encoder_chars[this_1] == 32 then call dispatch_Base64Encoder_Base64_Base64Encoder_flushStringBuffer(this_1) endif endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_append takes integer this_1, string char_1 returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.append") else call error("Called Base64Encoder.append on invalid object.") endif endif call Base64Encoder_append(this_1, char_1) endfunction function Base64Encoder_encode takes integer this_1, integer byte, integer count returns nothing local integer i = 0 loop exitwhen i > count call dispatch_Base64Encoder_Base64_Base64Encoder_append(this_1, Base64_CHARMAP[int_shiftr(int_bitAnd(byte, 16515072), 18)]) set byte = int_shiftl(byte, 6) set i = i + 1 endloop endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_encode takes integer this_1, integer byte, integer count returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.encode") else call error("Called Base64Encoder.encode on invalid object.") endif endif call Base64Encoder_encode(this_1, byte, count) endfunction function Base64Encoder_writeByteUnsafe takes integer this_1, integer n returns nothing set Base64Encoder_buffer[this_1] = int_shiftl(Base64Encoder_buffer[this_1], 8) + n set Base64Encoder_bytes[this_1] = Base64Encoder_bytes[this_1] + 1 if Base64Encoder_bytes[this_1] == 3 then call dispatch_Base64Encoder_Base64_Base64Encoder_encode(this_1, Base64Encoder_buffer[this_1], 3) set Base64Encoder_bytes[this_1] = 0 endif endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_writeByteUnsafe takes integer this_1, integer n returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.writeByteUnsafe") else call error("Called Base64Encoder.writeByteUnsafe on invalid object.") endif endif call Base64Encoder_writeByteUnsafe(this_1, n) endfunction function ByteBuffer_hasByte takes integer this_1 returns boolean return ByteBuffer_readIndex[this_1] < ByteBuffer_intCount[this_1] or ByteBuffer_readBufferIndex[this_1] < ByteBuffer_bufferLength[this_1] endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte takes integer this_1 returns boolean if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.hasByte") else call error("Called ByteBuffer.hasByte on invalid object.") endif endif return ByteBuffer_hasByte(this_1) endfunction function ByteBuffer_selectByte takes integer n, integer byte returns integer return int_bitAnd(int_shiftr(n, 8 * byte), 255) endfunction function ByteBuffer_readByte takes integer this_1 returns integer local integer cond_result if ByteBuffer_readBufferIndex[this_1] == 4 then set ByteBuffer_readIndex[this_1] = ByteBuffer_readIndex[this_1] + 1 if ByteBuffer_readIndex[this_1] < ByteBuffer_intCount[this_1] then set cond_result = dispatch_Table_Table_Table_loadInt(ByteBuffer_storage[this_1], ByteBuffer_readIndex[this_1]) else set cond_result = ByteBuffer_buffer[this_1] endif set ByteBuffer_readBuffer[this_1] = cond_result set ByteBuffer_readBufferIndex[this_1] = 0 endif set cond_result = ByteBuffer_selectByte(ByteBuffer_readBuffer[this_1], ByteBuffer_readBufferIndex[this_1]) set ByteBuffer_readBufferIndex[this_1] = ByteBuffer_readBufferIndex[this_1] + 1 return cond_result endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_readByte takes integer this_1 returns integer if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.readByte") else call error("Called ByteBuffer.readByte on invalid object.") endif endif return ByteBuffer_readByte(this_1) endfunction function run_execute_Base64Encoder_Base64 takes integer this_1 returns nothing local integer i = 0 loop exitwhen ( not dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte(data[this_1])) or i >= 1000 call dispatch_Base64Encoder_Base64_Base64Encoder_writeByteUnsafe(this_485[this_1], dispatch_ByteBuffer_ByteBuffer_ByteBuffer_readByte(data[this_1])) set i = i + 1 endloop if dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte(data[this_1]) then call Base64Encoder_writeData(this_485[this_1], data[this_1]) endif endfunction function dispatch_LimitedExecuteAction_Execute_LimitedExecuteAction_run takes integer this_1 returns nothing endfunction function dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check takes integer this_1 returns boolean return false endfunction function alloc_ForForceCallback_execute_Execute takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < 32768 then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2067 else call error("Out of memory: Could not create ForForceCallback_execute_Execute.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 2067 endif return this_1 endfunction function executeWhileInternal takes integer resetCount_1, integer condition_1, integer action_1 returns nothing local integer clVar = alloc_ForForceCallback_execute_Execute() set condition[clVar] = condition_1 set resetCount[clVar] = resetCount_1 set action[clVar] = action_1 call execute(clVar) endfunction function run_execute_Execute takes integer this_1 returns nothing local integer i = 0 loop exitwhen ( not dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check(condition[this_1])) or i >= resetCount[this_1] call dispatch_LimitedExecuteAction_Execute_LimitedExecuteAction_run(action[this_1]) set i = i + 1 endloop if dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check(condition[this_1]) then call executeWhileInternal(resetCount[this_1], condition[this_1], action[this_1]) endif endfunction function run_execute_ForceTests takes integer this_1 returns nothing call int_assertEquals(ForceTests_testInt, 0) set ForceTests_testInt = 10 endfunction function booleanToIndex takes boolean u_1 returns integer local integer cond_result if u_1 then set cond_result = 1 else set cond_result = 0 endif return cond_result endfunction function groupToIndex takes group object returns integer return handle_getHandleId(object) endfunction function push takes group g returns nothing set GroupUtils_stack[GroupUtils_numStack] = g call dispatch_HashMap_HashMap_HashMap_put(GroupUtils_used, groupToIndex(GroupUtils_stack[GroupUtils_numStack]), booleanToIndex(false)) set GroupUtils_numStack = GroupUtils_numStack + 1 endfunction function run_execute_GroupUtils takes integer this_1 returns nothing local integer i set GroupUtils_numTotal = GroupUtils_numTotal + createNow[this_1] set i = 1 set this_1 = createNow[this_1] loop exitwhen i > this_1 call push(CreateGroup()) set i = i + 1 endloop endfunction function dispatch_ForForceCallback_Execute_ForForceCallback_run takes integer this_1 returns nothing if ForForceCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForForceCallback.run") else call error("Called ForForceCallback.run on invalid object.") endif endif if ForForceCallback_typeId[this_1] <= 2067 then if ForForceCallback_typeId[this_1] <= 2066 then if ForForceCallback_typeId[this_1] <= 2065 then call run_execute_Base64Decoder_Base64(this_1) else call run_execute_Base64Encoder_Base64(this_1) endif else call run_execute_Execute(this_1) endif elseif ForForceCallback_typeId[this_1] <= 2068 then call run_execute_ForceTests(this_1) else call run_execute_GroupUtils(this_1) endif endfunction function getCurrentCallback takes nothing returns integer return Execute_tempCallbacks[Execute_tempCallbacksCount - 1] endfunction function setCurrentCallbackSuccess takes boolean value returns nothing set Execute_tempCallbacksSuccess[Execute_tempCallbacksCount - 1] = value endfunction function executeCurrentCallback takes nothing returns nothing set ErrorHandling_lastError = "" call dispatch_ForForceCallback_Execute_ForForceCallback_run(getCurrentCallback()) call setCurrentCallbackSuccess(true) endfunction function init_Abilities takes nothing returns boolean return true endfunction function init_AbilityIds takes nothing returns boolean return true endfunction function init_AbilityObjEditing takes nothing returns boolean return true endfunction function init_Angle takes nothing returns boolean return true endfunction function init_AttachmentPoints takes nothing returns boolean return true endfunction function init_Base64 takes nothing returns boolean set Base64_CHARMAP[0] = "A" set Base64_CHARMAP[1] = "B" set Base64_CHARMAP[2] = "C" set Base64_CHARMAP[3] = "D" set Base64_CHARMAP[4] = "E" set Base64_CHARMAP[5] = "F" set Base64_CHARMAP[6] = "G" set Base64_CHARMAP[7] = "H" set Base64_CHARMAP[8] = "I" set Base64_CHARMAP[9] = "J" set Base64_CHARMAP[10] = "K" set Base64_CHARMAP[11] = "L" set Base64_CHARMAP[12] = "M" set Base64_CHARMAP[13] = "N" set Base64_CHARMAP[14] = "O" set Base64_CHARMAP[15] = "P" set Base64_CHARMAP[16] = "Q" set Base64_CHARMAP[17] = "R" set Base64_CHARMAP[18] = "S" set Base64_CHARMAP[19] = "T" set Base64_CHARMAP[20] = "U" set Base64_CHARMAP[21] = "V" set Base64_CHARMAP[22] = "W" set Base64_CHARMAP[23] = "X" set Base64_CHARMAP[24] = "Y" set Base64_CHARMAP[25] = "Z" set Base64_CHARMAP[26] = "a" set Base64_CHARMAP[27] = "b" set Base64_CHARMAP[28] = "c" set Base64_CHARMAP[29] = "d" set Base64_CHARMAP[30] = "e" set Base64_CHARMAP[31] = "f" set Base64_CHARMAP[32] = "g" set Base64_CHARMAP[33] = "h" set Base64_CHARMAP[34] = "i" set Base64_CHARMAP[35] = "j" set Base64_CHARMAP[36] = "k" set Base64_CHARMAP[37] = "l" set Base64_CHARMAP[38] = "m" set Base64_CHARMAP[39] = "n" set Base64_CHARMAP[40] = "o" set Base64_CHARMAP[41] = "p" set Base64_CHARMAP[42] = "q" set Base64_CHARMAP[43] = "r" set Base64_CHARMAP[44] = "s" set Base64_CHARMAP[45] = "t" set Base64_CHARMAP[46] = "u" set Base64_CHARMAP[47] = "v" set Base64_CHARMAP[48] = "w" set Base64_CHARMAP[49] = "x" set Base64_CHARMAP[50] = "y" set Base64_CHARMAP[51] = "z" set Base64_CHARMAP[52] = "0" set Base64_CHARMAP[53] = "1" set Base64_CHARMAP[54] = "2" set Base64_CHARMAP[55] = "3" set Base64_CHARMAP[56] = "4" set Base64_CHARMAP[57] = "5" set Base64_CHARMAP[58] = "6" set Base64_CHARMAP[59] = "7" set Base64_CHARMAP[60] = "8" set Base64_CHARMAP[61] = "9" set Base64_CHARMAP[62] = "+" set Base64_CHARMAP[63] = "/" set Base64_REVERSE_CHARMAP[0] = 0 set Base64_REVERSE_CHARMAP[1] = 0 set Base64_REVERSE_CHARMAP[2] = 0 set Base64_REVERSE_CHARMAP[3] = 0 set Base64_REVERSE_CHARMAP[4] = 0 set Base64_REVERSE_CHARMAP[5] = 0 set Base64_REVERSE_CHARMAP[6] = 0 set Base64_REVERSE_CHARMAP[7] = 0 set Base64_REVERSE_CHARMAP[8] = 0 set Base64_REVERSE_CHARMAP[9] = 0 set Base64_REVERSE_CHARMAP[10] = 0 set Base64_REVERSE_CHARMAP[11] = 0 set Base64_REVERSE_CHARMAP[12] = 0 set Base64_REVERSE_CHARMAP[13] = 0 set Base64_REVERSE_CHARMAP[14] = 0 set Base64_REVERSE_CHARMAP[15] = 0 set Base64_REVERSE_CHARMAP[16] = 0 set Base64_REVERSE_CHARMAP[17] = 0 set Base64_REVERSE_CHARMAP[18] = 0 set Base64_REVERSE_CHARMAP[19] = 0 set Base64_REVERSE_CHARMAP[20] = 0 set Base64_REVERSE_CHARMAP[21] = 0 set Base64_REVERSE_CHARMAP[22] = 0 set Base64_REVERSE_CHARMAP[23] = 0 set Base64_REVERSE_CHARMAP[24] = 0 set Base64_REVERSE_CHARMAP[25] = 0 set Base64_REVERSE_CHARMAP[26] = 0 set Base64_REVERSE_CHARMAP[27] = 0 set Base64_REVERSE_CHARMAP[28] = 0 set Base64_REVERSE_CHARMAP[29] = 0 set Base64_REVERSE_CHARMAP[30] = 0 set Base64_REVERSE_CHARMAP[31] = 0 set Base64_REVERSE_CHARMAP[32] = 0 set Base64_REVERSE_CHARMAP[33] = 0 set Base64_REVERSE_CHARMAP[34] = 0 set Base64_REVERSE_CHARMAP[35] = 0 set Base64_REVERSE_CHARMAP[36] = 0 set Base64_REVERSE_CHARMAP[37] = 0 set Base64_REVERSE_CHARMAP[38] = 0 set Base64_REVERSE_CHARMAP[39] = 0 set Base64_REVERSE_CHARMAP[40] = 0 set Base64_REVERSE_CHARMAP[41] = 0 set Base64_REVERSE_CHARMAP[42] = 0 set Base64_REVERSE_CHARMAP[43] = 62 set Base64_REVERSE_CHARMAP[44] = 0 set Base64_REVERSE_CHARMAP[45] = 0 set Base64_REVERSE_CHARMAP[46] = 0 set Base64_REVERSE_CHARMAP[47] = 63 set Base64_REVERSE_CHARMAP[48] = 52 set Base64_REVERSE_CHARMAP[49] = 53 set Base64_REVERSE_CHARMAP[50] = 54 set Base64_REVERSE_CHARMAP[51] = 55 set Base64_REVERSE_CHARMAP[52] = 56 set Base64_REVERSE_CHARMAP[53] = 57 set Base64_REVERSE_CHARMAP[54] = 58 set Base64_REVERSE_CHARMAP[55] = 59 set Base64_REVERSE_CHARMAP[56] = 60 set Base64_REVERSE_CHARMAP[57] = 61 set Base64_REVERSE_CHARMAP[58] = 0 set Base64_REVERSE_CHARMAP[59] = 0 set Base64_REVERSE_CHARMAP[60] = 0 set Base64_REVERSE_CHARMAP[61] = 0 set Base64_REVERSE_CHARMAP[62] = 0 set Base64_REVERSE_CHARMAP[63] = 0 set Base64_REVERSE_CHARMAP[64] = 0 set Base64_REVERSE_CHARMAP[65] = 0 set Base64_REVERSE_CHARMAP[66] = 1 set Base64_REVERSE_CHARMAP[67] = 2 set Base64_REVERSE_CHARMAP[68] = 3 set Base64_REVERSE_CHARMAP[69] = 4 set Base64_REVERSE_CHARMAP[70] = 5 set Base64_REVERSE_CHARMAP[71] = 6 set Base64_REVERSE_CHARMAP[72] = 7 set Base64_REVERSE_CHARMAP[73] = 8 set Base64_REVERSE_CHARMAP[74] = 9 set Base64_REVERSE_CHARMAP[75] = 10 set Base64_REVERSE_CHARMAP[76] = 11 set Base64_REVERSE_CHARMAP[77] = 12 set Base64_REVERSE_CHARMAP[78] = 13 set Base64_REVERSE_CHARMAP[79] = 14 set Base64_REVERSE_CHARMAP[80] = 15 set Base64_REVERSE_CHARMAP[81] = 16 set Base64_REVERSE_CHARMAP[82] = 17 set Base64_REVERSE_CHARMAP[83] = 18 set Base64_REVERSE_CHARMAP[84] = 19 set Base64_REVERSE_CHARMAP[85] = 20 set Base64_REVERSE_CHARMAP[86] = 21 set Base64_REVERSE_CHARMAP[87] = 22 set Base64_REVERSE_CHARMAP[88] = 23 set Base64_REVERSE_CHARMAP[89] = 24 set Base64_REVERSE_CHARMAP[90] = 25 set Base64_REVERSE_CHARMAP[91] = 0 set Base64_REVERSE_CHARMAP[92] = 0 set Base64_REVERSE_CHARMAP[93] = 0 set Base64_REVERSE_CHARMAP[94] = 0 set Base64_REVERSE_CHARMAP[95] = 0 set Base64_REVERSE_CHARMAP[96] = 0 set Base64_REVERSE_CHARMAP[97] = 26 set Base64_REVERSE_CHARMAP[98] = 27 set Base64_REVERSE_CHARMAP[99] = 28 set Base64_REVERSE_CHARMAP[100] = 29 set Base64_REVERSE_CHARMAP[101] = 30 set Base64_REVERSE_CHARMAP[102] = 31 set Base64_REVERSE_CHARMAP[103] = 32 set Base64_REVERSE_CHARMAP[104] = 33 set Base64_REVERSE_CHARMAP[105] = 34 set Base64_REVERSE_CHARMAP[106] = 35 set Base64_REVERSE_CHARMAP[107] = 36 set Base64_REVERSE_CHARMAP[108] = 37 set Base64_REVERSE_CHARMAP[109] = 38 set Base64_REVERSE_CHARMAP[110] = 39 set Base64_REVERSE_CHARMAP[111] = 40 set Base64_REVERSE_CHARMAP[112] = 41 set Base64_REVERSE_CHARMAP[113] = 42 set Base64_REVERSE_CHARMAP[114] = 43 set Base64_REVERSE_CHARMAP[115] = 44 set Base64_REVERSE_CHARMAP[116] = 45 set Base64_REVERSE_CHARMAP[117] = 46 set Base64_REVERSE_CHARMAP[118] = 47 set Base64_REVERSE_CHARMAP[119] = 48 set Base64_REVERSE_CHARMAP[120] = 49 set Base64_REVERSE_CHARMAP[121] = 50 set Base64_REVERSE_CHARMAP[122] = 51 set Base64_REVERSE_CHARMAP[123] = 0 set Base64_REVERSE_CHARMAP[124] = 0 set Base64_REVERSE_CHARMAP[125] = 0 set Base64_REVERSE_CHARMAP[126] = 0 set Base64_REVERSE_CHARMAP[127] = 0 set Base64_REVERSE_CHARMAP[128] = 0 set Base64_REVERSE_CHARMAP[129] = 0 set Base64_REVERSE_CHARMAP[130] = 0 set Base64_REVERSE_CHARMAP[131] = 0 set Base64_REVERSE_CHARMAP[132] = 0 set Base64_REVERSE_CHARMAP[133] = 0 set Base64_REVERSE_CHARMAP[134] = 0 set Base64_REVERSE_CHARMAP[135] = 0 set Base64_REVERSE_CHARMAP[136] = 0 set Base64_REVERSE_CHARMAP[137] = 0 set Base64_REVERSE_CHARMAP[138] = 0 set Base64_REVERSE_CHARMAP[139] = 0 set Base64_REVERSE_CHARMAP[140] = 0 set Base64_REVERSE_CHARMAP[141] = 0 set Base64_REVERSE_CHARMAP[142] = 0 set Base64_REVERSE_CHARMAP[143] = 0 set Base64_REVERSE_CHARMAP[144] = 0 set Base64_REVERSE_CHARMAP[145] = 0 set Base64_REVERSE_CHARMAP[146] = 0 set Base64_REVERSE_CHARMAP[147] = 0 set Base64_REVERSE_CHARMAP[148] = 0 set Base64_REVERSE_CHARMAP[149] = 0 set Base64_REVERSE_CHARMAP[150] = 0 set Base64_REVERSE_CHARMAP[151] = 0 set Base64_REVERSE_CHARMAP[152] = 0 set Base64_REVERSE_CHARMAP[153] = 0 set Base64_REVERSE_CHARMAP[154] = 0 set Base64_REVERSE_CHARMAP[155] = 0 set Base64_REVERSE_CHARMAP[156] = 0 set Base64_REVERSE_CHARMAP[157] = 0 set Base64_REVERSE_CHARMAP[158] = 0 set Base64_REVERSE_CHARMAP[159] = 0 set Base64_REVERSE_CHARMAP[160] = 0 set Base64_REVERSE_CHARMAP[161] = 0 set Base64_REVERSE_CHARMAP[162] = 0 set Base64_REVERSE_CHARMAP[163] = 0 set Base64_REVERSE_CHARMAP[164] = 0 set Base64_REVERSE_CHARMAP[165] = 0 set Base64_REVERSE_CHARMAP[166] = 0 set Base64_REVERSE_CHARMAP[167] = 0 set Base64_REVERSE_CHARMAP[168] = 0 set Base64_REVERSE_CHARMAP[169] = 0 set Base64_REVERSE_CHARMAP[170] = 0 set Base64_REVERSE_CHARMAP[171] = 0 set Base64_REVERSE_CHARMAP[172] = 0 set Base64_REVERSE_CHARMAP[173] = 0 set Base64_REVERSE_CHARMAP[174] = 0 set Base64_REVERSE_CHARMAP[175] = 0 set Base64_REVERSE_CHARMAP[176] = 0 set Base64_REVERSE_CHARMAP[177] = 0 set Base64_REVERSE_CHARMAP[178] = 0 set Base64_REVERSE_CHARMAP[179] = 0 set Base64_REVERSE_CHARMAP[180] = 0 set Base64_REVERSE_CHARMAP[181] = 0 set Base64_REVERSE_CHARMAP[182] = 0 set Base64_REVERSE_CHARMAP[183] = 0 set Base64_REVERSE_CHARMAP[184] = 0 set Base64_REVERSE_CHARMAP[185] = 0 set Base64_REVERSE_CHARMAP[186] = 0 set Base64_REVERSE_CHARMAP[187] = 0 set Base64_REVERSE_CHARMAP[188] = 0 set Base64_REVERSE_CHARMAP[189] = 0 set Base64_REVERSE_CHARMAP[190] = 0 set Base64_REVERSE_CHARMAP[191] = 0 set Base64_REVERSE_CHARMAP[192] = 0 set Base64_REVERSE_CHARMAP[193] = 0 set Base64_REVERSE_CHARMAP[194] = 0 set Base64_REVERSE_CHARMAP[195] = 0 set Base64_REVERSE_CHARMAP[196] = 0 set Base64_REVERSE_CHARMAP[197] = 0 set Base64_REVERSE_CHARMAP[198] = 0 set Base64_REVERSE_CHARMAP[199] = 0 set Base64_REVERSE_CHARMAP[200] = 0 set Base64_REVERSE_CHARMAP[201] = 0 set Base64_REVERSE_CHARMAP[202] = 0 set Base64_REVERSE_CHARMAP[203] = 0 set Base64_REVERSE_CHARMAP[204] = 0 set Base64_REVERSE_CHARMAP[205] = 0 set Base64_REVERSE_CHARMAP[206] = 0 set Base64_REVERSE_CHARMAP[207] = 0 set Base64_REVERSE_CHARMAP[208] = 0 set Base64_REVERSE_CHARMAP[209] = 0 set Base64_REVERSE_CHARMAP[210] = 0 set Base64_REVERSE_CHARMAP[211] = 0 set Base64_REVERSE_CHARMAP[212] = 0 set Base64_REVERSE_CHARMAP[213] = 0 set Base64_REVERSE_CHARMAP[214] = 0 set Base64_REVERSE_CHARMAP[215] = 0 set Base64_REVERSE_CHARMAP[216] = 0 set Base64_REVERSE_CHARMAP[217] = 0 set Base64_REVERSE_CHARMAP[218] = 0 set Base64_REVERSE_CHARMAP[219] = 0 set Base64_REVERSE_CHARMAP[220] = 0 set Base64_REVERSE_CHARMAP[221] = 0 set Base64_REVERSE_CHARMAP[222] = 0 set Base64_REVERSE_CHARMAP[223] = 0 set Base64_REVERSE_CHARMAP[224] = 0 set Base64_REVERSE_CHARMAP[225] = 0 set Base64_REVERSE_CHARMAP[226] = 0 set Base64_REVERSE_CHARMAP[227] = 0 set Base64_REVERSE_CHARMAP[228] = 0 set Base64_REVERSE_CHARMAP[229] = 0 set Base64_REVERSE_CHARMAP[230] = 0 set Base64_REVERSE_CHARMAP[231] = 0 set Base64_REVERSE_CHARMAP[232] = 0 set Base64_REVERSE_CHARMAP[233] = 0 set Base64_REVERSE_CHARMAP[234] = 0 set Base64_REVERSE_CHARMAP[235] = 0 set Base64_REVERSE_CHARMAP[236] = 0 set Base64_REVERSE_CHARMAP[237] = 0 set Base64_REVERSE_CHARMAP[238] = 0 set Base64_REVERSE_CHARMAP[239] = 0 set Base64_REVERSE_CHARMAP[240] = 0 set Base64_REVERSE_CHARMAP[241] = 0 set Base64_REVERSE_CHARMAP[242] = 0 set Base64_REVERSE_CHARMAP[243] = 0 set Base64_REVERSE_CHARMAP[244] = 0 set Base64_REVERSE_CHARMAP[245] = 0 set Base64_REVERSE_CHARMAP[246] = 0 set Base64_REVERSE_CHARMAP[247] = 0 set Base64_REVERSE_CHARMAP[248] = 0 set Base64_REVERSE_CHARMAP[249] = 0 set Base64_REVERSE_CHARMAP[250] = 0 set Base64_REVERSE_CHARMAP[251] = 0 set Base64_REVERSE_CHARMAP[252] = 0 set Base64_REVERSE_CHARMAP[253] = 0 set Base64_REVERSE_CHARMAP[254] = 0 return true endfunction function init_Base64Tests 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 init_BigNum takes nothing returns boolean return true endfunction function int_bitOr takes integer this_1, integer other returns integer return BlzBitOr(this_1, other) endfunction function int_bitXor takes integer this_1, integer other returns integer return BlzBitXor(this_1, other) endfunction function initPows takes nothing returns nothing local integer allPows local integer i local integer temp set BitSet_pows[0] = 1 set allPows = 1 set i = 1 set temp = 31 loop exitwhen i > temp set BitSet_pows[i] = BitSet_pows[i - 1] * 2 set allPows = int_bitOr(allPows, BitSet_pows[i]) set i = i + 1 endloop set i = 0 set temp = 31 loop exitwhen i > temp call int_bitXor(allPows, BitSet_pows[i]) set i = i + 1 endloop endfunction function init_BitSet takes nothing returns boolean call initPows() return true endfunction function initLbyte takes nothing returns nothing local integer i16 = 0 local integer i256 = 0 local integer i loop exitwhen i256 >= 256 set i = 0 loop exitwhen i >= 16 set i256 = i256 + 1 set i = i + 1 endloop set i16 = i16 + 1 endloop endfunction function initRbyte takes nothing returns nothing local integer i256 = 0 local integer i16 loop exitwhen i256 >= 256 set i16 = 0 loop exitwhen i16 >= 16 set i256 = i256 + 1 set i16 = i16 + 1 endloop endloop endfunction function initShift takes nothing returns nothing local integer bit = 0 local integer pow = 1 loop exitwhen bit > 32 set BitwiseInit_powShift[bit] = pow set pow = pow * 2 set bit = bit + 1 endloop endfunction function initBitwise takes nothing returns nothing call initLbyte() call initRbyte() call initShift() endfunction function init_BitwiseInit takes nothing returns boolean call initBitwise() return true endfunction function init_BuffIds takes nothing returns boolean return true endfunction function init_Buildings takes nothing returns boolean return true endfunction function alloc_OrderStringFactory takes nothing returns integer local integer this_1 if OrderStringFactory_firstFree == 0 then if OrderStringFactory_maxIndex < 32768 then set OrderStringFactory_maxIndex = OrderStringFactory_maxIndex + 1 set this_1 = OrderStringFactory_maxIndex else call error("Out of memory: Could not create OrderStringFactory.") set this_1 = 0 endif else set OrderStringFactory_firstFree = OrderStringFactory_firstFree - 1 set this_1 = OrderStringFactory_nextFree[OrderStringFactory_firstFree] endif return this_1 endfunction function OrderStringFactory_init takes integer this_1 returns nothing endfunction function construct_OrderStringFactory takes integer this_1 returns nothing call OrderStringFactory_init(this_1) endfunction function new_OrderStringFactory takes nothing returns integer local integer this_1 = alloc_OrderStringFactory() call construct_OrderStringFactory(this_1) return this_1 endfunction function init_ChannelAbilityPreset takes nothing returns boolean call new_OrderStringFactory() return true endfunction function init_ChunkedString takes nothing returns boolean return true endfunction function alloc_CallbackSingle_nullTimer_ClosureEvents takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1115 else call error("Out of memory: Could not create CallbackSingle_nullTimer_ClosureEvents.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1115 endif return this_1 endfunction function alloc_HashMap takes nothing returns integer local integer this_1 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this_1 = Table_maxIndex set Table_typeId[this_1] = 4108 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] = 4108 endif return this_1 endfunction function HashMap_init takes integer this_1 returns nothing set HashMap_size[this_1] = 0 endfunction function Table_init takes integer this_1 returns nothing endfunction function construct_Table takes integer this_1 returns nothing call Table_init(this_1) endfunction function construct_HashMap takes integer this_1 returns nothing call construct_Table(this_1) call HashMap_init(this_1) endfunction function new_HashMap takes nothing returns integer local integer this_1 = alloc_HashMap() call construct_HashMap(this_1) return this_1 endfunction function nullTimer takes integer cb_1 returns integer return doAfter(0., cb_1) endfunction function onUnitDeindex takes code func returns nothing call trigger_addCondition(UnitIndexer_onDeindexTrigger, Condition(func)) endfunction function onUnitIndex takes code func returns nothing call trigger_addCondition(UnitIndexer_onIndexTrigger, Condition(func)) endfunction function init_ClosureEvents takes nothing returns boolean local integer clVar set ClosureEvents_EVENT_PLAYER_CHAT_FILTER = ConvertPlayerEvent(96) set EventListener_castMap = new_HashMap() set ClosureEvents_unitTrig = CreateTrigger() set ClosureEvents_leaveTrig = CreateTrigger() set ClosureEvents_keyTrig = CreateTrigger() call onUnitIndex(ref_function_code__onUnitIndex_ClosureEvents) call onUnitDeindex(ref_function_code__onUnitDeindex_ClosureEvents) set clVar = alloc_CallbackSingle_nullTimer_ClosureEvents() call construct_CallbackSingle(clVar) call nullTimer(clVar) return true endfunction function init_ClosureForGroups takes nothing returns boolean call CreateGroup() call Filter(ref_function_code__Filter_ClosureForGroups) call Rect(0., 0., 0., 0.) return true endfunction function init_ClosureFrames takes nothing returns boolean call trigger_addAction(CreateTrigger(), ref_function_onEvent) set ClosureFrames_FRAME_MAP = new_HashMap() return true endfunction function init_ClosureKeyPresses takes nothing returns boolean call trigger_addAction(CreateTrigger(), ref_function_onEvent_473) set ClosureKeyPresses_KEY_MAP = new_HashMap() return true endfunction function init_ClosureTimers takes nothing returns boolean set ClosureTimers_x = 200 return true endfunction function toHex takes integer number returns string local integer firstpart = number / 16 return Colors_hexs[firstpart] + Colors_hexs[number - firstpart * 16] endfunction function colorA_toColorString takes integer this_red, integer this_green, integer this_blue, integer this_alpha returns string return "|c" + toHex(this_alpha) + toHex(this_red) + toHex(this_green) + toHex(this_blue) endfunction function initializeTable takes nothing returns nothing local integer i = 0 loop exitwhen i > 15 call dispatch_Table_Table_Table_saveInt(Colors_decs, string_getHash(Colors_hexs[i]), i) set i = i + 1 endloop endfunction function alloc_Table takes nothing returns integer local integer this_1 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this_1 = Table_maxIndex set Table_typeId[this_1] = 4107 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] = 4107 endif return this_1 endfunction function new_Table takes nothing returns integer local integer this_1 = alloc_Table() call construct_Table(this_1) return this_1 endfunction function init_Colors takes nothing returns boolean set Colors_hexs[0] = "0" set Colors_hexs[1] = "1" set Colors_hexs[2] = "2" set Colors_hexs[3] = "3" set Colors_hexs[4] = "4" set Colors_hexs[5] = "5" set Colors_hexs[6] = "6" set Colors_hexs[7] = "7" set Colors_hexs[8] = "8" set Colors_hexs[9] = "9" set Colors_hexs[10] = "A" set Colors_hexs[11] = "B" set Colors_hexs[12] = "C" set Colors_hexs[13] = "D" set Colors_hexs[14] = "E" set Colors_hexs[15] = "F" set Colors_decs = new_Table() call colorA_toColorString(255, 255, 255, 255) call colorA_toColorString(0, 0, 0, 0) call colorA_toColorString(255, 204, 0, 255) call initializeTable() return true endfunction function onEnter takes code c returns nothing call trigger_addCondition(OnUnitEnterLeave_eventTrigger, Filter(c)) endfunction function timer_startPeriodic takes timer this_1, real time, code timerCallBack returns nothing call TimerStart(this_1, time, true, timerCallBack) endfunction function init_DamageDetection takes nothing returns boolean local integer i local integer temp set DamageDetection_current = null set DamageDetection_toDestroy = null set DamageDetection_filter = Filter(ref_function_code__Filter_DamageDetection) set DamageDetection_current = CreateTrigger() set i = 0 set temp = -1 loop exitwhen i > temp call trigger_addCondition(DamageDetection_current, DamageDetection_func[i]) set i = i + 1 endloop call onEnter(ref_function_code__onEnter_DamageDetection) call timer_startPeriodic(CreateTimer(), 600., ref_function_swap) return true endfunction function EventListener_add takes eventid eventId, integer listener_1 returns integer set EventListener_eventId[listener_1] = eventid_toIntId(eventId) if EventListener_generalListenersFirsts[EventListener_eventId[listener_1]] != 0 then set EventListener_prev[EventListener_generalListenersFirsts[EventListener_eventId[listener_1]]] = listener_1 set EventListener_next[listener_1] = EventListener_generalListenersFirsts[EventListener_eventId[listener_1]] endif set EventListener_generalListenersFirsts[EventListener_eventId[listener_1]] = listener_1 return listener_1 endfunction function alloc_EventListener_add_DamageEvent takes nothing returns integer local integer this_1 if EventListener_firstFree == 0 then if EventListener_maxIndex < 32768 then set EventListener_maxIndex = EventListener_maxIndex + 1 set this_1 = EventListener_maxIndex set EventListener_typeId[this_1] = 1920 else call error("Out of memory: Could not create EventListener_add_DamageEvent.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 1920 endif return this_1 endfunction function alloc_EventListener_add_DamageEvent_325 takes nothing returns integer local integer this_1 if EventListener_firstFree == 0 then if EventListener_maxIndex < 32768 then set EventListener_maxIndex = EventListener_maxIndex + 1 set this_1 = EventListener_maxIndex set EventListener_typeId[this_1] = 1921 else call error("Out of memory: Could not create EventListener_add_DamageEvent.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 1921 endif return this_1 endfunction function EventListener_init takes integer this_1 returns nothing set EventListener_eventId[this_1] = 0 set EventListener_uid[this_1] = -1 set EventListener_next[this_1] = 0 set EventListener_prev[this_1] = 0 endfunction function construct_EventListener takes integer this_1 returns nothing call EventListener_init(this_1) endfunction function alloc_DamageElement takes nothing returns integer local integer this_1 if DamageElement_firstFree == 0 then if DamageElement_maxIndex < 32768 then set DamageElement_maxIndex = DamageElement_maxIndex + 1 set this_1 = DamageElement_maxIndex else call error("Out of memory: Could not create DamageElement.") set this_1 = 0 endif else set DamageElement_firstFree = DamageElement_firstFree - 1 set this_1 = DamageElement_nextFree[DamageElement_firstFree] endif return this_1 endfunction function DamageElement_init takes integer this_1 returns nothing endfunction function construct_DamageElement takes integer this_1, string name, integer color_red, integer color_green, integer color_blue, integer color_alpha returns nothing call DamageElement_init(this_1) endfunction function new_DamageElement takes string name, integer color_red, integer color_green, integer color_blue, integer color_alpha returns integer local integer this_1 = alloc_DamageElement() call construct_DamageElement(this_1, name, color_red, color_green, color_blue, color_alpha) return this_1 endfunction function init_DamageEvent takes nothing returns boolean local integer clVar local playerunitevent temp set DamageEvent_DAMAGE_ELEMENT_ATTACK = new_DamageElement("Physical", 223, 59, 33, 255) set DamageInstance_current = 0 set DamageEvent_nextDamageType = 4 set DamageEvent_nextDamageElement = 0 set temp = EVENT_PLAYER_UNIT_DAMAGING set clVar = alloc_EventListener_add_DamageEvent() call construct_EventListener(clVar) call EventListener_add(temp, clVar) set temp = EVENT_PLAYER_UNIT_DAMAGED set clVar = alloc_EventListener_add_DamageEvent_325() call construct_EventListener(clVar) call EventListener_add(temp, clVar) return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_DialogBox takes nothing returns boolean call new_HashMap() return true endfunction function init_Doodads takes nothing returns boolean return true endfunction function createUnit takes player p, integer unitId, real pos_x_1, real pos_y_1, real facing_radians returns unit return CreateUnit(p, unitId, pos_x_1, pos_y_1, angle_degrees(facing_radians)) endfunction function createDummy takes real pos_x_1, real pos_y_1, real facing_radians returns unit local unit u_1 = createUnit(Basics_DUMMY_PLAYER, 2016423985, pos_x_1, pos_y_1, 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_1, pos_y_1) call unit_setFacing(u_1, facing_radians) return u_1 endfunction function alloc_LinkedList takes nothing returns integer local integer this_1 if LinkedList_firstFree == 0 then if LinkedList_maxIndex < 32768 then set LinkedList_maxIndex = LinkedList_maxIndex + 1 set this_1 = LinkedList_maxIndex set LinkedList_typeId[this_1] = 2757 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] = 2757 endif return this_1 endfunction function LinkedList_init takes integer this_1 returns nothing set LinkedList_dummy[this_1] = new_LLEntry(0, 0, 0) set LinkedList_size[this_1] = 0 endfunction function construct_LinkedList2 takes integer this_1 returns nothing call LinkedList_init(this_1) set LLEntry_next[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] set LLEntry_prev[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] endfunction function new_LinkedList takes nothing returns integer local integer this_1 = alloc_LinkedList() call construct_LinkedList2(this_1) return this_1 endfunction function realToIndex takes real r returns integer return real_toInt(r * 1000.) endfunction function init_DummyRecycler takes nothing returns boolean local integer i local integer temp local real facing_radians local integer j local integer temp_1 local unit dummy_1 set DummyRecycler_ANGLE_DEGREE = 360 * 1. / 8 call realToIndex(1.) set i = 0 set temp = 7 loop exitwhen i > temp set DummyRecycler_angleQueues[i] = new_LinkedList() set facing_radians = i * DummyRecycler_ANGLE_DEGREE set j = 0 set temp_1 = 5 loop exitwhen j > temp_1 set dummy_1 = createDummy(vec2_op_minus(MapBounds_boundMax_x, MapBounds_boundMax_y, 16., 16.), vec2_op_minus_return_y, facing_radians) call dispatch_LinkedList_LinkedList_LinkedList_enqueue(DummyRecycler_angleQueues[i], unitToIndex(dummy_1)) set j = j + 1 endloop set i = i + 1 endloop return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_HT = hashtable_compiletime_343 set ErrorHandling_lastError = "" return true endfunction function init_EventHelper takes nothing returns boolean call new_HashMap() call new_HashMap() call new_Table() return true endfunction function force_addPlayer takes force this_1, player whichPlayer returns nothing call ForceAddPlayer(this_1, whichPlayer) endfunction function init_Execute takes nothing returns boolean set Execute_executeForce = CreateForce() call force_addPlayer(Execute_executeForce, Player_localPlayer) return true endfunction function ChunkedString_getChunkCount takes integer this_1 returns integer return ChunkedString_chunkCount[this_1] + 1 endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount takes integer this_1 returns integer if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunkCount") else call error("Called ChunkedString.getChunkCount on invalid object.") endif endif return ChunkedString_getChunkCount(this_1) endfunction function ChunkedString_getUnsafeString takes integer this_1 returns string local string out = "" local integer i = 0 local integer temp = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(this_1) loop exitwhen i > temp set out = out + dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(this_1, i) set i = i + 1 endloop return out endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_getUnsafeString takes integer this_1 returns string if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.getUnsafeString") else call error("Called ChunkedString.getUnsafeString on invalid object.") endif endif return ChunkedString_getUnsafeString(this_1) endfunction function File_readPreload takes integer this_1, integer output returns nothing local integer temp local string chunk call Preloader(File_filename[this_1]) set this_1 = 0 set temp = 63 loop exitwhen this_1 > temp set chunk = BlzGetAbilityTooltip(611808108, this_1) exitwhen chunk == " " call BlzSetAbilityTooltip(611808108, " ", this_1) call dispatch_ChunkedString_ChunkedString_ChunkedString_append(output, chunk) set this_1 = this_1 + 1 endloop endfunction function dispatch_File_FileIO_File_readPreload takes integer this_1, integer output returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.readPreload") else call error("Called File.readPreload on invalid object.") endif endif call File_readPreload(this_1, output) endfunction function alloc_ChunkedString takes nothing returns integer local integer this_1 if ChunkedString_firstFree == 0 then if ChunkedString_maxIndex < 32768 then set ChunkedString_maxIndex = ChunkedString_maxIndex + 1 set this_1 = ChunkedString_maxIndex set ChunkedString_typeId[this_1] = 1208 else call error("Out of memory: Could not create ChunkedString.") set this_1 = 0 endif else set ChunkedString_firstFree = ChunkedString_firstFree - 1 set this_1 = ChunkedString_nextFree[ChunkedString_firstFree] set ChunkedString_typeId[this_1] = 1208 endif return this_1 endfunction function ChunkedString_init takes integer this_1 returns nothing set ChunkedString_table[this_1] = new_Table() set ChunkedString_chunkSize[this_1] = 200 set ChunkedString_chunkCount[this_1] = 0 set ChunkedString_readIndex[this_1] = -1 set ChunkedString_buffer[this_1] = "" endfunction function construct_ChunkedString2 takes integer this_1, integer chunkSize returns nothing call ChunkedString_init(this_1) set ChunkedString_chunkSize[this_1] = chunkSize endfunction function new_ChunkedString_760 takes integer chunkSize returns integer local integer this_1 = alloc_ChunkedString() call construct_ChunkedString2(this_1, chunkSize) return this_1 endfunction function File_read takes integer this_1, player p returns integer local integer out = new_ChunkedString_760(200) if Player_localPlayer == p then call dispatch_File_FileIO_File_readPreload(this_1, out) endif return out endfunction function dispatch_File_FileIO_File_read takes integer this_1, player p returns integer if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.read") else call error("Called File.read on invalid object.") endif endif return File_read(this_1, p) endfunction function File_readAsString takes integer this_1, player p returns string local string str set this_1 = dispatch_File_FileIO_File_read(this_1, p) set str = dispatch_ChunkedString_ChunkedString_ChunkedString_getUnsafeString(this_1) call dispatch_ChunkedString_destroyChunkedString(this_1) return str endfunction function dispatch_File_FileIO_File_readAsString takes integer this_1, player p returns string if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.readAsString") else call error("Called File.readAsString on invalid object.") endif endif return File_readAsString(this_1, p) endfunction function StringIterator_onDestroy takes integer this_1 returns nothing endfunction function dealloc_StringIterator takes integer obj returns nothing if StringIterator_typeId[obj] == 0 then call error("Double free: object of type StringIterator") else set StringIterator_nextFree[StringIterator_firstFree] = obj set StringIterator_firstFree = StringIterator_firstFree + 1 set StringIterator_typeId[obj] = 0 endif endfunction function destroyStringIterator takes integer this_1 returns nothing call StringIterator_onDestroy(this_1) call dealloc_StringIterator(this_1) endfunction function dispatch_StringIterator_destroyStringIterator takes integer this_1 returns nothing if StringIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling StringIterator.StringIterator") else call error("Called StringIterator.StringIterator on invalid object.") endif endif call destroyStringIterator(this_1) endfunction function StringIterator_close takes integer this_1 returns nothing call dispatch_StringIterator_destroyStringIterator(this_1) endfunction function StringIterator_hasNext takes integer this_1 returns boolean return StringIterator_currentpos[this_1] < StringIterator_stringLen[this_1] endfunction function StringIterator_next takes integer this_1 returns string local string wval = string_substring(StringIterator_s[this_1], StringIterator_currentpos[this_1], StringIterator_currentpos[this_1] + 1) set StringIterator_currentpos[this_1] = StringIterator_currentpos[this_1] + 1 return wval endfunction function alloc_StringIterator takes nothing returns integer local integer this_1 if StringIterator_firstFree == 0 then if StringIterator_maxIndex < 32768 then set StringIterator_maxIndex = StringIterator_maxIndex + 1 set this_1 = StringIterator_maxIndex set StringIterator_typeId[this_1] = 4075 else call error("Out of memory: Could not create StringIterator.") set this_1 = 0 endif else set StringIterator_firstFree = StringIterator_firstFree - 1 set this_1 = StringIterator_nextFree[StringIterator_firstFree] set StringIterator_typeId[this_1] = 4075 endif return this_1 endfunction function StringIterator_init takes integer this_1 returns nothing endfunction function construct_StringIterator takes integer this_1, string s, integer currentpos, integer stringLen returns nothing call StringIterator_init(this_1) set StringIterator_s[this_1] = s set StringIterator_currentpos[this_1] = currentpos set StringIterator_stringLen[this_1] = stringLen endfunction function new_StringIterator takes string s, integer currentpos, integer stringLen returns integer local integer this_1 = alloc_StringIterator() call construct_StringIterator(this_1, s, currentpos, stringLen) return this_1 endfunction function string_iterator takes string this_1 returns integer return new_StringIterator(this_1, 0, string_length(this_1)) endfunction function File_validateInput takes string content returns string local integer iterator = string_iterator(content) loop exitwhen not StringIterator_hasNext(iterator) set content = StringIterator_next(iterator) if content == "\\" then call StringIterator_close(iterator) return content elseif content == "\"" then call StringIterator_close(iterator) return content endif endloop call StringIterator_close(iterator) return null endfunction function File_writePreload takes integer this_1, player p, integer buffer returns nothing local integer i local integer temp if Player_localPlayer == p then call PreloadGenClear() call PreloadGenStart() if dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(buffer) >= 64 then call error("FileIO(" + File_filename[this_1] + ") ERROR: String's chunk count exceeds the limit (" + int_toString(64) + ").|r") endif set i = 0 set temp = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(buffer) - 1 loop exitwhen i > temp call Preload("\" )\ncall BlzSetAbilityTooltip('" + FileIO_FILE_IO_ABIL_ID_STR + "', \"" + dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(buffer, i) + "\", " + int_toString(i) + ")\n//") set i = i + 1 endloop call Preload("\" )\nendfunction\nfunction a takes nothing returns nothing\n //") call PreloadGenEnd(File_filename[this_1]) endif endfunction function dispatch_File_FileIO_File_writePreload takes integer this_1, player p, integer buffer returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.writePreload") else call error("Called File.writePreload on invalid object.") endif endif call File_writePreload(this_1, p, buffer) endfunction function File_write_112 takes integer this_1, player p, integer buffer returns nothing local integer i = 0 local integer temp = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(buffer) - 1 local string str loop exitwhen i > temp set str = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(buffer, i) if File_validateInput(str) != null then call error("FileIO(" + File_filename[this_1] + ") ERROR: Invalid character |cffffcc00" + File_validateInput(str) + "|r") endif set i = i + 1 endloop call dispatch_File_FileIO_File_writePreload(this_1, p, buffer) endfunction function dispatch_File_FileIO_File_write_520 takes integer this_1, player p, integer buffer returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.write") else call error("Called File.write on invalid object.") endif endif call File_write_112(this_1, p, buffer) endfunction function construct_ChunkedString takes integer this_1 returns nothing call ChunkedString_init(this_1) endfunction function new_ChunkedString takes nothing returns integer local integer this_1 = alloc_ChunkedString() call construct_ChunkedString(this_1) return this_1 endfunction function File_write takes integer this_1, player p, string content returns nothing local integer buffer = new_ChunkedString() call dispatch_ChunkedString_ChunkedString_ChunkedString_append(buffer, content) call dispatch_File_FileIO_File_write_520(this_1, p, buffer) call dispatch_ChunkedString_destroyChunkedString(buffer) endfunction function dispatch_File_FileIO_File_write takes integer this_1, player p, string content returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.write") else call error("Called File.write on invalid object.") endif endif call File_write(this_1, p, content) endfunction function toRawCode takes integer value returns string local string result_1 = "" local integer byteno = 0 local integer charValue loop exitwhen byteno > 3 set charValue = ModuloInteger(value, 256) set value = value / 256 set result_1 = string_charAt(".................................!.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~.................................................................................................................................", charValue) + result_1 set byteno = byteno + 1 endloop return result_1 endfunction function int_toRawCode takes integer this_1 returns string return toRawCode(this_1) endfunction function alloc_File takes nothing returns integer local integer this_1 if File_firstFree == 0 then if File_maxIndex < 32768 then set File_maxIndex = File_maxIndex + 1 set this_1 = File_maxIndex set File_typeId[this_1] = 2013 else call error("Out of memory: Could not create File.") set this_1 = 0 endif else set File_firstFree = File_firstFree - 1 set this_1 = File_nextFree[File_firstFree] set File_typeId[this_1] = 2013 endif return this_1 endfunction function File_init takes integer this_1 returns nothing set File_filename[this_1] = "" endfunction function construct_File takes integer this_1, string filename returns nothing call File_init(this_1) set File_filename[this_1] = filename endfunction function new_File takes string filename returns integer local integer this_1 = alloc_File() call construct_File(this_1, filename) return this_1 endfunction function init_FileIO takes nothing returns boolean local integer receiver set FileIO_FILE_IO_ABIL_ID_STR = int_toRawCode(611808108) set receiver = new_File("FileTester.pld") call dispatch_File_FileIO_File_write(receiver, Player_localPlayer, "test") call dispatch_File_FileIO_File_readAsString(receiver, Player_localPlayer) return true endfunction function init_ForceTests takes nothing returns boolean return true endfunction function verifyFrameNameLength takes string name returns boolean if string_length(name) > 560 then call error("Trying to address frame with exceeding maximum frame name length (" + int_toString(560) + ") for: " + name) return false endif return true endfunction function createFrame takes string typeName, string name, framehandle owner, string inherits, integer createContext returns framehandle call verifyFrameNameLength(name) return BlzCreateFrameByType(typeName, name, owner, inherits, createContext) endfunction function framehandle_setSize takes framehandle this_1, real width, real height returns nothing call BlzFrameSetSize(this_1, width, height) endfunction function init_Framehandle takes nothing returns boolean set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) call framehandle_setSize(createFrame("FRAME", "SetMousePositionCage", Framehandle_GAME_UI, null, 0), 0.0001, 0.0001) return true endfunction function init_FramehandleNames takes nothing returns boolean return true endfunction function player_getId takes player this_1 returns integer return GetPlayerId(this_1) endfunction function player_getController takes player this_1 returns mapcontrol return GetPlayerController(this_1) endfunction function player_getSlotState takes player this_1 returns playerslotstate return GetPlayerSlotState(this_1) endfunction function player_isIngame takes player this_1 returns boolean return player_getSlotState(this_1) == PLAYER_SLOT_STATE_PLAYING and player_getController(this_1) == MAP_CONTROL_USER endfunction function init_GameStatus takes nothing returns boolean local player firstPlayer local unit u_1 local boolean selected set GameStatus_gameStatus = 0 set firstPlayer = Player(0) loop exitwhen player_isIngame(firstPlayer) set firstPlayer = Player(player_getId(firstPlayer) + 1) endloop set u_1 = CreateUnit(firstPlayer, 1751543663, 0., 0., 0.) call SelectUnit(u_1, true) set selected = IsUnitSelected(u_1, firstPlayer) call RemoveUnit(u_1) if selected then if ReloadGameCachesFromDisk() then set GameStatus_gameStatus = 2 else set GameStatus_gameStatus = 3 endif else set GameStatus_gameStatus = 1 endif return true 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 set Group_ENUM_GROUP = CreateGroup() return true endfunction function Log_warn takes string msg returns nothing call printLog(Player_localPlayer, 3, msg) endfunction function alloc_ForForceCallback_execute_GroupUtils takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < 32768 then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2069 else call error("Out of memory: Could not create ForForceCallback_execute_GroupUtils.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 2069 endif return this_1 endfunction function max_2 takes integer numbers_0, integer numbers_1 returns integer if numbers_0 > -2147483648 then else set numbers_0 = -2147483648 endif if numbers_1 > numbers_0 then set numbers_0 = numbers_1 endif return numbers_0 endfunction function createGroups takes integer number returns nothing local integer maxCreatePerCycle = 256 local integer createNow_1 = max_2(JASS_MAX_ARRAY_SIZE - 1, 1024) local integer toCreate set number = GroupUtils_numTotal + number set toCreate = max_2(0, number - max_2(0, number - createNow_1)) loop exitwhen toCreate <= 0 set createNow_1 = min_2(toCreate, maxCreatePerCycle) set toCreate = toCreate - createNow_1 set number = alloc_ForForceCallback_execute_GroupUtils() set createNow[number] = createNow_1 call execute(number) endloop if GroupUtils_numTotal >= 1024 and ( not GroupUtils_shownMaxError) then call Log_warn("Maximum number of GroupUtils groups (" + int_toString(1024) + ") created. " + "All newly created groups will be non-recyclable.") set GroupUtils_shownMaxError = true endif endfunction function initialize takes nothing returns nothing call createGroups(64) endfunction function init_GroupUtils takes nothing returns boolean set GroupUtils_used = new_HashMap() call initialize() return true endfunction function init_HashList takes nothing returns boolean set HashList_ht = hashtable_compiletime set HashList_occurences = hashtable_compiletime_342 return true endfunction function init_HashListTests takes nothing returns boolean return true endfunction function init_HashSet takes nothing returns boolean set HashSet_position = hashtable_compiletime_345 return true endfunction function init_Icons takes nothing returns boolean return true endfunction function unit_setPathing takes unit this_1, boolean value returns nothing call SetUnitPathing(this_1, value) endfunction function init_InstantDummyCaster takes nothing returns boolean local unit receiver = createUnit(Basics_DUMMY_PLAYER, 2016423986, MapBounds_boundMax_x, MapBounds_boundMax_y, 0.) call unit_setPathing(receiver, false) call unit_addAbility(receiver, 1097691750) call unit_removeAbility(receiver, 1097691750) call unit_addAbility(receiver, 1095577651) call unit_removeAbility(receiver, 1095577651) return true endfunction function init_Integer takes nothing returns boolean return true endfunction function init_ItemIds takes nothing returns boolean return true endfunction function alloc_TerrainZProvider_Knockback3 takes nothing returns integer local integer this_1 if TerrainZProvider_firstFree == 0 then if TerrainZProvider_maxIndex < 32768 then set TerrainZProvider_maxIndex = TerrainZProvider_maxIndex + 1 set this_1 = TerrainZProvider_maxIndex else call error("Out of memory: Could not create TerrainZProvider_Knockback3.") set this_1 = 0 endif else set TerrainZProvider_firstFree = TerrainZProvider_firstFree - 1 set this_1 = TerrainZProvider_nextFree[TerrainZProvider_firstFree] endif return this_1 endfunction function alloc_UnitFilter_Knockback3 takes nothing returns integer local integer this_1 if UnitFilter_firstFree == 0 then if UnitFilter_maxIndex < 32768 then set UnitFilter_maxIndex = UnitFilter_maxIndex + 1 set this_1 = UnitFilter_maxIndex else call error("Out of memory: Could not create UnitFilter_Knockback3.") set this_1 = 0 endif else set UnitFilter_firstFree = UnitFilter_firstFree - 1 set this_1 = UnitFilter_nextFree[UnitFilter_firstFree] endif return this_1 endfunction function alloc_WallHitTransform_Knockback3 takes nothing returns integer local integer this_1 if WallHitTransform_firstFree == 0 then if WallHitTransform_maxIndex < 32768 then set WallHitTransform_maxIndex = WallHitTransform_maxIndex + 1 set this_1 = WallHitTransform_maxIndex else call error("Out of memory: Could not create WallHitTransform_Knockback3.") set this_1 = 0 endif else set WallHitTransform_firstFree = WallHitTransform_firstFree - 1 set this_1 = WallHitTransform_nextFree[WallHitTransform_firstFree] endif return this_1 endfunction function alloc_BackIterator takes nothing returns integer local integer this_1 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 return this_1 endfunction function BackIterator_init takes integer this_1 returns nothing endfunction function construct_BackIterator takes integer this_1, boolean destroyOnClose returns nothing call BackIterator_init(this_1) endfunction function new_BackIterator takes boolean destroyOnClose returns integer local integer this_1 = alloc_BackIterator() call construct_BackIterator(this_1, destroyOnClose) return this_1 endfunction function alloc_Iterator takes nothing returns integer local integer this_1 if Iterator_firstFree == 0 then if Iterator_maxIndex < 32768 then set Iterator_maxIndex = Iterator_maxIndex + 1 set this_1 = Iterator_maxIndex else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree = Iterator_firstFree - 1 set this_1 = Iterator_nextFree[Iterator_firstFree] endif return this_1 endfunction function Iterator_init takes integer this_1 returns nothing endfunction function construct_Iterator takes integer this_1, boolean destroyOnClose returns nothing call Iterator_init(this_1) endfunction function new_Iterator takes boolean destroyOnClose returns integer local integer this_1 = alloc_Iterator() call construct_Iterator(this_1, destroyOnClose) return this_1 endfunction function init_Knockback3 takes nothing returns boolean call alloc_TerrainZProvider_Knockback3() call alloc_WallHitTransform_Knockback3() call alloc_UnitFilter_Knockback3() call new_Iterator(false) call new_BackIterator(false) call Rect( - 130.0, - 130.0, 130., 130.) call new_HashMap() call CreateTimer() return true endfunction function registerPlayerUnitEvent_815 takes playerunitevent p, code filter, code c returns nothing call registerPlayerUnitEvent_816(p, filter, c, null) endfunction function init_LastOrder takes nothing returns boolean call registerPlayerUnitEvent_815(EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER, null, ref_function_actions) call registerPlayerUnitEvent_815(EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER, null, ref_function_actions) call registerPlayerUnitEvent_815(EVENT_PLAYER_UNIT_ISSUED_ORDER, null, ref_function_actions) call registerPlayerUnitEvent_815(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_spellActions) call onUnitDeindex(ref_function_code__onUnitDeindex_LastOrder) return true endfunction function init_Lightning takes nothing returns boolean return true endfunction function alloc_Comparator_LinkedList takes nothing returns integer local integer this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 set this_1 = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] endif return this_1 endfunction function alloc_Comparator_LinkedList_321 takes nothing returns integer local integer this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 set this_1 = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] endif return this_1 endfunction function init_LinkedList takes nothing returns boolean call alloc_Comparator_LinkedList() call alloc_Comparator_LinkedList_321() call realToIndex(0.) return true endfunction function alloc_BackIterator_313 takes nothing returns integer local integer this_1 if BackIterator_firstFree_3 == 0 then if BackIterator_maxIndex_5 < 32768 then set BackIterator_maxIndex_5 = BackIterator_maxIndex_5 + 1 set this_1 = BackIterator_maxIndex_5 else call error("Out of memory: Could not create BackIterator.") set this_1 = 0 endif else set BackIterator_firstFree_3 = BackIterator_firstFree_3 - 1 set this_1 = BackIterator_nextFree_7[BackIterator_firstFree_3] endif return this_1 endfunction function BackIterator_init_2 takes integer this_1 returns nothing endfunction function construct_BackIterator_402 takes integer this_1, boolean destroyOnClose returns nothing call BackIterator_init_2(this_1) endfunction function new_BackIterator_758 takes boolean destroyOnClose returns integer local integer this_1 = alloc_BackIterator_313() call construct_BackIterator_402(this_1, destroyOnClose) return this_1 endfunction function alloc_Iterator_335 takes nothing returns integer local integer this_1 if Iterator_firstFree_190 == 0 then if Iterator_maxIndex_192 < 32768 then set Iterator_maxIndex_192 = Iterator_maxIndex_192 + 1 set this_1 = Iterator_maxIndex_192 else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree_190 = Iterator_firstFree_190 - 1 set this_1 = Iterator_nextFree_194[Iterator_firstFree_190] endif return this_1 endfunction function Iterator_init_193 takes integer this_1 returns nothing endfunction function construct_Iterator_413 takes integer this_1, boolean destroyOnClose returns nothing call Iterator_init_193(this_1) endfunction function new_Iterator_767 takes boolean destroyOnClose returns integer local integer this_1 = alloc_Iterator_335() call construct_Iterator_413(this_1, destroyOnClose) return this_1 endfunction function init_LinkedListModuleTests takes nothing returns boolean call new_Iterator_767(false) call new_BackIterator_758(false) return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true endfunction function rect_getMaxX takes rect this_1 returns real return GetRectMaxX(this_1) endfunction function rect_getMaxY takes rect this_1 returns real return GetRectMaxY(this_1) endfunction function rect_getMinX takes rect this_1 returns real return GetRectMinX(this_1) endfunction function rect_getMinY takes rect this_1 returns real return GetRectMinY(this_1) endfunction function region_addRect takes region this_1, rect rct returns nothing call RegionAddRect(this_1, rct) endfunction function vec2_op_mult takes real this_x, real this_y, real factor returns real set vec2_op_mult_return_x = this_x * factor return vec2_op_mult_return_x endfunction function 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 region receiver local real tuple_temp local real tuple_temp_1 if MagicFunctions_compiletime then set cond_result = Rect(-1024., -1024., 1024., 1024.) else set cond_result = GetPlayableMapRect() endif set MapBounds_playableMapRect = cond_result call region_addRect(CreateRegion(), MapBounds_playableMapRect) if MagicFunctions_compiletime then set cond_result = Rect(-1536., -1536., 1536., 1536.) else set cond_result = GetWorldBounds() endif set MapBounds_boundRect = cond_result set receiver = CreateRegion() call region_addRect(receiver, MapBounds_boundRect) set MapBounds_boundRegion = receiver set tuple_temp = rect_getMinX(MapBounds_playableMapRect) set tuple_temp_1 = rect_getMinY(MapBounds_playableMapRect) set MapBounds_playableMin_x = tuple_temp set MapBounds_playableMin_y = tuple_temp_1 set tuple_temp_1 = rect_getMaxX(MapBounds_playableMapRect) set tuple_temp = rect_getMaxY(MapBounds_playableMapRect) set MapBounds_playableMax_x = tuple_temp_1 set MapBounds_playableMax_y = tuple_temp set tuple_temp = rect_getMinX(MapBounds_boundRect) set tuple_temp_1 = rect_getMinY(MapBounds_boundRect) set MapBounds_boundMin_x = tuple_temp set MapBounds_boundMin_y = tuple_temp_1 set tuple_temp_1 = rect_getMaxX(MapBounds_boundRect) set tuple_temp = rect_getMaxY(MapBounds_boundRect) set MapBounds_boundMax_x = tuple_temp_1 set MapBounds_boundMax_y = tuple_temp call vec2_op_mult(vec2_op_plus(MapBounds_playableMin_x, MapBounds_playableMin_y, MapBounds_playableMax_x, MapBounds_playableMax_y), vec2_op_plus_return_y, .5) call vec2_op_mult(vec2_op_plus(MapBounds_boundMin_x, MapBounds_boundMin_y, MapBounds_boundMax_x, MapBounds_boundMax_y), vec2_op_plus_return_y, .5) endfunction function init_MapBounds takes nothing returns boolean call initMapBounds() return true endfunction function init_Maths takes nothing returns boolean return true endfunction function init_Matrices takes nothing returns boolean return true endfunction function alloc_IdGenerator takes nothing returns integer local integer this_1 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_1 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_1 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_1 = IdGenerator_nextFree[IdGenerator_firstFree] endif return this_1 endfunction function IdGenerator_init takes integer this_1 returns nothing endfunction function construct_IdGenerator takes integer this_1, integer start returns nothing call IdGenerator_init(this_1) endfunction function new_IdGenerator takes integer start returns integer local integer this_1 = alloc_IdGenerator() call construct_IdGenerator(this_1, start) return this_1 endfunction function init_ObjectIdGenerator takes nothing returns boolean call new_IdGenerator(2016423984) call new_IdGenerator(1213018160) call new_IdGenerator(1095577648) call new_IdGenerator(1112354864) call new_IdGenerator(1229795376) call new_IdGenerator(1380790320) return true endfunction function init_ObjectIds takes nothing returns boolean return true endfunction function init_Objects takes nothing returns boolean return true endfunction function alloc_CallbackSingle_nullTimer_OnUnitEnterLeave takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1116 else call error("Out of memory: Could not create CallbackSingle_nullTimer_OnUnitEnterLeave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1116 endif return this_1 endfunction function player_setAbilityAvailable takes player this_1, integer abilityId, boolean avail returns nothing call SetPlayerAbilityAvailable(this_1, abilityId, avail) endfunction function init_OnUnitEnterLeave takes nothing returns boolean local integer i local integer temp set OnUnitEnterLeave_eventTrigger = CreateTrigger() set OnUnitEnterLeave_preplacedUnits = CreateGroup() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call player_setAbilityAvailable(Player_players[i], 1095577652, false) set i = i + 1 endloop set i = alloc_CallbackSingle_nullTimer_OnUnitEnterLeave() call construct_CallbackSingle(i) call nullTimer(i) return true endfunction function init_Orders takes nothing returns boolean return true endfunction function init_PathingMaps takes nothing returns boolean return true endfunction function initPlayerArray takes nothing returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set Player_players[i] = Player(i) set i = i + 1 endloop endfunction function init_Player takes nothing returns boolean set Player_localPlayer = GetLocalPlayer() call initPlayerArray() return true endfunction function init_Playercolor takes nothing returns boolean return true endfunction function alloc_CallbackSingle_nullTimer_Preloader takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1117 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] = 1117 endif return this_1 endfunction function unit_setInvulnerable takes unit this_1, boolean flag returns nothing call SetUnitInvulnerable(this_1, flag) endfunction function init_Preloader takes nothing returns boolean local integer clVar set Preloader_dumg = CreateGroup() set Preloader_dum = createUnit(Basics_DUMMY_PLAYER, 1970497636, MapBounds_playableMin_x, MapBounds_playableMin_y, 0.) call unit_setInvulnerable(Preloader_dum, true) if Preloader_dum == null then call error("DUMMY_UNITID not added correctly to the map.") endif set clVar = alloc_CallbackSingle_nullTimer_Preloader() call construct_CallbackSingle(clVar) call nullTimer(clVar) return true endfunction function init_Printing takes nothing returns boolean return true endfunction function init_Quaternion takes nothing returns boolean return true endfunction function init_Raycast takes nothing returns boolean return true endfunction function init_Real takes nothing returns boolean return true endfunction function init_RegisterEvents takes nothing returns boolean set RegisterEvents_onCastMap = new_HashMap() call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, ref_function_code__registerPlayerUnitEvent_RegisterEvents) return true endfunction function init_SafetyChecks takes nothing returns boolean return true endfunction function init_SaveLoadData takes nothing returns boolean return true endfunction function init_Serializable takes nothing returns boolean return true endfunction function init_Simulate3dSound takes nothing returns boolean return true endfunction function init_SoundUtils takes nothing returns boolean return true endfunction function init_Sounds takes nothing returns boolean return true endfunction function init_Soundsets takes nothing returns boolean return true endfunction function init_StandardTextTags takes nothing returns boolean return true endfunction function init_String takes nothing returns boolean call string_length("0123456789") call string_length("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") return true endfunction function c2sInit takes nothing returns nothing set StringUtils_c2s[0] = "" set StringUtils_c2s[1] = "" set StringUtils_c2s[2] = "" set StringUtils_c2s[3] = "" set StringUtils_c2s[4] = "" set StringUtils_c2s[5] = "" set StringUtils_c2s[6] = "" set StringUtils_c2s[7] = "" set StringUtils_c2s[8] = "" set StringUtils_c2s[9] = "\t" set StringUtils_c2s[10] = "\n" set StringUtils_c2s[11] = "" set StringUtils_c2s[12] = "" set StringUtils_c2s[13] = "\r" set StringUtils_c2s[14] = "" set StringUtils_c2s[15] = "" set StringUtils_c2s[16] = "" set StringUtils_c2s[17] = "" set StringUtils_c2s[18] = "" set StringUtils_c2s[19] = "" set StringUtils_c2s[20] = "" set StringUtils_c2s[21] = "" set StringUtils_c2s[22] = "" set StringUtils_c2s[23] = "" set StringUtils_c2s[24] = "" set StringUtils_c2s[25] = "" set StringUtils_c2s[26] = "" set StringUtils_c2s[27] = "" set StringUtils_c2s[28] = "" set StringUtils_c2s[29] = "" set StringUtils_c2s[30] = "" set StringUtils_c2s[31] = "" set StringUtils_c2s[32] = " " set StringUtils_c2s[33] = "!" set StringUtils_c2s[34] = "\"" set StringUtils_c2s[35] = "#" set StringUtils_c2s[36] = "$" set StringUtils_c2s[37] = "%" set StringUtils_c2s[38] = "&" set StringUtils_c2s[39] = "'" set StringUtils_c2s[40] = "(" set StringUtils_c2s[41] = ")" set StringUtils_c2s[42] = "*" set StringUtils_c2s[43] = "+" set StringUtils_c2s[44] = "," set StringUtils_c2s[45] = "-" set StringUtils_c2s[46] = "." set StringUtils_c2s[47] = "/" set StringUtils_c2s[48] = "0" set StringUtils_c2s[49] = "1" set StringUtils_c2s[50] = "2" set StringUtils_c2s[51] = "3" set StringUtils_c2s[52] = "4" set StringUtils_c2s[53] = "5" set StringUtils_c2s[54] = "6" set StringUtils_c2s[55] = "7" set StringUtils_c2s[56] = "8" set StringUtils_c2s[57] = "9" set StringUtils_c2s[58] = ":" set StringUtils_c2s[59] = ";" set StringUtils_c2s[60] = "<" set StringUtils_c2s[61] = "=" set StringUtils_c2s[62] = ">" set StringUtils_c2s[63] = "?" set StringUtils_c2s[64] = "@" set StringUtils_c2s[65] = "A" set StringUtils_c2s[66] = "B" set StringUtils_c2s[67] = "C" set StringUtils_c2s[68] = "D" set StringUtils_c2s[69] = "E" set StringUtils_c2s[70] = "F" set StringUtils_c2s[71] = "G" set StringUtils_c2s[72] = "H" set StringUtils_c2s[73] = "I" set StringUtils_c2s[74] = "J" set StringUtils_c2s[75] = "K" set StringUtils_c2s[76] = "L" set StringUtils_c2s[77] = "M" set StringUtils_c2s[78] = "N" set StringUtils_c2s[79] = "O" set StringUtils_c2s[80] = "P" set StringUtils_c2s[81] = "Q" set StringUtils_c2s[82] = "R" set StringUtils_c2s[83] = "S" set StringUtils_c2s[84] = "T" set StringUtils_c2s[85] = "U" set StringUtils_c2s[86] = "V" set StringUtils_c2s[87] = "W" set StringUtils_c2s[88] = "X" set StringUtils_c2s[89] = "Y" set StringUtils_c2s[90] = "Z" set StringUtils_c2s[91] = "[" set StringUtils_c2s[92] = "\\" set StringUtils_c2s[93] = "]" set StringUtils_c2s[94] = "^" set StringUtils_c2s[95] = "_" set StringUtils_c2s[96] = "`" set StringUtils_c2s[97] = "a" set StringUtils_c2s[98] = "b" set StringUtils_c2s[99] = "c" set StringUtils_c2s[100] = "d" set StringUtils_c2s[101] = "e" set StringUtils_c2s[102] = "f" set StringUtils_c2s[103] = "g" set StringUtils_c2s[104] = "h" set StringUtils_c2s[105] = "i" set StringUtils_c2s[106] = "j" set StringUtils_c2s[107] = "k" set StringUtils_c2s[108] = "l" set StringUtils_c2s[109] = "m" set StringUtils_c2s[110] = "n" set StringUtils_c2s[111] = "o" set StringUtils_c2s[112] = "p" set StringUtils_c2s[113] = "q" set StringUtils_c2s[114] = "r" set StringUtils_c2s[115] = "s" set StringUtils_c2s[116] = "t" set StringUtils_c2s[117] = "u" set StringUtils_c2s[118] = "v" set StringUtils_c2s[119] = "w" set StringUtils_c2s[120] = "x" set StringUtils_c2s[121] = "y" set StringUtils_c2s[122] = "z" set StringUtils_c2s[123] = "{" set StringUtils_c2s[124] = "|" set StringUtils_c2s[125] = "}" set StringUtils_c2s[126] = "~" set StringUtils_c2s[127] = "" endfunction function string_toUpperCase takes string this_1 returns string return StringCase(this_1, true) endfunction function s2cInit takes nothing returns nothing local integer i = 0 local integer temp = 127 loop exitwhen i > temp if string_toUpperCase(StringUtils_c2s[i]) == StringUtils_c2s[i] then set StringUtils_s2c[StringHash(StringUtils_c2s[i]) / 2033480 + 1002] = i endif set i = i + 1 endloop endfunction function widthInit takes nothing returns nothing endfunction function initialize_742 takes nothing returns nothing call c2sInit() call s2cInit() call widthInit() endfunction function hashtable_hasString takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedString(this_1, parentKey, childKey) endfunction function Table_hasString takes integer this_1, integer parentKey returns boolean return hashtable_hasString(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_hasString takes integer this_1, integer parentKey returns boolean if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.hasString") else call error("Called Table.hasString on invalid object.") endif endif return Table_hasString(this_1, parentKey) endfunction function stringToIndex takes string s returns integer local integer hash = string_getHash(s) loop if dispatch_Table_Table_Table_hasString(TypeCasting_typecastdata, hash) then exitwhen dispatch_Table_Table_Table_loadString(TypeCasting_typecastdata, hash) == s else call dispatch_Table_Table_Table_saveString(TypeCasting_typecastdata, hash, s) exitwhen true endif set hash = hash + 1 endloop return hash endfunction function init_StringUtils takes nothing returns boolean call initialize_742() call stringToIndex("") return true endfunction function init_SyncSimple takes nothing returns boolean local trigger trig local integer i local integer temp set SyncSimple_syncQueue = new_LinkedList() set trig = CreateTrigger() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call BlzTriggerRegisterPlayerSyncEvent(trig, Player_players[i], "S", false) call BlzTriggerRegisterPlayerSyncEvent(trig, Player_players[i], "T", false) set i = i + 1 endloop call trigger_addAction(trig, ref_function_code__addAction_SyncSimple) return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_344 return true endfunction function init_TargetsAllowed takes nothing returns boolean return true endfunction function createItem_425 takes integer itemId, real pos_x_1, real pos_y_1, real pos_z returns item return CreateItem(itemId, pos_x_1, pos_y_1) endfunction function vec2_toVec3 takes real this_x, real this_y returns real set vec2_toVec3_return_x = this_x set vec2_toVec3_return_y = this_y set vec2_toVec3_return_z = 0. return vec2_toVec3_return_x endfunction function createItem takes integer itemId, real pos_x_1, real pos_y_1 returns item return createItem_425(itemId, vec2_toVec3(pos_x_1, pos_y_1), vec2_toVec3_return_y, vec2_toVec3_return_z) endfunction function item_setVisible takes item this_1, boolean flag returns nothing call SetItemVisible(this_1, flag) endfunction function real_squared takes real this_1 returns real return this_1 * this_1 endfunction function init_TerrainUtils takes nothing returns boolean call real_squared(10.) call item_setVisible(createItem(2003790951, 0., 0.), false) call Rect(0., 0., 128., 128.) call real_toInt(MapBounds_boundMax_x - MapBounds_boundMin_x) call real_toInt(MapBounds_boundMax_y - MapBounds_boundMin_y) return true endfunction function init_Textures takes nothing returns boolean return true endfunction function init_Tiles takes nothing returns boolean return true endfunction function init_TimerUtils takes nothing returns boolean set TimerUtils_timerData = new_Table() call new_HashMap() return true endfunction function initTypecastData takes nothing returns nothing call dispatch_Table_Table_Table_saveString(TypeCasting_typecastdata, 0, "") endfunction function init_TypeCasting takes nothing returns boolean set TypeCasting_typecastdata = new_Table() call initTypecastData() return true endfunction function init_UI takes nothing returns boolean return true endfunction function init_UnitAnimations takes nothing returns boolean return true endfunction function init_UnitIds takes nothing returns boolean return true endfunction function onLeave takes code c returns nothing call trigger_addAction(OnUnitEnterLeave_eventTrigger, c) endfunction function init_UnitIndexer takes nothing returns boolean set UnitIndexer_onIndexTrigger = CreateTrigger() set UnitIndexer_onDeindexTrigger = CreateTrigger() call onEnter(ref_function_code__onEnter_UnitIndexer) call onLeave(ref_function_code__onLeave_UnitIndexer) return true endfunction function init_Units takes nothing returns boolean return true endfunction function init_UpgradeObjEditing 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 dispatch_FrameHandleListener_ClosureFrames_FrameHandleListener_onEvent takes integer this_1 returns nothing endfunction function onEvent takes nothing returns nothing local integer listener_1 = dispatch_HashMap_HashMap_HashMap_get(ClosureFrames_FRAME_MAP, handle_getHandleId(BlzGetTriggerFrame())) local frameeventtype eventType = BlzGetTriggerFrameEvent() local integer nextListener loop exitwhen listener_1 == 0 set nextListener = FrameHandleListener_next[listener_1] if FrameHandleListener_eventType[listener_1] == eventType then call dispatch_FrameHandleListener_ClosureFrames_FrameHandleListener_onEvent(listener_1) endif set listener_1 = nextListener endloop endfunction function dispatch_KeyPressListener_ClosureKeyPresses_KeyPressListener_onEvent takes integer this_1 returns nothing endfunction function onEvent_782 takes nothing returns nothing local integer listener_1 = dispatch_HashMap_HashMap_HashMap_get(ClosureKeyPresses_KEY_MAP, handle_getHandleId(BlzGetTriggerPlayerKey())) local integer metaKey = BlzGetTriggerPlayerMetaKey() local boolean onKeyDown = BlzGetTriggerPlayerIsKeyDown() loop exitwhen listener_1 == 0 if KeyPressListener_metaKey[listener_1] == metaKey and KeyPressListener_onKeyDown[listener_1] == onKeyDown then call dispatch_KeyPressListener_ClosureKeyPresses_KeyPressListener_onEvent(listener_1) endif set listener_1 = KeyPressListener_next[listener_1] endloop endfunction function spellActions takes nothing returns nothing call unit_getIndex(GetTriggerUnit()) endfunction function group_add_1 takes group this_1, group groups_0 returns integer return 0 + BlzGroupAddGroupFast(groups_0, this_1) endfunction function group_enumUnitsOfPlayer takes group this_1, player p, boolexpr filter returns nothing call GroupEnumUnitsOfPlayer(this_1, p, filter) endfunction function group_enumUnitsAll takes group this_1, boolexpr filter returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call group_enumUnitsOfPlayer(Group_ENUM_GROUP, Player_players[i], filter) call group_add_1(this_1, Group_ENUM_GROUP) set i = i + 1 endloop call group_clear(Group_ENUM_GROUP) endfunction function trigger_destr takes trigger this_1 returns nothing call DestroyTrigger(this_1) endfunction function trigger_disable takes trigger this_1 returns nothing call DisableTrigger(this_1) endfunction function swap takes nothing returns nothing local boolean isEnabled = IsTriggerEnabled(DamageDetection_current) local integer i local integer temp call trigger_disable(DamageDetection_current) if DamageDetection_toDestroy != null then call trigger_destr(DamageDetection_toDestroy) endif set DamageDetection_toDestroy = DamageDetection_current set DamageDetection_current = CreateTrigger() if not isEnabled then call trigger_disable(DamageDetection_current) endif call group_enumUnitsAll(Group_ENUM_GROUP, DamageDetection_filter) set i = 0 set temp = -1 loop exitwhen i > temp call trigger_addCondition(DamageDetection_current, DamageDetection_func[i]) set i = i + 1 endloop endfunction function initGlobals takes nothing returns nothing set ref_function_init_Abilities = function init_Abilities set ref_function_init_AbilityIds = function init_AbilityIds set ref_function_init_Real = function init_Real set ref_function_init_Integer = function init_Integer set ref_function_init_BitSet = function init_BitSet set ref_function_init_String = function init_String set ref_function_init_TargetsAllowed = function init_TargetsAllowed set ref_function_init_Angle = function init_Angle set ref_function_init_Vectors = function init_Vectors set ref_function_init_Destructable = function init_Destructable set ref_function_init_Player = function init_Player set ref_function_init_Maths = function init_Maths set ref_function_init_Printing = function init_Printing set ref_function_init_MagicFunctions = function init_MagicFunctions set ref_function_init_Basics = function init_Basics set ref_function_init_GameTimer = function init_GameTimer set ref_function_init_ErrorHandling = function init_ErrorHandling set ref_function_init_Matrices = function init_Matrices set ref_function_init_Quaternion = function init_Quaternion set ref_function_init_Table = function init_Table set ref_function_init_Playercolor = function init_Playercolor set ref_function_init_Colors = function init_Colors set ref_function_init_Framehandle = function init_Framehandle set ref_function_init_Group = function init_Group set ref_function_init_Lightning = function init_Lightning set ref_function_init_WeatherEffects = function init_WeatherEffects set ref_function_init_TypeCasting = function init_TypeCasting set ref_function_init_HashList = function init_HashList set ref_function_init_EventHelper = function init_EventHelper set ref_function_init_AbilityObjEditing = function init_AbilityObjEditing set ref_function_init_AttachmentPoints = function init_AttachmentPoints set ref_function_init_BitwiseInit = function init_BitwiseInit set ref_function_init_ClosureForGroups = function init_ClosureForGroups set ref_function_init_LinkedList = function init_LinkedList set ref_function_init_StringUtils = function init_StringUtils set ref_function_init_SafetyChecks = function init_SafetyChecks set ref_function_init_ChunkedString = function init_ChunkedString set ref_function_init_Execute = function init_Execute set ref_function_init_Base64 = function init_Base64 set ref_function_init_Base64Tests = function init_Base64Tests set ref_function_init_BigNum = function init_BigNum set ref_function_init_BuffIds = function init_BuffIds set ref_function_init_Buildings = function init_Buildings set ref_function_init_ObjectIds = function init_ObjectIds set ref_function_init_TimerUtils = function init_TimerUtils set ref_function_init_ClosureTimers = function init_ClosureTimers set ref_function_init_UnitIds = function init_UnitIds set ref_function_init_MapBounds = function init_MapBounds set ref_function_init_Preloader = function init_Preloader set ref_function_init_ObjectIdGenerator = function init_ObjectIdGenerator set ref_function_init_Icons = function init_Icons set ref_function_init_ChannelAbilityPreset = function init_ChannelAbilityPreset set ref_function_init_RegisterEvents = function init_RegisterEvents set ref_function_init_Orders = function init_Orders set ref_function_init_OnUnitEnterLeave = function init_OnUnitEnterLeave set ref_function_init_UnitIndexer = function init_UnitIndexer set ref_function_init_ClosureEvents = function init_ClosureEvents set ref_function_init_ClosureFrames = function init_ClosureFrames set ref_function_init_ClosureKeyPresses = function init_ClosureKeyPresses set ref_function_init_DamageDetection = function init_DamageDetection set ref_function_init_DamageEvent = function init_DamageEvent set ref_function_init_DialogBox = function init_DialogBox set ref_function_init_Doodads = function init_Doodads set ref_function_init_DummyRecycler = function init_DummyRecycler set ref_function_init_FileIO = function init_FileIO set ref_function_init_ForceTests = function init_ForceTests set ref_function_init_FramehandleNames = function init_FramehandleNames set ref_function_init_GameStatus = function init_GameStatus set ref_function_init_GroupUtils = function init_GroupUtils set ref_function_init_HashListTests = function init_HashListTests set ref_function_init_HashSet = function init_HashSet set ref_function_init_InstantDummyCaster = function init_InstantDummyCaster set ref_function_init_ItemIds = function init_ItemIds set ref_function_init_TerrainUtils = function init_TerrainUtils set ref_function_init_Objects = function init_Objects set ref_function_init_Knockback3 = function init_Knockback3 set ref_function_init_LastOrder = function init_LastOrder set ref_function_init_LinkedListModuleTests = function init_LinkedListModuleTests set ref_function_init_PathingMaps = function init_PathingMaps set ref_function_init_Raycast = function init_Raycast set ref_function_init_SyncSimple = function init_SyncSimple set ref_function_init_SaveLoadData = function init_SaveLoadData set ref_function_init_Serializable = function init_Serializable set ref_function_init_Simulate3dSound = function init_Simulate3dSound set ref_function_init_Sounds = function init_Sounds set ref_function_init_SoundUtils = function init_SoundUtils set ref_function_init_Soundsets = function init_Soundsets set ref_function_init_StandardTextTags = function init_StandardTextTags set ref_function_init_Textures = function init_Textures set ref_function_init_Tiles = function init_Tiles set ref_function_init_UI = function init_UI set ref_function_init_UnitAnimations = function init_UnitAnimations set ref_function_init_Units = function init_Units set ref_function_init_UpgradeObjEditing = function init_UpgradeObjEditing set ref_function_code__onUnitIndex_ClosureEvents = function code__onUnitIndex_ClosureEvents set ref_function_code__onUnitDeindex_ClosureEvents = function code__onUnitDeindex_ClosureEvents set ref_function_EventListener_generalEventCallback = function EventListener_generalEventCallback set ref_function_code__Filter_ClosureForGroups = function code__Filter_ClosureForGroups set ref_function_onEvent = function onEvent set ref_function_onEvent_473 = function onEvent_782 set ref_function_code__Filter_DamageDetection = function code__Filter_DamageDetection set ref_function_code__onEnter_DamageDetection = function code__onEnter_DamageDetection set ref_function_swap = function swap set ref_function_executeCurrentCallback = function executeCurrentCallback set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer set ref_function_actions = function actions set ref_function_spellActions = function spellActions set ref_function_code__onUnitDeindex_LastOrder = function code__onUnitDeindex_LastOrder set ref_function_code__registerPlayerUnitEvent_RegisterEvents = function code__registerPlayerUnitEvent_RegisterEvents set ref_function_code__addAction_SyncSimple = function code__addAction_SyncSimple set ref_function_code__onEnter_UnitIndexer = function code__onEnter_UnitIndexer set ref_function_code__onLeave_UnitIndexer = function code__onLeave_UnitIndexer set ref_function_code__addAction_nullTimer_ClosureEvents = function code__addAction_nullTimer_ClosureEvents set ref_function_code__addAction_nullTimer_ClosureEvents_364 = function code__addAction_nullTimer_ClosureEvents_384 set ref_function_code__addAction_nullTimer_ClosureEvents_365 = function code__addAction_nullTimer_ClosureEvents_385 set ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents = function code__registerPlayerUnitEvent_nullTimer_ClosureEvents set ref_function_code__start_CallbackSingle_ClosureTimers = function code__start_CallbackSingle_ClosureTimers set ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave = function code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave set ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave = function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave set ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave = function code__ForGroup_nullTimer_OnUnitEnterLeave endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call initCompiletimeState() set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_Abilities)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Abilities.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Real)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Real.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Integer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Integer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BitSet)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BitSet.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_String)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package String.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TargetsAllowed)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TargetsAllowed.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Angle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Angle.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Vectors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Vectors.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Destructable)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Destructable.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Player)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Player.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Maths)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Maths.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Printing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Printing.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MagicFunctions)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MagicFunctions.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Basics)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Basics.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameTimer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameTimer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ErrorHandling)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ErrorHandling.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Matrices)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Matrices.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Quaternion)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Quaternion.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Table)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Table.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Playercolor)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Playercolor.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Colors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Colors.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Framehandle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Framehandle.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Group)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Group.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Lightning)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Lightning.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WeatherEffects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WeatherEffects.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TypeCasting)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TypeCasting.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashList.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_EventHelper)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EventHelper.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityObjEditing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityObjEditing.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AttachmentPoints)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AttachmentPoints.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BitwiseInit)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BitwiseInit.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureForGroups)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureForGroups.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_LinkedList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LinkedList.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_StringUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package StringUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SafetyChecks)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SafetyChecks.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ChunkedString)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ChunkedString.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Execute)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Execute.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Base64)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Base64.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Base64Tests)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Base64Tests.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BigNum)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BigNum.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BuffIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BuffIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Buildings)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Buildings.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ObjectIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TimerUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TimerUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureTimers)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureTimers.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MapBounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MapBounds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Preloader)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Preloader.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ObjectIdGenerator)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectIdGenerator.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Icons)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Icons.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ChannelAbilityPreset)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ChannelAbilityPreset.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_RegisterEvents)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package RegisterEvents.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Orders)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Orders.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_OnUnitEnterLeave)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package OnUnitEnterLeave.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitIndexer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitIndexer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureEvents)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureEvents.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureFrames)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureFrames.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ClosureKeyPresses)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureKeyPresses.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_DamageDetection)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DamageDetection.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_DamageEvent)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DamageEvent.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_DialogBox)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DialogBox.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Doodads)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Doodads.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_DummyRecycler)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DummyRecycler.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_FileIO)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package FileIO.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ForceTests)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ForceTests.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_FramehandleNames)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package FramehandleNames.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameStatus)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameStatus.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GroupUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GroupUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashListTests)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashListTests.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashSet)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashSet.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_InstantDummyCaster)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package InstantDummyCaster.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ItemIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ItemIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TerrainUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TerrainUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Objects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Objects.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Knockback3)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Knockback3.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_LastOrder)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LastOrder.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_LinkedListModuleTests)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LinkedListModuleTests.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_PathingMaps)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package PathingMaps.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Raycast)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Raycast.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SyncSimple)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SyncSimple.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SaveLoadData)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SaveLoadData.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Serializable)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Serializable.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Simulate3dSound)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Simulate3dSound.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Sounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Sounds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SoundUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SoundUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Soundsets)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Soundsets.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_StandardTextTags)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package StandardTextTags.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Textures)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Textures.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Tiles)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Tiles.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UI)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UI.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitAnimations)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitAnimations.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Units)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Units.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UpgradeObjEditing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UpgradeObjEditing.") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function config takes nothing returns nothing endfunction