// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1367 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 real Angle_DEGTORAD=0. real Angle_RADTODEG=0. integer Base64_ENCODES_PER_ROUND=0 integer Base64_DECODES_PER_ROUND=0 string array Base64_CHARMAP integer array Base64_REVERSE_CHARMAP integer Base64Decoder_MAX_CHARS=0 integer Base64Decoder_DECODE_MASK=0 integer Base64Encoder_MAX_CHARS=0 integer Base64Encoder_MAX_BYTES=0 real Basics_ANIMATION_PERIOD=0. integer Basics_HEIGHT_ENABLER=0 player Basics_DUMMY_PLAYER=null integer BitSet_BITSET_SIZE=0 integer array BitSet_pows integer array BitwiseInit_powShift integer ChunkedString_DEFAULT_CHUNK_SIZE=0 playerevent ClosureEvents_EVENT_PLAYER_CHAT_FILTER=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 array ClosureForGroups_tempCallbacksUntil integer array ClosureForGroups_callbackMode integer array ClosureForGroups_countLimits integer array ClosureForGroups_countIters boolean array ClosureForGroups_stopRequested integer ClosureForGroups_tempCallbacksCount=0 integer ClosureForGroups_MODE_NORMAL=0 integer ClosureForGroups_MODE_COUNTED=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 boolean DamageEvent_DETECT_NATIVE_ABILITIES=false 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 DamageEvent_maxPriority=0 integer array DamageEvent_firstUnreducedListeners integer DamageEvent_maxUnreducedPriority=0 integer DamageInstance_current=0 integer array DamageInstance_stack integer DamageInstance_count=0 integer DummyRecycler_DUMMY_UNIT_ID=0 integer DummyRecycler_ROOT_ENABLER=0 integer DummyRecycler_DIFFERENT_ANGLES=0 real DummyRecycler_ANGLE_DEGREE=0. integer DummyRecycler_SAVED_UNITS_PER_ANGLE=0 integer array DummyRecycler_angleQueues integer ErrorHandling_MUTE_ERROR_DURATION=0 integer ErrorHandling_PRIMARY_ERROR_KEY=0 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 integer FileIO_CHUNKS_PER_FILE=0 integer FileIO_FILE_IO_ABIL_ID=0 string FileIO_FILE_IO_ABIL_ID_STR=null integer ForceTests_testInt=0 real Framehandle_SCREEN_TOP_x=0. real Framehandle_SCREEN_TOP_y=0. real Framehandle_SCREEN_BOTTOM_x=0. real Framehandle_SCREEN_BOTTOM_y=0. integer GameStatus_gameStatus=0 real GameTimer_currentTime=0. integer GroupUtils_GROUP_NUMBER_LIMIT=0 integer GroupUtils_START_CREATE_GROUPS=0 integer GroupUtils_used=0 group array GroupUtils_stack integer GroupUtils_numStack=0 integer GroupUtils_numTotal=0 boolean GroupUtils_shownMaxError=false hashtable HashList_ht=null hashtable HashList_occurences=null hashtable HashSet_position=null integer InstantDummyCaster_DUMMY_CASTER_UNIT_ID=0 integer InstantDummyCaster_DUMMY_ROOT_ABIL_ID=0 integer Integer_INT_MAX=0 integer Integer_INT_MIN=0 real Knockback3_DESTRUCTABLE_ENUM_SIZE=0. integer Knockback3_LinkedListModule_first=0 integer LastOrder_ORDERS_TO_HOLD=0 integer array LastOrder_lastOrder boolean MagicFunctions_compiletime=false boolean MagicFunctions_isLua=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. real Matrices_ZERO44_m00=0. real Matrices_ZERO44_m01=0. real Matrices_ZERO44_m02=0. real Matrices_ZERO44_m03=0. real Matrices_ZERO44_m10=0. real Matrices_ZERO44_m11=0. real Matrices_ZERO44_m12=0. real Matrices_ZERO44_m13=0. real Matrices_ZERO44_m20=0. real Matrices_ZERO44_m21=0. real Matrices_ZERO44_m22=0. real Matrices_ZERO44_m23=0. real Matrices_ZERO44_m30=0. real Matrices_ZERO44_m31=0. real Matrices_ZERO44_m32=0. real Matrices_ZERO44_m33=0. string ObjectIds_CHARMAP=null string Objects_impaleTargetDust=null trigger OnUnitEnterLeave_eventTrigger=null group OnUnitEnterLeave_preplacedUnits=null unit array OnUnitEnterLeave_tempUnits integer OnUnitEnterLeave_tempUnitsCount=0 integer OnUnitEnterLeave_ABILITY_ID=0 integer OrderIds_undefend=0 player array Player_players player Player_localPlayer=null boolean Preloader_autoFinish=false group Preloader_dumg=null unit Preloader_dum=null integer Printing_DEBUG_LEVEL=0 real Printing_DEBUG_MSG_DURATION=0. real Real_REAL_MAX=0. trigger array RegisterEvents_t integer RegisterEvents_onCastMap=0 boolean SafetyChecks_SAFETY_CHECKS_ENABLED=false string array StringUtils_c2s integer array StringUtils_s2c integer StringUtils_MAX_INDEX=0 boolean String_ENABLE_MULTIBYTE_SUPPORT=false string String_charset=null string String_numberset=null string SyncSimple_DEFAULT_PREFIX=null string SyncSimple_LAST_CHUNK_PREFIX=null boolean SyncSimple_SYNC_IN_REPLAYS=false integer SyncSimple_syncQueue=0 hashtable Table_ht=null integer TerrainUtils_DUMMY_ITEM_ID=0 item array TerrainUtils_hiddenItems integer TerrainUtils_hiddenItemsCount=0 timer array TimerUtils_freeTimers integer TimerUtils_freeTimersCount=0 integer TimerUtils_timerData=0 integer TimerUtils_HELD=0 integer TypeCasting_typecastdata=0 real TypeCasting_R2I_PRECISION=0. integer UnitIds_shade=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. real Vectors_ZERO3_x=0. real Vectors_ZERO3_y=0. real Vectors_ZERO3_z=0. hashtable hashtable_compiletime=null hashtable hashtable_compiletime_437=null hashtable hashtable_compiletime_438=null hashtable hashtable_compiletime_439=null hashtable hashtable_compiletime_440=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 array FrameHandleListener_typeId integer Callback_firstFree=0 integer array Callback_typeId integer array DamageElement_nextFree integer DamageElement_firstFree=0 integer DamageElement_maxIndex=0 integer array DamageInstance_nextFree integer DamageInstance_firstFree=0 integer DamageInstance_maxIndex=0 integer array DamageInstance_typeId integer DummyCaster_firstFree=0 integer array DummyCaster_typeId integer array File_nextFree integer File_firstFree=0 integer File_maxIndex=0 integer array File_typeId integer HashList_firstFree=0 integer array HashList_typeId integer array Table_nextFree integer Table_firstFree=0 integer Table_maxIndex=0 integer array Table_typeId integer array TerrainZProvider_nextFree integer TerrainZProvider_firstFree=0 integer TerrainZProvider_maxIndex=0 integer array WallHitTransform_nextFree integer WallHitTransform_firstFree=0 integer WallHitTransform_maxIndex=0 integer array UnitFilter_nextFree integer UnitFilter_firstFree=0 integer UnitFilter_maxIndex=0 integer array BackIterator_nextFree integer BackIterator_firstFree=0 integer BackIterator_maxIndex=0 integer array Iterator_nextFree integer Iterator_firstFree=0 integer Iterator_maxIndex=0 integer array Order_nextFree integer Order_firstFree=0 integer Order_maxIndex=0 integer array Order_typeId integer array BackIterator_nextFree_9 integer BackIterator_firstFree_5=0 integer BackIterator_maxIndex_7=0 integer array Iterator_nextFree_241 integer Iterator_firstFree_237=0 integer Iterator_maxIndex_239=0 integer array Comparator_nextFree integer Comparator_firstFree=0 integer Comparator_maxIndex=0 integer array LLEntry_nextFree integer LLEntry_firstFree=0 integer LLEntry_maxIndex=0 integer array LLEntry_typeId integer array LinkedList_nextFree integer LinkedList_firstFree=0 integer LinkedList_maxIndex=0 integer array LinkedList_typeId integer array IdGenerator_nextFree integer IdGenerator_firstFree=0 integer IdGenerator_maxIndex=0 integer array OrderStringFactory_nextFree integer OrderStringFactory_firstFree=0 integer OrderStringFactory_maxIndex=0 integer BufferSyncListener_firstFree=0 integer array BufferSyncListener_typeId integer Sim3DSound_firstFree=0 integer array Sim3DSound_typeId integer array SoundDefinition_typeId integer SoundInstance_firstFree=0 integer array SoundInstance_typeId integer array StringIterator_nextFree integer StringIterator_firstFree=0 integer StringIterator_maxIndex=0 integer array StringIterator_typeId integer StringSyncListener_firstFree=0 integer array StringSyncListener_typeId integer BoolSyncListener_firstFree=0 integer array BoolSyncListener_typeId integer IntSyncListener_firstFree=0 integer array IntSyncListener_typeId integer RealSyncListener_firstFree=0 integer array RealSyncListener_typeId integer SyncData_firstFree=0 integer array SyncData_typeId integer array UnitIndex_nextFree integer UnitIndex_firstFree=0 integer UnitIndex_maxIndex=0 integer array UnitIndex_typeId integer array Base64Decoder_byteBuffer string array Base64Decoder_buffer integer array Base64Decoder_bufferLength integer array data_428 integer array this_576 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_575 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_577 integer array sequence integer array ending real array duration_seconds real array duration_seconds_433 camerasetup array setup real array pos_x real array pos_y real array duration_seconds_434 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 framehandle array FrameHandleListener_frame 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_578 effect array this_579 integer array condition integer array resetCount integer array action string array File_filename integer array createNow integer array HashList_size integer array HashMap_size integer array IterableMap_keys boolean array IterableMap__destroyed integer array Order_prev unit array Order_orderedUnit integer array result integer array LLEntry_elem integer array LLEntry_prev integer array LLEntry_next integer array LinkedList_dummy integer array LinkedList_size integer array listener integer array SoundDefinition_soundStack integer array SoundDefinition_duration integer array this_580 integer array snd integer array this_581 integer array snd_571 integer array this_582 integer array snd_572 integer array this_583 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_444 integer array listener_445 integer array listener_446 integer array SyncData_slistener integer array SyncData_blistener player array SyncData_syncer string array SyncData_data integer array SyncData_buffer integer array SyncData_syncBuffer unit array UnitIndex__unit real real_asAngleDegrees_return_radians=0. integer string_toChar_return_c=0 real unit_getPos_return_x=0. real unit_getPos_return_y=0. real vec2_op_minus_return_x=0. real vec2_op_minus_return_y=0. real EventData_getOrderPos_return_x=0. real EventData_getOrderPos_return_y=0. real EventData_getOrderTargetPos_return_x=0. real EventData_getOrderTargetPos_return_y=0. real EventData_getAbilityTargetPos_return_x=0. real EventData_getAbilityTargetPos_return_y=0. real EventData_getSpellTargetPos_return_x=0. real EventData_getSpellTargetPos_return_y=0. real vec2_toVec3_return_x=0. real vec2_toVec3_return_y=0. real vec2_toVec3_return_z=0. real vec2_op_plus_return_x=0. real vec2_op_plus_return_y=0. real vec2_op_mult_return_x=0. real vec2_op_mult_return_y=0. integer char_return_c=0 real real_seconds_return_seconds=0. real dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds=0. real apply_Cinematic_Cinematic_return_seconds=0. real apply_Cinematic_Cinematic_return_seconds_416=0. real apply_Cinematic_Cinematic_return_seconds_417=0. real apply_Cinematic_Cinematic_return_seconds_418=0. real apply_Cinematic_Cinematic_return_seconds_419=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_Angle=null code ref_function_init_Maths=null code ref_function_init_String=null code ref_function_init_Vectors=null code ref_function_init_Destructable=null code ref_function_init_Player=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_Force=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_ClosureForGroups=null code ref_function_init_LinkedList=null code ref_function_init_ObjectIds=null code ref_function_init_TargetsAllowed=null code ref_function_init_AbilityObjEditing=null code ref_function_init_AttachmentPoints=null code ref_function_init_BitwiseInit=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_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_DamageEvent=null code ref_function_init_DialogBox=null code ref_function_init_Doodads=null code ref_function_init_DummyRecycler=null code ref_function_init_Environment=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__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_564=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_457=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 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 printLog takes player showTo, integer loglvl, string msg returns nothing local string compositeMsg if Printing_DEBUG_LEVEL <= loglvl then set compositeMsg = Loglevel_getTag(loglvl) + " - " + msg call DisplayTimedTextToPlayer(showTo, 0., 0., Printing_DEBUG_MSG_DURATION, compositeMsg) endif endfunction function Log_error takes string msg returns nothing call printLog(Player_localPlayer, 4, msg) endfunction function compileError takes string msg returns nothing endfunction function hashtable_hasBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedBoolean(this_1, parentKey, childKey) endfunction function hashtable_hasInt takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedInteger(this_1, parentKey, childKey) endfunction function hashtable_loadBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return LoadBoolean(this_1, parentKey, childKey) endfunction function hashtable_loadInt takes hashtable this_1, integer parentKey, integer childKey returns integer return LoadInteger(this_1, parentKey, childKey) endfunction function hashtable_saveBoolean takes hashtable this_1, integer parentKey, integer childKey, boolean value returns nothing call SaveBoolean(this_1, parentKey, childKey, value) endfunction function hashtable_saveInt takes hashtable this_1, integer parentKey, integer childKey, integer value returns nothing call SaveInteger(this_1, parentKey, childKey, value) endfunction function real_toInt takes real this_1 returns integer return R2I(this_1) endfunction function string_getHash takes string this_1 returns integer return StringHash(this_1) endfunction function error takes string msg returns nothing local integer hash if MagicFunctions_compiletime then call compileError("ERROR: " + msg) elseif MagicFunctions_isLua then set ErrorHandling_lastError = msg else if not ErrorHandling_suppressErrorMessages then set hash = string_getHash(msg) if hashtable_hasInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) then if hashtable_loadInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) + ErrorHandling_MUTE_ERROR_DURATION < GameTimer_currentTime then call Log_error(msg + "") call hashtable_saveInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, real_toInt(GameTimer_currentTime)) call hashtable_saveBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, false) elseif hashtable_hasBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) then if not hashtable_loadBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) then call Log_error("|cffFF3A29Excessive repeating errors are being omitted") call hashtable_saveBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, true) endif else call Log_error("|cffFF3A29Excessive repeating errors are being omitted") call hashtable_saveBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, true) endif else call hashtable_saveInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, real_toInt(GameTimer_currentTime)) call Log_error("Message: " + msg + "") endif endif set ErrorHandling_lastError = msg call I2S(1 / 0) endif endfunction function initCompiletimeState_0 takes nothing returns nothing set hashtable_compiletime_440 = InitHashtable() set hashtable_compiletime_439 = InitHashtable() set hashtable_compiletime_438 = InitHashtable() set hashtable_compiletime_437 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_439, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_439, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_439, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_439, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_439, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_439, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_439, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_439, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_439, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_439, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_439, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_439, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_439, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_439, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_439, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_439, 1, 789744696, 15) call SaveStr(hashtable_compiletime_439, 2, 0, "") call SaveStr(hashtable_compiletime_439, 2, 1804483594, "air") call SaveStr(hashtable_compiletime_439, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime_439, 2, -681966791, "ground") call SaveStr(hashtable_compiletime_439, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime_439, 2, 392811314, "item") call SaveStr(hashtable_compiletime_439, 2, 124309475, "structure") call SaveStr(hashtable_compiletime_439, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime_439, 2, -85648186, "ward") call SaveStr(hashtable_compiletime_439, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime_439, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime_439, 2, -844489484, "AM02") call SaveStr(hashtable_compiletime_439, 2, 512215473, "Agho") call SaveInteger(hashtable_compiletime_439, 58, 0, 0) call SaveInteger(hashtable_compiletime_439, 58, 1, 0) call SaveInteger(hashtable_compiletime_439, 58, 2, 0) call SaveInteger(hashtable_compiletime_439, 58, 3, 0) call SaveInteger(hashtable_compiletime_439, 58, 4, 0) call SaveInteger(hashtable_compiletime_439, 58, 5, 0) call SaveInteger(hashtable_compiletime_439, 58, 6, 0) call SaveInteger(hashtable_compiletime_439, 58, 7, 0) call SaveInteger(hashtable_compiletime_439, 58, 8, 0) call SaveInteger(hashtable_compiletime_439, 58, 9, 0) call SaveInteger(hashtable_compiletime_439, 58, 10, 0) call SaveInteger(hashtable_compiletime_439, 58, 11, 0) call SaveInteger(hashtable_compiletime_439, 58, 12, 0) call SaveInteger(hashtable_compiletime_439, 58, 13, 0) call SaveInteger(hashtable_compiletime_439, 58, 14, 0) call SaveInteger(hashtable_compiletime_439, 58, 15, 0) call SaveInteger(hashtable_compiletime_439, 58, 16, 0) call SaveInteger(hashtable_compiletime_439, 58, 17, 0) call SaveInteger(hashtable_compiletime_439, 58, 18, 0) call SaveInteger(hashtable_compiletime_439, 58, 19, 0) call SaveInteger(hashtable_compiletime_439, 58, 20, 0) call SaveInteger(hashtable_compiletime_439, 58, 21, 0) call SaveInteger(hashtable_compiletime_439, 58, 22, 0) call SaveInteger(hashtable_compiletime_439, 58, 23, 0) call SaveInteger(hashtable_compiletime_439, 58, 24, 0) call SaveInteger(hashtable_compiletime_439, 58, 25, 0) call SaveInteger(hashtable_compiletime_439, 58, 26, 0) call SaveInteger(hashtable_compiletime_439, 58, 27, 0) call SaveInteger(hashtable_compiletime_439, 58, 28, 0) call SaveInteger(hashtable_compiletime_439, 58, 29, 0) call SaveInteger(hashtable_compiletime_439, 58, 30, 0) call SaveInteger(hashtable_compiletime_439, 58, 31, 0) call SaveInteger(hashtable_compiletime_439, 58, 32, 0) call SaveInteger(hashtable_compiletime_439, 58, 33, 0) call SaveInteger(hashtable_compiletime_439, 58, 34, 0) call SaveInteger(hashtable_compiletime_439, 58, 35, 0) call SaveInteger(hashtable_compiletime_439, 58, 36, 0) call SaveInteger(hashtable_compiletime_439, 58, 37, 0) call SaveInteger(hashtable_compiletime_439, 58, 38, 0) call SaveInteger(hashtable_compiletime_439, 58, 39, 0) call SaveInteger(hashtable_compiletime_439, 58, 40, 0) call SaveInteger(hashtable_compiletime_439, 58, 41, 0) call SaveInteger(hashtable_compiletime_439, 58, 42, 0) call SaveInteger(hashtable_compiletime_439, 58, 43, 0) call SaveInteger(hashtable_compiletime_439, 58, 44, 0) call SaveInteger(hashtable_compiletime_439, 58, 45, 0) call SaveInteger(hashtable_compiletime_439, 58, 46, 0) call SaveInteger(hashtable_compiletime_439, 58, 47, 0) call SaveInteger(hashtable_compiletime_439, 58, 48, 0) call SaveInteger(hashtable_compiletime_439, 58, 49, 0) call SaveInteger(hashtable_compiletime_439, 58, 50, 0) call SaveInteger(hashtable_compiletime_439, 58, 51, 0) call SaveInteger(hashtable_compiletime_439, 58, 52, 0) call SaveInteger(hashtable_compiletime_439, 58, 53, 0) call SaveInteger(hashtable_compiletime_439, 58, 54, 0) call SaveInteger(hashtable_compiletime_439, 58, 55, 0) call SaveInteger(hashtable_compiletime_439, 58, 56, 0) call SaveInteger(hashtable_compiletime_439, 58, 57, 0) call SaveInteger(hashtable_compiletime_439, 58, 58, 0) call SaveInteger(hashtable_compiletime_439, 58, 59, 0) call SaveInteger(hashtable_compiletime_439, 58, 60, 0) call SaveInteger(hashtable_compiletime_439, 58, 61, 0) call SaveInteger(hashtable_compiletime_439, 58, 62, 0) call SaveInteger(hashtable_compiletime_439, 58, 63, 0) endfunction function initCompiletimeState takes nothing returns nothing call ExecuteFunc("initCompiletimeState_0") endfunction function dispatch_DamageListener_DamageEvent_DamageListener_onEvent takes integer this_1 returns nothing endfunction function alloc_DamageInstance takes nothing returns integer local integer this_1 if DamageInstance_firstFree == 0 then if DamageInstance_maxIndex < JASS_MAX_ARRAY_SIZE then set DamageInstance_maxIndex = DamageInstance_maxIndex + 1 set this_1 = DamageInstance_maxIndex set DamageInstance_typeId[this_1] = 1903 else call error("Out of memory: Could not create DamageInstance.") set this_1 = 0 endif else set DamageInstance_firstFree = DamageInstance_firstFree - 1 set this_1 = DamageInstance_nextFree[DamageInstance_firstFree] set DamageInstance_typeId[this_1] = 1903 endif return this_1 endfunction function DamageInstance_init takes integer this_1 returns nothing endfunction function construct_DamageInstance takes integer this_1, integer id_1, unit source, unit target, real unreducedAmount, attacktype nativeAttackType, damagetype nativeDamageType, weapontype nativeWeaponType, integer damageType, integer damageElement returns nothing call DamageInstance_init(this_1) set DamageInstance_amount[this_1] = unreducedAmount set DamageInstance_nativeAttackType[this_1] = nativeAttackType set DamageInstance_nativeDamageType[this_1] = nativeDamageType set DamageInstance_nativeWeaponType[this_1] = nativeWeaponType set DamageInstance_count = DamageInstance_count + 1 set DamageInstance_stack[DamageInstance_count] = this_1 set DamageInstance_current = this_1 endfunction function new_DamageInstance takes integer id_1, unit source, unit target, real unreducedAmount, attacktype nativeAttackType, damagetype nativeDamageType, weapontype nativeWeaponType, integer damageType, integer damageElement returns integer local integer this_1 = alloc_DamageInstance() call construct_DamageInstance(this_1, id_1, source, target, unreducedAmount, nativeAttackType, nativeDamageType, nativeWeaponType, damageType, damageElement) return this_1 endfunction function DamageEvent_onUnreducedDamage takes nothing returns nothing local real amount = GetEventDamage() local attacktype attackType = BlzGetEventAttackType() local integer dmg local integer i local integer temp local integer listener_1 if DamageEvent_nextDamageType == 4 then if DamageEvent_DETECT_NATIVE_ABILITIES 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 = DamageEvent_maxUnreducedPriority loop exitwhen i > temp set listener_1 = DamageEvent_firstUnreducedListeners[i] loop exitwhen not (listener_1 != 0) call dispatch_DamageListener_DamageEvent_DamageListener_onEvent(listener_1) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener_1 = DamageListener_next[listener_1] endif endloop 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 onEvent_add_DamageEvent takes integer this_1 returns nothing call DamageEvent_onUnreducedDamage() endfunction function DamageInstance_setReducedAmount takes integer this_1, real amount returns nothing set DamageInstance_amount[this_1] = amount endfunction function dispatch_DamageInstance_DamageEvent_DamageInstance_setReducedAmount takes integer this_1, real amount returns nothing if DamageInstance_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DamageInstance.setReducedAmount") else call error("Called DamageInstance.setReducedAmount on invalid object.") endif endif call DamageInstance_setReducedAmount(this_1, amount) endfunction function DamageInstance_onDestroy takes integer this_1 returns nothing set DamageInstance_count = DamageInstance_count - 1 set DamageInstance_current = DamageInstance_stack[DamageInstance_count] endfunction function dealloc_DamageInstance takes integer obj returns nothing if DamageInstance_typeId[obj] == 0 then call error("Double free: object of type DamageInstance") else set DamageInstance_nextFree[DamageInstance_firstFree] = obj set DamageInstance_firstFree = DamageInstance_firstFree + 1 set DamageInstance_typeId[obj] = 0 endif endfunction function destroyDamageInstance takes integer this_1 returns nothing call DamageInstance_onDestroy(this_1) call dealloc_DamageInstance(this_1) endfunction function dispatch_DamageInstance_destroyDamageInstance takes integer this_1 returns nothing if DamageInstance_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DamageInstance.DamageInstance") else call error("Called DamageInstance.DamageInstance on invalid object.") endif endif call destroyDamageInstance(this_1) endfunction function DamageEvent_onDamage takes nothing returns nothing local integer dmg = DamageInstance_current local integer i local integer temp local integer listener_1 if not DamageEvent_abort then call dispatch_DamageInstance_DamageEvent_DamageInstance_setReducedAmount(dmg, GetEventDamage()) set i = 0 set temp = DamageEvent_maxPriority loop exitwhen i > temp set listener_1 = DamageEvent_firstListeners[i] loop exitwhen not (listener_1 != 0) call dispatch_DamageListener_DamageEvent_DamageListener_onEvent(listener_1) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener_1 = DamageListener_next[listener_1] endif endloop 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 call dispatch_DamageInstance_destroyDamageInstance(dmg) set DamageEvent_abort = false endfunction function onEvent_add_DamageEvent_802 takes integer this_1 returns nothing call DamageEvent_onDamage() endfunction function dispatch_EventListener_ClosureEvents_EventListener_onEvent takes integer this_1 returns nothing if EventListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EventListener.onEvent") else call error("Called EventListener.onEvent on invalid object.") endif endif if EventListener_typeId[this_1] <= 2124 then call onEvent_add_DamageEvent(this_1) else call onEvent_add_DamageEvent_802(this_1) endif endfunction function handle_getHandleId takes handle this_1 returns integer return GetHandleId(this_1) endfunction function eventid_isKeyboardEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return (eventId >= 261 and eventId <= 268) or eventId == 17 endfunction function eventid_isMouseEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return eventId >= 305 and eventId <= 307 endfunction function eventid_isPlayerunitEvent takes eventid this_1 returns boolean local integer eventId = handle_getHandleId(this_1) return (eventId >= 18 and eventId <= 51) or (eventId >= 269 and eventId <= 277) or eventId == 315 or eventId == 308 endfunction function int_toString takes integer this_1 returns string return I2S(this_1) endfunction function trigger_addAction takes trigger this_1, code actionFunc returns triggeraction return TriggerAddAction(this_1, actionFunc) endfunction function trigger_addCondition takes trigger this_1, boolexpr condition_1 returns triggercondition return TriggerAddCondition(this_1, condition_1) endfunction function trigger_registerPlayerUnitEvent takes trigger this_1, player whichPlayer, playerunitevent whichPlayerUnitEvent, boolexpr filter returns event return TriggerRegisterPlayerUnitEvent(this_1, whichPlayer, whichPlayerUnitEvent, filter) endfunction function registerPlayerUnitEvent_832 takes playerunitevent p, code filter, code condition_1, code action_1 returns nothing local integer hid = handle_getHandleId(p) local integer k local filterfunc cond_result local trigger temp local player temp_1 local playerunitevent temp_2 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 call trigger_registerPlayerUnitEvent(temp, temp_1, temp_2, cond_result) set k = k - 1 endloop endif if condition_1 != null then call trigger_addCondition(RegisterEvents_t[hid], Filter(condition_1)) endif if action_1 != null then call trigger_addAction(RegisterEvents_t[hid], action_1) endif endfunction function registerPlayerUnitEvent takes playerunitevent p, code c returns nothing call registerPlayerUnitEvent_832(p, null, c, null) endfunction function trigger_registerPlayerEvent takes trigger this_1, player whichPlayer, playerevent whichPlayerEvent returns event return TriggerRegisterPlayerEvent(this_1, whichPlayer, whichPlayerEvent) endfunction function registerEventId takes eventid evnt returns integer local integer eventId = handle_getHandleId(evnt) local integer i local integer temp local trigger receiver local trigger receiver_1 local trigger receiver_2 set ClosureEvents_eventTypeCounter = ClosureEvents_eventTypeCounter + 1 set ClosureEvents_eventidToIndex[eventId] = ClosureEvents_eventTypeCounter if evnt == EVENT_UNIT_DAMAGED then set ClosureEvents_eventidToIndex[handle_getHandleId(EVENT_PLAYER_UNIT_DAMAGED)] = ClosureEvents_eventTypeCounter call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_DAMAGED, ref_function_EventListener_generalEventCallback) elseif evnt == EVENT_PLAYER_UNIT_DAMAGED then set ClosureEvents_eventidToIndex[handle_getHandleId(EVENT_UNIT_DAMAGED)] = ClosureEvents_eventTypeCounter call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_DAMAGED, ref_function_EventListener_generalEventCallback) elseif eventid_isPlayerunitEvent(evnt) then call registerPlayerUnitEvent(ConvertPlayerUnitEvent(eventId), ref_function_EventListener_generalEventCallback) elseif evnt != EVENT_PLAYER_LEAVE and evnt != ClosureEvents_EVENT_PLAYER_CHAT_FILTER and ( not eventid_isKeyboardEvent(evnt)) and ( not eventid_isMouseEvent(evnt)) then call error("registering handleid: " + int_toString(eventId) + " non-playerunitevent. Except EVENT_PLAYER_LEAVE these are not supported right now.") endif if eventid_isMouseEvent(evnt) and ( not EventListener_useMouseEvents) then set EventListener_useMouseEvents = true set i = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen i > temp set receiver = ClosureEvents_keyTrig call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_UP) set receiver_1 = receiver call trigger_registerPlayerEvent(receiver_1, Player_players[i], EVENT_PLAYER_MOUSE_DOWN) set receiver_2 = receiver_1 call trigger_registerPlayerEvent(receiver_2, Player_players[i], EVENT_PLAYER_MOUSE_MOVE) set i = i + 1 endloop endif return ClosureEvents_eventTypeCounter endfunction function eventid_toIntId takes eventid this_1 returns integer local integer id_1 = ClosureEvents_eventidToIndex[handle_getHandleId(this_1)] if id_1 == 0 then set id_1 = registerEventId(this_1) endif return id_1 endfunction function fireEvents takes unit w_u returns boolean return true endfunction function unit_getUserData takes unit this_1 returns integer return GetUnitUserData(this_1) endfunction function unit_getIndex takes unit this_1 returns integer return unit_getUserData(this_1) endfunction function EventListener_generalEventCallback takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer id_1 = eventid_toIntId(GetTriggerEventId()) local integer index local integer listener_1 local integer nextListener local integer globalListener local integer nextListener_1 if trigUnit != null then set index = unit_getIndex(trigUnit) if index > 0 then set listener_1 = EventListener_unitListenersFirsts[index] if listener_1 != 0 and fireEvents(trigUnit) then 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 endif set globalListener = EventListener_generalListenersFirsts[id_1] if globalListener != 0 then loop exitwhen not (globalListener != 0) set nextListener_1 = EventListener_next[globalListener] call dispatch_EventListener_ClosureEvents_EventListener_onEvent(globalListener) set globalListener = nextListener_1 endloop endif endfunction function EventData_getOrderPos takes nothing returns real set EventData_getOrderPos_return_x = GetOrderPointX() set EventData_getOrderPos_return_y = GetOrderPointY() return EventData_getOrderPos_return_x endfunction function EventData_getOrderTargetUnit takes nothing returns unit return GetOrderTargetUnit() endfunction function unit_getX takes unit this_1 returns real return GetUnitX(this_1) endfunction function unit_getY takes unit this_1 returns real return GetUnitY(this_1) endfunction function unit_getPos takes unit this_1 returns real set unit_getPos_return_x = unit_getX(this_1) set unit_getPos_return_y = unit_getY(this_1) return unit_getPos_return_x endfunction function EventData_getOrderTargetPos takes nothing returns real set EventData_getOrderTargetPos_return_x = unit_getPos(EventData_getOrderTargetUnit()) set EventData_getOrderTargetPos_return_y = unit_getPos_return_y return EventData_getOrderTargetPos_return_x endfunction function Log_trace takes string msg returns nothing call printLog(Player_localPlayer, 0, msg) endfunction function badOrderList takes integer id_1 returns boolean return id_1 == 852055 or id_1 == 852056 or id_1 == 852064 or id_1 == 852065 or id_1 == 852067 or id_1 == 852068 or id_1 == 852076 or id_1 == 852077 or id_1 == 852090 or id_1 == 852091 or id_1 == 852100 or id_1 == 852102 or id_1 == 852103 or id_1 == 852107 or id_1 == 852108 or id_1 == 852129 or id_1 == 852130 or id_1 == 852133 or id_1 == 852134 or id_1 == 852136 or id_1 == 852137 or id_1 == 852150 or id_1 == 852151 or id_1 == 852174 or id_1 == 852158 or id_1 == 852159 or id_1 == 852162 or id_1 == 852163 or id_1 == 852174 or id_1 == 852175 or id_1 == 852177 or id_1 == 852178 or id_1 == 852191 or id_1 == 852192 or id_1 == 852198 or id_1 == 852199 or id_1 == 852203 or id_1 == 852204 or id_1 == 852212 or id_1 == 852213 or id_1 == 852244 or id_1 == 852245 or id_1 == 852249 or id_1 == 852250 or id_1 == 852255 or id_1 == 852256 or id_1 == 852458 or id_1 == 852459 or id_1 == 852478 or id_1 == 852479 or id_1 == 852484 or id_1 == 852485 or id_1 == 852515 or id_1 == 852516 or id_1 == 852522 or id_1 == 852523 or id_1 == 852540 or id_1 == 852541 or id_1 == 852543 or id_1 == 852544 or id_1 == 852546 or id_1 == 852547 or id_1 == 852549 or id_1 == 852550 or id_1 == 852552 or id_1 == 852553 or id_1 == 852562 or id_1 == 852563 or id_1 == 852571 or id_1 == 852578 or id_1 == 852579 or id_1 == 852589 or id_1 == 852590 or id_1 == 852602 or id_1 == 852603 or id_1 == 852671 or id_1 == 852672 endfunction function unit_orderFilter takes unit this_1, integer id_1 returns boolean return id_1 == 851971 or id_1 == 851986 or id_1 == 851983 or id_1 == 851984 or id_1 == 851990 or id_1 == 851993 or (id_1 >= 852055 and id_1 <= 852762) and ( not badOrderList(id_1)) endfunction function conditions takes nothing returns boolean return unit_orderFilter(GetTriggerUnit(), GetIssuedOrderId()) endfunction function alloc_Order takes nothing returns integer local integer this_1 if Order_firstFree == 0 then if Order_maxIndex < JASS_MAX_ARRAY_SIZE then set Order_maxIndex = Order_maxIndex + 1 set this_1 = Order_maxIndex set Order_typeId[this_1] = 3502 else call error("Out of memory: Could not create Order.") set this_1 = 0 endif else set Order_firstFree = Order_firstFree - 1 set this_1 = Order_nextFree[Order_firstFree] set Order_typeId[this_1] = 3502 endif return this_1 endfunction function Order_init takes integer this_1 returns nothing set Order_prev[this_1] = 0 set Order_orderedUnit[this_1] = null endfunction function dealloc_Order takes integer obj returns nothing if Order_typeId[obj] == 0 then call error("Double free: object of type Order") else set Order_nextFree[Order_firstFree] = obj set Order_firstFree = Order_firstFree + 1 set Order_typeId[obj] = 0 endif endfunction function cyc_Order_onDestroy takes integer funcChoice, integer this_1 returns nothing if funcChoice == 0 then if Order_prev[this_1] != 0 then call cyc_Order_onDestroy(2, Order_prev[this_1]) set Order_prev[this_1] = 0 endif elseif funcChoice == 1 then call cyc_Order_onDestroy(0, this_1) call dealloc_Order(this_1) elseif funcChoice == 2 then if Order_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Order.Order") else call error("Called Order.Order on invalid object.") endif endif call cyc_Order_onDestroy(1, this_1) endif endfunction function construct_Order takes integer this_1, unit ordered, integer orderId, integer ordtype, widget target, real targetPos_x, real targetPos_y returns nothing local integer index local integer i local integer e local integer tmp call Order_init(this_1) set Order_orderedUnit[this_1] = ordered if ordered != null then set index = unit_getIndex(ordered) 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 cyc_Order_onDestroy(2, 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 > LastOrder_ORDERS_TO_HOLD then set tmp = Order_prev[e] call cyc_Order_onDestroy(2, tmp) set Order_prev[e] = 0 exitwhen true endif set e = Order_prev[e] endloop set LastOrder_lastOrder[index] = this_1 endif endfunction function new_Order takes unit ordered, integer orderId, integer ordtype, widget target, real targetPos_x, real targetPos_y returns integer local integer this_1 = alloc_Order() call construct_Order(this_1, ordered, orderId, ordtype, target, targetPos_x, targetPos_y) return this_1 endfunction function actions takes nothing returns nothing local unit u_1 local widget t local integer oid if conditions() then set u_1 = GetTriggerUnit() set t = GetOrderTarget() set oid = GetIssuedOrderId() call Log_trace("ordered: <" + OrderId2StringBJ(oid) + ">") if GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER then call new_Order(u_1, oid, 0, t, EventData_getOrderTargetPos(), EventData_getOrderTargetPos_return_y) elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER then call new_Order(u_1, oid, 1, null, EventData_getOrderPos(), EventData_getOrderPos_return_y) elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_ISSUED_ORDER then call new_Order(u_1, oid, 2, null, unit_getPos(u_1), unit_getPos_return_y) endif endif endfunction function currentCallback takes nothing returns integer return ClosureForGroups_tempCallbacks[ClosureForGroups_tempCallbacksCount - 1] endfunction function currentCallbackUntil takes nothing returns integer return ClosureForGroups_tempCallbacksUntil[ClosureForGroups_tempCallbacksCount - 1] endfunction function dispatch_ForGroupCallbackUntil_ClosureForGroups_ForGroupCallbackUntil_callback takes integer this_1, unit u_1 returns boolean return false endfunction function alloc_LLEntry takes nothing returns integer local integer this_1 if LLEntry_firstFree == 0 then if LLEntry_maxIndex < JASS_MAX_ARRAY_SIZE then set LLEntry_maxIndex = LLEntry_maxIndex + 1 set this_1 = LLEntry_maxIndex set LLEntry_typeId[this_1] = 2923 else call error("Out of memory: Could not create LLEntry.") set this_1 = 0 endif else set LLEntry_firstFree = LLEntry_firstFree - 1 set this_1 = LLEntry_nextFree[LLEntry_firstFree] set LLEntry_typeId[this_1] = 2923 endif return this_1 endfunction function LLEntry_init takes integer this_1 returns nothing endfunction function construct_LLEntry takes integer this_1, integer elem, integer prev, integer next returns nothing call LLEntry_init(this_1) set LLEntry_elem[this_1] = elem set LLEntry_prev[this_1] = prev set LLEntry_next[this_1] = next endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this_1 = alloc_LLEntry() call construct_LLEntry(this_1, elem, prev, next) return this_1 endfunction function LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing local integer entry = new_LLEntry(elems_0, LLEntry_prev[LinkedList_dummy[this_1]], LinkedList_dummy[this_1]) set LLEntry_next[LLEntry_prev[LinkedList_dummy[this_1]]] = entry set LLEntry_prev[LinkedList_dummy[this_1]] = entry set LinkedList_size[this_1] = LinkedList_size[this_1] + 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.add") else call error("Called LinkedList.add on invalid object.") endif endif call LinkedList_add_1(this_1, elems_0) endfunction function handle_getTCHandleId takes handle this_1 returns integer return GetHandleId(this_1) endfunction function unitToIndex takes unit object returns integer return handle_getTCHandleId(object) endfunction function callback_forEachFrom_LinkedList takes integer this_1, unit u_1 returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(result[this_1], unitToIndex(u_1)) endfunction function unit_remove takes unit this_1 returns nothing call RemoveUnit(this_1) endfunction function callback_forEachFrom_Preloader takes integer this_1, unit u_1 returns nothing call unit_remove(u_1) endfunction function dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback takes integer this_1, unit u_1 returns nothing if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.callback") else call error("Called ForGroupCallback.callback on invalid object.") endif endif if ForGroupCallback_typeId[this_1] <= 2275 then call callback_forEachFrom_LinkedList(this_1, u_1) else call callback_forEachFrom_Preloader(this_1, u_1) endif endfunction function filterCallback takes unit filter returns nothing local integer idx = ClosureForGroups_tempCallbacksCount - 1 local integer mode = ClosureForGroups_callbackMode[idx] if mode == ClosureForGroups_MODE_NORMAL then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(currentCallback(), filter) elseif mode == ClosureForGroups_MODE_COUNTED then if ClosureForGroups_countIters[idx] < ClosureForGroups_countLimits[idx] then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(currentCallback(), filter) endif set ClosureForGroups_countIters[idx] = ClosureForGroups_countIters[idx] + 1 elseif not ClosureForGroups_stopRequested[idx] then if not dispatch_ForGroupCallbackUntil_ClosureForGroups_ForGroupCallbackUntil_callback(currentCallbackUntil(), filter) then set ClosureForGroups_stopRequested[idx] = true endif endif endfunction function code__Filter_ClosureForGroups takes nothing returns nothing call filterCallback(GetFilterUnit()) endfunction function popUnit takes nothing returns nothing set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount - 1 endfunction function pushUnit takes unit u_1 returns nothing set OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount] = u_1 set OnUnitEnterLeave_tempUnitsCount = OnUnitEnterLeave_tempUnitsCount + 1 endfunction function trigger_evaluate takes trigger this_1 returns boolean return TriggerEvaluate(this_1) endfunction function unit_addAbility takes unit this_1, integer abil returns boolean return UnitAddAbility(this_1, abil) endfunction function unit_makeAbilityPermanent takes unit this_1, integer abil, boolean flag returns boolean return UnitMakeAbilityPermanent(this_1, flag, abil) endfunction function prepareUnit takes unit u_1 returns nothing local unit receiver = u_1 local unit receiver_1 call unit_addAbility(receiver, OnUnitEnterLeave_ABILITY_ID) set receiver_1 = receiver call unit_makeAbilityPermanent(receiver_1, OnUnitEnterLeave_ABILITY_ID, true) call pushUnit(u_1) call trigger_evaluate(OnUnitEnterLeave_eventTrigger) call popUnit() endfunction function code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetFilterUnit()) endfunction function ChunkedString_hasChunk takes integer this_1 returns boolean return ChunkedString_readIndex[this_1] < ChunkedString_chunkCount[this_1] endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk takes integer this_1 returns boolean local boolean ChunkedString_ChunkedString_hasChunk_result if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.hasChunk") else call error("Called ChunkedString.hasChunk on invalid object.") endif endif set ChunkedString_ChunkedString_hasChunk_result = ChunkedString_hasChunk(this_1) return ChunkedString_ChunkedString_hasChunk_result endfunction function hashtable_loadString takes hashtable this_1, integer parentKey, integer childKey returns string return LoadStr(this_1, parentKey, childKey) endfunction function Table_loadString takes integer this_1, integer parentKey returns string return hashtable_loadString(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadString takes integer this_1, integer parentKey returns string local string Table_Table_loadString_result 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 Table_Table_loadString_result = Table_loadString(this_1, parentKey) 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_getChunk takes integer this_1, integer index returns string 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.getChunk") else call error("Called ChunkedString.getChunk on invalid object.") endif endif set ChunkedString_ChunkedString_getChunk_result = ChunkedString_getChunk(this_1, index) return ChunkedString_ChunkedString_getChunk_result endfunction function ChunkedString_readChunk takes integer this_1 returns string set ChunkedString_readIndex[this_1] = ChunkedString_readIndex[this_1] + 1 return dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(this_1, ChunkedString_readIndex[this_1]) endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk takes integer this_1 returns string local string ChunkedString_ChunkedString_readChunk_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 ChunkedString_ChunkedString_readChunk_result = ChunkedString_readChunk(this_1) return ChunkedString_ChunkedString_readChunk_result endfunction function LinkedList_getFirst takes integer this_1 returns integer return LLEntry_elem[LLEntry_next[LinkedList_dummy[this_1]]] endfunction function dispatch_LinkedList_LinkedList_LinkedList_getFirst takes integer this_1 returns integer local integer LinkedList_LinkedList_getFirst_result 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 LinkedList_LinkedList_getFirst_result = LinkedList_getFirst(this_1) return LinkedList_LinkedList_getFirst_result endfunction function LinkedList_isEmpty takes integer this_1 returns boolean return LinkedList_size[this_1] == 0 endfunction function dispatch_LinkedList_LinkedList_LinkedList_isEmpty takes integer this_1 returns boolean local boolean LinkedList_LinkedList_isEmpty_result 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 LinkedList_LinkedList_isEmpty_result = LinkedList_isEmpty(this_1) return LinkedList_LinkedList_isEmpty_result endfunction function checkQueue takes nothing returns nothing local integer syncData local string data_1 local boolean hasChunk if not dispatch_LinkedList_LinkedList_LinkedList_isEmpty(SyncSimple_syncQueue) then set syncData = dispatch_LinkedList_LinkedList_LinkedList_getFirst(SyncSimple_syncQueue) if SyncData_data[syncData] != null then if Player_localPlayer == SyncData_syncer[syncData] then call BlzSendSyncData(SyncSimple_DEFAULT_PREFIX, SyncData_data[syncData]) endif else set data_1 = dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(SyncData_buffer[syncData]) set hasChunk = dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk(SyncData_buffer[syncData]) if Player_localPlayer == SyncData_syncer[syncData] then if hasChunk then call BlzSendSyncData(SyncSimple_DEFAULT_PREFIX, data_1) else call BlzSendSyncData(SyncSimple_LAST_CHUNK_PREFIX, data_1) endif endif endif endif endfunction function ChunkedString_getChunkCount takes integer this_1 returns integer return ChunkedString_chunkCount[this_1] + 1 endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount takes integer this_1 returns integer local integer ChunkedString_ChunkedString_getChunkCount_result if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.getChunkCount") else call error("Called ChunkedString.getChunkCount on invalid object.") endif endif set ChunkedString_ChunkedString_getChunkCount_result = ChunkedString_getChunkCount(this_1) return ChunkedString_ChunkedString_getChunkCount_result endfunction function string_length takes string this_1 returns integer return StringLength(this_1) endfunction function ChunkedString_length takes integer this_1 returns integer local integer len local integer i local integer temp if String_ENABLE_MULTIBYTE_SUPPORT then set len = 0 set i = 0 set temp = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(this_1) - 1 loop exitwhen i > temp set len = len + string_length(dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(this_1, i)) set i = i + 1 endloop return len else return ChunkedString_chunkCount[this_1] * ChunkedString_chunkSize[this_1] + string_length(ChunkedString_buffer[this_1]) endif endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_length takes integer this_1 returns integer local integer ChunkedString_ChunkedString_length_result if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.length") else call error("Called ChunkedString.length on invalid object.") endif endif set ChunkedString_ChunkedString_length_result = ChunkedString_length(this_1) return ChunkedString_ChunkedString_length_result endfunction function ChunkedString_resetRead takes integer this_1 returns nothing set ChunkedString_readIndex[this_1] = -1 endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_resetRead takes integer this_1 returns nothing if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.resetRead") else call error("Called ChunkedString.resetRead on invalid object.") endif endif call ChunkedString_resetRead(this_1) endfunction function dispatch_LoadListener_SaveLoadData_LoadListener_onLoad takes integer this_1, integer status, integer data_1 returns nothing endfunction function onDataSynced_sync_SaveLoadData takes integer this_1, integer syncedBuffer returns nothing if dispatch_ChunkedString_ChunkedString_ChunkedString_length(syncedBuffer) == 0 then call dispatch_LoadListener_SaveLoadData_LoadListener_onLoad(listener[this_1], 2, syncedBuffer) elseif dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(syncedBuffer) == "-" then call dispatch_LoadListener_SaveLoadData_LoadListener_onLoad(listener[this_1], 3, syncedBuffer) else call dispatch_ChunkedString_ChunkedString_ChunkedString_resetRead(syncedBuffer) call dispatch_LoadListener_SaveLoadData_LoadListener_onLoad(listener[this_1], 0, syncedBuffer) endif endfunction function dispatch_BufferSyncListener_SyncSimple_BufferSyncListener_onDataSynced takes integer this_1, integer buffer returns nothing if BufferSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BufferSyncListener.onDataSynced") else call error("Called BufferSyncListener.onDataSynced on invalid object.") endif endif call onDataSynced_sync_SaveLoadData(this_1, buffer) endfunction function hashtable_saveString takes hashtable this_1, integer parentKey, integer childKey, string value returns nothing call SaveStr(this_1, parentKey, childKey, value) endfunction function Table_saveString takes integer this_1, integer parentKey, string value returns nothing call hashtable_saveString(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveString takes integer this_1, integer parentKey, string value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveString") else call error("Called Table.saveString on invalid object.") endif endif call Table_saveString(this_1, parentKey, value) endfunction function min_2 takes integer numbers_0, integer numbers_1 returns integer local integer minNumber = Integer_INT_MAX local integer cond_result 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 return minNumber endfunction function string_substring takes string this_1, integer start, integer stop returns string return SubString(this_1, start, stop) endfunction function string_substring_852 takes string this_1, integer start returns string return SubString(this_1, start, string_length(this_1)) endfunction function ChunkedString_append takes integer this_1, string pdata returns nothing local string data_1 = pdata local integer remain loop exitwhen not true set remain = ChunkedString_chunkSize[this_1] - string_length(ChunkedString_buffer[this_1]) if String_ENABLE_MULTIBYTE_SUPPORT and remain > 0 and string_length(data_1) >= remain and string_getHash(string_substring(data_1, remain - 1, remain)) == 1843378377 then set remain = remain + 1 endif set ChunkedString_buffer[this_1] = ChunkedString_buffer[this_1] + string_substring(data_1, 0, remain) if string_length(ChunkedString_buffer[this_1]) >= ChunkedString_chunkSize[this_1] then call dispatch_Table_Table_Table_saveString(ChunkedString_table[this_1], ChunkedString_chunkCount[this_1], ChunkedString_buffer[this_1]) set ChunkedString_buffer[this_1] = "" set ChunkedString_chunkCount[this_1] = ChunkedString_chunkCount[this_1] + 1 endif set data_1 = string_substring_852(data_1, min_2(remain, string_length(data_1))) if string_length(data_1) == 0 then exitwhen true endif endloop endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_append takes integer this_1, string pdata returns nothing if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.append") else call error("Called ChunkedString.append on invalid object.") endif endif call ChunkedString_append(this_1, pdata) endfunction function LLEntry_onDestroy takes integer this_1 returns nothing endfunction function dealloc_LLEntry takes integer obj returns nothing if LLEntry_typeId[obj] == 0 then call error("Double free: object of type LLEntry") else set LLEntry_nextFree[LLEntry_firstFree] = obj set LLEntry_firstFree = LLEntry_firstFree + 1 set LLEntry_typeId[obj] = 0 endif endfunction function destroyLLEntry takes integer this_1 returns nothing call LLEntry_onDestroy(this_1) call dealloc_LLEntry(this_1) endfunction function dispatch_LLEntry_destroyLLEntry takes integer this_1 returns nothing if LLEntry_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLEntry.LLEntry") else call error("Called LLEntry.LLEntry on invalid object.") endif endif call destroyLLEntry(this_1) endfunction function LinkedList_removeEntry takes integer this_1, integer entry returns nothing set LLEntry_next[LLEntry_prev[entry]] = LLEntry_next[entry] set LLEntry_prev[LLEntry_next[entry]] = LLEntry_prev[entry] call dispatch_LLEntry_destroyLLEntry(entry) set LinkedList_size[this_1] = LinkedList_size[this_1] - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_removeEntry takes integer this_1, integer entry returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.removeEntry") else call error("Called LinkedList.removeEntry on invalid object.") endif endif call LinkedList_removeEntry(this_1, entry) endfunction function LinkedList_dequeue takes integer this_1 returns integer local integer top = LLEntry_next[LinkedList_dummy[this_1]] local integer result_1 = 0 if top != LinkedList_dummy[this_1] then set result_1 = LLEntry_elem[top] call dispatch_LinkedList_LinkedList_LinkedList_removeEntry(this_1, top) endif return result_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_dequeue takes integer this_1 returns integer local integer LinkedList_LinkedList_dequeue_result 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 LinkedList_LinkedList_dequeue_result = LinkedList_dequeue(this_1) return LinkedList_LinkedList_dequeue_result endfunction function dispatch_BoolSyncListener_SyncSimple_BoolSyncListener_onDataSynced takes integer this_1, boolean data_1 returns nothing endfunction function dealloc_BoolSyncListener takes integer obj returns nothing if BoolSyncListener_typeId[obj] == 0 then call error("Double free: object of type BoolSyncListener") else set BoolSyncListener_firstFree = BoolSyncListener_firstFree + 1 set BoolSyncListener_typeId[obj] = 0 endif endfunction function destroyBoolSyncListener takes integer this_1 returns nothing call dealloc_BoolSyncListener(this_1) endfunction function dispatch_BoolSyncListener_destroyBoolSyncListener takes integer this_1 returns nothing if BoolSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BoolSyncListener.BoolSyncListener") else call error("Called BoolSyncListener.BoolSyncListener on invalid object.") endif endif call destroyBoolSyncListener(this_1) endfunction function string_toBool takes string this_1 returns boolean local boolean cond_result if this_1 == "1" or this_1 == "true" then set cond_result = true else set cond_result = false endif return cond_result endfunction function onDataSynced_sync_SyncSimple takes integer this_1, string data_1 returns nothing call dispatch_BoolSyncListener_SyncSimple_BoolSyncListener_onDataSynced(listener_444[this_1], string_toBool(data_1)) call dispatch_BoolSyncListener_destroyBoolSyncListener(listener_444[this_1]) endfunction function dispatch_IntSyncListener_SyncSimple_IntSyncListener_onDataSynced takes integer this_1, integer data_1 returns nothing endfunction function dealloc_IntSyncListener takes integer obj returns nothing if IntSyncListener_typeId[obj] == 0 then call error("Double free: object of type IntSyncListener") else set IntSyncListener_firstFree = IntSyncListener_firstFree + 1 set IntSyncListener_typeId[obj] = 0 endif endfunction function destroyIntSyncListener takes integer this_1 returns nothing call dealloc_IntSyncListener(this_1) endfunction function dispatch_IntSyncListener_destroyIntSyncListener takes integer this_1 returns nothing if IntSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IntSyncListener.IntSyncListener") else call error("Called IntSyncListener.IntSyncListener on invalid object.") endif endif call destroyIntSyncListener(this_1) endfunction function string_toInt takes string this_1 returns integer return S2I(this_1) endfunction function onDataSynced_sync_SyncSimple_796 takes integer this_1, string data_1 returns nothing call dispatch_IntSyncListener_SyncSimple_IntSyncListener_onDataSynced(listener_445[this_1], string_toInt(data_1)) call dispatch_IntSyncListener_destroyIntSyncListener(listener_445[this_1]) endfunction function dispatch_RealSyncListener_SyncSimple_RealSyncListener_onDataSynced takes integer this_1, real data_1 returns nothing endfunction function dealloc_RealSyncListener takes integer obj returns nothing if RealSyncListener_typeId[obj] == 0 then call error("Double free: object of type RealSyncListener") else set RealSyncListener_firstFree = RealSyncListener_firstFree + 1 set RealSyncListener_typeId[obj] = 0 endif endfunction function destroyRealSyncListener takes integer this_1 returns nothing call dealloc_RealSyncListener(this_1) endfunction function dispatch_RealSyncListener_destroyRealSyncListener takes integer this_1 returns nothing if RealSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling RealSyncListener.RealSyncListener") else call error("Called RealSyncListener.RealSyncListener on invalid object.") endif endif call destroyRealSyncListener(this_1) endfunction function string_toReal takes string this_1 returns real return S2R(this_1) endfunction function onDataSynced_sync_SyncSimple_797 takes integer this_1, string data_1 returns nothing call dispatch_RealSyncListener_SyncSimple_RealSyncListener_onDataSynced(listener_446[this_1], string_toReal(data_1)) call dispatch_RealSyncListener_destroyRealSyncListener(listener_446[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] <= 4295 then if StringSyncListener_typeId[this_1] <= 4294 then call onDataSynced_sync_SyncSimple(this_1, data_1) else call onDataSynced_sync_SyncSimple_796(this_1, data_1) endif else call onDataSynced_sync_SyncSimple_797(this_1, data_1) endif endfunction function dealloc_BufferSyncListener takes integer obj returns nothing if BufferSyncListener_typeId[obj] == 0 then call error("Double free: object of type BufferSyncListener") else set BufferSyncListener_firstFree = BufferSyncListener_firstFree + 1 set BufferSyncListener_typeId[obj] = 0 endif endfunction function destroyBufferSyncListener takes integer this_1 returns nothing call dealloc_BufferSyncListener(this_1) endfunction function dispatch_BufferSyncListener_destroyBufferSyncListener takes integer this_1 returns nothing if BufferSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BufferSyncListener.BufferSyncListener") else call error("Called BufferSyncListener.BufferSyncListener on invalid object.") endif endif call destroyBufferSyncListener(this_1) endfunction function hashtable_flushChild takes hashtable this_1, integer parentKey returns nothing call FlushChildHashtable(this_1, parentKey) endfunction function Table_flush takes integer this_1 returns nothing call hashtable_flushChild(Table_ht, this_1) endfunction function HashMap_flush takes integer this_1 returns nothing set HashMap_size[this_1] = 0 call Table_flush(this_1) endfunction function HashList_clear takes integer this_1 returns nothing call hashtable_flushChild(HashList_ht, this_1) call hashtable_flushChild(HashList_occurences, this_1) set HashList_size[this_1] = 0 endfunction function HashSet_clear takes integer this_1 returns nothing call HashList_clear(this_1) call hashtable_flushChild(HashSet_position, this_1) endfunction function dispatch_HashList_HashList_HashList_clear takes integer this_1 returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.clear") else call error("Called HashList.clear on invalid object.") endif endif if HashList_typeId[this_1] <= 2510 then call HashList_clear(this_1) else call HashSet_clear(this_1) endif endfunction function IterableMap_flush takes integer this_1 returns nothing if not IterableMap__destroyed[this_1] then call dispatch_HashList_HashList_HashList_clear(IterableMap_keys[this_1]) endif call HashMap_flush(this_1) endfunction function dispatch_Table_Table_Table_flush takes integer this_1 returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.flush") else call error("Called Table.flush on invalid object.") endif endif if Table_typeId[this_1] <= 4317 then if Table_typeId[this_1] <= 4316 then call Table_flush(this_1) else call HashMap_flush(this_1) endif else call IterableMap_flush(this_1) endif endfunction function Table_onDestroy takes integer this_1 returns nothing call dispatch_Table_Table_Table_flush(this_1) endfunction function HashMap_onDestroy takes integer this_1 returns nothing call Table_onDestroy(this_1) endfunction function HashList_onDestroy takes integer this_1 returns nothing call dispatch_HashList_HashList_HashList_clear(this_1) endfunction function dealloc_HashList takes integer obj returns nothing if HashList_typeId[obj] == 0 then call error("Double free: object of type HashList") else set HashList_firstFree = HashList_firstFree + 1 set HashList_typeId[obj] = 0 endif endfunction function destroyHashList takes integer this_1 returns nothing call HashList_onDestroy(this_1) call dealloc_HashList(this_1) endfunction function HashSet_onDestroy takes integer this_1 returns nothing call hashtable_flushChild(HashSet_position, this_1) call HashList_onDestroy(this_1) endfunction function dealloc_HashSet takes integer obj returns nothing if HashList_typeId[obj] == 0 then call error("Double free: object of type HashSet") else set HashList_firstFree = HashList_firstFree + 1 set HashList_typeId[obj] = 0 endif endfunction function destroyHashSet takes integer this_1 returns nothing call HashSet_onDestroy(this_1) call dealloc_HashSet(this_1) endfunction function dispatch_HashList_destroyHashList takes integer this_1 returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.HashList") else call error("Called HashList.HashList on invalid object.") endif endif if HashList_typeId[this_1] <= 2510 then call destroyHashList(this_1) else call destroyHashSet(this_1) endif endfunction function IterableMap_onDestroy takes integer this_1 returns nothing call dispatch_HashList_destroyHashList(IterableMap_keys[this_1]) set IterableMap__destroyed[this_1] = true call HashMap_onDestroy(this_1) endfunction function dealloc_IterableMap takes integer obj returns nothing if Table_typeId[obj] == 0 then call error("Double free: object of type IterableMap") else set Table_nextFree[Table_firstFree] = obj set Table_firstFree = Table_firstFree + 1 set Table_typeId[obj] = 0 endif endfunction function destroyIterableMap takes integer this_1 returns nothing call IterableMap_onDestroy(this_1) call dealloc_IterableMap(this_1) endfunction function dealloc_Table takes integer obj returns nothing if Table_typeId[obj] == 0 then call error("Double free: object of type Table") else set Table_nextFree[Table_firstFree] = obj set Table_firstFree = Table_firstFree + 1 set Table_typeId[obj] = 0 endif endfunction function destroyTable takes integer this_1 returns nothing call Table_onDestroy(this_1) call dealloc_Table(this_1) endfunction function dispatch_Table_destroyTable takes integer this_1 returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.Table") else call error("Called Table.Table on invalid object.") endif endif if Table_typeId[this_1] <= 4317 then call destroyTable(this_1) else call destroyIterableMap(this_1) endif endfunction function ChunkedString_onDestroy takes integer this_1 returns nothing call dispatch_Table_destroyTable(ChunkedString_table[this_1]) endfunction function dealloc_ChunkedString takes integer obj returns nothing if ChunkedString_typeId[obj] == 0 then call error("Double free: object of type ChunkedString") else set ChunkedString_nextFree[ChunkedString_firstFree] = obj set ChunkedString_firstFree = ChunkedString_firstFree + 1 set ChunkedString_typeId[obj] = 0 endif endfunction function destroyChunkedString takes integer this_1 returns nothing call ChunkedString_onDestroy(this_1) call dealloc_ChunkedString(this_1) endfunction function dispatch_ChunkedString_destroyChunkedString takes integer this_1 returns nothing if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.ChunkedString") else call error("Called ChunkedString.ChunkedString on invalid object.") endif endif call destroyChunkedString(this_1) endfunction function dealloc_StringSyncListener takes integer obj returns nothing if StringSyncListener_typeId[obj] == 0 then call error("Double free: object of type StringSyncListener") else set StringSyncListener_firstFree = StringSyncListener_firstFree + 1 set StringSyncListener_typeId[obj] = 0 endif endfunction function destroyStringSyncListener takes integer this_1 returns nothing call dealloc_StringSyncListener(this_1) endfunction function dispatch_StringSyncListener_destroyStringSyncListener takes integer this_1 returns nothing if StringSyncListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling StringSyncListener.StringSyncListener") else call error("Called StringSyncListener.StringSyncListener on invalid object.") endif endif call destroyStringSyncListener(this_1) endfunction function SyncData_onDestroy takes integer this_1 returns nothing if SyncData_slistener[this_1] != 0 then call dispatch_StringSyncListener_destroyStringSyncListener(SyncData_slistener[this_1]) endif if SyncData_blistener[this_1] != 0 then call dispatch_BufferSyncListener_destroyBufferSyncListener(SyncData_blistener[this_1]) endif if SyncData_buffer[this_1] != 0 then call dispatch_ChunkedString_destroyChunkedString(SyncData_buffer[this_1]) endif endfunction function dealloc_SyncData takes integer obj returns nothing if SyncData_typeId[obj] == 0 then call error("Double free: object of type SyncData") else set SyncData_firstFree = SyncData_firstFree + 1 set SyncData_typeId[obj] = 0 endif endfunction function destroySyncData takes integer this_1 returns nothing call SyncData_onDestroy(this_1) call dealloc_SyncData(this_1) endfunction function dispatch_SyncData_destroySyncData takes integer this_1 returns nothing if SyncData_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SyncData.SyncData") else call error("Called SyncData.SyncData on invalid object.") endif endif call destroySyncData(this_1) endfunction function shouldSync takes nothing returns boolean return SyncSimple_SYNC_IN_REPLAYS or GameStatus_gameStatus != 3 endfunction function code__addAction_SyncSimple takes nothing returns nothing local string eventData = BlzGetTriggerSyncData() local string eventPrefix = BlzGetTriggerSyncPrefix() local integer syncData = dispatch_LinkedList_LinkedList_LinkedList_getFirst(SyncSimple_syncQueue) if SyncData_data[syncData] != null then call dispatch_StringSyncListener_SyncSimple_StringSyncListener_onDataSynced(SyncData_slistener[syncData], eventData) call dispatch_LinkedList_LinkedList_LinkedList_dequeue(SyncSimple_syncQueue) call dispatch_SyncData_destroySyncData(syncData) else call dispatch_ChunkedString_ChunkedString_ChunkedString_append(SyncData_syncBuffer[syncData], eventData) if eventPrefix == SyncSimple_LAST_CHUNK_PREFIX then call dispatch_BufferSyncListener_SyncSimple_BufferSyncListener_onDataSynced(SyncData_blistener[syncData], SyncData_syncBuffer[syncData]) call dispatch_LinkedList_LinkedList_LinkedList_dequeue(SyncSimple_syncQueue) call dispatch_SyncData_destroySyncData(syncData) endif endif if shouldSync() then call checkQueue() endif endfunction function code__addAction_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_390 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function getEnterLeaveUnit takes nothing returns unit if OnUnitEnterLeave_tempUnitsCount <= 0 then return null endif return OnUnitEnterLeave_tempUnits[OnUnitEnterLeave_tempUnitsCount - 1] endfunction function shouldIndex takes unit w_u returns boolean return true endfunction function alloc_UnitIndex takes nothing returns integer local integer this_1 if UnitIndex_firstFree == 0 then if UnitIndex_maxIndex < JASS_MAX_ARRAY_SIZE then set UnitIndex_maxIndex = UnitIndex_maxIndex + 1 set this_1 = UnitIndex_maxIndex set UnitIndex_typeId[this_1] = 4519 else call error("Out of memory: Could not create UnitIndex.") set this_1 = 0 endif else set UnitIndex_firstFree = UnitIndex_firstFree - 1 set this_1 = UnitIndex_nextFree[UnitIndex_firstFree] set UnitIndex_typeId[this_1] = 4519 endif return this_1 endfunction function UnitIndex_init takes integer this_1 returns nothing endfunction function popUnit_812 takes nothing returns nothing set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 endfunction function pushUnit_818 takes unit u_1 returns nothing set UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount] = u_1 set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount + 1 endfunction function unit_setUserData takes unit this_1, integer data_1 returns nothing call SetUnitUserData(this_1, data_1) endfunction function construct_UnitIndex takes integer this_1, unit whichUnit returns nothing call UnitIndex_init(this_1) set UnitIndex__unit[this_1] = whichUnit call unit_setUserData(UnitIndex__unit[this_1], this_1) call pushUnit_818(whichUnit) call trigger_evaluate(UnitIndexer_onIndexTrigger) call popUnit_812() endfunction function new_UnitIndex takes unit whichUnit returns integer local integer this_1 = alloc_UnitIndex() call construct_UnitIndex(this_1, whichUnit) return this_1 endfunction function unit_toUnitIndex takes unit this_1 returns integer local integer instance_1 = unit_getUserData(this_1) if instance_1 == 0 then set instance_1 = new_UnitIndex(this_1) endif return instance_1 endfunction function code__onEnter_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_toUnitIndex(getEnterLeaveUnit()) endif endfunction function UnitIndex_onDestroy takes integer this_1 returns nothing call pushUnit_818(UnitIndex__unit[this_1]) call trigger_evaluate(UnitIndexer_onDeindexTrigger) call popUnit_812() call unit_setUserData(UnitIndex__unit[this_1], 0) endfunction function dealloc_UnitIndex takes integer obj returns nothing if UnitIndex_typeId[obj] == 0 then call error("Double free: object of type UnitIndex") else set UnitIndex_nextFree[UnitIndex_firstFree] = obj set UnitIndex_firstFree = UnitIndex_firstFree + 1 set UnitIndex_typeId[obj] = 0 endif endfunction function destroyUnitIndex takes integer this_1 returns nothing call UnitIndex_onDestroy(this_1) call dealloc_UnitIndex(this_1) endfunction function dispatch_UnitIndex_destroyUnitIndex takes integer this_1 returns nothing if UnitIndex_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitIndex.UnitIndex") else call error("Called UnitIndex.UnitIndex on invalid object.") endif endif call destroyUnitIndex(this_1) endfunction function unit_deindex takes unit this_1 returns boolean if unit_getUserData(this_1) == 0 then return false else call dispatch_UnitIndex_destroyUnitIndex(unit_toUnitIndex(this_1)) return true endif endfunction function code__onLeave_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_deindex(getEnterLeaveUnit()) endif endfunction function getIndexingUnit takes nothing returns unit if UnitIndexer_tempUnitsCount <= 0 then return null endif return UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1] endfunction function Table_loadInt takes integer this_1, integer parentKey returns integer return hashtable_loadInt(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadInt takes integer this_1, integer parentKey returns integer local integer Table_Table_loadInt_result 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 Table_Table_loadInt_result = Table_loadInt(this_1, parentKey) return Table_Table_loadInt_result endfunction function HashMap_get takes integer this_1, integer key returns integer return dispatch_Table_Table_Table_loadInt(this_1, key) endfunction function dispatch_HashMap_HashMap_HashMap_get takes integer this_1, integer key returns integer local integer HashMap_HashMap_get_result 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 HashMap_HashMap_get_result = HashMap_get(this_1, key) return HashMap_HashMap_get_result endfunction function Table_hasInt takes integer this_1, integer parentKey returns boolean return hashtable_hasInt(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_hasInt takes integer this_1, integer parentKey returns boolean local boolean Table_Table_hasInt_result 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 Table_Table_hasInt_result = Table_hasInt(this_1, parentKey) return Table_Table_hasInt_result endfunction function HashMap_has takes integer this_1, integer key returns boolean return dispatch_Table_Table_Table_hasInt(this_1, key) endfunction function dispatch_HashMap_HashMap_HashMap_has takes integer this_1, integer key returns boolean local boolean HashMap_HashMap_has_result if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.has") else call error("Called HashMap.has on invalid object.") endif endif set HashMap_HashMap_has_result = HashMap_has(this_1, key) return HashMap_HashMap_has_result endfunction function Table_saveInt takes integer this_1, integer parentKey, integer value returns nothing call hashtable_saveInt(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveInt takes integer this_1, integer parentKey, integer value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveInt") else call error("Called Table.saveInt on invalid object.") endif endif call Table_saveInt(this_1, parentKey, value) endfunction function HashMap_put takes integer this_1, integer key, integer value returns nothing if not dispatch_HashMap_HashMap_HashMap_has(this_1, key) then set HashMap_size[this_1] = HashMap_size[this_1] + 1 endif call dispatch_Table_Table_Table_saveInt(this_1, key, value) endfunction function HashList_count takes integer this_1, integer elem returns integer return hashtable_loadInt(HashList_occurences, this_1, elem) endfunction function dispatch_HashList_HashList_HashList_count takes integer this_1, integer elem returns integer local integer HashList_HashList_count_result 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 HashList_HashList_count_result = HashList_count(this_1, elem) return HashList_HashList_count_result endfunction function HashList_incrOccurences takes integer this_1, integer elem returns nothing call hashtable_saveInt(HashList_occurences, this_1, elem, dispatch_HashList_HashList_HashList_count(this_1, elem) + 1) endfunction function dispatch_HashList_HashList_HashList_incrOccurences takes integer this_1, integer elem returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.incrOccurences") else call error("Called HashList.incrOccurences on invalid object.") endif endif call HashList_incrOccurences(this_1, elem) endfunction function HashList_add_1 takes integer this_1, integer elems_0 returns nothing call hashtable_saveInt(HashList_ht, this_1, HashList_size[this_1], elems_0) call dispatch_HashList_HashList_HashList_incrOccurences(this_1, elems_0) set HashList_size[this_1] = HashList_size[this_1] + 1 endfunction function HashList_size_1 takes integer this_1 returns integer return HashList_size[this_1] endfunction function dispatch_HashList_HashList_HashList_size takes integer this_1 returns integer local integer HashList_HashList_size_result if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.size") else call error("Called HashList.size on invalid object.") endif endif set HashList_HashList_size_result = HashList_size_1(this_1) return HashList_HashList_size_result endfunction function HashSet_add_1 takes integer this_1, integer elems_0 returns nothing if dispatch_HashList_HashList_HashList_count(this_1, elems_0) <= 0 then call hashtable_saveInt(HashSet_position, this_1, elems_0, dispatch_HashList_HashList_HashList_size(this_1)) call HashList_add_1(this_1, elems_0) endif endfunction function dispatch_HashList_HashList_HashList_add_1 takes integer this_1, integer elems_0 returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.add") else call error("Called HashList.add on invalid object.") endif endif if HashList_typeId[this_1] <= 2510 then call HashList_add_1(this_1, elems_0) else call HashSet_add_1(this_1, elems_0) endif endfunction function HashList_has takes integer this_1, integer elem returns boolean return dispatch_HashList_HashList_HashList_count(this_1, elem) > 0 endfunction function dispatch_HashList_HashList_HashList_has takes integer this_1, integer elem returns boolean local boolean HashList_HashList_has_result if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.has") else call error("Called HashList.has on invalid object.") endif endif set HashList_HashList_has_result = HashList_has(this_1, elem) return HashList_HashList_has_result endfunction function IterableMap_hasKey takes integer this_1, integer key returns boolean return dispatch_HashList_HashList_HashList_has(IterableMap_keys[this_1], key) endfunction function dispatch_IterableMap_HashMap_IterableMap_hasKey takes integer this_1, integer key returns boolean local boolean HashMap_IterableMap_hasKey_result 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 HashMap_IterableMap_hasKey_result = IterableMap_hasKey(this_1, key) return HashMap_IterableMap_hasKey_result endfunction function IterableMap_put takes integer this_1, integer key, integer value returns nothing call HashMap_put(this_1, key, value) if not dispatch_IterableMap_HashMap_IterableMap_hasKey(this_1, key) then call dispatch_HashList_HashList_HashList_add_1(IterableMap_keys[this_1], key) endif endfunction function dispatch_HashMap_HashMap_HashMap_put takes integer this_1, integer key, integer value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.put") else call error("Called HashMap.put on invalid object.") endif endif if Table_typeId[this_1] <= 4317 then call HashMap_put(this_1, key, value) else call IterableMap_put(this_1, key, value) endif endfunction function Table_removeInt takes integer this_1, integer parentKey returns nothing call RemoveSavedInteger(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_removeInt takes integer this_1, integer parentKey returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.removeInt") else call error("Called Table.removeInt on invalid object.") endif endif call Table_removeInt(this_1, parentKey) endfunction function HashMap_remove takes integer this_1, integer key returns nothing if dispatch_HashMap_HashMap_HashMap_has(this_1, key) then set HashMap_size[this_1] = HashMap_size[this_1] - 1 endif call dispatch_Table_Table_Table_removeInt(this_1, key) endfunction function HashList_decrOccurences takes integer this_1, integer elem returns nothing call hashtable_saveInt(HashList_occurences, this_1, elem, dispatch_HashList_HashList_HashList_count(this_1, elem) - 1) endfunction function dispatch_HashList_HashList_HashList_decrOccurences takes integer this_1, integer elem returns nothing if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.decrOccurences") else call error("Called HashList.decrOccurences on invalid object.") endif endif call HashList_decrOccurences(this_1, elem) endfunction function HashList_removeAt takes integer this_1, integer index returns integer local integer tmp local integer i local integer temp call dispatch_HashList_HashList_HashList_decrOccurences(this_1, hashtable_loadInt(HashList_ht, this_1, index)) set tmp = hashtable_loadInt(HashList_ht, this_1, index) set i = index set temp = HashList_size[this_1] loop exitwhen i > temp call hashtable_saveInt(HashList_ht, this_1, i, hashtable_loadInt(HashList_ht, this_1, i + 1)) set i = i + 1 endloop set HashList_size[this_1] = HashList_size[this_1] - 1 return tmp endfunction function HashList_get takes integer this_1, integer index returns integer return hashtable_loadInt(HashList_ht, this_1, index) endfunction function dispatch_HashList_HashList_HashList_get takes integer this_1, integer index returns integer local integer HashList_HashList_get_result 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 HashList_HashList_get_result = HashList_get(this_1, index) return HashList_HashList_get_result endfunction function hashtable_removeInt takes hashtable this_1, integer parentKey, integer childKey returns nothing call RemoveSavedInteger(this_1, parentKey, childKey) endfunction function HashSet_removeAt takes integer this_1, integer index returns integer local integer i local integer temp call hashtable_removeInt(HashSet_position, this_1, dispatch_HashList_HashList_HashList_get(this_1, index)) set i = index + 1 set temp = dispatch_HashList_HashList_HashList_size(this_1) loop exitwhen i > temp call hashtable_saveInt(HashSet_position, this_1, dispatch_HashList_HashList_HashList_get(this_1, i), hashtable_loadInt(HashSet_position, this_1, dispatch_HashList_HashList_HashList_get(this_1, i)) - 1) set i = i + 1 endloop return HashList_removeAt(this_1, index) endfunction function dispatch_HashList_HashList_HashList_removeAt takes integer this_1, integer index returns integer local integer HashList_HashList_removeAt_result if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.removeAt") else call error("Called HashList.removeAt on invalid object.") endif endif if HashList_typeId[this_1] <= 2510 then set HashList_HashList_removeAt_result = HashList_removeAt(this_1, index) else set HashList_HashList_removeAt_result = HashSet_removeAt(this_1, index) endif return HashList_HashList_removeAt_result endfunction function HashList_remove takes integer this_1, integer t returns boolean local boolean result_1 = false local integer i = 0 local integer temp = HashList_size[this_1] - 1 loop exitwhen i > temp if t == hashtable_loadInt(HashList_ht, this_1, i) then set result_1 = true call dispatch_HashList_HashList_HashList_removeAt(this_1, i) exitwhen true endif set i = i + 1 endloop return result_1 endfunction function dispatch_HashSet_HashSet_HashSet_removeAt takes integer this_1, integer index returns integer local integer HashSet_HashSet_removeAt_result if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashSet.removeAt") else call error("Called HashSet.removeAt on invalid object.") endif endif set HashSet_HashSet_removeAt_result = HashSet_removeAt(this_1, index) return HashSet_HashSet_removeAt_result endfunction function HashSet_remove takes integer this_1, integer elem returns boolean local boolean result_1 = false if dispatch_HashList_HashList_HashList_count(this_1, elem) > 0 then call dispatch_HashSet_HashSet_HashSet_removeAt(this_1, hashtable_loadInt(HashSet_position, this_1, elem)) set result_1 = true endif return result_1 endfunction function dispatch_HashList_HashList_HashList_remove takes integer this_1, integer t returns boolean local boolean HashList_HashList_remove_result if HashList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashList.remove") else call error("Called HashList.remove on invalid object.") endif endif if HashList_typeId[this_1] <= 2510 then set HashList_HashList_remove_result = HashList_remove(this_1, t) else set HashList_HashList_remove_result = HashSet_remove(this_1, t) endif return HashList_HashList_remove_result endfunction function IterableMap_remove takes integer this_1, integer key returns nothing call HashMap_remove(this_1, key) if dispatch_IterableMap_HashMap_IterableMap_hasKey(this_1, key) then call dispatch_HashList_HashList_HashList_remove(IterableMap_keys[this_1], key) endif endfunction function dispatch_HashMap_HashMap_HashMap_remove takes integer this_1, integer key returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.remove") else call error("Called HashMap.remove on invalid object.") endif endif if Table_typeId[this_1] <= 4317 then call HashMap_remove(this_1, key) else call IterableMap_remove(this_1, key) endif endfunction function OnCastListener_onDestroy takes integer this_1 returns nothing local integer index local integer listener_1 local integer listener_2 if OnCastListener_eventUnit[this_1] != null then set index = unit_getIndex(OnCastListener_eventUnit[this_1]) 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 listener_2 = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, OnCastListener_abilId[this_1]) 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 if OnCastListener_next[this_1] != 0 then set OnCastListener_prev[OnCastListener_next[this_1]] = OnCastListener_prev[this_1] endif set OnCastListener_next[this_1] = 0 set OnCastListener_prev[this_1] = 0 endfunction function dealloc_OnCastListener takes integer obj returns nothing if OnCastListener_typeId[obj] == 0 then call error("Double free: object of type OnCastListener") else set OnCastListener_firstFree = OnCastListener_firstFree + 1 set OnCastListener_typeId[obj] = 0 endif endfunction function destroyOnCastListener takes integer this_1 returns nothing call OnCastListener_onDestroy(this_1) call dealloc_OnCastListener(this_1) endfunction function dispatch_OnCastListener_destroyOnCastListener takes integer this_1 returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.OnCastListener") else call error("Called OnCastListener.OnCastListener on invalid object.") endif endif call destroyOnCastListener(this_1) endfunction function EventListener_onDestroy takes integer this_1 returns nothing local integer listener_1 local integer listener_2 if EventListener_uid[this_1] < 0 then set listener_1 = EventListener_generalListenersFirsts[EventListener_eventId[this_1]] if listener_1 == this_1 then set EventListener_generalListenersFirsts[EventListener_eventId[this_1]] = EventListener_next[this_1] elseif EventListener_prev[this_1] != 0 then set EventListener_next[EventListener_prev[this_1]] = EventListener_next[this_1] endif else set listener_2 = EventListener_unitListenersFirsts[EventListener_uid[this_1]] if listener_2 == this_1 then set EventListener_unitListenersFirsts[EventListener_uid[this_1]] = EventListener_next[this_1] elseif EventListener_prev[this_1] != 0 then set EventListener_next[EventListener_prev[this_1]] = EventListener_next[this_1] endif endif if EventListener_next[this_1] != 0 then set EventListener_prev[EventListener_next[this_1]] = EventListener_prev[this_1] endif set EventListener_next[this_1] = 0 set EventListener_prev[this_1] = 0 endfunction function dealloc_EventListener takes integer obj returns nothing if EventListener_typeId[obj] == 0 then call error("Double free: object of type EventListener") else set EventListener_nextFree[EventListener_firstFree] = obj set EventListener_firstFree = EventListener_firstFree + 1 set EventListener_typeId[obj] = 0 endif endfunction function destroyEventListener takes integer this_1 returns nothing call EventListener_onDestroy(this_1) call dealloc_EventListener(this_1) endfunction function dispatch_EventListener_destroyEventListener takes integer this_1 returns nothing if EventListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EventListener.EventListener") else call error("Called EventListener.EventListener on invalid object.") endif endif call destroyEventListener(this_1) endfunction function unregisterEvents takes integer id_1 returns nothing local integer listener_1 local integer t if id_1 > 0 then if EventListener_unitListenersFirsts[id_1] != 0 then call Log_trace("unregister unit has listeners. startid: " + int_toString(id_1)) set listener_1 = EventListener_unitListenersFirsts[id_1] set EventListener_unitListenersFirsts[id_1] = 0 loop exitwhen not (listener_1 != 0) set t = listener_1 set listener_1 = EventListener_next[listener_1] call dispatch_EventListener_destroyEventListener(t) endloop endif endif endfunction function unregisterEventsForUnit takes unit u_1 returns nothing local integer index local integer listener_1 local integer t if fireEvents(u_1) then set index = unit_getIndex(u_1) call unregisterEvents(index) if EventListener_castMapCasters[index] != 0 then set listener_1 = EventListener_castMapCasters[index] set EventListener_castMapCasters[index] = 0 loop exitwhen 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(getIndexingUnit()) endfunction function unit_clearLastOrders takes unit this_1 returns nothing local integer index = unit_getIndex(this_1) if LastOrder_lastOrder[index] != 0 then call cyc_Order_onDestroy(2, LastOrder_lastOrder[index]) set LastOrder_lastOrder[index] = 0 endif endfunction function code__onUnitDeindex_LastOrder takes nothing returns nothing call unit_clearLastOrders(getIndexingUnit()) endfunction function hashtable_loadTriggerHandle takes hashtable this_1, integer parentKey, integer childKey returns trigger return LoadTriggerHandle(this_1, parentKey, childKey) endfunction function Table_loadTrigger takes integer this_1, integer parentKey returns trigger return hashtable_loadTriggerHandle(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadTrigger takes integer this_1, integer parentKey returns trigger local trigger Table_Table_loadTrigger_result if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadTrigger") else call error("Called Table.loadTrigger on invalid object.") endif endif set Table_Table_loadTrigger_result = Table_loadTrigger(this_1, parentKey) return Table_Table_loadTrigger_result endfunction function hashtable_saveFogStateHandle takes hashtable this_1, integer parentKey, integer childKey, fogstate value returns nothing call SaveFogStateHandle(this_1, parentKey, childKey, value) endfunction function Table_saveFogState takes integer this_1, integer parentKey, fogstate value returns nothing call hashtable_saveFogStateHandle(Table_ht, this_1, parentKey, value) endfunction function dispatch_Table_Table_Table_saveFogState takes integer this_1, integer parentKey, fogstate value returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.saveFogState") else call error("Called Table.saveFogState on invalid object.") endif endif call Table_saveFogState(this_1, parentKey, value) endfunction function triggerFromIndex takes integer index returns trigger call dispatch_Table_Table_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_Table_Table_loadTrigger(TypeCasting_typecastdata, 0) endfunction function code__registerPlayerUnitEvent_RegisterEvents takes nothing returns boolean return trigger_evaluate(triggerFromIndex(dispatch_HashMap_HashMap_HashMap_get(RegisterEvents_onCastMap, GetSpellAbilityId()))) endfunction function dispatch_OnCast_ClosureEvents_OnCast_fireEx takes integer this_1, integer id_1 returns nothing endfunction function OnCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnCast_ClosureEvents_OnCast_fireEx(this_1, GetSpellAbilityId()) endfunction function EventData_getAbilityTargetPos takes nothing returns real set EventData_getAbilityTargetPos_return_x = GetSpellTargetX() set EventData_getAbilityTargetPos_return_y = GetSpellTargetY() return EventData_getAbilityTargetPos_return_x endfunction function EventData_getSpellTargetPos takes nothing returns real set EventData_getSpellTargetPos_return_x = EventData_getAbilityTargetPos() set EventData_getSpellTargetPos_return_y = EventData_getAbilityTargetPos_return_y return EventData_getSpellTargetPos_return_x endfunction function EventData_getSpellTargetUnit takes nothing returns unit return GetSpellTargetUnit() endfunction function dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx takes integer this_1, unit caster, real target_x, real target_y returns nothing endfunction function OnPointCast_fire takes integer this_1, unit caster returns nothing if EventData_getSpellTargetUnit() == null then call dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx(this_1, caster, EventData_getSpellTargetPos(), EventData_getSpellTargetPos_return_y) endif endfunction function dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx takes integer this_1, unit caster, unit target returns nothing endfunction function OnUnitCast_fire takes integer this_1, unit caster returns nothing if EventData_getSpellTargetUnit() != null then call dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx(this_1, caster, EventData_getSpellTargetUnit()) endif 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] <= 3450 then if OnCastListener_typeId[this_1] <= 3449 then call OnCast_fire(this_1, caster) else call OnPointCast_fire(this_1, caster) endif else call OnUnitCast_fire(this_1, caster) endif endfunction function EventListener_onSpellEffect takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer abilId = GetSpellAbilityId() local unit caster = GetSpellAbilityUnit() local integer index = unit_getIndex(trigUnit) local integer listener_1 = EventListener_castMapCasters[index] local integer nextListener local integer nextListener_1 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, caster) endif set listener_1 = nextListener endloop set listener_1 = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId) loop exitwhen not (listener_1 != 0) set nextListener_1 = OnCastListener_next[listener_1] if OnCastListener_eventUnit[listener_1] == null or OnCastListener_eventUnit[listener_1] == trigUnit then call dispatch_OnCastListener_ClosureEvents_OnCastListener_fire(listener_1, caster) endif set listener_1 = nextListener_1 endloop endfunction function code__registerPlayerUnitEvent_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_onSpellEffect() endfunction function trigger_execute takes trigger this_1 returns nothing call TriggerExecute(this_1) endfunction function unit_getAbilityLevel takes unit this_1, integer id_1 returns integer return GetUnitAbilityLevel(this_1, id_1) endfunction function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave takes nothing returns nothing local unit leavingUnit = GetTriggerUnit() if unit_getAbilityLevel(leavingUnit, OnUnitEnterLeave_ABILITY_ID) == 0 and GetIssuedOrderId() == OrderIds_undefend then call pushUnit(leavingUnit) call trigger_execute(OnUnitEnterLeave_eventTrigger) call popUnit() endif endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + Basics_ANIMATION_PERIOD endfunction function alloc_CallbackSingle_doAfter_Cinematic_Cinematic takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1307 else call error("Out of memory: Could not create CallbackSingle_doAfter_Cinematic_Cinematic.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1307 endif return this_1 endfunction function CallbackSingle_init takes integer this_1 returns nothing endfunction function construct_CallbackSingle takes integer this_1 returns nothing call CallbackSingle_init(this_1) endfunction function Cinematic_fadeOut takes real duration_seconds_1 returns nothing call EnableUserUI(false) call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\White_mask.blp") call SetCineFilterBlendMode(BLEND_MODE_BLEND) call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE) call SetCineFilterStartUV(0., 0., 1., 1.) call SetCineFilterEndUV(0., 0., 1., 1.) call SetCineFilterStartColor(0, 0, 0, 0) call SetCineFilterEndColor(0, 0, 0, 255) call SetCineFilterDuration(duration_seconds_1) call DisplayCineFilter(true) endfunction function apply_Cinematic_Cinematic takes integer this_1 returns real call Cinematic_fadeOut(duration_seconds[this_1]) set apply_Cinematic_Cinematic_return_seconds = duration_seconds[this_1] return apply_Cinematic_Cinematic_return_seconds endfunction function Cinematic_fadeIn takes real duration_seconds_1 returns nothing call EnableUserUI(true) call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\White_mask.blp") call SetCineFilterBlendMode(BLEND_MODE_BLEND) call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE) call SetCineFilterStartUV(0., 0., 1., 1.) call SetCineFilterEndUV(0., 0., 1., 1.) call SetCineFilterStartColor(0, 0, 0, 255) call SetCineFilterEndColor(0, 0, 0, 0) call SetCineFilterDuration(duration_seconds_1) call DisplayCineFilter(true) endfunction function apply_Cinematic_Cinematic_354 takes integer this_1 returns real call Cinematic_fadeIn(duration_seconds_433[this_1]) set apply_Cinematic_Cinematic_return_seconds_416 = duration_seconds_433[this_1] return apply_Cinematic_Cinematic_return_seconds_416 endfunction function real_seconds takes real this_1 returns real set real_seconds_return_seconds = this_1 return real_seconds_return_seconds endfunction function apply_Cinematic_Cinematic_355 takes integer this_1 returns real call CameraSetupApply(setup[this_1], true, true) set apply_Cinematic_Cinematic_return_seconds_417 = real_seconds(0.) return apply_Cinematic_Cinematic_return_seconds_417 endfunction function setCameraPosition takes real pos_x_1, real pos_y_1 returns nothing call SetCameraPosition(pos_x_1, pos_y_1) endfunction function apply_Cinematic_Cinematic_356 takes integer this_1 returns real call setCameraPosition(pos_x[this_1], pos_y[this_1]) set apply_Cinematic_Cinematic_return_seconds_418 = real_seconds(0.) return apply_Cinematic_Cinematic_return_seconds_418 endfunction function apply_Cinematic_Cinematic_357 takes integer this_1 returns real set apply_Cinematic_Cinematic_return_seconds_419 = duration_seconds_434[this_1] return apply_Cinematic_Cinematic_return_seconds_419 endfunction function dispatch_CineSeq_Cinematic_CineSeq_apply takes integer this_1 returns real local real Cinematic_CineSeq_apply_result_seconds local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 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] <= 1414 then if CineSeq_typeId[this_1] <= 1413 then if CineSeq_typeId[this_1] <= 1412 then set tuple_temp = apply_Cinematic_Cinematic(this_1) set Cinematic_CineSeq_apply_result_seconds = tuple_temp else set tuple_temp_1 = apply_Cinematic_Cinematic_354(this_1) set Cinematic_CineSeq_apply_result_seconds = tuple_temp_1 endif else set tuple_temp_2 = apply_Cinematic_Cinematic_355(this_1) set Cinematic_CineSeq_apply_result_seconds = tuple_temp_2 endif elseif CineSeq_typeId[this_1] <= 1415 then set tuple_temp_3 = apply_Cinematic_Cinematic_356(this_1) set Cinematic_CineSeq_apply_result_seconds = tuple_temp_3 else set tuple_temp_4 = apply_Cinematic_Cinematic_357(this_1) set Cinematic_CineSeq_apply_result_seconds = tuple_temp_4 endif set dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds = Cinematic_CineSeq_apply_result_seconds return dispatch_CineSeq_Cinematic_CineSeq_apply_return_seconds endfunction function Cinematic_endCinematic takes integer this_1 returns nothing set Cinematic_running[this_1] = false call ShowInterface(true, .5) call EnableUserControl(true) call Cinematic_fadeIn(real_seconds(0.)) endfunction function dispatch_Cinematic_Cinematic_Cinematic_endCinematic takes integer this_1 returns nothing if Cinematic_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Cinematic.endCinematic") else call error("Called Cinematic.endCinematic on invalid object.") endif endif call Cinematic_endCinematic(this_1) endfunction function timer_setData takes timer this_1, integer data_1 returns nothing call dispatch_Table_Table_Table_saveInt(TimerUtils_timerData, handle_getTCHandleId(this_1), data_1) endfunction function getTimer takes nothing returns timer local timer receiver if TimerUtils_freeTimersCount > 0 then set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount - 1 call timer_setData(TimerUtils_freeTimers[TimerUtils_freeTimersCount], 0) return TimerUtils_freeTimers[TimerUtils_freeTimersCount] else set receiver = CreateTimer() call timer_setData(receiver, 0) return receiver endif endfunction function timer_start takes timer this_1, real time, code timerCallBack returns nothing call TimerStart(this_1, time, false, timerCallBack) endfunction function CallbackSingle_start takes integer this_1, timer whichTimer, real time returns nothing local timer receiver = whichTimer local timer receiver_1 call timer_setData(receiver, this_1) set receiver_1 = receiver call timer_start(receiver_1, time, ref_function_code__start_CallbackSingle_ClosureTimers) 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 timer_doAfter takes timer this_1, real timeToWait, integer cb_1 returns integer call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_start(cb_1, this_1, timeToWait) return cb_1 endfunction function doAfter takes real timeToWait, integer cb_1 returns integer return timer_doAfter(getTimer(), timeToWait, cb_1) endfunction function Cinematic_controller takes integer this_1, integer sequence_1, integer ending_1 returns nothing local integer next local real duration_seconds_1 local integer clVar local real temp local real tuple_temp if Cinematic_running[this_1] and ( not dispatch_LinkedList_LinkedList_LinkedList_isEmpty(sequence_1)) 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 set clVar = alloc_CallbackSingle_doAfter_Cinematic_Cinematic() call construct_CallbackSingle(clVar) set this_577[clVar] = this_1 set sequence[clVar] = sequence_1 set ending[clVar] = ending_1 call doAfter(temp, clVar) else call dispatch_Cinematic_Cinematic_Cinematic_endCinematic(this_1) call dispatch_CineSeq_Cinematic_CineSeq_apply(ending_1) endif endfunction function call_doAfter_Cinematic_Cinematic takes integer this_1 returns nothing call Cinematic_controller(this_577[this_1], sequence[this_1], ending[this_1]) endfunction function dispatch_Callback_ClosureTimers_Callback_call takes integer this_1 returns nothing endfunction function dealloc_Callback takes integer obj returns nothing if Callback_typeId[obj] == 0 then call error("Double free: object of type Callback") else set Callback_firstFree = Callback_firstFree + 1 set Callback_typeId[obj] = 0 endif endfunction function destroyCallback takes integer this_1 returns nothing call dealloc_Callback(this_1) endfunction function dispatch_Callback_destroyCallback takes integer this_1 returns nothing if Callback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Callback.Callback") else call error("Called Callback.Callback on invalid object.") endif endif call destroyCallback(this_1) endfunction function timerdialog_destr takes timerdialog this_1 returns nothing call DestroyTimerDialog(this_1) endfunction function call_doAfter_ClosureTimers takes integer this_1 returns nothing call dispatch_Callback_ClosureTimers_Callback_call(cb[this_1]) call dispatch_Callback_destroyCallback(cb[this_1]) call timerdialog_destr(dia[this_1]) endfunction function call_doAfter_ClosureTimers_365 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x + 50 endfunction function call_doAfter_ClosureTimers_366 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x * 2 endfunction function testFail takes string msg returns nothing endfunction function int_assertEquals takes integer this_1, integer expected returns nothing if this_1 != expected then call testFail("Expected <" + int_toString(expected) + ">, Actual <" + int_toString(this_1) + ">") endif endfunction function call_doAfter_ClosureTimers_367 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x / 2 call int_assertEquals(ClosureTimers_x, 250) endfunction function LinkedList_enqueue takes integer this_1, integer elem returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_1, elem) endfunction function dispatch_LinkedList_LinkedList_LinkedList_enqueue takes integer this_1, integer elem returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.enqueue") else call error("Called LinkedList.enqueue on invalid object.") endif endif call LinkedList_enqueue(this_1, elem) endfunction function LinkedList_size_1 takes integer this_1 returns integer return LinkedList_size[this_1] endfunction function dispatch_LinkedList_LinkedList_LinkedList_size takes integer this_1 returns integer local integer LinkedList_LinkedList_size_result 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 LinkedList_LinkedList_size_result = LinkedList_size_1(this_1) return LinkedList_LinkedList_size_result endfunction function real_asAngleDegrees takes real this_1 returns real set real_asAngleDegrees_return_radians = this_1 * Angle_DEGTORAD return real_asAngleDegrees_return_radians endfunction function unit_pause takes unit this_1 returns nothing call PauseUnit(this_1, true) endfunction function angle_degrees takes real this_radians returns real return this_radians * Angle_RADTODEG endfunction function unit_setFacing takes unit this_1, real a_radians returns nothing call SetUnitFacing(this_1, angle_degrees(a_radians)) endfunction function unit_setOwner takes unit this_1, player p, boolean changeColor returns nothing call SetUnitOwner(this_1, p, changeColor) endfunction function unit_setScale takes unit this_1, real scale returns nothing call SetUnitScale(this_1, scale, scale, scale) endfunction function unit_setVertexColor takes unit this_1, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing call SetUnitVertexColor(this_1, col_red, col_green, col_blue, col_alpha) endfunction function unit_setX takes unit this_1, real x returns nothing call SetUnitX(this_1, x) endfunction function unit_setY takes unit this_1, real y returns nothing call SetUnitY(this_1, y) endfunction function unit_setXY takes unit this_1, real pos_x_1, real pos_y_1 returns nothing local unit receiver = this_1 local unit receiver_1 call unit_setX(receiver, pos_x_1) set receiver_1 = receiver call unit_setY(receiver_1, pos_y_1) endfunction function vec2_op_minus takes real this_x, real this_y, real v_x, real v_y returns real set vec2_op_minus_return_x = this_x - v_x set vec2_op_minus_return_y = this_y - v_y return vec2_op_minus_return_x endfunction function DummyRecycler_recycle takes unit u_1 returns nothing local integer smallestQueue = 0 local integer i = 1 local integer temp = DummyRecycler_DIFFERENT_ANGLES - 1 local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 loop exitwhen i > temp if dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[smallestQueue]) > dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[i]) then set smallestQueue = i endif set i = i + 1 endloop if dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[smallestQueue]) >= DummyRecycler_SAVED_UNITS_PER_ANGLE then call unit_remove(u_1) else call dispatch_LinkedList_LinkedList_LinkedList_enqueue(DummyRecycler_angleQueues[smallestQueue], unitToIndex(u_1)) set receiver = u_1 call unit_setXY(receiver, vec2_op_minus(MapBounds_boundMax_x, MapBounds_boundMax_y, 16., 16.), vec2_op_minus_return_y) set receiver_1 = receiver call unit_pause(receiver_1) set receiver_2 = receiver_1 call unit_setFacing(receiver_2, real_asAngleDegrees(smallestQueue * DummyRecycler_ANGLE_DEGREE)) set receiver_3 = receiver_2 call unit_setScale(receiver_3, 1.) set receiver_4 = receiver_3 call unit_setVertexColor(receiver_4, Colors_COLOR_WHITE_red, Colors_COLOR_WHITE_green, Colors_COLOR_WHITE_blue, Colors_COLOR_WHITE_alpha) set receiver_5 = receiver_4 call unit_setOwner(receiver_5, Basics_DUMMY_PLAYER, true) endif endfunction function unit_removeAbility takes unit this_1, integer abil returns boolean return UnitRemoveAbility(this_1, abil) endfunction function DummyCaster_recycleDummy takes integer this_1, unit dummy_1, integer id_1 returns nothing local unit receiver = dummy_1 call unit_removeAbility(receiver, id_1) call DummyRecycler_recycle(dummy_1) endfunction function dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy takes integer this_1, unit dummy_1, integer id_1 returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.recycleDummy") else call error("Called DummyCaster.recycleDummy on invalid object.") endif endif call DummyCaster_recycleDummy(this_1, dummy_1, id_1) endfunction function DummyCaster_onDestroy takes integer this_1 returns nothing endfunction function dealloc_DummyCaster takes integer obj returns nothing if DummyCaster_typeId[obj] == 0 then call error("Double free: object of type DummyCaster") else set DummyCaster_firstFree = DummyCaster_firstFree + 1 set DummyCaster_typeId[obj] = 0 endif endfunction function destroyDummyCaster takes integer this_1 returns nothing call DummyCaster_onDestroy(this_1) call dealloc_DummyCaster(this_1) endfunction function dispatch_DummyCaster_destroyDummyCaster takes integer this_1 returns nothing if DummyCaster_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyCaster.DummyCaster") else call error("Called DummyCaster.DummyCaster on invalid object.") endif endif call destroyDummyCaster(this_1) endfunction function call_doAfter_DummyCaster_DummyCaster takes integer this_1 returns nothing call dispatch_DummyCaster_DummyCaster_DummyCaster_recycleDummy(this[this_1], dummy[this_1], id[this_1]) set DummyCaster_castCount[this[this_1]] = DummyCaster_castCount[this[this_1]] - 1 if DummyCaster_castCount[this[this_1]] == 0 then call dispatch_DummyCaster_destroyDummyCaster(this[this_1]) endif endfunction function call_doAfter_DummyRecycler_DummyRecycler takes integer this_1 returns nothing call DummyRecycler_recycle(u[this_1]) endfunction function effect_destr takes effect this_1 returns nothing call DestroyEffect(this_1) endfunction function call_doAfter_EffectUtils takes integer this_1 returns nothing call effect_destr(this_578[this_1]) endfunction function effect_setColor takes effect this_1, integer color_red, integer color_green, integer color_blue, integer color_alpha returns nothing call BlzSetSpecialEffectColor(this_1, color_red, color_green, color_blue) call BlzSetSpecialEffectAlpha(this_1, color_alpha) endfunction function effect_setPos takes effect this_1, real pos_x_1, real pos_y_1, real pos_z returns nothing call BlzSetSpecialEffectPosition(this_1, pos_x_1, pos_y_1, pos_z) endfunction function effect_setTime takes effect this_1, real time returns nothing call BlzSetSpecialEffectTime(this_1, time) endfunction function effect_setTimeScale takes effect this_1, real timeScale returns nothing call BlzSetSpecialEffectTimeScale(this_1, timeScale) endfunction function effect_destrHidden takes effect this_1 returns nothing local effect receiver = this_1 local effect receiver_1 local effect receiver_2 local effect receiver_3 local effect receiver_4 call effect_setColor(receiver, 0, 0, 0, 0) set receiver_1 = receiver call effect_setPos(receiver_1, MapBounds_boundMin_x, MapBounds_boundMin_y, 5000.) set receiver_2 = receiver_1 call effect_setTime(receiver_2, 1.) set receiver_3 = receiver_2 call effect_setTimeScale(receiver_3, 10.) set receiver_4 = receiver_3 call effect_destr(receiver_4) endfunction function call_doAfter_EffectUtils_371 takes integer this_1 returns nothing call effect_destrHidden(this_579[this_1]) endfunction function LinkedList_push takes integer this_1, integer elem returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_1, elem) endfunction function dispatch_LinkedList_LinkedList_LinkedList_push takes integer this_1, integer elem returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.push") else call error("Called LinkedList.push on invalid object.") endif endif call LinkedList_push(this_1, elem) endfunction function Sim3DSound_onDestroy takes integer this_1 returns nothing endfunction function dealloc_Sim3DSound takes integer obj returns nothing if Sim3DSound_typeId[obj] == 0 then call error("Double free: object of type Sim3DSound") else set Sim3DSound_firstFree = Sim3DSound_firstFree + 1 set Sim3DSound_typeId[obj] = 0 endif endfunction function destroySim3DSound takes integer this_1 returns nothing call Sim3DSound_onDestroy(this_1) call dealloc_Sim3DSound(this_1) endfunction function dispatch_Sim3DSound_destroySim3DSound takes integer this_1 returns nothing if Sim3DSound_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Sim3DSound.Sim3DSound") else call error("Called Sim3DSound.Sim3DSound on invalid object.") endif endif call destroySim3DSound(this_1) endfunction function sound_stop takes sound this_1, boolean killWhenDone, boolean fadeOut returns nothing call StopSound(this_1, killWhenDone, fadeOut) endfunction function SoundInstance_onDestroy takes integer this_1 returns nothing call sound_stop(SoundInstance_snd[this_1], true, false) endfunction function dealloc_SoundInstance takes integer obj returns nothing if SoundInstance_typeId[obj] == 0 then call error("Double free: object of type SoundInstance") else set SoundInstance_firstFree = SoundInstance_firstFree + 1 set SoundInstance_typeId[obj] = 0 endif endfunction function destroySoundInstance takes integer this_1 returns nothing call SoundInstance_onDestroy(this_1) call dealloc_SoundInstance(this_1) endfunction function dispatch_SoundInstance_destroySoundInstance takes integer this_1 returns nothing if SoundInstance_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundInstance.SoundInstance") else call error("Called SoundInstance.SoundInstance on invalid object.") endif endif call destroySoundInstance(this_1) endfunction function SoundDefinition_recycle takes integer this_1, integer instance_1 returns nothing set SoundInstance_p[instance_1] = null if SoundInstance_s3s[instance_1] != 0 then call dispatch_Sim3DSound_destroySim3DSound(SoundInstance_s3s[instance_1]) endif if dispatch_LinkedList_LinkedList_LinkedList_size(SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]]) < 4 then call dispatch_LinkedList_LinkedList_LinkedList_push(SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]], instance_1) else call dispatch_SoundInstance_destroySoundInstance(instance_1) endif endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_recycle takes integer this_1, integer instance_1 returns nothing if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.recycle") else call error("Called SoundDefinition.recycle on invalid object.") endif endif call SoundDefinition_recycle(this_1, instance_1) endfunction function call_doAfter_SoundDefinition_SoundUtils takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_recycle(this_583[this_1], instance[this_1]) endfunction function trigger_registerPlayerChatEvent takes trigger this_1, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns event return TriggerRegisterPlayerChatEvent(this_1, whichPlayer, chatMessageToDetect, exactMatchOnly) endfunction function call_nullTimer_ClosureEvents takes integer this_1 returns nothing local integer 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 call trigger_addAction(ClosureEvents_leaveTrig, ref_function_code__addAction_nullTimer_ClosureEvents) call trigger_addAction(ClosureEvents_keyTrig, ref_function_code__addAction_nullTimer_ClosureEvents_457) set i = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen i > temp call trigger_registerPlayerEvent(ClosureEvents_leaveTrig, Player_players[i], EVENT_PLAYER_LEAVE) set receiver = ClosureEvents_keyTrig call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_ARROW_DOWN_DOWN) set receiver_1 = receiver call trigger_registerPlayerEvent(receiver_1, Player_players[i], EVENT_PLAYER_ARROW_DOWN_UP) set receiver_2 = receiver_1 call trigger_registerPlayerEvent(receiver_2, Player_players[i], EVENT_PLAYER_ARROW_UP_DOWN) set receiver_3 = receiver_2 call trigger_registerPlayerEvent(receiver_3, Player_players[i], EVENT_PLAYER_ARROW_UP_UP) set receiver_4 = receiver_3 call trigger_registerPlayerEvent(receiver_4, Player_players[i], EVENT_PLAYER_ARROW_LEFT_DOWN) set receiver_5 = receiver_4 call trigger_registerPlayerEvent(receiver_5, Player_players[i], EVENT_PLAYER_ARROW_LEFT_UP) set receiver_6 = receiver_5 call trigger_registerPlayerEvent(receiver_6, Player_players[i], EVENT_PLAYER_ARROW_RIGHT_DOWN) set receiver_7 = receiver_6 call trigger_registerPlayerEvent(receiver_7, Player_players[i], EVENT_PLAYER_ARROW_RIGHT_UP) set receiver_8 = receiver_7 call trigger_registerPlayerEvent(receiver_8, Player_players[i], EVENT_PLAYER_END_CINEMATIC) set receiver_9 = receiver_8 call trigger_registerPlayerChatEvent(receiver_9, Player_players[i], "", false) set i = i + 1 endloop call registerPlayerUnitEvent_832(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents, null) endfunction function group_clear takes group this_1 returns nothing call GroupClear(this_1) endfunction function group_destr takes group this_1 returns nothing call DestroyGroup(this_1) endfunction function group_enumUnitsInRect_631 takes group this_1, rect rec, boolexpr filter returns nothing call GroupEnumUnitsInRect(this_1, rec, filter) endfunction function group_enumUnitsInRect takes group this_1, rect rec returns nothing call group_enumUnitsInRect_631(this_1, rec, null) endfunction function group_get takes group this_1, integer index returns unit return BlzGroupUnitAt(this_1, index) endfunction function group_size takes group this_1 returns integer return BlzGroupGetSize(this_1) endfunction function trigger_registerEnterRegion takes trigger this_1, region whichRegion, boolexpr filter returns event return TriggerRegisterEnterRegion(this_1, whichRegion, filter) endfunction function call_nullTimer_OnUnitEnterLeave takes integer this_1 returns nothing local trigger receiver = CreateTrigger() local integer count local integer i local integer temp local group receiver_1 local group receiver_2 call trigger_registerEnterRegion(receiver, MapBounds_boundRegion, Filter(ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave)) call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_ISSUED_ORDER, ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave) call group_enumUnitsInRect(OnUnitEnterLeave_preplacedUnits, MapBounds_boundRect) set count = group_size(OnUnitEnterLeave_preplacedUnits) set i = 0 set temp = count - 1 loop exitwhen i > temp call prepareUnit(group_get(OnUnitEnterLeave_preplacedUnits, i)) set i = i + 1 endloop set receiver_1 = OnUnitEnterLeave_preplacedUnits call group_clear(receiver_1) set receiver_2 = receiver_1 call group_destr(receiver_2) endfunction function alloc_ForGroupCallback_forEachFrom_Preloader takes nothing returns integer local integer this_1 if ForGroupCallback_firstFree == 0 then if ForGroupCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set ForGroupCallback_maxIndex = ForGroupCallback_maxIndex + 1 set this_1 = ForGroupCallback_maxIndex set ForGroupCallback_typeId[this_1] = 2276 else call error("Out of memory: Could not create ForGroupCallback_forEachFrom_Preloader.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 2276 endif return this_1 endfunction function dealloc_ForGroupCallback takes integer obj returns nothing if ForGroupCallback_typeId[obj] == 0 then call error("Double free: object of type ForGroupCallback") else set ForGroupCallback_nextFree[ForGroupCallback_firstFree] = obj set ForGroupCallback_firstFree = ForGroupCallback_firstFree + 1 set ForGroupCallback_typeId[obj] = 0 endif endfunction function destroyForGroupCallback takes integer this_1 returns nothing call dealloc_ForGroupCallback(this_1) endfunction function dispatch_ForGroupCallback_destroyForGroupCallback takes integer this_1 returns nothing if ForGroupCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForGroupCallback.ForGroupCallback") else call error("Called ForGroupCallback.ForGroupCallback on invalid object.") endif endif call destroyForGroupCallback(this_1) endfunction function group_hasNext takes group this_1 returns boolean return FirstOfGroup(this_1) != null endfunction function group_next takes group this_1 returns unit local unit iterUnit = FirstOfGroup(this_1) call GroupRemoveUnit(this_1, iterUnit) return iterUnit endfunction function group_forEachFrom takes group this_1, integer cb_1 returns nothing local group from = this_1 local unit u_1 loop exitwhen not group_hasNext(from) set u_1 = group_next(from) 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 integer clVar local group temp call unit_remove(Preloader_dum) set temp = Preloader_dumg set clVar = alloc_ForGroupCallback_forEachFrom_Preloader() call group_forEachFrom(temp, clVar) call group_destr(Preloader_dumg) set Preloader_dumg = null endfunction function call_nullTimer_Preloader takes integer this_1 returns nothing call finishPreload() endfunction function alloc_CallbackSingle_doAfter_SoundDefinition_SoundUtils takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1316 else call error("Out of memory: Could not create CallbackSingle_doAfter_SoundDefinition_SoundUtils.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1316 endif return this_1 endfunction function sound_play takes sound this_1 returns nothing call StartSound(this_1) endfunction function SoundDefinition_playSound takes integer this_1, integer instance_1 returns nothing local integer clVar local real temp if SoundInstance_onUnit[instance_1] != null then call AttachSoundToUnit(SoundInstance_snd[instance_1], SoundInstance_onUnit[instance_1]) endif if SoundInstance_pos_x[instance_1] != 0. or SoundInstance_pos_y[instance_1] != 0. then call SetSoundPosition(SoundInstance_snd[instance_1], SoundInstance_pos_x[instance_1], SoundInstance_pos_y[instance_1], SoundInstance_pos_z[instance_1]) endif if SoundInstance_p[instance_1] != null then if GetLocalPlayer() == SoundInstance_p[instance_1] then call StartSound(SoundInstance_snd[instance_1]) endif else call sound_play(SoundInstance_snd[instance_1]) endif set temp = SoundDefinition_duration[SoundInstance_soundDef[instance_1]] * 0.001 set clVar = alloc_CallbackSingle_doAfter_SoundDefinition_SoundUtils() call construct_CallbackSingle(clVar) set this_583[clVar] = this_1 set instance[clVar] = instance_1 call doAfter(temp, clVar) endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound takes integer this_1, integer instance_1 returns nothing if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.playSound") else call error("Called SoundDefinition.playSound on invalid object.") endif endif call SoundDefinition_playSound(this_1, instance_1) endfunction function call_nullTimer_SoundDefinition_SoundUtils takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_580[this_1], snd[this_1]) endfunction function call_nullTimer_SoundDefinition_SoundUtils_377 takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_581[this_1], snd_571[this_1]) endfunction function call_nullTimer_SoundDefinition_SoundUtils_378 takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_582[this_1], snd_572[this_1]) endfunction function dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call takes integer this_1 returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.call") else call error("Called CallbackSingle.call on invalid object.") endif endif if CallbackSingle_typeId[this_1] <= 1314 then if CallbackSingle_typeId[this_1] <= 1310 then if CallbackSingle_typeId[this_1] <= 1308 then if CallbackSingle_typeId[this_1] <= 1307 then call call_doAfter_Cinematic_Cinematic(this_1) else call call_doAfter_ClosureTimers(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1309 then call call_doAfter_ClosureTimers_365(this_1) else call call_doAfter_ClosureTimers_366(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1312 then if CallbackSingle_typeId[this_1] <= 1311 then call call_doAfter_ClosureTimers_367(this_1) else call call_doAfter_DummyCaster_DummyCaster(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1313 then call call_doAfter_DummyRecycler_DummyRecycler(this_1) else call call_doAfter_EffectUtils(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1318 then if CallbackSingle_typeId[this_1] <= 1316 then if CallbackSingle_typeId[this_1] <= 1315 then call call_doAfter_EffectUtils_371(this_1) else call call_doAfter_SoundDefinition_SoundUtils(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1317 then call call_nullTimer_ClosureEvents(this_1) else call call_nullTimer_OnUnitEnterLeave(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1320 then if CallbackSingle_typeId[this_1] <= 1319 then call call_nullTimer_Preloader(this_1) else call call_nullTimer_SoundDefinition_SoundUtils(this_1) endif elseif CallbackSingle_typeId[this_1] <= 1321 then call call_nullTimer_SoundDefinition_SoundUtils_377(this_1) else call call_nullTimer_SoundDefinition_SoundUtils_378(this_1) endif endfunction function timer_getData takes timer this_1 returns integer return dispatch_Table_Table_Table_loadInt(TimerUtils_timerData, handle_getTCHandleId(this_1)) endfunction function timer_pause takes timer this_1 returns nothing call PauseTimer(this_1) endfunction function timer_release takes timer this_1 returns nothing if this_1 == null then call error("Trying to release a null timer") return endif if timer_getData(this_1) == TimerUtils_HELD then call error("ReleaseTimer: Double free!") return endif call timer_setData(this_1, TimerUtils_HELD) call timer_pause(this_1) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this_1 set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 endfunction function CallbackSingle_onDestroy takes integer this_1 returns nothing call timer_release(CallbackSingle_t[this_1]) endfunction function dealloc_CallbackSingle takes integer obj returns nothing if CallbackSingle_typeId[obj] == 0 then call error("Double free: object of type CallbackSingle") else set CallbackSingle_nextFree[CallbackSingle_firstFree] = obj set CallbackSingle_firstFree = CallbackSingle_firstFree + 1 set CallbackSingle_typeId[obj] = 0 endif endfunction function destroyCallbackSingle takes integer this_1 returns nothing call CallbackSingle_onDestroy(this_1) call dealloc_CallbackSingle(this_1) endfunction function dispatch_CallbackSingle_destroyCallbackSingle takes integer this_1 returns nothing if CallbackSingle_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackSingle.CallbackSingle") else call error("Called CallbackSingle.CallbackSingle on invalid object.") endif endif call destroyCallbackSingle(this_1) endfunction function CallbackSingle_staticCallback takes nothing returns nothing local timer t = GetExpiredTimer() local integer cb_1 = timer_getData(t) call dispatch_CallbackSingle_ClosureTimers_CallbackSingle_call(cb_1) call dispatch_CallbackSingle_destroyCallbackSingle(cb_1) endfunction function code__start_CallbackSingle_ClosureTimers takes nothing returns nothing call CallbackSingle_staticCallback() endfunction function alloc_ForForceCallback_execute_Base64Decoder_Base64 takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2269 else call error("Out of memory: Could not create ForForceCallback_execute_Base64Decoder_Base64.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 2269 endif return this_1 endfunction function force_forEach takes force this_1, code callback returns nothing call ForForce(this_1, callback) endfunction function isLastCallbackSuccessful takes nothing returns boolean return Execute_tempCallbacksSuccess[Execute_tempCallbacksCount] endfunction function dealloc_ForForceCallback takes integer obj returns nothing if ForForceCallback_typeId[obj] == 0 then call error("Double free: object of type ForForceCallback") else set ForForceCallback_nextFree[ForForceCallback_firstFree] = obj set ForForceCallback_firstFree = ForForceCallback_firstFree + 1 set ForForceCallback_typeId[obj] = 0 endif endfunction function destroyForForceCallback takes integer this_1 returns nothing call dealloc_ForForceCallback(this_1) endfunction function dispatch_ForForceCallback_destroyForForceCallback takes integer this_1 returns nothing if ForForceCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForForceCallback.ForForceCallback") else call error("Called ForForceCallback.ForForceCallback on invalid object.") endif endif call destroyForForceCallback(this_1) endfunction function popCallback takes nothing returns nothing set Execute_tempCallbacksCount = Execute_tempCallbacksCount - 1 call dispatch_ForForceCallback_destroyForForceCallback(Execute_tempCallbacks[Execute_tempCallbacksCount]) endfunction function pushCallback takes integer c returns nothing set Execute_tempCallbacks[Execute_tempCallbacksCount] = c set Execute_tempCallbacksSuccess[Execute_tempCallbacksCount] = false set Execute_tempCallbacksCount = Execute_tempCallbacksCount + 1 endfunction function try takes integer c returns boolean local boolean suppressErrors call pushCallback(c) set suppressErrors = ErrorHandling_suppressErrorMessages set ErrorHandling_suppressErrorMessages = true call force_forEach(Execute_executeForce, ref_function_executeCurrentCallback) set ErrorHandling_suppressErrorMessages = suppressErrors call popCallback() return isLastCallbackSuccessful() endfunction function execute takes integer c returns nothing if not try(c) then call error("execute: thread has crashed. caused by:\n| - " + ErrorHandling_lastError) endif endfunction function Base64Decoder_appendData takes integer this_1, integer data_1 returns nothing local integer clVar = alloc_ForForceCallback_execute_Base64Decoder_Base64() set data_428[clVar] = data_1 set this_576[clVar] = this_1 call execute(clVar) endfunction function char_toInt takes integer this_c returns integer return this_c endfunction function char takes string s returns integer local integer a if s == "/" then set char_return_c = 47 return char_return_c elseif "\\" == s then set char_return_c = 92 return char_return_c endif set a = StringUtils_s2c[string_getHash(s) / 2033480 + 1002] if s != StringUtils_c2s[a] then set char_return_c = a + 32 return char_return_c endif set char_return_c = a return char_return_c endfunction function string_toChar takes string this_1 returns integer set string_toChar_return_c = char(this_1) return string_toChar_return_c endfunction function Base64Decoder_decode takes string char_1 returns integer return Base64_REVERSE_CHARMAP[char_toInt(string_toChar(char_1))] endfunction function ByteBuffer_flushBuffer takes integer this_1 returns nothing call dispatch_Table_Table_Table_saveInt(ByteBuffer_storage[this_1], ByteBuffer_intCount[this_1], ByteBuffer_buffer[this_1]) set ByteBuffer_intCount[this_1] = ByteBuffer_intCount[this_1] + 1 set ByteBuffer_buffer[this_1] = 0 set ByteBuffer_bufferLength[this_1] = 0 endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_flushBuffer takes integer this_1 returns nothing if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.flushBuffer") else call error("Called ByteBuffer.flushBuffer on invalid object.") endif endif call ByteBuffer_flushBuffer(this_1) endfunction function bwShiftl32 takes integer num, integer shift returns integer return num * BitwiseInit_powShift[shift] endfunction function int_shiftl takes integer this_1, integer amount returns integer return bwShiftl32(this_1, amount) endfunction function ByteBuffer_writeByteUnsafe takes integer this_1, integer n returns nothing if (SafetyChecks_SAFETY_CHECKS_ENABLED and n < 0) or n > 255 then call error("ByteBuffer#writeByteUnsafe ERROR: provided argument (" + int_toString(n) + ") is not in the range [0, 255].") endif set ByteBuffer_buffer[this_1] = ByteBuffer_buffer[this_1] + int_shiftl(n, 8 * ByteBuffer_bufferLength[this_1]) set ByteBuffer_bufferLength[this_1] = ByteBuffer_bufferLength[this_1] + 1 if ByteBuffer_bufferLength[this_1] > 3 then call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_flushBuffer(this_1) endif endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByteUnsafe takes integer this_1, integer n returns nothing if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.writeByteUnsafe") else call error("Called ByteBuffer.writeByteUnsafe on invalid object.") endif endif call ByteBuffer_writeByteUnsafe(this_1, n) endfunction function int_bitAnd takes integer this_1, integer other returns integer return BlzBitAnd(this_1, other) endfunction function ByteBuffer_writeByte takes integer this_1, integer n returns nothing call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByteUnsafe(this_1, int_bitAnd(n, 255)) endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte takes integer this_1, integer n returns nothing if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.writeByte") else call error("Called ByteBuffer.writeByte on invalid object.") endif endif call ByteBuffer_writeByte(this_1, n) endfunction function bwShiftr32 takes integer num, integer shift returns integer local integer value = num local integer isNegative = 0 if value < 0 then set value = Integer_INT_MAX + value + 1 set isNegative = 1 endif return isNegative * BitwiseInit_powShift[31 - shift] + value / BitwiseInit_powShift[shift] endfunction function int_shiftr takes integer this_1, integer amount returns integer return bwShiftr32(this_1, amount) endfunction function string_charAt takes string this_1, integer index returns string return SubString(this_1, index, index + 1) endfunction function Base64Decoder_writeBytes takes integer this_1, string chars returns nothing local integer data_1 = int_shiftl(Base64Decoder_decode(string_charAt(chars, 0)), 18) + int_shiftl(Base64Decoder_decode(string_charAt(chars, 1)), 12) + int_shiftl(Base64Decoder_decode(string_charAt(chars, 2)), 6) + Base64Decoder_decode(string_charAt(chars, 3)) call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte(Base64Decoder_byteBuffer[this_1], int_shiftr(int_bitAnd(data_1, Base64Decoder_DECODE_MASK), 16)) set data_1 = int_shiftl(data_1, 8) call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte(Base64Decoder_byteBuffer[this_1], int_shiftr(int_bitAnd(data_1, Base64Decoder_DECODE_MASK), 16)) set data_1 = int_shiftl(data_1, 8) call dispatch_ByteBuffer_ByteBuffer_ByteBuffer_writeByte(Base64Decoder_byteBuffer[this_1], int_shiftr(int_bitAnd(data_1, Base64Decoder_DECODE_MASK), 16)) endfunction function dispatch_Base64Decoder_Base64_Base64Decoder_writeBytes takes integer this_1, string chars returns nothing if Base64Decoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Decoder.writeBytes") else call error("Called Base64Decoder.writeBytes on invalid object.") endif endif call Base64Decoder_writeBytes(this_1, chars) endfunction function Base64Decoder_append takes integer this_1, string data_1 returns nothing local integer len = string_length(data_1) local integer i if Base64Decoder_bufferLength[this_1] + len < Base64Decoder_MAX_CHARS 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 = Base64Decoder_MAX_CHARS - Base64Decoder_bufferLength[this_1] call dispatch_Base64Decoder_Base64_Base64Decoder_writeBytes(this_1, Base64Decoder_buffer[this_1] + string_substring(data_1, 0, i)) loop exitwhen not (i + Base64Decoder_MAX_CHARS <= len) call dispatch_Base64Decoder_Base64_Base64Decoder_writeBytes(this_1, string_substring(data_1, i, i + Base64Decoder_MAX_CHARS)) set i = i + Base64Decoder_MAX_CHARS endloop set Base64Decoder_buffer[this_1] = string_substring_852(data_1, i) set Base64Decoder_bufferLength[this_1] = len - i endfunction function dispatch_Base64Decoder_Base64_Base64Decoder_append takes integer this_1, string data_1 returns nothing if Base64Decoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Decoder.append") else call error("Called Base64Decoder.append on invalid object.") endif endif call Base64Decoder_append(this_1, data_1) endfunction function run_execute_Base64Decoder_Base64 takes integer this_1 returns nothing local integer i = 0 loop exitwhen not (dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk(data_428[this_1]) and i < Base64_DECODES_PER_ROUND) call dispatch_Base64Decoder_Base64_Base64Decoder_append(this_576[this_1], dispatch_ChunkedString_ChunkedString_ChunkedString_readChunk(data_428[this_1])) set i = i + 1 endloop if dispatch_ChunkedString_ChunkedString_ChunkedString_hasChunk(data_428[this_1]) then call Base64Decoder_appendData(this_576[this_1], data_428[this_1]) endif endfunction function alloc_ForForceCallback_execute_Base64Encoder_Base64 takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2270 else call error("Out of memory: Could not create ForForceCallback_execute_Base64Encoder_Base64.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 2270 endif return this_1 endfunction function Base64Encoder_writeData takes integer this_1, integer data_1 returns nothing local integer clVar = alloc_ForForceCallback_execute_Base64Encoder_Base64() set data[clVar] = data_1 set this_575[clVar] = this_1 call execute(clVar) endfunction function Base64Encoder_flushStringBuffer takes integer this_1 returns nothing call dispatch_ChunkedString_ChunkedString_ChunkedString_append(Base64Encoder_chunkedString[this_1], Base64Encoder_stringBuffer[this_1]) set Base64Encoder_stringBuffer[this_1] = "" set Base64Encoder_chars[this_1] = 0 endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_flushStringBuffer takes integer this_1 returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.flushStringBuffer") else call error("Called Base64Encoder.flushStringBuffer on invalid object.") endif endif call Base64Encoder_flushStringBuffer(this_1) endfunction function Base64Encoder_append takes integer this_1, string char_1 returns nothing set Base64Encoder_stringBuffer[this_1] = Base64Encoder_stringBuffer[this_1] + char_1 set Base64Encoder_chars[this_1] = Base64Encoder_chars[this_1] + 1 if Base64Encoder_chars[this_1] == Base64Encoder_MAX_CHARS then call dispatch_Base64Encoder_Base64_Base64Encoder_flushStringBuffer(this_1) endif endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_append takes integer this_1, string char_1 returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.append") else call error("Called Base64Encoder.append on invalid object.") endif endif call Base64Encoder_append(this_1, char_1) endfunction function Base64Encoder_encode takes integer this_1, integer byte, integer count returns nothing local integer remaining = byte local integer i = 0 local integer temp = count local integer c loop exitwhen i > temp set c = int_shiftr(int_bitAnd(remaining, 16515072), 18) call dispatch_Base64Encoder_Base64_Base64Encoder_append(this_1, Base64_CHARMAP[c]) set remaining = int_shiftl(remaining, 6) set i = i + 1 endloop endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_encode takes integer this_1, integer byte, integer count returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.encode") else call error("Called Base64Encoder.encode on invalid object.") endif endif call Base64Encoder_encode(this_1, byte, count) endfunction function Base64Encoder_writeByteUnsafe takes integer this_1, integer n returns nothing set Base64Encoder_buffer[this_1] = int_shiftl(Base64Encoder_buffer[this_1], 8) + n set Base64Encoder_bytes[this_1] = Base64Encoder_bytes[this_1] + 1 if Base64Encoder_bytes[this_1] == Base64Encoder_MAX_BYTES then call dispatch_Base64Encoder_Base64_Base64Encoder_encode(this_1, Base64Encoder_buffer[this_1], 3) set Base64Encoder_bytes[this_1] = 0 endif endfunction function dispatch_Base64Encoder_Base64_Base64Encoder_writeByteUnsafe takes integer this_1, integer n returns nothing if Base64Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Base64Encoder.writeByteUnsafe") else call error("Called Base64Encoder.writeByteUnsafe on invalid object.") endif endif call Base64Encoder_writeByteUnsafe(this_1, n) endfunction function ByteBuffer_hasByte takes integer this_1 returns boolean return ByteBuffer_readIndex[this_1] < ByteBuffer_intCount[this_1] or ByteBuffer_readBufferIndex[this_1] < ByteBuffer_bufferLength[this_1] endfunction function dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte takes integer this_1 returns boolean local boolean ByteBuffer_ByteBuffer_hasByte_result 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 ByteBuffer_ByteBuffer_hasByte_result = ByteBuffer_hasByte(this_1) return ByteBuffer_ByteBuffer_hasByte_result endfunction function ByteBuffer_selectByte takes integer n, integer byte returns integer return int_bitAnd(int_shiftr(n, 8 * byte), 255) endfunction function ByteBuffer_readByte takes integer this_1 returns integer local integer cond_result 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_readByte takes integer this_1 returns integer local integer ByteBuffer_ByteBuffer_readByte_result if ByteBuffer_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ByteBuffer.readByte") else call error("Called ByteBuffer.readByte on invalid object.") endif endif set ByteBuffer_ByteBuffer_readByte_result = ByteBuffer_readByte(this_1) return ByteBuffer_ByteBuffer_readByte_result endfunction function run_execute_Base64Encoder_Base64 takes integer this_1 returns nothing local integer i = 0 loop exitwhen not (dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte(data[this_1]) and i < Base64_ENCODES_PER_ROUND) call dispatch_Base64Encoder_Base64_Base64Encoder_writeByteUnsafe(this_575[this_1], dispatch_ByteBuffer_ByteBuffer_ByteBuffer_readByte(data[this_1])) set i = i + 1 endloop if dispatch_ByteBuffer_ByteBuffer_ByteBuffer_hasByte(data[this_1]) then call Base64Encoder_writeData(this_575[this_1], data[this_1]) endif endfunction function dispatch_LimitedExecuteAction_Execute_LimitedExecuteAction_run takes integer this_1 returns nothing endfunction function dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check takes integer this_1 returns boolean return false endfunction function alloc_ForForceCallback_execute_Execute takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2271 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] = 2271 endif return this_1 endfunction function executeWhileInternal takes integer resetCount_1, integer condition_1, integer action_1 returns nothing local integer clVar = alloc_ForForceCallback_execute_Execute() set condition[clVar] = condition_1 set resetCount[clVar] = resetCount_1 set action[clVar] = action_1 call execute(clVar) endfunction function run_execute_Execute takes integer this_1 returns nothing local integer i = 0 loop exitwhen not (dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check(condition[this_1]) and i < resetCount[this_1]) call dispatch_LimitedExecuteAction_Execute_LimitedExecuteAction_run(action[this_1]) set i = i + 1 endloop if dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check(condition[this_1]) then call executeWhileInternal(resetCount[this_1], condition[this_1], action[this_1]) endif endfunction function run_execute_ForceTests takes integer this_1 returns nothing call int_assertEquals(ForceTests_testInt, 0) set ForceTests_testInt = 10 endfunction function booleanToIndex takes boolean u_1 returns integer local integer cond_result if u_1 then set cond_result = 1 else set cond_result = 0 endif return cond_result endfunction function groupToIndex takes group object returns integer return handle_getTCHandleId(object) endfunction function push takes group g returns nothing set GroupUtils_stack[GroupUtils_numStack] = g call dispatch_HashMap_HashMap_HashMap_put(GroupUtils_used, groupToIndex(GroupUtils_stack[GroupUtils_numStack]), booleanToIndex(false)) set GroupUtils_numStack = GroupUtils_numStack + 1 endfunction function run_execute_GroupUtils takes integer this_1 returns nothing local integer i local integer temp set GroupUtils_numTotal = GroupUtils_numTotal + createNow[this_1] set i = 1 set temp = createNow[this_1] loop exitwhen i > temp call push(CreateGroup()) set i = i + 1 endloop endfunction function dispatch_ForForceCallback_Execute_ForForceCallback_run takes integer this_1 returns nothing if ForForceCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ForForceCallback.run") else call error("Called ForForceCallback.run on invalid object.") endif endif if ForForceCallback_typeId[this_1] <= 2271 then if ForForceCallback_typeId[this_1] <= 2270 then if ForForceCallback_typeId[this_1] <= 2269 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] <= 2272 then call run_execute_ForceTests(this_1) else call run_execute_GroupUtils(this_1) endif endfunction function getCurrentCallback takes nothing returns integer return Execute_tempCallbacks[Execute_tempCallbacksCount - 1] endfunction function setCurrentCallbackSuccess takes boolean value returns nothing set Execute_tempCallbacksSuccess[Execute_tempCallbacksCount - 1] = value endfunction function executeCurrentCallback takes nothing returns nothing set ErrorHandling_lastError = "" call dispatch_ForForceCallback_Execute_ForForceCallback_run(getCurrentCallback()) call setCurrentCallbackSuccess(true) endfunction function init_Abilities takes nothing returns boolean return true endfunction function init_AbilityIds takes nothing returns boolean return true endfunction function init_AbilityObjEditing takes nothing returns boolean return true endfunction function init_Angle takes nothing returns boolean set Angle_DEGTORAD = 0.017453293 set Angle_RADTODEG = 57.295779513 return true endfunction function init_AttachmentPoints takes nothing returns boolean return true endfunction function init_Base64 takes nothing returns boolean set Base64_ENCODES_PER_ROUND = 1000 set Base64_DECODES_PER_ROUND = 25 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 set Base64Encoder_MAX_CHARS = 32 set Base64Encoder_MAX_BYTES = 3 set Base64Decoder_MAX_CHARS = 4 set Base64Decoder_DECODE_MASK = 16777215 return true endfunction function init_Base64Tests takes nothing returns boolean return true endfunction function init_Basics takes nothing returns boolean set Basics_ANIMATION_PERIOD = 0.030 set Basics_HEIGHT_ENABLER = 1097691750 set Basics_DUMMY_PLAYER = Player_players[PLAYER_NEUTRAL_PASSIVE] return true endfunction function init_BigNum takes nothing returns boolean return true endfunction function int_bitOr takes integer this_1, integer other returns integer return BlzBitOr(this_1, other) endfunction function int_bitXor takes integer this_1, integer other returns integer return BlzBitXor(this_1, other) endfunction function initPows takes nothing returns nothing local integer allPows local integer i local integer temp local integer i_1 local integer temp_1 set BitSet_pows[0] = 1 set allPows = 1 set i = 1 set temp = BitSet_BITSET_SIZE - 1 loop exitwhen i > temp set BitSet_pows[i] = BitSet_pows[i - 1] * 2 set allPows = int_bitOr(allPows, BitSet_pows[i]) set i = i + 1 endloop set i_1 = 0 set temp_1 = BitSet_BITSET_SIZE - 1 loop exitwhen i_1 > temp_1 call int_bitXor(allPows, BitSet_pows[i_1]) set i_1 = i_1 + 1 endloop endfunction function init_BitSet takes nothing returns boolean set BitSet_BITSET_SIZE = 32 call initPows() return true endfunction function initLbyte takes nothing returns nothing local integer i16 = 0 local integer i256 = 0 local integer i 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 endfunction function initRbyte takes nothing returns nothing local integer i256 = 0 local integer i16 loop exitwhen not (i256 < 256) set i16 = 0 loop exitwhen not (i16 < 16) set i256 = i256 + 1 set i16 = i16 + 1 endloop endloop endfunction function initShift takes nothing returns nothing local integer bit = 0 local integer pow = 1 loop exitwhen not (bit <= 32) set BitwiseInit_powShift[bit] = pow set pow = pow * 2 set bit = bit + 1 endloop endfunction function initBitwise takes nothing returns nothing call initLbyte() call initRbyte() call initShift() endfunction function init_BitwiseInit takes nothing returns boolean call initBitwise() return true endfunction function init_BuffIds takes nothing returns boolean return true endfunction function init_Buildings takes nothing returns boolean return true endfunction function alloc_OrderStringFactory takes nothing returns integer local integer this_1 if OrderStringFactory_firstFree == 0 then if OrderStringFactory_maxIndex < JASS_MAX_ARRAY_SIZE then set OrderStringFactory_maxIndex = OrderStringFactory_maxIndex + 1 set this_1 = OrderStringFactory_maxIndex else call error("Out of memory: Could not create OrderStringFactory.") set this_1 = 0 endif else set OrderStringFactory_firstFree = OrderStringFactory_firstFree - 1 set this_1 = OrderStringFactory_nextFree[OrderStringFactory_firstFree] endif return this_1 endfunction function OrderStringFactory_init takes integer this_1 returns nothing endfunction function construct_OrderStringFactory takes integer this_1 returns nothing call OrderStringFactory_init(this_1) endfunction function new_OrderStringFactory takes nothing returns integer local integer this_1 = alloc_OrderStringFactory() call construct_OrderStringFactory(this_1) return this_1 endfunction function init_ChannelAbilityPreset takes nothing returns boolean call new_OrderStringFactory() return true endfunction function init_ChunkedString takes nothing returns boolean set ChunkedString_DEFAULT_CHUNK_SIZE = 200 return true endfunction function alloc_CallbackSingle_nullTimer_ClosureEvents takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1317 else call error("Out of memory: Could not create CallbackSingle_nullTimer_ClosureEvents.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1317 endif return this_1 endfunction function alloc_HashMap takes nothing returns integer local integer this_1 if Table_firstFree == 0 then if Table_maxIndex < JASS_MAX_ARRAY_SIZE then set Table_maxIndex = Table_maxIndex + 1 set this_1 = Table_maxIndex set Table_typeId[this_1] = 4317 else call error("Out of memory: Could not create HashMap.") set this_1 = 0 endif else set Table_firstFree = Table_firstFree - 1 set this_1 = Table_nextFree[Table_firstFree] set Table_typeId[this_1] = 4317 endif return this_1 endfunction function HashMap_init takes integer this_1 returns nothing set HashMap_size[this_1] = 0 endfunction function Table_init takes integer this_1 returns nothing endfunction function construct_Table takes integer this_1 returns nothing call Table_init(this_1) endfunction function construct_HashMap takes integer this_1 returns nothing call construct_Table(this_1) call HashMap_init(this_1) endfunction function new_HashMap takes nothing returns integer local integer this_1 = alloc_HashMap() call construct_HashMap(this_1) return this_1 endfunction function nullTimer takes integer cb_1 returns integer return doAfter(0., cb_1) endfunction function onUnitDeindex takes code func returns nothing call trigger_addCondition(UnitIndexer_onDeindexTrigger, Condition(func)) endfunction function init_ClosureEvents takes nothing returns boolean local integer clVar set ClosureEvents_EVENT_PLAYER_CHAT_FILTER = ConvertPlayerEvent(96) set EventListener_castMap = new_HashMap() set EventListener_useMouseEvents = false set ClosureEvents_leaveTrig = CreateTrigger() set ClosureEvents_keyTrig = CreateTrigger() set ClosureEvents_eventTypeCounter = 0 call onUnitDeindex(ref_function_code__onUnitDeindex_ClosureEvents) set clVar = alloc_CallbackSingle_nullTimer_ClosureEvents() call construct_CallbackSingle(clVar) call nullTimer(clVar) return true endfunction function init_ClosureForGroups takes nothing returns boolean local real tuple_temp local real tuple_temp_1 call CreateGroup() set ClosureForGroups_tempCallbacksCount = 0 call Filter(ref_function_code__Filter_ClosureForGroups) set ClosureForGroups_MODE_NORMAL = 0 set ClosureForGroups_MODE_COUNTED = 1 call Rect(0., 0., 0., 0.) set tuple_temp = Vectors_ZERO2_x set tuple_temp_1 = Vectors_ZERO2_y return true endfunction function init_ClosureFrames takes nothing returns boolean local trigger receiver = CreateTrigger() call trigger_addAction(receiver, ref_function_onEvent) set ClosureFrames_FRAME_MAP = new_HashMap() return true endfunction function init_ClosureKeyPresses takes nothing returns boolean local trigger receiver = CreateTrigger() call trigger_addAction(receiver, ref_function_onEvent_564) set ClosureKeyPresses_KEY_MAP = new_HashMap() return true endfunction function init_ClosureTimers takes nothing returns boolean set ClosureTimers_x = 200 return true endfunction function toHex takes integer number returns string local integer firstpart = number / 16 local integer secondpart = number - firstpart * 16 return Colors_hexs[firstpart] + Colors_hexs[secondpart] endfunction function colorA_toColorString takes integer this_red, integer this_green, integer this_blue, integer this_alpha returns string return "|c" + toHex(this_alpha) + toHex(this_red) + toHex(this_green) + toHex(this_blue) endfunction function initializeTable takes nothing returns nothing local integer i = 0 loop exitwhen i > 15 call dispatch_Table_Table_Table_saveInt(Colors_decs, string_getHash(Colors_hexs[i]), i) set i = i + 1 endloop endfunction function alloc_Table takes nothing returns integer local integer this_1 if Table_firstFree == 0 then if Table_maxIndex < JASS_MAX_ARRAY_SIZE then set Table_maxIndex = Table_maxIndex + 1 set this_1 = Table_maxIndex set Table_typeId[this_1] = 4316 else call error("Out of memory: Could not create Table.") set this_1 = 0 endif else set Table_firstFree = Table_firstFree - 1 set this_1 = Table_nextFree[Table_firstFree] set Table_typeId[this_1] = 4316 endif return this_1 endfunction function new_Table takes nothing returns integer local integer this_1 = alloc_Table() call construct_Table(this_1) return this_1 endfunction function init_Colors takes nothing returns boolean 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 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 call colorA_toColorString(Colors_COLOR_WHITE_red, Colors_COLOR_WHITE_green, Colors_COLOR_WHITE_blue, Colors_COLOR_WHITE_alpha) call colorA_toColorString(Colors_COLOR_BLACK_red, Colors_COLOR_BLACK_green, Colors_COLOR_BLACK_blue, Colors_COLOR_BLACK_alpha) call colorA_toColorString(Colors_COLOR_GOLD_red, Colors_COLOR_GOLD_green, Colors_COLOR_GOLD_blue, Colors_COLOR_GOLD_alpha) call initializeTable() return true endfunction function EventListener_add takes eventid eventId, integer listener_1 returns integer set EventListener_eventId[listener_1] = eventid_toIntId(eventId) if EventListener_generalListenersFirsts[EventListener_eventId[listener_1]] != 0 then set EventListener_prev[EventListener_generalListenersFirsts[EventListener_eventId[listener_1]]] = listener_1 set EventListener_next[listener_1] = EventListener_generalListenersFirsts[EventListener_eventId[listener_1]] endif set EventListener_generalListenersFirsts[EventListener_eventId[listener_1]] = listener_1 return listener_1 endfunction function alloc_EventListener_add_DamageEvent takes nothing returns integer local integer this_1 if EventListener_firstFree == 0 then if EventListener_maxIndex < JASS_MAX_ARRAY_SIZE then set EventListener_maxIndex = EventListener_maxIndex + 1 set this_1 = EventListener_maxIndex set EventListener_typeId[this_1] = 2124 else call error("Out of memory: Could not create EventListener_add_DamageEvent.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 2124 endif return this_1 endfunction function alloc_EventListener_add_DamageEvent_331 takes nothing returns integer local integer this_1 if EventListener_firstFree == 0 then if EventListener_maxIndex < JASS_MAX_ARRAY_SIZE then set EventListener_maxIndex = EventListener_maxIndex + 1 set this_1 = EventListener_maxIndex set EventListener_typeId[this_1] = 2125 else call error("Out of memory: Could not create EventListener_add_DamageEvent.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 2125 endif return this_1 endfunction function EventListener_init takes integer this_1 returns nothing set EventListener_eventId[this_1] = 0 set EventListener_uid[this_1] = -1 set EventListener_next[this_1] = 0 set EventListener_prev[this_1] = 0 endfunction function construct_EventListener takes integer this_1 returns nothing call EventListener_init(this_1) endfunction function alloc_DamageElement takes nothing returns integer local integer this_1 if DamageElement_firstFree == 0 then if DamageElement_maxIndex < JASS_MAX_ARRAY_SIZE then set DamageElement_maxIndex = DamageElement_maxIndex + 1 set this_1 = DamageElement_maxIndex else call error("Out of memory: Could not create DamageElement.") set this_1 = 0 endif else set DamageElement_firstFree = DamageElement_firstFree - 1 set this_1 = DamageElement_nextFree[DamageElement_firstFree] endif return this_1 endfunction function DamageElement_init takes integer this_1 returns nothing endfunction function construct_DamageElement takes integer this_1, string name, integer color_red, integer color_green, integer color_blue, integer color_alpha returns nothing call DamageElement_init(this_1) endfunction function new_DamageElement takes string name, integer color_red, integer color_green, integer color_blue, integer color_alpha returns integer local integer this_1 = alloc_DamageElement() call construct_DamageElement(this_1, name, color_red, color_green, color_blue, color_alpha) return this_1 endfunction function init_DamageEvent takes nothing returns boolean local integer clVar local integer clVar_1 local playerunitevent temp local playerunitevent temp_1 set DamageEvent_DETECT_NATIVE_ABILITIES = true set DamageEvent_DAMAGE_ELEMENT_ATTACK = new_DamageElement("Physical", 223, 59, 33, 255) set DamageInstance_current = 0 set DamageInstance_count = 0 set DamageEvent_nextDamageId = 0 set DamageEvent_nextDamageType = 4 set DamageEvent_nextDamageElement = 0 set DamageEvent_abort = false set DamageEvent_maxPriority = 0 set DamageEvent_maxUnreducedPriority = 0 set temp = EVENT_PLAYER_UNIT_DAMAGING set clVar = alloc_EventListener_add_DamageEvent() call construct_EventListener(clVar) call EventListener_add(temp, clVar) set temp_1 = EVENT_PLAYER_UNIT_DAMAGED set clVar_1 = alloc_EventListener_add_DamageEvent_331() call construct_EventListener(clVar_1) call EventListener_add(temp_1, clVar_1) return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_DialogBox takes nothing returns boolean call new_HashMap() return true endfunction function init_Doodads takes nothing returns boolean return true endfunction function createUnit takes player p, integer unitId, real pos_x_1, real pos_y_1, real facing_radians returns unit return CreateUnit(p, unitId, pos_x_1, pos_y_1, angle_degrees(facing_radians)) endfunction function createDummy takes real pos_x_1, real pos_y_1, real facing_radians returns unit local unit u_1 = createUnit(Basics_DUMMY_PLAYER, DummyRecycler_DUMMY_UNIT_ID, pos_x_1, pos_y_1, facing_radians) local unit receiver = u_1 local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 call unit_addAbility(receiver, Basics_HEIGHT_ENABLER) set receiver_1 = receiver call unit_removeAbility(receiver_1, Basics_HEIGHT_ENABLER) set receiver_2 = receiver_1 call unit_addAbility(receiver_2, DummyRecycler_ROOT_ENABLER) set receiver_3 = receiver_2 call unit_removeAbility(receiver_3, DummyRecycler_ROOT_ENABLER) set receiver_4 = receiver_3 call unit_setXY(receiver_4, pos_x_1, pos_y_1) set receiver_5 = receiver_4 call unit_setFacing(receiver_5, facing_radians) return u_1 endfunction function alloc_LinkedList takes nothing returns integer local integer this_1 if LinkedList_firstFree == 0 then if LinkedList_maxIndex < JASS_MAX_ARRAY_SIZE then set LinkedList_maxIndex = LinkedList_maxIndex + 1 set this_1 = LinkedList_maxIndex set LinkedList_typeId[this_1] = 2965 else call error("Out of memory: Could not create LinkedList.") set this_1 = 0 endif else set LinkedList_firstFree = LinkedList_firstFree - 1 set this_1 = LinkedList_nextFree[LinkedList_firstFree] set LinkedList_typeId[this_1] = 2965 endif return this_1 endfunction function LinkedList_init takes integer this_1 returns nothing set LinkedList_dummy[this_1] = new_LLEntry(0, 0, 0) set LinkedList_size[this_1] = 0 endfunction function construct_LinkedList2 takes integer this_1 returns nothing call LinkedList_init(this_1) set LLEntry_next[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] set LLEntry_prev[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] endfunction function new_LinkedList takes nothing returns integer local integer this_1 = alloc_LinkedList() call construct_LinkedList2(this_1) return this_1 endfunction function realToIndex takes real r returns integer return real_toInt(r * TypeCasting_R2I_PRECISION) 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 tuple_temp set DummyRecycler_DUMMY_UNIT_ID = 2016423985 set DummyRecycler_ROOT_ENABLER = 1095577649 set DummyRecycler_DIFFERENT_ANGLES = 8 set DummyRecycler_ANGLE_DEGREE = 360 * 1. / DummyRecycler_DIFFERENT_ANGLES set DummyRecycler_SAVED_UNITS_PER_ANGLE = 6 call realToIndex(1.) set i = 0 set temp = DummyRecycler_DIFFERENT_ANGLES - 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 = DummyRecycler_SAVED_UNITS_PER_ANGLE - 1 loop exitwhen j > temp_1 set dummy_1 = createDummy(vec2_op_minus(MapBounds_boundMax_x, MapBounds_boundMax_y, 16., 16.), vec2_op_minus_return_y, facing_radians) call dispatch_LinkedList_LinkedList_LinkedList_enqueue(DummyRecycler_angleQueues[i], unitToIndex(dummy_1)) set j = j + 1 endloop set i = i + 1 endloop return true endfunction function init_Environment takes nothing returns boolean return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_MUTE_ERROR_DURATION = 60 set ErrorHandling_PRIMARY_ERROR_KEY = -1 set ErrorHandling_HT = hashtable_compiletime_438 set ErrorHandling_lastError = "" set ErrorHandling_suppressErrorMessages = false return true endfunction function init_EventHelper takes nothing returns boolean call new_HashMap() call new_HashMap() call new_Table() return true endfunction function force_addPlayer takes force this_1, player whichPlayer returns nothing call ForceAddPlayer(this_1, whichPlayer) endfunction function init_Execute takes nothing returns boolean set Execute_executeForce = CreateForce() call force_addPlayer(Execute_executeForce, Player_localPlayer) set Execute_tempCallbacksCount = 0 return true endfunction function ChunkedString_getUnsafeString takes integer this_1 returns string local string out = "" local integer i = 0 local integer temp = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(this_1) loop exitwhen i > temp set out = out + dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(this_1, i) set i = i + 1 endloop return out endfunction function dispatch_ChunkedString_ChunkedString_ChunkedString_getUnsafeString takes integer this_1 returns string local string ChunkedString_ChunkedString_getUnsafeString_result if ChunkedString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ChunkedString.getUnsafeString") else call error("Called ChunkedString.getUnsafeString on invalid object.") endif endif set ChunkedString_ChunkedString_getUnsafeString_result = ChunkedString_getUnsafeString(this_1) return ChunkedString_ChunkedString_getUnsafeString_result endfunction function File_readPreload takes integer this_1, integer output returns nothing local integer i local integer temp local string chunk call Preloader(File_filename[this_1]) set i = 0 set temp = FileIO_CHUNKS_PER_FILE - 1 loop exitwhen i > temp set chunk = BlzGetAbilityTooltip(FileIO_FILE_IO_ABIL_ID, i) if chunk == " " then exitwhen true endif call BlzSetAbilityTooltip(FileIO_FILE_IO_ABIL_ID, " ", i) call dispatch_ChunkedString_ChunkedString_ChunkedString_append(output, chunk) set i = i + 1 endloop endfunction function dispatch_File_FileIO_File_readPreload takes integer this_1, integer output returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.readPreload") else call error("Called File.readPreload on invalid object.") endif endif call File_readPreload(this_1, output) endfunction function alloc_ChunkedString takes nothing returns integer local integer this_1 if ChunkedString_firstFree == 0 then if ChunkedString_maxIndex < JASS_MAX_ARRAY_SIZE then set ChunkedString_maxIndex = ChunkedString_maxIndex + 1 set this_1 = ChunkedString_maxIndex set ChunkedString_typeId[this_1] = 1410 else call error("Out of memory: Could not create ChunkedString.") set this_1 = 0 endif else set ChunkedString_firstFree = ChunkedString_firstFree - 1 set this_1 = ChunkedString_nextFree[ChunkedString_firstFree] set ChunkedString_typeId[this_1] = 1410 endif return this_1 endfunction function ChunkedString_init takes integer this_1 returns nothing set ChunkedString_table[this_1] = new_Table() set ChunkedString_chunkSize[this_1] = ChunkedString_DEFAULT_CHUNK_SIZE set ChunkedString_chunkCount[this_1] = 0 set ChunkedString_readIndex[this_1] = -1 set ChunkedString_buffer[this_1] = "" endfunction function construct_ChunkedString2 takes integer this_1, integer chunkSize returns nothing call ChunkedString_init(this_1) set ChunkedString_chunkSize[this_1] = chunkSize endfunction function new_ChunkedString_778 takes integer chunkSize returns integer local integer this_1 = alloc_ChunkedString() call construct_ChunkedString2(this_1, chunkSize) return this_1 endfunction function File_read takes integer this_1, player p returns integer local integer out = new_ChunkedString_778(ChunkedString_DEFAULT_CHUNK_SIZE) if Player_localPlayer == p then call dispatch_File_FileIO_File_readPreload(this_1, out) endif return out endfunction function dispatch_File_FileIO_File_read takes integer this_1, player p returns integer local integer FileIO_File_read_result if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.read") else call error("Called File.read on invalid object.") endif endif set FileIO_File_read_result = File_read(this_1, p) return FileIO_File_read_result endfunction function File_readAsString takes integer this_1, player p returns string local integer out = dispatch_File_FileIO_File_read(this_1, p) local string str = dispatch_ChunkedString_ChunkedString_ChunkedString_getUnsafeString(out) call dispatch_ChunkedString_destroyChunkedString(out) return str endfunction function dispatch_File_FileIO_File_readAsString takes integer this_1, player p returns string local string FileIO_File_readAsString_result if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.readAsString") else call error("Called File.readAsString on invalid object.") endif endif set FileIO_File_readAsString_result = File_readAsString(this_1, p) return FileIO_File_readAsString_result endfunction function StringIterator_onDestroy takes integer this_1 returns nothing endfunction function dealloc_StringIterator takes integer obj returns nothing if StringIterator_typeId[obj] == 0 then call error("Double free: object of type StringIterator") else set StringIterator_nextFree[StringIterator_firstFree] = obj set StringIterator_firstFree = StringIterator_firstFree + 1 set StringIterator_typeId[obj] = 0 endif endfunction function destroyStringIterator takes integer this_1 returns nothing call StringIterator_onDestroy(this_1) call dealloc_StringIterator(this_1) endfunction function dispatch_StringIterator_destroyStringIterator takes integer this_1 returns nothing if StringIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling StringIterator.StringIterator") else call error("Called StringIterator.StringIterator on invalid object.") endif endif call destroyStringIterator(this_1) endfunction function StringIterator_close takes integer this_1 returns nothing call dispatch_StringIterator_destroyStringIterator(this_1) endfunction function StringIterator_hasNext takes integer this_1 returns boolean return StringIterator_currentpos[this_1] < StringIterator_stringLen[this_1] endfunction function StringIterator_next takes integer this_1 returns string local string wval = string_substring(StringIterator_s[this_1], StringIterator_currentpos[this_1], StringIterator_currentpos[this_1] + 1) if String_ENABLE_MULTIBYTE_SUPPORT and string_getHash(wval) == 1843378377 then set wval = string_substring(StringIterator_s[this_1], StringIterator_currentpos[this_1], StringIterator_currentpos[this_1] + 2) 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 alloc_StringIterator takes nothing returns integer local integer this_1 if StringIterator_firstFree == 0 then if StringIterator_maxIndex < JASS_MAX_ARRAY_SIZE then set StringIterator_maxIndex = StringIterator_maxIndex + 1 set this_1 = StringIterator_maxIndex set StringIterator_typeId[this_1] = 4284 else call error("Out of memory: Could not create StringIterator.") set this_1 = 0 endif else set StringIterator_firstFree = StringIterator_firstFree - 1 set this_1 = StringIterator_nextFree[StringIterator_firstFree] set StringIterator_typeId[this_1] = 4284 endif return this_1 endfunction function StringIterator_init takes integer this_1 returns nothing endfunction function construct_StringIterator takes integer this_1, string s, integer currentpos, integer stringLen returns nothing call StringIterator_init(this_1) set StringIterator_s[this_1] = s set StringIterator_currentpos[this_1] = currentpos set StringIterator_stringLen[this_1] = stringLen endfunction function new_StringIterator takes string s, integer currentpos, integer stringLen returns integer local integer this_1 = alloc_StringIterator() call construct_StringIterator(this_1, s, currentpos, stringLen) return this_1 endfunction function string_iterator takes string this_1 returns integer return new_StringIterator(this_1, 0, string_length(this_1)) endfunction function File_validateInput takes string content returns string local integer iterator = string_iterator(content) local string char_1 loop exitwhen not StringIterator_hasNext(iterator) set char_1 = StringIterator_next(iterator) if char_1 == "\\" then call StringIterator_close(iterator) return char_1 elseif char_1 == "\"" then call StringIterator_close(iterator) return char_1 endif endloop call StringIterator_close(iterator) return null endfunction function File_writePreload takes integer this_1, player p, integer buffer returns nothing local integer i local integer temp local string chunk if Player_localPlayer == p then call PreloadGenClear() call PreloadGenStart() if dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(buffer) >= FileIO_CHUNKS_PER_FILE then call error("FileIO(" + File_filename[this_1] + ") ERROR: String's chunk count exceeds the limit (" + int_toString(FileIO_CHUNKS_PER_FILE) + ").|r") endif set i = 0 set temp = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(buffer) - 1 loop exitwhen i > temp set chunk = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(buffer, i) call Preload("\" )\ncall BlzSetAbilityTooltip('" + FileIO_FILE_IO_ABIL_ID_STR + "', \"" + chunk + "\", " + int_toString(i) + ")\n//") set i = i + 1 endloop call Preload("\" )\nendfunction\nfunction a takes nothing returns nothing\n //") call PreloadGenEnd(File_filename[this_1]) endif endfunction function dispatch_File_FileIO_File_writePreload takes integer this_1, player p, integer buffer returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.writePreload") else call error("Called File.writePreload on invalid object.") endif endif call File_writePreload(this_1, p, buffer) endfunction function File_write_116 takes integer this_1, player p, integer buffer returns nothing local integer i local integer temp local string str if SafetyChecks_SAFETY_CHECKS_ENABLED then set i = 0 set temp = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunkCount(buffer) - 1 loop exitwhen i > temp set str = dispatch_ChunkedString_ChunkedString_ChunkedString_getChunk(buffer, i) if File_validateInput(str) != null then call error("FileIO(" + File_filename[this_1] + ") ERROR: Invalid character |cffffcc00" + File_validateInput(str) + "|r") endif set i = i + 1 endloop endif call dispatch_File_FileIO_File_writePreload(this_1, p, buffer) endfunction function dispatch_File_FileIO_File_write_525 takes integer this_1, player p, integer buffer returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.write") else call error("Called File.write on invalid object.") endif endif call File_write_116(this_1, p, buffer) endfunction function construct_ChunkedString takes integer this_1 returns nothing call ChunkedString_init(this_1) endfunction function new_ChunkedString takes nothing returns integer local integer this_1 = alloc_ChunkedString() call construct_ChunkedString(this_1) return this_1 endfunction function File_write takes integer this_1, player p, string content returns nothing local integer buffer = new_ChunkedString() call dispatch_ChunkedString_ChunkedString_ChunkedString_append(buffer, content) call dispatch_File_FileIO_File_write_525(this_1, p, buffer) call dispatch_ChunkedString_destroyChunkedString(buffer) endfunction function dispatch_File_FileIO_File_write takes integer this_1, player p, string content returns nothing if File_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling File.write") else call error("Called File.write on invalid object.") endif endif call File_write(this_1, p, content) endfunction function toRawCode takes integer value returns string local string result_1 = "" local integer remainingValue = value local integer byteno = 0 local integer charValue loop exitwhen byteno > 3 set charValue = ModuloInteger(remainingValue, 256) set remainingValue = remainingValue / 256 set result_1 = string_charAt(ObjectIds_CHARMAP, charValue) + result_1 set byteno = byteno + 1 endloop return result_1 endfunction function int_toRawCode takes integer this_1 returns string return toRawCode(this_1) endfunction function alloc_File takes nothing returns integer local integer this_1 if File_firstFree == 0 then if File_maxIndex < JASS_MAX_ARRAY_SIZE then set File_maxIndex = File_maxIndex + 1 set this_1 = File_maxIndex set File_typeId[this_1] = 2217 else call error("Out of memory: Could not create File.") set this_1 = 0 endif else set File_firstFree = File_firstFree - 1 set this_1 = File_nextFree[File_firstFree] set File_typeId[this_1] = 2217 endif return this_1 endfunction function File_init takes integer this_1 returns nothing set File_filename[this_1] = "" endfunction function construct_File takes integer this_1, string filename returns nothing call File_init(this_1) set File_filename[this_1] = filename endfunction function new_File takes string filename returns integer local integer this_1 = alloc_File() call construct_File(this_1, filename) return this_1 endfunction function init_FileIO takes nothing returns boolean local integer receiver set FileIO_CHUNKS_PER_FILE = 64 set FileIO_FILE_IO_ABIL_ID = 611808108 set FileIO_FILE_IO_ABIL_ID_STR = int_toRawCode(FileIO_FILE_IO_ABIL_ID) set receiver = new_File("FileTester.pld") call dispatch_File_FileIO_File_write(receiver, Player_localPlayer, "test") call dispatch_File_FileIO_File_readAsString(receiver, Player_localPlayer) return true endfunction function init_Force takes nothing returns boolean return true endfunction function init_ForceTests takes nothing returns boolean set ForceTests_testInt = 0 return true endfunction function init_Framehandle takes nothing returns boolean local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 call BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) call BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0) call BlzGetFrameByName("ConsoleUIBackdrop", 0) set tuple_temp = 0.4 set tuple_temp_1 = 0.6 set Framehandle_SCREEN_TOP_x = tuple_temp set Framehandle_SCREEN_TOP_y = tuple_temp_1 set tuple_temp_2 = 0.4 set tuple_temp_3 = 0.0 set Framehandle_SCREEN_BOTTOM_x = tuple_temp_2 set Framehandle_SCREEN_BOTTOM_y = tuple_temp_3 return true endfunction function init_FramehandleNames takes nothing returns boolean return true endfunction function player_getId takes player this_1 returns integer return GetPlayerId(this_1) endfunction function player_getController takes player this_1 returns mapcontrol return GetPlayerController(this_1) endfunction function player_getSlotState takes player this_1 returns playerslotstate return GetPlayerSlotState(this_1) endfunction function player_isIngame takes player this_1 returns boolean return player_getSlotState(this_1) == PLAYER_SLOT_STATE_PLAYING and player_getController(this_1) == MAP_CONTROL_USER endfunction function init_GameStatus takes nothing returns boolean local player firstPlayer local unit u_1 local boolean selected set GameStatus_gameStatus = 0 set firstPlayer = Player(0) loop exitwhen not not player_isIngame(firstPlayer) set firstPlayer = Player(player_getId(firstPlayer) + 1) endloop set u_1 = CreateUnit(firstPlayer, 1751543663, 0., 0., 0.) call SelectUnit(u_1, true) set selected = IsUnitSelected(u_1, firstPlayer) call RemoveUnit(u_1) if selected then if ReloadGameCachesFromDisk() then set GameStatus_gameStatus = 2 else set GameStatus_gameStatus = 3 endif else set GameStatus_gameStatus = 1 endif return true endfunction function timer_startPeriodic takes timer this_1, real time, code timerCallBack returns nothing call TimerStart(this_1, time, true, timerCallBack) endfunction function init_GameTimer takes nothing returns boolean local timer receiver = CreateTimer() call timer_start(receiver, 100000., null) call timer_startPeriodic(CreateTimer(), Basics_ANIMATION_PERIOD, ref_function_code__startPeriodic_GameTimer) return true endfunction function init_Group takes nothing returns boolean call CreateGroup() return true endfunction function Log_warn takes string msg returns nothing call printLog(Player_localPlayer, 3, msg) endfunction function alloc_ForForceCallback_execute_GroupUtils takes nothing returns integer local integer this_1 if ForForceCallback_firstFree == 0 then if ForForceCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set ForForceCallback_maxIndex = ForForceCallback_maxIndex + 1 set this_1 = ForForceCallback_maxIndex set ForForceCallback_typeId[this_1] = 2273 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] = 2273 endif return this_1 endfunction function max_2 takes integer numbers_0, integer numbers_1 returns integer local integer maxNumber = Integer_INT_MIN local integer cond_result 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 return maxNumber endfunction function createGroups takes integer number returns nothing local integer maxCreatePerCycle = 256 local integer actualLimit = max_2(JASS_MAX_ARRAY_SIZE - 1, GroupUtils_GROUP_NUMBER_LIMIT) local integer numTarget = GroupUtils_numTotal + number local integer overflow = max_2(0, numTarget - actualLimit) local integer toCreate = max_2(0, numTarget - overflow) local integer createNow_1 local integer clVar loop exitwhen not (toCreate > 0) set createNow_1 = min_2(toCreate, maxCreatePerCycle) set toCreate = toCreate - createNow_1 set clVar = alloc_ForForceCallback_execute_GroupUtils() set createNow[clVar] = createNow_1 call execute(clVar) endloop if GroupUtils_numTotal >= GroupUtils_GROUP_NUMBER_LIMIT and ( not GroupUtils_shownMaxError) then call Log_warn("Maximum number of GroupUtils groups (" + int_toString(GroupUtils_GROUP_NUMBER_LIMIT) + ") created. " + "All newly created groups will be non-recyclable.") set GroupUtils_shownMaxError = true endif endfunction function initialize takes nothing returns nothing call createGroups(GroupUtils_START_CREATE_GROUPS) endfunction function init_GroupUtils takes nothing returns boolean set GroupUtils_GROUP_NUMBER_LIMIT = 1024 set GroupUtils_START_CREATE_GROUPS = 64 set GroupUtils_used = new_HashMap() set GroupUtils_numStack = 0 set GroupUtils_numTotal = 0 set GroupUtils_shownMaxError = false call initialize() return true endfunction function init_HashList takes nothing returns boolean set HashList_ht = hashtable_compiletime set HashList_occurences = hashtable_compiletime_437 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_440 return true endfunction function init_Icons takes nothing returns boolean return true endfunction function unit_setPathing takes unit this_1, boolean value returns nothing call SetUnitPathing(this_1, value) endfunction function init_InstantDummyCaster takes nothing returns boolean local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 set InstantDummyCaster_DUMMY_CASTER_UNIT_ID = 2016423986 set InstantDummyCaster_DUMMY_ROOT_ABIL_ID = 1095577651 set receiver = createUnit(Basics_DUMMY_PLAYER, InstantDummyCaster_DUMMY_CASTER_UNIT_ID, MapBounds_boundMax_x, MapBounds_boundMax_y, 0.) call unit_setPathing(receiver, false) set receiver_1 = receiver call unit_addAbility(receiver_1, Basics_HEIGHT_ENABLER) set receiver_2 = receiver_1 call unit_removeAbility(receiver_2, Basics_HEIGHT_ENABLER) set receiver_3 = receiver_2 call unit_addAbility(receiver_3, InstantDummyCaster_DUMMY_ROOT_ABIL_ID) set receiver_4 = receiver_3 call unit_removeAbility(receiver_4, InstantDummyCaster_DUMMY_ROOT_ABIL_ID) return true endfunction function init_Integer takes nothing returns boolean set Integer_INT_MAX = 2147483647 set Integer_INT_MIN = -2147483648 return true endfunction function init_ItemIds takes nothing returns boolean return true endfunction function alloc_TerrainZProvider_Knockback3 takes nothing returns integer local integer this_1 if TerrainZProvider_firstFree == 0 then if TerrainZProvider_maxIndex < JASS_MAX_ARRAY_SIZE then set TerrainZProvider_maxIndex = TerrainZProvider_maxIndex + 1 set this_1 = TerrainZProvider_maxIndex else call error("Out of memory: Could not create TerrainZProvider_Knockback3.") set this_1 = 0 endif else set TerrainZProvider_firstFree = TerrainZProvider_firstFree - 1 set this_1 = TerrainZProvider_nextFree[TerrainZProvider_firstFree] endif return this_1 endfunction function alloc_UnitFilter_Knockback3 takes nothing returns integer local integer this_1 if UnitFilter_firstFree == 0 then if UnitFilter_maxIndex < JASS_MAX_ARRAY_SIZE then set UnitFilter_maxIndex = UnitFilter_maxIndex + 1 set this_1 = UnitFilter_maxIndex else call error("Out of memory: Could not create UnitFilter_Knockback3.") set this_1 = 0 endif else set UnitFilter_firstFree = UnitFilter_firstFree - 1 set this_1 = UnitFilter_nextFree[UnitFilter_firstFree] endif return this_1 endfunction function alloc_WallHitTransform_Knockback3 takes nothing returns integer local integer this_1 if WallHitTransform_firstFree == 0 then if WallHitTransform_maxIndex < JASS_MAX_ARRAY_SIZE then set WallHitTransform_maxIndex = WallHitTransform_maxIndex + 1 set this_1 = WallHitTransform_maxIndex else call error("Out of memory: Could not create WallHitTransform_Knockback3.") set this_1 = 0 endif else set WallHitTransform_firstFree = WallHitTransform_firstFree - 1 set this_1 = WallHitTransform_nextFree[WallHitTransform_firstFree] endif return this_1 endfunction function alloc_BackIterator takes nothing returns integer local integer this_1 if BackIterator_firstFree == 0 then if BackIterator_maxIndex < JASS_MAX_ARRAY_SIZE then set BackIterator_maxIndex = BackIterator_maxIndex + 1 set this_1 = BackIterator_maxIndex else call error("Out of memory: Could not create BackIterator.") set this_1 = 0 endif else set BackIterator_firstFree = BackIterator_firstFree - 1 set this_1 = BackIterator_nextFree[BackIterator_firstFree] endif return this_1 endfunction function BackIterator_init takes integer this_1 returns nothing endfunction function construct_BackIterator takes integer this_1, boolean destroyOnClose returns nothing call BackIterator_init(this_1) endfunction function new_BackIterator takes boolean destroyOnClose returns integer local integer this_1 = alloc_BackIterator() call construct_BackIterator(this_1, destroyOnClose) return this_1 endfunction function alloc_Iterator takes nothing returns integer local integer this_1 if Iterator_firstFree == 0 then if Iterator_maxIndex < JASS_MAX_ARRAY_SIZE then set Iterator_maxIndex = Iterator_maxIndex + 1 set this_1 = Iterator_maxIndex else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree = Iterator_firstFree - 1 set this_1 = Iterator_nextFree[Iterator_firstFree] endif return this_1 endfunction function Iterator_init takes integer this_1 returns nothing endfunction function construct_Iterator takes integer this_1, boolean destroyOnClose returns nothing call Iterator_init(this_1) endfunction function new_Iterator takes boolean destroyOnClose returns integer local integer this_1 = alloc_Iterator() call construct_Iterator(this_1, destroyOnClose) return this_1 endfunction function init_Knockback3 takes nothing returns boolean local integer clVar = alloc_TerrainZProvider_Knockback3() local integer clVar_1 = alloc_WallHitTransform_Knockback3() set Knockback3_DESTRUCTABLE_ENUM_SIZE = 130. call alloc_UnitFilter_Knockback3() set Knockback3_LinkedListModule_first = 0 call new_Iterator(false) call new_BackIterator(false) call Rect( - (1. * Knockback3_DESTRUCTABLE_ENUM_SIZE), - (1. * Knockback3_DESTRUCTABLE_ENUM_SIZE), Knockback3_DESTRUCTABLE_ENUM_SIZE, Knockback3_DESTRUCTABLE_ENUM_SIZE) call new_HashMap() call CreateTimer() return true endfunction function registerPlayerUnitEvent_831 takes playerunitevent p, code filter, code c returns nothing call registerPlayerUnitEvent_832(p, filter, c, null) endfunction function init_LastOrder takes nothing returns boolean set LastOrder_ORDERS_TO_HOLD = 3 call registerPlayerUnitEvent_831(EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER, null, ref_function_actions) call registerPlayerUnitEvent_831(EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER, null, ref_function_actions) call registerPlayerUnitEvent_831(EVENT_PLAYER_UNIT_ISSUED_ORDER, null, ref_function_actions) call registerPlayerUnitEvent_831(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_spellActions) call onUnitDeindex(ref_function_code__onUnitDeindex_LastOrder) return true endfunction function init_Lightning takes nothing returns boolean return true endfunction function alloc_Comparator_LinkedList takes nothing returns integer local integer this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < JASS_MAX_ARRAY_SIZE then set Comparator_maxIndex = Comparator_maxIndex + 1 set this_1 = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] endif return this_1 endfunction function alloc_Comparator_LinkedList_326 takes nothing returns integer local integer this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < JASS_MAX_ARRAY_SIZE then set Comparator_maxIndex = Comparator_maxIndex + 1 set this_1 = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] endif return this_1 endfunction function alloc_Comparator_LinkedList_327 takes nothing returns integer local integer this_1 if Comparator_firstFree == 0 then if Comparator_maxIndex < JASS_MAX_ARRAY_SIZE then set Comparator_maxIndex = Comparator_maxIndex + 1 set this_1 = Comparator_maxIndex else call error("Out of memory: Could not create Comparator_LinkedList.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] endif return this_1 endfunction function init_LinkedList takes nothing returns boolean call alloc_Comparator_LinkedList() call alloc_Comparator_LinkedList_326() call alloc_Comparator_LinkedList_327() call realToIndex(0.) return true endfunction function alloc_BackIterator_318 takes nothing returns integer local integer this_1 if BackIterator_firstFree_5 == 0 then if BackIterator_maxIndex_7 < JASS_MAX_ARRAY_SIZE then set BackIterator_maxIndex_7 = BackIterator_maxIndex_7 + 1 set this_1 = BackIterator_maxIndex_7 else call error("Out of memory: Could not create BackIterator.") set this_1 = 0 endif else set BackIterator_firstFree_5 = BackIterator_firstFree_5 - 1 set this_1 = BackIterator_nextFree_9[BackIterator_firstFree_5] endif return this_1 endfunction function BackIterator_init_2 takes integer this_1 returns nothing endfunction function construct_BackIterator_405 takes integer this_1, boolean destroyOnClose returns nothing call BackIterator_init_2(this_1) endfunction function new_BackIterator_776 takes boolean destroyOnClose returns integer local integer this_1 = alloc_BackIterator_318() call construct_BackIterator_405(this_1, destroyOnClose) return this_1 endfunction function alloc_Iterator_341 takes nothing returns integer local integer this_1 if Iterator_firstFree_237 == 0 then if Iterator_maxIndex_239 < JASS_MAX_ARRAY_SIZE then set Iterator_maxIndex_239 = Iterator_maxIndex_239 + 1 set this_1 = Iterator_maxIndex_239 else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree_237 = Iterator_firstFree_237 - 1 set this_1 = Iterator_nextFree_241[Iterator_firstFree_237] endif return this_1 endfunction function Iterator_init_198 takes integer this_1 returns nothing endfunction function construct_Iterator_416 takes integer this_1, boolean destroyOnClose returns nothing call Iterator_init_198(this_1) endfunction function new_Iterator_785 takes boolean destroyOnClose returns integer local integer this_1 = alloc_Iterator_341() call construct_Iterator_416(this_1, destroyOnClose) return this_1 endfunction function init_LinkedListModuleTests takes nothing returns boolean call new_Iterator_785(false) call new_BackIterator_776(false) return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false set MagicFunctions_isLua = false return true endfunction function rect_getMaxX takes rect this_1 returns real return GetRectMaxX(this_1) endfunction function rect_getMaxY takes rect this_1 returns real return GetRectMaxY(this_1) endfunction function rect_getMinX takes rect this_1 returns real return GetRectMinX(this_1) endfunction function rect_getMinY takes rect this_1 returns real return GetRectMinY(this_1) endfunction function region_addRect takes region this_1, rect rct returns nothing call RegionAddRect(this_1, rct) endfunction function vec2_op_mult takes real this_x, real this_y, real factor returns real set vec2_op_mult_return_x = this_x * factor set vec2_op_mult_return_y = this_y * factor return vec2_op_mult_return_x endfunction function vec2_op_plus takes real this_x, real this_y, real v_x, real v_y returns real set vec2_op_plus_return_x = this_x + v_x set vec2_op_plus_return_y = this_y + v_y return vec2_op_plus_return_x endfunction function initMapBounds takes nothing returns nothing local rect cond_result local region receiver local rect cond_result_1 local region receiver_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 local real tuple_temp_6 local real tuple_temp_7 if MagicFunctions_compiletime then set cond_result = Rect(-1024., -1024., 1024., 1024.) else set cond_result = GetPlayableMapRect() endif set MapBounds_playableMapRect = cond_result set receiver = CreateRegion() call region_addRect(receiver, MapBounds_playableMapRect) 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() call region_addRect(receiver_1, MapBounds_boundRect) set MapBounds_boundRegion = receiver_1 set tuple_temp = rect_getMinX(MapBounds_playableMapRect) set tuple_temp_1 = rect_getMinY(MapBounds_playableMapRect) set MapBounds_playableMin_x = tuple_temp set MapBounds_playableMin_y = tuple_temp_1 set tuple_temp_2 = rect_getMaxX(MapBounds_playableMapRect) set tuple_temp_3 = rect_getMaxY(MapBounds_playableMapRect) set MapBounds_playableMax_x = tuple_temp_2 set MapBounds_playableMax_y = tuple_temp_3 set tuple_temp_4 = rect_getMinX(MapBounds_boundRect) set tuple_temp_5 = rect_getMinY(MapBounds_boundRect) set MapBounds_boundMin_x = tuple_temp_4 set MapBounds_boundMin_y = tuple_temp_5 set tuple_temp_6 = rect_getMaxX(MapBounds_boundRect) set tuple_temp_7 = rect_getMaxY(MapBounds_boundRect) set MapBounds_boundMax_x = tuple_temp_6 set MapBounds_boundMax_y = tuple_temp_7 call vec2_op_mult(vec2_op_plus(MapBounds_playableMin_x, MapBounds_playableMin_y, MapBounds_playableMax_x, MapBounds_playableMax_y), vec2_op_plus_return_y, .5) call vec2_op_mult(vec2_op_plus(MapBounds_boundMin_x, MapBounds_boundMin_y, MapBounds_boundMax_x, MapBounds_boundMax_y), vec2_op_plus_return_y, .5) endfunction function init_MapBounds takes nothing returns boolean call initMapBounds() return true endfunction function init_Maths takes nothing returns boolean return true endfunction function init_Matrices takes nothing returns boolean local real tuple_temp = 0. local real tuple_temp_1 = 0. local real tuple_temp_2 = 0. local real tuple_temp_3 = 0. local real tuple_temp_4 = 0. local real tuple_temp_5 = 0. local real tuple_temp_6 = 0. local real tuple_temp_7 = 0. local real tuple_temp_8 = 0. local real tuple_temp_9 = 0. local real tuple_temp_10 = 0. local real tuple_temp_11 = 0. local real tuple_temp_12 = 0. local real tuple_temp_13 = 0. local real tuple_temp_14 = 0. local real tuple_temp_15 = 0. set Matrices_ZERO44_m00 = tuple_temp set Matrices_ZERO44_m01 = tuple_temp_1 set Matrices_ZERO44_m02 = tuple_temp_2 set Matrices_ZERO44_m03 = tuple_temp_3 set Matrices_ZERO44_m10 = tuple_temp_4 set Matrices_ZERO44_m11 = tuple_temp_5 set Matrices_ZERO44_m12 = tuple_temp_6 set Matrices_ZERO44_m13 = tuple_temp_7 set Matrices_ZERO44_m20 = tuple_temp_8 set Matrices_ZERO44_m21 = tuple_temp_9 set Matrices_ZERO44_m22 = tuple_temp_10 set Matrices_ZERO44_m23 = tuple_temp_11 set Matrices_ZERO44_m30 = tuple_temp_12 set Matrices_ZERO44_m31 = tuple_temp_13 set Matrices_ZERO44_m32 = tuple_temp_14 set Matrices_ZERO44_m33 = tuple_temp_15 return true endfunction function alloc_IdGenerator takes nothing returns integer local integer this_1 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < JASS_MAX_ARRAY_SIZE then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_1 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_1 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_1 = IdGenerator_nextFree[IdGenerator_firstFree] endif return this_1 endfunction function IdGenerator_init takes integer this_1 returns nothing endfunction function construct_IdGenerator takes integer this_1, integer start returns nothing call IdGenerator_init(this_1) endfunction function new_IdGenerator takes integer start returns integer local integer this_1 = alloc_IdGenerator() call construct_IdGenerator(this_1, start) return this_1 endfunction function init_ObjectIdGenerator takes nothing returns boolean call new_IdGenerator(2016423984) call new_IdGenerator(1213018160) call new_IdGenerator(1095577648) call new_IdGenerator(1112354864) call new_IdGenerator(1229795376) call new_IdGenerator(1380790320) return true endfunction function init_ObjectIds takes nothing returns boolean set ObjectIds_CHARMAP = ".................................!.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................." return true endfunction function init_Objects takes nothing returns boolean set Objects_impaleTargetDust = "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdx" return true endfunction function alloc_CallbackSingle_nullTimer_OnUnitEnterLeave takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1318 else call error("Out of memory: Could not create CallbackSingle_nullTimer_OnUnitEnterLeave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1318 endif return this_1 endfunction function player_setAbilityAvailable takes player this_1, integer abilityId, boolean avail returns nothing call SetPlayerAbilityAvailable(this_1, abilityId, avail) endfunction function init_OnUnitEnterLeave takes nothing returns boolean local integer i local integer temp local integer clVar set OnUnitEnterLeave_eventTrigger = CreateTrigger() set OnUnitEnterLeave_preplacedUnits = CreateGroup() set OnUnitEnterLeave_tempUnitsCount = 0 set OnUnitEnterLeave_ABILITY_ID = 1095577652 set i = 0 set temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call player_setAbilityAvailable(Player_players[i], OnUnitEnterLeave_ABILITY_ID, false) set i = i + 1 endloop set clVar = alloc_CallbackSingle_nullTimer_OnUnitEnterLeave() call construct_CallbackSingle(clVar) call nullTimer(clVar) return true endfunction function init_Orders takes nothing returns boolean set OrderIds_undefend = 852056 return true endfunction function init_PathingMaps takes nothing returns boolean return true endfunction function initPlayerArray takes nothing returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp set Player_players[i] = Player(i) set i = i + 1 endloop endfunction function init_Player takes nothing returns boolean set Player_localPlayer = GetLocalPlayer() call initPlayerArray() return true endfunction function init_Playercolor takes nothing returns boolean call ConvertPlayerColor(24) call ConvertPlayerColor(25) call ConvertPlayerColor(26) call ConvertPlayerColor(27) return true endfunction function alloc_CallbackSingle_nullTimer_Preloader takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 1319 else call error("Out of memory: Could not create CallbackSingle_nullTimer_Preloader.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 1319 endif return this_1 endfunction function unit_setInvulnerable takes unit this_1, boolean flag returns nothing call SetUnitInvulnerable(this_1, flag) endfunction function init_Preloader takes nothing returns boolean local integer clVar set Preloader_autoFinish = true set Preloader_dumg = CreateGroup() set Preloader_dum = createUnit(Basics_DUMMY_PLAYER, UnitIds_shade, MapBounds_playableMin_x, MapBounds_playableMin_y, 0.) call unit_setInvulnerable(Preloader_dum, true) if Preloader_dum == null then call error("DUMMY_UNITID not added correctly to the map.") endif if Preloader_autoFinish then set clVar = alloc_CallbackSingle_nullTimer_Preloader() call construct_CallbackSingle(clVar) call nullTimer(clVar) endif return true endfunction function init_Printing takes nothing returns boolean set Printing_DEBUG_LEVEL = 2 set Printing_DEBUG_MSG_DURATION = 45. 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 set Real_REAL_MAX = 340282366920938000000000000000000000000. return true endfunction function init_RegisterEvents takes nothing returns boolean set RegisterEvents_onCastMap = new_HashMap() call registerPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, ref_function_code__registerPlayerUnitEvent_RegisterEvents) return true endfunction function init_SafetyChecks takes nothing returns boolean set SafetyChecks_SAFETY_CHECKS_ENABLED = true 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 set String_ENABLE_MULTIBYTE_SUPPORT = false set String_charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" set String_numberset = "0123456789" call string_length(String_numberset) call string_length(String_charset) return true endfunction function c2sInit takes nothing returns nothing set StringUtils_c2s[0] = "" set StringUtils_c2s[1] = "" set StringUtils_c2s[2] = "" set StringUtils_c2s[3] = "" set StringUtils_c2s[4] = "" set StringUtils_c2s[5] = "" set StringUtils_c2s[6] = "" set StringUtils_c2s[7] = "" set StringUtils_c2s[8] = "" set StringUtils_c2s[9] = "\t" set StringUtils_c2s[10] = "\n" set StringUtils_c2s[11] = "" set StringUtils_c2s[12] = "" set StringUtils_c2s[13] = "\r" set StringUtils_c2s[14] = "" set StringUtils_c2s[15] = "" set StringUtils_c2s[16] = "" set StringUtils_c2s[17] = "" set StringUtils_c2s[18] = "" set StringUtils_c2s[19] = "" set StringUtils_c2s[20] = "" set StringUtils_c2s[21] = "" set StringUtils_c2s[22] = "" set StringUtils_c2s[23] = "" set StringUtils_c2s[24] = "" set StringUtils_c2s[25] = "" set StringUtils_c2s[26] = "" set StringUtils_c2s[27] = "" set StringUtils_c2s[28] = "" set StringUtils_c2s[29] = "" set StringUtils_c2s[30] = "" set StringUtils_c2s[31] = "" set StringUtils_c2s[32] = " " set StringUtils_c2s[33] = "!" set StringUtils_c2s[34] = "\"" set StringUtils_c2s[35] = "#" set StringUtils_c2s[36] = "$" set StringUtils_c2s[37] = "%" set StringUtils_c2s[38] = "&" set StringUtils_c2s[39] = "'" set StringUtils_c2s[40] = "(" set StringUtils_c2s[41] = ")" set StringUtils_c2s[42] = "*" set StringUtils_c2s[43] = "+" set StringUtils_c2s[44] = "," set StringUtils_c2s[45] = "-" set StringUtils_c2s[46] = "." set StringUtils_c2s[47] = "/" set StringUtils_c2s[48] = "0" set StringUtils_c2s[49] = "1" set StringUtils_c2s[50] = "2" set StringUtils_c2s[51] = "3" set StringUtils_c2s[52] = "4" set StringUtils_c2s[53] = "5" set StringUtils_c2s[54] = "6" set StringUtils_c2s[55] = "7" set StringUtils_c2s[56] = "8" set StringUtils_c2s[57] = "9" set StringUtils_c2s[58] = ":" set StringUtils_c2s[59] = ";" set StringUtils_c2s[60] = "<" set StringUtils_c2s[61] = "=" set StringUtils_c2s[62] = ">" set StringUtils_c2s[63] = "?" set StringUtils_c2s[64] = "@" set StringUtils_c2s[65] = "A" set StringUtils_c2s[66] = "B" set StringUtils_c2s[67] = "C" set StringUtils_c2s[68] = "D" set StringUtils_c2s[69] = "E" set StringUtils_c2s[70] = "F" set StringUtils_c2s[71] = "G" set StringUtils_c2s[72] = "H" set StringUtils_c2s[73] = "I" set StringUtils_c2s[74] = "J" set StringUtils_c2s[75] = "K" set StringUtils_c2s[76] = "L" set StringUtils_c2s[77] = "M" set StringUtils_c2s[78] = "N" set StringUtils_c2s[79] = "O" set StringUtils_c2s[80] = "P" set StringUtils_c2s[81] = "Q" set StringUtils_c2s[82] = "R" set StringUtils_c2s[83] = "S" set StringUtils_c2s[84] = "T" set StringUtils_c2s[85] = "U" set StringUtils_c2s[86] = "V" set StringUtils_c2s[87] = "W" set StringUtils_c2s[88] = "X" set StringUtils_c2s[89] = "Y" set StringUtils_c2s[90] = "Z" set StringUtils_c2s[91] = "[" set StringUtils_c2s[92] = "\\" set StringUtils_c2s[93] = "]" set StringUtils_c2s[94] = "^" set StringUtils_c2s[95] = "_" set StringUtils_c2s[96] = "`" set StringUtils_c2s[97] = "a" set StringUtils_c2s[98] = "b" set StringUtils_c2s[99] = "c" set StringUtils_c2s[100] = "d" set StringUtils_c2s[101] = "e" set StringUtils_c2s[102] = "f" set StringUtils_c2s[103] = "g" set StringUtils_c2s[104] = "h" set StringUtils_c2s[105] = "i" set StringUtils_c2s[106] = "j" set StringUtils_c2s[107] = "k" set StringUtils_c2s[108] = "l" set StringUtils_c2s[109] = "m" set StringUtils_c2s[110] = "n" set StringUtils_c2s[111] = "o" set StringUtils_c2s[112] = "p" set StringUtils_c2s[113] = "q" set StringUtils_c2s[114] = "r" set StringUtils_c2s[115] = "s" set StringUtils_c2s[116] = "t" set StringUtils_c2s[117] = "u" set StringUtils_c2s[118] = "v" set StringUtils_c2s[119] = "w" set StringUtils_c2s[120] = "x" set StringUtils_c2s[121] = "y" set StringUtils_c2s[122] = "z" set StringUtils_c2s[123] = "{" set StringUtils_c2s[124] = "|" set StringUtils_c2s[125] = "}" set StringUtils_c2s[126] = "~" set StringUtils_c2s[127] = "" endfunction function string_toUpperCase takes string this_1 returns string return StringCase(this_1, true) endfunction function s2cInit takes nothing returns nothing local integer i = 0 local integer temp = StringUtils_MAX_INDEX loop exitwhen i > temp if string_toUpperCase(StringUtils_c2s[i]) == StringUtils_c2s[i] then set StringUtils_s2c[StringHash(StringUtils_c2s[i]) / 2033480 + 1002] = i endif set i = i + 1 endloop endfunction function widthInit takes nothing returns nothing endfunction function initialize_759 takes nothing returns nothing call c2sInit() call s2cInit() call widthInit() endfunction function hashtable_hasString takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedString(this_1, parentKey, childKey) endfunction function Table_hasString takes integer this_1, integer parentKey returns boolean return hashtable_hasString(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_hasString takes integer this_1, integer parentKey returns boolean local boolean Table_Table_hasString_result 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 Table_Table_hasString_result = Table_hasString(this_1, parentKey) return Table_Table_hasString_result endfunction function stringToIndex takes string s returns integer local integer hash = string_getHash(s) 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_759() call stringToIndex("") return true endfunction function init_SyncSimple takes nothing returns boolean local trigger trig local integer i local integer temp set SyncSimple_DEFAULT_PREFIX = "S" set SyncSimple_LAST_CHUNK_PREFIX = "T" set SyncSimple_SYNC_IN_REPLAYS = false 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], SyncSimple_DEFAULT_PREFIX, false) call BlzTriggerRegisterPlayerSyncEvent(trig, Player_players[i], SyncSimple_LAST_CHUNK_PREFIX, false) set i = i + 1 endloop call trigger_addAction(trig, ref_function_code__addAction_SyncSimple) return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_439 return true endfunction function init_TargetsAllowed takes nothing returns boolean return true endfunction function createItem_427 takes integer itemId, real pos_x_1, real pos_y_1, real pos_z returns item return CreateItem(itemId, pos_x_1, pos_y_1) endfunction function vec2_toVec3 takes real this_x, real this_y returns real set vec2_toVec3_return_x = this_x set vec2_toVec3_return_y = this_y set vec2_toVec3_return_z = 0. return vec2_toVec3_return_x endfunction function createItem takes integer itemId, real pos_x_1, real pos_y_1 returns item return createItem_427(itemId, vec2_toVec3(pos_x_1, pos_y_1), vec2_toVec3_return_y, vec2_toVec3_return_z) endfunction function item_setVisible takes item this_1, boolean flag returns nothing call SetItemVisible(this_1, flag) endfunction function real_squared takes real this_1 returns real return this_1 * this_1 endfunction function init_TerrainUtils takes nothing returns boolean local item receiver call real_squared(10.) set TerrainUtils_DUMMY_ITEM_ID = 2003790951 set receiver = createItem(TerrainUtils_DUMMY_ITEM_ID, Vectors_ZERO2_x, Vectors_ZERO2_y) call item_setVisible(receiver, false) call Rect(0., 0., 128., 128.) set TerrainUtils_hiddenItemsCount = 0 call real_toInt(MapBounds_boundMax_x - MapBounds_boundMin_x) call real_toInt(MapBounds_boundMax_y - MapBounds_boundMin_y) return true endfunction function init_Textures takes nothing returns boolean return true endfunction function init_Tiles takes nothing returns boolean return true endfunction function init_TimerUtils takes nothing returns boolean set TimerUtils_freeTimersCount = 0 set TimerUtils_timerData = new_Table() set TimerUtils_HELD = 679645218 call new_HashMap() return true endfunction function initTypecastData takes nothing returns nothing call dispatch_Table_Table_Table_saveString(TypeCasting_typecastdata, 0, "") endfunction function init_TypeCasting takes nothing returns boolean set TypeCasting_typecastdata = new_Table() set TypeCasting_R2I_PRECISION = 1000. call InitHashtable() call initTypecastData() return true endfunction function init_UI takes nothing returns boolean return true endfunction function init_UnitAnimations takes nothing returns boolean return true endfunction function init_UnitIds takes nothing returns boolean set UnitIds_shade = 1970497636 return true endfunction function onEnter takes code c returns nothing call trigger_addCondition(OnUnitEnterLeave_eventTrigger, Filter(c)) endfunction function onLeave takes code c returns nothing call trigger_addAction(OnUnitEnterLeave_eventTrigger, c) endfunction function init_UnitIndexer takes nothing returns boolean set UnitIndexer_onIndexTrigger = CreateTrigger() set UnitIndexer_onDeindexTrigger = CreateTrigger() set UnitIndexer_tempUnitsCount = 0 call onEnter(ref_function_code__onEnter_UnitIndexer) call onLeave(ref_function_code__onLeave_UnitIndexer) return true endfunction function init_Units takes nothing returns boolean return true endfunction function init_UpgradeObjEditing takes nothing returns boolean return true endfunction function init_Vectors takes nothing returns boolean local real tuple_temp = 0. local real tuple_temp_1 = 0. local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 set Vectors_ZERO2_x = tuple_temp set Vectors_ZERO2_y = tuple_temp_1 set tuple_temp_2 = 0. set tuple_temp_3 = 0. set tuple_temp_4 = 0. set Vectors_ZERO3_x = tuple_temp_2 set Vectors_ZERO3_y = tuple_temp_3 set Vectors_ZERO3_z = tuple_temp_4 call Location(0., 0.) return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function framehandle_setEnabled takes framehandle this_1, boolean enabled returns nothing call BlzFrameSetEnable(this_1, enabled) endfunction function framehandle_disable takes framehandle this_1 returns nothing call framehandle_setEnabled(this_1, false) endfunction function framehandle_disable_613 takes framehandle this_1, player p returns nothing if Player_localPlayer == p or p == null then call framehandle_disable(this_1) endif endfunction function framehandle_enable takes framehandle this_1 returns nothing call framehandle_setEnabled(this_1, true) endfunction function framehandle_enable_615 takes framehandle this_1, player p returns nothing if Player_localPlayer == p or p == null then call framehandle_enable(this_1) endif endfunction function framehandle_isEnabled takes framehandle this_1 returns boolean return BlzFrameGetEnable(this_1) endfunction function framehandle_isEnabled_617 takes framehandle this_1, player p returns boolean local boolean cond_result if Player_localPlayer == p or p == null then set cond_result = framehandle_isEnabled(this_1) else set cond_result = false endif return cond_result endfunction function framehandle_setFocus takes framehandle this_1, boolean flag returns nothing call BlzFrameSetFocus(this_1, flag) endfunction function framehandle_setFocus_621 takes framehandle this_1, player p, boolean flag returns nothing if Player_localPlayer == p or p == null then call framehandle_setFocus(this_1, flag) endif endfunction function framehandle_unfocus takes framehandle this_1, player p returns nothing if framehandle_isEnabled_617(this_1, p) then call framehandle_disable_613(this_1, p) call framehandle_enable_615(this_1, p) else call framehandle_enable_615(this_1, p) call framehandle_disable_613(this_1, p) endif call framehandle_setFocus_621(this_1, p, false) endfunction function framehandle_releaseKeyboardFocus takes framehandle this_1, player p returns nothing call framehandle_unfocus(this_1, p) endfunction function ReleaseKeyboardFocusFrameListener_onEvent takes integer this_1 returns nothing call framehandle_releaseKeyboardFocus(FrameHandleListener_frame[this_1], GetTriggerPlayer()) endfunction function dispatch_FrameHandleListener_ClosureFrames_FrameHandleListener_onEvent takes integer this_1 returns nothing if FrameHandleListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FrameHandleListener.onEvent") else call error("Called FrameHandleListener.onEvent on invalid object.") endif endif call ReleaseKeyboardFocusFrameListener_onEvent(this_1) endfunction function onEvent takes nothing returns nothing local integer listener_1 = dispatch_HashMap_HashMap_HashMap_get(ClosureFrames_FRAME_MAP, handle_getHandleId(BlzGetTriggerFrame())) local frameeventtype eventType = BlzGetTriggerFrameEvent() local integer nextListener loop exitwhen not (listener_1 != 0) set nextListener = FrameHandleListener_next[listener_1] if FrameHandleListener_eventType[listener_1] == eventType then call dispatch_FrameHandleListener_ClosureFrames_FrameHandleListener_onEvent(listener_1) endif set listener_1 = nextListener endloop endfunction function dispatch_KeyPressListener_ClosureKeyPresses_KeyPressListener_onEvent takes integer this_1 returns nothing endfunction function onEvent_800 takes nothing returns nothing local integer listener_1 = dispatch_HashMap_HashMap_HashMap_get(ClosureKeyPresses_KEY_MAP, handle_getHandleId(BlzGetTriggerPlayerKey())) local integer metaKey = BlzGetTriggerPlayerMetaKey() local boolean onKeyDown = BlzGetTriggerPlayerIsKeyDown() loop exitwhen not (listener_1 != 0) if KeyPressListener_metaKey[listener_1] == metaKey and KeyPressListener_onKeyDown[listener_1] == onKeyDown then call dispatch_KeyPressListener_ClosureKeyPresses_KeyPressListener_onEvent(listener_1) endif set listener_1 = KeyPressListener_next[listener_1] endloop endfunction function spellActions takes nothing returns nothing local integer index = unit_getIndex(GetTriggerUnit()) if LastOrder_lastOrder[index] != 0 then endif endfunction function initGlobals takes nothing returns nothing set ForForceCallback_firstFree = 0 set ForForceCallback_maxIndex = 0 set ChunkedString_firstFree = 0 set ChunkedString_maxIndex = 0 set CallbackSingle_firstFree = 0 set CallbackSingle_maxIndex = 0 set EventListener_firstFree = 0 set EventListener_maxIndex = 0 set OnCastListener_firstFree = 0 set ForGroupCallback_firstFree = 0 set ForGroupCallback_maxIndex = 0 set Callback_firstFree = 0 set DamageElement_firstFree = 0 set DamageElement_maxIndex = 0 set DamageInstance_firstFree = 0 set DamageInstance_maxIndex = 0 set DummyCaster_firstFree = 0 set File_firstFree = 0 set File_maxIndex = 0 set HashList_firstFree = 0 set Table_firstFree = 0 set Table_maxIndex = 0 set TerrainZProvider_firstFree = 0 set TerrainZProvider_maxIndex = 0 set WallHitTransform_firstFree = 0 set WallHitTransform_maxIndex = 0 set UnitFilter_firstFree = 0 set UnitFilter_maxIndex = 0 set BackIterator_firstFree = 0 set BackIterator_maxIndex = 0 set Iterator_firstFree = 0 set Iterator_maxIndex = 0 set Order_firstFree = 0 set Order_maxIndex = 0 set BackIterator_firstFree_5 = 0 set BackIterator_maxIndex_7 = 0 set Iterator_firstFree_237 = 0 set Iterator_maxIndex_239 = 0 set Comparator_firstFree = 0 set Comparator_maxIndex = 0 set LLEntry_firstFree = 0 set LLEntry_maxIndex = 0 set LinkedList_firstFree = 0 set LinkedList_maxIndex = 0 set IdGenerator_firstFree = 0 set IdGenerator_maxIndex = 0 set OrderStringFactory_firstFree = 0 set OrderStringFactory_maxIndex = 0 set BufferSyncListener_firstFree = 0 set Sim3DSound_firstFree = 0 set SoundInstance_firstFree = 0 set StringIterator_firstFree = 0 set StringIterator_maxIndex = 0 set StringSyncListener_firstFree = 0 set BoolSyncListener_firstFree = 0 set IntSyncListener_firstFree = 0 set RealSyncListener_firstFree = 0 set SyncData_firstFree = 0 set UnitIndex_firstFree = 0 set UnitIndex_maxIndex = 0 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_Angle = function init_Angle set ref_function_init_Maths = function init_Maths set ref_function_init_String = function init_String 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_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_Force = function init_Force 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_ClosureForGroups = function init_ClosureForGroups set ref_function_init_LinkedList = function init_LinkedList set ref_function_init_ObjectIds = function init_ObjectIds set ref_function_init_TargetsAllowed = function init_TargetsAllowed 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_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_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_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_Environment = function init_Environment 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__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_564 = function onEvent_800 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_457 = function code__addAction_nullTimer_ClosureEvents_390 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 endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call initCompiletimeState() set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_Abilities)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Abilities.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Real)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Real.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Integer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Integer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BitSet)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BitSet.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Angle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Angle.") 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_String)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package String.") 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_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_Force)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Force.") 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_ClosureForGroups)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ClosureForGroups.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_LinkedList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LinkedList.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ObjectIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TargetsAllowed)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TargetsAllowed.") 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_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_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_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_Environment)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Environment.") 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