// 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 // originframetype ORIGIN_FRAME_WORLD_FRAME=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_maxCount=0 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 integer Colors_COLOR_WHITE_red=0 integer Colors_COLOR_WHITE_green=0 integer Colors_COLOR_WHITE_blue=0 integer Colors_COLOR_WHITE_alpha=0 integer Colors_COLOR_BLACK_red=0 integer Colors_COLOR_BLACK_green=0 integer Colors_COLOR_BLACK_blue=0 integer Colors_COLOR_BLACK_alpha=0 integer Colors_COLOR_GOLD_red=0 integer Colors_COLOR_GOLD_green=0 integer Colors_COLOR_GOLD_blue=0 integer Colors_COLOR_GOLD_alpha=0 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 StringUtils_MAX_INDEX=0 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 real Vectors_ZERO2_x=0. real Vectors_ZERO2_y=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 TerrainZProvider_firstFree=0 integer TerrainZProvider_maxIndex=0 integer WallHitTransform_firstFree=0 integer WallHitTransform_maxIndex=0 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_198 integer Iterator_firstFree_194=0 integer Iterator_maxIndex_196=0 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_482 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_481 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_483 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_484 effect array this_485 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 SoundDefinition_soundStack integer array SoundDefinition_duration integer array this_486 integer array snd integer array this_487 integer array snd_478 integer array this_488 integer array snd_479 integer array this_489 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 integer array listener_349 integer array listener_350 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 integer char_return_c=0 real dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds=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_470=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_361=null code ref_function_code__addAction_nullTimer_ClosureEvents_362=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 local integer temp = this_1 if temp == 0 then return "|cffADADADtrace|r" elseif temp == 1 then return "|cff2685DCdebug|r" elseif temp == 2 then return "|cffFFCC00info|r" elseif temp == 3 then return "|cffF47E3Ewarning|r" else return "|cffFB2700error|r" endif endfunction function compileError takes string msg returns nothing endfunction function error takes string msg returns nothing local integer hash local string this_1 local hashtable this_2 local integer parentKey local integer childKey local hashtable this_3 local integer parentKey_1 local integer childKey_1 local string msg_1 local player showTo local integer loglvl local string msg_2 local string compositeMsg local hashtable this_4 local integer parentKey_2 local integer childKey_2 local integer value local real this_5 local hashtable this_6 local integer parentKey_3 local integer childKey_3 local boolean value_1 local hashtable this_7 local integer parentKey_4 local integer childKey_4 local hashtable this_8 local integer parentKey_5 local integer childKey_5 local string msg_3 local player showTo_1 local integer loglvl_1 local string msg_4 local string compositeMsg_1 local hashtable this_9 local integer parentKey_6 local integer childKey_6 local boolean value_2 local string msg_5 local player showTo_2 local integer loglvl_2 local string msg_6 local string compositeMsg_2 local hashtable this_10 local integer parentKey_7 local integer childKey_7 local boolean value_3 local hashtable this_11 local integer parentKey_8 local integer childKey_8 local integer value_4 local real this_12 local string msg_7 local player showTo_3 local integer loglvl_3 local string msg_8 local string compositeMsg_3 if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else if not ErrorHandling_suppressErrorMessages then set this_1 = msg set hash = StringHash(this_1) set this_2 = ErrorHandling_HT set parentKey = -1 set childKey = hash if HaveSavedInteger(this_2, parentKey, childKey) then set this_3 = ErrorHandling_HT set parentKey_1 = -1 set childKey_1 = hash if LoadInteger(this_3, parentKey_1, childKey_1) + 60 < GameTimer_currentTime then set msg_1 = msg + "" set showTo = Player_localPlayer set loglvl = 4 set msg_2 = msg_1 if 2 <= loglvl then set compositeMsg = Loglevel_getTag(loglvl) + " - " + msg_2 call DisplayTimedTextToPlayer(showTo, 0., 0., 45., compositeMsg) endif set this_4 = ErrorHandling_HT set parentKey_2 = -1 set childKey_2 = hash set this_5 = GameTimer_currentTime set value = R2I(this_5) call SaveInteger(this_4, parentKey_2, childKey_2, value) set this_6 = ErrorHandling_HT set parentKey_3 = -1 set childKey_3 = hash set value_1 = false call SaveBoolean(this_6, parentKey_3, childKey_3, value_1) else set this_7 = ErrorHandling_HT set parentKey_4 = -1 set childKey_4 = hash if HaveSavedBoolean(this_7, parentKey_4, childKey_4) then set this_8 = ErrorHandling_HT set parentKey_5 = -1 set childKey_5 = hash if not LoadBoolean(this_8, parentKey_5, childKey_5) then set msg_3 = "|cffFF3A29Excessive repeating errors are being omitted" set showTo_1 = Player_localPlayer set loglvl_1 = 4 set msg_4 = msg_3 if 2 <= loglvl_1 then set compositeMsg_1 = Loglevel_getTag(loglvl_1) + " - " + msg_4 call DisplayTimedTextToPlayer(showTo_1, 0., 0., 45., compositeMsg_1) endif set this_9 = ErrorHandling_HT set parentKey_6 = -1 set childKey_6 = hash set value_2 = true call SaveBoolean(this_9, parentKey_6, childKey_6, value_2) endif else set msg_5 = "|cffFF3A29Excessive repeating errors are being omitted" set showTo_2 = Player_localPlayer set loglvl_2 = 4 set msg_6 = msg_5 if 2 <= loglvl_2 then set compositeMsg_2 = Loglevel_getTag(loglvl_2) + " - " + msg_6 call DisplayTimedTextToPlayer(showTo_2, 0., 0., 45., compositeMsg_2) endif set this_10 = ErrorHandling_HT set parentKey_7 = -1 set childKey_7 = hash set value_3 = true call SaveBoolean(this_10, parentKey_7, childKey_7, value_3) endif endif else set this_11 = ErrorHandling_HT set parentKey_8 = -1 set childKey_8 = hash set this_12 = GameTimer_currentTime set value_4 = R2I(this_12) call SaveInteger(this_11, parentKey_8, childKey_8, value_4) set msg_7 = "Message: " + msg + "" set showTo_3 = Player_localPlayer set loglvl_3 = 4 set msg_8 = msg_7 if 2 <= loglvl_3 then set compositeMsg_3 = Loglevel_getTag(loglvl_3) + " - " + msg_8 call DisplayTimedTextToPlayer(showTo_3, 0., 0., 45., compositeMsg_3) endif endif endif 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 destroyDamageInstance takes integer this_1 returns nothing local integer obj set DamageInstance_count = DamageInstance_count - 1 set DamageInstance_current = DamageInstance_stack[DamageInstance_count] set obj = this_1 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 DamageEvent_onDamage takes nothing returns nothing local integer dmg = DamageInstance_current local integer i local integer temp local integer listener_1 local integer this_1 local real amount local integer this_2 local real amount_1 local integer this_3 if not DamageEvent_abort then set this_1 = dmg set amount = GetEventDamage() 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 set this_2 = this_1 set amount_1 = amount set DamageInstance_amount[this_2] = amount_1 set i = 0 set temp = 0 loop exitwhen i > temp set listener_1 = DamageEvent_firstListeners[i] loop exitwhen not (listener_1 != 0) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener_1 = DamageListener_next[listener_1] endif endloop if DamageEvent_abort then exitwhen true endif 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 set this_3 = dmg if DamageInstance_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling DamageInstance.DamageInstance") else call error("Called DamageInstance.DamageInstance on invalid object.") endif endif call destroyDamageInstance(this_3) set DamageEvent_abort = false 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 local integer this_2 local integer this_3 local real unreducedAmount_1 local attacktype nativeAttackType_1 local damagetype nativeDamageType_1 local weapontype nativeWeaponType_1 if DamageInstance_firstFree == 0 then if DamageInstance_maxIndex < 32768 then set DamageInstance_maxIndex = DamageInstance_maxIndex + 1 set this_2 = DamageInstance_maxIndex set DamageInstance_typeId[this_2] = 1700 else call error("Out of memory: Could not create DamageInstance.") set this_2 = 0 endif else set DamageInstance_firstFree = DamageInstance_firstFree - 1 set this_2 = DamageInstance_nextFree[DamageInstance_firstFree] set DamageInstance_typeId[this_2] = 1700 endif set this_1 = this_2 set this_3 = this_1 set unreducedAmount_1 = unreducedAmount set nativeAttackType_1 = nativeAttackType set nativeDamageType_1 = nativeDamageType set nativeWeaponType_1 = nativeWeaponType set DamageInstance_amount[this_3] = unreducedAmount_1 set DamageInstance_nativeAttackType[this_3] = nativeAttackType_1 set DamageInstance_nativeDamageType[this_3] = nativeDamageType_1 set DamageInstance_nativeWeaponType[this_3] = nativeWeaponType_1 set DamageInstance_count = DamageInstance_count + 1 set DamageInstance_stack[DamageInstance_count] = this_3 set DamageInstance_current = this_3 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 true and 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 not (listener_1 != 0) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener_1 = DamageListener_next[listener_1] endif endloop if DamageEvent_abort then exitwhen true endif 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 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 DamageEvent_onUnreducedDamage() else call DamageEvent_onDamage() endif endfunction function registerPlayerUnitEvent takes playerunitevent p, code filter, code condition_1, code action_1 returns nothing local handle this_1 = p local integer hid = GetHandleId(this_1) local integer k local filterfunc cond_result local trigger temp local player temp_1 local playerunitevent temp_2 local trigger this_2 local player whichPlayer local playerunitevent whichPlayerUnitEvent local boolexpr filter_1 local trigger this_3 local boolexpr condition_2 local trigger this_4 local code actionFunc 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] set temp_2 = p if filter != null then set cond_result = Filter(filter) else set cond_result = null endif set this_2 = temp set whichPlayer = temp_1 set whichPlayerUnitEvent = temp_2 set filter_1 = cond_result call TriggerRegisterPlayerUnitEvent(this_2, whichPlayer, whichPlayerUnitEvent, filter_1) set k = k - 1 endloop endif if condition_1 != null then set this_3 = RegisterEvents_t[hid] set condition_2 = Filter(condition_1) call TriggerAddCondition(this_3, condition_2) endif if action_1 != null then set this_4 = RegisterEvents_t[hid] set actionFunc = action_1 call TriggerAddAction(this_4, actionFunc) endif endfunction function registerEventId takes eventid evnt returns integer local handle this_1 = evnt local integer eventId = GetHandleId(this_1) local integer i local integer temp local trigger receiver local trigger receiver_1 local trigger receiver_2 local eventid this_2 local integer eventId_1 local handle this_3 local playerunitevent p local code c local eventid this_4 local integer eventId_2 local handle this_5 local eventid this_6 local integer eventId_3 local handle this_7 local integer this_8 local eventid this_9 local integer eventId_4 local handle this_10 local trigger this_11 local player whichPlayer local playerevent whichPlayerEvent local trigger this_12 local player whichPlayer_1 local playerevent whichPlayerEvent_1 local trigger this_13 local player whichPlayer_2 local playerevent whichPlayerEvent_2 local boolean andLeft local boolean andLeft_1 set ClosureEvents_eventTypeCounter = ClosureEvents_eventTypeCounter + 1 set ClosureEvents_eventidToIndex[eventId] = ClosureEvents_eventTypeCounter set this_2 = evnt set this_3 = this_2 set eventId_1 = GetHandleId(this_3) if (eventId_1 >= 18 and eventId_1 <= 51) or (eventId_1 >= 269 and eventId_1 <= 277) or eventId_1 == 315 or eventId_1 == 308 then set p = ConvertPlayerUnitEvent(eventId) set c = ref_function_EventListener_generalEventCallback call registerPlayerUnitEvent(p, null, c, null) else if evnt != EVENT_UNIT_DAMAGED and evnt != EVENT_PLAYER_LEAVE and evnt != ClosureEvents_EVENT_PLAYER_CHAT_FILTER then set this_4 = evnt set this_5 = this_4 set eventId_2 = GetHandleId(this_5) set andLeft = not ((eventId_2 >= 261 and eventId_2 <= 268) or eventId_2 == 17) else set andLeft = false endif if andLeft then set this_6 = evnt set this_7 = this_6 set eventId_3 = GetHandleId(this_7) set andLeft_1 = not (eventId_3 >= 305 and eventId_3 <= 307) else set andLeft_1 = false endif if andLeft_1 then set this_8 = eventId call error("registering handleid: " + I2S(this_8) + " non-playerunitevent. Except EVENT_UNIT_DAMAGED and EVENT_PLAYER_LEAVE these are not supported right now.") endif endif set this_9 = evnt set this_10 = this_9 set eventId_4 = GetHandleId(this_10) if eventId_4 >= 305 and eventId_4 <= 307 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 set this_11 = receiver set whichPlayer = Player_players[i] set whichPlayerEvent = EVENT_PLAYER_MOUSE_UP call TriggerRegisterPlayerEvent(this_11, whichPlayer, whichPlayerEvent) set receiver_1 = receiver set this_12 = receiver_1 set whichPlayer_1 = Player_players[i] set whichPlayerEvent_1 = EVENT_PLAYER_MOUSE_DOWN call TriggerRegisterPlayerEvent(this_12, whichPlayer_1, whichPlayerEvent_1) set receiver_2 = receiver_1 set this_13 = receiver_2 set whichPlayer_2 = Player_players[i] set whichPlayerEvent_2 = EVENT_PLAYER_MOUSE_MOVE call TriggerRegisterPlayerEvent(this_13, whichPlayer_2, whichPlayerEvent_2) set i = i + 1 endloop endif return ClosureEvents_eventTypeCounter endfunction function EventListener_generalEventCallback takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local eventid this_1 = GetTriggerEventId() local handle this_2 = this_1 local integer id_2 = ClosureEvents_eventidToIndex[GetHandleId(this_2)] local integer id_1 local integer listener_1 local integer nextListener local integer listener_2 local integer nextListener_1 local unit this_3 local unit this_4 local unit this_5 local unit this_6 local unit this_7 local unit this_8 local boolean andLeft if id_2 == 0 then set id_2 = registerEventId(this_1) endif set id_1 = id_2 if trigUnit != null and true then set this_3 = trigUnit set this_4 = this_3 set andLeft = GetUnitUserData(this_4) > 0 else set andLeft = false endif if andLeft then set this_5 = trigUnit set this_6 = this_5 if EventListener_unitListenersFirsts[GetUnitUserData(this_6)] != 0 then set this_7 = trigUnit set this_8 = this_7 set listener_1 = EventListener_unitListenersFirsts[GetUnitUserData(this_8)] loop exitwhen not (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 listener_2 = EventListener_generalListenersFirsts[id_1] loop exitwhen not (listener_2 != 0) set nextListener_1 = EventListener_next[listener_2] call dispatch_EventListener_ClosureEvents_EventListener_onEvent(listener_2) set listener_2 = nextListener_1 endloop endif endfunction function conditions takes nothing returns boolean local integer id_1 local integer id_2 local boolean andLeft call GetTriggerUnit() set id_1 = GetIssuedOrderId() if 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) then set id_2 = id_1 set andLeft = not (id_2 == 852055 or id_2 == 852056 or id_2 == 852064 or id_2 == 852065 or id_2 == 852067 or id_2 == 852068 or id_2 == 852076 or id_2 == 852077 or id_2 == 852090 or id_2 == 852091 or id_2 == 852100 or id_2 == 852102 or id_2 == 852103 or id_2 == 852107 or id_2 == 852108 or id_2 == 852129 or id_2 == 852130 or id_2 == 852133 or id_2 == 852134 or id_2 == 852136 or id_2 == 852137 or id_2 == 852150 or id_2 == 852151 or id_2 == 852174 or id_2 == 852158 or id_2 == 852159 or id_2 == 852162 or id_2 == 852163 or id_2 == 852174 or id_2 == 852175 or id_2 == 852177 or id_2 == 852178 or id_2 == 852191 or id_2 == 852192 or id_2 == 852198 or id_2 == 852199 or id_2 == 852203 or id_2 == 852204 or id_2 == 852212 or id_2 == 852213 or id_2 == 852244 or id_2 == 852245 or id_2 == 852249 or id_2 == 852250 or id_2 == 852255 or id_2 == 852256 or id_2 == 852458 or id_2 == 852459 or id_2 == 852478 or id_2 == 852479 or id_2 == 852484 or id_2 == 852485 or id_2 == 852515 or id_2 == 852516 or id_2 == 852522 or id_2 == 852523 or id_2 == 852540 or id_2 == 852541 or id_2 == 852543 or id_2 == 852544 or id_2 == 852546 or id_2 == 852547 or id_2 == 852549 or id_2 == 852550 or id_2 == 852552 or id_2 == 852553 or id_2 == 852562 or id_2 == 852563 or id_2 == 852571 or id_2 == 852578 or id_2 == 852579 or id_2 == 852589 or id_2 == 852590 or id_2 == 852602 or id_2 == 852603 or id_2 == 852671 or id_2 == 852672) else set andLeft = false endif return andLeft endfunction function dispatch_Order_destroyOrder takes integer this_1 returns nothing local integer this_2 local integer this_3 local integer obj 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 set this_2 = this_1 set this_3 = this_2 if Order_prev[this_3] != 0 then call dispatch_Order_destroyOrder(Order_prev[this_3]) set Order_prev[this_3] = 0 endif set obj = this_2 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 construct_Order takes integer this_1, unit ordered, integer orderId, integer ordtype, widget target, real targetPos_x, real targetPos_y returns nothing local integer this_2 = this_1 local integer index local integer i local integer e local integer tmp local unit this_3 local unit this_4 set Order_prev[this_2] = 0 set Order_orderedUnit[this_2] = null set Order_orderedUnit[this_1] = ordered if ordered != null then set this_3 = ordered set this_4 = this_3 set index = GetUnitUserData(this_4) if LastOrder_lastOrder[index] != 0 then if Order_orderedUnit[LastOrder_lastOrder[index]] == Order_orderedUnit[this_1] then set Order_prev[this_1] = LastOrder_lastOrder[index] else call dispatch_Order_destroyOrder(LastOrder_lastOrder[index]) endif endif set i = 0 set e = this_1 loop exitwhen not (Order_prev[e] != 0) set i = i + 1 if i > 3 then set tmp = Order_prev[e] call dispatch_Order_destroyOrder(tmp) set Order_prev[e] = 0 exitwhen true endif set e = Order_prev[e] endloop set LastOrder_lastOrder[index] = this_1 endif endfunction function actions takes nothing returns nothing local unit u_1 local widget t local integer oid local string msg local player showTo local integer loglvl local string msg_1 local string compositeMsg local unit ordered local integer orderId local integer ordtype local widget target local real targetPos_x local real targetPos_y local integer this_1 local integer this_2 local unit this_3 local unit this_4 local unit this_5 local unit ordered_1 local integer orderId_1 local integer ordtype_1 local widget target_1 local real targetPos_x_1 local real targetPos_y_1 local integer this_6 local integer this_7 local unit ordered_2 local integer orderId_2 local integer ordtype_2 local widget target_2 local real targetPos_x_2 local real targetPos_y_2 local integer this_8 local integer this_9 local unit this_10 local unit this_11 local unit this_12 local real temp local real temp_1 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 if conditions() then set u_1 = GetTriggerUnit() set t = GetOrderTarget() set oid = GetIssuedOrderId() set msg = "ordered: <" + OrderId2StringBJ(oid) + ">" set showTo = Player_localPlayer set loglvl = 0 set msg_1 = msg if 2 <= loglvl then set compositeMsg = Loglevel_getTag(loglvl) + " - " + msg_1 call DisplayTimedTextToPlayer(showTo, 0., 0., 45., compositeMsg) endif if GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER then set ordered = u_1 set orderId = oid set ordtype = 0 set target = t set this_3 = GetOrderTargetUnit() set this_4 = this_3 set temp = GetUnitX(this_4) set this_5 = this_3 set tuple_temp = temp set tuple_temp_1 = GetUnitY(this_5) set targetPos_x = tuple_temp set targetPos_y = tuple_temp_1 if Order_firstFree == 0 then if Order_maxIndex < 32768 then set Order_maxIndex = Order_maxIndex + 1 set this_2 = Order_maxIndex set Order_typeId[this_2] = 3293 else call error("Out of memory: Could not create Order.") set this_2 = 0 endif else set Order_firstFree = Order_firstFree - 1 set this_2 = Order_nextFree[Order_firstFree] set Order_typeId[this_2] = 3293 endif set this_1 = this_2 call construct_Order(this_1, ordered, orderId, ordtype, target, targetPos_x, targetPos_y) elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER then set ordered_1 = u_1 set orderId_1 = oid set ordtype_1 = 1 set target_1 = null set tuple_temp_2 = GetOrderPointX() set tuple_temp_3 = GetOrderPointY() set targetPos_x_1 = tuple_temp_2 set targetPos_y_1 = tuple_temp_3 if Order_firstFree == 0 then if Order_maxIndex < 32768 then set Order_maxIndex = Order_maxIndex + 1 set this_7 = Order_maxIndex set Order_typeId[this_7] = 3293 else call error("Out of memory: Could not create Order.") set this_7 = 0 endif else set Order_firstFree = Order_firstFree - 1 set this_7 = Order_nextFree[Order_firstFree] set Order_typeId[this_7] = 3293 endif set this_6 = this_7 call construct_Order(this_6, ordered_1, orderId_1, ordtype_1, target_1, targetPos_x_1, targetPos_y_1) elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_ORDER then set ordered_2 = u_1 set orderId_2 = oid set ordtype_2 = 2 set target_2 = null set this_10 = u_1 set this_11 = this_10 set temp_1 = GetUnitX(this_11) set this_12 = this_10 set tuple_temp_4 = temp_1 set tuple_temp_5 = GetUnitY(this_12) set targetPos_x_2 = tuple_temp_4 set targetPos_y_2 = tuple_temp_5 if Order_firstFree == 0 then if Order_maxIndex < 32768 then set Order_maxIndex = Order_maxIndex + 1 set this_9 = Order_maxIndex set Order_typeId[this_9] = 3293 else call error("Out of memory: Could not create Order.") set this_9 = 0 endif else set Order_firstFree = Order_firstFree - 1 set this_9 = Order_nextFree[Order_firstFree] set Order_typeId[this_9] = 3293 endif set this_8 = this_9 call construct_Order(this_8, ordered_2, orderId_2, ordtype_2, target_2, targetPos_x_2, targetPos_y_2) endif endif endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this_1 local integer this_2 local integer this_3 local integer elem_1 local integer prev_1 local integer next_1 if LLEntry_firstFree == 0 then if LLEntry_maxIndex < 32768 then set LLEntry_maxIndex = LLEntry_maxIndex + 1 set this_2 = LLEntry_maxIndex set LLEntry_typeId[this_2] = 2715 else call error("Out of memory: Could not create LLEntry.") set this_2 = 0 endif else set LLEntry_firstFree = LLEntry_firstFree - 1 set this_2 = LLEntry_nextFree[LLEntry_firstFree] set LLEntry_typeId[this_2] = 2715 endif set this_1 = this_2 set this_3 = this_1 set elem_1 = elem set prev_1 = prev set next_1 = next set LLEntry_elem[this_3] = elem_1 set LLEntry_prev[this_3] = prev_1 set LLEntry_next[this_3] = next_1 return this_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing local integer this_2 local integer elems_0_1 local integer entry 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 set this_2 = this_1 set elems_0_1 = elems_0 set entry = new_LLEntry(elems_0_1, LLEntry_prev[LinkedList_dummy[this_2]], LinkedList_dummy[this_2]) set LLEntry_next[LLEntry_prev[LinkedList_dummy[this_2]]] = entry set LLEntry_prev[LinkedList_dummy[this_2]] = entry set LinkedList_size[this_2] = LinkedList_size[this_2] + 1 endfunction function dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback takes integer this_1, unit u_1 returns nothing local integer this_2 local unit u_2 local unit object local handle this_3 local unit u_3 local unit this_4 local integer temp 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 set this_2 = this_1 set u_2 = u_1 set temp = result[this_2] set object = u_2 set this_3 = object call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp, GetHandleId(this_3)) else set u_3 = u_1 set this_4 = u_3 call RemoveUnit(this_4) endif endfunction function code__Filter_ClosureForGroups takes nothing returns nothing local unit filter = GetFilterUnit() if ClosureForGroups_iterCount < ClosureForGroups_maxCount then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(ClosureForGroups_tempCallbacks[0 - 1], filter) endif set ClosureForGroups_iterCount = ClosureForGroups_iterCount + 1 endfunction function code__Filter_DamageDetection takes nothing returns nothing local unit u_1 = GetFilterUnit() local trigger this_1 = DamageDetection_current local unit whichUnit = u_1 local unitevent whichEvent = EVENT_UNIT_DAMAGED call TriggerRegisterUnitEvent(this_1, whichUnit, whichEvent) endfunction function prepareUnit takes unit u_1 returns nothing local unit receiver = u_1 local unit this_1 = receiver local integer abil = 1095577652 local unit receiver_1 local unit this_2 local integer abil_1 local boolean flag local unit u_2 local trigger this_3 call UnitAddAbility(this_1, abil) set receiver_1 = receiver set this_2 = receiver_1 set abil_1 = 1095577652 set flag = true call UnitMakeAbilityPermanent(this_2, flag, abil_1) set u_2 = u_1 set OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount] = u_2 set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount + 1 set this_3 = OnUnitEnterLeave_eventTrigger call TriggerEvaluate(this_3) set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount - 1 endfunction function code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetFilterUnit()) endfunction function code__ForGroup_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetEnumUnit()) endfunction function dispatch_Table_Table_Table_saveString takes integer this_1, integer parentKey, string value returns nothing local integer this_2 local integer parentKey_1 local string value_1 local hashtable this_3 local integer parentKey_2 local integer childKey local string value_2 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 set this_2 = this_1 set parentKey_1 = parentKey set value_1 = value set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set value_2 = value_1 call SaveStr(this_3, parentKey_2, childKey, value_2) endfunction function ChunkedString_append takes integer this_1, string pdata returns nothing local string data_1 = pdata local integer remain local string this_2 local string this_3 local string this_4 local string this_5 local integer start local integer stop local string this_6 local integer start_1 local integer stop_1 local string this_7 local string this_8 local integer start_2 local string this_9 local integer numbers_0 local integer numbers_1 local integer minNumber local integer cond_result local string this_10 local string this_11 local integer temp local boolean andLeft local boolean andLeft_1 local string temp_1 local string temp_2 local integer temp_3 loop exitwhen not true set temp = ChunkedString_chunkSize[this_1] set this_2 = ChunkedString_buffer[this_1] set remain = temp - StringLength(this_2) if false and remain > 0 then set this_3 = data_1 set andLeft = StringLength(this_3) >= remain else set andLeft = false endif if andLeft then set this_5 = data_1 set start = remain - 1 set stop = remain set this_4 = SubString(this_5, start, stop) set andLeft_1 = StringHash(this_4) == 1843378377 else set andLeft_1 = false endif if andLeft_1 then set remain = remain + 1 endif set temp_1 = ChunkedString_buffer[this_1] set this_6 = data_1 set start_1 = 0 set stop_1 = remain set ChunkedString_buffer[this_1] = temp_1 + SubString(this_6, start_1, stop_1) set this_7 = ChunkedString_buffer[this_1] if StringLength(this_7) >= 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 this_8 = data_1 set numbers_0 = remain set this_10 = data_1 set numbers_1 = StringLength(this_10) set minNumber = 2147483647 if numbers_0 < minNumber then set cond_result = numbers_0 else set cond_result = minNumber endif set minNumber = cond_result if numbers_1 < minNumber then set cond_result = numbers_1 else set cond_result = minNumber endif set minNumber = cond_result set start_2 = minNumber set temp_2 = this_8 set temp_3 = start_2 set this_9 = this_8 set data_1 = SubString(temp_2, temp_3, StringLength(this_9)) set this_11 = data_1 if StringLength(this_11) == 0 then exitwhen true endif endloop endfunction function dispatch_Table_Table_Table_loadString takes integer this_1, integer parentKey returns string local string Table_Table_loadString_result local integer this_2 local integer parentKey_1 local hashtable this_3 local integer parentKey_2 local integer childKey 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 set this_2 = this_1 set parentKey_1 = parentKey set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set Table_Table_loadString_result = LoadStr(this_3, parentKey_2, childKey) return Table_Table_loadString_result 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_readChunk takes integer this_1 returns string local string ChunkedString_ChunkedString_readChunk_result local integer this_2 local integer this_3 local integer index local string ChunkedString_ChunkedString_getChunk_result 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 set this_2 = this_1 set ChunkedString_readIndex[this_2] = ChunkedString_readIndex[this_2] + 1 set this_3 = this_2 set index = ChunkedString_readIndex[this_2] if ChunkedString_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunk") else call error("Called ChunkedString.getChunk on invalid object.") endif endif set ChunkedString_ChunkedString_getChunk_result = ChunkedString_getChunk(this_3, index) set ChunkedString_ChunkedString_readChunk_result = ChunkedString_ChunkedString_getChunk_result return ChunkedString_ChunkedString_readChunk_result endfunction function checkQueue takes nothing returns nothing local integer this_1 = SyncSimple_syncQueue local integer syncData local string data_1 local boolean hasChunk local boolean LinkedList_LinkedList_isEmpty_result local integer this_2 local integer this_3 local integer LinkedList_LinkedList_getFirst_result local integer this_4 local integer this_5 local boolean ChunkedString_ChunkedString_hasChunk_result local integer this_6 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 set this_2 = this_1 set LinkedList_LinkedList_isEmpty_result = LinkedList_size[this_2] == 0 if not LinkedList_LinkedList_isEmpty_result then set this_3 = SyncSimple_syncQueue if LinkedList_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling LinkedList.getFirst") else call error("Called LinkedList.getFirst on invalid object.") endif endif set this_4 = this_3 set LinkedList_LinkedList_getFirst_result = LLEntry_elem[LLEntry_next[LinkedList_dummy[this_4]]] set syncData = LinkedList_LinkedList_getFirst_result 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 this_5 = SyncData_buffer[syncData] if ChunkedString_typeId[this_5] == 0 then if this_5 == 0 then call error("Nullpointer exception when calling ChunkedString.hasChunk") else call error("Called ChunkedString.hasChunk on invalid object.") endif endif set this_6 = this_5 set ChunkedString_ChunkedString_hasChunk_result = ChunkedString_readIndex[this_6] < ChunkedString_chunkCount[this_6] set hasChunk = ChunkedString_ChunkedString_hasChunk_result 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 dispatch_LLEntry_destroyLLEntry takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 dispatch_LinkedList_LinkedList_LinkedList_removeEntry takes integer this_1, integer entry returns nothing local integer this_2 local integer entry_1 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 set this_2 = this_1 set entry_1 = entry set LLEntry_next[LLEntry_prev[entry_1]] = LLEntry_next[entry_1] set LLEntry_prev[LLEntry_next[entry_1]] = LLEntry_prev[entry_1] call dispatch_LLEntry_destroyLLEntry(entry_1) set LinkedList_size[this_2] = LinkedList_size[this_2] - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_dequeue takes integer this_1 returns integer local integer LinkedList_LinkedList_dequeue_result local integer this_2 local integer top local integer result_1 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 set this_2 = this_1 set top = LLEntry_next[LinkedList_dummy[this_2]] set result_1 = 0 if top != LinkedList_dummy[this_2] then set result_1 = LLEntry_elem[top] call dispatch_LinkedList_LinkedList_LinkedList_removeEntry(this_2, top) endif set LinkedList_LinkedList_dequeue_result = result_1 return LinkedList_LinkedList_dequeue_result endfunction function dispatch_BoolSyncListener_destroyBoolSyncListener takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 onDataSynced_sync_SyncSimple takes integer this_1, string data_1 returns nothing local string this_2 = data_1 if this_2 == "1" or this_2 == "true" then endif call dispatch_BoolSyncListener_destroyBoolSyncListener(listener[this_1]) endfunction function dispatch_IntSyncListener_destroyIntSyncListener takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 onDataSynced_sync_SyncSimple_431 takes integer this_1, string data_1 returns nothing local string this_2 = data_1 call S2I(this_2) call dispatch_IntSyncListener_destroyIntSyncListener(listener_349[this_1]) endfunction function dispatch_RealSyncListener_destroyRealSyncListener takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 onDataSynced_sync_SyncSimple_432 takes integer this_1, string data_1 returns nothing local string this_2 = data_1 call S2R(this_2) call dispatch_RealSyncListener_destroyRealSyncListener(listener_350[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_431(this_1, data_1) endif else call onDataSynced_sync_SyncSimple_432(this_1, data_1) endif endfunction function dispatch_BufferSyncListener_destroyBufferSyncListener takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 HashSet_clear takes integer this_1 returns nothing local integer this_2 = this_1 local hashtable this_3 = HashList_ht local integer parentKey = this_2 local hashtable this_4 local integer parentKey_1 local hashtable this_5 local integer parentKey_2 call FlushChildHashtable(this_3, parentKey) set this_4 = HashList_occurences set parentKey_1 = this_2 call FlushChildHashtable(this_4, parentKey_1) set HashList_size[this_2] = 0 set this_5 = HashSet_position set parentKey_2 = this_1 call FlushChildHashtable(this_5, parentKey_2) endfunction function dispatch_HashList_HashList_HashList_clear takes integer this_1 returns nothing local integer this_2 local hashtable this_3 local integer parentKey local hashtable this_4 local integer parentKey_1 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 set this_2 = this_1 set this_3 = HashList_ht set parentKey = this_2 call FlushChildHashtable(this_3, parentKey) set this_4 = HashList_occurences set parentKey_1 = this_2 call FlushChildHashtable(this_4, parentKey_1) set HashList_size[this_2] = 0 else call HashSet_clear(this_1) endif endfunction function destroyHashSet takes integer this_1 returns nothing local integer this_2 = this_1 local hashtable this_3 = HashSet_position local integer parentKey = this_2 local integer this_4 local integer obj call FlushChildHashtable(this_3, parentKey) set this_4 = this_2 call dispatch_HashList_HashList_HashList_clear(this_4) set obj = this_1 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 dispatch_HashList_destroyHashList takes integer this_1 returns nothing local integer this_2 local integer this_3 local integer obj 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 set this_2 = this_1 set this_3 = this_2 call dispatch_HashList_HashList_HashList_clear(this_3) set obj = this_2 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 else call destroyHashSet(this_1) endif endfunction function dispatch_Table_Table_Table_flush takes integer this_1 returns nothing local integer this_2 local hashtable this_3 local integer parentKey local integer this_4 local integer this_5 local hashtable this_6 local integer parentKey_1 local integer this_7 local integer this_8 local integer this_9 local hashtable this_10 local integer parentKey_2 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 set this_2 = this_1 set this_3 = Table_ht set parentKey = this_2 call FlushChildHashtable(this_3, parentKey) else set this_4 = this_1 set HashMap_size[this_4] = 0 set this_5 = this_4 set this_6 = Table_ht set parentKey_1 = this_5 call FlushChildHashtable(this_6, parentKey_1) endif else set this_7 = this_1 if not IterableMap__destroyed[this_7] then call dispatch_HashList_HashList_HashList_clear(IterableMap_keys[this_7]) endif set this_8 = this_7 set HashMap_size[this_8] = 0 set this_9 = this_8 set this_10 = Table_ht set parentKey_2 = this_9 call FlushChildHashtable(this_10, parentKey_2) endif endfunction function destroyIterableMap takes integer this_1 returns nothing local integer this_2 = this_1 local integer this_3 local integer this_4 local integer obj call dispatch_HashList_destroyHashList(IterableMap_keys[this_2]) set IterableMap__destroyed[this_2] = true set this_3 = this_2 set this_4 = this_3 call dispatch_Table_Table_Table_flush(this_4) set obj = this_1 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 dispatch_Table_destroyTable takes integer this_1 returns nothing local integer this_2 local integer this_3 local integer obj 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 set this_2 = this_1 set this_3 = this_2 call dispatch_Table_Table_Table_flush(this_3) set obj = this_2 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 else call destroyIterableMap(this_1) endif endfunction function dispatch_ChunkedString_destroyChunkedString takes integer this_1 returns nothing local integer this_2 local integer this_3 local integer obj 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 set this_2 = this_1 set this_3 = this_2 call dispatch_Table_destroyTable(ChunkedString_table[this_3]) set obj = this_2 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 dispatch_StringSyncListener_destroyStringSyncListener takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 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 dispatch_SyncData_destroySyncData takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 call SyncData_onDestroy(this_2) set obj = this_2 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 ChunkedString_length takes integer this_1 returns integer local integer len local integer i local integer temp local integer this_2 local integer ChunkedString_ChunkedString_getChunkCount_result local integer this_3 local string this_4 local integer this_5 local integer index local string ChunkedString_ChunkedString_getChunk_result local string this_6 local integer temp_1 local integer temp_2 if false then set len = 0 set i = 0 set this_2 = this_1 if ChunkedString_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunkCount") else call error("Called ChunkedString.getChunkCount on invalid object.") endif endif set this_3 = this_2 set ChunkedString_ChunkedString_getChunkCount_result = ChunkedString_chunkCount[this_3] + 1 set temp = ChunkedString_ChunkedString_getChunkCount_result - 1 loop exitwhen i > temp set temp_1 = len set this_5 = this_1 set index = i if ChunkedString_typeId[this_5] == 0 then if this_5 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunk") else call error("Called ChunkedString.getChunk on invalid object.") endif endif set ChunkedString_ChunkedString_getChunk_result = ChunkedString_getChunk(this_5, index) set this_4 = ChunkedString_ChunkedString_getChunk_result set len = temp_1 + StringLength(this_4) set i = i + 1 endloop return len else set temp_2 = ChunkedString_chunkCount[this_1] * ChunkedString_chunkSize[this_1] set this_6 = ChunkedString_buffer[this_1] return temp_2 + StringLength(this_6) endif endfunction function onDataSynced_sync_SaveLoadData takes integer this_1, integer syncedBuffer returns nothing local integer this_2 = syncedBuffer local integer ChunkedString_ChunkedString_length_result local integer this_3 local integer this_4 if ChunkedString_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling ChunkedString.length") else call error("Called ChunkedString.length on invalid object.") endif endif set ChunkedString_ChunkedString_length_result = ChunkedString_length(this_2) if ChunkedString_ChunkedString_length_result == 0 then elseif dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(syncedBuffer) == "-" then else set this_3 = syncedBuffer if ChunkedString_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling ChunkedString.resetRead") else call error("Called ChunkedString.resetRead on invalid object.") endif endif set this_4 = this_3 set ChunkedString_readIndex[this_4] = -1 endif endfunction function code__addAction_SyncSimple takes nothing returns nothing local string eventData = BlzGetTriggerSyncData() local string eventPrefix = BlzGetTriggerSyncPrefix() local integer this_1 = SyncSimple_syncQueue local integer syncData local integer LinkedList_LinkedList_getFirst_result local integer this_2 local integer this_3 local string pdata local integer this_4 local integer buffer 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 set this_2 = this_1 set LinkedList_LinkedList_getFirst_result = LLEntry_elem[LLEntry_next[LinkedList_dummy[this_2]]] set syncData = LinkedList_LinkedList_getFirst_result 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 set this_3 = SyncData_syncBuffer[syncData] set pdata = eventData if ChunkedString_typeId[this_3] == 0 then if this_3 == 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_3, pdata) if eventPrefix == "T" then set this_4 = SyncData_blistener[syncData] set buffer = SyncData_syncBuffer[syncData] if BufferSyncListener_typeId[this_4] == 0 then if this_4 == 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_4, buffer) call dispatch_LinkedList_LinkedList_LinkedList_dequeue(SyncSimple_syncQueue) call dispatch_SyncData_destroySyncData(syncData) endif endif if false or GameStatus_gameStatus != 3 then call checkQueue() endif endfunction function code__addAction_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_231 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_232 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__onEnter_DamageDetection takes nothing returns nothing local unit u_1 = OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1] local trigger this_1 = DamageDetection_current local unit whichUnit = u_1 local unitevent whichEvent = EVENT_UNIT_DAMAGED call TriggerRegisterUnitEvent(this_1, whichUnit, whichEvent) endfunction function construct_UnitIndex takes integer this_1, unit whichUnit returns nothing local unit this_2 local integer data_1 local unit u_1 local trigger this_3 set UnitIndex__unit[this_1] = whichUnit set this_2 = UnitIndex__unit[this_1] set data_1 = this_1 call SetUnitUserData(this_2, data_1) set u_1 = whichUnit set UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount] = u_1 set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount + 1 set this_3 = UnitIndexer_onIndexTrigger call TriggerEvaluate(this_3) set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 endfunction function new_UnitIndex takes unit whichUnit returns integer local integer this_1 local integer this_2 if UnitIndex_firstFree == 0 then if UnitIndex_maxIndex < 32768 then set UnitIndex_maxIndex = UnitIndex_maxIndex + 1 set this_2 = UnitIndex_maxIndex set UnitIndex_typeId[this_2] = 4310 else call error("Out of memory: Could not create UnitIndex.") set this_2 = 0 endif else set UnitIndex_firstFree = UnitIndex_firstFree - 1 set this_2 = UnitIndex_nextFree[UnitIndex_firstFree] set UnitIndex_typeId[this_2] = 4310 endif set this_1 = this_2 call construct_UnitIndex(this_1, whichUnit) return this_1 endfunction function code__onEnter_UnitIndexer takes nothing returns nothing local unit this_1 local integer instance_1 local unit this_2 if true then set this_1 = OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1] set this_2 = this_1 set instance_1 = GetUnitUserData(this_2) if instance_1 == 0 then set instance_1 = new_UnitIndex(this_1) endif endif endfunction function UnitIndex_onDestroy takes integer this_1 returns nothing local unit u_1 = UnitIndex__unit[this_1] local trigger this_2 local unit this_3 local integer data_1 set UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount] = u_1 set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount + 1 set this_2 = UnitIndexer_onDeindexTrigger call TriggerEvaluate(this_2) set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 set this_3 = UnitIndex__unit[this_1] set data_1 = 0 call SetUnitUserData(this_3, data_1) endfunction function dispatch_UnitIndex_destroyUnitIndex takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 call UnitIndex_onDestroy(this_2) set obj = this_2 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 unit_deindex takes unit this_1 returns boolean local unit this_2 = this_1 local unit this_3 local integer instance_1 local unit this_4 if GetUnitUserData(this_2) == 0 then return false else set this_3 = this_1 set this_4 = this_3 set instance_1 = GetUnitUserData(this_4) if instance_1 == 0 then set instance_1 = new_UnitIndex(this_3) endif call dispatch_UnitIndex_destroyUnitIndex(instance_1) return true endif endfunction function code__onLeave_UnitIndexer takes nothing returns nothing if true then call unit_deindex(OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1]) endif endfunction function dispatch_Table_Table_Table_hasInt takes integer this_1, integer parentKey returns boolean local boolean Table_Table_hasInt_result local integer this_2 local integer parentKey_1 local hashtable this_3 local integer parentKey_2 local integer childKey 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 set this_2 = this_1 set parentKey_1 = parentKey set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set Table_Table_hasInt_result = HaveSavedInteger(this_3, parentKey_2, childKey) return Table_Table_hasInt_result endfunction function dispatch_Table_Table_Table_saveInt takes integer this_1, integer parentKey, integer value returns nothing local integer this_2 local integer parentKey_1 local integer value_1 local hashtable this_3 local integer parentKey_2 local integer childKey local integer value_2 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 set this_2 = this_1 set parentKey_1 = parentKey set value_1 = value set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set value_2 = value_1 call SaveInteger(this_3, parentKey_2, childKey, value_2) endfunction function HashMap_put takes integer this_1, integer key, integer value returns nothing local integer this_2 = this_1 local integer key_1 = key local boolean HashMap_HashMap_has_result local integer this_3 local integer key_2 if Table_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling HashMap.has") else call error("Called HashMap.has on invalid object.") endif endif set this_3 = this_2 set key_2 = key_1 set HashMap_HashMap_has_result = dispatch_Table_Table_Table_hasInt(this_3, key_2) if not HashMap_HashMap_has_result then set HashMap_size[this_1] = HashMap_size[this_1] + 1 endif call dispatch_Table_Table_Table_saveInt(this_1, key, value) endfunction function dispatch_HashList_HashList_HashList_count takes integer this_1, integer elem returns integer local integer HashList_HashList_count_result local integer this_2 local integer elem_1 local hashtable this_3 local integer parentKey local integer childKey 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 set this_2 = this_1 set elem_1 = elem set this_3 = HashList_occurences set parentKey = this_2 set childKey = elem_1 set HashList_HashList_count_result = LoadInteger(this_3, parentKey, childKey) return HashList_HashList_count_result endfunction function dispatch_HashList_HashList_HashList_incrOccurences takes integer this_1, integer elem returns nothing local integer this_2 local integer elem_1 local hashtable this_3 local integer parentKey local integer childKey local integer value 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 set this_2 = this_1 set elem_1 = elem set this_3 = HashList_occurences set parentKey = this_2 set childKey = elem_1 set value = dispatch_HashList_HashList_HashList_count(this_2, elem_1) + 1 call SaveInteger(this_3, parentKey, childKey, value) endfunction function HashSet_add_1 takes integer this_1, integer elems_0 returns nothing local hashtable this_2 local integer parentKey local integer childKey local integer value local integer this_3 local integer HashList_HashList_size_result local integer this_4 local integer this_5 local integer elems_0_1 local hashtable this_6 local integer parentKey_1 local integer childKey_1 local integer value_1 if dispatch_HashList_HashList_HashList_count(this_1, elems_0) <= 0 then set this_2 = HashSet_position set parentKey = this_1 set childKey = elems_0 set this_3 = this_1 if HashList_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling HashList.size") else call error("Called HashList.size on invalid object.") endif endif set this_4 = this_3 set HashList_HashList_size_result = HashList_size[this_4] set value = HashList_HashList_size_result call SaveInteger(this_2, parentKey, childKey, value) set this_5 = this_1 set elems_0_1 = elems_0 set this_6 = HashList_ht set parentKey_1 = this_5 set childKey_1 = HashList_size[this_5] set value_1 = elems_0_1 call SaveInteger(this_6, parentKey_1, childKey_1, value_1) call dispatch_HashList_HashList_HashList_incrOccurences(this_5, elems_0_1) set HashList_size[this_5] = HashList_size[this_5] + 1 endif endfunction function dispatch_HashList_HashList_HashList_add_1 takes integer this_1, integer elems_0 returns nothing local integer this_2 local integer elems_0_1 local hashtable this_3 local integer parentKey local integer childKey local integer value 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 set this_2 = this_1 set elems_0_1 = elems_0 set this_3 = HashList_ht set parentKey = this_2 set childKey = HashList_size[this_2] set value = elems_0_1 call SaveInteger(this_3, parentKey, childKey, value) call dispatch_HashList_HashList_HashList_incrOccurences(this_2, elems_0_1) set HashList_size[this_2] = HashList_size[this_2] + 1 else call HashSet_add_1(this_1, elems_0) endif endfunction function dispatch_IterableMap_HashMap_IterableMap_hasKey takes integer this_1, integer key returns boolean local boolean HashMap_IterableMap_hasKey_result local integer this_2 local integer key_1 local integer this_3 local integer elem local boolean HashList_HashList_has_result local integer this_4 local integer elem_1 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 set this_2 = this_1 set key_1 = key set this_3 = IterableMap_keys[this_2] set elem = key_1 if HashList_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling HashList.has") else call error("Called HashList.has on invalid object.") endif endif set this_4 = this_3 set elem_1 = elem set HashList_HashList_has_result = dispatch_HashList_HashList_HashList_count(this_4, elem_1) > 0 set HashMap_IterableMap_hasKey_result = HashList_HashList_has_result return HashMap_IterableMap_hasKey_result endfunction function dispatch_HashMap_HashMap_HashMap_put takes integer this_1, integer key, integer value returns nothing local integer this_2 local integer key_1 local integer value_1 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 set this_2 = this_1 set key_1 = key set value_1 = value call HashMap_put(this_2, key_1, value_1) if not dispatch_IterableMap_HashMap_IterableMap_hasKey(this_2, key_1) then call dispatch_HashList_HashList_HashList_add_1(IterableMap_keys[this_2], key_1) endif endif endfunction function HashMap_remove takes integer this_1, integer key returns nothing local integer this_2 = this_1 local integer key_1 = key local boolean HashMap_HashMap_has_result local integer this_3 local integer key_2 local integer this_4 local integer parentKey local integer this_5 local integer parentKey_1 if Table_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling HashMap.has") else call error("Called HashMap.has on invalid object.") endif endif set this_3 = this_2 set key_2 = key_1 set HashMap_HashMap_has_result = dispatch_Table_Table_Table_hasInt(this_3, key_2) if HashMap_HashMap_has_result then set HashMap_size[this_1] = HashMap_size[this_1] - 1 endif set this_4 = this_1 set parentKey = key if Table_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling Table.removeInt") else call error("Called Table.removeInt on invalid object.") endif endif set this_5 = this_4 set parentKey_1 = parentKey call RemoveSavedInteger(Table_ht, this_5, parentKey_1) endfunction function dispatch_HashList_HashList_HashList_decrOccurences takes integer this_1, integer elem returns nothing local integer this_2 local integer elem_1 local hashtable this_3 local integer parentKey local integer childKey local integer value 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 set this_2 = this_1 set elem_1 = elem set this_3 = HashList_occurences set parentKey = this_2 set childKey = elem_1 set value = dispatch_HashList_HashList_HashList_count(this_2, elem_1) - 1 call SaveInteger(this_3, parentKey, childKey, value) endfunction function HashList_removeAt takes integer this_1, integer index returns integer local integer temp_1 = this_1 local hashtable this_2 = HashList_ht local integer parentKey = this_1 local integer childKey = index local integer tmp local integer i local integer temp local hashtable this_3 local integer parentKey_1 local integer childKey_1 local hashtable this_4 local integer parentKey_2 local integer childKey_2 local integer value local hashtable this_5 local integer parentKey_3 local integer childKey_3 call dispatch_HashList_HashList_HashList_decrOccurences(temp_1, LoadInteger(this_2, parentKey, childKey)) set this_3 = HashList_ht set parentKey_1 = this_1 set childKey_1 = index set tmp = LoadInteger(this_3, parentKey_1, childKey_1) set i = index set temp = HashList_size[this_1] loop exitwhen i > temp set this_4 = HashList_ht set parentKey_2 = this_1 set childKey_2 = i set this_5 = HashList_ht set parentKey_3 = this_1 set childKey_3 = i + 1 set value = LoadInteger(this_5, parentKey_3, childKey_3) call SaveInteger(this_4, parentKey_2, childKey_2, value) set i = i + 1 endloop set HashList_size[this_1] = HashList_size[this_1] - 1 return tmp endfunction function dispatch_HashList_HashList_HashList_get takes integer this_1, integer index returns integer local integer HashList_HashList_get_result local integer this_2 local integer index_1 local hashtable this_3 local integer parentKey local integer childKey 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 set this_2 = this_1 set index_1 = index set this_3 = HashList_ht set parentKey = this_2 set childKey = index_1 set HashList_HashList_get_result = LoadInteger(this_3, parentKey, childKey) return HashList_HashList_get_result endfunction function HashSet_removeAt takes integer this_1, integer index returns integer local hashtable this_2 = HashSet_position local integer parentKey = this_1 local integer childKey = dispatch_HashList_HashList_HashList_get(this_1, index) local integer i local integer temp local integer this_3 local integer HashList_HashList_size_result local integer this_4 local hashtable this_5 local integer parentKey_1 local integer childKey_1 local integer value local hashtable this_6 local integer parentKey_2 local integer childKey_2 call RemoveSavedInteger(this_2, parentKey, childKey) set i = index + 1 set this_3 = this_1 if HashList_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling HashList.size") else call error("Called HashList.size on invalid object.") endif endif set this_4 = this_3 set HashList_HashList_size_result = HashList_size[this_4] set temp = HashList_HashList_size_result loop exitwhen i > temp set this_5 = HashSet_position set parentKey_1 = this_1 set childKey_1 = dispatch_HashList_HashList_HashList_get(this_1, i) set this_6 = HashSet_position set parentKey_2 = this_1 set childKey_2 = dispatch_HashList_HashList_HashList_get(this_1, i) set value = LoadInteger(this_6, parentKey_2, childKey_2) - 1 call SaveInteger(this_5, parentKey_1, childKey_1, value) 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 local hashtable this_2 local integer parentKey local integer childKey local integer temp_1 loop exitwhen i > temp set temp_1 = t set this_2 = HashList_ht set parentKey = this_1 set childKey = i if temp_1 == LoadInteger(this_2, parentKey, childKey) 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 HashSet_remove takes integer this_1, integer elem returns boolean local boolean result_1 = false local integer this_2 local integer index local hashtable this_3 local integer parentKey local integer childKey if dispatch_HashList_HashList_HashList_count(this_1, elem) > 0 then set this_2 = this_1 set this_3 = HashSet_position set parentKey = this_1 set childKey = elem set index = LoadInteger(this_3, parentKey, childKey) if HashList_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling HashSet.removeAt") else call error("Called HashSet.removeAt on invalid object.") endif endif call HashSet_removeAt(this_2, index) 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 dispatch_HashMap_HashMap_HashMap_remove takes integer this_1, integer key returns nothing local integer this_2 local integer key_1 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 set this_2 = this_1 set key_1 = key call HashMap_remove(this_2, key_1) if dispatch_IterableMap_HashMap_IterableMap_hasKey(this_2, key_1) then call dispatch_HashList_HashList_HashList_remove(IterableMap_keys[this_2], key_1) endif endif endfunction function dispatch_Table_Table_Table_loadInt takes integer this_1, integer parentKey returns integer local integer Table_Table_loadInt_result local integer this_2 local integer parentKey_1 local hashtable this_3 local integer parentKey_2 local integer childKey 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 set this_2 = this_1 set parentKey_1 = parentKey set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set Table_Table_loadInt_result = LoadInteger(this_3, parentKey_2, childKey) return Table_Table_loadInt_result endfunction function OnCastListener_onDestroy takes integer this_1 returns nothing local integer index local integer listener_1 local integer listener_2 local unit this_2 local unit this_3 local integer this_4 local integer key local integer HashMap_HashMap_get_result local integer this_5 local integer key_1 if OnCastListener_eventUnit[this_1] != null then set this_2 = OnCastListener_eventUnit[this_1] set this_3 = this_2 set index = GetUnitUserData(this_3) set listener_1 = EventListener_castMapCasters[index] if listener_1 == 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 else set this_4 = EventListener_castMap set key = OnCastListener_abilId[this_1] if Table_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling HashMap.get") else call error("Called HashMap.get on invalid object.") endif endif set this_5 = this_4 set key_1 = key set HashMap_HashMap_get_result = dispatch_Table_Table_Table_loadInt(this_5, key_1) set listener_2 = HashMap_HashMap_get_result if listener_2 == 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 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 dispatch_OnCastListener_destroyOnCastListener takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 call OnCastListener_onDestroy(this_2) set obj = this_2 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 destroyEventListener takes integer this_1 returns nothing local integer this_2 = this_1 local integer listener_1 local integer listener_2 local integer obj if EventListener_uid[this_2] < 0 then set listener_1 = EventListener_generalListenersFirsts[EventListener_eventId[this_2]] if listener_1 == this_2 then set EventListener_generalListenersFirsts[EventListener_eventId[this_2]] = EventListener_next[this_2] elseif EventListener_prev[this_2] != 0 then set EventListener_next[EventListener_prev[this_2]] = EventListener_next[this_2] endif else set listener_2 = EventListener_unitListenersFirsts[EventListener_uid[this_2]] if listener_2 == this_2 then set EventListener_unitListenersFirsts[EventListener_uid[this_2]] = EventListener_next[this_2] elseif EventListener_prev[this_2] != 0 then set EventListener_next[EventListener_prev[this_2]] = EventListener_next[this_2] endif endif if EventListener_next[this_2] != 0 then set EventListener_prev[EventListener_next[this_2]] = EventListener_prev[this_2] endif set EventListener_next[this_2] = 0 set EventListener_prev[this_2] = 0 set obj = this_1 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 unregisterEvents takes integer id_1 returns nothing local integer listener_1 local integer t local string msg local player showTo local integer loglvl local string msg_1 local string compositeMsg local integer this_1 local integer this_2 if id_1 > 0 then if EventListener_unitListenersFirsts[id_1] != 0 then set this_1 = id_1 set msg = "unregister unit has listeners. startid: " + I2S(this_1) set showTo = Player_localPlayer set loglvl = 0 set msg_1 = msg if 2 <= loglvl then set compositeMsg = Loglevel_getTag(loglvl) + " - " + msg_1 call DisplayTimedTextToPlayer(showTo, 0., 0., 45., compositeMsg) endif set listener_1 = EventListener_unitListenersFirsts[id_1] set EventListener_unitListenersFirsts[id_1] = 0 loop exitwhen not (listener_1 != 0) set t = listener_1 set listener_1 = EventListener_next[listener_1] set this_2 = t if EventListener_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling EventListener.EventListener") else call error("Called EventListener.EventListener on invalid object.") endif endif call destroyEventListener(this_2) endloop endif endif endfunction function unregisterEventsForUnit takes unit u_1 returns nothing local integer index local integer listener_1 local integer t local unit this_1 local unit this_2 if true then set this_1 = u_1 set this_2 = this_1 set index = GetUnitUserData(this_2) call unregisterEvents(index) if EventListener_castMapCasters[index] != 0 then set listener_1 = EventListener_castMapCasters[index] set EventListener_castMapCasters[index] = 0 loop exitwhen not (listener_1 != 0) set t = listener_1 set listener_1 = OnCastListener_next[listener_1] call dispatch_OnCastListener_destroyOnCastListener(t) endloop endif endif endfunction function code__onUnitDeindex_ClosureEvents takes nothing returns nothing call unregisterEventsForUnit(UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1]) endfunction function code__onUnitDeindex_LastOrder takes nothing returns nothing local unit this_1 = UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1] local unit this_2 = this_1 local unit this_3 = this_2 local integer index = GetUnitUserData(this_3) if LastOrder_lastOrder[index] != 0 then call dispatch_Order_destroyOrder(LastOrder_lastOrder[index]) set LastOrder_lastOrder[index] = 0 endif endfunction function code__onUnitIndex_ClosureEvents takes nothing returns nothing local unit u_1 = UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1] local trigger this_1 local unit whichUnit local unitevent whichEvent if true then set this_1 = ClosureEvents_unitTrig set whichUnit = u_1 set whichEvent = EVENT_UNIT_DAMAGED call TriggerRegisterUnitEvent(this_1, whichUnit, whichEvent) endif endfunction function triggerFromIndex takes integer index returns trigger local integer this_1 = TypeCasting_typecastdata local integer parentKey = 0 local fogstate value = ConvertFogState(index) local integer this_2 local integer parentKey_1 local fogstate value_1 local hashtable this_3 local integer parentKey_2 local integer childKey local fogstate value_2 local integer this_4 local integer parentKey_3 local trigger Table_Table_loadTrigger_result local integer this_5 local integer parentKey_4 local hashtable this_6 local integer parentKey_5 local integer childKey_1 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 set this_2 = this_1 set parentKey_1 = parentKey set value_1 = value set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set value_2 = value_1 call SaveFogStateHandle(this_3, parentKey_2, childKey, value_2) set this_4 = TypeCasting_typecastdata set parentKey_3 = 0 if Table_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling Table.loadTrigger") else call error("Called Table.loadTrigger on invalid object.") endif endif set this_5 = this_4 set parentKey_4 = parentKey_3 set this_6 = Table_ht set parentKey_5 = this_5 set childKey_1 = parentKey_4 set Table_Table_loadTrigger_result = LoadTriggerHandle(this_6, parentKey_5, childKey_1) return Table_Table_loadTrigger_result endfunction function code__registerPlayerUnitEvent_RegisterEvents takes nothing returns boolean local integer this_2 = RegisterEvents_onCastMap local integer key = GetSpellAbilityId() local trigger this_1 local integer HashMap_HashMap_get_result local integer this_3 local integer key_1 if Table_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling HashMap.get") else call error("Called HashMap.get on invalid object.") endif endif set this_3 = this_2 set key_1 = key set HashMap_HashMap_get_result = dispatch_Table_Table_Table_loadInt(this_3, key_1) set this_1 = triggerFromIndex(HashMap_HashMap_get_result) return TriggerEvaluate(this_1) 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 GetSpellAbilityId() else call GetSpellTargetX() call GetSpellTargetY() endif else call GetSpellTargetUnit() endif endfunction function EventListener_onSpellEffect takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer abilId = GetSpellAbilityId() local unit this_1 = trigUnit local unit this_2 = this_1 local integer index = GetUnitUserData(this_2) local integer listener_1 local integer nextListener local integer listener_2 local integer nextListener_1 local integer this_3 local integer key local boolean HashMap_HashMap_has_result local integer this_4 local integer key_1 local integer this_5 local integer key_2 local integer HashMap_HashMap_get_result local integer this_6 local integer key_3 if EventListener_castMapCasters[index] != 0 then set listener_1 = EventListener_castMapCasters[index] loop exitwhen not (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 set this_3 = EventListener_castMap set key = abilId if Table_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling HashMap.has") else call error("Called HashMap.has on invalid object.") endif endif set this_4 = this_3 set key_1 = key set HashMap_HashMap_has_result = dispatch_Table_Table_Table_hasInt(this_4, key_1) if HashMap_HashMap_has_result then set this_5 = EventListener_castMap set key_2 = abilId if Table_typeId[this_5] == 0 then if this_5 == 0 then call error("Nullpointer exception when calling HashMap.get") else call error("Called HashMap.get on invalid object.") endif endif set this_6 = this_5 set key_3 = key_2 set HashMap_HashMap_get_result = dispatch_Table_Table_Table_loadInt(this_6, key_3) set listener_2 = HashMap_HashMap_get_result loop exitwhen not (listener_2 != 0) set nextListener_1 = OnCastListener_next[listener_2] if OnCastListener_eventUnit[listener_2] == null or OnCastListener_eventUnit[listener_2] == trigUnit then call dispatch_OnCastListener_ClosureEvents_OnCastListener_fire(listener_2, GetSpellAbilityUnit()) endif set listener_2 = nextListener_1 endloop endif endfunction function code__registerPlayerUnitEvent_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_onSpellEffect() endfunction function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave takes nothing returns nothing local unit leavingUnit = GetTriggerUnit() local unit this_1 = leavingUnit local integer id_1 = 1095577652 local unit u_1 local trigger this_2 if GetUnitAbilityLevel(this_1, id_1) == 0 and GetIssuedOrderId() == 852056 then set u_1 = leavingUnit set OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount] = u_1 set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount + 1 set this_2 = OnUnitEnterLeave_eventTrigger call TriggerExecute(this_2) set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount - 1 endif endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + 0.030 endfunction function 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 Cinematic_endCinematic takes integer this_1 returns nothing local real this_2 set Cinematic_running[this_1] = false call ShowInterface(true, .5) call EnableUserControl(true) set this_2 = 0. call Cinematic_fadeIn(this_2) endfunction function CallbackSingle_start takes integer this_1, timer whichTimer, real time returns nothing local timer receiver = whichTimer local timer this_2 = receiver local integer data_1 = this_1 local integer temp = TimerUtils_timerData local timer this_3 = this_2 local timer receiver_1 local timer this_4 local real time_1 local code timerCallBack call dispatch_Table_Table_Table_saveInt(temp, GetHandleId(this_3), data_1) set receiver_1 = receiver set this_4 = receiver_1 set time_1 = time set timerCallBack = ref_function_code__start_CallbackSingle_ClosureTimers call TimerStart(this_4, time_1, false, timerCallBack) set CallbackSingle_t[this_1] = receiver_1 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 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 dispatch_CineSeq_Cinematic_CineSeq_apply takes integer this_1 returns real local real Cinematic_CineSeq_apply_result_seconds local integer this_2 local integer this_3 local integer this_4 local real this_5 local integer this_6 local real pos_x_1 local real pos_y_1 local real this_7 local integer this_8 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 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 this_2 = this_1 call Cinematic_fadeOut(duration_seconds[this_2]) set tuple_temp = duration_seconds[this_2] set Cinematic_CineSeq_apply_result_seconds = tuple_temp else set this_3 = this_1 call Cinematic_fadeIn(duration_seconds_338[this_3]) set tuple_temp_1 = duration_seconds_338[this_3] set Cinematic_CineSeq_apply_result_seconds = tuple_temp_1 endif else set this_4 = this_1 call CameraSetupApply(setup[this_4], true, true) set this_5 = 0. set tuple_temp_2 = this_5 set Cinematic_CineSeq_apply_result_seconds = tuple_temp_2 endif elseif CineSeq_typeId[this_1] <= 1213 then set this_6 = this_1 set tuple_temp_3 = pos_x[this_6] set tuple_temp_4 = pos_y[this_6] set pos_x_1 = tuple_temp_3 set pos_y_1 = tuple_temp_4 call SetCameraPosition(pos_x_1, pos_y_1) set this_7 = 0. set tuple_temp_5 = this_7 set Cinematic_CineSeq_apply_result_seconds = tuple_temp_5 else set this_8 = this_1 set tuple_temp_6 = duration_seconds_339[this_8] set Cinematic_CineSeq_apply_result_seconds = tuple_temp_6 endif set dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds = Cinematic_CineSeq_apply_result_seconds return dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds endfunction function getTimer takes nothing returns timer local timer receiver local timer this_1 local integer data_1 local timer this_2 local timer this_3 local integer data_2 local timer this_4 local integer temp local integer temp_1 if TimerUtils_freeTimersCount > 0 then set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount - 1 set this_1 = TimerUtils_freeTimers[TimerUtils_freeTimersCount] set data_1 = 0 set temp = TimerUtils_timerData set this_2 = this_1 call dispatch_Table_Table_Table_saveInt(temp, GetHandleId(this_2), data_1) return TimerUtils_freeTimers[TimerUtils_freeTimersCount] else set receiver = CreateTimer() set this_3 = receiver set data_2 = 0 set temp_1 = TimerUtils_timerData set this_4 = this_3 call dispatch_Table_Table_Table_saveInt(temp_1, GetHandleId(this_4), data_2) return receiver endif endfunction function Cinematic_controller takes integer this_1, integer sequence_1, integer ending_1 returns nothing local integer next local real duration_seconds_1 local integer clVar local real temp local integer this_2 local boolean LinkedList_LinkedList_isEmpty_result local integer this_3 local integer this_4 local real timeToWait local integer cb_1 local timer this_5 local real timeToWait_1 local integer cb_2 local integer this_6 local boolean andLeft local real tuple_temp if Cinematic_running[this_1] then set this_2 = sequence_1 if LinkedList_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling LinkedList.isEmpty") else call error("Called LinkedList.isEmpty on invalid object.") endif endif set this_3 = this_2 set LinkedList_LinkedList_isEmpty_result = LinkedList_size[this_3] == 0 set andLeft = not LinkedList_LinkedList_isEmpty_result else set andLeft = false endif if andLeft then set next = dispatch_LinkedList_LinkedList_LinkedList_dequeue(sequence_1) set tuple_temp = dispatch_CineSeq_Cinematic_CineSeq_apply(next) set duration_seconds_1 = tuple_temp set temp = duration_seconds_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_4 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_4] = 1105 else call error("Out of memory: Could not create CallbackSingle_doAfter_Cinematic_Cinematic.") set this_4 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_4 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_4] = 1105 endif set clVar = this_4 set this_483[clVar] = this_1 set sequence[clVar] = sequence_1 set ending[clVar] = ending_1 set timeToWait = temp set cb_1 = clVar set this_5 = getTimer() set timeToWait_1 = timeToWait set cb_2 = cb_1 call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_2, this_5, timeToWait_1) else set this_6 = this_1 if Cinematic_typeId[this_6] == 0 then if this_6 == 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_6) call dispatch_CineSeq_Cinematic_CineSeq_apply(ending_1) endif endfunction function DummyRecycler_recycle takes unit u_1 returns nothing local integer smallestQueue = 0 local integer i = 1 local integer temp = 8 - 1 local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 local integer this_1 local integer LinkedList_LinkedList_size_result local integer this_2 local integer this_3 local integer LinkedList_LinkedList_size_result_1 local integer this_4 local integer this_5 local integer LinkedList_LinkedList_size_result_2 local integer this_6 local unit this_7 local integer this_8 local integer elem local integer this_9 local integer elem_1 local unit object local handle this_10 local unit this_11 local real pos_x_1 local real pos_y_1 local unit receiver_6 local unit receiver_7 local unit this_12 local real x local unit this_13 local real y local real this_x local real this_y local real v_x local real v_y local unit this_14 local unit this_15 local real a_radians local real this_radians local real this_16 local unit this_17 local real scale local unit this_18 local integer col_red local integer col_green local integer col_blue local integer col_alpha local unit this_19 local player p local boolean changeColor local integer temp_1 local unit temp_2 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 local integer tuple_temp_8 local integer tuple_temp_9 local integer tuple_temp_10 local integer tuple_temp_11 loop exitwhen i > temp set this_1 = DummyRecycler_angleQueues[smallestQueue] 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 set this_2 = this_1 set LinkedList_LinkedList_size_result = LinkedList_size[this_2] set temp_1 = LinkedList_LinkedList_size_result set this_3 = DummyRecycler_angleQueues[i] if LinkedList_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif set this_4 = this_3 set LinkedList_LinkedList_size_result_1 = LinkedList_size[this_4] if temp_1 > LinkedList_LinkedList_size_result_1 then set smallestQueue = i endif set i = i + 1 endloop set this_5 = DummyRecycler_angleQueues[smallestQueue] if LinkedList_typeId[this_5] == 0 then if this_5 == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif set this_6 = this_5 set LinkedList_LinkedList_size_result_2 = LinkedList_size[this_6] if LinkedList_LinkedList_size_result_2 >= 6 then set this_7 = u_1 call RemoveUnit(this_7) else set this_8 = DummyRecycler_angleQueues[smallestQueue] set object = u_1 set this_10 = object set elem = GetHandleId(this_10) if LinkedList_typeId[this_8] == 0 then if this_8 == 0 then call error("Nullpointer exception when calling LinkedList.enqueue") else call error("Called LinkedList.enqueue on invalid object.") endif endif set this_9 = this_8 set elem_1 = elem call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_9, elem_1) set receiver = u_1 set this_11 = receiver set tuple_temp = MapBounds_boundMax_x set tuple_temp_1 = MapBounds_boundMax_y set this_x = tuple_temp set this_y = tuple_temp_1 set tuple_temp_2 = 16. set tuple_temp_3 = 16. set v_x = tuple_temp_2 set v_y = tuple_temp_3 set tuple_temp_4 = this_x - v_x set tuple_temp_5 = this_y - v_y set pos_x_1 = tuple_temp_4 set pos_y_1 = tuple_temp_5 set receiver_6 = this_11 set this_12 = receiver_6 set x = pos_x_1 call SetUnitX(this_12, x) set receiver_7 = receiver_6 set this_13 = receiver_7 set y = pos_y_1 call SetUnitY(this_13, y) set receiver_1 = receiver set this_14 = receiver_1 call PauseUnit(this_14, true) set receiver_2 = receiver_1 set this_15 = receiver_2 set this_16 = smallestQueue * DummyRecycler_ANGLE_DEGREE set tuple_temp_6 = this_16 * 0.017453293 set a_radians = tuple_temp_6 set temp_2 = this_15 set tuple_temp_7 = a_radians set this_radians = tuple_temp_7 call SetUnitFacing(temp_2, this_radians * 57.295779513) set receiver_3 = receiver_2 set this_17 = receiver_3 set scale = 1. call SetUnitScale(this_17, scale, scale, scale) set receiver_4 = receiver_3 set this_18 = receiver_4 set tuple_temp_8 = Colors_COLOR_WHITE_red set tuple_temp_9 = Colors_COLOR_WHITE_green set tuple_temp_10 = Colors_COLOR_WHITE_blue set tuple_temp_11 = Colors_COLOR_WHITE_alpha set col_red = tuple_temp_8 set col_green = tuple_temp_9 set col_blue = tuple_temp_10 set col_alpha = tuple_temp_11 call SetUnitVertexColor(this_18, col_red, col_green, col_blue, col_alpha) set receiver_5 = receiver_4 set this_19 = receiver_5 set p = Basics_DUMMY_PLAYER set changeColor = true call SetUnitOwner(this_19, p, changeColor) endif endfunction function SoundDefinition_playSound takes integer this_1, integer instance_1 returns nothing local integer clVar local real temp local sound this_2 local integer this_3 local real timeToWait local integer cb_1 local timer this_4 local real timeToWait_1 local integer cb_2 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 set this_2 = SoundInstance_snd[instance_1] call StartSound(this_2) endif set temp = SoundDefinition_duration[SoundInstance_soundDef[instance_1]] * 0.001 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_3 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_3] = 1114 else call error("Out of memory: Could not create CallbackSingle_doAfter_SoundDefinition_SoundUtils.") set this_3 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_3 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_3] = 1114 endif set clVar = this_3 set this_489[clVar] = this_1 set instance[clVar] = instance_1 set timeToWait = temp set cb_1 = clVar set this_4 = getTimer() set timeToWait_1 = timeToWait set cb_2 = cb_1 call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_2, this_4, timeToWait_1) endfunction function destroySoundInstance takes integer this_1 returns nothing local integer this_2 = this_1 local sound this_3 = SoundInstance_snd[this_2] local boolean killWhenDone = true local boolean fadeOut = false local integer obj call StopSound(this_3, killWhenDone, fadeOut) set obj = this_1 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 dispatch_Sim3DSound_destroySim3DSound takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 SoundDefinition_recycle takes integer this_1, integer instance_1 returns nothing local integer this_2 local integer LinkedList_LinkedList_size_result local integer this_3 local integer this_4 local integer elem local integer this_5 local integer elem_1 local integer this_6 set SoundInstance_p[instance_1] = null if SoundInstance_s3s[instance_1] != 0 then call dispatch_Sim3DSound_destroySim3DSound(SoundInstance_s3s[instance_1]) endif set this_2 = SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]] if LinkedList_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling LinkedList.size") else call error("Called LinkedList.size on invalid object.") endif endif set this_3 = this_2 set LinkedList_LinkedList_size_result = LinkedList_size[this_3] if LinkedList_LinkedList_size_result < 4 then set this_4 = SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]] set elem = instance_1 if LinkedList_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling LinkedList.push") else call error("Called LinkedList.push on invalid object.") endif endif set this_5 = this_4 set elem_1 = elem call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_5, elem_1) else set this_6 = instance_1 if SoundInstance_typeId[this_6] == 0 then if this_6 == 0 then call error("Nullpointer exception when calling SoundInstance.SoundInstance") else call error("Called SoundInstance.SoundInstance on invalid object.") endif endif call destroySoundInstance(this_6) endif endfunction function dispatch_Callback_destroyCallback takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 if Callback_typeId[obj] == 0 then call error("Double free: object of type Callback") else set Callback_firstFree = Callback_firstFree + 1 set Callback_typeId[obj] = 0 endif endfunction function call_doAfter_ClosureTimers takes integer this_1 returns nothing local timerdialog this_2 call dispatch_Callback_destroyCallback(cb[this_1]) set this_2 = dia[this_1] call DestroyTimerDialog(this_2) endfunction function call_nullTimer_ClosureEvents takes integer this_1 returns nothing local trigger this_2 = ClosureEvents_unitTrig local code actionFunc = ref_function_code__addAction_nullTimer_ClosureEvents local integer i local integer temp local trigger receiver local trigger receiver_1 local trigger receiver_2 local trigger receiver_3 local trigger receiver_4 local trigger receiver_5 local trigger receiver_6 local trigger receiver_7 local trigger receiver_8 local trigger receiver_9 local trigger this_3 local code actionFunc_1 local trigger this_4 local code actionFunc_2 local trigger this_5 local player whichPlayer local playerevent whichPlayerEvent local trigger this_6 local player whichPlayer_1 local playerevent whichPlayerEvent_1 local trigger this_7 local player whichPlayer_2 local playerevent whichPlayerEvent_2 local trigger this_8 local player whichPlayer_3 local playerevent whichPlayerEvent_3 local trigger this_9 local player whichPlayer_4 local playerevent whichPlayerEvent_4 local trigger this_10 local player whichPlayer_5 local playerevent whichPlayerEvent_5 local trigger this_11 local player whichPlayer_6 local playerevent whichPlayerEvent_6 local trigger this_12 local player whichPlayer_7 local playerevent whichPlayerEvent_7 local trigger this_13 local player whichPlayer_8 local playerevent whichPlayerEvent_8 local trigger this_14 local player whichPlayer_9 local playerevent whichPlayerEvent_9 local trigger this_15 local player whichPlayer_10 local string chatMessageToDetect local boolean exactMatchOnly call TriggerAddAction(this_2, actionFunc) set this_3 = ClosureEvents_leaveTrig set actionFunc_1 = ref_function_code__addAction_nullTimer_ClosureEvents_361 call TriggerAddAction(this_3, actionFunc_1) set this_4 = ClosureEvents_keyTrig set actionFunc_2 = ref_function_code__addAction_nullTimer_ClosureEvents_362 call TriggerAddAction(this_4, actionFunc_2) set i = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen i > temp set this_5 = ClosureEvents_leaveTrig set whichPlayer = Player_players[i] set whichPlayerEvent = EVENT_PLAYER_LEAVE call TriggerRegisterPlayerEvent(this_5, whichPlayer, whichPlayerEvent) set receiver = ClosureEvents_keyTrig set this_6 = receiver set whichPlayer_1 = Player_players[i] set whichPlayerEvent_1 = EVENT_PLAYER_ARROW_DOWN_DOWN call TriggerRegisterPlayerEvent(this_6, whichPlayer_1, whichPlayerEvent_1) set receiver_1 = receiver set this_7 = receiver_1 set whichPlayer_2 = Player_players[i] set whichPlayerEvent_2 = EVENT_PLAYER_ARROW_DOWN_UP call TriggerRegisterPlayerEvent(this_7, whichPlayer_2, whichPlayerEvent_2) set receiver_2 = receiver_1 set this_8 = receiver_2 set whichPlayer_3 = Player_players[i] set whichPlayerEvent_3 = EVENT_PLAYER_ARROW_UP_DOWN call TriggerRegisterPlayerEvent(this_8, whichPlayer_3, whichPlayerEvent_3) set receiver_3 = receiver_2 set this_9 = receiver_3 set whichPlayer_4 = Player_players[i] set whichPlayerEvent_4 = EVENT_PLAYER_ARROW_UP_UP call TriggerRegisterPlayerEvent(this_9, whichPlayer_4, whichPlayerEvent_4) set receiver_4 = receiver_3 set this_10 = receiver_4 set whichPlayer_5 = Player_players[i] set whichPlayerEvent_5 = EVENT_PLAYER_ARROW_LEFT_DOWN call TriggerRegisterPlayerEvent(this_10, whichPlayer_5, whichPlayerEvent_5) set receiver_5 = receiver_4 set this_11 = receiver_5 set whichPlayer_6 = Player_players[i] set whichPlayerEvent_6 = EVENT_PLAYER_ARROW_LEFT_UP call TriggerRegisterPlayerEvent(this_11, whichPlayer_6, whichPlayerEvent_6) set receiver_6 = receiver_5 set this_12 = receiver_6 set whichPlayer_7 = Player_players[i] set whichPlayerEvent_7 = EVENT_PLAYER_ARROW_RIGHT_DOWN call TriggerRegisterPlayerEvent(this_12, whichPlayer_7, whichPlayerEvent_7) set receiver_7 = receiver_6 set this_13 = receiver_7 set whichPlayer_8 = Player_players[i] set whichPlayerEvent_8 = EVENT_PLAYER_ARROW_RIGHT_UP call TriggerRegisterPlayerEvent(this_13, whichPlayer_8, whichPlayerEvent_8) set receiver_8 = receiver_7 set this_14 = receiver_8 set whichPlayer_9 = Player_players[i] set whichPlayerEvent_9 = EVENT_PLAYER_END_CINEMATIC call TriggerRegisterPlayerEvent(this_14, whichPlayer_9, whichPlayerEvent_9) set receiver_9 = receiver_8 set this_15 = receiver_9 set whichPlayer_10 = Player_players[i] set chatMessageToDetect = "" set exactMatchOnly = false call TriggerRegisterPlayerChatEvent(this_15, whichPlayer_10, chatMessageToDetect, exactMatchOnly) set i = i + 1 endloop call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents, null) endfunction function call_nullTimer_OnUnitEnterLeave takes integer this_1 returns nothing local trigger receiver = CreateTrigger() local trigger this_2 = receiver local region whichRegion = MapBounds_boundRegion local boolexpr filter = Filter(ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave) local group receiver_1 local group receiver_2 local playerunitevent p local code c local group this_3 local rect rec local group this_4 local rect rec_1 local boolexpr filter_1 local group this_5 local group this_6 call TriggerRegisterEnterRegion(this_2, whichRegion, filter) set p = EVENT_PLAYER_UNIT_ISSUED_ORDER set c = ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave call registerPlayerUnitEvent(p, null, c, null) set this_3 = OnUnitEnterLeave_preplacedUnits set rec = MapBounds_boundRect set this_4 = this_3 set rec_1 = rec set filter_1 = null call GroupEnumUnitsInRect(this_4, rec_1, filter_1) call ForGroup(OnUnitEnterLeave_preplacedUnits, ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave) set receiver_1 = OnUnitEnterLeave_preplacedUnits set this_5 = receiver_1 call GroupClear(this_5) set receiver_2 = receiver_1 set this_6 = receiver_2 call DestroyGroup(this_6) endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy takes integer this_1, unit dummy_1, integer id_1 returns nothing local unit dummy_2 local integer id_2 local unit receiver local unit this_2 local integer abil 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 set dummy_2 = dummy_1 set id_2 = id_1 set receiver = dummy_2 set this_2 = receiver set abil = id_2 call UnitRemoveAbility(this_2, abil) call DummyRecycler_recycle(dummy_2) endfunction function dispatch_DummyCaster_destroyDummyCaster takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 effect_destrHidden takes effect this_1 returns nothing local effect receiver = this_1 local effect this_2 = receiver local integer tuple_temp = 0 local integer tuple_temp_1 = 0 local integer tuple_temp_2 = 0 local integer tuple_temp_3 = 0 local integer color_red = tuple_temp local integer color_green = tuple_temp_1 local integer color_blue = tuple_temp_2 local integer color_alpha = tuple_temp_3 local effect receiver_1 local effect receiver_2 local effect receiver_3 local effect receiver_4 local effect this_3 local real pos_x_1 local real pos_y_1 local real pos_z local effect this_4 local real time local effect this_5 local real timeScale local effect this_6 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 call BlzSetSpecialEffectColor(this_2, color_red, color_green, color_blue) call BlzSetSpecialEffectAlpha(this_2, color_alpha) set receiver_1 = receiver set this_3 = receiver_1 set tuple_temp_4 = MapBounds_boundMin_x set tuple_temp_5 = MapBounds_boundMin_y set tuple_temp_6 = 5000. set pos_x_1 = tuple_temp_4 set pos_y_1 = tuple_temp_5 set pos_z = tuple_temp_6 call BlzSetSpecialEffectPosition(this_3, pos_x_1, pos_y_1, pos_z) set receiver_2 = receiver_1 set this_4 = receiver_2 set time = 1. call BlzSetSpecialEffectTime(this_4, time) set receiver_3 = receiver_2 set this_5 = receiver_3 set timeScale = 10. call BlzSetSpecialEffectTimeScale(this_5, timeScale) set receiver_4 = receiver_3 set this_6 = receiver_4 call DestroyEffect(this_6) endfunction function dispatch_ForGroupCallback_destroyForGroupCallback takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 if ForGroupCallback_typeId[obj] == 0 then call error("Double free: object of type ForGroupCallback") else set ForGroupCallback_nextFree[ForGroupCallback_firstFree] = obj set ForGroupCallback_firstFree = ForGroupCallback_firstFree + 1 set ForGroupCallback_typeId[obj] = 0 endif endfunction function group_forEachFrom takes group this_1, integer cb_1 returns nothing local group from = this_1 local unit u_1 local group this_2 local group this_3 local unit iterUnit loop set this_2 = from exitwhen not (FirstOfGroup(this_2) != null) set this_3 = from set iterUnit = FirstOfGroup(this_3) call GroupRemoveUnit(this_3, iterUnit) set u_1 = iterUnit call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(cb_1, u_1) endloop call dispatch_ForGroupCallback_destroyForGroupCallback(cb_1) endfunction function finishPreload takes nothing returns nothing local unit this_1 = Preloader_dum local integer clVar local group temp local integer this_2 local group this_3 call RemoveUnit(this_1) set temp = Preloader_dumg if ForGroupCallback_firstFree == 0 then if ForGroupCallback_maxIndex < 32768 then set ForGroupCallback_maxIndex = ForGroupCallback_maxIndex + 1 set this_2 = ForGroupCallback_maxIndex set ForGroupCallback_typeId[this_2] = 2072 else call error("Out of memory: Could not create ForGroupCallback_forEachFrom_Preloader.") set this_2 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_2 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_2] = 2072 endif set clVar = this_2 call group_forEachFrom(temp, clVar) set this_3 = Preloader_dumg call DestroyGroup(this_3) set Preloader_dumg = null endfunction function testFail takes string msg returns nothing endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call takes integer this_1 returns nothing local integer this_2 local integer this_3 local integer expected local integer this_4 local integer this_5 local integer this_6 local integer this_7 local integer this_8 local effect this_9 local integer this_10 local integer this_11 local integer this_12 local integer instance_1 local integer this_13 local integer this_14 local integer instance_2 local integer this_15 local integer this_16 local integer instance_3 local integer this_17 local integer this_18 local integer instance_4 local string temp 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 set this_2 = this_1 call Cinematic_controller(this_483[this_2], sequence[this_2], ending[this_2]) else call call_doAfter_ClosureTimers(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1107 then set ClosureTimers_x = ClosureTimers_x + 50 else set ClosureTimers_x = ClosureTimers_x * 2 endif elseif CallbackSingle_typeId[this_1] <= 1110 then if CallbackSingle_typeId[this_1] <= 1109 then set ClosureTimers_x = ClosureTimers_x / 2 set this_3 = ClosureTimers_x set expected = 250 if this_3 != expected then set this_4 = expected set temp = "Expected <" + I2S(this_4) + ">, Actual <" set this_5 = this_3 call testFail(temp + I2S(this_5) + ">") endif else set this_6 = this_1 call dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy(this[this_6], dummy[this_6], id[this_6]) set DummyCaster_castCount[this[this_6]] = DummyCaster_castCount[this[this_6]] - 1 if DummyCaster_castCount[this[this_6]] == 0 then call dispatch_DummyCaster_destroyDummyCaster(this[this_6]) endif endif elseif CallbackSingle_typeId[this_1] <= 1111 then set this_7 = this_1 call DummyRecycler_recycle(u[this_7]) else set this_8 = this_1 set this_9 = this_484[this_8] call DestroyEffect(this_9) endif elseif CallbackSingle_typeId[this_1] <= 1116 then if CallbackSingle_typeId[this_1] <= 1114 then if CallbackSingle_typeId[this_1] <= 1113 then set this_10 = this_1 call effect_destrHidden(this_485[this_10]) else set this_11 = this_1 set this_12 = this_489[this_11] set instance_1 = instance[this_11] if SoundDefinition_typeId[this_12] == 0 then if this_12 == 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_12, instance_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 finishPreload() else set this_13 = this_1 set this_14 = this_486[this_13] set instance_2 = snd[this_13] if SoundDefinition_typeId[this_14] == 0 then if this_14 == 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_14, instance_2) endif elseif CallbackSingle_typeId[this_1] <= 1119 then set this_15 = this_1 set this_16 = this_487[this_15] set instance_3 = snd_478[this_15] if SoundDefinition_typeId[this_16] == 0 then if this_16 == 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_16, instance_3) else set this_17 = this_1 set this_18 = this_488[this_17] set instance_4 = snd_479[this_17] if SoundDefinition_typeId[this_18] == 0 then if this_18 == 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_18, instance_4) endif endfunction function timer_release takes timer this_1 returns nothing local timer this_2 local timer this_3 local timer this_4 local integer data_1 local timer this_5 local timer this_6 local integer temp local integer temp_1 if this_1 == null then call error("Trying to release a null timer") return endif set this_2 = this_1 set temp = TimerUtils_timerData set this_3 = this_2 if dispatch_Table_Table_Table_loadInt(temp, GetHandleId(this_3)) == 679645218 then call error("ReleaseTimer: Double free!") return endif set this_4 = this_1 set data_1 = 679645218 set temp_1 = TimerUtils_timerData set this_5 = this_4 call dispatch_Table_Table_Table_saveInt(temp_1, GetHandleId(this_5), data_1) set this_6 = this_1 call PauseTimer(this_6) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this_1 set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 endfunction function dispatch_CallbackSingle_destroyCallbackSingle takes integer this_1 returns nothing local integer this_2 local integer this_3 local integer obj 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 set this_2 = this_1 set this_3 = this_2 call timer_release(CallbackSingle_t[this_3]) set obj = this_2 if CallbackSingle_typeId[obj] == 0 then call error("Double free: object of type CallbackSingle") else set CallbackSingle_nextFree[CallbackSingle_firstFree] = obj set CallbackSingle_firstFree = CallbackSingle_firstFree + 1 set CallbackSingle_typeId[obj] = 0 endif endfunction function CallbackSingle_staticCallback takes nothing returns nothing local timer t = GetExpiredTimer() local timer this_1 = t local integer temp = TimerUtils_timerData local timer this_2 = this_1 local integer cb_1 = dispatch_Table_Table_Table_loadInt(temp, GetHandleId(this_2)) 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 push takes group g returns nothing local group object local handle this_1 local boolean u_1 local integer cond_result local integer temp local integer temp_1 set GroupUtils_stack[GroupUtils_numStack] = g set temp = GroupUtils_used set object = GroupUtils_stack[GroupUtils_numStack] set this_1 = object set temp_1 = GetHandleId(this_1) set u_1 = false if u_1 then set cond_result = 1 else set cond_result = 0 endif call dispatch_HashMap_HashMap_HashMap_put(temp, temp_1, cond_result) set GroupUtils_numStack = GroupUtils_numStack + 1 endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_flushBuffer takes integer this_1 returns nothing local integer this_2 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 set this_2 = this_1 call dispatch_Table_Table_Table_saveInt(ByteBuffer_storage[this_2], ByteBuffer_intCount[this_2], ByteBuffer_buffer[this_2]) set ByteBuffer_intCount[this_2] = ByteBuffer_intCount[this_2] + 1 set ByteBuffer_buffer[this_2] = 0 set ByteBuffer_bufferLength[this_2] = 0 endfunction function ByteBuffer_writeByteUnsafe takes integer this_1, integer n returns nothing local integer this_2 local integer this_3 local integer amount local integer num local integer shift local integer temp if (true and n < 0) or n > 255 then set this_2 = n call error("ByteBuffer#writeByteUnsafe ERROR: provided argument (" + I2S(this_2) + ") is not in the range [0, 255].") endif set temp = ByteBuffer_buffer[this_1] set this_3 = n set amount = 8 * ByteBuffer_bufferLength[this_1] set num = this_3 set shift = amount set ByteBuffer_buffer[this_1] = temp + num * BitwiseInit_powShift[shift] 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 ByteBuffer_writeByte takes integer this_1, integer n returns nothing local integer this_2 = this_1 local integer this_3 = n local integer other = 255 local integer n_1 = BlzBitAnd(this_3, other) if ByteBuffer_typeId[this_2] == 0 then if this_2 == 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_2, n_1) endfunction function char takes string s returns integer local integer a local string this_1 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 this_1 = s set a = StringUtils_s2c[StringHash(this_1) / 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 Base64Decoder_writeBytes takes integer this_1, string chars returns nothing local string this_4 = chars local integer index = 0 local string char_1 = SubString(this_4, index, index + 1) local string this_3 = char_1 local integer tuple_temp = char(this_3) local integer this_c = tuple_temp local integer this_2 = Base64_REVERSE_CHARMAP[this_c] local integer amount = 18 local integer num = this_2 local integer shift = amount local integer temp = num * BitwiseInit_powShift[shift] local string this_7 = chars local integer index_1 = 1 local string char_2 = SubString(this_7, index_1, index_1 + 1) local string this_6 = char_2 local integer tuple_temp_1 = char(this_6) local integer this_c_1 = tuple_temp_1 local integer this_5 = Base64_REVERSE_CHARMAP[this_c_1] local integer amount_1 = 12 local integer num_1 = this_5 local integer shift_1 = amount_1 local integer temp_1 = temp + num_1 * BitwiseInit_powShift[shift_1] local string this_10 = chars local integer index_2 = 2 local string char_3 = SubString(this_10, index_2, index_2 + 1) local string this_9 = char_3 local integer tuple_temp_2 = char(this_9) local integer this_c_2 = tuple_temp_2 local integer this_8 = Base64_REVERSE_CHARMAP[this_c_2] local integer amount_2 = 6 local integer num_2 = this_8 local integer shift_2 = amount_2 local integer temp_2 = temp_1 + num_2 * BitwiseInit_powShift[shift_2] local string this_12 = chars local integer index_3 = 3 local string char_4 = SubString(this_12, index_3, index_3 + 1) local string this_11 = char_4 local integer tuple_temp_3 = char(this_11) local integer this_c_3 = tuple_temp_3 local integer data_1 = temp_2 + Base64_REVERSE_CHARMAP[this_c_3] local integer this_13 = Base64Decoder_byteBuffer[this_1] local integer this_15 = data_1 local integer other = 16777215 local integer this_14 = BlzBitAnd(this_15, other) local integer amount_3 = 16 local integer num_3 = this_14 local integer shift_3 = amount_3 local integer value = num_3 local integer isNegative = 0 local integer n local integer this_16 local integer amount_4 local integer num_4 local integer shift_4 local integer this_17 local integer n_1 local integer this_18 local integer amount_5 local integer num_5 local integer shift_5 local integer value_1 local integer isNegative_1 local integer this_19 local integer other_1 local integer this_20 local integer amount_6 local integer num_6 local integer shift_6 local integer this_21 local integer n_2 local integer this_22 local integer amount_7 local integer num_7 local integer shift_7 local integer value_2 local integer isNegative_2 local integer this_23 local integer other_2 if value < 0 then set value = -2147483648 + value set isNegative = 1 endif set n = isNegative * BitwiseInit_powShift[31 - shift_3] + value / BitwiseInit_powShift[shift_3] if ByteBuffer_typeId[this_13] == 0 then if this_13 == 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_13, n) set this_16 = data_1 set amount_4 = 8 set num_4 = this_16 set shift_4 = amount_4 set data_1 = num_4 * BitwiseInit_powShift[shift_4] set this_17 = Base64Decoder_byteBuffer[this_1] set this_19 = data_1 set other_1 = 16777215 set this_18 = BlzBitAnd(this_19, other_1) set amount_5 = 16 set num_5 = this_18 set shift_5 = amount_5 set value_1 = num_5 set isNegative_1 = 0 if value_1 < 0 then set value_1 = -2147483648 + value_1 set isNegative_1 = 1 endif set n_1 = isNegative_1 * BitwiseInit_powShift[31 - shift_5] + value_1 / BitwiseInit_powShift[shift_5] if ByteBuffer_typeId[this_17] == 0 then if this_17 == 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_17, n_1) set this_20 = data_1 set amount_6 = 8 set num_6 = this_20 set shift_6 = amount_6 set data_1 = num_6 * BitwiseInit_powShift[shift_6] set this_21 = Base64Decoder_byteBuffer[this_1] set this_23 = data_1 set other_2 = 16777215 set this_22 = BlzBitAnd(this_23, other_2) set amount_7 = 16 set num_7 = this_22 set shift_7 = amount_7 set value_2 = num_7 set isNegative_2 = 0 if value_2 < 0 then set value_2 = -2147483648 + value_2 set isNegative_2 = 1 endif set n_2 = isNegative_2 * BitwiseInit_powShift[31 - shift_7] + value_2 / BitwiseInit_powShift[shift_7] if ByteBuffer_typeId[this_21] == 0 then if this_21 == 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_21, n_2) endfunction function Base64Decoder_append takes integer this_1, string data_1 returns nothing local string this_2 = data_1 local integer len = StringLength(this_2) local integer i local integer this_3 local string chars local string this_4 local integer start local integer stop local integer this_5 local string chars_1 local string this_6 local integer start_1 local integer stop_1 local string this_7 local integer start_2 local string this_8 local string temp local string temp_1 local integer temp_2 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] set this_3 = this_1 set temp = Base64Decoder_buffer[this_1] set this_4 = data_1 set start = 0 set stop = i set chars = temp + SubString(this_4, start, stop) if Base64Decoder_typeId[this_3] == 0 then if this_3 == 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_3, chars) loop exitwhen not (i + 4 <= len) set this_5 = this_1 set this_6 = data_1 set start_1 = i set stop_1 = i + 4 set chars_1 = SubString(this_6, start_1, stop_1) if Base64Decoder_typeId[this_5] == 0 then if this_5 == 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_5, chars_1) set i = i + 4 endloop set this_7 = data_1 set start_2 = i set temp_1 = this_7 set temp_2 = start_2 set this_8 = this_7 set Base64Decoder_buffer[this_1] = SubString(temp_1, temp_2, StringLength(this_8)) set Base64Decoder_bufferLength[this_1] = len - i endfunction function dispatch_ForForceCallback_destroyForForceCallback takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 try takes integer c returns boolean local integer c_1 = c local boolean suppressErrors local force this_1 local code callback set Execute_tempCallbacks[Execute_tempCallbacksCount] = c_1 set Execute_tempCallbacksSuccess[Execute_tempCallbacksCount] = false set Execute_tempCallbacksCount = Execute_tempCallbacksCount + 1 set suppressErrors = ErrorHandling_suppressErrorMessages set ErrorHandling_suppressErrorMessages = true set this_1 = Execute_executeForce set callback = ref_function_executeCurrentCallback call ForForce(this_1, callback) set ErrorHandling_suppressErrorMessages = suppressErrors set Execute_tempCallbacksCount = Execute_tempCallbacksCount - 1 call dispatch_ForForceCallback_destroyForForceCallback(Execute_tempCallbacks[Execute_tempCallbacksCount]) return Execute_tempCallbacksSuccess[Execute_tempCallbacksCount] endfunction function Base64Decoder_appendData takes integer this_1, integer data_1 returns nothing local integer clVar local integer this_2 local integer c if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < 32768 then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_2 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_2] = 2065 else call error("Out of memory: Could not create ForForceCallback_execute_Base64Decoder_Base64.") set this_2 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_2 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_2] = 2065 endif set clVar = this_2 set data_333[clVar] = data_1 set this_482[clVar] = this_1 set c = clVar if not try(c) then call error("execute: thread has crashed. caused by:\n| - " + ErrorHandling_lastError) endif endfunction function run_execute_Base64Decoder_Base64 takes integer this_1 returns nothing local integer i = 0 local integer this_2 local boolean ChunkedString_ChunkedString_hasChunk_result local integer this_3 local integer this_4 local string data_1 local integer this_5 local boolean ChunkedString_ChunkedString_hasChunk_result_1 local integer this_6 loop set this_2 = data_333[this_1] if ChunkedString_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling ChunkedString.hasChunk") else call error("Called ChunkedString.hasChunk on invalid object.") endif endif set this_3 = this_2 set ChunkedString_ChunkedString_hasChunk_result = ChunkedString_readIndex[this_3] < ChunkedString_chunkCount[this_3] exitwhen not (ChunkedString_ChunkedString_hasChunk_result and i < 25) set this_4 = this_482[this_1] set data_1 = dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(data_333[this_1]) if Base64Decoder_typeId[this_4] == 0 then if this_4 == 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_4, data_1) set i = i + 1 endloop set this_5 = data_333[this_1] if ChunkedString_typeId[this_5] == 0 then if this_5 == 0 then call error("Nullpointer exception when calling ChunkedString.hasChunk") else call error("Called ChunkedString.hasChunk on invalid object.") endif endif set this_6 = this_5 set ChunkedString_ChunkedString_hasChunk_result_1 = ChunkedString_readIndex[this_6] < ChunkedString_chunkCount[this_6] if ChunkedString_ChunkedString_hasChunk_result_1 then call Base64Decoder_appendData(this_482[this_1], data_333[this_1]) endif endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_flushStringBuffer takes integer this_1 returns nothing local integer this_2 local integer this_3 local string pdata 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 set this_2 = this_1 set this_3 = Base64Encoder_chunkedString[this_2] set pdata = Base64Encoder_stringBuffer[this_2] if ChunkedString_typeId[this_3] == 0 then if this_3 == 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_3, pdata) set Base64Encoder_stringBuffer[this_2] = "" set Base64Encoder_chars[this_2] = 0 endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_append takes integer this_1, string char_1 returns nothing local integer this_2 local string char_2 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 set this_2 = this_1 set char_2 = char_1 set Base64Encoder_stringBuffer[this_2] = Base64Encoder_stringBuffer[this_2] + char_2 set Base64Encoder_chars[this_2] = Base64Encoder_chars[this_2] + 1 if Base64Encoder_chars[this_2] == 32 then call dispatch_Base64Encoder_Base64_Base64Encoder_flushStringBuffer(this_2) endif endfunction function Base64Encoder_encode takes integer this_1, integer byte, integer count returns nothing local integer remaining = byte local integer i = 0 local integer temp = count local integer c local integer this_2 local integer amount local integer num local integer shift local integer value local integer isNegative local integer this_3 local integer other local integer this_4 local integer amount_1 local integer num_1 local integer shift_1 loop exitwhen i > temp set this_3 = remaining set other = 16515072 set this_2 = BlzBitAnd(this_3, other) set amount = 18 set num = this_2 set shift = amount set value = num set isNegative = 0 if value < 0 then set value = -2147483648 + value set isNegative = 1 endif set c = isNegative * BitwiseInit_powShift[31 - shift] + value / BitwiseInit_powShift[shift] call dispatch_Base64Encoder_Base64_Base64Encoder_append(this_1, Base64_CHARMAP[c]) set this_4 = remaining set amount_1 = 6 set num_1 = this_4 set shift_1 = amount_1 set remaining = num_1 * BitwiseInit_powShift[shift_1] set i = i + 1 endloop endfunction function Base64Encoder_writeByteUnsafe takes integer this_1, integer n returns nothing local integer this_2 = Base64Encoder_buffer[this_1] local integer amount = 8 local integer num = this_2 local integer shift = amount local integer this_3 local integer byte local integer count set Base64Encoder_buffer[this_1] = num * BitwiseInit_powShift[shift] + n set Base64Encoder_bytes[this_1] = Base64Encoder_bytes[this_1] + 1 if Base64Encoder_bytes[this_1] == 3 then set this_3 = this_1 set byte = Base64Encoder_buffer[this_1] set count = 3 if Base64Encoder_typeId[this_3] == 0 then if this_3 == 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_3, byte, count) set Base64Encoder_bytes[this_1] = 0 endif endfunction function Base64Encoder_writeData takes integer this_1, integer data_1 returns nothing local integer clVar local integer this_2 local integer c if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < 32768 then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_2 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_2] = 2066 else call error("Out of memory: Could not create ForForceCallback_execute_Base64Encoder_Base64.") set this_2 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_2 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_2] = 2066 endif set clVar = this_2 set data[clVar] = data_1 set this_481[clVar] = this_1 set c = clVar if not try(c) then call error("execute: thread has crashed. caused by:\n| - " + ErrorHandling_lastError) endif endfunction function ByteBuffer_selectByte takes integer n, integer byte returns integer local integer this_2 = n local integer amount = 8 * byte local integer num = this_2 local integer shift = amount local integer value = num local integer isNegative = 0 local integer this_1 local integer other if value < 0 then set value = -2147483648 + value set isNegative = 1 endif set this_1 = isNegative * BitwiseInit_powShift[31 - shift] + value / BitwiseInit_powShift[shift] set other = 255 return BlzBitAnd(this_1, other) endfunction function ByteBuffer_readByte takes integer this_1 returns integer local integer cond_result local integer byte 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 byte = ByteBuffer_selectByte(ByteBuffer_readBuffer[this_1], ByteBuffer_readBufferIndex[this_1]) set ByteBuffer_readBufferIndex[this_1] = ByteBuffer_readBufferIndex[this_1] + 1 return byte endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte takes integer this_1 returns boolean local boolean ByteBuffer_ByteBuffer_hasByte_result local integer this_2 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 set this_2 = this_1 set ByteBuffer_ByteBuffer_hasByte_result = ByteBuffer_readIndex[this_2] < ByteBuffer_intCount[this_2] or ByteBuffer_readBufferIndex[this_2] < ByteBuffer_bufferLength[this_2] return ByteBuffer_ByteBuffer_hasByte_result endfunction function run_execute_Base64Encoder_Base64 takes integer this_1 returns nothing local integer i = 0 local integer this_2 local integer n local integer this_3 local integer ByteBuffer_ByteBuffer_readByte_result loop exitwhen not (dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte(data[this_1]) and i < 1000) set this_2 = this_481[this_1] set this_3 = data[this_1] if ByteBuffer_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling ByteBuffer.readByte") else call error("Called ByteBuffer.readByte on invalid object.") endif endif set ByteBuffer_ByteBuffer_readByte_result = ByteBuffer_readByte(this_3) set n = ByteBuffer_ByteBuffer_readByte_result if Base64Encoder_typeId[this_2] == 0 then if this_2 == 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_2, n) set i = i + 1 endloop if dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte(data[this_1]) then call Base64Encoder_writeData(this_481[this_1], data[this_1]) endif endfunction function executeWhileInternal takes integer resetCount_1, integer condition_1, integer action_1 returns nothing local integer clVar local integer this_1 local integer c 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 set clVar = this_1 set condition[clVar] = condition_1 set resetCount[clVar] = resetCount_1 set action[clVar] = action_1 set c = clVar if not try(c) then call error("execute: thread has crashed. caused by:\n| - " + ErrorHandling_lastError) endif endfunction function run_execute_Execute takes integer this_1 returns nothing local integer i = 0 loop exitwhen not (false and i < resetCount[this_1]) set i = i + 1 endloop if false then call executeWhileInternal(resetCount[this_1], condition[this_1], action[this_1]) endif endfunction function dispatch_ForForceCallback_Execute_ForForceCallback_run takes integer this_1 returns nothing local integer this_2 local integer expected local integer this_3 local integer this_4 local integer this_5 local integer i local integer temp local string temp_1 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 set this_2 = ForceTests_testInt set expected = 0 if this_2 != expected then set this_3 = expected set temp_1 = "Expected <" + I2S(this_3) + ">, Actual <" set this_4 = this_2 call testFail(temp_1 + I2S(this_4) + ">") endif set ForceTests_testInt = 10 else set this_5 = this_1 set GroupUtils_numTotal = GroupUtils_numTotal + createNow[this_5] set i = 1 set temp = createNow[this_5] loop exitwhen i > temp call push(CreateGroup()) set i = i + 1 endloop endif endfunction function executeCurrentCallback takes nothing returns nothing local boolean value set ErrorHandling_lastError = "" call dispatch_ForForceCallback_Execute_ForForceCallback_run(Execute_tempCallbacks[Execute_tempCallbacksCount - 1]) set value = true set Execute_tempCallbacksSuccess[Execute_tempCallbacksCount - 1] = value 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 initPows takes nothing returns nothing local integer allPows local integer i local integer temp local integer i_1 local integer temp_1 local integer this_1 local integer other local integer this_2 local integer other_1 set BitSet_pows[0] = 1 set allPows = 1 set i = 1 set temp = 32 - 1 loop exitwhen i > temp set BitSet_pows[i] = BitSet_pows[i - 1] * 2 set this_1 = allPows set other = BitSet_pows[i] set allPows = BlzBitOr(this_1, other) set i = i + 1 endloop set i_1 = 0 set temp_1 = 32 - 1 loop exitwhen i_1 > temp_1 set this_2 = allPows set other_1 = BitSet_pows[i_1] call BlzBitXor(this_2, other_1) set i_1 = i_1 + 1 endloop endfunction function init_BitSet takes nothing returns boolean call initPows() return true endfunction function initBitwise takes nothing returns nothing local integer i16 = 0 local integer i256 = 0 local integer i local integer i256_1 local integer i16_1 local integer bit local integer pow loop exitwhen not (i256 < 256) set i = 0 loop exitwhen not (i < 16) set i256 = i256 + 1 set i = i + 1 endloop set i16 = i16 + 1 endloop set i256_1 = 0 loop exitwhen not (i256_1 < 256) set i16_1 = 0 loop exitwhen not (i16_1 < 16) set i256_1 = i256_1 + 1 set i16_1 = i16_1 + 1 endloop endloop set bit = 0 set pow = 1 loop exitwhen not (bit <= 32) set BitwiseInit_powShift[bit] = pow set pow = pow * 2 set bit = bit + 1 endloop 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 new_OrderStringFactory takes nothing returns integer local integer this_1 local integer this_2 if OrderStringFactory_firstFree == 0 then if OrderStringFactory_maxIndex < 32768 then set OrderStringFactory_maxIndex = OrderStringFactory_maxIndex + 1 set this_2 = OrderStringFactory_maxIndex else call error("Out of memory: Could not create OrderStringFactory.") set this_2 = 0 endif else set OrderStringFactory_firstFree = OrderStringFactory_firstFree - 1 set this_2 = OrderStringFactory_nextFree[OrderStringFactory_firstFree] endif set this_1 = this_2 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 new_HashMap takes nothing returns integer local integer this_1 local integer this_2 local integer this_3 local integer this_4 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this_2 = Table_maxIndex set Table_typeId[this_2] = 4108 else call error("Out of memory: Could not create HashMap.") set this_2 = 0 endif else set Table_firstFree = Table_firstFree - 1 set this_2 = Table_nextFree[Table_firstFree] set Table_typeId[this_2] = 4108 endif set this_1 = this_2 set this_3 = this_1 set this_4 = this_3 set HashMap_size[this_4] = 0 return this_1 endfunction function init_ClosureEvents takes nothing returns boolean local integer clVar local code func local trigger this_1 local boolexpr condition_1 local code func_1 local trigger this_2 local boolexpr condition_2 local integer this_3 local integer cb_1 local real timeToWait local integer cb_2 local timer this_4 local real timeToWait_1 local integer cb_3 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() set func = ref_function_code__onUnitIndex_ClosureEvents set this_1 = UnitIndexer_onIndexTrigger set condition_1 = Condition(func) call TriggerAddCondition(this_1, condition_1) set func_1 = ref_function_code__onUnitDeindex_ClosureEvents set this_2 = UnitIndexer_onDeindexTrigger set condition_2 = Condition(func_1) call TriggerAddCondition(this_2, condition_2) if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_3 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_3] = 1115 else call error("Out of memory: Could not create CallbackSingle_nullTimer_ClosureEvents.") set this_3 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_3 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_3] = 1115 endif set clVar = this_3 set cb_1 = clVar set timeToWait = 0. set cb_2 = cb_1 set this_4 = getTimer() set timeToWait_1 = timeToWait set cb_3 = cb_2 call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_3, this_4, timeToWait_1) return true endfunction function init_ClosureForGroups takes nothing returns boolean call CreateGroup() set ClosureForGroups_maxCount = 2147483647 call Filter(ref_function_code__Filter_ClosureForGroups) call Rect(0., 0., 0., 0.) return true endfunction function init_ClosureFrames takes nothing returns boolean local trigger receiver = CreateTrigger() local trigger this_1 = receiver local code actionFunc = ref_function_onEvent call TriggerAddAction(this_1, actionFunc) set ClosureFrames_FRAME_MAP = new_HashMap() return true endfunction function init_ClosureKeyPresses takes nothing returns boolean local trigger receiver = CreateTrigger() local trigger this_1 = receiver local code actionFunc = ref_function_onEvent_470 call TriggerAddAction(this_1, actionFunc) set ClosureKeyPresses_KEY_MAP = new_HashMap() return true endfunction function init_ClosureTimers takes nothing returns boolean set ClosureTimers_x = 200 return true endfunction function new_Table takes nothing returns integer local integer this_1 local integer this_2 if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this_2 = Table_maxIndex set Table_typeId[this_2] = 4107 else call error("Out of memory: Could not create Table.") set this_2 = 0 endif else set Table_firstFree = Table_firstFree - 1 set this_2 = Table_nextFree[Table_firstFree] set Table_typeId[this_2] = 4107 endif set this_1 = this_2 return this_1 endfunction function init_Colors takes nothing returns boolean local integer this_red local integer this_green local integer this_blue local integer this_alpha local integer number local integer firstpart local integer secondpart local integer number_1 local integer firstpart_1 local integer secondpart_1 local integer number_2 local integer firstpart_2 local integer number_3 local integer this_red_1 local integer this_green_1 local integer this_blue_1 local integer this_alpha_1 local integer number_4 local integer firstpart_3 local integer secondpart_2 local integer number_5 local integer firstpart_4 local integer secondpart_3 local integer number_6 local integer firstpart_5 local integer number_7 local integer this_red_2 local integer this_green_2 local integer this_blue_2 local integer this_alpha_2 local integer number_8 local integer firstpart_6 local integer secondpart_4 local integer number_9 local integer firstpart_7 local integer secondpart_5 local integer number_10 local integer firstpart_8 local integer number_11 local integer i local string this_1 local string temp local string temp_1 local string temp_2 local integer temp_3 local integer tuple_temp local integer tuple_temp_1 local integer tuple_temp_2 local integer tuple_temp_3 local integer tuple_temp_4 local integer tuple_temp_5 local integer tuple_temp_6 local integer tuple_temp_7 local integer tuple_temp_8 local integer tuple_temp_9 local integer tuple_temp_10 local integer tuple_temp_11 local integer tuple_temp_12 local integer tuple_temp_13 local integer tuple_temp_14 local integer tuple_temp_15 local integer tuple_temp_16 local integer tuple_temp_17 local integer tuple_temp_18 local integer tuple_temp_19 local integer tuple_temp_20 local integer tuple_temp_21 local integer tuple_temp_22 local integer tuple_temp_23 set Colors_hexs[0] = "0" set Colors_hexs[1] = "1" set Colors_hexs[2] = "2" set Colors_hexs[3] = "3" set Colors_hexs[4] = "4" set Colors_hexs[5] = "5" set Colors_hexs[6] = "6" set Colors_hexs[7] = "7" set Colors_hexs[8] = "8" set Colors_hexs[9] = "9" set Colors_hexs[10] = "A" set Colors_hexs[11] = "B" set Colors_hexs[12] = "C" set Colors_hexs[13] = "D" set Colors_hexs[14] = "E" set Colors_hexs[15] = "F" set Colors_decs = new_Table() set tuple_temp = 255 set tuple_temp_1 = 255 set tuple_temp_2 = 255 set tuple_temp_3 = 255 set Colors_COLOR_WHITE_red = tuple_temp set Colors_COLOR_WHITE_green = tuple_temp_1 set Colors_COLOR_WHITE_blue = tuple_temp_2 set Colors_COLOR_WHITE_alpha = tuple_temp_3 set tuple_temp_4 = 0 set tuple_temp_5 = 0 set tuple_temp_6 = 0 set tuple_temp_7 = 0 set Colors_COLOR_BLACK_red = tuple_temp_4 set Colors_COLOR_BLACK_green = tuple_temp_5 set Colors_COLOR_BLACK_blue = tuple_temp_6 set Colors_COLOR_BLACK_alpha = tuple_temp_7 set tuple_temp_8 = 255 set tuple_temp_9 = 204 set tuple_temp_10 = 0 set tuple_temp_11 = 255 set Colors_COLOR_GOLD_red = tuple_temp_8 set Colors_COLOR_GOLD_green = tuple_temp_9 set Colors_COLOR_GOLD_blue = tuple_temp_10 set Colors_COLOR_GOLD_alpha = tuple_temp_11 set tuple_temp_12 = Colors_COLOR_WHITE_red set tuple_temp_13 = Colors_COLOR_WHITE_green set tuple_temp_14 = Colors_COLOR_WHITE_blue set tuple_temp_15 = Colors_COLOR_WHITE_alpha set this_red = tuple_temp_12 set this_green = tuple_temp_13 set this_blue = tuple_temp_14 set this_alpha = tuple_temp_15 set number = this_alpha set firstpart = number / 16 set secondpart = number - firstpart * 16 set temp = "|c" + Colors_hexs[firstpart] + Colors_hexs[secondpart] set number_1 = this_red set firstpart_1 = number_1 / 16 set secondpart_1 = number_1 - firstpart_1 * 16 set number_2 = this_green set firstpart_2 = number_2 / 16 set number_3 = this_blue set tuple_temp_16 = Colors_COLOR_BLACK_red set tuple_temp_17 = Colors_COLOR_BLACK_green set tuple_temp_18 = Colors_COLOR_BLACK_blue set tuple_temp_19 = Colors_COLOR_BLACK_alpha set this_red_1 = tuple_temp_16 set this_green_1 = tuple_temp_17 set this_blue_1 = tuple_temp_18 set this_alpha_1 = tuple_temp_19 set number_4 = this_alpha_1 set firstpart_3 = number_4 / 16 set secondpart_2 = number_4 - firstpart_3 * 16 set temp_1 = "|c" + Colors_hexs[firstpart_3] + Colors_hexs[secondpart_2] set number_5 = this_red_1 set firstpart_4 = number_5 / 16 set secondpart_3 = number_5 - firstpart_4 * 16 set number_6 = this_green_1 set firstpart_5 = number_6 / 16 set number_7 = this_blue_1 set tuple_temp_20 = Colors_COLOR_GOLD_red set tuple_temp_21 = Colors_COLOR_GOLD_green set tuple_temp_22 = Colors_COLOR_GOLD_blue set tuple_temp_23 = Colors_COLOR_GOLD_alpha set this_red_2 = tuple_temp_20 set this_green_2 = tuple_temp_21 set this_blue_2 = tuple_temp_22 set this_alpha_2 = tuple_temp_23 set number_8 = this_alpha_2 set firstpart_6 = number_8 / 16 set secondpart_4 = number_8 - firstpart_6 * 16 set temp_2 = "|c" + Colors_hexs[firstpart_6] + Colors_hexs[secondpart_4] set number_9 = this_red_2 set firstpart_7 = number_9 / 16 set secondpart_5 = number_9 - firstpart_7 * 16 set number_10 = this_green_2 set firstpart_8 = number_10 / 16 set number_11 = this_blue_2 set i = 0 loop exitwhen i > 15 set temp_3 = Colors_decs set this_1 = Colors_hexs[i] call dispatch_Table_Table_Table_saveInt(temp_3, StringHash(this_1), i) set i = i + 1 endloop return true endfunction function init_DamageDetection takes nothing returns boolean local integer i local integer temp local trigger this_1 local boolexpr condition_1 local code c local trigger this_2 local boolexpr condition_2 local timer this_3 local real time local code timerCallBack 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 = 0 - 1 loop exitwhen i > temp set this_1 = DamageDetection_current set condition_1 = DamageDetection_func[i] call TriggerAddCondition(this_1, condition_1) set i = i + 1 endloop set c = ref_function_code__onEnter_DamageDetection set this_2 = OnUnitEnterLeave_eventTrigger set condition_2 = Filter(c) call TriggerAddCondition(this_2, condition_2) set this_3 = CreateTimer() set time = 600. set timerCallBack = ref_function_swap call TimerStart(this_3, time, true, timerCallBack) return true endfunction function init_DamageEvent takes nothing returns boolean local integer clVar local integer clVar_1 local playerunitevent temp local playerunitevent temp_1 local integer this_1 local integer this_2 local integer this_3 local integer this_4 local integer this_5 local eventid eventId local integer listener_1 local eventid this_6 local integer id_1 local handle this_7 local integer this_8 local integer this_9 local integer this_10 local eventid eventId_1 local integer listener_2 local eventid this_11 local integer id_2 local handle this_12 if DamageElement_firstFree == 0 then if DamageElement_maxIndex < 32768 then set DamageElement_maxIndex = DamageElement_maxIndex + 1 set this_2 = DamageElement_maxIndex else call error("Out of memory: Could not create DamageElement.") set this_2 = 0 endif else set DamageElement_firstFree = DamageElement_firstFree - 1 set this_2 = DamageElement_nextFree[DamageElement_firstFree] endif set this_1 = this_2 set DamageEvent_DAMAGE_ELEMENT_ATTACK = this_1 set DamageInstance_current = 0 set DamageEvent_nextDamageType = 4 set DamageEvent_nextDamageElement = 0 set temp = EVENT_PLAYER_UNIT_DAMAGING if EventListener_firstFree == 0 then if EventListener_maxIndex < 32768 then set EventListener_maxIndex = EventListener_maxIndex + 1 set this_3 = EventListener_maxIndex set EventListener_typeId[this_3] = 1920 else call error("Out of memory: Could not create EventListener_add_DamageEvent.") set this_3 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_3 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_3] = 1920 endif set clVar = this_3 set this_4 = clVar set this_5 = this_4 set EventListener_eventId[this_5] = 0 set EventListener_uid[this_5] = -1 set EventListener_next[this_5] = 0 set EventListener_prev[this_5] = 0 set eventId = temp set listener_1 = clVar set this_6 = eventId set this_7 = this_6 set id_1 = ClosureEvents_eventidToIndex[GetHandleId(this_7)] if id_1 == 0 then set id_1 = registerEventId(this_6) endif set EventListener_eventId[listener_1] = id_1 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 set temp_1 = EVENT_PLAYER_UNIT_DAMAGED if EventListener_firstFree == 0 then if EventListener_maxIndex < 32768 then set EventListener_maxIndex = EventListener_maxIndex + 1 set this_8 = EventListener_maxIndex set EventListener_typeId[this_8] = 1921 else call error("Out of memory: Could not create EventListener_add_DamageEvent.") set this_8 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_8 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_8] = 1921 endif set clVar_1 = this_8 set this_9 = clVar_1 set this_10 = this_9 set EventListener_eventId[this_10] = 0 set EventListener_uid[this_10] = -1 set EventListener_next[this_10] = 0 set EventListener_prev[this_10] = 0 set eventId_1 = temp_1 set listener_2 = clVar_1 set this_11 = eventId_1 set this_12 = this_11 set id_2 = ClosureEvents_eventidToIndex[GetHandleId(this_12)] if id_2 == 0 then set id_2 = registerEventId(this_11) endif set EventListener_eventId[listener_2] = id_2 if EventListener_generalListenersFirsts[EventListener_eventId[listener_2]] != 0 then set EventListener_prev[EventListener_generalListenersFirsts[EventListener_eventId[listener_2]]] = listener_2 set EventListener_next[listener_2] = EventListener_generalListenersFirsts[EventListener_eventId[listener_2]] endif set EventListener_generalListenersFirsts[EventListener_eventId[listener_2]] = listener_2 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 createDummy takes real pos_x_1, real pos_y_1, real facing_radians returns unit local player p = Basics_DUMMY_PLAYER local integer unitId = 2016423985 local real tuple_temp = pos_x_1 local real tuple_temp_1 = pos_y_1 local real pos_x_2 = tuple_temp local real pos_y_2 = tuple_temp_1 local real tuple_temp_2 = facing_radians local real facing_radians_1 = tuple_temp_2 local player temp = p local integer temp_1 = unitId local real temp_2 = pos_x_2 local real temp_3 = pos_y_2 local real tuple_temp_3 = facing_radians_1 local real this_radians = tuple_temp_3 local unit u_1 = CreateUnit(temp, temp_1, temp_2, temp_3, this_radians * 57.295779513) local unit receiver = u_1 local unit this_1 = receiver local integer abil = 1097691750 local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 local unit this_2 local integer abil_1 local unit this_3 local integer abil_2 local unit this_4 local integer abil_3 local unit this_5 local real pos_x_3 local real pos_y_3 local unit receiver_6 local unit receiver_7 local unit this_6 local real x local unit this_7 local real y local unit this_8 local real a_radians local real this_radians_1 local unit temp_4 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 call UnitAddAbility(this_1, abil) set receiver_1 = receiver set this_2 = receiver_1 set abil_1 = 1097691750 call UnitRemoveAbility(this_2, abil_1) set receiver_2 = receiver_1 set this_3 = receiver_2 set abil_2 = 1095577649 call UnitAddAbility(this_3, abil_2) set receiver_3 = receiver_2 set this_4 = receiver_3 set abil_3 = 1095577649 call UnitRemoveAbility(this_4, abil_3) set receiver_4 = receiver_3 set this_5 = receiver_4 set tuple_temp_4 = pos_x_1 set tuple_temp_5 = pos_y_1 set pos_x_3 = tuple_temp_4 set pos_y_3 = tuple_temp_5 set receiver_6 = this_5 set this_6 = receiver_6 set x = pos_x_3 call SetUnitX(this_6, x) set receiver_7 = receiver_6 set this_7 = receiver_7 set y = pos_y_3 call SetUnitY(this_7, y) set receiver_5 = receiver_4 set this_8 = receiver_5 set tuple_temp_6 = facing_radians set a_radians = tuple_temp_6 set temp_4 = this_8 set tuple_temp_7 = a_radians set this_radians_1 = tuple_temp_7 call SetUnitFacing(temp_4, this_radians_1 * 57.295779513) return u_1 endfunction function new_LinkedList takes nothing returns integer local integer this_1 local integer this_2 local integer this_3 local integer this_4 if LinkedList_firstFree == 0 then if LinkedList_maxIndex < 32768 then set LinkedList_maxIndex = LinkedList_maxIndex + 1 set this_2 = LinkedList_maxIndex set LinkedList_typeId[this_2] = 2757 else call error("Out of memory: Could not create LinkedList.") set this_2 = 0 endif else set LinkedList_firstFree = LinkedList_firstFree - 1 set this_2 = LinkedList_nextFree[LinkedList_firstFree] set LinkedList_typeId[this_2] = 2757 endif set this_1 = this_2 set this_3 = this_1 set this_4 = this_3 set LinkedList_dummy[this_4] = new_LLEntry(0, 0, 0) set LinkedList_size[this_4] = 0 set LLEntry_next[LinkedList_dummy[this_3]] = LinkedList_dummy[this_3] set LLEntry_prev[LinkedList_dummy[this_3]] = LinkedList_dummy[this_3] return this_1 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 local real r local real this_1 local real this_x local real this_y local real v_x local real v_y local integer this_2 local integer elem local integer this_3 local integer elem_1 local unit object local handle this_4 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 set DummyRecycler_ANGLE_DEGREE = 360 * 1. / 8 set r = 1. set this_1 = r * 1000. call R2I(this_1) set i = 0 set temp = 8 - 1 loop exitwhen i > temp set DummyRecycler_angleQueues[i] = new_LinkedList() set tuple_temp = i * DummyRecycler_ANGLE_DEGREE set facing_radians = tuple_temp set j = 0 set temp_1 = 6 - 1 loop exitwhen j > temp_1 set tuple_temp_1 = MapBounds_boundMax_x set tuple_temp_2 = MapBounds_boundMax_y set this_x = tuple_temp_1 set this_y = tuple_temp_2 set tuple_temp_3 = 16. set tuple_temp_4 = 16. set v_x = tuple_temp_3 set v_y = tuple_temp_4 set dummy_1 = createDummy(this_x - v_x, this_y - v_y, facing_radians) set this_2 = DummyRecycler_angleQueues[i] set object = dummy_1 set this_4 = object set elem = GetHandleId(this_4) if LinkedList_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling LinkedList.enqueue") else call error("Called LinkedList.enqueue on invalid object.") endif endif set this_3 = this_2 set elem_1 = elem call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_3, elem_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 init_Execute takes nothing returns boolean local force this_1 local player whichPlayer set Execute_executeForce = CreateForce() set this_1 = Execute_executeForce set whichPlayer = Player_localPlayer call ForceAddPlayer(this_1, whichPlayer) return true endfunction function ChunkedString_getUnsafeString takes integer this_1 returns string local string out = "" local integer i = 0 local integer this_2 = this_1 local integer temp local integer ChunkedString_ChunkedString_getChunkCount_result local integer this_3 local integer this_4 local integer index local string ChunkedString_ChunkedString_getChunk_result local string temp_1 if ChunkedString_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunkCount") else call error("Called ChunkedString.getChunkCount on invalid object.") endif endif set this_3 = this_2 set ChunkedString_ChunkedString_getChunkCount_result = ChunkedString_chunkCount[this_3] + 1 set temp = ChunkedString_ChunkedString_getChunkCount_result loop exitwhen i > temp set temp_1 = out set this_4 = this_1 set index = i if ChunkedString_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunk") else call error("Called ChunkedString.getChunk on invalid object.") endif endif set ChunkedString_ChunkedString_getChunk_result = ChunkedString_getChunk(this_4, index) set out = temp_1 + ChunkedString_ChunkedString_getChunk_result set i = i + 1 endloop return out endfunction function File_readPreload takes integer this_1, integer output returns nothing local integer i local integer temp local string chunk local integer this_2 local string pdata call Preloader(File_filename[this_1]) set i = 0 set temp = 64 - 1 loop exitwhen i > temp set chunk = BlzGetAbilityTooltip(611808108, i) if chunk == " " then exitwhen true endif call BlzSetAbilityTooltip(611808108, " ", i) set this_2 = output set pdata = chunk if ChunkedString_typeId[this_2] == 0 then if this_2 == 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_2, pdata) set i = i + 1 endloop endfunction function new_ChunkedString_421 takes integer chunkSize returns integer local integer this_1 local integer this_2 local integer this_3 local integer chunkSize_1 local integer this_4 if ChunkedString_firstFree == 0 then if ChunkedString_maxIndex < 32768 then set ChunkedString_maxIndex = ChunkedString_maxIndex + 1 set this_2 = ChunkedString_maxIndex set ChunkedString_typeId[this_2] = 1208 else call error("Out of memory: Could not create ChunkedString.") set this_2 = 0 endif else set ChunkedString_firstFree = ChunkedString_firstFree - 1 set this_2 = ChunkedString_nextFree[ChunkedString_firstFree] set ChunkedString_typeId[this_2] = 1208 endif set this_1 = this_2 set this_3 = this_1 set chunkSize_1 = chunkSize set this_4 = this_3 set ChunkedString_table[this_4] = new_Table() set ChunkedString_chunkSize[this_4] = 200 set ChunkedString_chunkCount[this_4] = 0 set ChunkedString_readIndex[this_4] = -1 set ChunkedString_buffer[this_4] = "" set ChunkedString_chunkSize[this_3] = chunkSize_1 return this_1 endfunction function File_read takes integer this_1, player p returns integer local integer out = new_ChunkedString_421(200) local integer this_2 local integer output if Player_localPlayer == p then set this_2 = this_1 set output = out if File_typeId[this_2] == 0 then if this_2 == 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_2, output) endif return out endfunction function File_readAsString takes integer this_1, player p returns string local integer this_2 = this_1 local player p_1 = p local integer out local string str local integer FileIO_File_read_result local integer this_3 local string ChunkedString_ChunkedString_getUnsafeString_result if File_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling File.read") else call error("Called File.read on invalid object.") endif endif set FileIO_File_read_result = File_read(this_2, p_1) set out = FileIO_File_read_result set this_3 = out if ChunkedString_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling ChunkedString.getUnsafeString") else call error("Called ChunkedString.getUnsafeString on invalid object.") endif endif set ChunkedString_ChunkedString_getUnsafeString_result = ChunkedString_getUnsafeString(this_3) set str = ChunkedString_ChunkedString_getUnsafeString_result call dispatch_ChunkedString_destroyChunkedString(out) return str endfunction function StringIterator_next takes integer this_1 returns string local string this_2 = StringIterator_s[this_1] local integer start = StringIterator_currentpos[this_1] local integer stop = StringIterator_currentpos[this_1] + 1 local string wval = SubString(this_2, start, stop) local string this_3 local string this_4 local integer start_1 local integer stop_1 local boolean andLeft if false then set this_3 = wval set andLeft = StringHash(this_3) == 1843378377 else set andLeft = false endif if andLeft then set this_4 = StringIterator_s[this_1] set start_1 = StringIterator_currentpos[this_1] set stop_1 = StringIterator_currentpos[this_1] + 2 set wval = SubString(this_4, start_1, stop_1) set StringIterator_currentpos[this_1] = StringIterator_currentpos[this_1] + 2 else set StringIterator_currentpos[this_1] = StringIterator_currentpos[this_1] + 1 endif return wval endfunction function dispatch_StringIterator_destroyStringIterator takes integer this_1 returns nothing local integer this_2 local integer obj 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 set this_2 = this_1 set obj = this_2 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 string_iterator takes string this_1 returns integer local string s = this_1 local integer currentpos = 0 local string this_5 = this_1 local integer stringLen = StringLength(this_5) local integer this_2 local integer this_3 local integer this_4 local string s_1 local integer currentpos_1 local integer stringLen_1 if StringIterator_firstFree == 0 then if StringIterator_maxIndex < 32768 then set StringIterator_maxIndex = StringIterator_maxIndex + 1 set this_3 = StringIterator_maxIndex set StringIterator_typeId[this_3] = 4075 else call error("Out of memory: Could not create StringIterator.") set this_3 = 0 endif else set StringIterator_firstFree = StringIterator_firstFree - 1 set this_3 = StringIterator_nextFree[StringIterator_firstFree] set StringIterator_typeId[this_3] = 4075 endif set this_2 = this_3 set this_4 = this_2 set s_1 = s set currentpos_1 = currentpos set stringLen_1 = stringLen set StringIterator_s[this_4] = s_1 set StringIterator_currentpos[this_4] = currentpos_1 set StringIterator_stringLen[this_4] = stringLen_1 return this_2 endfunction function File_validateInput takes string content returns string local integer iterator = string_iterator(content) local string char_1 local integer this_1 local integer this_2 local integer this_3 local integer this_4 loop set this_1 = iterator exitwhen not (StringIterator_currentpos[this_1] < StringIterator_stringLen[this_1]) set char_1 = StringIterator_next(iterator) if char_1 == "\\" then set this_2 = iterator call dispatch_StringIterator_destroyStringIterator(this_2) return char_1 elseif char_1 == "\"" then set this_3 = iterator call dispatch_StringIterator_destroyStringIterator(this_3) return char_1 endif endloop set this_4 = iterator call dispatch_StringIterator_destroyStringIterator(this_4) return null endfunction function File_writePreload takes integer this_1, player p, integer buffer returns nothing local integer i local integer temp local string chunk local integer this_2 local integer ChunkedString_ChunkedString_getChunkCount_result local integer this_3 local integer this_4 local integer this_5 local integer ChunkedString_ChunkedString_getChunkCount_result_1 local integer this_6 local integer this_7 local integer index local string ChunkedString_ChunkedString_getChunk_result local integer this_8 local string temp_1 local string temp_2 if Player_localPlayer == p then call PreloadGenClear() call PreloadGenStart() set this_2 = buffer if ChunkedString_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunkCount") else call error("Called ChunkedString.getChunkCount on invalid object.") endif endif set this_3 = this_2 set ChunkedString_ChunkedString_getChunkCount_result = ChunkedString_chunkCount[this_3] + 1 if ChunkedString_ChunkedString_getChunkCount_result >= 64 then set temp_1 = "FileIO(" + File_filename[this_1] + ") ERROR: String's chunk count exceeds the limit (" set this_4 = 64 call error(temp_1 + I2S(this_4) + ").|r") endif set i = 0 set this_5 = buffer if ChunkedString_typeId[this_5] == 0 then if this_5 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunkCount") else call error("Called ChunkedString.getChunkCount on invalid object.") endif endif set this_6 = this_5 set ChunkedString_ChunkedString_getChunkCount_result_1 = ChunkedString_chunkCount[this_6] + 1 set temp = ChunkedString_ChunkedString_getChunkCount_result_1 - 1 loop exitwhen i > temp set this_7 = buffer set index = i if ChunkedString_typeId[this_7] == 0 then if this_7 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunk") else call error("Called ChunkedString.getChunk on invalid object.") endif endif set ChunkedString_ChunkedString_getChunk_result = ChunkedString_getChunk(this_7, index) set chunk = ChunkedString_ChunkedString_getChunk_result set temp_2 = "\" )\ncall BlzSetAbilityTooltip('" + FileIO_FILE_IO_ABIL_ID_STR + "', \"" + chunk + "\", " set this_8 = i call Preload(temp_2 + I2S(this_8) + ")\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 File_write_83 takes integer this_1, player p, integer buffer returns nothing local integer i local integer temp local string str local integer this_2 local integer ChunkedString_ChunkedString_getChunkCount_result local integer this_3 local integer this_4 local integer index local string ChunkedString_ChunkedString_getChunk_result local integer this_5 local player p_1 local integer buffer_1 if true then set i = 0 set this_2 = buffer if ChunkedString_typeId[this_2] == 0 then if this_2 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunkCount") else call error("Called ChunkedString.getChunkCount on invalid object.") endif endif set this_3 = this_2 set ChunkedString_ChunkedString_getChunkCount_result = ChunkedString_chunkCount[this_3] + 1 set temp = ChunkedString_ChunkedString_getChunkCount_result - 1 loop exitwhen i > temp set this_4 = buffer set index = i if ChunkedString_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunk") else call error("Called ChunkedString.getChunk on invalid object.") endif endif set ChunkedString_ChunkedString_getChunk_result = ChunkedString_getChunk(this_4, index) set str = ChunkedString_ChunkedString_getChunk_result 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 endif set this_5 = this_1 set p_1 = p set buffer_1 = buffer if File_typeId[this_5] == 0 then if this_5 == 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_5, p_1, buffer_1) endfunction function new_ChunkedString takes nothing returns integer local integer this_1 local integer this_2 local integer this_3 local integer this_4 if ChunkedString_firstFree == 0 then if ChunkedString_maxIndex < 32768 then set ChunkedString_maxIndex = ChunkedString_maxIndex + 1 set this_2 = ChunkedString_maxIndex set ChunkedString_typeId[this_2] = 1208 else call error("Out of memory: Could not create ChunkedString.") set this_2 = 0 endif else set ChunkedString_firstFree = ChunkedString_firstFree - 1 set this_2 = ChunkedString_nextFree[ChunkedString_firstFree] set ChunkedString_typeId[this_2] = 1208 endif set this_1 = this_2 set this_3 = this_1 set this_4 = this_3 set ChunkedString_table[this_4] = new_Table() set ChunkedString_chunkSize[this_4] = 200 set ChunkedString_chunkCount[this_4] = 0 set ChunkedString_readIndex[this_4] = -1 set ChunkedString_buffer[this_4] = "" return this_1 endfunction function File_write takes integer this_1, player p, string content returns nothing local integer buffer = new_ChunkedString() local integer this_2 = buffer local string pdata = content local integer this_3 local player p_1 local integer buffer_1 if ChunkedString_typeId[this_2] == 0 then if this_2 == 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_2, pdata) set this_3 = this_1 set p_1 = p set buffer_1 = buffer if File_typeId[this_3] == 0 then if this_3 == 0 then call error("Nullpointer exception when calling File.write") else call error("Called File.write on invalid object.") endif endif call File_write_83(this_3, p_1, buffer_1) call dispatch_ChunkedString_destroyChunkedString(buffer) endfunction function init_FileIO takes nothing returns boolean local integer this_1 = 611808108 local integer value = this_1 local string result_1 = "" local integer remainingValue = value local integer byteno = 0 local integer receiver local integer charValue local string this_2 local integer index local string filename local integer this_3 local integer this_4 local integer this_5 local string filename_1 local integer this_6 local integer this_7 local player p local string content local integer this_8 local player p_1 loop exitwhen byteno > 3 set charValue = ModuloInteger(remainingValue, 256) set remainingValue = remainingValue / 256 set this_2 = ".................................!.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................." set index = charValue set result_1 = SubString(this_2, index, index + 1) + result_1 set byteno = byteno + 1 endloop set FileIO_FILE_IO_ABIL_ID_STR = result_1 set filename = "FileTester.pld" if File_firstFree == 0 then if File_maxIndex < 32768 then set File_maxIndex = File_maxIndex + 1 set this_4 = File_maxIndex set File_typeId[this_4] = 2013 else call error("Out of memory: Could not create File.") set this_4 = 0 endif else set File_firstFree = File_firstFree - 1 set this_4 = File_nextFree[File_firstFree] set File_typeId[this_4] = 2013 endif set this_3 = this_4 set this_5 = this_3 set filename_1 = filename set this_6 = this_5 set File_filename[this_6] = "" set File_filename[this_5] = filename_1 set receiver = this_3 set this_7 = receiver set p = Player_localPlayer set content = "test" if File_typeId[this_7] == 0 then if this_7 == 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_7, p, content) set this_8 = receiver set p_1 = Player_localPlayer if File_typeId[this_8] == 0 then if this_8 == 0 then call error("Nullpointer exception when calling File.readAsString") else call error("Called File.readAsString on invalid object.") endif endif call File_readAsString(this_8, p_1) return true endfunction function init_ForceTests takes nothing returns boolean return true endfunction function verifyFrameNameLength takes string name returns boolean local string this_1 = name local integer this_2 if StringLength(this_1) > 560 then set this_2 = 560 call error("Trying to address frame with exceeding maximum frame name length (" + I2S(this_2) + ") for: " + name) return false endif return true endfunction function init_Framehandle takes nothing returns boolean local framehandle receiver local string typeName local string name local framehandle owner local string inherits local integer createContext local framehandle this_1 local real width local real height set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) call BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0) set typeName = "FRAME" set name = "SetMousePositionCage" set owner = Framehandle_GAME_UI set inherits = null set createContext = 0 call verifyFrameNameLength(name) set receiver = BlzCreateFrameByType(typeName, name, owner, inherits, createContext) set this_1 = receiver set width = 0.0001 set height = 0.0001 call BlzFrameSetSize(this_1, width, height) return true endfunction function init_FramehandleNames takes nothing returns boolean return true endfunction function init_GameStatus takes nothing returns boolean local player firstPlayer local unit u_1 local boolean selected local player this_1 local player this_2 local player this_3 local player this_4 local boolean andLeft set GameStatus_gameStatus = 0 set firstPlayer = Player(0) loop set this_1 = firstPlayer set this_2 = this_1 if GetPlayerSlotState(this_2) == PLAYER_SLOT_STATE_PLAYING then set this_3 = this_1 set andLeft = GetPlayerController(this_3) == MAP_CONTROL_USER else set andLeft = false endif exitwhen not not andLeft set this_4 = firstPlayer set firstPlayer = Player(GetPlayerId(this_4) + 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 local timer receiver = CreateTimer() local timer this_1 = receiver local real time = 100000. local code timerCallBack = null local timer this_2 local real time_1 local code timerCallBack_1 call TimerStart(this_1, time, false, timerCallBack) set this_2 = CreateTimer() set time_1 = 0.030 set timerCallBack_1 = ref_function_code__startPeriodic_GameTimer call TimerStart(this_2, time_1, true, timerCallBack_1) return true endfunction function init_Group takes nothing returns boolean set Group_ENUM_GROUP = CreateGroup() return true endfunction function createGroups takes integer number returns nothing local integer maxCreatePerCycle = 256 local integer numbers_0 = JASS_MAX_ARRAY_SIZE - 1 local integer numbers_1 = 1024 local integer maxNumber = -2147483648 local integer actualLimit local integer numTarget local integer overflow local integer toCreate local integer createNow_1 local integer clVar local integer cond_result local integer numbers_0_1 local integer numbers_1_1 local integer maxNumber_1 local integer cond_result_1 local integer numbers_0_2 local integer numbers_1_2 local integer maxNumber_2 local integer cond_result_2 local integer numbers_0_3 local integer numbers_1_3 local integer minNumber local integer cond_result_3 local integer this_1 local integer c local string msg local player showTo local integer loglvl local string msg_1 local string compositeMsg local integer this_2 if numbers_0 > maxNumber then set cond_result = numbers_0 else set cond_result = maxNumber endif set maxNumber = cond_result if numbers_1 > maxNumber then set cond_result = numbers_1 else set cond_result = maxNumber endif set maxNumber = cond_result set actualLimit = maxNumber set numTarget = GroupUtils_numTotal + number set numbers_0_1 = 0 set numbers_1_1 = numTarget - actualLimit set maxNumber_1 = -2147483648 if numbers_0_1 > maxNumber_1 then set cond_result_1 = numbers_0_1 else set cond_result_1 = maxNumber_1 endif set maxNumber_1 = cond_result_1 if numbers_1_1 > maxNumber_1 then set cond_result_1 = numbers_1_1 else set cond_result_1 = maxNumber_1 endif set maxNumber_1 = cond_result_1 set overflow = maxNumber_1 set numbers_0_2 = 0 set numbers_1_2 = numTarget - overflow set maxNumber_2 = -2147483648 if numbers_0_2 > maxNumber_2 then set cond_result_2 = numbers_0_2 else set cond_result_2 = maxNumber_2 endif set maxNumber_2 = cond_result_2 if numbers_1_2 > maxNumber_2 then set cond_result_2 = numbers_1_2 else set cond_result_2 = maxNumber_2 endif set maxNumber_2 = cond_result_2 set toCreate = maxNumber_2 loop exitwhen not (toCreate > 0) set numbers_0_3 = toCreate set numbers_1_3 = maxCreatePerCycle set minNumber = 2147483647 if numbers_0_3 < minNumber then set cond_result_3 = numbers_0_3 else set cond_result_3 = minNumber endif set minNumber = cond_result_3 if numbers_1_3 < minNumber then set cond_result_3 = numbers_1_3 else set cond_result_3 = minNumber endif set minNumber = cond_result_3 set createNow_1 = minNumber set toCreate = toCreate - createNow_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 set clVar = this_1 set createNow[clVar] = createNow_1 set c = clVar if not try(c) then call error("execute: thread has crashed. caused by:\n| - " + ErrorHandling_lastError) endif endloop if GroupUtils_numTotal >= 1024 and ( not GroupUtils_shownMaxError) then set this_2 = 1024 set msg = "Maximum number of GroupUtils groups (" + I2S(this_2) + ") created. " + "All newly created groups will be non-recyclable." set showTo = Player_localPlayer set loglvl = 3 set msg_1 = msg if 2 <= loglvl then set compositeMsg = Loglevel_getTag(loglvl) + " - " + msg_1 call DisplayTimedTextToPlayer(showTo, 0., 0., 45., compositeMsg) endif set GroupUtils_shownMaxError = true endif endfunction function init_GroupUtils takes nothing returns boolean set GroupUtils_used = new_HashMap() call createGroups(64) 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 init_InstantDummyCaster takes nothing returns boolean local player p = Basics_DUMMY_PLAYER local integer unitId = 2016423986 local real tuple_temp = MapBounds_boundMax_x local real tuple_temp_1 = MapBounds_boundMax_y local real pos_x_1 = tuple_temp local real pos_y_1 = tuple_temp_1 local real tuple_temp_2 = 0. local real facing_radians = tuple_temp_2 local player temp = p local integer temp_1 = unitId local real temp_2 = pos_x_1 local real temp_3 = pos_y_1 local real tuple_temp_3 = facing_radians local real this_radians = tuple_temp_3 local unit receiver = CreateUnit(temp, temp_1, temp_2, temp_3, this_radians * 57.295779513) local unit this_1 = receiver local boolean value = false local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit this_2 local integer abil local unit this_3 local integer abil_1 local unit this_4 local integer abil_2 local unit this_5 local integer abil_3 call SetUnitPathing(this_1, value) set receiver_1 = receiver set this_2 = receiver_1 set abil = 1097691750 call UnitAddAbility(this_2, abil) set receiver_2 = receiver_1 set this_3 = receiver_2 set abil_1 = 1097691750 call UnitRemoveAbility(this_3, abil_1) set receiver_3 = receiver_2 set this_4 = receiver_3 set abil_2 = 1095577651 call UnitAddAbility(this_4, abil_2) set receiver_4 = receiver_3 set this_5 = receiver_4 set abil_3 = 1095577651 call UnitRemoveAbility(this_5, abil_3) return true endfunction function init_Integer takes nothing returns boolean return true endfunction function init_ItemIds takes nothing returns boolean return true endfunction function init_Knockback3 takes nothing returns boolean local integer this_1 local integer this_2 if TerrainZProvider_firstFree == 0 then if TerrainZProvider_maxIndex < 32768 then set TerrainZProvider_maxIndex = TerrainZProvider_maxIndex + 1 else call error("Out of memory: Could not create TerrainZProvider_Knockback3.") endif else set TerrainZProvider_firstFree = TerrainZProvider_firstFree - 1 endif if WallHitTransform_firstFree == 0 then if WallHitTransform_maxIndex < 32768 then set WallHitTransform_maxIndex = WallHitTransform_maxIndex + 1 else call error("Out of memory: Could not create WallHitTransform_Knockback3.") endif else set WallHitTransform_firstFree = WallHitTransform_firstFree - 1 endif if UnitFilter_firstFree == 0 then if UnitFilter_maxIndex < 32768 then set UnitFilter_maxIndex = UnitFilter_maxIndex + 1 else call error("Out of memory: Could not create UnitFilter_Knockback3.") endif else set UnitFilter_firstFree = UnitFilter_firstFree - 1 endif 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 if BackIterator_firstFree == 0 then if BackIterator_maxIndex < 32768 then set BackIterator_maxIndex = BackIterator_maxIndex + 1 set this_2 = BackIterator_maxIndex else call error("Out of memory: Could not create BackIterator.") set this_2 = 0 endif else set BackIterator_firstFree = BackIterator_firstFree - 1 set this_2 = BackIterator_nextFree[BackIterator_firstFree] endif call Rect( - (1. * 130.), - (1. * 130.), 130., 130.) call new_HashMap() call CreateTimer() return true endfunction function init_LastOrder takes nothing returns boolean local playerunitevent p = EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER local code filter = null local code c = ref_function_actions local playerunitevent p_1 local code filter_1 local code c_1 local playerunitevent p_2 local code filter_2 local code c_2 local playerunitevent p_3 local code filter_3 local code c_3 local code func local trigger this_1 local boolexpr condition_1 call registerPlayerUnitEvent(p, filter, c, null) set p_1 = EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER set filter_1 = null set c_1 = ref_function_actions call registerPlayerUnitEvent(p_1, filter_1, c_1, null) set p_2 = EVENT_PLAYER_UNIT_ISSUED_ORDER set filter_2 = null set c_2 = ref_function_actions call registerPlayerUnitEvent(p_2, filter_2, c_2, null) set p_3 = EVENT_PLAYER_UNIT_SPELL_EFFECT set filter_3 = null set c_3 = ref_function_spellActions call registerPlayerUnitEvent(p_3, filter_3, c_3, null) set func = ref_function_code__onUnitDeindex_LastOrder set this_1 = UnitIndexer_onDeindexTrigger set condition_1 = Condition(func) call TriggerAddCondition(this_1, condition_1) return true endfunction function init_Lightning takes nothing returns boolean return true endfunction function init_LinkedList takes nothing returns boolean local real r local real this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 else call error("Out of memory: Could not create Comparator_LinkedList.") endif else set Comparator_firstFree = Comparator_firstFree - 1 endif if Comparator_firstFree == 0 then if Comparator_maxIndex < 32768 then set Comparator_maxIndex = Comparator_maxIndex + 1 else call error("Out of memory: Could not create Comparator_LinkedList.") endif else set Comparator_firstFree = Comparator_firstFree - 1 endif set r = 0. set this_1 = r * 1000. call R2I(this_1) return true endfunction function init_LinkedListModuleTests takes nothing returns boolean local integer this_1 local integer this_2 if Iterator_firstFree_194 == 0 then if Iterator_maxIndex_196 < 32768 then set Iterator_maxIndex_196 = Iterator_maxIndex_196 + 1 set this_1 = Iterator_maxIndex_196 else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree_194 = Iterator_firstFree_194 - 1 set this_1 = Iterator_nextFree_198[Iterator_firstFree_194] endif if BackIterator_firstFree_3 == 0 then if BackIterator_maxIndex_5 < 32768 then set BackIterator_maxIndex_5 = BackIterator_maxIndex_5 + 1 set this_2 = BackIterator_maxIndex_5 else call error("Out of memory: Could not create BackIterator.") set this_2 = 0 endif else set BackIterator_firstFree_3 = BackIterator_firstFree_3 - 1 set this_2 = BackIterator_nextFree_7[BackIterator_firstFree_3] endif return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true endfunction function initMapBounds takes nothing returns nothing local rect cond_result local region receiver local rect cond_result_1 local region receiver_1 local region this_1 local rect rct local region this_2 local rect rct_1 local rect this_3 local rect this_4 local rect this_5 local rect this_6 local rect this_7 local rect this_8 local rect this_9 local rect this_10 local real this_x local real this_y local real v_x local real v_y local real this_x_1 local real this_y_1 local real v_x_1 local real v_y_1 local real temp local real temp_1 local real temp_2 local real temp_3 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 local real tuple_temp_8 local real tuple_temp_9 local real tuple_temp_10 local real tuple_temp_11 local real tuple_temp_12 local real tuple_temp_13 local real tuple_temp_14 local real tuple_temp_15 if MagicFunctions_compiletime then set cond_result = Rect(-1024., -1024., 1024., 1024.) else set cond_result = bj_mapInitialPlayableArea endif set MapBounds_playableMapRect = cond_result set receiver = CreateRegion() set this_1 = receiver set rct = MapBounds_playableMapRect call RegionAddRect(this_1, rct) if MagicFunctions_compiletime then set cond_result_1 = Rect(-1536., -1536., 1536., 1536.) else set cond_result_1 = GetWorldBounds() endif set MapBounds_boundRect = cond_result_1 set receiver_1 = CreateRegion() set this_2 = receiver_1 set rct_1 = MapBounds_boundRect call RegionAddRect(this_2, rct_1) set MapBounds_boundRegion = receiver_1 set this_3 = MapBounds_playableMapRect set temp = GetRectMinX(this_3) set this_4 = MapBounds_playableMapRect set tuple_temp = temp set tuple_temp_1 = GetRectMinY(this_4) set MapBounds_playableMin_x = tuple_temp set MapBounds_playableMin_y = tuple_temp_1 set this_5 = MapBounds_playableMapRect set temp_1 = GetRectMaxX(this_5) set this_6 = MapBounds_playableMapRect set tuple_temp_2 = temp_1 set tuple_temp_3 = GetRectMaxY(this_6) set MapBounds_playableMax_x = tuple_temp_2 set MapBounds_playableMax_y = tuple_temp_3 set this_7 = MapBounds_boundRect set temp_2 = GetRectMinX(this_7) set this_8 = MapBounds_boundRect set tuple_temp_4 = temp_2 set tuple_temp_5 = GetRectMinY(this_8) set MapBounds_boundMin_x = tuple_temp_4 set MapBounds_boundMin_y = tuple_temp_5 set this_9 = MapBounds_boundRect set temp_3 = GetRectMaxX(this_9) set this_10 = MapBounds_boundRect set tuple_temp_6 = temp_3 set tuple_temp_7 = GetRectMaxY(this_10) set MapBounds_boundMax_x = tuple_temp_6 set MapBounds_boundMax_y = tuple_temp_7 set tuple_temp_8 = MapBounds_playableMin_x set tuple_temp_9 = MapBounds_playableMin_y set this_x = tuple_temp_8 set this_y = tuple_temp_9 set tuple_temp_10 = MapBounds_playableMax_x set tuple_temp_11 = MapBounds_playableMax_y set v_x = tuple_temp_10 set v_y = tuple_temp_11 set tuple_temp_12 = MapBounds_boundMin_x set tuple_temp_13 = MapBounds_boundMin_y set this_x_1 = tuple_temp_12 set this_y_1 = tuple_temp_13 set tuple_temp_14 = MapBounds_boundMax_x set tuple_temp_15 = MapBounds_boundMax_y set v_x_1 = tuple_temp_14 set v_y_1 = tuple_temp_15 endfunction function init_MapBounds takes nothing returns boolean call initMapBounds() return true endfunction function init_Maths takes nothing returns boolean return true endfunction function init_Matrices takes nothing returns boolean return true endfunction function init_ObjectIdGenerator takes nothing returns boolean local integer this_1 local integer this_2 local integer this_3 local integer this_4 local integer this_5 local integer this_6 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_1 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_1 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_1 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_2 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_2 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_2 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_3 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_3 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_3 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_4 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_4 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_4 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_5 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_5 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_5 = IdGenerator_nextFree[IdGenerator_firstFree] endif if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < 32768 then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_6 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_6 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_6 = IdGenerator_nextFree[IdGenerator_firstFree] endif return true endfunction function init_ObjectIds takes nothing returns boolean return true endfunction function init_Objects takes nothing returns boolean return true endfunction function init_OnUnitEnterLeave takes nothing returns boolean local integer i local integer temp local integer clVar local player this_1 local integer abilityId local boolean avail local integer this_2 local integer cb_1 local real timeToWait local integer cb_2 local timer this_3 local real timeToWait_1 local integer cb_3 set OnUnitEnterLeave_eventTrigger = CreateTrigger() set OnUnitEnterLeave_preplacedUnits = CreateGroup() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set this_1 = Player_players[i] set abilityId = 1095577652 set avail = false call SetPlayerAbilityAvailable(this_1, abilityId, avail) set i = i + 1 endloop if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_2 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_2] = 1116 else call error("Out of memory: Could not create CallbackSingle_nullTimer_OnUnitEnterLeave.") set this_2 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_2 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_2] = 1116 endif set clVar = this_2 set cb_1 = clVar set timeToWait = 0. set cb_2 = cb_1 set this_3 = getTimer() set timeToWait_1 = timeToWait set cb_3 = cb_2 call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_3, this_3, timeToWait_1) return true endfunction function init_Orders takes nothing returns boolean return true endfunction function init_PathingMaps takes nothing returns boolean return true endfunction function init_Player takes nothing returns boolean local integer i local integer temp set Player_localPlayer = GetLocalPlayer() set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set Player_players[i] = Player(i) set i = i + 1 endloop return true endfunction function init_Playercolor takes nothing returns boolean call ConvertPlayerColor(24) call ConvertPlayerColor(25) call ConvertPlayerColor(26) call ConvertPlayerColor(27) return true endfunction function init_Preloader takes nothing returns boolean local integer clVar local player p local integer unitId local real pos_x_1 local real pos_y_1 local real facing_radians local real this_radians local unit this_1 local boolean flag local integer this_2 local integer cb_1 local real timeToWait local integer cb_2 local timer this_3 local real timeToWait_1 local integer cb_3 local player temp local integer temp_1 local real temp_2 local real temp_3 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 set Preloader_dumg = CreateGroup() set p = Basics_DUMMY_PLAYER set unitId = 1970497636 set tuple_temp = MapBounds_playableMin_x set tuple_temp_1 = MapBounds_playableMin_y set pos_x_1 = tuple_temp set pos_y_1 = tuple_temp_1 set tuple_temp_2 = 0. set facing_radians = tuple_temp_2 set temp = p set temp_1 = unitId set temp_2 = pos_x_1 set temp_3 = pos_y_1 set tuple_temp_3 = facing_radians set this_radians = tuple_temp_3 set Preloader_dum = CreateUnit(temp, temp_1, temp_2, temp_3, this_radians * 57.295779513) set this_1 = Preloader_dum set flag = true call SetUnitInvulnerable(this_1, flag) if Preloader_dum == null then call error("DUMMY_UNITID not added correctly to the map.") endif if true then if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < 32768 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_2 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_2] = 1117 else call error("Out of memory: Could not create CallbackSingle_nullTimer_Preloader.") set this_2 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_2 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_2] = 1117 endif set clVar = this_2 set cb_1 = clVar set timeToWait = 0. set cb_2 = cb_1 set this_3 = getTimer() set timeToWait_1 = timeToWait set cb_3 = cb_2 call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_3, this_3, timeToWait_1) endif return true endfunction function init_Printing takes nothing returns boolean return true endfunction function init_Quaternion takes nothing returns boolean return true endfunction function init_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 local playerunitevent p local code c set RegisterEvents_onCastMap = new_HashMap() set p = EVENT_PLAYER_UNIT_SPELL_EFFECT set c = ref_function_code__registerPlayerUnitEvent_RegisterEvents call registerPlayerUnitEvent(p, null, c, null) 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 local string this_1 = "0123456789" local string this_2 call StringLength(this_1) set this_2 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" call StringLength(this_2) return true endfunction function s2cInit takes nothing returns nothing local integer i = 0 local integer temp = StringUtils_MAX_INDEX local string this_1 loop exitwhen i > temp set this_1 = StringUtils_c2s[i] if StringCase(this_1, true) == StringUtils_c2s[i] then set StringUtils_s2c[StringHash(StringUtils_c2s[i]) / 2033480 + 1002] = i endif set i = i + 1 endloop endfunction function initialize 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] = "" call s2cInit() endfunction function dispatch_Table_Table_Table_hasString takes integer this_1, integer parentKey returns boolean local boolean Table_Table_hasString_result local integer this_2 local integer parentKey_1 local hashtable this_3 local integer parentKey_2 local integer childKey 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 set this_2 = this_1 set parentKey_1 = parentKey set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set Table_Table_hasString_result = HaveSavedString(this_3, parentKey_2, childKey) return Table_Table_hasString_result endfunction function stringToIndex takes string s returns integer local string this_1 = s local integer hash = StringHash(this_1) loop exitwhen not true if dispatch_Table_Table_Table_hasString(TypeCasting_typecastdata, hash) then if dispatch_Table_Table_Table_loadString(TypeCasting_typecastdata, hash) == s then exitwhen true endif 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 set StringUtils_MAX_INDEX = 126 + 1 call initialize() call stringToIndex("") return true endfunction function init_SyncSimple takes nothing returns boolean local trigger trig local integer i local integer temp local trigger this_1 local code actionFunc 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 set this_1 = trig set actionFunc = ref_function_code__addAction_SyncSimple call TriggerAddAction(this_1, actionFunc) 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 init_TerrainUtils takes nothing returns boolean local integer itemId = 2003790951 local real tuple_temp = Vectors_ZERO2_x local real tuple_temp_1 = Vectors_ZERO2_y local real pos_x_1 = tuple_temp local real pos_y_1 = tuple_temp_1 local integer itemId_1 = itemId local real tuple_temp_2 = pos_x_1 local real tuple_temp_3 = pos_y_1 local real this_x = tuple_temp_2 local real this_y = tuple_temp_3 local real tuple_temp_4 = this_x local real tuple_temp_5 = this_y local real pos_x_2 = tuple_temp_4 local real pos_y_2 = tuple_temp_5 local item receiver = CreateItem(itemId_1, pos_x_2, pos_y_2) local item this_1 = receiver local boolean flag = false local real this_2 local real this_3 call SetItemVisible(this_1, flag) call Rect(0., 0., 128., 128.) set this_2 = MapBounds_boundMax_x - MapBounds_boundMin_x call R2I(this_2) set this_3 = MapBounds_boundMax_y - MapBounds_boundMin_y call R2I(this_3) 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 init_TypeCasting takes nothing returns boolean local integer this_1 local integer parentKey local string value local integer this_2 local integer parentKey_1 local string value_1 local hashtable this_3 local integer parentKey_2 local integer childKey local string value_2 set TypeCasting_typecastdata = new_Table() set this_1 = TypeCasting_typecastdata set parentKey = 0 set value = "" 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 set this_2 = this_1 set parentKey_1 = parentKey set value_1 = value set this_3 = Table_ht set parentKey_2 = this_2 set childKey = parentKey_1 set value_2 = value_1 call SaveStr(this_3, parentKey_2, childKey, value_2) 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 init_UnitIndexer takes nothing returns boolean local code c local trigger this_1 local boolexpr condition_1 local code c_1 local trigger this_2 local code actionFunc set UnitIndexer_onIndexTrigger = CreateTrigger() set UnitIndexer_onDeindexTrigger = CreateTrigger() set c = ref_function_code__onEnter_UnitIndexer set this_1 = OnUnitEnterLeave_eventTrigger set condition_1 = Filter(c) call TriggerAddCondition(this_1, condition_1) set c_1 = ref_function_code__onLeave_UnitIndexer set this_2 = OnUnitEnterLeave_eventTrigger set actionFunc = c_1 call TriggerAddAction(this_2, actionFunc) 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 local real tuple_temp = 0. local real tuple_temp_1 = 0. set Vectors_ZERO2_x = tuple_temp set Vectors_ZERO2_y = tuple_temp_1 call Location(0., 0.) return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function onEvent takes nothing returns nothing local integer this_1 = ClosureFrames_FRAME_MAP local handle this_3 = BlzGetTriggerFrame() local integer key = GetHandleId(this_3) local integer listener_1 local frameeventtype eventType local integer nextListener local integer HashMap_HashMap_get_result local integer this_2 local integer key_1 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 set this_2 = this_1 set key_1 = key set HashMap_HashMap_get_result = dispatch_Table_Table_Table_loadInt(this_2, key_1) set listener_1 = HashMap_HashMap_get_result set eventType = BlzGetTriggerFrameEvent() loop exitwhen not (listener_1 != 0) set nextListener = FrameHandleListener_next[listener_1] if FrameHandleListener_eventType[listener_1] == eventType then endif set listener_1 = nextListener endloop endfunction function onEvent_434 takes nothing returns nothing local integer this_1 = ClosureKeyPresses_KEY_MAP local handle this_3 = BlzGetTriggerPlayerKey() local integer key = GetHandleId(this_3) local integer listener_1 local integer metaKey local boolean onKeyDown local integer HashMap_HashMap_get_result local integer this_2 local integer key_1 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 set this_2 = this_1 set key_1 = key set HashMap_HashMap_get_result = dispatch_Table_Table_Table_loadInt(this_2, key_1) set listener_1 = HashMap_HashMap_get_result set metaKey = BlzGetTriggerPlayerMetaKey() set onKeyDown = BlzGetTriggerPlayerIsKeyDown() loop exitwhen not (listener_1 != 0) if KeyPressListener_metaKey[listener_1] == metaKey and KeyPressListener_onKeyDown[listener_1] == onKeyDown then endif set listener_1 = KeyPressListener_next[listener_1] endloop endfunction function spellActions takes nothing returns nothing local unit this_1 = GetTriggerUnit() local unit this_2 = this_1 local integer index = GetUnitUserData(this_2) if LastOrder_lastOrder[index] != 0 then endif endfunction function group_enumUnitsAll takes group this_1, boolexpr filter returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 local group this_2 local player p local boolexpr filter_1 local group this_3 local group groups_0 local integer i_1 local group this_4 loop exitwhen i > temp set this_2 = Group_ENUM_GROUP set p = Player_players[i] set filter_1 = filter call GroupEnumUnitsOfPlayer(this_2, p, filter_1) set this_3 = this_1 set groups_0 = Group_ENUM_GROUP set i_1 = 0 set i_1 = i_1 + BlzGroupAddGroupFast(groups_0, this_3) set i = i + 1 endloop set this_4 = Group_ENUM_GROUP call GroupClear(this_4) endfunction function swap takes nothing returns nothing local boolean isEnabled = IsTriggerEnabled(DamageDetection_current) local trigger this_1 = DamageDetection_current local integer i local integer temp local trigger this_2 local trigger this_3 local trigger this_4 local boolexpr condition_1 call DisableTrigger(this_1) if DamageDetection_toDestroy != null then set this_2 = DamageDetection_toDestroy call DestroyTrigger(this_2) endif set DamageDetection_toDestroy = DamageDetection_current set DamageDetection_current = CreateTrigger() if not isEnabled then set this_3 = DamageDetection_current call DisableTrigger(this_3) endif call group_enumUnitsAll(Group_ENUM_GROUP, DamageDetection_filter) set i = 0 set temp = 0 - 1 loop exitwhen i > temp set this_4 = DamageDetection_current set condition_1 = DamageDetection_func[i] call TriggerAddCondition(this_4, condition_1) 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_470 = function onEvent_434 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_361 = function code__addAction_nullTimer_ClosureEvents_231 set ref_function_code__addAction_nullTimer_ClosureEvents_362 = function code__addAction_nullTimer_ClosureEvents_232 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 ExecuteFunc("initCompiletimeState_0") set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_Abilities)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Abilities.") 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