// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals // integer JASS_MAX_ARRAY_SIZE=0 // integer PLAYER_NEUTRAL_PASSIVE=0 // integer PLAYER_NEUTRAL_AGGRESSIVE=0 // playercolor PLAYER_COLOR_RED=null // playercolor PLAYER_COLOR_BLUE=null // playercolor PLAYER_COLOR_CYAN=null // playercolor PLAYER_COLOR_PURPLE=null // playercolor PLAYER_COLOR_YELLOW=null // playercolor PLAYER_COLOR_ORANGE=null // playercolor PLAYER_COLOR_GREEN=null // playercolor PLAYER_COLOR_PINK=null // playercolor PLAYER_COLOR_LIGHT_GRAY=null // playercolor PLAYER_COLOR_LIGHT_BLUE=null // playercolor PLAYER_COLOR_AQUA=null // playercolor PLAYER_COLOR_BROWN=null // playercolor PLAYER_COLOR_MAROON=null // playercolor PLAYER_COLOR_NAVY=null // playercolor PLAYER_COLOR_TURQUOISE=null // playercolor PLAYER_COLOR_VIOLET=null // playercolor PLAYER_COLOR_WHEAT=null // playercolor PLAYER_COLOR_PEACH=null // playercolor PLAYER_COLOR_MINT=null // playercolor PLAYER_COLOR_LAVENDER=null // playercolor PLAYER_COLOR_COAL=null // playercolor PLAYER_COLOR_SNOW=null // playercolor PLAYER_COLOR_EMERALD=null // playercolor PLAYER_COLOR_PEANUT=null // alliancetype ALLIANCE_PASSIVE=null // version VERSION_REIGN_OF_CHAOS=null // attacktype ATTACK_TYPE_NORMAL=null // racepreference RACE_PREF_HUMAN=null // mapcontrol MAP_CONTROL_USER=null // mapcontrol MAP_CONTROL_RESCUABLE=null // gametype GAME_TYPE_MELEE=null // gametype GAME_TYPE_FFA=null // gametype GAME_TYPE_USE_MAP_SETTINGS=null // gametype GAME_TYPE_ONE_ON_ONE=null // gametype GAME_TYPE_TWO_TEAM_PLAY=null // gametype GAME_TYPE_THREE_TEAM_PLAY=null // gametype GAME_TYPE_FOUR_TEAM_PLAY=null // placement MAP_PLACEMENT_USE_MAP_SETTINGS=null // playerslotstate PLAYER_SLOT_STATE_PLAYING=null // fgamestate GAME_STATE_TIME_OF_DAY=null // playerstate PLAYER_STATE_GIVES_BOUNTY=null // unitstate UNIT_STATE_LIFE=null // playerevent EVENT_PLAYER_LEAVE=null // playerevent EVENT_PLAYER_END_CINEMATIC=null // playerunitevent EVENT_PLAYER_UNIT_RESCUED=null // playerunitevent EVENT_PLAYER_UNIT_DEATH=null // playerunitevent EVENT_PLAYER_UNIT_UPGRADE_FINISH=null // playerunitevent EVENT_PLAYER_UNIT_ISSUED_ORDER=null // playerunitevent EVENT_PLAYER_UNIT_DROP_ITEM=null // playerunitevent EVENT_PLAYER_UNIT_PICKUP_ITEM=null // playerunitevent EVENT_PLAYER_UNIT_USE_ITEM=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_SELL_ITEM=null // playerunitevent EVENT_PLAYER_UNIT_SPELL_EFFECT=null // limitop LESS_THAN=null // limitop EQUAL=null // limitop GREATER_THAN_OR_EQUAL=null // unittype UNIT_TYPE_HERO=null // unittype UNIT_TYPE_STRUCTURE=null // itemtype ITEM_TYPE_PERMANENT=null // itemtype ITEM_TYPE_CHARGED=null // itemtype ITEM_TYPE_ARTIFACT=null // integer CAMERA_MARGIN_LEFT=0 // integer CAMERA_MARGIN_RIGHT=0 // integer CAMERA_MARGIN_TOP=0 // integer CAMERA_MARGIN_BOTTOM=0 // originframetype ORIGIN_FRAME_GAME_UI=null // originframetype ORIGIN_FRAME_WORLD_FRAME=null // real bj_GAME_STARTED_THRESHOLD=0. // integer bj_MAX_PLAYERS=0 // integer bj_PLAYER_NEUTRAL_VICTIM=0 // integer bj_MAX_PLAYER_SLOTS=0 // integer bj_MAX_SKELETONS=0 // integer bj_MAX_STOCK_ITEM_SLOTS=0 // integer bj_MAX_STOCK_UNIT_SLOTS=0 // integer bj_MAX_ITEM_LEVEL=0 // real bj_TOD_DAWN=0. // real bj_TOD_DUSK=0. // real bj_STOCK_RESTOCK_INITIAL_DELAY=0. // real bj_STOCK_RESTOCK_INTERVAL=0. // integer bj_STOCK_MAX_ITERATIONS=0 // real bj_RESCUE_PING_TIME=0. // integer bj_MAX_QUEUED_TRIGGERS=0 // real bj_QUEUED_TRIGGER_TIMEOUT=0. // real bj_CORPSE_MAX_DEATH_TIME=0. // force bj_FORCE_ALL_PLAYERS=null // rect bj_mapInitialPlayableArea=null // boolean bj_slotControlReady=false // timer bj_gameStartedTimer=null // trigger bj_dncSoundsDay=null // trigger bj_dncSoundsNight=null // sound bj_dayAmbientSound=null // sound bj_nightAmbientSound=null // trigger bj_dncSoundsDawn=null // trigger bj_dncSoundsDusk=null // sound bj_dawnSound=null // sound bj_duskSound=null // boolean bj_useDawnDuskSounds=false // boolean bj_dncIsDaytime=false // sound bj_rescueSound=null // trigger bj_stockItemPurchased=null // timer bj_stockUpdateTimer=null // integer bj_stockPickedItemLevel=0 // itemtype bj_stockPickedItemType=null // trigger bj_rescueUnitBehavior=null // boolean bj_rescueChangeColorUnit=false // boolean bj_rescueChangeColorBldg=false // integer bj_queuedExecTotal=0 // timer bj_queuedExecTimeoutTimer=null // trigger bj_queuedExecTimeout=null // integer bj_groupEnumTypeId=0 // player bj_groupEnumOwningPlayer=null // location bj_enumDestructableCenter=null // real bj_enumDestructableRadius=0. // group bj_suspendDecayFleshGroup=null // group bj_suspendDecayBoneGroup=null // timer bj_delayedSuspendDecayTimer=null // trigger bj_delayedSuspendDecayTrig=null // integer bj_livingPlayerUnitsTypeId=0 trigger gg_trg_Melee_Initialization=null real Angle_DEGTORAD=0. real Angle_RADTODEG=0. real Basics_ANIMATION_PERIOD=0. integer Basics_HEIGHT_ENABLER=0 player Basics_DUMMY_PLAYER=null integer BigNum_l_count=0 integer BigString_BIG_SUBSTRING_LEN=0 integer BigString_MAX_SUBSTRINGS=0 integer BitSet_BITSET_SIZE=0 integer array BitSet_pows integer array Buff_buffMap integer Buff_LinkedListModule_first=0 integer Buff_LinkedListModule_last=0 integer Buff_LinkedListModule_size=0 playerevent ClosureEvents_EVENT_PLAYER_CHAT_FILTER=null trigger ClosureEvents_unitTrig=null trigger ClosureEvents_leaveTrig=null trigger ClosureEvents_keyTrig=null integer array ClosureEvents_eventidToIndex integer ClosureEvents_eventTypeCounter=0 integer EventListener_castMap=0 integer array EventListener_castMapCasters integer array EventListener_generalListenersFirsts integer array EventListener_unitListenersFirsts boolean EventListener_useMouseEvents=false integer array ClosureForGroups_tempCallbacks integer ClosureForGroups_tempCallbacksCount=0 integer ClosureForGroups_maxCount=0 integer ClosureForGroups_iterCount=0 integer ClosureTimers_x=0 string array Colors_hexs integer Colors_decs=0 integer Colors_COLOR_WHITE_red=0 integer Colors_COLOR_WHITE_green=0 integer Colors_COLOR_WHITE_blue=0 integer Colors_COLOR_WHITE_alpha=0 integer Colors_COLOR_BLACK_red=0 integer Colors_COLOR_BLACK_green=0 integer Colors_COLOR_BLACK_blue=0 integer Colors_COLOR_BLACK_alpha=0 integer Colors_COLOR_GOLD_red=0 integer Colors_COLOR_GOLD_green=0 integer Colors_COLOR_GOLD_blue=0 integer Colors_COLOR_GOLD_alpha=0 integer Colors_MAX_PLAYER_COLORS=0 integer array Colors_PLAYER_COLORS_red integer array Colors_PLAYER_COLORS_green integer array Colors_PLAYER_COLORS_blue 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 multiboard DebugInfo_mb=null integer DebugInfo_rows=0 integer DebugInfo_columns=0 integer DebugInfo_seconds=0 integer DebugInfo_eventCallbacksPerSecond=0 integer DebugInfo_totalEventCallbacks=0 integer DebugInfo_allocationsPerSecond=0 integer DebugInfo_totalAllocations=0 boolean DebugInfo_isFirst=false 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 Encoder_maxHash=0 integer array Entity_entities integer Entity_DupletListModule_firstActive=0 integer Entity_DupletListModule_lastActive=0 integer Entity_DupletListModule_activeSize=0 integer Entity_DupletListModule_inactiveSize=0 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 FText_recylcer=0 integer FText_LinkedListModule_first=0 integer FText_LinkedListModule_last=0 integer FText_LinkedListModule_size=0 framehandle Framehandle_GAME_UI=null 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 Framehandle_BLZ_FRAMENAME_MAXLENGTH=0 boolean Frentity_DYNAMIC_Z=false boolean Frentity_DISABLE_TEAMATTACK=false boolean Frentity_SHOW_SQUARE=false timer GameTimer_gameTimer=null 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 integer array Heightmap_quads_id integer array Heightmap_quads_x integer array Heightmap_quads_y real array Heightmap_quads_botLeft_x real array Heightmap_quads_botLeft_y real array Heightmap_quads_z1 real array Heightmap_quads_z2 real array Heightmap_quads_z3 real array Heightmap_quads_z4 integer Integer_INT_MAX=0 integer Integer_INT_MIN=0 string JsonParser_numbermap=null string JsonParser_lettermap=null integer Json_JSON_SIGN_COMMA=0 integer Json_JSON_OPEN_ARRAY=0 integer Json_JSON_CLOSE_ARRAY=0 boolean array KeyUtils_keyStatuses_up boolean array KeyUtils_keyStatuses_down boolean array KeyUtils_keyStatuses_left boolean array KeyUtils_keyStatuses_right integer KeyUtils_firstKeyListener=0 integer LZW_maxDictSize=0 string LZW_ALLOWED_PLAYER_CHARS=null integer LZW_dictionary=0 integer LZW_dictSize=0 boolean MagicFunctions_compiletime=false rect MapBounds_playableMapRect=null rect MapBounds_boundRect=null region MapBounds_boundRegion=null real MapBounds_playableMin_x=0. real MapBounds_playableMin_y=0. real MapBounds_playableMax_x=0. real MapBounds_playableMax_y=0. real MapBounds_boundMin_x=0. real MapBounds_boundMin_y=0. real MapBounds_boundMax_x=0. real MapBounds_boundMax_y=0. 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. integer ObjectIdGenerator_UNIT_ID_GEN=0 string ObjectIds_CHARMAP=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 real PhysicsConstants_defaultGravity=0. player array Player_players player Player_localPlayer=null playercolor Playercolor_PLAYER_COLOR_BLACK_AGGRESSIVE=null playercolor Playercolor_PLAYER_COLOR_UNKNOWN1=null playercolor Playercolor_PLAYER_COLOR_UNKNOWN2=null playercolor Playercolor_PLAYER_COLOR_BLACK_PASSIVE=null playercolor array Playercolor_LOOKUP integer Players_ALL_PLAYERS=0 integer Players_onLeaveListener=0 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 hashtable Selector_BTN_TO_ID_MAP=null string array Squares_squares string array StringUtils_c2s integer StringUtils_MAX_INDEX=0 string String_charset=null string String_numberset=null hashtable Table_ht=null integer TerrainUtils_DUMMY_ITEM_ID=0 integer TerrainUtils_TILES_X=0 integer TerrainUtils_TILES_Y=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. location Vectors_tempLoc=null hashtable hashtable_compiletime=null hashtable hashtable_compiletime_687=null hashtable hashtable_compiletime_688=null hashtable hashtable_compiletime_689=null hashtable hashtable_compiletime_690=null integer array BigNum_nextFree integer BigNum_firstFree=0 integer BigNum_maxIndex=0 integer array BigNum_typeId integer array BigNum_l_nextFree integer BigNum_l_firstFree=0 integer BigNum_l_maxIndex=0 integer array BigNum_l_typeId integer array BigString_nextFree integer BigString_firstFree=0 integer BigString_maxIndex=0 integer array BigString_typeId integer array BigSubString_nextFree integer BigSubString_firstFree=0 integer BigSubString_maxIndex=0 integer array BigSubString_typeId integer array DamageListener_nextFree integer DamageListener_firstFree=0 integer DamageListener_maxIndex=0 integer array DamageListener_typeId integer array EventListener_nextFree integer EventListener_firstFree=0 integer EventListener_maxIndex=0 integer array EventListener_typeId integer array CallbackSingle_nextFree integer CallbackSingle_firstFree=0 integer CallbackSingle_maxIndex=0 integer array CallbackSingle_typeId integer Buff_firstFree=0 integer array Buff_typeId integer array BackIterator_nextFree integer BackIterator_firstFree=0 integer BackIterator_maxIndex=0 integer array Iterator_nextFree integer Iterator_firstFree=0 integer Iterator_maxIndex=0 integer array Cine_typeId integer array KeyFrame_typeId integer OnCastListener_firstFree=0 integer array OnCastListener_typeId integer array ForGroupCallback_nextFree integer ForGroupCallback_firstFree=0 integer ForGroupCallback_maxIndex=0 integer array ForGroupCallback_typeId integer Callback_firstFree=0 integer array Callback_typeId integer array CollisionShape_nextFree integer CollisionShape_firstFree=0 integer CollisionShape_maxIndex=0 integer array CollisionWorld_nextFree integer CollisionWorld_firstFree=0 integer CollisionWorld_maxIndex=0 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 array Encoder_nextFree integer Encoder_firstFree=0 integer Encoder_maxIndex=0 integer array Encoder_typeId integer array SeqCallback_nextFree integer SeqCallback_firstFree=0 integer SeqCallback_maxIndex=0 integer array SeqCallback_typeId integer array ForForceCallback_nextFree integer ForForceCallback_firstFree=0 integer ForForceCallback_maxIndex=0 integer array ForForceCallback_typeId integer array PayloadCallback_nextFree integer PayloadCallback_firstFree=0 integer PayloadCallback_maxIndex=0 integer array PayloadCallback_typeId integer array Serializable_nextFree integer Serializable_firstFree=0 integer Serializable_maxIndex=0 integer array Serializable_typeId integer array Iterator_nextFree_367 integer Iterator_firstFree_361=0 integer Iterator_maxIndex_364=0 integer array FText_nextFree integer FText_firstFree=0 integer FText_maxIndex=0 integer array FText_typeId integer array BackIterator_nextFree_13 integer BackIterator_firstFree_9=0 integer BackIterator_maxIndex_11=0 integer array Iterator_nextFree_366 integer Iterator_firstFree_360=0 integer Iterator_maxIndex_363=0 integer array Iterator_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 HashReader_nextFree integer HashReader_firstFree=0 integer HashReader_maxIndex=0 integer array HashReader_typeId integer array JsonParser_typeId integer array Json_typeId integer array Property_nextFree integer Property_firstFree=0 integer Property_maxIndex=0 integer array Comparator_nextFree integer Comparator_firstFree=0 integer Comparator_maxIndex=0 integer LLBackIterator_firstFree=0 integer array LLBackIterator_typeId integer array LLEntry_nextFree integer LLEntry_firstFree=0 integer LLEntry_maxIndex=0 integer array LLEntry_typeId integer array LLIterator_nextFree integer LLIterator_firstFree=0 integer LLIterator_maxIndex=0 integer array LLIterator_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 IdGenerator_typeId integer array OrderStringFactory_nextFree integer OrderStringFactory_firstFree=0 integer OrderStringFactory_maxIndex=0 integer array OnPlayerLeave_nextFree integer OnPlayerLeave_firstFree=0 integer OnPlayerLeave_maxIndex=0 integer array OnPlayerLeave_typeId integer array Delimiter_nextFree integer Delimiter_firstFree=0 integer Delimiter_maxIndex=0 integer array BtnConfig_typeId integer array UnitIndex_nextFree integer UnitIndex_firstFree=0 integer UnitIndex_maxIndex=0 integer array UnitIndex_typeId integer array Reference_integer__nextFree integer Reference_integer__firstFree=0 integer Reference_integer__maxIndex=0 integer array Reference_integer__typeId integer array BigNum_list integer array BigNum_base integer array BigNum_l_leaf integer array BigNum_l_next integer array BigString_length integer array BigString_startoffset integer array BigSubString_parent integer array BigSubString_next integer array BigSubString_start integer array BigSubString_length string array BigSubString_preinit unit array upg unit array Buff_target integer array Buff_buffData_abilId integer array Buff_buffData_buffId boolean array Buff_done integer array Buff_LinkedListModule_prev integer array Buff_LinkedListModule_next integer array Cine_builder integer array Cine_keyFramePointer integer array CineBuilder_keyFrames integer array this_835 player array target real array KeyFrame_camPosition_x real array KeyFrame_camPosition_y real array KeyFrame_camTime string array KeyFrame_text real array KeyFrame_duration 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 integer array cb timerdialog array dia timer array CallbackSingle_t real array DamageInstance_amount boolean array DamageInstance_unreduced attacktype array DamageInstance_nativeAttackType damagetype array DamageInstance_nativeDamageType weapontype array DamageInstance_nativeWeaponType integer array DamageListener_next unit array u string array Encoder_charset integer array Encoder_base real array Encoder_digits integer array Encoder_bignum integer array Encoder_hash integer array Encoder_inputhash integer array Encoder_comparehash integer array w_cur integer array big integer array this_837 integer array onFinish integer array w_cur_602 integer array this_838 integer array bs integer array w_i integer array onFinishString integer array this_839 integer array this_840 integer array this_841 integer array bs_665 integer array onFinish_697 integer array this_842 integer array this_843 integer array this_844 integer array this_845 integer array bs_666 integer array onFinish_698 integer array this_846 integer array onFinishLoad integer array this_847 integer array this_848 integer array this_849 boolean array Entity_done integer array condition integer array resetCount integer array action texttag array FText_tt boolean array FText_permanent real array FText_timestamp integer array FText_cb integer array FText_LinkedListModule_prev integer array FText_LinkedListModule_next integer array this_850 integer array Iterator_current boolean array Iterator_destroyOnClose integer array createNow integer array HashList_size integer array HashMap_size integer array IterableMap_keys boolean array IterableMap__destroyed integer array xRef integer array zMap integer array xRef_881 integer array zMap_884 integer array HashReader_data integer array HashReader_integerReadIndex integer array HashReader_realReadIndex integer array HashReader_stringReadIndex integer array HashReader_booleanReadIndex integer array HashReader_integerCount integer array HashReader_realCount integer array HashReader_stringCount integer array HashReader_booleanCount integer array JsonParser_bigInput integer array JsonParser_currentPosition integer array JsonParser_propStartPosition integer array JsonParser_squareBracketLvl integer array JsonParser_lastType string array JsonParser_currentToken integer array JsonParser_output integer array JsonParser_outputList integer array JsonParser_propName integer array JsonParser_propVal integer array this_851 integer array finalCallback integer array this_852 integer array callback integer array Json_properties integer array Json_plist integer array Property_name integer array Property_value integer array itr integer array encoder integer array dictSize integer array intList integer array onFinish_699 integer array onFinish_700 integer array encoder_680 integer array encoder_681 integer array onFinish_701 integer array encoder_682 integer array onFinish_702 integer array encoder_683 integer array dictSize_677 integer array positions integer array onFinish_703 integer array inc integer array data integer array A integer array B integer array intList_693 integer array onFinish_704 integer array onFinish_705 integer array output integer array onFinish_706 integer array itr_695 string array A_1 string array B_7 integer array output_711 integer array onFinish_707 integer array result integer array LLEntry_elem integer array LLEntry_prev integer array LLEntry_next integer array LLIterator_dummy integer array LLIterator_current integer array LLIterator_parent boolean array LLIterator_destroyOnClose integer array LinkedList_dummy integer array LinkedList_size integer array LinkedList_staticItr integer array LinkedList_staticBackItr integer array IdGenerator_i1 integer array IdGenerator_i2 integer array IdGenerator_i3 integer array IdGenerator_i4 integer array xRef_882 real array ShieldBuff_blockAmount group array Projectile_hitGroup integer array Projectile_onHit integer array this string array Delimiter_token integer array BtnConfig_abilId integer array BtnConfig_x integer array BtnConfig_y string array BtnConfig_name string array BtnConfig_tooltip integer array BtnConfig_listener integer array Selector_builder integer array SelectorBuilder_btns integer array this_836 integer array PayloadCallback_customData boolean array SeqCallback_done timer array SeqCallback_ref unit array UnitIndex__unit integer array Reference_val real real_asAngleDegrees_return_radians=0. integer emptyBitset_return_val=0 real vec3_toVec2_return_x=0. real vec3_toVec2_return_y=0. real unit_getPos_return_x=0. real unit_getPos_return_y=0. integer playercolor_toColor_return_red=0 integer playercolor_toColor_return_green=0 integer playercolor_toColor_return_blue=0 integer colorA_withoutAlpha_return_red=0 integer colorA_withoutAlpha_return_green=0 integer colorA_withoutAlpha_return_blue=0 real vec2_op_minus_return_x=0. real vec2_op_minus_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. integer vec2_getQuad_return_id=0 integer vec2_getQuad_return_x=0 integer vec2_getQuad_return_y=0 real vec2_getQuad_return_botLeft_x=0. real vec2_getQuad_return_botLeft_y=0. real vec2_getQuad_return_z1=0. real vec2_getQuad_return_z2=0. real vec2_getQuad_return_z3=0. real vec2_getQuad_return_z4=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 tile_return_id=0 real tile_toVec2_return_x=0. real tile_toVec2_return_y=0. string array BigString_substrings_0 string array BigString_substrings_1 string array BigString_substrings_2 string array BigString_substrings_3 string array BigString_substrings_4 string array BigString_substrings_5 string array BigString_substrings_6 string array BigString_substrings_7 string array BigString_substrings_8 string array BigString_substrings_9 string array BigString_substrings_10 string array BigString_substrings_11 string array BigString_substrings_12 string array BigString_substrings_13 string array BigString_substrings_14 string array BigString_substrings_15 string array BigString_substrings_16 string array BigString_substrings_17 string array BigString_substrings_18 string array BigString_substrings_19 string array BigString_substrings_20 string array BigString_substrings_21 string array BigString_substrings_22 string array BigString_substrings_23 string array BigString_substrings_24 code ref_function_Trig_Melee_Initialization_Actions=null 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_TargetsAllowed=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_Playercolor=null code ref_function_init_Colors=null code ref_function_init_Framehandle=null code ref_function_init_Group=null code ref_function_init_Lightning=null code ref_function_init_WeatherEffects=null code ref_function_init_TypeCasting=null code ref_function_init_HashList=null code ref_function_init_EventHelper=null code ref_function_init_AbilityObjEditing=null code ref_function_init_AttachmentPoints=null code ref_function_init_BigNum=null code ref_function_init_BigString=null code ref_function_init_ClosureForGroups=null code ref_function_init_LinkedList=null code ref_function_init_ObjectIds=null code ref_function_init_TimerUtils=null code ref_function_init_ClosureTimers=null code ref_function_init_UnitIds=null code ref_function_init_MapBounds=null code ref_function_init_Preloader=null code ref_function_init_ObjectIdGenerator=null code ref_function_init_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_DamageEvent=null code ref_function_init_Squares=null code ref_function_init_TerrainUtils=null code ref_function_init_PhysicsConstants=null code ref_function_init_StringUtils=null code ref_function_init_FText=null code ref_function_init_Frentity=null code ref_function_init_Execute=null code ref_function_init_Heightmap=null code ref_function_init_Entity=null code ref_function_init_Buff=null code ref_function_init_BuffIds=null code ref_function_init_Buildings=null code ref_function_init_Icons=null code ref_function_init_ChannelAbilityPreset=null code ref_function_init_Collision=null code ref_function_init_DebugInfo=null code ref_function_init_Doodads=null code ref_function_init_DummyRecycler=null code ref_function_init_Encoder=null code ref_function_init_EntityManagement=null code ref_function_init_Environment=null code ref_function_init_ItemIds=null code ref_function_init_Objects=null code ref_function_init_Sounds=null code ref_function_init_Soundsets=null code ref_function_init_Textures=null code ref_function_init_UI=null code ref_function_init_Units=null code ref_function_init_Fx2Entity=null code ref_function_init_FxEntity=null code ref_function_init_GroupUtils=null code ref_function_init_Hello=null code ref_function_init_LZW=null code ref_function_init_Json=null code ref_function_init_JsonParser=null code ref_function_init_KeyUtils=null code ref_function_init_Pathingmap=null code ref_function_init_PhysicsEntity=null code ref_function_init_Players=null code ref_function_init_Selector=null code ref_function_init_Usage=null code ref_function_code__onUnitIndex_ClosureEvents=null code ref_function_code__onUnitDeindex_ClosureEvents=null code ref_function_EventListener_generalEventCallback=null code ref_function_code__Filter_ClosureForGroups=null code ref_function_code__addAction_DebugInfo=null code ref_function_code__startPeriodic_DebugInfo=null code ref_function_executeCurrentCallback=null code ref_function_code__startPeriodic_GameTimer=null code ref_function_code__registerPlayerUnitEvent_RegisterEvents=null code ref_function_code__start_SeqWorker=null code ref_function_code__start_SeqWorker_737=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_724=null code ref_function_code__addAction_nullTimer_ClosureEvents_725=null code ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents=null code ref_function_code__start_CallbackSingle_ClosureTimers=null code ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave=null code ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave=null code ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave=null boolean tempReturn_boolean=false integer tempReturn_integer=0 string tempReturn_string=null endglobals function InitTrig_Melee_Initialization takes nothing returns nothing set gg_trg_Melee_Initialization = CreateTrigger() call TriggerRegisterTimerEventSingle(gg_trg_Melee_Initialization, 1.00) call TriggerAddAction(gg_trg_Melee_Initialization, ref_function_Trig_Melee_Initialization_Actions) endfunction function InitCustomTriggers takes nothing returns nothing call InitTrig_Melee_Initialization() endfunction function InitGlobals takes nothing returns nothing endfunction 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_1121 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_1121(Player_localPlayer, 4, msg) endfunction function compileError takes string msg returns nothing endfunction function hashtable_hasBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedBoolean(this_1, parentKey, childKey) endfunction function hashtable_hasInt takes hashtable this_1, integer parentKey, integer childKey returns boolean return HaveSavedInteger(this_1, parentKey, childKey) endfunction function hashtable_loadBoolean takes hashtable this_1, integer parentKey, integer childKey returns boolean return LoadBoolean(this_1, parentKey, childKey) endfunction function hashtable_loadInt takes hashtable this_1, integer parentKey, integer childKey returns integer return LoadInteger(this_1, parentKey, childKey) endfunction function hashtable_saveBoolean takes hashtable this_1, integer parentKey, integer childKey, boolean value returns nothing call SaveBoolean(this_1, parentKey, childKey, value) endfunction function hashtable_saveInt takes hashtable this_1, integer parentKey, integer childKey, integer value returns nothing call SaveInteger(this_1, parentKey, childKey, value) endfunction function real_toInt takes real this_1 returns integer return R2I(this_1) endfunction function string_getHash takes string this_1 returns integer return StringHash(this_1) endfunction function error takes string msg returns nothing local integer hash if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else if not ErrorHandling_suppressErrorMessages then set hash = string_getHash(msg) if hashtable_hasInt(ErrorHandling_HT, 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_690 = InitHashtable() set hashtable_compiletime_689 = InitHashtable() set hashtable_compiletime_688 = InitHashtable() set hashtable_compiletime_687 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_689, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_689, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_689, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_689, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_689, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_689, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_689, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_689, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_689, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_689, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_689, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_689, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_689, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_689, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_689, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_689, 1, 789744696, 15) call SaveStr(hashtable_compiletime_689, 2, 0, "") call SaveInteger(hashtable_compiletime_689, 7, 0, 0) call SaveInteger(hashtable_compiletime_689, 7, 1, 0) call SaveInteger(hashtable_compiletime_689, 7, 2, 0) call SaveInteger(hashtable_compiletime_689, 7, 3, 0) call SaveInteger(hashtable_compiletime_689, 7, 4, 0) call SaveInteger(hashtable_compiletime_689, 7, 5, 0) call SaveInteger(hashtable_compiletime_689, 7, 6, 0) call SaveInteger(hashtable_compiletime_689, 7, 7, 0) call SaveInteger(hashtable_compiletime_689, 7, 8, 0) call SaveInteger(hashtable_compiletime_689, 7, 9, 0) call SaveInteger(hashtable_compiletime_689, 7, 10, 0) call SaveInteger(hashtable_compiletime_689, 7, 11, 0) call SaveInteger(hashtable_compiletime_689, 7, 12, 0) call SaveInteger(hashtable_compiletime_689, 7, 13, 0) call SaveInteger(hashtable_compiletime_689, 7, 14, 0) call SaveInteger(hashtable_compiletime_689, 7, 15, 0) call SaveInteger(hashtable_compiletime_689, 7, 16, 0) call SaveInteger(hashtable_compiletime_689, 7, 17, 0) call SaveInteger(hashtable_compiletime_689, 7, 18, 0) call SaveInteger(hashtable_compiletime_689, 7, 19, 0) call SaveInteger(hashtable_compiletime_689, 7, 20, 0) call SaveInteger(hashtable_compiletime_689, 7, 21, 0) call SaveInteger(hashtable_compiletime_689, 7, 22, 0) call SaveInteger(hashtable_compiletime_689, 7, 23, 0) call SaveInteger(hashtable_compiletime_689, 7, 24, 0) call SaveInteger(hashtable_compiletime_689, 7, 25, 0) call SaveInteger(hashtable_compiletime_689, 7, 26, 0) call SaveInteger(hashtable_compiletime_689, 7, 27, 0) call SaveInteger(hashtable_compiletime_689, 7, 28, 0) call SaveInteger(hashtable_compiletime_689, 7, 29, 0) call SaveInteger(hashtable_compiletime_689, 7, 30, 0) call SaveInteger(hashtable_compiletime_689, 7, 31, 0) call SaveInteger(hashtable_compiletime_689, 7, 32, 0) call SaveInteger(hashtable_compiletime_689, 7, 33, 0) call SaveInteger(hashtable_compiletime_689, 7, 34, 0) call SaveInteger(hashtable_compiletime_689, 7, 35, 0) call SaveInteger(hashtable_compiletime_689, 7, 36, 0) call SaveInteger(hashtable_compiletime_689, 7, 37, 0) call SaveInteger(hashtable_compiletime_689, 7, 38, 0) call SaveInteger(hashtable_compiletime_689, 7, 39, 0) call SaveInteger(hashtable_compiletime_689, 7, 40, 0) call SaveInteger(hashtable_compiletime_689, 7, 41, 0) call SaveInteger(hashtable_compiletime_689, 7, 42, 0) call SaveInteger(hashtable_compiletime_689, 7, 43, 0) call SaveInteger(hashtable_compiletime_689, 7, 44, 0) call SaveInteger(hashtable_compiletime_689, 7, 45, 0) call SaveInteger(hashtable_compiletime_689, 7, 46, 0) call SaveInteger(hashtable_compiletime_689, 7, 47, 0) call SaveInteger(hashtable_compiletime_689, 7, 48, 0) call SaveInteger(hashtable_compiletime_689, 7, 49, 0) call SaveInteger(hashtable_compiletime_689, 7, 50, 0) call SaveInteger(hashtable_compiletime_689, 7, 51, 0) call SaveInteger(hashtable_compiletime_689, 7, 52, 0) call SaveInteger(hashtable_compiletime_689, 7, 53, 0) call SaveInteger(hashtable_compiletime_689, 7, 54, 0) call SaveInteger(hashtable_compiletime_689, 7, 55, 0) call SaveInteger(hashtable_compiletime_689, 7, 56, 0) call SaveInteger(hashtable_compiletime_689, 7, 57, 0) call SaveInteger(hashtable_compiletime_689, 7, 58, 0) call SaveInteger(hashtable_compiletime_689, 7, 59, 0) call SaveInteger(hashtable_compiletime_689, 7, 60, 0) call SaveInteger(hashtable_compiletime_689, 7, 61, 0) call SaveInteger(hashtable_compiletime_689, 7, 62, 0) call SaveInteger(hashtable_compiletime_689, 7, 63, 0) call SaveStr(hashtable_compiletime_689, 2, 1804483594, "air") call SaveStr(hashtable_compiletime_689, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime_689, 2, -681966791, "ground") call SaveStr(hashtable_compiletime_689, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime_689, 2, 392811314, "item") call SaveStr(hashtable_compiletime_689, 2, 124309475, "structure") call SaveStr(hashtable_compiletime_689, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime_689, 2, -85648186, "ward") call SaveStr(hashtable_compiletime_689, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime_689, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime_689, 2, -263269125, "AM03") call SaveStr(hashtable_compiletime_689, 2, 1344391533, "Aeth") endfunction function initCompiletimeState takes nothing returns nothing call ExecuteFunc("initCompiletimeState_0") endfunction function alloc_CallbackSingle_doAfter_add_Buff 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] = 665 else call error("Out of memory: Could not create CallbackSingle_doAfter_add_Buff.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 665 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 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 handle_getTCHandleId takes handle this_1 returns integer return GetHandleId(this_1) endfunction function timer_setData takes timer this_1, integer data_1 returns nothing call dispatch_Table_Table_Table_saveInt(TimerUtils_timerData, 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 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 onEvent_add_Buff takes integer this_1 returns nothing local unit upg_1 = GetTriggerUnit() local integer clVar if unit_getIndex(upg_1) > 0 then set clVar = alloc_CallbackSingle_doAfter_add_Buff() call construct_CallbackSingle(clVar) set upg[clVar] = upg_1 call doAfter(0.01, clVar) endif endfunction function LLIterator_onDestroy takes integer this_1 returns nothing endfunction function dealloc_LLIterator takes integer obj returns nothing if LLIterator_typeId[obj] == 0 then call error("Double free: object of type LLIterator") else set LLIterator_nextFree[LLIterator_firstFree] = obj set LLIterator_firstFree = LLIterator_firstFree + 1 set LLIterator_typeId[obj] = 0 endif endfunction function destroyLLIterator takes integer this_1 returns nothing call LLIterator_onDestroy(this_1) call dealloc_LLIterator(this_1) endfunction function dispatch_LLIterator_destroyLLIterator takes integer this_1 returns nothing if LLIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLIterator.LLIterator") else call error("Called LLIterator.LLIterator on invalid object.") endif endif call destroyLLIterator(this_1) endfunction function LLIterator_close takes integer this_1 returns nothing if LLIterator_destroyOnClose[this_1] then call dispatch_LLIterator_destroyLLIterator(this_1) endif endfunction function LLIterator_hasNext takes integer this_1 returns boolean return LLEntry_next[LLIterator_current[this_1]] != LLIterator_dummy[this_1] endfunction function LLIterator_next takes integer this_1 returns integer set LLIterator_current[this_1] = LLEntry_next[LLIterator_current[this_1]] return LLEntry_elem[LLIterator_current[this_1]] endfunction function alloc_LLIterator takes nothing returns integer local integer this_1 if LLIterator_firstFree == 0 then if LLIterator_maxIndex < JASS_MAX_ARRAY_SIZE then set LLIterator_maxIndex = LLIterator_maxIndex + 1 set this_1 = LLIterator_maxIndex set LLIterator_typeId[this_1] = 795 else call error("Out of memory: Could not create LLIterator.") set this_1 = 0 endif else set LLIterator_firstFree = LLIterator_firstFree - 1 set this_1 = LLIterator_nextFree[LLIterator_firstFree] set LLIterator_typeId[this_1] = 795 endif return this_1 endfunction function LLIterator_init takes integer this_1 returns nothing set LLIterator_destroyOnClose[this_1] = true endfunction function LinkedList_getDummy takes integer this_1 returns integer return LinkedList_dummy[this_1] endfunction function dispatch_LinkedList_LinkedList_LinkedList_getDummy takes integer this_1 returns integer local integer LinkedList_LinkedList_getDummy_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.getDummy") else call error("Called LinkedList.getDummy on invalid object.") endif endif set LinkedList_LinkedList_getDummy_result = LinkedList_getDummy(this_1) return LinkedList_LinkedList_getDummy_result endfunction function LLIterator_reset takes integer this_1 returns nothing set LLIterator_dummy[this_1] = dispatch_LinkedList_LinkedList_LinkedList_getDummy(LLIterator_parent[this_1]) set LLIterator_current[this_1] = LLIterator_dummy[this_1] endfunction function dispatch_LLIterator_LinkedList_LLIterator_reset takes integer this_1 returns nothing if LLIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLIterator.reset") else call error("Called LLIterator.reset on invalid object.") endif endif call LLIterator_reset(this_1) endfunction function construct_LLIterator takes integer this_1, integer parent returns nothing call LLIterator_init(this_1) set LLIterator_parent[this_1] = parent call dispatch_LLIterator_LinkedList_LLIterator_reset(this_1) endfunction function new_LLIterator takes integer parent returns integer local integer this_1 = alloc_LLIterator() call construct_LLIterator(this_1, parent) return this_1 endfunction function LinkedList_iterator takes integer this_1 returns integer return new_LLIterator(this_1) endfunction function dealloc_Buff takes integer obj returns nothing if Buff_typeId[obj] == 0 then call error("Double free: object of type Buff") else set Buff_firstFree = Buff_firstFree + 1 set Buff_typeId[obj] = 0 endif endfunction function Buff_LinkedListModule_remove takes integer this_1 returns nothing set Buff_LinkedListModule_size = Buff_LinkedListModule_size - 1 if this_1 != Buff_LinkedListModule_first then set Buff_LinkedListModule_next[Buff_LinkedListModule_prev[this_1]] = Buff_LinkedListModule_next[this_1] else set Buff_LinkedListModule_first = Buff_LinkedListModule_next[this_1] endif if this_1 != Buff_LinkedListModule_last then set Buff_LinkedListModule_prev[Buff_LinkedListModule_next[this_1]] = Buff_LinkedListModule_prev[this_1] else set Buff_LinkedListModule_last = Buff_LinkedListModule_prev[this_1] endif endfunction function dispatch_Buff_Buff_Buff_LinkedListModule_remove takes integer this_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Buff.remove") else call error("Called Buff.remove on invalid object.") endif endif call Buff_LinkedListModule_remove(this_1) endfunction function Buff_onEnd takes integer this_1 returns nothing endfunction function dispatch_Buff_Buff_Buff_onEnd takes integer this_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Buff.onEnd") else call error("Called Buff.onEnd on invalid object.") endif endif call Buff_onEnd(this_1) endfunction function dispatch_LLIterator_LinkedList_LLIterator_close takes integer this_1 returns nothing if LLIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLIterator.close") else call error("Called LLIterator.close on invalid object.") endif endif call LLIterator_close(this_1) 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 LLIterator_remove takes integer this_1 returns integer local integer removed if LLIterator_current[this_1] != LLIterator_dummy[this_1] then call dispatch_LinkedList_LinkedList_LinkedList_removeEntry(LLIterator_parent[this_1], LLIterator_current[this_1]) set removed = LLEntry_elem[LLIterator_current[this_1]] set LLIterator_current[this_1] = LLEntry_prev[LLIterator_current[this_1]] return removed endif return 0 endfunction function dispatch_LLIterator_LinkedList_LLIterator_remove takes integer this_1 returns integer local integer LinkedList_LLIterator_remove_result if LLIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLIterator.remove") else call error("Called LLIterator.remove on invalid object.") endif endif set LinkedList_LLIterator_remove_result = LLIterator_remove(this_1) return LinkedList_LLIterator_remove_result endfunction function dispatch_LinkedList_LinkedList_LinkedList_iterator takes integer this_1 returns integer local integer LinkedList_LinkedList_iterator_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.iterator") else call error("Called LinkedList.iterator on invalid object.") endif endif set LinkedList_LinkedList_iterator_result = LinkedList_iterator(this_1) return LinkedList_LinkedList_iterator_result endfunction function unit_getBuffs takes unit this_1 returns integer return Buff_buffMap[unit_getIndex(this_1)] endfunction function unit_hasBuffs takes unit this_1 returns boolean return Buff_buffMap[unit_getIndex(this_1)] != 0 endfunction function unit_removeAbility takes unit this_1, integer abil returns boolean return UnitRemoveAbility(this_1, abil) endfunction function cyc_unit_removeBuff takes integer funcChoice, unit this_1, integer bff returns nothing local integer itr_1 local integer b local integer from if funcChoice == 0 then if unit_hasBuffs(this_1) then set itr_1 = dispatch_LinkedList_LinkedList_LinkedList_iterator(unit_getBuffs(this_1)) set from = itr_1 loop exitwhen not LLIterator_hasNext(from) set b = LLIterator_next(from) if b == bff then call cyc_unit_removeBuff(5, null, dispatch_LLIterator_LinkedList_LLIterator_remove(itr_1)) endif endloop call dispatch_LLIterator_LinkedList_LLIterator_close(itr_1) endif elseif funcChoice == 1 then if Buff_target[bff] != null then call unit_removeAbility(Buff_target[bff], Buff_buffData_buffId[bff]) call cyc_unit_removeBuff(0, Buff_target[bff], bff) call unit_removeAbility(Buff_target[bff], Buff_buffData_abilId[bff]) endif set Buff_target[bff] = null call dispatch_Buff_Buff_Buff_LinkedListModule_remove(bff) elseif funcChoice == 2 then call cyc_unit_removeBuff(1, null, bff) call dealloc_Buff(bff) elseif funcChoice == 3 then if Buff_typeId[bff] == 0 then if bff == 0 then call error("Nullpointer exception when calling Buff.Buff") else call error("Called Buff.Buff on invalid object.") endif endif call cyc_unit_removeBuff(2, null, bff) elseif funcChoice == 4 then if not Buff_done[bff] then set Buff_done[bff] = true call dispatch_Buff_Buff_Buff_onEnd(bff) call cyc_unit_removeBuff(3, null, bff) endif elseif funcChoice == 5 then if Buff_typeId[bff] == 0 then if bff == 0 then call error("Nullpointer exception when calling Buff.terminate") else call error("Called Buff.terminate on invalid object.") endif endif call cyc_unit_removeBuff(4, null, bff) endif endfunction function LLBackIterator_onDestroy takes integer this_1 returns nothing endfunction function dealloc_LLBackIterator takes integer obj returns nothing if LLBackIterator_typeId[obj] == 0 then call error("Double free: object of type LLBackIterator") else set LLBackIterator_firstFree = LLBackIterator_firstFree + 1 set LLBackIterator_typeId[obj] = 0 endif endfunction function destroyLLBackIterator takes integer this_1 returns nothing call LLBackIterator_onDestroy(this_1) call dealloc_LLBackIterator(this_1) endfunction function dispatch_LLBackIterator_destroyLLBackIterator takes integer this_1 returns nothing if LLBackIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLBackIterator.LLBackIterator") else call error("Called LLBackIterator.LLBackIterator on invalid object.") endif endif call destroyLLBackIterator(this_1) endfunction function LinkedList_onDestroy takes integer this_1 returns nothing local integer current if LinkedList_staticItr[this_1] != 0 then call dispatch_LLIterator_destroyLLIterator(LinkedList_staticItr[this_1]) endif if LinkedList_staticBackItr[this_1] != 0 then call dispatch_LLBackIterator_destroyLLBackIterator(LinkedList_staticBackItr[this_1]) endif set current = LLEntry_next[LinkedList_dummy[this_1]] loop exitwhen not (current != LinkedList_dummy[this_1]) set current = LLEntry_next[current] call dispatch_LLEntry_destroyLLEntry(LLEntry_prev[current]) endloop call dispatch_LLEntry_destroyLLEntry(LinkedList_dummy[this_1]) endfunction function dealloc_LinkedList takes integer obj returns nothing if LinkedList_typeId[obj] == 0 then call error("Double free: object of type LinkedList") else set LinkedList_nextFree[LinkedList_firstFree] = obj set LinkedList_firstFree = LinkedList_firstFree + 1 set LinkedList_typeId[obj] = 0 endif endfunction function destroyLinkedList takes integer this_1 returns nothing call LinkedList_onDestroy(this_1) call dealloc_LinkedList(this_1) endfunction function dispatch_LinkedList_destroyLinkedList takes integer this_1 returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.LinkedList") else call error("Called LinkedList.LinkedList on invalid object.") endif endif call destroyLinkedList(this_1) endfunction function unit_clearBuffs takes unit this_1 returns nothing local integer buffs = unit_getBuffs(this_1) local integer iterator local integer bff if buffs != 0 then set iterator = LinkedList_iterator(buffs) loop exitwhen not LLIterator_hasNext(iterator) set bff = LLIterator_next(iterator) call cyc_unit_removeBuff(5, null, bff) endloop call LLIterator_close(iterator) call dispatch_LinkedList_destroyLinkedList(buffs) set Buff_buffMap[unit_getIndex(this_1)] = 0 endif endfunction function onEvent_add_Buff_1072 takes integer this_1 returns nothing local unit u_1 = GetTriggerUnit() call unit_clearBuffs(u_1) endfunction function DamageEvent_getAmount takes nothing returns real return DamageInstance_amount[DamageInstance_current] endfunction function DamageInstance_setAmount takes integer this_1, real amount returns nothing set DamageInstance_amount[this_1] = amount if DamageInstance_unreduced[this_1] then endif endfunction function dispatch_DamageInstance_DamageEvent_DamageInstance_setAmount 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.setAmount") else call error("Called DamageInstance.setAmount on invalid object.") endif endif call DamageInstance_setAmount(this_1, amount) endfunction function DamageEvent_setAmount takes real amount returns nothing call dispatch_DamageInstance_DamageEvent_DamageInstance_setAmount(DamageInstance_current, amount) endfunction function Buff_attackModifier takes integer this_1 returns nothing endfunction function dispatch_Buff_Buff_Buff_attackModifier takes integer this_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Buff.attackModifier") else call error("Called Buff.attackModifier on invalid object.") endif endif call Buff_attackModifier(this_1) endfunction function Buff_defenseModifier takes integer this_1 returns nothing endfunction function DamageEvent_addAmount takes real amount returns nothing call dispatch_DamageInstance_DamageEvent_DamageInstance_setAmount(DamageInstance_current, DamageInstance_amount[DamageInstance_current] + amount) endfunction function ShieldBuff_defenseModifier takes integer this_1 returns nothing local real dmg = DamageEvent_getAmount() if dmg >= ShieldBuff_blockAmount[this_1] then call DamageEvent_addAmount( - ShieldBuff_blockAmount[this_1]) set ShieldBuff_blockAmount[this_1] = 0. call cyc_unit_removeBuff(5, null, this_1) else call DamageEvent_setAmount(0.) set ShieldBuff_blockAmount[this_1] = ShieldBuff_blockAmount[this_1] - dmg endif endfunction function dispatch_Buff_Buff_Buff_defenseModifier takes integer this_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Buff.defenseModifier") else call error("Called Buff.defenseModifier on invalid object.") endif endif if Buff_typeId[this_1] <= 648 then if Buff_typeId[this_1] <= 647 then call Buff_defenseModifier(this_1) else call ShieldBuff_defenseModifier(this_1) endif else call Buff_defenseModifier(this_1) endif endfunction function getSquare takes nothing returns string return Squares_squares[GetRandomInt(0, 20)] endfunction function alloc_TextTagEntity takes nothing returns integer local integer this_1 if Serializable_firstFree == 0 then if Serializable_maxIndex < JASS_MAX_ARRAY_SIZE then set Serializable_maxIndex = Serializable_maxIndex + 1 set this_1 = Serializable_maxIndex set Serializable_typeId[this_1] = 854 else call error("Out of memory: Could not create TextTagEntity.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 854 endif return this_1 endfunction function TextTagEntity_init takes integer this_1 returns nothing endfunction function Entity_DupletListModule_addToActive takes integer this_1 returns nothing set Entity_DupletListModule_activeSize = Entity_DupletListModule_activeSize + 1 if Entity_DupletListModule_activeSize == 1 then set Entity_DupletListModule_firstActive = this_1 endif set Entity_DupletListModule_lastActive = this_1 endfunction function dispatch_Entity_Entity_Entity_DupletListModule_addToActive takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.addToActive") else call error("Called Entity.addToActive on invalid object.") endif endif call Entity_DupletListModule_addToActive(this_1) endfunction function construct_Entity_DupletListModule takes integer this_1 returns nothing call dispatch_Entity_Entity_Entity_DupletListModule_addToActive(this_1) endfunction function Entity_init takes integer this_1 returns nothing set Entity_done[this_1] = false call construct_Entity_DupletListModule(this_1) endfunction function Entity_setFlying takes integer this_1, boolean flag returns nothing endfunction function dispatch_Entity_Entity_Entity_setFlying takes integer this_1, boolean flag returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.setFlying") else call error("Called Entity.setFlying on invalid object.") endif endif call Entity_setFlying(this_1, flag) endfunction function vec2_getQuad takes real this_x, real this_y returns integer local integer tempIndex = real_toInt(this_x - MapBounds_boundMin_x) / 128 + TerrainUtils_TILES_X * (real_toInt(this_y - MapBounds_boundMin_y) / 128) set vec2_getQuad_return_id = Heightmap_quads_id[tempIndex] set vec2_getQuad_return_x = Heightmap_quads_x[tempIndex] set vec2_getQuad_return_y = Heightmap_quads_y[tempIndex] set vec2_getQuad_return_botLeft_x = Heightmap_quads_botLeft_x[tempIndex] set vec2_getQuad_return_botLeft_y = Heightmap_quads_botLeft_y[tempIndex] set vec2_getQuad_return_z1 = Heightmap_quads_z1[tempIndex] set vec2_getQuad_return_z2 = Heightmap_quads_z2[tempIndex] set vec2_getQuad_return_z3 = Heightmap_quads_z3[tempIndex] set vec2_getQuad_return_z4 = Heightmap_quads_z4[tempIndex] return vec2_getQuad_return_id 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 vec2_getHeightMap takes real this_x, real this_y returns real local real quad_botLeft_x local real quad_botLeft_y local real quad_z1 local real quad_z2 local real quad_z3 local real quad_z4 local real localVec_x local real localVec_y local real normVec_x local real normVec_y local real determinant local real weight1 local real weight2 local real weight3 local real weight1_1 local real weight2_1 local real weight3_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 local real tuple_temp_8 local real tuple_temp_9 call vec2_getQuad(this_x, this_y) set tuple_temp = vec2_getQuad_return_botLeft_x set tuple_temp_1 = vec2_getQuad_return_botLeft_y set tuple_temp_2 = vec2_getQuad_return_z1 set tuple_temp_3 = vec2_getQuad_return_z2 set tuple_temp_4 = vec2_getQuad_return_z3 set tuple_temp_5 = vec2_getQuad_return_z4 set quad_botLeft_x = tuple_temp set quad_botLeft_y = tuple_temp_1 set quad_z1 = tuple_temp_2 set quad_z2 = tuple_temp_3 set quad_z3 = tuple_temp_4 set quad_z4 = tuple_temp_5 set tuple_temp_6 = vec2_op_minus(this_x, this_y, quad_botLeft_x, quad_botLeft_y) set tuple_temp_7 = vec2_op_minus_return_y set localVec_x = tuple_temp_6 set localVec_y = tuple_temp_7 set tuple_temp_8 = localVec_x / 128. set tuple_temp_9 = localVec_y / 128. set normVec_x = tuple_temp_8 set normVec_y = tuple_temp_9 set determinant = normVec_y - 1. + normVec_x if determinant >= 0. then set weight1 = 1. - normVec_x set weight2 = 1. - normVec_y set weight3 = 1. - weight1 - weight2 return weight1 * quad_z3 + weight2 * quad_z2 + weight3 * quad_z4 else set weight1_1 = normVec_y set weight2_1 = normVec_x set weight3_1 = 1. - weight1_1 - weight2_1 return weight1_1 * quad_z3 + weight2_1 * quad_z2 + weight3_1 * quad_z1 endif endfunction function vec3_toVec2 takes real this_x, real this_y, real this_z returns real set vec3_toVec2_return_x = this_x set vec3_toVec2_return_y = this_y return vec3_toVec2_return_x endfunction function vec3_getHeightMap takes real this_x, real this_y, real this_z returns real return vec2_getHeightMap(vec3_toVec2(this_x, this_y, this_z), vec3_toVec2_return_y) endfunction function Entity_setupEntity takes integer this_1, real pos_x, real pos_y, real pos_z, real vel_x, real vel_y, real vel_z, player owner, real radius returns nothing local real tuple_temp = pos_x local real tuple_temp_1 = pos_y local real tuple_temp_2 = pos_z local real tuple_temp_3 = vel_x local real tuple_temp_4 = vel_y local real tuple_temp_5 = vel_z local real temp = pos_z local real cond_result if Frentity_DYNAMIC_Z then set cond_result = vec3_getHeightMap(pos_x, pos_y, pos_z) else set cond_result = 0. endif if temp > cond_result then call dispatch_Entity_Entity_Entity_setFlying(this_1, true) endif set DebugInfo_allocationsPerSecond = DebugInfo_allocationsPerSecond + 1 endfunction function dispatch_Entity_Entity_Entity_setupEntity takes integer this_1, real pos_x, real pos_y, real pos_z, real vel_x, real vel_y, real vel_z, player owner, real radius returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.setupEntity") else call error("Called Entity.setupEntity on invalid object.") endif endif call Entity_setupEntity(this_1, pos_x, pos_y, pos_z, vel_x, vel_y, vel_z, owner, radius) endfunction function construct_Entity5 takes integer this_1, player owner, real pos_x, real pos_y, real pos_z, real radius returns nothing call Entity_init(this_1) call dispatch_Entity_Entity_Entity_setupEntity(this_1, pos_x, pos_y, pos_z, Vectors_ZERO3_x, Vectors_ZERO3_y, Vectors_ZERO3_z, owner, radius) endfunction function alloc_Iterator_548 takes nothing returns integer local integer this_1 if Iterator_firstFree_360 == 0 then if Iterator_maxIndex_363 < JASS_MAX_ARRAY_SIZE then set Iterator_maxIndex_363 = Iterator_maxIndex_363 + 1 set this_1 = Iterator_maxIndex_363 set Iterator_typeId[this_1] = 789 else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree_360 = Iterator_firstFree_360 - 1 set this_1 = Iterator_nextFree_366[Iterator_firstFree_360] set Iterator_typeId[this_1] = 789 endif return this_1 endfunction function Iterator_init_279 takes integer this_1 returns nothing set Iterator_current[this_1] = FText_LinkedListModule_first endfunction function construct_Iterator_636 takes integer this_1, boolean destroyOnClose returns nothing call Iterator_init_279(this_1) set Iterator_destroyOnClose[this_1] = destroyOnClose endfunction function new_Iterator_1055 takes boolean destroyOnClose returns integer local integer this_1 = alloc_Iterator_548() call construct_Iterator_636(this_1, destroyOnClose) return this_1 endfunction function FText_LinkedListModule_iterator takes nothing returns integer return new_Iterator_1055(true) endfunction function Iterator_onDestroy takes integer this_1 returns nothing endfunction function dealloc_Iterator takes integer obj returns nothing if Iterator_typeId[obj] == 0 then call error("Double free: object of type Iterator") else set Iterator_nextFree_366[Iterator_firstFree_360] = obj set Iterator_firstFree_360 = Iterator_firstFree_360 + 1 set Iterator_typeId[obj] = 0 endif endfunction function destroyIterator takes integer this_1 returns nothing call Iterator_onDestroy(this_1) call dealloc_Iterator(this_1) endfunction function dispatch_Iterator_destroyIterator takes integer this_1 returns nothing if Iterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Iterator.Iterator") else call error("Called Iterator.Iterator on invalid object.") endif endif call destroyIterator(this_1) endfunction function Iterator_close takes integer this_1 returns nothing if Iterator_destroyOnClose[this_1] then call dispatch_Iterator_destroyIterator(this_1) endif endfunction function Iterator_hasNext takes integer this_1 returns boolean return Iterator_current[this_1] != 0 endfunction function Iterator_next takes integer this_1 returns integer local integer res = Iterator_current[this_1] set Iterator_current[this_1] = FText_LinkedListModule_next[Iterator_current[this_1]] return res endfunction function alloc_CallbackSingle_doAfter_FText_FText 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] = 664 else call error("Out of memory: Could not create CallbackSingle_doAfter_FText_FText.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 664 endif return this_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 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 timer_getElapsed takes timer this_1 returns real return TimerGetElapsed(this_1) endfunction function getElapsedGameTime takes nothing returns real return timer_getElapsed(GameTimer_gameTimer) endfunction function texttag_setLifespan takes texttag this_1, real span returns nothing call SetTextTagLifespan(this_1, span) endfunction function texttag_setVelocity takes texttag this_1, real xvel, real yvel returns nothing call SetTextTagVelocity(this_1, xvel, yvel) endfunction function FText_setDynamic takes integer this_1, real vel_x, real vel_y, real lifespan returns nothing local texttag receiver = FText_tt[this_1] local texttag receiver_1 local integer clVar local real temp call texttag_setVelocity(receiver, vel_x, vel_y) set receiver_1 = receiver call texttag_setLifespan(receiver_1, lifespan) set FText_timestamp[this_1] = getElapsedGameTime() if FText_cb[this_1] != 0 then call dispatch_CallbackSingle_destroyCallbackSingle(FText_cb[this_1]) endif set temp = lifespan - 0.025 set clVar = alloc_CallbackSingle_doAfter_FText_FText() call construct_CallbackSingle(clVar) set this_850[clVar] = this_1 set FText_cb[this_1] = doAfter(temp, clVar) endfunction function dispatch_FText_FText_FText_setDynamic takes integer this_1, real vel_x, real vel_y, real lifespan returns nothing if FText_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FText.setDynamic") else call error("Called FText.setDynamic on invalid object.") endif endif call FText_setDynamic(this_1, vel_x, vel_y, lifespan) endfunction function FText_setPermanent takes integer this_1 returns nothing set FText_permanent[this_1] = true if FText_cb[this_1] != 0 then call dispatch_CallbackSingle_destroyCallbackSingle(FText_cb[this_1]) set FText_cb[this_1] = 0 endif endfunction function dispatch_FText_FText_FText_setPermanent takes integer this_1 returns nothing if FText_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FText.setPermanent") else call error("Called FText.setPermanent on invalid object.") endif endif call FText_setPermanent(this_1) endfunction function texttag_setAge takes texttag this_1, real age returns nothing call SetTextTagAge(this_1, age) endfunction function texttag_setFadepoint takes texttag this_1, real fadepoint returns nothing call SetTextTagFadepoint(this_1, fadepoint) endfunction function texttag_setPos takes texttag this_1, real pos_x, real pos_y, real pos_z returns nothing call SetTextTagPos(this_1, pos_x, pos_y, pos_z) endfunction function texttag_setText takes texttag this_1, string text, real size returns nothing call SetTextTagText(this_1, text, size * 0.0023) endfunction function texttag_setVisibility takes texttag this_1, boolean flag returns nothing call SetTextTagVisibility(this_1, flag) endfunction function FText_setup takes integer this_1, string text, real pos_x, real pos_y, real pos_z, real size returns nothing local texttag receiver = FText_tt[this_1] local texttag receiver_1 local texttag receiver_2 local texttag receiver_3 local texttag receiver_4 local texttag receiver_5 local texttag receiver_6 call texttag_setText(receiver, text, size) set receiver_1 = receiver call texttag_setPos(receiver_1, pos_x, pos_y, pos_z) set receiver_2 = receiver_1 call texttag_setAge(receiver_2, 0.) set receiver_3 = receiver_2 call texttag_setVisibility(receiver_3, true) set receiver_4 = receiver_3 call texttag_setVelocity(receiver_4, Vectors_ZERO2_x, Vectors_ZERO2_y) set receiver_5 = receiver_4 call texttag_setFadepoint(receiver_5, .45) set receiver_6 = receiver_5 call texttag_setLifespan(receiver_6, Real_REAL_MAX) endfunction function dispatch_FText_FText_FText_setup takes integer this_1, string text, real pos_x, real pos_y, real pos_z, real size returns nothing if FText_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FText.setup") else call error("Called FText.setup on invalid object.") endif endif call FText_setup(this_1, text, pos_x, pos_y, pos_z, size) 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 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 alloc_FText takes nothing returns integer local integer this_1 if FText_firstFree == 0 then if FText_maxIndex < JASS_MAX_ARRAY_SIZE then set FText_maxIndex = FText_maxIndex + 1 set this_1 = FText_maxIndex set FText_typeId[this_1] = 712 else call error("Out of memory: Could not create FText.") set this_1 = 0 endif else set FText_firstFree = FText_firstFree - 1 set this_1 = FText_nextFree[FText_firstFree] set FText_typeId[this_1] = 712 endif return this_1 endfunction function construct_FText_LinkedListModule takes integer this_1 returns nothing set FText_LinkedListModule_size = FText_LinkedListModule_size + 1 if FText_LinkedListModule_size == 1 then set FText_LinkedListModule_first = this_1 set FText_LinkedListModule_prev[this_1] = 0 else set FText_LinkedListModule_prev[this_1] = FText_LinkedListModule_last set FText_LinkedListModule_next[FText_LinkedListModule_last] = this_1 set FText_LinkedListModule_prev[FText_LinkedListModule_first] = this_1 endif set FText_LinkedListModule_next[this_1] = 0 set FText_LinkedListModule_last = this_1 endfunction function FText_init takes integer this_1 returns nothing set FText_tt[this_1] = CreateTextTag() set FText_permanent[this_1] = false set FText_timestamp[this_1] = 0. set FText_cb[this_1] = 0 call construct_FText_LinkedListModule(this_1) endfunction function texttag_setPermanent takes texttag this_1, boolean flag returns nothing call SetTextTagPermanent(this_1, flag) endfunction function construct_FText takes integer this_1 returns nothing local texttag receiver call FText_init(this_1) set receiver = FText_tt[this_1] call texttag_setPermanent(receiver, true) endfunction function new_FText takes nothing returns integer local integer this_1 = alloc_FText() call construct_FText(this_1) return this_1 endfunction function texttag_setColor takes texttag this_1, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing call SetTextTagColor(this_1, col_red, col_green, col_blue, col_alpha) endfunction function createFText takes real pos_x, real pos_y, real pos_z, string text, real size, real lifespan, real vel_x, real vel_y, integer col_red, integer col_green, integer col_blue, integer col_alpha returns integer local boolean permanent = lifespan <= 0. local integer ftext = 0 local integer iterator local integer etext local integer receiver local integer receiver_1 local integer receiver_2 if dispatch_LinkedList_LinkedList_LinkedList_size(FText_recylcer) > 0 then set ftext = dispatch_LinkedList_LinkedList_LinkedList_dequeue(FText_recylcer) elseif FText_LinkedListModule_size < 100 then set ftext = new_FText() else set iterator = FText_LinkedListModule_iterator() loop exitwhen not Iterator_hasNext(iterator) set etext = Iterator_next(iterator) if ( not FText_permanent[etext]) and ftext == 0 or FText_timestamp[etext] < FText_timestamp[ftext] then set ftext = etext endif endloop call Iterator_close(iterator) if ftext == 0 then call error("You have reached the maximum possible permanent texttags") endif endif set receiver = ftext call dispatch_FText_FText_FText_setup(receiver, text, pos_x, pos_y, pos_z, size) call texttag_setColor(FText_tt[ftext], col_red, col_green, col_blue, col_alpha) if permanent then set receiver_1 = ftext call dispatch_FText_FText_FText_setPermanent(receiver_1) else set receiver_2 = ftext call dispatch_FText_FText_FText_setDynamic(receiver_2, vel_x, vel_y, lifespan) endif return ftext endfunction function construct_TextTagEntity takes integer this_1, real pos_x, real pos_y, real pos_z, real vel_x, real vel_y, real vel_z, string text, real size, real duration, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local integer tuple_temp_3 local integer tuple_temp_4 local integer tuple_temp_5 local integer tuple_temp_6 call construct_Entity5(this_1, Basics_DUMMY_PLAYER, pos_x, pos_y, pos_z, 0.) call TextTagEntity_init(this_1) set tuple_temp = vel_x set tuple_temp_1 = vel_y set tuple_temp_2 = vel_z set tuple_temp_3 = col_red set tuple_temp_4 = col_green set tuple_temp_5 = col_blue set tuple_temp_6 = col_alpha call createFText(pos_x, pos_y, pos_z, text, size, duration, Vectors_ZERO2_x, Vectors_ZERO2_y, col_red, col_green, col_blue, col_alpha) endfunction function new_TextTagEntity takes real pos_x, real pos_y, real pos_z, real vel_x, real vel_y, real vel_z, string text, real size, real duration, integer col_red, integer col_green, integer col_blue, integer col_alpha returns integer local integer this_1 = alloc_TextTagEntity() call construct_TextTagEntity(this_1, pos_x, pos_y, pos_z, vel_x, vel_y, vel_z, text, size, duration, col_red, col_green, col_blue, col_alpha) return this_1 endfunction function player_isAllyOf takes player this_1, player p returns boolean return IsPlayerAlly(this_1, p) endfunction function unit_getOwner takes unit this_1 returns player return GetOwningPlayer(this_1) 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 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 onEvent_addListener_Buff takes integer this_1 returns nothing local unit def = GetTriggerUnit() local unit att = GetEventDamageSource() local integer iterator local integer bff local integer iterator_1 local integer bff_1 if Frentity_DISABLE_TEAMATTACK and player_isAllyOf(unit_getOwner(def), unit_getOwner(att)) or unit_getOwner(def) == unit_getOwner(att) then if DamageEvent_getAmount() > 0.5 then call DamageEvent_setAmount(0.) if Frentity_SHOW_SQUARE then call new_TextTagEntity(vec2_toVec3(unit_getPos(def), unit_getPos_return_y), vec2_toVec3_return_y, vec2_toVec3_return_z, GetRandomReal(-2., 2.), GetRandomReal(-2., 2.), GetRandomReal(8., 10.), getSquare(), 10., .8, GetRandomInt(150, 250), GetRandomInt(125, 150), GetRandomInt(125, 150), 255) endif endif else if unit_hasBuffs(att) then set iterator = LinkedList_iterator(unit_getBuffs(att)) loop exitwhen not LLIterator_hasNext(iterator) set bff = LLIterator_next(iterator) if not Buff_done[bff] then call dispatch_Buff_Buff_Buff_attackModifier(bff) endif endloop call LLIterator_close(iterator) endif if unit_hasBuffs(def) then set iterator_1 = LinkedList_iterator(unit_getBuffs(def)) loop exitwhen not LLIterator_hasNext(iterator_1) set bff_1 = LLIterator_next(iterator_1) if not Buff_done[bff_1] then call dispatch_Buff_Buff_Buff_defenseModifier(bff_1) endif endloop call LLIterator_close(iterator_1) endif endif endfunction function dispatch_DamageListener_DamageEvent_DamageListener_onEvent takes integer this_1 returns nothing if DamageListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DamageListener.onEvent") else call error("Called DamageListener.onEvent on invalid object.") endif endif call onEvent_addListener_Buff(this_1) 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] = 684 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] = 684 endif return this_1 endfunction function DamageInstance_init takes integer this_1 returns nothing endfunction function construct_DamageInstance takes integer this_1, integer id, unit source, unit target_1, 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_unreduced[this_1] = true 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, unit source, unit target_1, 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, source, target_1, 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 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 = DamageEvent_firstUnreducedListeners[i] loop exitwhen not (listener != 0) call dispatch_DamageListener_DamageEvent_DamageListener_onEvent(listener) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener = DamageListener_next[listener] 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 set DamageInstance_unreduced[this_1] = false 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 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 = DamageEvent_firstListeners[i] loop exitwhen not (listener != 0) call dispatch_DamageListener_DamageEvent_DamageListener_onEvent(listener) if DamageEvent_abort then set DamageInstance_amount[dmg] = 0. exitwhen true else set listener = DamageListener_next[listener] 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_1074 takes integer this_1 returns nothing call DamageEvent_onDamage() endfunction function Log_setLevel takes integer lvl returns nothing set Printing_DEBUG_LEVEL = lvl endfunction function printTimedToPlayer takes string msg, real duration, player p returns nothing call DisplayTimedTextToPlayer(p, 0., 0., duration, msg) endfunction function string_length takes string this_1 returns integer return StringLength(this_1) endfunction function string_substring takes string this_1, integer start, integer stop returns string return SubString(this_1, start, stop) endfunction function string_startsWith takes string this_1, string s returns boolean local integer len = string_length(this_1) if string_length(s) > len then return false endif return string_substring(this_1, 0, string_length(s)) == s endfunction function string_toInt takes string this_1 returns integer return S2I(this_1) endfunction function onEvent_add_DebugInfo takes integer this_1 returns nothing local string entered = GetEventPlayerChatString() local integer level local integer loglvl if string_startsWith(entered, "-d ") then set level = string_toInt(string_substring(entered, 3, 4)) if level >= 0 and level < 5 then set loglvl = level call Log_setLevel(loglvl) call printTimedToPlayer("Loglevel adjusted to: " + Loglevel_getTag(loglvl), 10., GetTriggerPlayer()) endif endif endfunction function dispatch_ItemEntity_Entity_ItemEntity_onPickup takes integer this_1, integer entity returns nothing endfunction function item_getUserData takes item this_1 returns integer return GetItemUserData(this_1) endfunction function item_getEntity takes item this_1 returns integer return item_getUserData(this_1) endfunction function unit_getEntity takes unit this_1 returns integer return Entity_entities[unit_getIndex(this_1)] endfunction function onItemPickup takes nothing returns nothing local integer idata = item_getEntity(GetManipulatedItem()) local integer edata = unit_getEntity(GetManipulatingUnit()) if idata != 0 and ( not Entity_done[idata]) then if edata != 0 and ( not Entity_done[edata]) then call dispatch_ItemEntity_Entity_ItemEntity_onPickup(idata, edata) endif endif endfunction function onEvent_add_Entity takes integer this_1 returns nothing call onItemPickup() endfunction function dispatch_ItemEntity_Entity_ItemEntity_onDrop takes integer this_1, integer entity returns nothing endfunction function onItemDrop takes nothing returns nothing local integer idata = item_getEntity(GetManipulatedItem()) local integer edata = unit_getEntity(GetManipulatingUnit()) if idata != 0 and ( not Entity_done[idata]) then if edata != 0 and ( not Entity_done[edata]) then call dispatch_ItemEntity_Entity_ItemEntity_onDrop(idata, edata) endif endif endfunction function onEvent_add_Entity_1077 takes integer this_1 returns nothing call onItemDrop() endfunction function dispatch_ItemEntity_Entity_ItemEntity_onUse takes integer this_1, integer entity returns nothing endfunction function onItemUse takes nothing returns nothing local integer idata = item_getEntity(GetManipulatedItem()) local integer edata = unit_getEntity(GetManipulatingUnit()) if idata != 0 and ( not Entity_done[idata]) then if edata != 0 and ( not Entity_done[edata]) then call dispatch_ItemEntity_Entity_ItemEntity_onUse(idata, edata) endif endif endfunction function onEvent_add_Entity_1078 takes integer this_1 returns nothing call onItemUse() endfunction function int_toString takes integer this_1 returns string return I2S(this_1) endfunction function BtnConfig_getAbilId takes integer this_1 returns integer if BtnConfig_abilId[this_1] == 0 then set BtnConfig_abilId[this_1] = hashtable_loadInt(Selector_BTN_TO_ID_MAP, string_getHash(BtnConfig_name[this_1] + BtnConfig_tooltip[this_1] + int_toString(BtnConfig_x[this_1]) + int_toString(BtnConfig_y[this_1])), 0) endif return BtnConfig_abilId[this_1] endfunction function dispatch_BtnConfig_Selector_BtnConfig_getAbilId takes integer this_1 returns integer local integer Selector_BtnConfig_getAbilId_result if BtnConfig_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BtnConfig.getAbilId") else call error("Called BtnConfig.getAbilId on invalid object.") endif endif set Selector_BtnConfig_getAbilId_result = BtnConfig_getAbilId(this_1) return Selector_BtnConfig_getAbilId_result endfunction function dispatch_BtnListener_Selector_BtnListener_onClick takes integer this_1, integer selector returns nothing endfunction function Selector_onCast takes integer this_1 returns nothing local integer id = GetSpellAbilityId() local integer iterator = LinkedList_iterator(SelectorBuilder_btns[Selector_builder[this_1]]) local integer btn loop exitwhen not LLIterator_hasNext(iterator) set btn = LLIterator_next(iterator) if dispatch_BtnConfig_Selector_BtnConfig_getAbilId(btn) == id then call dispatch_BtnListener_Selector_BtnListener_onClick(BtnConfig_listener[btn], this_1) endif endloop call LLIterator_close(iterator) endfunction function dispatch_Selector_Selector_Selector_onCast takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Selector.onCast") else call error("Called Selector.onCast on invalid object.") endif endif call Selector_onCast(this_1) endfunction function onEvent_add_Selector_Selector takes integer this_1 returns nothing call dispatch_Selector_Selector_Selector_onCast(this_836[this_1]) endfunction function LinkedList_remove takes integer this_1, integer elem returns boolean local boolean result_1 = false local integer entry = LLEntry_next[LinkedList_dummy[this_1]] loop exitwhen not (entry != LinkedList_dummy[this_1]) if LLEntry_elem[entry] == elem then call dispatch_LinkedList_LinkedList_LinkedList_removeEntry(this_1, entry) set result_1 = true exitwhen true endif set entry = LLEntry_next[entry] endloop return result_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_remove takes integer this_1, integer elem returns boolean local boolean LinkedList_LinkedList_remove_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.remove") else call error("Called LinkedList.remove on invalid object.") endif endif set LinkedList_LinkedList_remove_result = LinkedList_remove(this_1, elem) return LinkedList_LinkedList_remove_result 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 color_toColorString takes integer this_red, integer this_green, integer this_blue returns string return "|cff" + toHex(this_red) + toHex(this_green) + toHex(this_blue) endfunction function player_getColor takes player this_1 returns playercolor return GetPlayerColor(this_1) endfunction function string_indexOf takes string this_1, string s returns integer local integer i = 0 local integer temp = string_length(this_1) - string_length(s) loop exitwhen i > temp if string_substring(this_1, i, i + string_length(s)) == s then return i endif set i = i + 1 endloop return -1 endfunction function player_getName takes player this_1, boolean removeHash returns string local string cond_result if removeHash then set cond_result = string_substring(GetPlayerName(this_1), 0, string_indexOf(GetPlayerName(this_1), "#")) else set cond_result = GetPlayerName(this_1) endif return cond_result endfunction function colorA_withoutAlpha takes integer this_red, integer this_green, integer this_blue, integer this_alpha returns integer set colorA_withoutAlpha_return_red = this_red set colorA_withoutAlpha_return_green = this_green set colorA_withoutAlpha_return_blue = this_blue return colorA_withoutAlpha_return_red endfunction function playercolor_toInt takes playercolor this_1 returns integer local integer value = 0 local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp if Playercolor_LOOKUP[i] == this_1 then set value = i exitwhen true endif set i = i + 1 endloop return value endfunction function playercolor_toColor takes playercolor this_1 returns integer local integer cond_result_red local integer cond_result_green local integer cond_result_blue local integer tempIndex 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 if playercolor_toInt(this_1) <= Colors_MAX_PLAYER_COLORS then set tempIndex = playercolor_toInt(this_1) set tuple_temp = Colors_PLAYER_COLORS_red[tempIndex] set tuple_temp_1 = Colors_PLAYER_COLORS_green[tempIndex] set tuple_temp_2 = Colors_PLAYER_COLORS_blue[tempIndex] set cond_result_red = tuple_temp set cond_result_green = tuple_temp_1 set cond_result_blue = tuple_temp_2 else set tuple_temp_3 = colorA_withoutAlpha(Colors_COLOR_BLACK_red, Colors_COLOR_BLACK_green, Colors_COLOR_BLACK_blue, Colors_COLOR_BLACK_alpha) set tuple_temp_4 = colorA_withoutAlpha_return_green set tuple_temp_5 = colorA_withoutAlpha_return_blue set cond_result_red = tuple_temp_3 set cond_result_green = tuple_temp_4 set cond_result_blue = tuple_temp_5 endif set playercolor_toColor_return_red = cond_result_red set playercolor_toColor_return_green = cond_result_green set playercolor_toColor_return_blue = cond_result_blue return playercolor_toColor_return_red endfunction function player_getNameColored takes player this_1, boolean removeHash returns string return color_toColorString(playercolor_toColor(player_getColor(this_1)), playercolor_toColor_return_green, playercolor_toColor_return_blue) + player_getName(this_1, removeHash) + "|r" endfunction function player_getNameColored_1106 takes player this_1 returns string return player_getNameColored(this_1, false) endfunction function printTimed takes string msg, real duration returns nothing call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., duration, msg) endfunction function onLeave_onPlayerLeave_nullTimer_Players takes integer this_1, player p returns nothing call printTimed(player_getNameColored_1106(p) + " has left the game", 15.) endfunction function dispatch_OnPlayerLeave_Players_OnPlayerLeave_onLeave takes integer this_1, player leaver returns nothing if OnPlayerLeave_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnPlayerLeave.onLeave") else call error("Called OnPlayerLeave.onLeave on invalid object.") endif endif call onLeave_onPlayerLeave_nullTimer_Players(this_1, leaver) endfunction function player_getId takes player this_1 returns integer return GetPlayerId(this_1) endfunction function playerToIndex takes player object returns integer return player_getId(object) endfunction function onEvent_add_nullTimer_Players takes integer this_1 returns nothing call dispatch_LinkedList_LinkedList_LinkedList_remove(Players_ALL_PLAYERS, playerToIndex(GetTriggerPlayer())) call dispatch_OnPlayerLeave_Players_OnPlayerLeave_onLeave(Players_onLeaveListener, GetTriggerPlayer()) endfunction function cyc_onEvent_add_KeyUtils takes integer funcChoice, integer this_1 returns nothing local boolean keyStatus_up local boolean keyStatus_down local boolean keyStatus_left local boolean keyStatus_right local eventid id local integer listener local integer tempIndex local integer tempIndex_1 local boolean tuple_temp local boolean tuple_temp_1 local boolean tuple_temp_2 local boolean tuple_temp_3 local boolean tuple_temp_4 local boolean tuple_temp_5 local boolean tuple_temp_6 local boolean tuple_temp_7 if funcChoice == 0 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 1 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 2 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 3 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 4 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 5 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 6 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 7 then set tempIndex = player_getId(GetTriggerPlayer()) set tuple_temp = KeyUtils_keyStatuses_up[tempIndex] set tuple_temp_1 = KeyUtils_keyStatuses_down[tempIndex] set tuple_temp_2 = KeyUtils_keyStatuses_left[tempIndex] set tuple_temp_3 = KeyUtils_keyStatuses_right[tempIndex] set keyStatus_up = tuple_temp set keyStatus_down = tuple_temp_1 set keyStatus_left = tuple_temp_2 set keyStatus_right = tuple_temp_3 set id = GetTriggerEventId() if id == EVENT_PLAYER_ARROW_DOWN_DOWN then set keyStatus_down = true elseif id == EVENT_PLAYER_ARROW_DOWN_UP then set keyStatus_down = false elseif id == EVENT_PLAYER_ARROW_UP_DOWN then set keyStatus_up = true elseif id == EVENT_PLAYER_ARROW_UP_UP then set keyStatus_up = false elseif id == EVENT_PLAYER_ARROW_LEFT_DOWN then set keyStatus_left = true elseif id == EVENT_PLAYER_ARROW_LEFT_UP then set keyStatus_left = false elseif id == EVENT_PLAYER_ARROW_RIGHT_DOWN then set keyStatus_right = true elseif id == EVENT_PLAYER_ARROW_RIGHT_UP then set keyStatus_right = false endif set tempIndex_1 = player_getId(GetTriggerPlayer()) set tuple_temp_4 = keyStatus_up set tuple_temp_5 = keyStatus_down set tuple_temp_6 = keyStatus_left set tuple_temp_7 = keyStatus_right set KeyUtils_keyStatuses_up[tempIndex_1] = tuple_temp_4 set KeyUtils_keyStatuses_down[tempIndex_1] = tuple_temp_5 set KeyUtils_keyStatuses_left[tempIndex_1] = tuple_temp_6 set KeyUtils_keyStatuses_right[tempIndex_1] = tuple_temp_7 set listener = KeyUtils_firstKeyListener loop exitwhen not (listener != 0) call cyc_onEvent_add_KeyUtils(9, listener) set listener = EventListener_next[listener] endloop elseif funcChoice == 8 then call cyc_onEvent_add_KeyUtils(7, 0) elseif funcChoice == 9 then 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] <= 702 then if EventListener_typeId[this_1] <= 698 then if EventListener_typeId[this_1] <= 696 then if EventListener_typeId[this_1] <= 695 then if EventListener_typeId[this_1] <= 694 then call onEvent_add_Buff(this_1) else call onEvent_add_Buff_1072(this_1) endif else call onEvent_add_DamageEvent(this_1) endif elseif EventListener_typeId[this_1] <= 697 then call onEvent_add_DamageEvent_1074(this_1) else call onEvent_add_DebugInfo(this_1) endif elseif EventListener_typeId[this_1] <= 700 then if EventListener_typeId[this_1] <= 699 then call onEvent_add_Entity(this_1) else call onEvent_add_Entity_1077(this_1) endif elseif EventListener_typeId[this_1] <= 701 then call onEvent_add_Entity_1078(this_1) else call cyc_onEvent_add_KeyUtils(8, this_1) endif elseif EventListener_typeId[this_1] <= 707 then if EventListener_typeId[this_1] <= 705 then if EventListener_typeId[this_1] <= 704 then if EventListener_typeId[this_1] <= 703 then call cyc_onEvent_add_KeyUtils(6, this_1) else call cyc_onEvent_add_KeyUtils(5, this_1) endif else call cyc_onEvent_add_KeyUtils(4, this_1) endif elseif EventListener_typeId[this_1] <= 706 then call cyc_onEvent_add_KeyUtils(3, this_1) else call cyc_onEvent_add_KeyUtils(2, this_1) endif elseif EventListener_typeId[this_1] <= 709 then if EventListener_typeId[this_1] <= 708 then call cyc_onEvent_add_KeyUtils(1, this_1) else call cyc_onEvent_add_KeyUtils(0, this_1) endif elseif EventListener_typeId[this_1] <= 710 then call onEvent_add_Selector_Selector(this_1) else call onEvent_add_nullTimer_Players(this_1) endif 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 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_1144 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_1144(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 eventid_isPlayerunitEvent(evnt) then call registerPlayerUnitEvent(ConvertPlayerUnitEvent(eventId), ref_function_EventListener_generalEventCallback) elseif evnt != EVENT_UNIT_DAMAGED and evnt != EVENT_PLAYER_LEAVE and evnt != ClosureEvents_EVENT_PLAYER_CHAT_FILTER and ( not eventid_isKeyboardEvent(evnt)) and ( not eventid_isMouseEvent(evnt)) then call error("registering handleid: " + int_toString(eventId) + " non-playerunitevent. Except EVENT_UNIT_DAMAGED and EVENT_PLAYER_LEAVE these are not supported right now.") endif if eventid_isMouseEvent(evnt) and ( not EventListener_useMouseEvents) then set EventListener_useMouseEvents = true set i = 0 set temp = bj_MAX_PLAYERS - 1 loop exitwhen i > temp set receiver = ClosureEvents_keyTrig call trigger_registerPlayerEvent(receiver, Player_players[i], EVENT_PLAYER_MOUSE_UP) 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 = ClosureEvents_eventidToIndex[handle_getHandleId(this_1)] if id == 0 then set id = registerEventId(this_1) endif return id endfunction function fireEvents takes unit w_u returns boolean return true endfunction function EventListener_generalEventCallback takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer id = eventid_toIntId(GetTriggerEventId()) local integer listener local integer nextListener local integer listener_1 local integer nextListener_1 if trigUnit != null and fireEvents(trigUnit) and unit_getIndex(trigUnit) > 0 then if EventListener_unitListenersFirsts[unit_getIndex(trigUnit)] != 0 then set listener = EventListener_unitListenersFirsts[unit_getIndex(trigUnit)] loop exitwhen not (listener != 0) set nextListener = EventListener_next[listener] if EventListener_eventId[listener] == id then call cyc_onEvent_add_KeyUtils(9, listener) endif set listener = nextListener endloop endif endif if EventListener_generalListenersFirsts[id] != 0 then set listener_1 = EventListener_generalListenersFirsts[id] loop exitwhen not (listener_1 != 0) set nextListener_1 = EventListener_next[listener_1] call cyc_onEvent_add_KeyUtils(9, listener_1) set listener_1 = nextListener_1 endloop endif endfunction function Trig_Melee_Initialization_Actions takes nothing returns nothing call SetCinematicCameraForPlayer(Player(0), "objects\\cinematiccameras\\camerazoomout.mdx") endfunction function currentCallback takes nothing returns integer return ClosureForGroups_tempCallbacks[ClosureForGroups_tempCallbacksCount - 1] 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] = 794 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] = 794 endif return this_1 endfunction function LLEntry_init takes integer this_1 returns nothing endfunction function construct_LLEntry takes integer this_1, integer elem, integer prev, integer next returns nothing call LLEntry_init(this_1) set LLEntry_elem[this_1] = elem set LLEntry_prev[this_1] = prev set LLEntry_next[this_1] = next endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this_1 = alloc_LLEntry() call construct_LLEntry(this_1, elem, prev, next) return this_1 endfunction function LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing local integer entry = new_LLEntry(elems_0, LLEntry_prev[LinkedList_dummy[this_1]], LinkedList_dummy[this_1]) set LLEntry_next[LLEntry_prev[LinkedList_dummy[this_1]]] = entry set LLEntry_prev[LinkedList_dummy[this_1]] = entry set LinkedList_size[this_1] = LinkedList_size[this_1] + 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_add_1 takes integer this_1, integer elems_0 returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.add") else call error("Called LinkedList.add on invalid object.") endif endif call LinkedList_add_1(this_1, elems_0) endfunction function unitToIndex takes unit object returns integer return handle_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_OnHitListener_Projectile_OnHitListener_run takes integer this_1, unit target_1 returns nothing endfunction function group_add_1 takes group this_1, unit units_0 returns integer local integer i = 0 if GroupAddUnit(this_1, units_0) then set i = i + 1 endif return i endfunction function group_has takes group this_1, unit u_1 returns boolean return IsUnitInGroup(u_1, this_1) endfunction function callback_forUnitsInRange_Projectile_Projectile takes integer this_1, unit target_1 returns nothing if ( not Entity_done[this[this_1]]) and ( not group_has(Projectile_hitGroup[this[this_1]], target_1)) then call group_add_1(Projectile_hitGroup[this[this_1]], target_1) call dispatch_OnHitListener_Projectile_OnHitListener_run(Projectile_onHit[this[this_1]], target_1) endif 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] <= 732 then if ForGroupCallback_typeId[this_1] <= 731 then call callback_forEachFrom_LinkedList(this_1, u_1) else call callback_forEachFrom_Preloader(this_1, u_1) endif else call callback_forUnitsInRange_Projectile_Projectile(this_1, u_1) endif endfunction function filterCallback takes unit filter returns nothing if ClosureForGroups_iterCount < ClosureForGroups_maxCount then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(currentCallback(), filter) endif set ClosureForGroups_iterCount = ClosureForGroups_iterCount + 1 endfunction function code__Filter_ClosureForGroups takes nothing returns nothing call filterCallback(GetFilterUnit()) endfunction function 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 code__ForGroup_nullTimer_OnUnitEnterLeave takes nothing returns nothing call prepareUnit(GetEnumUnit()) endfunction function multiboard_display takes multiboard this_1, boolean show returns nothing call MultiboardDisplay(this_1, show) endfunction function multiboard_isDisplayed takes multiboard this_1 returns boolean return IsMultiboardDisplayed(this_1) endfunction function timer_startPeriodic takes timer this_1, real time, code timerCallBack returns nothing call TimerStart(this_1, time, true, timerCallBack) endfunction function startDebug takes nothing returns nothing call timer_startPeriodic(CreateTimer(), 1., ref_function_code__startPeriodic_DebugInfo) endfunction function code__addAction_DebugInfo takes nothing returns nothing if DebugInfo_isFirst then set DebugInfo_isFirst = false call startDebug() endif if GetLocalPlayer() == GetTriggerPlayer() then call multiboard_display(DebugInfo_mb, not multiboard_isDisplayed(DebugInfo_mb)) endif endfunction function code__addAction_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_594 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_595 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function getEnterLeaveUnit takes nothing returns unit 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] = 883 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] = 883 endif return this_1 endfunction function UnitIndex_init takes integer this_1 returns nothing endfunction function popUnit_1116 takes nothing returns nothing set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 endfunction function pushUnit_1128 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_1128(whichUnit) call trigger_evaluate(UnitIndexer_onIndexTrigger) call popUnit_1116() 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 = unit_getUserData(this_1) if instance == 0 then set instance = new_UnitIndex(this_1) endif return instance 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_1128(UnitIndex__unit[this_1]) call trigger_evaluate(UnitIndexer_onDeindexTrigger) call popUnit_1116() call unit_setUserData(UnitIndex__unit[this_1], 0) endfunction function dealloc_UnitIndex takes integer obj returns nothing if UnitIndex_typeId[obj] == 0 then call error("Double free: object of type UnitIndex") else set UnitIndex_nextFree[UnitIndex_firstFree] = obj set UnitIndex_firstFree = UnitIndex_firstFree + 1 set UnitIndex_typeId[obj] = 0 endif endfunction function destroyUnitIndex takes integer this_1 returns nothing call UnitIndex_onDestroy(this_1) call dealloc_UnitIndex(this_1) endfunction function dispatch_UnitIndex_destroyUnitIndex takes integer this_1 returns nothing if UnitIndex_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitIndex.UnitIndex") else call error("Called UnitIndex.UnitIndex on invalid object.") endif endif call destroyUnitIndex(this_1) endfunction function unit_deindex takes unit this_1 returns boolean if unit_getUserData(this_1) == 0 then return false else call dispatch_UnitIndex_destroyUnitIndex(unit_toUnitIndex(this_1)) return true endif endfunction function code__onLeave_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_deindex(getEnterLeaveUnit()) endif endfunction function getIndexingUnit takes nothing returns unit return UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1] endfunction function 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 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 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 call HashList_add_1(this_1, elems_0) 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] <= 874 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 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 set HashList_HashList_removeAt_result = HashList_removeAt(this_1, index) 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_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 set HashList_HashList_remove_result = HashList_remove(this_1, t) 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] <= 874 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 local integer listener_1 if OnCastListener_eventUnit[this_1] != null then set index = unit_getIndex(OnCastListener_eventUnit[this_1]) set listener = EventListener_castMapCasters[index] if listener == 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_1 = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, OnCastListener_abilId[this_1]) if listener_1 == this_1 then if OnCastListener_next[this_1] != 0 then call dispatch_HashMap_HashMap_HashMap_put(EventListener_castMap, OnCastListener_abilId[this_1], OnCastListener_next[this_1]) else call dispatch_HashMap_HashMap_HashMap_remove(EventListener_castMap, OnCastListener_abilId[this_1]) endif elseif OnCastListener_prev[this_1] != 0 then set OnCastListener_next[OnCastListener_prev[this_1]] = OnCastListener_next[this_1] endif endif set OnCastListener_prev[OnCastListener_next[this_1]] = OnCastListener_prev[this_1] set OnCastListener_next[this_1] = 0 set OnCastListener_prev[this_1] = 0 endfunction function dealloc_OnCastListener takes integer obj returns nothing if OnCastListener_typeId[obj] == 0 then call error("Double free: object of type OnCastListener") else set OnCastListener_firstFree = OnCastListener_firstFree + 1 set OnCastListener_typeId[obj] = 0 endif endfunction function destroyOnCastListener takes integer this_1 returns nothing call OnCastListener_onDestroy(this_1) call dealloc_OnCastListener(this_1) endfunction function dispatch_OnCastListener_destroyOnCastListener takes integer this_1 returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.OnCastListener") else call error("Called OnCastListener.OnCastListener on invalid object.") endif endif call destroyOnCastListener(this_1) endfunction function Log_trace takes string msg returns nothing call printLog_1121(Player_localPlayer, 0, msg) endfunction function EventListener_onDestroy takes integer this_1 returns nothing local integer listener local integer listener_1 if EventListener_uid[this_1] < 0 then set listener = EventListener_generalListenersFirsts[EventListener_eventId[this_1]] if listener == 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_1 = EventListener_unitListenersFirsts[EventListener_uid[this_1]] if listener_1 == this_1 then set EventListener_unitListenersFirsts[EventListener_uid[this_1]] = EventListener_next[this_1] elseif EventListener_prev[this_1] != 0 then set EventListener_next[EventListener_prev[this_1]] = EventListener_next[this_1] endif 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 returns nothing local integer listener local integer t if id > 0 then if EventListener_unitListenersFirsts[id] != 0 then call Log_trace("unregister unit has listeners. startid: " + int_toString(id)) set listener = EventListener_unitListenersFirsts[id] set EventListener_unitListenersFirsts[id] = 0 loop exitwhen not (listener != 0) set t = listener set listener = EventListener_next[listener] call dispatch_EventListener_destroyEventListener(t) endloop endif endif endfunction function unregisterEventsForUnit takes unit u_1 returns nothing local integer index local integer listener 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 = EventListener_castMapCasters[index] set EventListener_castMapCasters[index] = 0 loop exitwhen not (listener != 0) set t = listener set listener = OnCastListener_next[listener] call dispatch_OnCastListener_destroyOnCastListener(t) endloop endif endif endfunction function code__onUnitDeindex_ClosureEvents takes nothing returns nothing call unregisterEventsForUnit(getIndexingUnit()) endfunction function trigger_registerUnitEvent takes trigger this_1, unit whichUnit, unitevent whichEvent returns event return TriggerRegisterUnitEvent(this_1, whichUnit, whichEvent) endfunction function registerEventsForUnit takes unit u_1 returns nothing if fireEvents(u_1) then call trigger_registerUnitEvent(ClosureEvents_unitTrig, u_1, EVENT_UNIT_DAMAGED) endif endfunction function code__onUnitIndex_ClosureEvents takes nothing returns nothing call registerEventsForUnit(getIndexingUnit()) endfunction function hashtable_loadTriggerHandle takes hashtable this_1, integer parentKey, integer childKey returns trigger return LoadTriggerHandle(this_1, parentKey, childKey) endfunction function Table_loadTrigger takes integer this_1, integer parentKey returns trigger return hashtable_loadTriggerHandle(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadTrigger takes integer this_1, integer parentKey returns trigger 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 returns nothing endfunction function OnCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnCast_ClosureEvents_OnCast_fireEx(this_1, GetSpellAbilityId()) endfunction function EventData_getAbilityTargetPos takes nothing returns real set EventData_getAbilityTargetPos_return_x = GetSpellTargetX() set EventData_getAbilityTargetPos_return_y = GetSpellTargetY() return EventData_getAbilityTargetPos_return_x endfunction function EventData_getSpellTargetPos takes nothing returns real set EventData_getSpellTargetPos_return_x = EventData_getAbilityTargetPos() set EventData_getSpellTargetPos_return_y = EventData_getAbilityTargetPos_return_y return EventData_getSpellTargetPos_return_x endfunction function dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx takes integer this_1, unit caster, real target_x, real target_y returns nothing endfunction function OnPointCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx(this_1, caster, EventData_getSpellTargetPos(), EventData_getSpellTargetPos_return_y) endfunction function dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx takes integer this_1, unit caster, unit target_1 returns nothing endfunction function OnUnitCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx(this_1, caster, GetSpellTargetUnit()) endfunction function dispatch_OnCastListener_ClosureEvents_OnCastListener_fire takes integer this_1, unit caster returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCastListener.fire") else call error("Called OnCastListener.fire on invalid object.") endif endif if OnCastListener_typeId[this_1] <= 811 then if OnCastListener_typeId[this_1] <= 810 then call OnCast_fire(this_1, caster) else call OnPointCast_fire(this_1, caster) endif else call OnUnitCast_fire(this_1, caster) endif endfunction function EventListener_onSpellEffect takes nothing returns nothing local unit trigUnit = GetTriggerUnit() local integer abilId = GetSpellAbilityId() local integer index = unit_getIndex(trigUnit) local integer listener local integer nextListener local integer listener_1 local integer nextListener_1 if EventListener_castMapCasters[index] != 0 then set listener = EventListener_castMapCasters[index] loop exitwhen not (listener != 0) set nextListener = OnCastListener_next[listener] if OnCastListener_abilId[listener] == -1 or OnCastListener_abilId[listener] == abilId then call dispatch_OnCastListener_ClosureEvents_OnCastListener_fire(listener, GetSpellAbilityUnit()) endif set listener = nextListener endloop endif if dispatch_HashMap_HashMap_HashMap_has(EventListener_castMap, abilId) then set listener_1 = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId) loop exitwhen 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, GetSpellAbilityUnit()) endif set listener_1 = nextListener_1 endloop endif endfunction function code__registerPlayerUnitEvent_nullTimer_ClosureEvents takes nothing returns nothing call EventListener_onSpellEffect() endfunction function trigger_execute takes trigger this_1 returns nothing call TriggerExecute(this_1) endfunction function unit_getAbilityLevel takes unit this_1, integer id returns integer return GetUnitAbilityLevel(this_1, id) 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 multiboard_getItem takes multiboard this_1, integer row, integer column returns multiboarditem return MultiboardGetItem(this_1, row, column) endfunction function multiboard_setColumnCount takes multiboard this_1, integer count returns nothing call MultiboardSetColumnCount(this_1, count) endfunction function multiboard_setItemsStyle takes multiboard this_1, boolean showValues, boolean showIcons returns nothing call MultiboardSetItemsStyle(this_1, showValues, showIcons) endfunction function multiboard_setItemsWidth takes multiboard this_1, real width returns nothing call MultiboardSetItemsWidth(this_1, width) endfunction function multiboard_setRowCount takes multiboard this_1, integer count returns nothing call MultiboardSetRowCount(this_1, count) endfunction function multiboard_setTitle takes multiboard this_1, string label returns nothing call MultiboardSetTitleText(this_1, label) endfunction function multiboarditem_setValue takes multiboarditem this_1, string value returns nothing local string v local string cond_result if value == null then set cond_result = "" else set cond_result = value endif set v = cond_result call MultiboardSetItemValue(this_1, v) endfunction function multiboarditem_setWidth takes multiboarditem this_1, real width returns nothing call MultiboardSetItemWidth(this_1, width) endfunction function createMultiboard takes nothing returns nothing local multiboarditem mbi local multiboarditem receiver local multiboarditem receiver_1 local multiboarditem receiver_2 local multiboarditem receiver_3 local multiboarditem receiver_4 local multiboarditem receiver_5 set DebugInfo_mb = CreateMultiboard() call multiboard_setColumnCount(DebugInfo_mb, DebugInfo_columns) call multiboard_setRowCount(DebugInfo_mb, DebugInfo_rows) call multiboard_setItemsStyle(DebugInfo_mb, true, false) call multiboard_setItemsWidth(DebugInfo_mb, 0.04) call multiboard_setTitle(DebugInfo_mb, "Debug Info") set mbi = multiboard_getItem(DebugInfo_mb, 0, 0) set receiver = mbi call multiboarditem_setValue(receiver, "Allocations") set receiver_1 = receiver call multiboarditem_setWidth(receiver_1, 0.10) set mbi = multiboard_getItem(DebugInfo_mb, 1, 0) set receiver_2 = mbi call multiboarditem_setValue(receiver_2, "Callbacks") set receiver_3 = receiver_2 call multiboarditem_setWidth(receiver_3, 0.10) set mbi = multiboard_getItem(DebugInfo_mb, 2, 0) set receiver_4 = mbi call multiboarditem_setValue(receiver_4, "Entites") set receiver_5 = receiver_4 call multiboarditem_setWidth(receiver_5, 0.10) endfunction function real_toString takes real this_1 returns string return R2S(this_1) endfunction function code__startPeriodic_DebugInfo takes nothing returns nothing if DebugInfo_mb == null then call createMultiboard() endif set DebugInfo_seconds = DebugInfo_seconds + 1 set DebugInfo_totalEventCallbacks = DebugInfo_totalEventCallbacks + DebugInfo_eventCallbacksPerSecond set DebugInfo_totalAllocations = DebugInfo_totalAllocations + DebugInfo_allocationsPerSecond call multiboarditem_setValue(multiboard_getItem(DebugInfo_mb, 0, 1), int_toString(DebugInfo_allocationsPerSecond)) call multiboarditem_setValue(multiboard_getItem(DebugInfo_mb, 0, 2), real_toString(DebugInfo_totalAllocations * 1. / DebugInfo_seconds)) call multiboarditem_setValue(multiboard_getItem(DebugInfo_mb, 1, 1), int_toString(DebugInfo_eventCallbacksPerSecond)) call multiboarditem_setValue(multiboard_getItem(DebugInfo_mb, 1, 2), real_toString(DebugInfo_totalEventCallbacks * 1. / DebugInfo_seconds)) call multiboarditem_setValue(multiboard_getItem(DebugInfo_mb, 2, 1), int_toString(Entity_DupletListModule_activeSize)) call multiboarditem_setValue(multiboard_getItem(DebugInfo_mb, 2, 2), int_toString(Entity_DupletListModule_inactiveSize)) set DebugInfo_eventCallbacksPerSecond = 0 set DebugInfo_allocationsPerSecond = 0 endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + Basics_ANIMATION_PERIOD endfunction function alloc_CallbackSingle_doAfter_Cine_CineBuilder 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] = 658 else call error("Out of memory: Could not create CallbackSingle_doAfter_Cine_CineBuilder.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 658 endif return this_1 endfunction function Cine_endCine takes integer this_1, player target_1 returns nothing if Player_localPlayer == target_1 then call ClearTextMessages() call ShowInterface(true, 1.) call EnableUserControl(true) endif endfunction function dispatch_Cine_CineBuilder_Cine_endCine takes integer this_1, player target_1 returns nothing if Cine_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Cine.endCine") else call error("Called Cine.endCine on invalid object.") endif endif call Cine_endCine(this_1, target_1) endfunction function player_panCameraToTimed takes player this_1, real pos_x, real pos_y, real duration returns nothing call PanCameraToTimedForPlayer(this_1, pos_x, pos_y, duration) endfunction function printTimedToPlayerClear takes string msg, real duration, player p returns nothing if Player_localPlayer == p then call ClearTextMessages() endif call DisplayTimedTextToPlayer(p, 0., 0., duration, msg) endfunction function KeyFrame_apply takes integer this_1, player target_1 returns nothing call player_panCameraToTimed(target_1, KeyFrame_camPosition_x[this_1], KeyFrame_camPosition_y[this_1], KeyFrame_camTime[this_1]) call printTimedToPlayerClear(KeyFrame_text[this_1], KeyFrame_duration[this_1], target_1) endfunction function dispatch_KeyFrame_CineBuilder_KeyFrame_apply takes integer this_1, player target_1 returns nothing if KeyFrame_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling KeyFrame.apply") else call error("Called KeyFrame.apply on invalid object.") endif endif call KeyFrame_apply(this_1, target_1) endfunction function LinkedList_getEntry takes integer this_1, integer index returns integer local integer entry = LinkedList_dummy[this_1] local integer i = 0 local integer temp = index loop exitwhen i > temp set entry = LLEntry_next[entry] set i = i + 1 endloop return entry endfunction function dispatch_LinkedList_LinkedList_LinkedList_getEntry takes integer this_1, integer index returns integer local integer LinkedList_LinkedList_getEntry_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.getEntry") else call error("Called LinkedList.getEntry on invalid object.") endif endif set LinkedList_LinkedList_getEntry_result = LinkedList_getEntry(this_1, index) return LinkedList_LinkedList_getEntry_result endfunction function LinkedList_get takes integer this_1, integer index returns integer return LLEntry_elem[dispatch_LinkedList_LinkedList_LinkedList_getEntry(this_1, index)] endfunction function dispatch_LinkedList_LinkedList_LinkedList_get takes integer this_1, integer index returns integer local integer LinkedList_LinkedList_get_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.get") else call error("Called LinkedList.get on invalid object.") endif endif set LinkedList_LinkedList_get_result = LinkedList_get(this_1, index) return LinkedList_LinkedList_get_result endfunction function Cine_playKeyFrame takes integer this_1, player target_1 returns nothing local integer keyFrame local integer clVar local real temp if Cine_keyFramePointer[this_1] < dispatch_LinkedList_LinkedList_LinkedList_size(CineBuilder_keyFrames[Cine_builder[this_1]]) then set keyFrame = dispatch_LinkedList_LinkedList_LinkedList_get(CineBuilder_keyFrames[Cine_builder[this_1]], Cine_keyFramePointer[this_1]) set Cine_keyFramePointer[this_1] = Cine_keyFramePointer[this_1] + 1 call dispatch_KeyFrame_CineBuilder_KeyFrame_apply(keyFrame, target_1) set temp = KeyFrame_duration[keyFrame] set clVar = alloc_CallbackSingle_doAfter_Cine_CineBuilder() call construct_CallbackSingle(clVar) set this_835[clVar] = this_1 set target[clVar] = target_1 call doAfter(temp, clVar) else call dispatch_Cine_CineBuilder_Cine_endCine(this_1, target_1) endif endfunction function call_doAfter_Cine_CineBuilder takes integer this_1 returns nothing call Cine_playKeyFrame(this_835[this_1], target[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_574 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x + 50 endfunction function call_doAfter_ClosureTimers_575 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_576 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 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, real pos_y returns nothing local unit receiver = this_1 local unit receiver_1 call unit_setX(receiver, pos_x) set receiver_1 = receiver call unit_setY(receiver_1, pos_y) 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 call_doAfter_DummyRecycler_DummyRecycler takes integer this_1 returns nothing call DummyRecycler_recycle(u[this_1]) endfunction function FText_LinkedListModule_remove takes integer this_1 returns nothing set FText_LinkedListModule_size = FText_LinkedListModule_size - 1 if this_1 != FText_LinkedListModule_first then set FText_LinkedListModule_next[FText_LinkedListModule_prev[this_1]] = FText_LinkedListModule_next[this_1] else set FText_LinkedListModule_first = FText_LinkedListModule_next[this_1] endif if this_1 != FText_LinkedListModule_last then set FText_LinkedListModule_prev[FText_LinkedListModule_next[this_1]] = FText_LinkedListModule_prev[this_1] else set FText_LinkedListModule_last = FText_LinkedListModule_prev[this_1] endif endfunction function dispatch_FText_FText_FText_LinkedListModule_remove takes integer this_1 returns nothing if FText_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FText.remove") else call error("Called FText.remove on invalid object.") endif endif call FText_LinkedListModule_remove(this_1) endfunction function texttag_destr takes texttag this_1 returns nothing call DestroyTextTag(this_1) endfunction function FText_onDestroy takes integer this_1 returns nothing if FText_tt[this_1] != null then call texttag_destr(FText_tt[this_1]) set FText_tt[this_1] = null endif call dispatch_FText_FText_FText_LinkedListModule_remove(this_1) endfunction function dealloc_FText takes integer obj returns nothing if FText_typeId[obj] == 0 then call error("Double free: object of type FText") else set FText_nextFree[FText_firstFree] = obj set FText_firstFree = FText_firstFree + 1 set FText_typeId[obj] = 0 endif endfunction function destroyFText takes integer this_1 returns nothing call FText_onDestroy(this_1) call dealloc_FText(this_1) endfunction function dispatch_FText_destroyFText takes integer this_1 returns nothing if FText_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FText.FText") else call error("Called FText.FText on invalid object.") endif endif call destroyFText(this_1) endfunction function FText_recycle takes integer this_1 returns nothing local texttag receiver local texttag receiver_1 local texttag receiver_2 set FText_cb[this_1] = 0 set FText_timestamp[this_1] = 0. if FText_permanent[this_1] then call dispatch_FText_destroyFText(this_1) else set receiver = FText_tt[this_1] call texttag_setVisibility(receiver, false) set receiver_1 = receiver call texttag_setColor(receiver_1, Colors_COLOR_BLACK_red, Colors_COLOR_BLACK_green, Colors_COLOR_BLACK_blue, Colors_COLOR_BLACK_alpha) set receiver_2 = receiver_1 call texttag_setText(receiver_2, "", 0.) call dispatch_LinkedList_LinkedList_LinkedList_add_1(FText_recylcer, this_1) endif endfunction function dispatch_FText_FText_FText_recycle takes integer this_1 returns nothing if FText_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FText.recycle") else call error("Called FText.recycle on invalid object.") endif endif call FText_recycle(this_1) endfunction function call_doAfter_FText_FText takes integer this_1 returns nothing call dispatch_FText_FText_FText_recycle(this_850[this_1]) endfunction function unit_hasAbility takes unit this_1, integer id returns boolean return GetUnitAbilityLevel(this_1, id) > 0 endfunction function Buff_refresh takes integer this_1, boolean forceRefresh returns nothing if ( not unit_hasAbility(Buff_target[this_1], Buff_buffData_abilId[this_1])) or forceRefresh then call unit_addAbility(Buff_target[this_1], Buff_buffData_abilId[this_1]) endif endfunction function dispatch_Buff_Buff_Buff_refresh takes integer this_1, boolean forceRefresh returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Buff.refresh") else call error("Called Buff.refresh on invalid object.") endif endif call Buff_refresh(this_1, forceRefresh) endfunction function call_doAfter_add_Buff takes integer this_1 returns nothing local integer iterator local integer bff if unit_hasBuffs(upg[this_1]) then set iterator = LinkedList_iterator(unit_getBuffs(upg[this_1])) loop exitwhen not LLIterator_hasNext(iterator) set bff = LLIterator_next(iterator) call dispatch_Buff_Buff_Buff_refresh(bff, true) endloop call LLIterator_close(iterator) endif 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_unitTrig, ref_function_code__addAction_nullTimer_ClosureEvents) call trigger_addAction(ClosureEvents_leaveTrig, ref_function_code__addAction_nullTimer_ClosureEvents_724) call trigger_addAction(ClosureEvents_keyTrig, ref_function_code__addAction_nullTimer_ClosureEvents_725) 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_1144(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents, null) endfunction function Log_debug takes string msg returns nothing call printLog_1121(Player_localPlayer, 1, msg) endfunction function alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder 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] = 726 else call error("Out of memory: Could not create ForForceCallback_execute_nullTimer_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 726 endif return this_1 endfunction function alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_540 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] = 727 else call error("Out of memory: Could not create ForForceCallback_execute_nullTimer_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 727 endif return this_1 endfunction function alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_541 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] = 728 else call error("Out of memory: Could not create ForForceCallback_execute_nullTimer_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 728 endif return this_1 endfunction function alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_542 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] = 729 else call error("Out of memory: Could not create ForForceCallback_execute_nullTimer_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 729 endif return this_1 endfunction function BigString_getLength takes integer this_1 returns integer return BigString_length[this_1] - BigString_startoffset[this_1] endfunction function dispatch_BigString_BigString_BigString_getLength takes integer this_1 returns integer local integer BigString_BigString_getLength_result if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.getLength") else call error("Called BigString.getLength on invalid object.") endif endif set BigString_BigString_getLength_result = BigString_getLength(this_1) return BigString_BigString_getLength_result endfunction function force_forEach takes force this_1, code callback_1 returns nothing call ForForce(this_1, callback_1) 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 call_nullTimer_Encoder_Encoder takes integer this_1 returns nothing local integer clVar local integer clVar_1 local integer clVar_2 local integer clVar_3 call Log_debug("hash: " + int_toString(Encoder_hash[this_841[this_1]])) set clVar = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder() set this_842[clVar] = this_841[this_1] call execute(clVar) call Log_debug("encoded hash") set clVar_1 = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_540() set this_843[clVar_1] = this_841[this_1] call execute(clVar_1) call Log_debug("clean") set clVar_2 = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_541() set this_844[clVar_2] = this_841[this_1] call execute(clVar_2) call Log_debug("before toString bs: " + int_toString(dispatch_BigString_BigString_BigString_getLength(bs_665[this_1]))) set clVar_3 = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_542() set this_845[clVar_3] = this_841[this_1] set bs_666[clVar_3] = bs_665[this_1] set onFinish_698[clVar_3] = onFinish_697[this_1] call execute(clVar_3) 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_891 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_891(this_1, rec, null) endfunction function trigger_registerEnterRegion takes trigger this_1, region whichRegion, boolexpr filter returns event return TriggerRegisterEnterRegion(this_1, whichRegion, filter) endfunction function call_nullTimer_OnUnitEnterLeave takes integer this_1 returns nothing local trigger receiver = CreateTrigger() 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) call ForGroup(OnUnitEnterLeave_preplacedUnits, ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave) set receiver_1 = OnUnitEnterLeave_preplacedUnits call group_clear(receiver_1) set receiver_2 = receiver_1 call group_destr(receiver_2) endfunction function EventListener_add takes eventid eventId, integer listener returns integer set EventListener_eventId[listener] = eventid_toIntId(eventId) if EventListener_generalListenersFirsts[EventListener_eventId[listener]] != 0 then set EventListener_prev[EventListener_generalListenersFirsts[EventListener_eventId[listener]]] = listener set EventListener_next[listener] = EventListener_generalListenersFirsts[EventListener_eventId[listener]] endif set EventListener_generalListenersFirsts[EventListener_eventId[listener]] = listener return listener endfunction function alloc_EventListener_add_nullTimer_Players 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] = 711 else call error("Out of memory: Could not create EventListener_add_nullTimer_Players.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 711 endif return this_1 endfunction function alloc_OnPlayerLeave_onPlayerLeave_nullTimer_Players takes nothing returns integer local integer this_1 if OnPlayerLeave_firstFree == 0 then if OnPlayerLeave_maxIndex < JASS_MAX_ARRAY_SIZE then set OnPlayerLeave_maxIndex = OnPlayerLeave_maxIndex + 1 set this_1 = OnPlayerLeave_maxIndex set OnPlayerLeave_typeId[this_1] = 816 else call error("Out of memory: Could not create OnPlayerLeave_onPlayerLeave_nullTimer_Players.") set this_1 = 0 endif else set OnPlayerLeave_firstFree = OnPlayerLeave_firstFree - 1 set this_1 = OnPlayerLeave_nextFree[OnPlayerLeave_firstFree] set OnPlayerLeave_typeId[this_1] = 816 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 onPlayerLeave takes integer onLeave returns nothing set Players_onLeaveListener = onLeave 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 call_nullTimer_Players takes integer this_1 returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 local integer clVar local integer clVar_1 local playerevent temp_1 loop exitwhen i > temp if player_isIngame(Player_players[i]) then call dispatch_LinkedList_LinkedList_LinkedList_add_1(Players_ALL_PLAYERS, playerToIndex(Player_players[i])) endif set i = i + 1 endloop set temp_1 = EVENT_PLAYER_LEAVE set clVar = alloc_EventListener_add_nullTimer_Players() call construct_EventListener(clVar) call EventListener_add(temp_1, clVar) set clVar_1 = alloc_OnPlayerLeave_onPlayerLeave_nullTimer_Players() call onPlayerLeave(clVar_1) 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] = 732 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] = 732 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_SeqCallback_doSeq_nullTimer_load_LZW takes nothing returns integer local integer this_1 if SeqCallback_firstFree == 0 then if SeqCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set SeqCallback_maxIndex = SeqCallback_maxIndex + 1 set this_1 = SeqCallback_maxIndex set SeqCallback_typeId[this_1] = 846 else call error("Out of memory: Could not create SeqCallback_doSeq_nullTimer_load_LZW.") set this_1 = 0 endif else set SeqCallback_firstFree = SeqCallback_firstFree - 1 set this_1 = SeqCallback_nextFree[SeqCallback_firstFree] set SeqCallback_typeId[this_1] = 846 endif return this_1 endfunction function SeqCallback_init takes integer this_1 returns nothing set SeqCallback_done[this_1] = false set SeqCallback_ref[this_1] = null endfunction function construct_SeqCallback takes integer this_1 returns nothing call SeqCallback_init(this_1) endfunction function cyc_BigNum_l_divSmall takes integer funcChoice, integer this_1, integer base, integer denom returns nothing local integer remainder local integer num local integer quotient local integer BigNum_BigNum_l_divSmall_result if funcChoice == 0 then set remainder = 0 if BigNum_l_next[this_1] != 0 then call cyc_BigNum_l_divSmall(1, BigNum_l_next[this_1], base, denom) set remainder = tempReturn_integer endif set num = BigNum_l_leaf[this_1] + remainder * base set quotient = num / denom set remainder = num - quotient * denom set BigNum_l_leaf[this_1] = quotient set tempReturn_integer = remainder return elseif funcChoice == 1 then if BigNum_l_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum_l.divSmall") else call error("Called BigNum_l.divSmall on invalid object.") endif endif call cyc_BigNum_l_divSmall(0, this_1, base, denom) set BigNum_BigNum_l_divSmall_result = tempReturn_integer set tempReturn_integer = BigNum_BigNum_l_divSmall_result return endif endfunction function BigNum_divSmall takes integer this_1, integer denom returns integer call cyc_BigNum_l_divSmall(1, BigNum_list[this_1], BigNum_base[this_1], denom) return tempReturn_integer endfunction function dispatch_BigNum_BigNum_BigNum_divSmall takes integer this_1, integer denom returns integer local integer BigNum_BigNum_divSmall_result if BigNum_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum.divSmall") else call error("Called BigNum.divSmall on invalid object.") endif endif set BigNum_BigNum_divSmall_result = BigNum_divSmall(this_1, denom) return BigNum_BigNum_divSmall_result endfunction function Encoder_decode takes integer this_1, integer max returns integer return dispatch_BigNum_BigNum_BigNum_divSmall(Encoder_bignum[this_1], max + 1) endfunction function dispatch_Encoder_Encoder_Encoder_decode takes integer this_1, integer max returns integer local integer Encoder_Encoder_decode_result if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.decode") else call error("Called Encoder.decode on invalid object.") endif endif set Encoder_Encoder_decode_result = Encoder_decode(this_1, max) return Encoder_Encoder_decode_result endfunction function doSeq takes integer cb_1 returns nothing local timer receiver = getTimer() local timer receiver_1 call timer_setData(receiver, cb_1) set SeqCallback_ref[cb_1] = receiver set receiver_1 = SeqCallback_ref[cb_1] call timer_start(receiver_1, 0.001, ref_function_code__start_SeqWorker) 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] = 801 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] = 801 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 set LinkedList_staticItr[this_1] = 0 set LinkedList_staticBackItr[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 call_nullTimer_load_LZW takes integer this_1 returns nothing local integer dictSize_1 local integer positions_1 local integer clVar call Log_debug("file valid2") set dictSize_1 = dispatch_Encoder_Encoder_Encoder_decode(encoder_682[this_1], LZW_maxDictSize) call Log_debug("dictSize: " + int_toString(dictSize_1)) set positions_1 = new_LinkedList() call Log_debug("start decoding pos") set clVar = alloc_SeqCallback_doSeq_nullTimer_load_LZW() call construct_SeqCallback(clVar) set encoder_683[clVar] = encoder_682[this_1] set dictSize_677[clVar] = dictSize_1 set positions[clVar] = positions_1 set onFinish_703[clVar] = onFinish_702[this_1] call doSeq(clVar) 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] <= 664 then if CallbackSingle_typeId[this_1] <= 661 then if CallbackSingle_typeId[this_1] <= 659 then if CallbackSingle_typeId[this_1] <= 658 then call call_doAfter_Cine_CineBuilder(this_1) else call call_doAfter_ClosureTimers(this_1) endif elseif CallbackSingle_typeId[this_1] <= 660 then call call_doAfter_ClosureTimers_574(this_1) else call call_doAfter_ClosureTimers_575(this_1) endif elseif CallbackSingle_typeId[this_1] <= 663 then if CallbackSingle_typeId[this_1] <= 662 then call call_doAfter_ClosureTimers_576(this_1) else call call_doAfter_DummyRecycler_DummyRecycler(this_1) endif else call call_doAfter_FText_FText(this_1) endif elseif CallbackSingle_typeId[this_1] <= 668 then if CallbackSingle_typeId[this_1] <= 666 then if CallbackSingle_typeId[this_1] <= 665 then call call_doAfter_add_Buff(this_1) else call call_nullTimer_ClosureEvents(this_1) endif elseif CallbackSingle_typeId[this_1] <= 667 then call call_nullTimer_Encoder_Encoder(this_1) else call call_nullTimer_OnUnitEnterLeave(this_1) endif elseif CallbackSingle_typeId[this_1] <= 670 then if CallbackSingle_typeId[this_1] <= 669 then call call_nullTimer_Players(this_1) else call call_nullTimer_Preloader(this_1) endif else call call_nullTimer_load_LZW(this_1) endif 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_fromString_Encoder_Encoder 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] = 723 else call error("Out of memory: Could not create ForForceCallback_execute_fromString_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 723 endif return this_1 endfunction function alloc_ForForceCallback_execute_fromString_Encoder_Encoder_537 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] = 724 else call error("Out of memory: Could not create ForForceCallback_execute_fromString_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 724 endif return this_1 endfunction function alloc_ForForceCallback_execute_fromString_Encoder_Encoder_538 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] = 725 else call error("Out of memory: Could not create ForForceCallback_execute_fromString_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 725 endif return this_1 endfunction function boolean_toInt takes boolean this_1 returns integer local integer cond_result if this_1 then set cond_result = 1 else set cond_result = 0 endif return cond_result endfunction function BigString_substrings_get takes integer index1, integer index2 returns string local string returnVal if index2 < 0 or index2 >= 25 then call error("Index out of Bounds") elseif index2 <= 12 then if index2 <= 6 then if index2 <= 3 then if index2 <= 1 then if index2 <= 0 then set returnVal = BigString_substrings_0[index1] else set returnVal = BigString_substrings_1[index1] endif elseif index2 <= 2 then set returnVal = BigString_substrings_2[index1] else set returnVal = BigString_substrings_3[index1] endif elseif index2 <= 5 then if index2 <= 4 then set returnVal = BigString_substrings_4[index1] else set returnVal = BigString_substrings_5[index1] endif else set returnVal = BigString_substrings_6[index1] endif elseif index2 <= 9 then if index2 <= 8 then if index2 <= 7 then set returnVal = BigString_substrings_7[index1] else set returnVal = BigString_substrings_8[index1] endif else set returnVal = BigString_substrings_9[index1] endif elseif index2 <= 11 then if index2 <= 10 then set returnVal = BigString_substrings_10[index1] else set returnVal = BigString_substrings_11[index1] endif else set returnVal = BigString_substrings_12[index1] endif elseif index2 <= 18 then if index2 <= 15 then if index2 <= 14 then if index2 <= 13 then set returnVal = BigString_substrings_13[index1] else set returnVal = BigString_substrings_14[index1] endif else set returnVal = BigString_substrings_15[index1] endif elseif index2 <= 17 then if index2 <= 16 then set returnVal = BigString_substrings_16[index1] else set returnVal = BigString_substrings_17[index1] endif else set returnVal = BigString_substrings_18[index1] endif elseif index2 <= 21 then if index2 <= 20 then if index2 <= 19 then set returnVal = BigString_substrings_19[index1] else set returnVal = BigString_substrings_20[index1] endif else set returnVal = BigString_substrings_21[index1] endif elseif index2 <= 23 then if index2 <= 22 then set returnVal = BigString_substrings_22[index1] else set returnVal = BigString_substrings_23[index1] endif else set returnVal = BigString_substrings_24[index1] endif return returnVal endfunction function BigString_debugPrint takes integer this_1 returns nothing local integer i local integer temp if Printing_DEBUG_LEVEL == 0 then call Log_debug("BigString length: " + int_toString(dispatch_BigString_BigString_BigString_getLength(this_1)) + " lines: ") set i = 0 set temp = BigString_MAX_SUBSTRINGS - 1 loop exitwhen i > temp if string_length(BigString_substrings_get(this_1, i)) > 0 then call Log_debug("\n\tLine " + int_toString(i) + " : " + BigString_substrings_get(this_1, i)) else exitwhen true endif set i = i + 1 endloop endif endfunction function dispatch_BigString_BigString_BigString_debugPrint takes integer this_1 returns nothing if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.debugPrint") else call error("Called BigString.debugPrint on invalid object.") endif endif call BigString_debugPrint(this_1) endfunction function BigNum_l_onDestroy takes integer this_1 returns nothing set BigNum_l_count = BigNum_l_count - 1 endfunction function dealloc_BigNum_l takes integer obj returns nothing if BigNum_l_typeId[obj] == 0 then call error("Double free: object of type BigNum_l") else set BigNum_l_nextFree[BigNum_l_firstFree] = obj set BigNum_l_firstFree = BigNum_l_firstFree + 1 set BigNum_l_typeId[obj] = 0 endif endfunction function destroyBigNum_l takes integer this_1 returns nothing call BigNum_l_onDestroy(this_1) call dealloc_BigNum_l(this_1) endfunction function dispatch_BigNum_l_destroyBigNum_l takes integer this_1 returns nothing if BigNum_l_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum_l.BigNum_l") else call error("Called BigNum_l.BigNum_l on invalid object.") endif endif call destroyBigNum_l(this_1) endfunction function BigNum_onDestroy takes integer this_1 returns nothing local integer cur = BigNum_list[this_1] local integer next loop exitwhen not (cur != 0) set next = BigNum_l_next[cur] call dispatch_BigNum_l_destroyBigNum_l(cur) set cur = next endloop endfunction function dealloc_BigNum takes integer obj returns nothing if BigNum_typeId[obj] == 0 then call error("Double free: object of type BigNum") else set BigNum_nextFree[BigNum_firstFree] = obj set BigNum_firstFree = BigNum_firstFree + 1 set BigNum_typeId[obj] = 0 endif endfunction function destroyBigNum takes integer this_1 returns nothing call BigNum_onDestroy(this_1) call dealloc_BigNum(this_1) endfunction function dispatch_BigNum_destroyBigNum takes integer this_1 returns nothing if BigNum_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum.BigNum") else call error("Called BigNum.BigNum on invalid object.") endif endif call destroyBigNum(this_1) endfunction function Encoder_onDestroy takes integer this_1 returns nothing call dispatch_BigNum_destroyBigNum(Encoder_bignum[this_1]) endfunction function dealloc_Encoder takes integer obj returns nothing if Encoder_typeId[obj] == 0 then call error("Double free: object of type Encoder") else set Encoder_nextFree[Encoder_firstFree] = obj set Encoder_firstFree = Encoder_firstFree + 1 set Encoder_typeId[obj] = 0 endif endfunction function destroyEncoder takes integer this_1 returns nothing call Encoder_onDestroy(this_1) call dealloc_Encoder(this_1) endfunction function dispatch_Encoder_destroyEncoder takes integer this_1 returns nothing if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.Encoder") else call error("Called Encoder.Encoder on invalid object.") endif endif call destroyEncoder(this_1) endfunction function alloc_SeqCallback_doSeq_decodePositions_LZW takes nothing returns integer local integer this_1 if SeqCallback_firstFree == 0 then if SeqCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set SeqCallback_maxIndex = SeqCallback_maxIndex + 1 set this_1 = SeqCallback_maxIndex set SeqCallback_typeId[this_1] = 845 else call error("Out of memory: Could not create SeqCallback_doSeq_decodePositions_LZW.") set this_1 = 0 endif else set SeqCallback_firstFree = SeqCallback_firstFree - 1 set this_1 = SeqCallback_nextFree[SeqCallback_firstFree] set SeqCallback_typeId[this_1] = 845 endif return this_1 endfunction function construct_LLIterator2 takes integer this_1, integer parent, boolean destroyOnClose returns nothing call LLIterator_init(this_1) set LLIterator_parent[this_1] = parent call dispatch_LLIterator_LinkedList_LLIterator_reset(this_1) set LLIterator_destroyOnClose[this_1] = destroyOnClose endfunction function new_LLIterator_1059 takes integer parent, boolean destroyOnClose returns integer local integer this_1 = alloc_LLIterator() call construct_LLIterator2(this_1, parent, destroyOnClose) return this_1 endfunction function LinkedList_staticItr_1 takes integer this_1 returns integer if LinkedList_staticItr[this_1] == 0 then set LinkedList_staticItr[this_1] = new_LLIterator_1059(this_1, false) endif call dispatch_LLIterator_LinkedList_LLIterator_reset(LinkedList_staticItr[this_1]) return LinkedList_staticItr[this_1] endfunction function dispatch_LinkedList_LinkedList_LinkedList_staticItr takes integer this_1 returns integer local integer LinkedList_LinkedList_staticItr_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.staticItr") else call error("Called LinkedList.staticItr on invalid object.") endif endif set LinkedList_LinkedList_staticItr_result = LinkedList_staticItr_1(this_1) return LinkedList_LinkedList_staticItr_result endfunction function onExecute_decodePositions_LZW takes integer this_1, integer cb1 returns nothing local integer positions_1 = PayloadCallback_customData[cb1] local integer itr_1 = dispatch_LinkedList_LinkedList_LinkedList_staticItr(positions_1) local string A_2 = "" local string B_1 = "" local integer clVar = alloc_SeqCallback_doSeq_decodePositions_LZW() call construct_SeqCallback(clVar) set itr_695[clVar] = itr_1 set A_1[clVar] = A_2 set B_7[clVar] = B_1 set output_711[clVar] = output[this_1] set onFinish_707[clVar] = onFinish_706[this_1] call doSeq(clVar) endfunction function alloc_CallbackSingle_nullTimer_load_LZW 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] = 671 else call error("Out of memory: Could not create CallbackSingle_nullTimer_load_LZW.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 671 endif return this_1 endfunction function PayloadCallback_onDestroy takes integer this_1 returns nothing endfunction function dealloc_PayloadCallback takes integer obj returns nothing if PayloadCallback_typeId[obj] == 0 then call error("Double free: object of type PayloadCallback") else set PayloadCallback_nextFree[PayloadCallback_firstFree] = obj set PayloadCallback_firstFree = PayloadCallback_firstFree + 1 set PayloadCallback_typeId[obj] = 0 endif endfunction function destroyPayloadCallback takes integer this_1 returns nothing call PayloadCallback_onDestroy(this_1) call dealloc_PayloadCallback(this_1) endfunction function dispatch_PayloadCallback_destroyPayloadCallback takes integer this_1 returns nothing if PayloadCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PayloadCallback.PayloadCallback") else call error("Called PayloadCallback.PayloadCallback on invalid object.") endif endif call destroyPayloadCallback(this_1) endfunction function nullTimer takes integer cb_1 returns integer return doAfter(0., cb_1) endfunction function onExecute_load_LZW takes integer this_1, integer cb_1 returns nothing local integer clVar if PayloadCallback_customData[cb_1] == 1 then set clVar = alloc_CallbackSingle_nullTimer_load_LZW() call construct_CallbackSingle(clVar) set encoder_682[clVar] = encoder_681[this_1] set onFinish_702[clVar] = onFinish_701[this_1] call nullTimer(clVar) else call error("loaded input is invalid") endif call dispatch_PayloadCallback_destroyPayloadCallback(cb_1) endfunction function cyc_onExecute_save_doSeq_LZW takes integer funcChoice, integer this_1, integer pc returns nothing local integer clVar local integer clVar_1 local integer clVar_2 local integer encoded if funcChoice == 0 then set PayloadCallback_customData[onFinish_700[this_1]] = PayloadCallback_customData[pc] call dispatch_Encoder_destroyEncoder(encoder_680[this_1]) call cyc_onExecute_save_doSeq_LZW(5, onFinish_700[this_1], 0) elseif funcChoice == 1 then call Log_debug("loaded..") set clVar = alloc_ForForceCallback_execute_fromString_Encoder_Encoder() set this_847[clVar] = this_846[this_1] call execute(clVar) call Log_debug("decoded..") set clVar_1 = alloc_ForForceCallback_execute_fromString_Encoder_Encoder_537() set this_848[clVar_1] = this_846[this_1] call execute(clVar_1) call Log_debug("claned..") set clVar_2 = alloc_ForForceCallback_execute_fromString_Encoder_Encoder_538() set this_849[clVar_2] = this_846[this_1] call execute(clVar_2) call Log_debug("hashed..") set PayloadCallback_customData[onFinishLoad[this_1]] = boolean_toInt(Encoder_inputhash[this_846[this_1]] == Encoder_comparehash[this_846[this_1]]) call cyc_onExecute_save_doSeq_LZW(5, onFinishLoad[this_1], 0) elseif funcChoice == 2 then call Log_debug("positions encoded") set encoded = PayloadCallback_customData[pc] call dispatch_BigString_BigString_BigString_debugPrint(encoded) set PayloadCallback_customData[onFinish_705[this_1]] = encoded call cyc_onExecute_save_doSeq_LZW(5, onFinish_705[this_1], 0) elseif funcChoice == 3 then if PayloadCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PayloadCallback.onExecute") else call error("Called PayloadCallback.onExecute on invalid object.") endif endif if PayloadCallback_typeId[this_1] <= 822 then if PayloadCallback_typeId[this_1] <= 821 then if PayloadCallback_typeId[this_1] <= 820 then call onExecute_decodePositions_LZW(this_1, pc) else call cyc_onExecute_save_doSeq_LZW(2, this_1, pc) endif else call cyc_onExecute_save_doSeq_LZW(1, this_1, pc) endif elseif PayloadCallback_typeId[this_1] <= 823 then call onExecute_load_LZW(this_1, pc) else call cyc_onExecute_save_doSeq_LZW(0, this_1, pc) endif elseif funcChoice == 4 then call cyc_onExecute_save_doSeq_LZW(3, this_1, this_1) elseif funcChoice == 5 then if PayloadCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PayloadCallback.doStep") else call error("Called PayloadCallback.doStep on invalid object.") endif endif call cyc_onExecute_save_doSeq_LZW(4, this_1, 0) endif endfunction function BigString_substrings_set takes integer instanceId, integer arrayIndex, string value returns nothing if arrayIndex < 0 or arrayIndex >= 25 then call error("Index out of Bounds") elseif arrayIndex <= 12 then if arrayIndex <= 6 then if arrayIndex <= 3 then if arrayIndex <= 1 then if arrayIndex <= 0 then set BigString_substrings_0[instanceId] = value else set BigString_substrings_1[instanceId] = value endif elseif arrayIndex <= 2 then set BigString_substrings_2[instanceId] = value else set BigString_substrings_3[instanceId] = value endif elseif arrayIndex <= 5 then if arrayIndex <= 4 then set BigString_substrings_4[instanceId] = value else set BigString_substrings_5[instanceId] = value endif else set BigString_substrings_6[instanceId] = value endif elseif arrayIndex <= 9 then if arrayIndex <= 8 then if arrayIndex <= 7 then set BigString_substrings_7[instanceId] = value else set BigString_substrings_8[instanceId] = value endif else set BigString_substrings_9[instanceId] = value endif elseif arrayIndex <= 11 then if arrayIndex <= 10 then set BigString_substrings_10[instanceId] = value else set BigString_substrings_11[instanceId] = value endif else set BigString_substrings_12[instanceId] = value endif elseif arrayIndex <= 18 then if arrayIndex <= 15 then if arrayIndex <= 14 then if arrayIndex <= 13 then set BigString_substrings_13[instanceId] = value else set BigString_substrings_14[instanceId] = value endif else set BigString_substrings_15[instanceId] = value endif elseif arrayIndex <= 17 then if arrayIndex <= 16 then set BigString_substrings_16[instanceId] = value else set BigString_substrings_17[instanceId] = value endif else set BigString_substrings_18[instanceId] = value endif elseif arrayIndex <= 21 then if arrayIndex <= 20 then if arrayIndex <= 19 then set BigString_substrings_19[instanceId] = value else set BigString_substrings_20[instanceId] = value endif else set BigString_substrings_21[instanceId] = value endif elseif arrayIndex <= 23 then if arrayIndex <= 22 then set BigString_substrings_22[instanceId] = value else set BigString_substrings_23[instanceId] = value endif else set BigString_substrings_24[instanceId] = value endif endfunction function string_substring_1171 takes string this_1, integer start returns string return SubString(this_1, start, string_length(this_1)) endfunction function BigString_addString takes integer this_1, string sp returns nothing local integer idx local integer off if string_length(sp) > BigString_BIG_SUBSTRING_LEN then call error("adding too long string") endif set idx = real_toInt(dispatch_BigString_BigString_BigString_getLength(this_1) * 1. / BigString_BIG_SUBSTRING_LEN) if string_length(BigString_substrings_get(this_1, idx)) + string_length(sp) > BigString_BIG_SUBSTRING_LEN then set off = BigString_BIG_SUBSTRING_LEN - string_length(BigString_substrings_get(this_1, idx)) call BigString_substrings_set(this_1, idx, BigString_substrings_get(this_1, idx) + string_substring(sp, 0, off)) set idx = idx + 1 call BigString_substrings_set(this_1, idx, BigString_substrings_get(this_1, idx) + string_substring_1171(sp, off)) else call BigString_substrings_set(this_1, idx, BigString_substrings_get(this_1, idx) + sp) endif set BigString_length[this_1] = BigString_length[this_1] + string_length(sp) endfunction function dispatch_BigString_BigString_BigString_addString takes integer this_1, string sp returns nothing if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.addString") else call error("Called BigString.addString on invalid object.") endif endif call BigString_addString(this_1, sp) endfunction function Encoder_itochar takes integer this_1, integer i returns string return SubString(Encoder_charset[this_1], i, i + 1) endfunction function dispatch_Encoder_Encoder_Encoder_itochar takes integer this_1, integer i returns string local string Encoder_Encoder_itochar_result if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.itochar") else call error("Called Encoder.itochar on invalid object.") endif endif set Encoder_Encoder_itochar_result = Encoder_itochar(this_1, i) return Encoder_Encoder_itochar_result endfunction function onExecute_doSeq_Encoder_Encoder takes integer this_1, integer cb_1 returns boolean local boolean continue = true if w_cur[this_1] != 0 then call dispatch_BigString_BigString_BigString_addString(big[this_1], dispatch_Encoder_Encoder_Encoder_itochar(this_837[this_1], BigNum_l_leaf[w_cur[this_1]])) set w_cur[this_1] = BigNum_l_next[w_cur[this_1]] else set continue = false set PayloadCallback_customData[onFinish[this_1]] = big[this_1] call cyc_onExecute_save_doSeq_LZW(5, onFinish[this_1], 0) endif return continue endfunction function BigString_getString takes integer this_1, integer startpos, integer plength returns string local integer modpos local integer idx local integer offsetstart local integer offsetend if startpos + plength > dispatch_BigString_BigString_BigString_getLength(this_1) then call error("2Trying to get string out of bounds") endif if plength > BigString_BIG_SUBSTRING_LEN then call error("Trying to get oversized string") endif set modpos = startpos + BigString_startoffset[this_1] set idx = real_toInt(modpos * 1. / BigString_BIG_SUBSTRING_LEN) set offsetstart = ModuloInteger(modpos, BigString_BIG_SUBSTRING_LEN) set offsetend = offsetstart + plength if offsetend > BigString_BIG_SUBSTRING_LEN then return string_substring(BigString_substrings_get(this_1, idx), offsetstart, string_length(BigString_substrings_get(this_1, idx))) + string_substring(BigString_substrings_get(this_1, idx + 1), 0, offsetend - BigString_BIG_SUBSTRING_LEN) endif return string_substring(BigString_substrings_get(this_1, idx), offsetstart, offsetend) endfunction function dispatch_BigString_BigString_BigString_getString takes integer this_1, integer startpos, integer plength returns string local string BigString_BigString_getString_result if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.getString") else call error("Called BigString.getString on invalid object.") endif endif set BigString_BigString_getString_result = BigString_getString(this_1, startpos, plength) return BigString_BigString_getString_result endfunction function BigString_onDestroy takes integer this_1 returns nothing set BigString_length[this_1] = -1 endfunction function dealloc_BigString takes integer obj returns nothing if BigString_typeId[obj] == 0 then call error("Double free: object of type BigString") else set BigString_nextFree[BigString_firstFree] = obj set BigString_firstFree = BigString_firstFree + 1 set BigString_typeId[obj] = 0 endif endfunction function destroyBigString takes integer this_1 returns nothing call BigString_onDestroy(this_1) call dealloc_BigString(this_1) endfunction function dispatch_BigString_destroyBigString takes integer this_1 returns nothing if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.BigString") else call error("Called BigString.BigString on invalid object.") endif endif call destroyBigString(this_1) endfunction function Encoder_chartoi takes integer this_1, string c returns integer local integer i = 0 local string cs = Encoder_charset[this_1] local integer len = Encoder_base[this_1] loop exitwhen not (i < len and c != SubString(cs, i, i + 1)) set i = i + 1 endloop return i endfunction function dispatch_Encoder_Encoder_Encoder_chartoi takes integer this_1, string c returns integer local integer Encoder_Encoder_chartoi_result if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.chartoi") else call error("Called Encoder.chartoi on invalid object.") endif endif set Encoder_Encoder_chartoi_result = Encoder_chartoi(this_1, c) return Encoder_Encoder_chartoi_result endfunction function alloc_BigNum_l takes nothing returns integer local integer this_1 if BigNum_l_firstFree == 0 then if BigNum_l_maxIndex < JASS_MAX_ARRAY_SIZE then set BigNum_l_maxIndex = BigNum_l_maxIndex + 1 set this_1 = BigNum_l_maxIndex set BigNum_l_typeId[this_1] = 637 else call error("Out of memory: Could not create BigNum_l.") set this_1 = 0 endif else set BigNum_l_firstFree = BigNum_l_firstFree - 1 set this_1 = BigNum_l_nextFree[BigNum_l_firstFree] set BigNum_l_typeId[this_1] = 637 endif return this_1 endfunction function BigNum_l_init takes integer this_1 returns nothing set BigNum_l_leaf[this_1] = 0 set BigNum_l_next[this_1] = 0 endfunction function construct_BigNum_l takes integer this_1 returns nothing call BigNum_l_init(this_1) set BigNum_l_count = BigNum_l_count + 1 endfunction function new_BigNum_l takes nothing returns integer local integer this_1 = alloc_BigNum_l() call construct_BigNum_l(this_1) return this_1 endfunction function onExecute_doSeq_Encoder_Encoder_1083 takes integer this_1, integer cb_1 returns boolean local boolean continue = true set BigNum_l_leaf[w_cur_602[this_1]] = dispatch_Encoder_Encoder_Encoder_chartoi(this_838[this_1], dispatch_BigString_BigString_BigString_getString(bs[this_1], w_i[this_1], 1)) if w_i[this_1] < dispatch_BigString_BigString_BigString_getLength(bs[this_1]) - 1 then set BigNum_l_next[w_cur_602[this_1]] = new_BigNum_l() set w_cur_602[this_1] = BigNum_l_next[w_cur_602[this_1]] set w_i[this_1] = w_i[this_1] + 1 else set continue = false call dispatch_BigString_destroyBigString(bs[this_1]) call cyc_onExecute_save_doSeq_LZW(5, onFinishString[this_1], 0) endif return continue endfunction function alloc_BigSubString takes nothing returns integer local integer this_1 if BigSubString_firstFree == 0 then if BigSubString_maxIndex < JASS_MAX_ARRAY_SIZE then set BigSubString_maxIndex = BigSubString_maxIndex + 1 set this_1 = BigSubString_maxIndex set BigSubString_typeId[this_1] = 639 else call error("Out of memory: Could not create BigSubString.") set this_1 = 0 endif else set BigSubString_firstFree = BigSubString_firstFree - 1 set this_1 = BigSubString_nextFree[BigSubString_firstFree] set BigSubString_typeId[this_1] = 639 endif return this_1 endfunction function BigSubString_init takes integer this_1 returns nothing set BigSubString_parent[this_1] = 0 set BigSubString_next[this_1] = 0 set BigSubString_start[this_1] = 0 set BigSubString_length[this_1] = 0 set BigSubString_preinit[this_1] = null endfunction function construct_BigSubString2 takes integer this_1, integer parent, integer start, integer length returns nothing call BigSubString_init(this_1) set BigSubString_parent[this_1] = parent set BigSubString_start[this_1] = start set BigSubString_length[this_1] = length endfunction function new_BigSubString_1044 takes integer parent, integer start, integer length returns integer local integer this_1 = alloc_BigSubString() call construct_BigSubString2(this_1, parent, start, length) return this_1 endfunction function JsonParser_parseListSeq takes integer this_1 returns nothing local string temp local integer bss local integer bss_1 set JsonParser_currentToken[this_1] = dispatch_BigString_BigString_BigString_getString(JsonParser_bigInput[this_1], JsonParser_currentPosition[this_1], 1) set temp = JsonParser_currentToken[this_1] if temp == Delimiter_token[Json_JSON_OPEN_ARRAY] then set JsonParser_squareBracketLvl[this_1] = JsonParser_squareBracketLvl[this_1] + 1 if JsonParser_squareBracketLvl[this_1] == 1 then set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] + 1 endif elseif temp == Delimiter_token[Json_JSON_CLOSE_ARRAY] then set JsonParser_squareBracketLvl[this_1] = JsonParser_squareBracketLvl[this_1] - 1 if JsonParser_squareBracketLvl[this_1] == 0 then set bss = new_BigSubString_1044(JsonParser_bigInput[this_1], JsonParser_propStartPosition[this_1], JsonParser_currentPosition[this_1] - JsonParser_propStartPosition[this_1]) call dispatch_LinkedList_LinkedList_LinkedList_add_1(JsonParser_outputList[this_1], bss) set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] + 1 endif elseif temp == Delimiter_token[Json_JSON_SIGN_COMMA] then if JsonParser_squareBracketLvl[this_1] == 1 then set bss_1 = new_BigSubString_1044(JsonParser_bigInput[this_1], JsonParser_propStartPosition[this_1], JsonParser_currentPosition[this_1] - JsonParser_propStartPosition[this_1]) call dispatch_LinkedList_LinkedList_LinkedList_add_1(JsonParser_outputList[this_1], bss_1) set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] + 1 endif endif set JsonParser_currentPosition[this_1] = JsonParser_currentPosition[this_1] + 1 endfunction function dispatch_JsonParser_JsonParser_JsonParser_parseListSeq takes integer this_1 returns nothing if JsonParser_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling JsonParser.parseListSeq") else call error("Called JsonParser.parseListSeq on invalid object.") endif endif call JsonParser_parseListSeq(this_1) endfunction function onExecute_doSeq_JsonParser_JsonParser takes integer this_1, integer cb_1 returns boolean local boolean continue = true if JsonParser_currentPosition[this_851[this_1]] < dispatch_BigString_BigString_BigString_getLength(JsonParser_bigInput[this_851[this_1]]) then call dispatch_JsonParser_JsonParser_JsonParser_parseListSeq(this_851[this_1]) else set continue = false call Log_debug("parsed list") call cyc_onExecute_save_doSeq_LZW(5, finalCallback[this_1], 0) endif return continue endfunction function BigSubString_getSingleLength takes integer this_1 returns integer return BigSubString_length[this_1] endfunction function dispatch_BigSubString_BigString_BigSubString_getSingleLength takes integer this_1 returns integer local integer BigString_BigSubString_getSingleLength_result if BigSubString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigSubString.getSingleLength") else call error("Called BigSubString.getSingleLength on invalid object.") endif endif set BigString_BigSubString_getSingleLength_result = BigSubString_getSingleLength(this_1) return BigString_BigSubString_getSingleLength_result endfunction function BigSubString_getStart takes integer this_1 returns integer return BigSubString_start[this_1] endfunction function dispatch_BigSubString_BigString_BigSubString_getStart takes integer this_1 returns integer local integer BigString_BigSubString_getStart_result if BigSubString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigSubString.getStart") else call error("Called BigSubString.getStart on invalid object.") endif endif set BigString_BigSubString_getStart_result = BigSubString_getStart(this_1) return BigString_BigSubString_getStart_result endfunction function BigString_getSubStringData takes integer this_1, integer substring returns string local integer idx local integer offsetstart local integer offsetend if dispatch_BigSubString_BigString_BigSubString_getStart(substring) + dispatch_BigSubString_BigString_BigSubString_getSingleLength(substring) > BigString_length[this_1] then call error("string out of bounds: length: " + int_toString(BigString_length[this_1]) + " s.length: " + int_toString(dispatch_BigSubString_BigString_BigSubString_getSingleLength(substring)) + " s.start: " + int_toString(dispatch_BigSubString_BigString_BigSubString_getStart(substring))) endif if dispatch_BigSubString_BigString_BigSubString_getSingleLength(substring) > BigString_BIG_SUBSTRING_LEN then call error("substring is longer than maxsize") endif set idx = real_toInt(dispatch_BigSubString_BigString_BigSubString_getStart(substring) * 1. / BigString_BIG_SUBSTRING_LEN) set offsetstart = ModuloInteger(dispatch_BigSubString_BigString_BigSubString_getStart(substring), BigString_BIG_SUBSTRING_LEN) set offsetend = offsetstart + dispatch_BigSubString_BigString_BigSubString_getSingleLength(substring) if offsetend > BigString_BIG_SUBSTRING_LEN then return string_substring(BigString_substrings_get(this_1, idx), offsetstart, BigString_BIG_SUBSTRING_LEN) + string_substring(BigString_substrings_get(this_1, idx + 1), 0, offsetend - BigString_BIG_SUBSTRING_LEN) endif return string_substring(BigString_substrings_get(this_1, idx), offsetstart, offsetend) endfunction function dispatch_BigString_BigString_BigString_getSubStringData takes integer this_1, integer substring returns string local string BigString_BigString_getSubStringData_result if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.getSubStringData") else call error("Called BigString.getSubStringData on invalid object.") endif endif set BigString_BigString_getSubStringData_result = BigString_getSubStringData(this_1, substring) return BigString_BigString_getSubStringData_result endfunction function BigSubString_getSingle takes integer this_1 returns string if dispatch_BigSubString_BigString_BigSubString_getSingleLength(this_1) > BigString_BIG_SUBSTRING_LEN then call error("cannot use getSingle on oversized SubStrings. You need to iterate through the chunks") endif if BigSubString_parent[this_1] == 0 and BigSubString_preinit[this_1] == null then call error("cannot generate new cache without parent") endif if BigSubString_preinit[this_1] != null then return BigSubString_preinit[this_1] else return dispatch_BigString_BigString_BigString_getSubStringData(BigSubString_parent[this_1], this_1) endif endfunction function dispatch_BigSubString_BigString_BigSubString_getSingle takes integer this_1 returns string local string BigString_BigSubString_getSingle_result if BigSubString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigSubString.getSingle") else call error("Called BigSubString.getSingle on invalid object.") endif endif set BigString_BigSubString_getSingle_result = BigSubString_getSingle(this_1) return BigString_BigSubString_getSingle_result endfunction function Json_addProperty takes integer this_1, integer p returns nothing if Property_name[p] != 0 and BigSubString_length[Property_name[p]] >= 0 then call dispatch_LinkedList_LinkedList_LinkedList_add_1(Json_plist[this_1], p) set BigSubString_next[Property_name[p]] = 0 set BigSubString_next[Property_value[p]] = 0 call dispatch_HashMap_HashMap_HashMap_put(Json_properties[this_1], string_getHash(dispatch_BigSubString_BigString_BigSubString_getSingle(Property_name[p])), p) endif endfunction function dispatch_Json_Json_Json_addProperty takes integer this_1, integer p returns nothing if Json_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Json.addProperty") else call error("Called Json.addProperty on invalid object.") endif endif call Json_addProperty(this_1, p) endfunction function alloc_Property takes nothing returns integer local integer this_1 if Property_firstFree == 0 then if Property_maxIndex < JASS_MAX_ARRAY_SIZE then set Property_maxIndex = Property_maxIndex + 1 set this_1 = Property_maxIndex else call error("Out of memory: Could not create Property.") set this_1 = 0 endif else set Property_firstFree = Property_firstFree - 1 set this_1 = Property_nextFree[Property_firstFree] endif return this_1 endfunction function Property_init takes integer this_1 returns nothing endfunction function construct_Property takes integer this_1, integer name, integer value returns nothing call Property_init(this_1) set Property_name[this_1] = name set Property_value[this_1] = value endfunction function new_Property takes integer name, integer value returns integer local integer this_1 = alloc_Property() call construct_Property(this_1, name, value) return this_1 endfunction function JsonParser_onLetter takes integer this_1 returns nothing local integer temp = JsonParser_lastType[this_1] if temp == 0 then set JsonParser_propName[this_1] = new_BigSubString_1044(JsonParser_bigInput[this_1], JsonParser_currentPosition[this_1], 1) set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] + 1 elseif temp == 2 then set JsonParser_propVal[this_1] = new_BigSubString_1044(JsonParser_bigInput[this_1], JsonParser_propStartPosition[this_1], JsonParser_currentPosition[this_1] - JsonParser_propStartPosition[this_1]) call dispatch_Json_Json_Json_addProperty(JsonParser_output[this_1], new_Property(JsonParser_propName[this_1], JsonParser_propVal[this_1])) set JsonParser_propName[this_1] = new_BigSubString_1044(JsonParser_bigInput[this_1], JsonParser_currentPosition[this_1], 1) set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] + 1 elseif temp == 4 then set JsonParser_propName[this_1] = new_BigSubString_1044(JsonParser_bigInput[this_1], JsonParser_currentPosition[this_1], 1) set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] + 1 endif set JsonParser_lastType[this_1] = 1 endfunction function dispatch_JsonParser_JsonParser_JsonParser_onLetter takes integer this_1 returns nothing if JsonParser_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling JsonParser.onLetter") else call error("Called JsonParser.onLetter on invalid object.") endif endif call JsonParser_onLetter(this_1) endfunction function JsonParser_onNumber takes integer this_1 returns nothing local integer temp = JsonParser_lastType[this_1] if temp == 1 then set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] endif set JsonParser_lastType[this_1] = 2 endfunction function dispatch_JsonParser_JsonParser_JsonParser_onNumber takes integer this_1 returns nothing if JsonParser_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling JsonParser.onNumber") else call error("Called JsonParser.onNumber on invalid object.") endif endif call JsonParser_onNumber(this_1) endfunction function string_contains takes string this_1, string s returns boolean return string_indexOf(this_1, s) != -1 endfunction function JsonParser_parseSeq takes integer this_1 returns nothing local string temp set JsonParser_currentToken[this_1] = dispatch_BigString_BigString_BigString_getString(JsonParser_bigInput[this_1], JsonParser_currentPosition[this_1], 1) set temp = JsonParser_currentToken[this_1] if temp == Delimiter_token[Json_JSON_OPEN_ARRAY] then set JsonParser_squareBracketLvl[this_1] = JsonParser_squareBracketLvl[this_1] + 1 if JsonParser_squareBracketLvl[this_1] == 1 then set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] endif set JsonParser_lastType[this_1] = 3 elseif temp == Delimiter_token[Json_JSON_CLOSE_ARRAY] then set JsonParser_squareBracketLvl[this_1] = JsonParser_squareBracketLvl[this_1] - 1 if JsonParser_squareBracketLvl[this_1] == 0 then set JsonParser_propVal[this_1] = new_BigSubString_1044(JsonParser_bigInput[this_1], JsonParser_propStartPosition[this_1], JsonParser_currentPosition[this_1] - JsonParser_propStartPosition[this_1] + 1) call dispatch_Json_Json_Json_addProperty(JsonParser_output[this_1], new_Property(JsonParser_propName[this_1], JsonParser_propVal[this_1])) set JsonParser_propStartPosition[this_1] = JsonParser_currentPosition[this_1] + 1 endif set JsonParser_lastType[this_1] = 4 elseif JsonParser_squareBracketLvl[this_1] == 0 then if string_contains(JsonParser_lettermap, JsonParser_currentToken[this_1]) then call dispatch_JsonParser_JsonParser_JsonParser_onLetter(this_1) elseif string_contains(JsonParser_numbermap, JsonParser_currentToken[this_1]) then call dispatch_JsonParser_JsonParser_JsonParser_onNumber(this_1) endif endif set JsonParser_currentPosition[this_1] = JsonParser_currentPosition[this_1] + 1 endfunction function dispatch_JsonParser_JsonParser_JsonParser_parseSeq takes integer this_1 returns nothing if JsonParser_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling JsonParser.parseSeq") else call error("Called JsonParser.parseSeq on invalid object.") endif endif call JsonParser_parseSeq(this_1) endfunction function onExecute_doSeq_JsonParser_JsonParser_1085 takes integer this_1, integer cb_1 returns boolean local boolean continue = true if JsonParser_currentPosition[this_852[this_1]] < dispatch_BigString_BigString_BigString_getLength(JsonParser_bigInput[this_852[this_1]]) then call dispatch_JsonParser_JsonParser_JsonParser_parseSeq(this_852[this_1]) else set continue = false if JsonParser_propStartPosition[this_852[this_1]] < JsonParser_currentPosition[this_852[this_1]] then set JsonParser_propVal[this_852[this_1]] = new_BigSubString_1044(JsonParser_bigInput[this_852[this_1]], JsonParser_propStartPosition[this_852[this_1]], JsonParser_currentPosition[this_852[this_1]] - JsonParser_propStartPosition[this_852[this_1]]) call dispatch_Json_Json_Json_addProperty(JsonParser_output[this_852[this_1]], new_Property(JsonParser_propName[this_852[this_1]], JsonParser_propVal[this_852[this_1]])) endif call cyc_onExecute_save_doSeq_LZW(5, callback[this_1], 0) endif return continue endfunction function alloc_PayloadCallback_save_doSeq_LZW takes nothing returns integer local integer this_1 if PayloadCallback_firstFree == 0 then if PayloadCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set PayloadCallback_maxIndex = PayloadCallback_maxIndex + 1 set this_1 = PayloadCallback_maxIndex set PayloadCallback_typeId[this_1] = 824 else call error("Out of memory: Could not create PayloadCallback_save_doSeq_LZW.") set this_1 = 0 endif else set PayloadCallback_firstFree = PayloadCallback_firstFree - 1 set this_1 = PayloadCallback_nextFree[PayloadCallback_firstFree] set PayloadCallback_typeId[this_1] = 824 endif return this_1 endfunction function PayloadCallback_init takes integer this_1 returns nothing set PayloadCallback_customData[this_1] = 0 endfunction function construct_PayloadCallback takes integer this_1 returns nothing call PayloadCallback_init(this_1) endfunction function BigNum_addSmall takes integer this_1, integer pcarry returns nothing local integer cur = BigNum_list[this_1] local integer carry = pcarry local integer sum if cur == 0 then set cur = new_BigNum_l() set BigNum_list[this_1] = cur endif loop exitwhen not (carry != 0) set sum = BigNum_l_leaf[cur] + carry set carry = sum / BigNum_base[this_1] set sum = sum - carry * BigNum_base[this_1] set BigNum_l_leaf[cur] = sum if BigNum_l_next[cur] == 0 then set BigNum_l_next[cur] = new_BigNum_l() endif set cur = BigNum_l_next[cur] endloop endfunction function dispatch_BigNum_BigNum_BigNum_addSmall takes integer this_1, integer pcarry returns nothing if BigNum_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum.addSmall") else call error("Called BigNum.addSmall on invalid object.") endif endif call BigNum_addSmall(this_1, pcarry) endfunction function BigNum_mulSmall takes integer this_1, integer x returns nothing local integer cur = BigNum_list[this_1] local integer carry = 0 local integer product local integer remainder loop exitwhen not (cur != 0 or carry != 0) set product = x * BigNum_l_leaf[cur] + carry set carry = product / BigNum_base[this_1] set remainder = product - carry * BigNum_base[this_1] set BigNum_l_leaf[cur] = remainder if BigNum_l_next[cur] == 0 and carry != 0 then set BigNum_l_next[cur] = new_BigNum_l() endif set cur = BigNum_l_next[cur] endloop endfunction function dispatch_BigNum_BigNum_BigNum_mulSmall takes integer this_1, integer x returns nothing if BigNum_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum.mulSmall") else call error("Called BigNum.mulSmall on invalid object.") endif endif call BigNum_mulSmall(this_1, x) endfunction function log takes real py, real pbase returns real local real y = py local real base = pbase local real factor = 1.0 local real logy = 0.0 local real sign = 1.0 if y < 0. then return 0.0 endif if y < 1. then set y = 1.0 / y set sign = - 1.0 endif loop exitwhen not (y >= 1.0001) if y > base then set y = y / base set logy = logy + factor else set base = SquareRoot(base) set factor = factor / 2. endif endloop return sign * logy endfunction function Encoder_encode takes integer this_1, integer wval, integer max returns nothing set Encoder_digits[this_1] = Encoder_digits[this_1] + log(max + 1., Encoder_base[this_1] + 0.) call dispatch_BigNum_BigNum_BigNum_mulSmall(Encoder_bignum[this_1], max + 1) call dispatch_BigNum_BigNum_BigNum_addSmall(Encoder_bignum[this_1], wval) call Log_trace("encoded val: " + int_toString(wval) + " max: " + int_toString(max)) endfunction function dispatch_Encoder_Encoder_Encoder_encode takes integer this_1, integer wval, integer max returns nothing if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.encode") else call error("Called Encoder.encode on invalid object.") endif endif call Encoder_encode(this_1, wval, max) endfunction function alloc_CallbackSingle_nullTimer_Encoder_Encoder 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] = 667 else call error("Out of memory: Could not create CallbackSingle_nullTimer_Encoder_Encoder.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 667 endif return this_1 endfunction function alloc_ForForceCallback_execute_Encoder_Encoder 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] = 716 else call error("Out of memory: Could not create ForForceCallback_execute_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 716 endif return this_1 endfunction function alloc_ForForceCallback_execute_Encoder_Encoder_530 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] = 717 else call error("Out of memory: Could not create ForForceCallback_execute_Encoder_Encoder.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 717 endif return this_1 endfunction function Encoder_save takes integer this_1, integer bs_1, integer onFinish_1 returns nothing local integer clVar local integer clVar_1 local integer clVar_2 call Log_debug("save1") set clVar = alloc_ForForceCallback_execute_Encoder_Encoder() set this_839[clVar] = this_1 call execute(clVar) call Log_debug("save2") set Encoder_hash[this_1] = -1 set clVar_1 = alloc_ForForceCallback_execute_Encoder_Encoder_530() set this_840[clVar_1] = this_1 call execute(clVar_1) set clVar_2 = alloc_CallbackSingle_nullTimer_Encoder_Encoder() call construct_CallbackSingle(clVar_2) set this_841[clVar_2] = this_1 set bs_665[clVar_2] = bs_1 set onFinish_697[clVar_2] = onFinish_1 call nullTimer(clVar_2) endfunction function dispatch_Encoder_Encoder_Encoder_save takes integer this_1, integer bs_1, integer onFinish_1 returns nothing if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.save") else call error("Called Encoder.save on invalid object.") endif endif call Encoder_save(this_1, bs_1, onFinish_1) endfunction function dispatch_LLIterator_LinkedList_LLIterator_hasNext takes integer this_1 returns boolean local boolean LinkedList_LLIterator_hasNext_result if LLIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLIterator.hasNext") else call error("Called LLIterator.hasNext on invalid object.") endif endif set LinkedList_LLIterator_hasNext_result = LLIterator_hasNext(this_1) return LinkedList_LLIterator_hasNext_result endfunction function dispatch_LLIterator_LinkedList_LLIterator_next takes integer this_1 returns integer local integer LinkedList_LLIterator_next_result if LLIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLIterator.next") else call error("Called LLIterator.next on invalid object.") endif endif set LinkedList_LLIterator_next_result = LLIterator_next(this_1) return LinkedList_LLIterator_next_result endfunction function alloc_BigString takes nothing returns integer local integer this_1 if BigString_firstFree == 0 then if BigString_maxIndex < JASS_MAX_ARRAY_SIZE then set BigString_maxIndex = BigString_maxIndex + 1 set this_1 = BigString_maxIndex set BigString_typeId[this_1] = 638 else call error("Out of memory: Could not create BigString.") set this_1 = 0 endif else set BigString_firstFree = BigString_firstFree - 1 set this_1 = BigString_nextFree[BigString_firstFree] set BigString_typeId[this_1] = 638 endif return this_1 endfunction function BigString_init takes integer this_1 returns nothing set BigString_length[this_1] = 0 set BigString_startoffset[this_1] = 0 endfunction function BigString_reset takes integer this_1 returns nothing local integer i = 0 local integer temp = BigString_MAX_SUBSTRINGS - 1 loop exitwhen i > temp call BigString_substrings_set(this_1, i, "") set i = i + 1 endloop set BigString_length[this_1] = 0 set BigString_startoffset[this_1] = 0 endfunction function dispatch_BigString_BigString_BigString_reset takes integer this_1 returns nothing if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.reset") else call error("Called BigString.reset on invalid object.") endif endif call BigString_reset(this_1) endfunction function construct_BigString takes integer this_1 returns nothing call BigString_init(this_1) call dispatch_BigString_BigString_BigString_reset(this_1) endfunction function new_BigString takes nothing returns integer local integer this_1 = alloc_BigString() call construct_BigString(this_1) return this_1 endfunction function onExecute_doSeq_LZW takes integer this_1, integer cb_1 returns boolean local boolean continue = true local integer clVar local integer temp local integer temp_1 if dispatch_LLIterator_LinkedList_LLIterator_hasNext(itr[this_1]) then call dispatch_Encoder_Encoder_Encoder_encode(encoder[this_1], dispatch_LLIterator_LinkedList_LLIterator_next(itr[this_1]), dictSize[this_1]) else set continue = false call dispatch_Encoder_Encoder_Encoder_encode(encoder[this_1], dictSize[this_1], LZW_maxDictSize) call dispatch_LinkedList_destroyLinkedList(intList[this_1]) set temp = encoder[this_1] set temp_1 = new_BigString() set clVar = alloc_PayloadCallback_save_doSeq_LZW() call construct_PayloadCallback(clVar) set onFinish_700[clVar] = onFinish_699[this_1] set encoder_680[clVar] = encoder[this_1] call dispatch_Encoder_Encoder_Encoder_save(temp, temp_1, clVar) endif return continue endfunction function alloc_PayloadCallback_encodePositions_doSeq_LZW takes nothing returns integer local integer this_1 if PayloadCallback_firstFree == 0 then if PayloadCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set PayloadCallback_maxIndex = PayloadCallback_maxIndex + 1 set this_1 = PayloadCallback_maxIndex set PayloadCallback_typeId[this_1] = 821 else call error("Out of memory: Could not create PayloadCallback_encodePositions_doSeq_LZW.") set this_1 = 0 endif else set PayloadCallback_firstFree = PayloadCallback_firstFree - 1 set this_1 = PayloadCallback_nextFree[PayloadCallback_firstFree] set PayloadCallback_typeId[this_1] = 821 endif return this_1 endfunction function cyc_BigSubString_getCombinedLength takes integer funcChoice, integer this_1 returns nothing local integer BigString_BigSubString_getCombinedLength_result local integer temp if funcChoice == 0 then if BigSubString_next[this_1] != 0 and BigSubString_next[this_1] != this_1 then set temp = BigSubString_length[this_1] call cyc_BigSubString_getCombinedLength(1, BigSubString_next[this_1]) set tempReturn_integer = temp + tempReturn_integer return endif set tempReturn_integer = BigSubString_length[this_1] return elseif funcChoice == 1 then if BigSubString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigSubString.getCombinedLength") else call error("Called BigSubString.getCombinedLength on invalid object.") endif endif call cyc_BigSubString_getCombinedLength(0, this_1) set BigString_BigSubString_getCombinedLength_result = tempReturn_integer set tempReturn_integer = BigString_BigSubString_getCombinedLength_result return endif endfunction function cyc_BigSubString_getCombined takes integer funcChoice, integer this_1 returns nothing local string s local string BigString_BigSubString_getCombined_result local string temp if funcChoice == 0 then call cyc_BigSubString_getCombinedLength(1, this_1) if tempReturn_integer > BigString_BIG_SUBSTRING_LEN then call error("cannot use getCombined on oversized SubStrings. You need to iterate through the chunks") endif if BigSubString_parent[this_1] == 0 and BigSubString_preinit[this_1] == null then call error("cannot generate new cache without parent") endif set s = "" if BigSubString_preinit[this_1] != null then set s = s + BigSubString_preinit[this_1] else set s = s + dispatch_BigString_BigString_BigString_getSubStringData(BigSubString_parent[this_1], this_1) endif if BigSubString_next[this_1] != 0 then set temp = s call cyc_BigSubString_getCombined(1, BigSubString_next[this_1]) set s = temp + tempReturn_string endif set tempReturn_string = s return elseif funcChoice == 1 then if BigSubString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigSubString.getCombined") else call error("Called BigSubString.getCombined on invalid object.") endif endif call cyc_BigSubString_getCombined(0, this_1) set BigString_BigSubString_getCombined_result = tempReturn_string set tempReturn_string = BigString_BigSubString_getCombined_result return endif endfunction function BigString_charAt takes integer this_1, integer offset returns integer return new_BigSubString_1044(this_1, offset, 1) endfunction function dispatch_BigString_BigString_BigString_charAt takes integer this_1, integer offset returns integer local integer BigString_BigString_charAt_result if BigString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigString.charAt") else call error("Called BigString.charAt on invalid object.") endif endif set BigString_BigString_charAt_result = BigString_charAt(this_1, offset) return BigString_BigString_charAt_result endfunction function BigSubString_concat takes integer this_1, integer next returns integer local integer t if next == 0 then call error("null") endif set t = this_1 loop exitwhen not (BigSubString_next[t] != 0) set t = BigSubString_next[t] endloop set BigSubString_next[t] = next return this_1 endfunction function dispatch_BigSubString_BigString_BigSubString_concat takes integer this_1, integer next returns integer local integer BigString_BigSubString_concat_result if BigSubString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigSubString.concat") else call error("Called BigSubString.concat on invalid object.") endif endif set BigString_BigSubString_concat_result = BigSubString_concat(this_1, next) return BigString_BigSubString_concat_result endfunction function BigSubString_onDestroy takes integer this_1 returns nothing set BigSubString_length[this_1] = -1 endfunction function dealloc_BigSubString takes integer obj returns nothing if BigSubString_typeId[obj] == 0 then call error("Double free: object of type BigSubString") else set BigSubString_nextFree[BigSubString_firstFree] = obj set BigSubString_firstFree = BigSubString_firstFree + 1 set BigSubString_typeId[obj] = 0 endif endfunction function destroyBigSubString takes integer this_1 returns nothing call BigSubString_onDestroy(this_1) call dealloc_BigSubString(this_1) endfunction function dispatch_BigSubString_destroyBigSubString takes integer this_1 returns nothing if BigSubString_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigSubString.BigSubString") else call error("Called BigSubString.BigSubString on invalid object.") endif endif call destroyBigSubString(this_1) endfunction function alloc_SeqCallback_doSeq_LZW takes nothing returns integer local integer this_1 if SeqCallback_firstFree == 0 then if SeqCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set SeqCallback_maxIndex = SeqCallback_maxIndex + 1 set this_1 = SeqCallback_maxIndex set SeqCallback_typeId[this_1] = 843 else call error("Out of memory: Could not create SeqCallback_doSeq_LZW.") set this_1 = 0 endif else set SeqCallback_firstFree = SeqCallback_firstFree - 1 set this_1 = SeqCallback_nextFree[SeqCallback_firstFree] set SeqCallback_typeId[this_1] = 843 endif return this_1 endfunction function alloc_Encoder takes nothing returns integer local integer this_1 if Encoder_firstFree == 0 then if Encoder_maxIndex < JASS_MAX_ARRAY_SIZE then set Encoder_maxIndex = Encoder_maxIndex + 1 set this_1 = Encoder_maxIndex set Encoder_typeId[this_1] = 690 else call error("Out of memory: Could not create Encoder.") set this_1 = 0 endif else set Encoder_firstFree = Encoder_firstFree - 1 set this_1 = Encoder_nextFree[Encoder_firstFree] set Encoder_typeId[this_1] = 690 endif return this_1 endfunction function Encoder_init takes integer this_1 returns nothing set Encoder_digits[this_1] = 0. set Encoder_hash[this_1] = -1 set Encoder_inputhash[this_1] = -1 set Encoder_comparehash[this_1] = -1 endfunction function alloc_BigNum takes nothing returns integer local integer this_1 if BigNum_firstFree == 0 then if BigNum_maxIndex < JASS_MAX_ARRAY_SIZE then set BigNum_maxIndex = BigNum_maxIndex + 1 set this_1 = BigNum_maxIndex set BigNum_typeId[this_1] = 636 else call error("Out of memory: Could not create BigNum.") set this_1 = 0 endif else set BigNum_firstFree = BigNum_firstFree - 1 set this_1 = BigNum_nextFree[BigNum_firstFree] set BigNum_typeId[this_1] = 636 endif return this_1 endfunction function BigNum_init takes integer this_1 returns nothing set BigNum_list[this_1] = 0 endfunction function construct_BigNum takes integer this_1, integer base returns nothing call BigNum_init(this_1) set BigNum_base[this_1] = base endfunction function new_BigNum takes integer base returns integer local integer this_1 = alloc_BigNum() call construct_BigNum(this_1, base) return this_1 endfunction function construct_Encoder takes integer this_1, string charset returns nothing call Encoder_init(this_1) set Encoder_charset[this_1] = charset set Encoder_base[this_1] = string_length(charset) set Encoder_bignum[this_1] = new_BigNum(Encoder_base[this_1]) endfunction function new_Encoder takes string charset returns integer local integer this_1 = alloc_Encoder() call construct_Encoder(this_1, charset) return this_1 endfunction function printLog takes integer loglvl, string msg returns nothing call printLog_1121(Player_localPlayer, loglvl, msg) endfunction function encodePositions takes integer intList_1, integer dictSize_1, integer onFinish_1 returns nothing local string st local integer iterator local integer s local integer encoder_1 local integer itr_1 local integer clVar if dictSize_1 > LZW_maxDictSize then call error("dictionary size exceeds max size") endif if Printing_DEBUG_LEVEL == 0 then set st = "" set iterator = LinkedList_iterator(intList_1) loop exitwhen not LLIterator_hasNext(iterator) set s = LLIterator_next(iterator) set st = st + int_toString(s) + "," endloop call LLIterator_close(iterator) call printLog(0, "encoding positions: " + st) endif set encoder_1 = new_Encoder(LZW_ALLOWED_PLAYER_CHARS) set itr_1 = dispatch_LinkedList_LinkedList_LinkedList_staticItr(intList_1) set clVar = alloc_SeqCallback_doSeq_LZW() call construct_SeqCallback(clVar) set itr[clVar] = itr_1 set encoder[clVar] = encoder_1 set dictSize[clVar] = dictSize_1 set intList[clVar] = intList_1 set onFinish_699[clVar] = onFinish_1 call doSeq(clVar) endfunction function construct_BigSubString takes integer this_1, string preInit returns nothing call BigSubString_init(this_1) set BigSubString_preinit[this_1] = preInit set BigSubString_length[this_1] = string_length(BigSubString_preinit[this_1]) endfunction function new_BigSubString takes string preInit returns integer local integer this_1 = alloc_BigSubString() call construct_BigSubString(this_1, preInit) return this_1 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 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 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 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 putDict takes string s returns nothing call dispatch_HashMap_HashMap_HashMap_put(LZW_dictionary, stringToIndex(s), LZW_dictSize) call dispatch_Table_Table_Table_saveString(LZW_dictionary, LZW_dictSize, s) set LZW_dictSize = LZW_dictSize + 1 endfunction function string_charAt takes string this_1, integer index returns string return SubString(this_1, index, index + 1) endfunction function onExecute_doSeq_LZW_1087 takes integer this_1, integer cb_1 returns boolean local boolean continue = true local string sng local integer clVar local integer temp local integer temp_1 local integer temp_2 if inc[this_1] < dispatch_BigString_BigString_BigString_getLength(data[this_1]) - 1 then if A[this_1] != 0 then call dispatch_BigSubString_destroyBigSubString(A[this_1]) endif set A[this_1] = dispatch_BigString_BigString_BigString_charAt(data[this_1], inc[this_1]) set inc[this_1] = inc[this_1] + 1 if B[this_1] != 0 then call dispatch_BigSubString_destroyBigSubString(B[this_1]) endif set B[this_1] = dispatch_BigString_BigString_BigString_charAt(data[this_1], inc[this_1]) call dispatch_BigSubString_BigString_BigSubString_concat(A[this_1], B[this_1]) loop exitwhen not true set temp_2 = LZW_dictionary call cyc_BigSubString_getCombined(1, A[this_1]) if not dispatch_HashMap_HashMap_HashMap_has(temp_2, stringToIndex(tempReturn_string)) then exitwhen true endif set sng = dispatch_BigSubString_BigString_BigSubString_getSingle(A[this_1]) if A[this_1] != 0 then call dispatch_BigSubString_destroyBigSubString(A[this_1]) endif set A[this_1] = new_BigSubString(sng + dispatch_BigSubString_BigString_BigSubString_getSingle(B[this_1])) set inc[this_1] = inc[this_1] + 1 if inc[this_1] < dispatch_BigString_BigString_BigString_getLength(data[this_1]) then if B[this_1] != 0 then call dispatch_BigSubString_destroyBigSubString(B[this_1]) endif set B[this_1] = dispatch_BigString_BigString_BigString_charAt(data[this_1], inc[this_1]) call dispatch_BigSubString_BigString_BigSubString_concat(A[this_1], B[this_1]) else exitwhen true endif endloop call dispatch_LinkedList_LinkedList_LinkedList_add_1(intList_693[this_1], dispatch_HashMap_HashMap_HashMap_get(LZW_dictionary, stringToIndex(dispatch_BigSubString_BigString_BigSubString_getSingle(A[this_1])))) call cyc_BigSubString_getCombined(1, A[this_1]) call putDict(tempReturn_string) else call Log_debug("Compressed") set continue = false if B[this_1] != 0 and string_charAt(dispatch_BigSubString_BigString_BigSubString_getSingle(A[this_1]), dispatch_BigSubString_BigString_BigSubString_getSingleLength(A[this_1]) - 1) != dispatch_BigSubString_BigString_BigSubString_getSingle(B[this_1]) then call dispatch_LinkedList_LinkedList_LinkedList_add_1(intList_693[this_1], dispatch_HashMap_HashMap_HashMap_get(LZW_dictionary, stringToIndex(dispatch_BigSubString_BigString_BigSubString_getSingle(B[this_1])))) endif set temp = intList_693[this_1] set temp_1 = LZW_dictSize set clVar = alloc_PayloadCallback_encodePositions_doSeq_LZW() call construct_PayloadCallback(clVar) set onFinish_705[clVar] = onFinish_704[this_1] call encodePositions(temp, temp_1, clVar) endif return continue endfunction function LLIterator_lookahead takes integer this_1 returns integer local integer retVal = 0 if dispatch_LLIterator_LinkedList_LLIterator_hasNext(this_1) then set retVal = LLEntry_elem[LLEntry_next[LLIterator_current[this_1]]] endif return retVal endfunction function dispatch_LLIterator_LinkedList_LLIterator_lookahead takes integer this_1 returns integer local integer LinkedList_LLIterator_lookahead_result if LLIterator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLIterator.lookahead") else call error("Called LLIterator.lookahead on invalid object.") endif endif set LinkedList_LLIterator_lookahead_result = LLIterator_lookahead(this_1) return LinkedList_LLIterator_lookahead_result endfunction function onExecute_doSeq_decodePositions_LZW takes integer this_1, integer cb2 returns boolean local boolean continue = true local integer idx if dispatch_LLIterator_LinkedList_LLIterator_hasNext(itr_695[this_1]) then set idx = dispatch_LLIterator_LinkedList_LLIterator_next(itr_695[this_1]) set A_1[this_1] = dispatch_Table_Table_Table_loadString(LZW_dictionary, idx) if dispatch_LLIterator_LinkedList_LLIterator_hasNext(itr_695[this_1]) and dispatch_LLIterator_LinkedList_LLIterator_lookahead(itr_695[this_1]) < LZW_dictSize then set B_7[this_1] = dispatch_Table_Table_Table_loadString(LZW_dictionary, dispatch_LLIterator_LinkedList_LLIterator_lookahead(itr_695[this_1])) set B_7[this_1] = string_charAt(B_7[this_1], 0) elseif not dispatch_LLIterator_LinkedList_LLIterator_hasNext(itr_695[this_1]) then set B_7[this_1] = null else set B_7[this_1] = string_charAt(A_1[this_1], 0) endif if B_7[this_1] != null and string_length(B_7[this_1]) > 0 then call putDict(A_1[this_1] + B_7[this_1]) endif call dispatch_BigString_BigString_BigString_addString(output_711[this_1], A_1[this_1]) else set continue = false call Log_debug("decompressed") call dispatch_BigString_BigString_BigString_debugPrint(output_711[this_1]) set PayloadCallback_customData[onFinish_707[this_1]] = output_711[this_1] call cyc_onExecute_save_doSeq_LZW(5, onFinish_707[this_1], 0) endif return continue endfunction function BigNum_isZero takes integer this_1 returns boolean local integer cur = BigNum_list[this_1] loop exitwhen not (cur != 0) if BigNum_l_leaf[cur] != 0 then return false endif set cur = BigNum_l_next[cur] endloop return true endfunction function dispatch_BigNum_BigNum_BigNum_isZero takes integer this_1 returns boolean local boolean BigNum_BigNum_isZero_result if BigNum_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum.isZero") else call error("Called BigNum.isZero on invalid object.") endif endif set BigNum_BigNum_isZero_result = BigNum_isZero(this_1) return BigNum_BigNum_isZero_result endfunction function LinkedList_addtoStart takes integer this_1, integer elem returns nothing local integer entry = new_LLEntry(elem, LinkedList_dummy[this_1], LLEntry_next[LinkedList_dummy[this_1]]) set LLEntry_prev[LLEntry_next[LinkedList_dummy[this_1]]] = entry set LLEntry_next[LinkedList_dummy[this_1]] = entry set LinkedList_size[this_1] = LinkedList_size[this_1] + 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_addtoStart 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.addtoStart") else call error("Called LinkedList.addtoStart on invalid object.") endif endif call LinkedList_addtoStart(this_1, elem) endfunction function onExecute_doSeq_nullTimer_load_LZW takes integer this_1, integer cb1 returns boolean local boolean continue = true local integer dec local string st local integer iterator local integer s if not dispatch_BigNum_BigNum_BigNum_isZero(Encoder_bignum[encoder_683[this_1]]) then set dec = dispatch_Encoder_Encoder_Encoder_decode(encoder_683[this_1], dictSize_677[this_1]) call dispatch_LinkedList_LinkedList_LinkedList_addtoStart(positions[this_1], dec) else set continue = false if Printing_DEBUG_LEVEL == 0 then set st = "" set iterator = LinkedList_iterator(positions[this_1]) loop exitwhen not LLIterator_hasNext(iterator) set s = LLIterator_next(iterator) set st = st + int_toString(s) + "," endloop call LLIterator_close(iterator) call printLog(0, "decoded positions: " + st) endif set PayloadCallback_customData[onFinish_703[this_1]] = positions[this_1] call cyc_onExecute_save_doSeq_LZW(5, onFinish_703[this_1], 0) endif return continue endfunction function dispatch_SeqCallback_SeqWorker_SeqCallback_onExecute takes integer this_1, integer cb_1 returns boolean local boolean SeqWorker_SeqCallback_onExecute_result if SeqCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SeqCallback.onExecute") else call error("Called SeqCallback.onExecute on invalid object.") endif endif if SeqCallback_typeId[this_1] <= 842 then if SeqCallback_typeId[this_1] <= 840 then if SeqCallback_typeId[this_1] <= 839 then set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_Encoder_Encoder(this_1, cb_1) else set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_Encoder_Encoder_1083(this_1, cb_1) endif elseif SeqCallback_typeId[this_1] <= 841 then set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_JsonParser_JsonParser(this_1, cb_1) else set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_JsonParser_JsonParser_1085(this_1, cb_1) endif elseif SeqCallback_typeId[this_1] <= 844 then if SeqCallback_typeId[this_1] <= 843 then set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_LZW(this_1, cb_1) else set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_LZW_1087(this_1, cb_1) endif elseif SeqCallback_typeId[this_1] <= 845 then set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_decodePositions_LZW(this_1, cb_1) else set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_nullTimer_load_LZW(this_1, cb_1) endif return SeqWorker_SeqCallback_onExecute_result endfunction function SeqCallback_doStep takes integer this_1 returns boolean if not SeqCallback_done[this_1] then return dispatch_SeqCallback_SeqWorker_SeqCallback_onExecute(this_1, this_1) endif return false endfunction function dispatch_SeqCallback_SeqWorker_SeqCallback_doStep takes integer this_1 returns boolean local boolean SeqWorker_SeqCallback_doStep_result if SeqCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SeqCallback.doStep") else call error("Called SeqCallback.doStep on invalid object.") endif endif set SeqWorker_SeqCallback_doStep_result = SeqCallback_doStep(this_1) return SeqWorker_SeqCallback_doStep_result endfunction function SeqCallback_onDestroy takes integer this_1 returns nothing if SeqCallback_ref[this_1] != null then call timer_release(SeqCallback_ref[this_1]) set SeqCallback_ref[this_1] = null endif endfunction function dealloc_SeqCallback takes integer obj returns nothing if SeqCallback_typeId[obj] == 0 then call error("Double free: object of type SeqCallback") else set SeqCallback_nextFree[SeqCallback_firstFree] = obj set SeqCallback_firstFree = SeqCallback_firstFree + 1 set SeqCallback_typeId[obj] = 0 endif endfunction function destroySeqCallback takes integer this_1 returns nothing call SeqCallback_onDestroy(this_1) call dealloc_SeqCallback(this_1) endfunction function dispatch_SeqCallback_destroySeqCallback takes integer this_1 returns nothing if SeqCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SeqCallback.SeqCallback") else call error("Called SeqCallback.SeqCallback on invalid object.") endif endif call destroySeqCallback(this_1) endfunction function SeqCallback_terminate takes integer this_1 returns nothing if ( not SeqCallback_done[this_1]) or SeqCallback_ref[this_1] != null then set SeqCallback_done[this_1] = true call dispatch_SeqCallback_destroySeqCallback(this_1) endif endfunction function dispatch_SeqCallback_SeqWorker_SeqCallback_terminate takes integer this_1 returns nothing if SeqCallback_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SeqCallback.terminate") else call error("Called SeqCallback.terminate on invalid object.") endif endif call SeqCallback_terminate(this_1) endfunction function onSeq takes nothing returns nothing local timer time = GetExpiredTimer() local integer rcb = timer_getData(time) if ( not SeqCallback_done[rcb]) and SeqCallback_ref[rcb] != null then if dispatch_SeqCallback_SeqWorker_SeqCallback_doStep(rcb) then call timer_start(time, 0.001, ref_function_code__start_SeqWorker_737) else call dispatch_SeqCallback_SeqWorker_SeqCallback_terminate(rcb) endif endif endfunction function code__start_SeqWorker takes nothing returns nothing call onSeq() endfunction function code__start_SeqWorker_607 takes nothing returns nothing call onSeq() endfunction function cyc_BigNum_l_clean takes integer funcChoice, integer this_1 returns nothing local boolean BigNum_BigNum_l_clean_result local boolean andLeft if funcChoice == 0 then if BigNum_l_next[this_1] == 0 and BigNum_l_leaf[this_1] == 0 then set tempReturn_boolean = true return else if BigNum_l_next[this_1] != 0 then call cyc_BigNum_l_clean(1, BigNum_l_next[this_1]) set andLeft = tempReturn_boolean else set andLeft = false endif if andLeft then call dispatch_BigNum_l_destroyBigNum_l(BigNum_l_next[this_1]) set BigNum_l_next[this_1] = 0 set tempReturn_boolean = BigNum_l_leaf[this_1] == 0 return else set tempReturn_boolean = false return endif endif elseif funcChoice == 1 then if BigNum_l_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum_l.clean") else call error("Called BigNum_l.clean on invalid object.") endif endif call cyc_BigNum_l_clean(0, this_1) set BigNum_BigNum_l_clean_result = tempReturn_boolean set tempReturn_boolean = BigNum_BigNum_l_clean_result return endif endfunction function BigNum_clean takes integer this_1 returns nothing call cyc_BigNum_l_clean(1, BigNum_list[this_1]) endfunction function dispatch_BigNum_BigNum_BigNum_clean takes integer this_1 returns nothing if BigNum_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BigNum.clean") else call error("Called BigNum.clean on invalid object.") endif endif call BigNum_clean(this_1) endfunction function Encoder_clean takes integer this_1 returns nothing call dispatch_BigNum_BigNum_BigNum_clean(Encoder_bignum[this_1]) endfunction function dispatch_Encoder_Encoder_Encoder_clean takes integer this_1 returns nothing if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.clean") else call error("Called Encoder.clean on invalid object.") endif endif call Encoder_clean(this_1) endfunction function run_execute_Encoder_Encoder takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_clean(this_839[this_1]) endfunction function Encoder_hash_1 takes integer this_1 returns integer local integer hash local integer x local integer cur call Log_debug("hash") set hash = 0 set cur = BigNum_list[Encoder_bignum[this_1]] loop exitwhen not (cur != 0) set x = BigNum_l_leaf[cur] set hash = ModuloInteger(hash + 79 * hash / (x + 1) + 293 * x / (1 + hash - hash / Encoder_base[this_1] * Encoder_base[this_1]) + 479, Encoder_maxHash) set cur = BigNum_l_next[cur] endloop call Log_debug("hashed") return hash endfunction function dispatch_Encoder_Encoder_Encoder_hash takes integer this_1 returns integer local integer Encoder_Encoder_hash_result if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.hash") else call error("Called Encoder.hash on invalid object.") endif endif set Encoder_Encoder_hash_result = Encoder_hash_1(this_1) return Encoder_Encoder_hash_result endfunction function run_execute_Encoder_Encoder_1146 takes integer this_1 returns nothing set Encoder_hash[this_840[this_1]] = dispatch_Encoder_Encoder_Encoder_hash(this_840[this_1]) 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] = 718 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] = 718 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 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 realToIndex takes real r returns integer return real_toInt(r * TypeCasting_R2I_PRECISION) endfunction function tile takes integer x, integer y returns integer if x < 0 or x >= TerrainUtils_TILES_X or y < 0 or y >= TerrainUtils_TILES_Y then set tile_return_id = -1 return tile_return_id endif set tile_return_id = y * TerrainUtils_TILES_X + x return tile_return_id endfunction function tile_getX takes integer this_id returns real return ModuloInteger(this_id, TerrainUtils_TILES_X) * 128. + MapBounds_boundMin_x endfunction function tile_getY takes integer this_id returns real return this_id / TerrainUtils_TILES_X * 128. + MapBounds_boundMin_y endfunction function tile_toVec2 takes integer this_id returns real set tile_toVec2_return_x = tile_getX(this_id) set tile_toVec2_return_y = tile_getY(this_id) return tile_toVec2_return_x endfunction function vec2_getTerrainZ takes real this_x, real this_y returns real call MoveLocation(Vectors_tempLoc, this_x, this_y) return GetLocationZ(Vectors_tempLoc) endfunction function run_execute_Heightmap takes integer this_1 returns nothing local integer y local integer temp local integer tile_id local integer tuple_temp set Reference_val[xRef[this_1]] = Reference_val[xRef[this_1]] + 1 set y = 0 set temp = TerrainUtils_TILES_Y loop exitwhen y > temp set tuple_temp = tile(Reference_val[xRef[this_1]], y) set tile_id = tuple_temp call dispatch_HashMap_HashMap_HashMap_put(zMap[this_1], tile_id, realToIndex(vec2_getTerrainZ(tile_toVec2(tile_id), tile_toVec2_return_y))) set y = y + 1 endloop endfunction function realFromIndex takes integer index returns real return index / TypeCasting_R2I_PRECISION endfunction function run_execute_Heightmap_1150 takes integer this_1 returns nothing local integer x local integer y local integer temp local integer temp_tuple_id local integer temp_tuple_id_1 local integer temp_tuple_id_2 local integer temp_tuple_id_3 local integer temp_1 local integer temp_2 local integer temp_3 local integer temp_4 local integer temp_5 local integer temp_6 local integer temp_7 local real temp_1_1 local real temp_2_1 local real temp_8 local real temp_9 local real temp_10 local real tuple_temp local real 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 real tuple_temp_9 local real tuple_temp_10 local real tuple_temp_11 local real tuple_temp_12 local real tuple_temp_13 local real tuple_temp_14 set Reference_val[xRef_881[this_1]] = Reference_val[xRef_881[this_1]] + 1 set x = Reference_val[xRef_881[this_1]] set y = 0 set temp = TerrainUtils_TILES_Y loop exitwhen y > temp set temp_5 = x + TerrainUtils_TILES_X * y set temp_6 = x set temp_7 = y set tuple_temp = MapBounds_boundMin_x + x * 128 set tuple_temp_1 = MapBounds_boundMin_y + y * 128 set temp_1_1 = tuple_temp set temp_2_1 = tuple_temp_1 set temp_1 = zMap_884[this_1] set tuple_temp_2 = tile(x, y) set temp_tuple_id = tuple_temp_2 set temp_8 = realFromIndex(dispatch_HashMap_HashMap_HashMap_get(temp_1, temp_tuple_id)) set temp_2 = zMap_884[this_1] set tuple_temp_3 = tile(x + 1, y) set temp_tuple_id_1 = tuple_temp_3 set temp_9 = realFromIndex(dispatch_HashMap_HashMap_HashMap_get(temp_2, temp_tuple_id_1)) set temp_3 = zMap_884[this_1] set tuple_temp_4 = tile(x, y + 1) set temp_tuple_id_2 = tuple_temp_4 set temp_10 = realFromIndex(dispatch_HashMap_HashMap_HashMap_get(temp_3, temp_tuple_id_2)) set temp_4 = zMap_884[this_1] set tuple_temp_5 = tile(x + 1, y + 1) set temp_tuple_id_3 = tuple_temp_5 set tuple_temp_6 = temp_5 set tuple_temp_7 = temp_6 set tuple_temp_8 = temp_7 set tuple_temp_9 = temp_1_1 set tuple_temp_10 = temp_2_1 set tuple_temp_11 = temp_8 set tuple_temp_12 = temp_9 set tuple_temp_13 = temp_10 set tuple_temp_14 = realFromIndex(dispatch_HashMap_HashMap_HashMap_get(temp_4, temp_tuple_id_3)) set Heightmap_quads_id[x + TerrainUtils_TILES_X * y] = tuple_temp_6 set Heightmap_quads_x[x + TerrainUtils_TILES_X * y] = tuple_temp_7 set Heightmap_quads_y[x + TerrainUtils_TILES_X * y] = tuple_temp_8 set Heightmap_quads_botLeft_x[x + TerrainUtils_TILES_X * y] = tuple_temp_9 set Heightmap_quads_botLeft_y[x + TerrainUtils_TILES_X * y] = tuple_temp_10 set Heightmap_quads_z1[x + TerrainUtils_TILES_X * y] = tuple_temp_11 set Heightmap_quads_z2[x + TerrainUtils_TILES_X * y] = tuple_temp_12 set Heightmap_quads_z3[x + TerrainUtils_TILES_X * y] = tuple_temp_13 set Heightmap_quads_z4[x + TerrainUtils_TILES_X * y] = tuple_temp_14 set y = y + 1 endloop endfunction function emptyBitset takes nothing returns integer set emptyBitset_return_val = 0 return emptyBitset_return_val endfunction function run_execute_Pathingmap takes integer this_1 returns nothing local integer x local integer y local integer temp local integer path_id local integer path_x1_val local integer path_x2_val local integer path_x3_val local integer path_x4_val local integer tuple_temp local integer tuple_temp_1 local integer tuple_temp_2 local integer tuple_temp_3 local integer tuple_temp_4 set Reference_val[xRef_882[this_1]] = Reference_val[xRef_882[this_1]] + 1 set x = Reference_val[xRef_882[this_1]] set y = 0 set temp = TerrainUtils_TILES_Y loop exitwhen y > temp set tuple_temp = x + TerrainUtils_TILES_X * y set tuple_temp_1 = emptyBitset() set tuple_temp_2 = emptyBitset() set tuple_temp_3 = emptyBitset() set tuple_temp_4 = emptyBitset() set path_id = tuple_temp set path_x1_val = tuple_temp_1 set path_x2_val = tuple_temp_2 set path_x3_val = tuple_temp_3 set path_x4_val = tuple_temp_4 set y = y + 1 endloop endfunction function run_execute_fromString_Encoder_Encoder takes integer this_1 returns nothing set Encoder_inputhash[this_847[this_1]] = dispatch_Encoder_Encoder_Encoder_decode(this_847[this_1], Encoder_maxHash) endfunction function run_execute_fromString_Encoder_Encoder_1153 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_clean(this_848[this_1]) endfunction function run_execute_fromString_Encoder_Encoder_1154 takes integer this_1 returns nothing set Encoder_comparehash[this_849[this_1]] = dispatch_Encoder_Encoder_Encoder_hash(this_849[this_1]) endfunction function run_execute_nullTimer_Encoder_Encoder takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_encode(this_842[this_1], Encoder_hash[this_842[this_1]], Encoder_maxHash) endfunction function run_execute_nullTimer_Encoder_Encoder_1156 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_clean(this_843[this_1]) endfunction function Encoder_length takes integer this_1 returns real return Encoder_digits[this_1] endfunction function dispatch_Encoder_Encoder_Encoder_length takes integer this_1 returns real local real Encoder_Encoder_length_result if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.length") else call error("Called Encoder.length on invalid object.") endif endif set Encoder_Encoder_length_result = Encoder_length(this_1) return Encoder_Encoder_length_result endfunction function Encoder_pad takes integer this_1 returns nothing local integer cur = BigNum_list[Encoder_bignum[this_1]] local integer prev = 0 local integer maxlen = R2I(1.0 + dispatch_Encoder_Encoder_Encoder_length(this_1)) loop exitwhen not (cur != 0) set prev = cur set cur = BigNum_l_next[cur] set maxlen = maxlen - 1 endloop loop exitwhen not (maxlen > 0) set BigNum_l_next[prev] = new_BigNum_l() set prev = BigNum_l_next[prev] set maxlen = maxlen - 1 endloop endfunction function dispatch_Encoder_Encoder_Encoder_pad takes integer this_1 returns nothing if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.pad") else call error("Called Encoder.pad on invalid object.") endif endif call Encoder_pad(this_1) endfunction function run_execute_nullTimer_Encoder_Encoder_1157 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_pad(this_844[this_1]) endfunction function alloc_SeqCallback_doSeq_Encoder_Encoder takes nothing returns integer local integer this_1 if SeqCallback_firstFree == 0 then if SeqCallback_maxIndex < JASS_MAX_ARRAY_SIZE then set SeqCallback_maxIndex = SeqCallback_maxIndex + 1 set this_1 = SeqCallback_maxIndex set SeqCallback_typeId[this_1] = 839 else call error("Out of memory: Could not create SeqCallback_doSeq_Encoder_Encoder.") set this_1 = 0 endif else set SeqCallback_firstFree = SeqCallback_firstFree - 1 set this_1 = SeqCallback_nextFree[SeqCallback_firstFree] set SeqCallback_typeId[this_1] = 839 endif return this_1 endfunction function Encoder_toString takes integer this_1, integer big_1, integer onFinish_1 returns nothing local integer w_cur_1 local integer clVar call Log_debug("toString digits: " + real_toString(Encoder_digits[this_1])) set w_cur_1 = BigNum_list[Encoder_bignum[this_1]] set clVar = alloc_SeqCallback_doSeq_Encoder_Encoder() call construct_SeqCallback(clVar) set w_cur[clVar] = w_cur_1 set big[clVar] = big_1 set this_837[clVar] = this_1 set onFinish[clVar] = onFinish_1 call doSeq(clVar) endfunction function dispatch_Encoder_Encoder_Encoder_toString takes integer this_1, integer big_1, integer onFinish_1 returns nothing if Encoder_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Encoder.toString") else call error("Called Encoder.toString on invalid object.") endif endif call Encoder_toString(this_1, big_1, onFinish_1) endfunction function run_execute_nullTimer_Encoder_Encoder_1158 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_toString(this_845[this_1], bs_666[this_1], onFinish_698[this_1]) 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] <= 722 then if ForForceCallback_typeId[this_1] <= 719 then if ForForceCallback_typeId[this_1] <= 717 then if ForForceCallback_typeId[this_1] <= 716 then call run_execute_Encoder_Encoder(this_1) else call run_execute_Encoder_Encoder_1146(this_1) endif elseif ForForceCallback_typeId[this_1] <= 718 then call run_execute_Execute(this_1) else call run_execute_GroupUtils(this_1) endif elseif ForForceCallback_typeId[this_1] <= 721 then if ForForceCallback_typeId[this_1] <= 720 then call run_execute_Heightmap(this_1) else call run_execute_Heightmap_1150(this_1) endif else call run_execute_Pathingmap(this_1) endif elseif ForForceCallback_typeId[this_1] <= 726 then if ForForceCallback_typeId[this_1] <= 724 then if ForForceCallback_typeId[this_1] <= 723 then call run_execute_fromString_Encoder_Encoder(this_1) else call run_execute_fromString_Encoder_Encoder_1153(this_1) endif elseif ForForceCallback_typeId[this_1] <= 725 then call run_execute_fromString_Encoder_Encoder_1154(this_1) else call run_execute_nullTimer_Encoder_Encoder(this_1) endif elseif ForForceCallback_typeId[this_1] <= 728 then if ForForceCallback_typeId[this_1] <= 727 then call run_execute_nullTimer_Encoder_Encoder_1156(this_1) else call run_execute_nullTimer_Encoder_Encoder_1157(this_1) endif else call run_execute_nullTimer_Encoder_Encoder_1158(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_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 set BigNum_l_count = 0 return true endfunction function init_BigString takes nothing returns boolean set BigString_BIG_SUBSTRING_LEN = 450 set BigString_MAX_SUBSTRINGS = 25 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 DamageEvent_addListener_78 takes integer priority, integer listener returns integer if DamageEvent_firstListeners[priority] != 0 then set DamageListener_next[listener] = DamageEvent_firstListeners[priority] endif set DamageEvent_firstListeners[priority] = listener if DamageEvent_maxPriority < priority then set DamageEvent_maxPriority = priority endif return listener endfunction function DamageEvent_addListener takes integer listener returns integer return DamageEvent_addListener_78(DamageEvent_maxPriority, listener) endfunction function alloc_DamageListener_addListener_Buff takes nothing returns integer local integer this_1 if DamageListener_firstFree == 0 then if DamageListener_maxIndex < JASS_MAX_ARRAY_SIZE then set DamageListener_maxIndex = DamageListener_maxIndex + 1 set this_1 = DamageListener_maxIndex set DamageListener_typeId[this_1] = 686 else call error("Out of memory: Could not create DamageListener_addListener_Buff.") set this_1 = 0 endif else set DamageListener_firstFree = DamageListener_firstFree - 1 set this_1 = DamageListener_nextFree[DamageListener_firstFree] set DamageListener_typeId[this_1] = 686 endif return this_1 endfunction function alloc_EventListener_add_Buff 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] = 694 else call error("Out of memory: Could not create EventListener_add_Buff.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 694 endif return this_1 endfunction function alloc_EventListener_add_Buff_512 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] = 695 else call error("Out of memory: Could not create EventListener_add_Buff.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 695 endif return this_1 endfunction function DamageListener_init takes integer this_1 returns nothing set DamageListener_next[this_1] = 0 endfunction function construct_DamageListener takes integer this_1 returns nothing call DamageListener_init(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_Buff takes nothing returns boolean local integer clVar local integer clVar_1 local integer clVar_2 local playerunitevent temp local playerunitevent temp_1 set Buff_LinkedListModule_first = 0 set Buff_LinkedListModule_last = 0 set Buff_LinkedListModule_size = 0 call new_Iterator(false) call new_BackIterator(false) set clVar = alloc_DamageListener_addListener_Buff() call construct_DamageListener(clVar) call DamageEvent_addListener(clVar) set temp = EVENT_PLAYER_UNIT_UPGRADE_FINISH set clVar_1 = alloc_EventListener_add_Buff() call construct_EventListener(clVar_1) call EventListener_add(temp, clVar_1) set temp_1 = EVENT_PLAYER_UNIT_DEATH set clVar_2 = alloc_EventListener_add_Buff_512() call construct_EventListener(clVar_2) call EventListener_add(temp_1, clVar_2) 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 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] = 666 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] = 666 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] = 874 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] = 874 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 onUnitDeindex takes code func returns nothing call trigger_addCondition(UnitIndexer_onDeindexTrigger, Condition(func)) endfunction function onUnitIndex takes code func returns nothing call trigger_addCondition(UnitIndexer_onIndexTrigger, Condition(func)) endfunction function init_ClosureEvents takes nothing returns boolean local integer clVar set ClosureEvents_EVENT_PLAYER_CHAT_FILTER = ConvertPlayerEvent(96) set EventListener_castMap = new_HashMap() set EventListener_useMouseEvents = false set ClosureEvents_unitTrig = CreateTrigger() set ClosureEvents_leaveTrig = CreateTrigger() set ClosureEvents_keyTrig = CreateTrigger() set ClosureEvents_eventTypeCounter = 0 call onUnitIndex(ref_function_code__onUnitIndex_ClosureEvents) call onUnitDeindex(ref_function_code__onUnitDeindex_ClosureEvents) set clVar = alloc_CallbackSingle_nullTimer_ClosureEvents() call construct_CallbackSingle(clVar) call nullTimer(clVar) return true endfunction function init_ClosureForGroups takes nothing returns boolean local real tuple_temp local real tuple_temp_1 call CreateGroup() set ClosureForGroups_tempCallbacksCount = 0 set ClosureForGroups_maxCount = Integer_INT_MAX set ClosureForGroups_iterCount = 0 call Filter(ref_function_code__Filter_ClosureForGroups) call Rect(0., 0., 0., 0.) set tuple_temp = Vectors_ZERO2_x set tuple_temp_1 = Vectors_ZERO2_y return true endfunction function init_ClosureTimers takes nothing returns boolean set ClosureTimers_x = 200 return true endfunction function alloc_CollisionWorld takes nothing returns integer local integer this_1 if CollisionWorld_firstFree == 0 then if CollisionWorld_maxIndex < JASS_MAX_ARRAY_SIZE then set CollisionWorld_maxIndex = CollisionWorld_maxIndex + 1 set this_1 = CollisionWorld_maxIndex else call error("Out of memory: Could not create CollisionWorld.") set this_1 = 0 endif else set CollisionWorld_firstFree = CollisionWorld_firstFree - 1 set this_1 = CollisionWorld_nextFree[CollisionWorld_firstFree] endif return this_1 endfunction function CollisionWorld_init takes integer this_1 returns nothing call new_LinkedList() call new_LinkedList() 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 construct_CollisionWorld takes integer this_1, rect re returns nothing call CollisionWorld_init(this_1) call rect_getMinX(re) call rect_getMinY(re) call rect_getMaxX(re) call rect_getMaxY(re) endfunction function new_CollisionWorld takes rect re returns integer local integer this_1 = alloc_CollisionWorld() call construct_CollisionWorld(this_1, re) return this_1 endfunction function alloc_SphereShape takes nothing returns integer local integer this_1 if CollisionShape_firstFree == 0 then if CollisionShape_maxIndex < JASS_MAX_ARRAY_SIZE then set CollisionShape_maxIndex = CollisionShape_maxIndex + 1 set this_1 = CollisionShape_maxIndex else call error("Out of memory: Could not create SphereShape.") set this_1 = 0 endif else set CollisionShape_firstFree = CollisionShape_firstFree - 1 set this_1 = CollisionShape_nextFree[CollisionShape_firstFree] endif return this_1 endfunction function SphereShape_init takes integer this_1 returns nothing endfunction function construct_SphereShape takes integer this_1 returns nothing call SphereShape_init(this_1) endfunction function new_SphereShape takes nothing returns integer local integer this_1 = alloc_SphereShape() call construct_SphereShape(this_1) return this_1 endfunction function init_Collision takes nothing returns boolean call new_CollisionWorld(MapBounds_playableMapRect) call new_SphereShape() return true 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] = 873 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] = 873 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 local integer tuple_temp_12 local integer tuple_temp_13 local integer tuple_temp_14 local integer tuple_temp_15 local integer tuple_temp_16 local integer tuple_temp_17 local integer tuple_temp_18 local integer tuple_temp_19 local integer tuple_temp_20 local integer tuple_temp_21 local integer tuple_temp_22 local integer tuple_temp_23 local integer tuple_temp_24 local integer tuple_temp_25 local integer tuple_temp_26 local integer tuple_temp_27 local integer tuple_temp_28 local integer tuple_temp_29 local integer tuple_temp_30 local integer tuple_temp_31 local integer tuple_temp_32 local integer tuple_temp_33 local integer tuple_temp_34 local integer tuple_temp_35 local integer tuple_temp_36 local integer tuple_temp_37 local integer tuple_temp_38 local integer tuple_temp_39 local integer tuple_temp_40 local integer tuple_temp_41 local integer tuple_temp_42 local integer tuple_temp_43 local integer tuple_temp_44 local integer tuple_temp_45 local integer tuple_temp_46 local integer tuple_temp_47 local integer tuple_temp_48 local integer tuple_temp_49 local integer tuple_temp_50 local integer tuple_temp_51 local integer tuple_temp_52 local integer tuple_temp_53 local integer tuple_temp_54 local integer tuple_temp_55 local integer tuple_temp_56 local integer tuple_temp_57 local integer tuple_temp_58 local integer tuple_temp_59 local integer tuple_temp_60 local integer tuple_temp_61 local integer tuple_temp_62 local integer tuple_temp_63 local integer tuple_temp_64 local integer tuple_temp_65 local integer tuple_temp_66 local integer tuple_temp_67 local integer tuple_temp_68 local integer tuple_temp_69 local integer tuple_temp_70 local integer tuple_temp_71 local integer tuple_temp_72 local integer tuple_temp_73 local integer tuple_temp_74 local integer tuple_temp_75 local integer tuple_temp_76 local integer tuple_temp_77 local integer tuple_temp_78 local integer tuple_temp_79 local integer tuple_temp_80 local integer tuple_temp_81 local integer tuple_temp_82 local integer tuple_temp_83 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) set Colors_MAX_PLAYER_COLORS = 23 set tuple_temp_12 = 255 set tuple_temp_13 = 2 set tuple_temp_14 = 2 set Colors_PLAYER_COLORS_red[0] = tuple_temp_12 set Colors_PLAYER_COLORS_green[0] = tuple_temp_13 set Colors_PLAYER_COLORS_blue[0] = tuple_temp_14 set tuple_temp_15 = 0 set tuple_temp_16 = 65 set tuple_temp_17 = 255 set Colors_PLAYER_COLORS_red[1] = tuple_temp_15 set Colors_PLAYER_COLORS_green[1] = tuple_temp_16 set Colors_PLAYER_COLORS_blue[1] = tuple_temp_17 set tuple_temp_18 = 27 set tuple_temp_19 = 229 set tuple_temp_20 = 184 set Colors_PLAYER_COLORS_red[2] = tuple_temp_18 set Colors_PLAYER_COLORS_green[2] = tuple_temp_19 set Colors_PLAYER_COLORS_blue[2] = tuple_temp_20 set tuple_temp_21 = 83 set tuple_temp_22 = 0 set tuple_temp_23 = 128 set Colors_PLAYER_COLORS_red[3] = tuple_temp_21 set Colors_PLAYER_COLORS_green[3] = tuple_temp_22 set Colors_PLAYER_COLORS_blue[3] = tuple_temp_23 set tuple_temp_24 = 255 set tuple_temp_25 = 252 set tuple_temp_26 = 0 set Colors_PLAYER_COLORS_red[4] = tuple_temp_24 set Colors_PLAYER_COLORS_green[4] = tuple_temp_25 set Colors_PLAYER_COLORS_blue[4] = tuple_temp_26 set tuple_temp_27 = 254 set tuple_temp_28 = 137 set tuple_temp_29 = 13 set Colors_PLAYER_COLORS_red[5] = tuple_temp_27 set Colors_PLAYER_COLORS_green[5] = tuple_temp_28 set Colors_PLAYER_COLORS_blue[5] = tuple_temp_29 set tuple_temp_30 = 31 set tuple_temp_31 = 191 set tuple_temp_32 = 0 set Colors_PLAYER_COLORS_red[6] = tuple_temp_30 set Colors_PLAYER_COLORS_green[6] = tuple_temp_31 set Colors_PLAYER_COLORS_blue[6] = tuple_temp_32 set tuple_temp_33 = 228 set tuple_temp_34 = 90 set tuple_temp_35 = 175 set Colors_PLAYER_COLORS_red[7] = tuple_temp_33 set Colors_PLAYER_COLORS_green[7] = tuple_temp_34 set Colors_PLAYER_COLORS_blue[7] = tuple_temp_35 set tuple_temp_36 = 148 set tuple_temp_37 = 149 set tuple_temp_38 = 150 set Colors_PLAYER_COLORS_red[8] = tuple_temp_36 set Colors_PLAYER_COLORS_green[8] = tuple_temp_37 set Colors_PLAYER_COLORS_blue[8] = tuple_temp_38 set tuple_temp_39 = 125 set tuple_temp_40 = 190 set tuple_temp_41 = 241 set Colors_PLAYER_COLORS_red[9] = tuple_temp_39 set Colors_PLAYER_COLORS_green[9] = tuple_temp_40 set Colors_PLAYER_COLORS_blue[9] = tuple_temp_41 set tuple_temp_42 = 15 set tuple_temp_43 = 97 set tuple_temp_44 = 69 set Colors_PLAYER_COLORS_red[10] = tuple_temp_42 set Colors_PLAYER_COLORS_green[10] = tuple_temp_43 set Colors_PLAYER_COLORS_blue[10] = tuple_temp_44 set tuple_temp_45 = 77 set tuple_temp_46 = 41 set tuple_temp_47 = 3 set Colors_PLAYER_COLORS_red[11] = tuple_temp_45 set Colors_PLAYER_COLORS_green[11] = tuple_temp_46 set Colors_PLAYER_COLORS_blue[11] = tuple_temp_47 set tuple_temp_48 = 155 set tuple_temp_49 = 0 set tuple_temp_50 = 0 set Colors_PLAYER_COLORS_red[12] = tuple_temp_48 set Colors_PLAYER_COLORS_green[12] = tuple_temp_49 set Colors_PLAYER_COLORS_blue[12] = tuple_temp_50 set tuple_temp_51 = 0 set tuple_temp_52 = 0 set tuple_temp_53 = 195 set Colors_PLAYER_COLORS_red[13] = tuple_temp_51 set Colors_PLAYER_COLORS_green[13] = tuple_temp_52 set Colors_PLAYER_COLORS_blue[13] = tuple_temp_53 set tuple_temp_54 = 0 set tuple_temp_55 = 234 set tuple_temp_56 = 255 set Colors_PLAYER_COLORS_red[14] = tuple_temp_54 set Colors_PLAYER_COLORS_green[14] = tuple_temp_55 set Colors_PLAYER_COLORS_blue[14] = tuple_temp_56 set tuple_temp_57 = 190 set tuple_temp_58 = 0 set tuple_temp_59 = 254 set Colors_PLAYER_COLORS_red[15] = tuple_temp_57 set Colors_PLAYER_COLORS_green[15] = tuple_temp_58 set Colors_PLAYER_COLORS_blue[15] = tuple_temp_59 set tuple_temp_60 = 235 set tuple_temp_61 = 205 set tuple_temp_62 = 135 set Colors_PLAYER_COLORS_red[16] = tuple_temp_60 set Colors_PLAYER_COLORS_green[16] = tuple_temp_61 set Colors_PLAYER_COLORS_blue[16] = tuple_temp_62 set tuple_temp_63 = 248 set tuple_temp_64 = 164 set tuple_temp_65 = 139 set Colors_PLAYER_COLORS_red[17] = tuple_temp_63 set Colors_PLAYER_COLORS_green[17] = tuple_temp_64 set Colors_PLAYER_COLORS_blue[17] = tuple_temp_65 set tuple_temp_66 = 191 set tuple_temp_67 = 255 set tuple_temp_68 = 128 set Colors_PLAYER_COLORS_red[18] = tuple_temp_66 set Colors_PLAYER_COLORS_green[18] = tuple_temp_67 set Colors_PLAYER_COLORS_blue[18] = tuple_temp_68 set tuple_temp_69 = 220 set tuple_temp_70 = 185 set tuple_temp_71 = 235 set Colors_PLAYER_COLORS_red[19] = tuple_temp_69 set Colors_PLAYER_COLORS_green[19] = tuple_temp_70 set Colors_PLAYER_COLORS_blue[19] = tuple_temp_71 set tuple_temp_72 = 40 set tuple_temp_73 = 40 set tuple_temp_74 = 40 set Colors_PLAYER_COLORS_red[20] = tuple_temp_72 set Colors_PLAYER_COLORS_green[20] = tuple_temp_73 set Colors_PLAYER_COLORS_blue[20] = tuple_temp_74 set tuple_temp_75 = 235 set tuple_temp_76 = 240 set tuple_temp_77 = 255 set Colors_PLAYER_COLORS_red[21] = tuple_temp_75 set Colors_PLAYER_COLORS_green[21] = tuple_temp_76 set Colors_PLAYER_COLORS_blue[21] = tuple_temp_77 set tuple_temp_78 = 0 set tuple_temp_79 = 120 set tuple_temp_80 = 30 set Colors_PLAYER_COLORS_red[22] = tuple_temp_78 set Colors_PLAYER_COLORS_green[22] = tuple_temp_79 set Colors_PLAYER_COLORS_blue[22] = tuple_temp_80 set tuple_temp_81 = 164 set tuple_temp_82 = 111 set tuple_temp_83 = 51 set Colors_PLAYER_COLORS_red[23] = tuple_temp_81 set Colors_PLAYER_COLORS_green[23] = tuple_temp_82 set Colors_PLAYER_COLORS_blue[23] = tuple_temp_83 call initializeTable() return true 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] = 696 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] = 696 endif return this_1 endfunction function alloc_EventListener_add_DamageEvent_514 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] = 697 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] = 697 endif return 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_514() call construct_EventListener(clVar_1) call EventListener_add(temp_1, clVar_1) return true endfunction function alloc_EventListener_add_DebugInfo 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] = 698 else call error("Out of memory: Could not create EventListener_add_DebugInfo.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 698 endif return this_1 endfunction function init_DebugInfo takes nothing returns boolean local integer i local trigger receiver local trigger receiver_1 local integer clVar local playerevent temp set DebugInfo_rows = 3 set DebugInfo_columns = 3 set DebugInfo_seconds = 0 set DebugInfo_eventCallbacksPerSecond = 0 set DebugInfo_totalEventCallbacks = 0 set DebugInfo_allocationsPerSecond = 0 set DebugInfo_totalAllocations = 0 set DebugInfo_isFirst = true set i = 0 loop exitwhen i > 11 set receiver = CreateTrigger() call trigger_registerPlayerChatEvent(receiver, Player_players[i], "-debug", true) set receiver_1 = receiver call trigger_addAction(receiver_1, ref_function_code__addAction_DebugInfo) set i = i + 1 endloop set temp = ClosureEvents_EVENT_PLAYER_CHAT_FILTER set clVar = alloc_EventListener_add_DebugInfo() call construct_EventListener(clVar) call EventListener_add(temp, clVar) return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_Doodads takes nothing returns boolean return true endfunction function createUnit takes player p, integer unitId, real pos_x, real pos_y, real facing_radians returns unit return CreateUnit(p, unitId, pos_x, pos_y, angle_degrees(facing_radians)) endfunction function createDummy takes real pos_x, real pos_y, real facing_radians returns unit local unit u_1 = createUnit(Basics_DUMMY_PLAYER, DummyRecycler_DUMMY_UNIT_ID, pos_x, pos_y, 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, pos_y) set receiver_5 = receiver_4 call unit_setFacing(receiver_5, facing_radians) return u_1 endfunction function init_DummyRecycler takes nothing returns boolean local integer i local integer temp local real facing_radians local integer j local integer temp_1 local unit dummy local real tuple_temp set DummyRecycler_DUMMY_UNIT_ID = 2016423985 set DummyRecycler_ROOT_ENABLER = 1095577650 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 = createDummy(vec2_op_minus(MapBounds_boundMax_x, MapBounds_boundMax_y, 16., 16.), vec2_op_minus_return_y, facing_radians) call dispatch_LinkedList_LinkedList_LinkedList_enqueue(DummyRecycler_angleQueues[i], unitToIndex(dummy)) set j = j + 1 endloop set i = i + 1 endloop return true endfunction function init_Encoder takes nothing returns boolean set Encoder_maxHash = 1000 return true endfunction function alloc_EventListener_add_Entity 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] = 699 else call error("Out of memory: Could not create EventListener_add_Entity.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 699 endif return this_1 endfunction function alloc_EventListener_add_Entity_517 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] = 700 else call error("Out of memory: Could not create EventListener_add_Entity.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 700 endif return this_1 endfunction function alloc_EventListener_add_Entity_518 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] = 701 else call error("Out of memory: Could not create EventListener_add_Entity.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 701 endif return this_1 endfunction function init_Entity takes nothing returns boolean local integer clVar local integer clVar_1 local integer clVar_2 local playerunitevent temp local playerunitevent temp_1 local playerunitevent temp_2 set Entity_DupletListModule_firstActive = 0 set Entity_DupletListModule_lastActive = 0 set Entity_DupletListModule_activeSize = 0 set Entity_DupletListModule_inactiveSize = 0 set temp = EVENT_PLAYER_UNIT_PICKUP_ITEM set clVar = alloc_EventListener_add_Entity() call construct_EventListener(clVar) call EventListener_add(temp, clVar) set temp_1 = EVENT_PLAYER_UNIT_DROP_ITEM set clVar_1 = alloc_EventListener_add_Entity_517() call construct_EventListener(clVar_1) call EventListener_add(temp_1, clVar_1) set temp_2 = EVENT_PLAYER_UNIT_USE_ITEM set clVar_2 = alloc_EventListener_add_Entity_518() call construct_EventListener(clVar_2) call EventListener_add(temp_2, clVar_2) return true endfunction function Buff_LinkedListModule_iterator takes nothing returns integer return new_Iterator(true) endfunction function alloc_Iterator_549 takes nothing returns integer local integer this_1 if Iterator_firstFree_361 == 0 then if Iterator_maxIndex_364 < JASS_MAX_ARRAY_SIZE then set Iterator_maxIndex_364 = Iterator_maxIndex_364 + 1 set this_1 = Iterator_maxIndex_364 else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree_361 = Iterator_firstFree_361 - 1 set this_1 = Iterator_nextFree_367[Iterator_firstFree_361] endif return this_1 endfunction function Iterator_init_280 takes integer this_1 returns nothing endfunction function construct_Iterator_637 takes integer this_1 returns nothing call Iterator_init_280(this_1) endfunction function new_Iterator_1056 takes nothing returns integer local integer this_1 = alloc_Iterator_549() call construct_Iterator_637(this_1) return this_1 endfunction function Entity_DupletListModule_iterator takes nothing returns integer return new_Iterator_1056() endfunction function init_EntityManagement takes nothing returns boolean call Entity_DupletListModule_iterator() call Buff_LinkedListModule_iterator() 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 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 alloc_BackIterator_488 takes nothing returns integer local integer this_1 if BackIterator_firstFree_9 == 0 then if BackIterator_maxIndex_11 < JASS_MAX_ARRAY_SIZE then set BackIterator_maxIndex_11 = BackIterator_maxIndex_11 + 1 set this_1 = BackIterator_maxIndex_11 else call error("Out of memory: Could not create BackIterator.") set this_1 = 0 endif else set BackIterator_firstFree_9 = BackIterator_firstFree_9 - 1 set this_1 = BackIterator_nextFree_13[BackIterator_firstFree_9] endif return this_1 endfunction function BackIterator_init_2 takes integer this_1 returns nothing endfunction function construct_BackIterator_614 takes integer this_1, boolean destroyOnClose returns nothing call BackIterator_init_2(this_1) endfunction function new_BackIterator_1039 takes boolean destroyOnClose returns integer local integer this_1 = alloc_BackIterator_488() call construct_BackIterator_614(this_1, destroyOnClose) return this_1 endfunction function init_FText takes nothing returns boolean set FText_recylcer = new_LinkedList() set FText_LinkedListModule_first = 0 set FText_LinkedListModule_last = 0 set FText_LinkedListModule_size = 0 call new_Iterator_1055(false) call new_BackIterator_1039(false) return true endfunction function verifyFrameNameLength takes string name returns boolean if string_length(name) > Framehandle_BLZ_FRAMENAME_MAXLENGTH then call error("Trying to address frame with exceeding maximum frame name length (" + int_toString(Framehandle_BLZ_FRAMENAME_MAXLENGTH) + ") for: " + name) return false endif return true endfunction function createFrame takes string typeName, string name, framehandle owner, string inherits, integer createContext returns framehandle call verifyFrameNameLength(name) return BlzCreateFrameByType(typeName, name, owner, inherits, createContext) endfunction function framehandle_setSize takes framehandle this_1, real width, real height returns nothing call BlzFrameSetSize(this_1, width, height) endfunction function init_Framehandle takes nothing returns boolean local framehandle receiver local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) call BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 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 set Framehandle_BLZ_FRAMENAME_MAXLENGTH = 560 set receiver = createFrame("FRAME", "SetMousePositionCage", Framehandle_GAME_UI, null, 0) call framehandle_setSize(receiver, 0.0001, 0.0001) return true endfunction function init_Frentity takes nothing returns boolean set Frentity_DYNAMIC_Z = true set Frentity_DISABLE_TEAMATTACK = false set Frentity_SHOW_SQUARE = false return true endfunction function init_Fx2Entity takes nothing returns boolean return true endfunction function init_FxEntity takes nothing returns boolean return true endfunction function init_GameTimer takes nothing returns boolean local timer receiver = CreateTimer() call timer_start(receiver, 100000., null) set GameTimer_gameTimer = receiver 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_1121(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] = 719 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] = 719 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 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 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_687 set HashList_occurences = hashtable_compiletime_688 return true endfunction function alloc_ForForceCallback_execute_Heightmap 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] = 720 else call error("Out of memory: Could not create ForForceCallback_execute_Heightmap.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 720 endif return this_1 endfunction function alloc_ForForceCallback_execute_Heightmap_534 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] = 721 else call error("Out of memory: Could not create ForForceCallback_execute_Heightmap.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 721 endif return 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 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 call HashList_clear(this_1) 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] <= 874 then if Table_typeId[this_1] <= 873 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 dealloc_HashMap takes integer obj returns nothing if Table_typeId[obj] == 0 then call error("Double free: object of type HashMap") else set Table_nextFree[Table_firstFree] = obj set Table_firstFree = Table_firstFree + 1 set Table_typeId[obj] = 0 endif endfunction function destroyHashMap takes integer this_1 returns nothing call HashMap_onDestroy(this_1) call dealloc_HashMap(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 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 call destroyHashList(this_1) 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 dispatch_HashMap_destroyHashMap takes integer this_1 returns nothing if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashMap.HashMap") else call error("Called HashMap.HashMap on invalid object.") endif endif if Table_typeId[this_1] <= 874 then call destroyHashMap(this_1) else call destroyIterableMap(this_1) endif endfunction function Reference_onDestroy takes integer this_1 returns nothing endfunction function dealloc_Reference_integer_u takes integer obj returns nothing if Reference_integer__typeId[obj] == 0 then call error("Double free: object of type Reference⟪integer⟫") else set Reference_integer__nextFree[Reference_integer__firstFree] = obj set Reference_integer__firstFree = Reference_integer__firstFree + 1 set Reference_integer__typeId[obj] = 0 endif endfunction function destroyReference_integer_u takes integer this_1 returns nothing call Reference_onDestroy(this_1) call dealloc_Reference_integer_u(this_1) endfunction function dispatch_Reference_integer__destroyReference_integer_u takes integer this_1 returns nothing if Reference_integer__typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Reference⟪integer⟫.Reference") else call error("Called Reference⟪integer⟫.Reference on invalid object.") endif endif call destroyReference_integer_u(this_1) endfunction function alloc_Reference_integer_u takes nothing returns integer local integer this_1 if Reference_integer__firstFree == 0 then if Reference_integer__maxIndex < JASS_MAX_ARRAY_SIZE then set Reference_integer__maxIndex = Reference_integer__maxIndex + 1 set this_1 = Reference_integer__maxIndex set Reference_integer__typeId[this_1] = 834 else call error("Out of memory: Could not create Reference⟪integer⟫.") set this_1 = 0 endif else set Reference_integer__firstFree = Reference_integer__firstFree - 1 set this_1 = Reference_integer__nextFree[Reference_integer__firstFree] set Reference_integer__typeId[this_1] = 834 endif return this_1 endfunction function Reference_init_integer_u takes integer this_1 returns nothing endfunction function construct_Reference_integer_u takes integer this_1, integer wval returns nothing call Reference_init_integer_u(this_1) set Reference_val[this_1] = wval endfunction function new_Reference_integer_u takes integer wval returns integer local integer this_1 = alloc_Reference_integer_u() call construct_Reference_integer_u(this_1, wval) return this_1 endfunction function init_Heightmap takes nothing returns boolean local integer zMap_1 = new_HashMap() local integer xRef_1 = new_Reference_integer_u(0) local integer clVar local integer clVar_1 loop exitwhen not (Reference_val[xRef_1] < TerrainUtils_TILES_X) set clVar = alloc_ForForceCallback_execute_Heightmap() set xRef[clVar] = xRef_1 set zMap[clVar] = zMap_1 call execute(clVar) endloop set Reference_val[xRef_1] = 0 loop exitwhen not (Reference_val[xRef_1] < TerrainUtils_TILES_X) set clVar_1 = alloc_ForForceCallback_execute_Heightmap_534() set xRef_881[clVar_1] = xRef_1 set zMap_884[clVar_1] = zMap_1 call execute(clVar_1) endloop call dispatch_HashMap_destroyHashMap(zMap_1) call dispatch_Reference_integer__destroyReference_integer_u(xRef_1) return true endfunction function HashReader_getCount takes integer this_1, integer t returns integer local integer temp = t local integer result_1 if temp == 0 then set result_1 = HashReader_integerCount[this_1] elseif temp == 1 then set result_1 = HashReader_realCount[this_1] elseif temp == 2 then set result_1 = HashReader_stringCount[this_1] else set result_1 = HashReader_booleanCount[this_1] endif return result_1 endfunction function dispatch_HashReader_Hello_HashReader_getCount takes integer this_1, integer t returns integer local integer Hello_HashReader_getCount_result if HashReader_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashReader.getCount") else call error("Called HashReader.getCount on invalid object.") endif endif set Hello_HashReader_getCount_result = HashReader_getCount(this_1, t) return Hello_HashReader_getCount_result endfunction function print takes string msg returns nothing call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., Printing_DEBUG_MSG_DURATION, msg) endfunction function inline_getCount takes integer test returns nothing call print("getCount(int): " + int_toString(dispatch_HashReader_Hello_HashReader_getCount(test, 0))) endfunction function HashReader_getReadIndex takes integer this_1, integer t returns integer local integer temp = t local integer result_1 if temp == 0 then set result_1 = HashReader_integerReadIndex[this_1] elseif temp == 1 then set result_1 = HashReader_realReadIndex[this_1] elseif temp == 2 then set result_1 = HashReader_stringReadIndex[this_1] else set result_1 = HashReader_booleanReadIndex[this_1] endif return result_1 endfunction function dispatch_HashReader_Hello_HashReader_getReadIndex takes integer this_1, integer t returns integer local integer Hello_HashReader_getReadIndex_result if HashReader_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashReader.getReadIndex") else call error("Called HashReader.getReadIndex on invalid object.") endif endif set Hello_HashReader_getReadIndex_result = HashReader_getReadIndex(this_1, t) return Hello_HashReader_getReadIndex_result endfunction function inline_readIndex takes integer test returns nothing call print("readIndex (int): " + int_toString(dispatch_HashReader_Hello_HashReader_getReadIndex(test, 0))) endfunction function HashReader_readIntUnchecked takes integer this_1 returns integer local integer temp = dispatch_Table_Table_Table_loadInt(HashReader_data[this_1], HashReader_integerReadIndex[this_1]) set HashReader_integerReadIndex[this_1] = HashReader_integerReadIndex[this_1] + 1 return temp endfunction function dispatch_HashReader_Hello_HashReader_readIntUnchecked takes integer this_1 returns integer local integer Hello_HashReader_readIntUnchecked_result if HashReader_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashReader.readIntUnchecked") else call error("Called HashReader.readIntUnchecked on invalid object.") endif endif set Hello_HashReader_readIntUnchecked_result = HashReader_readIntUnchecked(this_1) return Hello_HashReader_readIntUnchecked_result endfunction function HashType_toString takes integer this_1 returns string local integer temp = this_1 local string result_1 if temp == 0 then set result_1 = "integer" elseif temp == 1 then set result_1 = "real" elseif temp == 2 then set result_1 = "string" else set result_1 = "boolean" endif return result_1 endfunction function HashReader_hasRemainingData takes integer this_1, integer t returns boolean local integer temp = t local boolean result_1 if temp == 0 then set result_1 = HashReader_integerCount[this_1] > HashReader_integerReadIndex[this_1] elseif temp == 1 then set result_1 = HashReader_realCount[this_1] > HashReader_realReadIndex[this_1] elseif temp == 2 then set result_1 = HashReader_stringCount[this_1] > HashReader_stringReadIndex[this_1] else set result_1 = HashReader_booleanCount[this_1] > HashReader_booleanReadIndex[this_1] endif return result_1 endfunction function dispatch_HashReader_Hello_HashReader_hasRemainingData takes integer this_1, integer t returns boolean local boolean Hello_HashReader_hasRemainingData_result if HashReader_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashReader.hasRemainingData") else call error("Called HashReader.hasRemainingData on invalid object.") endif endif set Hello_HashReader_hasRemainingData_result = HashReader_hasRemainingData(this_1, t) return Hello_HashReader_hasRemainingData_result endfunction function HashReader_validateType takes integer this_1, integer t returns nothing if not dispatch_HashReader_Hello_HashReader_hasRemainingData(this_1, t) then call print("trying to read " + HashType_toString(t) + " at position " + int_toString(dispatch_HashReader_Hello_HashReader_getReadIndex(this_1, t)) + " out of " + int_toString(dispatch_HashReader_Hello_HashReader_getCount(this_1, t))) endif endfunction function dispatch_HashReader_Hello_HashReader_validateType takes integer this_1, integer t returns nothing if HashReader_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashReader.validateType") else call error("Called HashReader.validateType on invalid object.") endif endif call HashReader_validateType(this_1, t) endfunction function HashReader_readInt takes integer this_1 returns integer call dispatch_HashReader_Hello_HashReader_validateType(this_1, 0) return dispatch_HashReader_Hello_HashReader_readIntUnchecked(this_1) endfunction function dispatch_HashReader_Hello_HashReader_readInt takes integer this_1 returns integer local integer Hello_HashReader_readInt_result if HashReader_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HashReader.readInt") else call error("Called HashReader.readInt on invalid object.") endif endif set Hello_HashReader_readInt_result = HashReader_readInt(this_1) return Hello_HashReader_readInt_result endfunction function inline_readInt takes integer test returns nothing call print("readInt: " + int_toString(dispatch_HashReader_Hello_HashReader_readInt(test))) endfunction function boolean_toString takes boolean this_1 returns string local string cond_result if this_1 then set cond_result = "true" else set cond_result = "false" endif return cond_result endfunction function inline_remainingData takes integer test returns nothing call print("remaining data (int): " + boolean_toString(dispatch_HashReader_Hello_HashReader_hasRemainingData(test, 0))) endfunction function inline_validateType takes integer test returns nothing call print("validateType(int)") call dispatch_HashReader_Hello_HashReader_validateType(test, 0) endfunction function alloc_HashReader takes nothing returns integer local integer this_1 if HashReader_firstFree == 0 then if HashReader_maxIndex < JASS_MAX_ARRAY_SIZE then set HashReader_maxIndex = HashReader_maxIndex + 1 set this_1 = HashReader_maxIndex set HashReader_typeId[this_1] = 741 else call error("Out of memory: Could not create HashReader.") set this_1 = 0 endif else set HashReader_firstFree = HashReader_firstFree - 1 set this_1 = HashReader_nextFree[HashReader_firstFree] set HashReader_typeId[this_1] = 741 endif return this_1 endfunction function HashReader_init takes integer this_1 returns nothing set HashReader_data[this_1] = new_Table() set HashReader_integerReadIndex[this_1] = 0 set HashReader_realReadIndex[this_1] = 0 set HashReader_stringReadIndex[this_1] = 0 set HashReader_booleanReadIndex[this_1] = 0 set HashReader_integerCount[this_1] = 0 set HashReader_realCount[this_1] = 0 set HashReader_stringCount[this_1] = 0 set HashReader_booleanCount[this_1] = 0 endfunction function construct_HashReader takes integer this_1 returns nothing call HashReader_init(this_1) endfunction function new_HashReader takes nothing returns integer local integer this_1 = alloc_HashReader() call construct_HashReader(this_1) return this_1 endfunction function inlineTests takes nothing returns nothing local integer test = new_HashReader() call inline_remainingData(test) call inline_readIndex(test) call inline_getCount(test) call inline_validateType(test) call inline_readInt(test) endfunction function init_Hello takes nothing returns boolean call inlineTests() return true endfunction function init_Icons takes nothing returns boolean 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_Delimiter takes nothing returns integer local integer this_1 if Delimiter_firstFree == 0 then if Delimiter_maxIndex < JASS_MAX_ARRAY_SIZE then set Delimiter_maxIndex = Delimiter_maxIndex + 1 set this_1 = Delimiter_maxIndex else call error("Out of memory: Could not create Delimiter.") set this_1 = 0 endif else set Delimiter_firstFree = Delimiter_firstFree - 1 set this_1 = Delimiter_nextFree[Delimiter_firstFree] endif return this_1 endfunction function Delimiter_init takes integer this_1 returns nothing endfunction function construct_Delimiter takes integer this_1, string token returns nothing call Delimiter_init(this_1) set Delimiter_token[this_1] = token call string_length(token) endfunction function new_Delimiter takes string token returns integer local integer this_1 = alloc_Delimiter() call construct_Delimiter(this_1, token) return this_1 endfunction function init_Json takes nothing returns boolean call new_Delimiter("=") set Json_JSON_SIGN_COMMA = new_Delimiter("_") call new_Delimiter("(") call new_Delimiter(")") set Json_JSON_OPEN_ARRAY = new_Delimiter("[") set Json_JSON_CLOSE_ARRAY = new_Delimiter("]") call new_Delimiter("J") return true endfunction function init_JsonParser takes nothing returns boolean set JsonParser_numbermap = "-0123456789" set JsonParser_lettermap = "abcdefghijklmnopqrstuvwxyz" return true endfunction function alloc_EventListener_add_KeyUtils 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] = 702 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 702 endif return this_1 endfunction function alloc_EventListener_add_KeyUtils_520 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] = 703 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 703 endif return this_1 endfunction function alloc_EventListener_add_KeyUtils_521 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] = 704 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 704 endif return this_1 endfunction function alloc_EventListener_add_KeyUtils_522 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] = 705 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 705 endif return this_1 endfunction function alloc_EventListener_add_KeyUtils_523 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] = 706 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 706 endif return this_1 endfunction function alloc_EventListener_add_KeyUtils_524 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] = 707 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 707 endif return this_1 endfunction function alloc_EventListener_add_KeyUtils_525 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] = 708 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 708 endif return this_1 endfunction function alloc_EventListener_add_KeyUtils_526 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] = 709 else call error("Out of memory: Could not create EventListener_add_KeyUtils.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 709 endif return this_1 endfunction function init_KeyUtils takes nothing returns boolean local integer i local integer clVar local integer clVar_1 local integer clVar_2 local integer clVar_3 local integer clVar_4 local integer clVar_5 local integer clVar_6 local integer clVar_7 local playerevent temp local playerevent temp_1 local playerevent temp_2 local playerevent temp_3 local playerevent temp_4 local playerevent temp_5 local playerevent temp_6 local playerevent temp_7 local boolean tuple_temp local boolean tuple_temp_1 local boolean tuple_temp_2 local boolean tuple_temp_3 set KeyUtils_firstKeyListener = 0 set i = 0 loop exitwhen i > 11 set tuple_temp = false set tuple_temp_1 = false set tuple_temp_2 = false set tuple_temp_3 = false set KeyUtils_keyStatuses_up[i] = tuple_temp set KeyUtils_keyStatuses_down[i] = tuple_temp_1 set KeyUtils_keyStatuses_left[i] = tuple_temp_2 set KeyUtils_keyStatuses_right[i] = tuple_temp_3 set i = i + 1 endloop set temp = EVENT_PLAYER_ARROW_DOWN_DOWN set clVar = alloc_EventListener_add_KeyUtils() call construct_EventListener(clVar) call EventListener_add(temp, clVar) set temp_1 = EVENT_PLAYER_ARROW_DOWN_UP set clVar_1 = alloc_EventListener_add_KeyUtils_520() call construct_EventListener(clVar_1) call EventListener_add(temp_1, clVar_1) set temp_2 = EVENT_PLAYER_ARROW_UP_DOWN set clVar_2 = alloc_EventListener_add_KeyUtils_521() call construct_EventListener(clVar_2) call EventListener_add(temp_2, clVar_2) set temp_3 = EVENT_PLAYER_ARROW_UP_UP set clVar_3 = alloc_EventListener_add_KeyUtils_522() call construct_EventListener(clVar_3) call EventListener_add(temp_3, clVar_3) set temp_4 = EVENT_PLAYER_ARROW_LEFT_DOWN set clVar_4 = alloc_EventListener_add_KeyUtils_523() call construct_EventListener(clVar_4) call EventListener_add(temp_4, clVar_4) set temp_5 = EVENT_PLAYER_ARROW_LEFT_UP set clVar_5 = alloc_EventListener_add_KeyUtils_524() call construct_EventListener(clVar_5) call EventListener_add(temp_5, clVar_5) set temp_6 = EVENT_PLAYER_ARROW_RIGHT_DOWN set clVar_6 = alloc_EventListener_add_KeyUtils_525() call construct_EventListener(clVar_6) call EventListener_add(temp_6, clVar_6) set temp_7 = EVENT_PLAYER_ARROW_RIGHT_UP set clVar_7 = alloc_EventListener_add_KeyUtils_526() call construct_EventListener(clVar_7) call EventListener_add(temp_7, clVar_7) return true endfunction function init_LZW takes nothing returns boolean set LZW_maxDictSize = 5000 set LZW_ALLOWED_PLAYER_CHARS = "0aUb1GLwR2kHvP3CQIM4npFs5iSW6tzAr7TNxo8JXVjy9OcdEfBKgqeuYDhmlZ" set LZW_dictionary = new_HashMap() set LZW_dictSize = 0 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_504 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_505 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_504() call alloc_Comparator_LinkedList_505() call realToIndex(0.) return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true 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 set IdGenerator_typeId[this_1] = 744 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] set IdGenerator_typeId[this_1] = 744 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) set IdGenerator_i1[this_1] = ModuloInteger(start, 256) set IdGenerator_i2[this_1] = ModuloInteger(start, 65536) / 256 set IdGenerator_i3[this_1] = ModuloInteger(start, 16777216) / 65536 set IdGenerator_i4[this_1] = start / 16777216 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 set ObjectIdGenerator_UNIT_ID_GEN = 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 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] = 668 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] = 668 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 = 1095577649 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 alloc_ForForceCallback_execute_Pathingmap 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] = 722 else call error("Out of memory: Could not create ForForceCallback_execute_Pathingmap.") set this_1 = 0 endif else set ForForceCallback_firstFree = ForForceCallback_firstFree - 1 set this_1 = ForForceCallback_nextFree[ForForceCallback_firstFree] set ForForceCallback_typeId[this_1] = 722 endif return this_1 endfunction function init_Pathingmap takes nothing returns boolean local integer xRef_1 = new_Reference_integer_u(0) local integer clVar loop exitwhen not (Reference_val[xRef_1] < TerrainUtils_TILES_X) set clVar = alloc_ForForceCallback_execute_Pathingmap() set xRef_882[clVar] = xRef_1 call execute(clVar) endloop call dispatch_Reference_integer__destroyReference_integer_u(xRef_1) return true endfunction function init_PhysicsConstants takes nothing returns boolean set PhysicsConstants_defaultGravity = - 0.8 return true endfunction function init_PhysicsEntity 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 set Playercolor_PLAYER_COLOR_BLACK_AGGRESSIVE = ConvertPlayerColor(24) set Playercolor_PLAYER_COLOR_UNKNOWN1 = ConvertPlayerColor(25) set Playercolor_PLAYER_COLOR_UNKNOWN2 = ConvertPlayerColor(26) set Playercolor_PLAYER_COLOR_BLACK_PASSIVE = ConvertPlayerColor(27) set Playercolor_LOOKUP[0] = PLAYER_COLOR_RED set Playercolor_LOOKUP[1] = PLAYER_COLOR_BLUE set Playercolor_LOOKUP[2] = PLAYER_COLOR_CYAN set Playercolor_LOOKUP[3] = PLAYER_COLOR_PURPLE set Playercolor_LOOKUP[4] = PLAYER_COLOR_YELLOW set Playercolor_LOOKUP[5] = PLAYER_COLOR_ORANGE set Playercolor_LOOKUP[6] = PLAYER_COLOR_GREEN set Playercolor_LOOKUP[7] = PLAYER_COLOR_PINK set Playercolor_LOOKUP[8] = PLAYER_COLOR_LIGHT_GRAY set Playercolor_LOOKUP[9] = PLAYER_COLOR_LIGHT_BLUE set Playercolor_LOOKUP[10] = PLAYER_COLOR_AQUA set Playercolor_LOOKUP[11] = PLAYER_COLOR_BROWN set Playercolor_LOOKUP[12] = PLAYER_COLOR_MAROON set Playercolor_LOOKUP[13] = PLAYER_COLOR_NAVY set Playercolor_LOOKUP[14] = PLAYER_COLOR_TURQUOISE set Playercolor_LOOKUP[15] = PLAYER_COLOR_VIOLET set Playercolor_LOOKUP[16] = PLAYER_COLOR_WHEAT set Playercolor_LOOKUP[17] = PLAYER_COLOR_PEACH set Playercolor_LOOKUP[18] = PLAYER_COLOR_MINT set Playercolor_LOOKUP[19] = PLAYER_COLOR_LAVENDER set Playercolor_LOOKUP[20] = PLAYER_COLOR_COAL set Playercolor_LOOKUP[21] = PLAYER_COLOR_SNOW set Playercolor_LOOKUP[22] = PLAYER_COLOR_EMERALD set Playercolor_LOOKUP[23] = PLAYER_COLOR_PEANUT set Playercolor_LOOKUP[24] = Playercolor_PLAYER_COLOR_BLACK_AGGRESSIVE set Playercolor_LOOKUP[25] = Playercolor_PLAYER_COLOR_UNKNOWN1 set Playercolor_LOOKUP[26] = Playercolor_PLAYER_COLOR_UNKNOWN2 set Playercolor_LOOKUP[27] = Playercolor_PLAYER_COLOR_BLACK_PASSIVE return true endfunction function alloc_CallbackSingle_nullTimer_Players 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] = 669 else call error("Out of memory: Could not create CallbackSingle_nullTimer_Players.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 669 endif return this_1 endfunction function init_Players takes nothing returns boolean local integer clVar set Players_ALL_PLAYERS = new_LinkedList() set clVar = alloc_CallbackSingle_nullTimer_Players() call construct_CallbackSingle(clVar) call nullTimer(clVar) 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] = 670 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] = 670 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_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_Selector takes nothing returns boolean call new_IdGenerator(1936026672) set Selector_BTN_TO_ID_MAP = hashtable_compiletime_690 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_Squares takes nothing returns boolean set Squares_squares[0] = "Asshat!" set Squares_squares[1] = "gtfo" set Squares_squares[2] = "wtf?" set Squares_squares[3] = "really?" set Squares_squares[4] = "Dumbass!" set Squares_squares[5] = "STOP" set Squares_squares[6] = "Are you serious?" set Squares_squares[7] = "u wot m8" set Squares_squares[8] = "*poke*" set Squares_squares[9] = "wake up!" set Squares_squares[10] = "Heyyyy" set Squares_squares[11] = ":^)" set Squares_squares[12] = "^)^" set Squares_squares[13] = "Juicebag" set Squares_squares[14] = "whoopsie" set Squares_squares[15] = "monkey!" set Squares_squares[16] = "get shrekt" set Squares_squares[17] = "nou" set Squares_squares[18] = "reported!" set Squares_squares[19] = "Bengel.." set Squares_squares[20] = "calm down" return true endfunction function init_String takes nothing returns boolean 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 call StringHash(StringUtils_c2s[i]) endif set i = i + 1 endloop endfunction function widthInit takes nothing returns nothing endfunction function initialize_1007 takes nothing returns nothing call c2sInit() call s2cInit() call widthInit() endfunction function init_StringUtils takes nothing returns boolean set StringUtils_MAX_INDEX = 126 + 1 call initialize_1007() call stringToIndex("") return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_689 return true endfunction function init_TargetsAllowed takes nothing returns boolean return true endfunction function createItem_656 takes integer itemId, real pos_x, real pos_y, real pos_z returns item return CreateItem(itemId, pos_x, pos_y) endfunction function createItem takes integer itemId, real pos_x, real pos_y returns item return createItem_656(itemId, vec2_toVec3(pos_x, pos_y), 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_TILES_X = real_toInt(MapBounds_boundMax_x - MapBounds_boundMin_x) / 128 + 1 set TerrainUtils_TILES_Y = real_toInt(MapBounds_boundMax_y - MapBounds_boundMin_y) / 128 + 1 return true endfunction function init_Textures 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_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 IdGenerator_isInvalid takes integer this_1, integer char returns boolean return char < 48 or (char > 57 and char < 97) endfunction function dispatch_IdGenerator_ObjectIdGenerator_IdGenerator_isInvalid takes integer this_1, integer char returns boolean local boolean ObjectIdGenerator_IdGenerator_isInvalid_result if IdGenerator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IdGenerator.isInvalid") else call error("Called IdGenerator.isInvalid on invalid object.") endif endif set ObjectIdGenerator_IdGenerator_isInvalid_result = IdGenerator_isInvalid(this_1, char) return ObjectIdGenerator_IdGenerator_isInvalid_result 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 preloadAbility_1 takes integer abilIds_0 returns boolean local boolean result_1 = true call unit_addAbility(Preloader_dum, abilIds_0) if Preloader_dum == null then call error("Do not load abilities after map init when autoFinish = true") elseif not unit_hasAbility(Preloader_dum, abilIds_0) then call Log_trace("PreloadAbility: Ability " + int_toRawCode(abilIds_0) + " does not exist.") set result_1 = false endif return result_1 endfunction function IdGenerator_next takes integer this_1 returns integer local integer id if IdGenerator_i1[this_1] < 126 then set IdGenerator_i1[this_1] = IdGenerator_i1[this_1] + 1 loop exitwhen not dispatch_IdGenerator_ObjectIdGenerator_IdGenerator_isInvalid(this_1, IdGenerator_i1[this_1]) set IdGenerator_i1[this_1] = IdGenerator_i1[this_1] + 1 endloop elseif IdGenerator_i2[this_1] < 126 then set IdGenerator_i1[this_1] = 33 set IdGenerator_i2[this_1] = IdGenerator_i2[this_1] + 1 loop exitwhen not dispatch_IdGenerator_ObjectIdGenerator_IdGenerator_isInvalid(this_1, IdGenerator_i2[this_1]) set IdGenerator_i2[this_1] = IdGenerator_i2[this_1] + 1 endloop elseif IdGenerator_i3[this_1] < 126 then set IdGenerator_i1[this_1] = 33 set IdGenerator_i2[this_1] = 33 set IdGenerator_i3[this_1] = IdGenerator_i3[this_1] + 1 loop exitwhen not dispatch_IdGenerator_ObjectIdGenerator_IdGenerator_isInvalid(this_1, IdGenerator_i3[this_1]) set IdGenerator_i3[this_1] = IdGenerator_i3[this_1] + 1 endloop elseif IdGenerator_i4[this_1] < 126 then set IdGenerator_i1[this_1] = 33 set IdGenerator_i2[this_1] = 33 set IdGenerator_i3[this_1] = 33 set IdGenerator_i4[this_1] = IdGenerator_i4[this_1] + 1 loop exitwhen not dispatch_IdGenerator_ObjectIdGenerator_IdGenerator_isInvalid(this_1, IdGenerator_i4[this_1]) set IdGenerator_i4[this_1] = IdGenerator_i4[this_1] + 1 endloop else call error("No vaild id left") return 0 endif set id = IdGenerator_i1[this_1] + IdGenerator_i2[this_1] * 256 + IdGenerator_i3[this_1] * 65536 + IdGenerator_i4[this_1] * 16777216 if not MagicFunctions_compiletime then call preloadAbility_1(id) endif return id endfunction function dispatch_IdGenerator_ObjectIdGenerator_IdGenerator_next takes integer this_1 returns integer local integer ObjectIdGenerator_IdGenerator_next_result if IdGenerator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling IdGenerator.next") else call error("Called IdGenerator.next on invalid object.") endif endif set ObjectIdGenerator_IdGenerator_next_result = IdGenerator_next(this_1) return ObjectIdGenerator_IdGenerator_next_result endfunction function init_Usage takes nothing returns boolean call new_HashMap() call dispatch_IdGenerator_ObjectIdGenerator_IdGenerator_next(ObjectIdGenerator_UNIT_ID_GEN) 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 set Vectors_tempLoc = Location(0., 0.) return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function initGlobals takes nothing returns nothing set gg_trg_Melee_Initialization = null set BigNum_firstFree = 0 set BigNum_maxIndex = 0 set BigNum_l_firstFree = 0 set BigNum_l_maxIndex = 0 set BigString_firstFree = 0 set BigString_maxIndex = 0 set BigSubString_firstFree = 0 set BigSubString_maxIndex = 0 set DamageListener_firstFree = 0 set DamageListener_maxIndex = 0 set EventListener_firstFree = 0 set EventListener_maxIndex = 0 set CallbackSingle_firstFree = 0 set CallbackSingle_maxIndex = 0 set Buff_firstFree = 0 set BackIterator_firstFree = 0 set BackIterator_maxIndex = 0 set Iterator_firstFree = 0 set Iterator_maxIndex = 0 set OnCastListener_firstFree = 0 set ForGroupCallback_firstFree = 0 set ForGroupCallback_maxIndex = 0 set Callback_firstFree = 0 set CollisionShape_firstFree = 0 set CollisionShape_maxIndex = 0 set CollisionWorld_firstFree = 0 set CollisionWorld_maxIndex = 0 set DamageElement_firstFree = 0 set DamageElement_maxIndex = 0 set DamageInstance_firstFree = 0 set DamageInstance_maxIndex = 0 set Encoder_firstFree = 0 set Encoder_maxIndex = 0 set SeqCallback_firstFree = 0 set SeqCallback_maxIndex = 0 set ForForceCallback_firstFree = 0 set ForForceCallback_maxIndex = 0 set PayloadCallback_firstFree = 0 set PayloadCallback_maxIndex = 0 set Serializable_firstFree = 0 set Serializable_maxIndex = 0 set Iterator_firstFree_361 = 0 set Iterator_maxIndex_364 = 0 set FText_firstFree = 0 set FText_maxIndex = 0 set BackIterator_firstFree_9 = 0 set BackIterator_maxIndex_11 = 0 set Iterator_firstFree_360 = 0 set Iterator_maxIndex_363 = 0 set HashList_firstFree = 0 set Table_firstFree = 0 set Table_maxIndex = 0 set HashReader_firstFree = 0 set HashReader_maxIndex = 0 set Property_firstFree = 0 set Property_maxIndex = 0 set Comparator_firstFree = 0 set Comparator_maxIndex = 0 set LLBackIterator_firstFree = 0 set LLEntry_firstFree = 0 set LLEntry_maxIndex = 0 set LLIterator_firstFree = 0 set LLIterator_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 OnPlayerLeave_firstFree = 0 set OnPlayerLeave_maxIndex = 0 set Delimiter_firstFree = 0 set Delimiter_maxIndex = 0 set UnitIndex_firstFree = 0 set UnitIndex_maxIndex = 0 set Reference_integer__firstFree = 0 set Reference_integer__maxIndex = 0 set ref_function_Trig_Melee_Initialization_Actions = function Trig_Melee_Initialization_Actions 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_TargetsAllowed = function init_TargetsAllowed 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_Playercolor = function init_Playercolor set ref_function_init_Colors = function init_Colors set ref_function_init_Framehandle = function init_Framehandle set ref_function_init_Group = function init_Group set ref_function_init_Lightning = function init_Lightning set ref_function_init_WeatherEffects = function init_WeatherEffects set ref_function_init_TypeCasting = function init_TypeCasting set ref_function_init_HashList = function init_HashList set ref_function_init_EventHelper = function init_EventHelper set ref_function_init_AbilityObjEditing = function init_AbilityObjEditing set ref_function_init_AttachmentPoints = function init_AttachmentPoints set ref_function_init_BigNum = function init_BigNum set ref_function_init_BigString = function init_BigString 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_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_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_DamageEvent = function init_DamageEvent set ref_function_init_Squares = function init_Squares set ref_function_init_TerrainUtils = function init_TerrainUtils set ref_function_init_PhysicsConstants = function init_PhysicsConstants set ref_function_init_StringUtils = function init_StringUtils set ref_function_init_FText = function init_FText set ref_function_init_Frentity = function init_Frentity set ref_function_init_Execute = function init_Execute set ref_function_init_Heightmap = function init_Heightmap set ref_function_init_Entity = function init_Entity set ref_function_init_Buff = function init_Buff set ref_function_init_BuffIds = function init_BuffIds set ref_function_init_Buildings = function init_Buildings set ref_function_init_Icons = function init_Icons set ref_function_init_ChannelAbilityPreset = function init_ChannelAbilityPreset set ref_function_init_Collision = function init_Collision set ref_function_init_DebugInfo = function init_DebugInfo set ref_function_init_Doodads = function init_Doodads set ref_function_init_DummyRecycler = function init_DummyRecycler set ref_function_init_Encoder = function init_Encoder set ref_function_init_EntityManagement = function init_EntityManagement set ref_function_init_Environment = function init_Environment set ref_function_init_ItemIds = function init_ItemIds set ref_function_init_Objects = function init_Objects set ref_function_init_Sounds = function init_Sounds set ref_function_init_Soundsets = function init_Soundsets set ref_function_init_Textures = function init_Textures set ref_function_init_UI = function init_UI set ref_function_init_Units = function init_Units set ref_function_init_Fx2Entity = function init_Fx2Entity set ref_function_init_FxEntity = function init_FxEntity set ref_function_init_GroupUtils = function init_GroupUtils set ref_function_init_Hello = function init_Hello set ref_function_init_LZW = function init_LZW set ref_function_init_Json = function init_Json set ref_function_init_JsonParser = function init_JsonParser set ref_function_init_KeyUtils = function init_KeyUtils set ref_function_init_Pathingmap = function init_Pathingmap set ref_function_init_PhysicsEntity = function init_PhysicsEntity set ref_function_init_Players = function init_Players set ref_function_init_Selector = function init_Selector set ref_function_init_Usage = function init_Usage set ref_function_code__onUnitIndex_ClosureEvents = function code__onUnitIndex_ClosureEvents set ref_function_code__onUnitDeindex_ClosureEvents = function code__onUnitDeindex_ClosureEvents set ref_function_EventListener_generalEventCallback = function EventListener_generalEventCallback set ref_function_code__Filter_ClosureForGroups = function code__Filter_ClosureForGroups set ref_function_code__addAction_DebugInfo = function code__addAction_DebugInfo set ref_function_code__startPeriodic_DebugInfo = function code__startPeriodic_DebugInfo set ref_function_executeCurrentCallback = function executeCurrentCallback set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer set ref_function_code__registerPlayerUnitEvent_RegisterEvents = function code__registerPlayerUnitEvent_RegisterEvents set ref_function_code__start_SeqWorker = function code__start_SeqWorker set ref_function_code__start_SeqWorker_737 = function code__start_SeqWorker_607 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_724 = function code__addAction_nullTimer_ClosureEvents_594 set ref_function_code__addAction_nullTimer_ClosureEvents_725 = function code__addAction_nullTimer_ClosureEvents_595 set ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents = function code__registerPlayerUnitEvent_nullTimer_ClosureEvents set ref_function_code__start_CallbackSingle_ClosureTimers = function code__start_CallbackSingle_ClosureTimers set ref_function_code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave = function code__Filter_registerEnterRegion_nullTimer_OnUnitEnterLeave set ref_function_code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave = function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave set ref_function_code__ForGroup_nullTimer_OnUnitEnterLeave = function code__ForGroup_nullTimer_OnUnitEnterLeave endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call initCompiletimeState() call SetCameraBounds(( - 11520.0) + GetCameraMargin(CAMERA_MARGIN_LEFT), ( - 11776.0) + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 11520.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 11264.0 - GetCameraMargin(CAMERA_MARGIN_TOP), ( - 11520.0) + GetCameraMargin(CAMERA_MARGIN_LEFT), 11264.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 11520.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), ( - 11776.0) + GetCameraMargin(CAMERA_MARGIN_BOTTOM)) call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl") call NewSoundEnvironment("Default") call SetAmbientDaySound("SunkenRuinsDay") call SetAmbientNightSound("SunkenRuinsNight") call SetMapMusic("Music", true, 0) call InitBlizzard() call InitGlobals() call InitCustomTriggers() 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_TargetsAllowed)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TargetsAllowed.") 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_Playercolor)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Playercolor.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Colors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Colors.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Framehandle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Framehandle.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Group)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Group.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Lightning)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Lightning.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WeatherEffects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WeatherEffects.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TypeCasting)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TypeCasting.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashList.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_EventHelper)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EventHelper.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityObjEditing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityObjEditing.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AttachmentPoints)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AttachmentPoints.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BigNum)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BigNum.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BigString)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BigString.") 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_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_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_DamageEvent)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DamageEvent.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Squares)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Squares.") 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_PhysicsConstants)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package PhysicsConstants.") 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_FText)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package FText.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Frentity)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Frentity.") 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_Heightmap)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Heightmap.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Entity)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Entity.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Buff)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Buff.") 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_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_Collision)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Collision.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_DebugInfo)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DebugInfo.") 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_Encoder)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Encoder.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_EntityManagement)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EntityManagement.") 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_ItemIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ItemIds.") 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_Sounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Sounds.") 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_Textures)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Textures.") 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_Units)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Units.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Fx2Entity)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Fx2Entity.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_FxEntity)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package FxEntity.") 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_Hello)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Hello.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_LZW)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LZW.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Json)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Json.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_JsonParser)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package JsonParser.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_KeyUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package KeyUtils.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Pathingmap)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Pathingmap.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_PhysicsEntity)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package PhysicsEntity.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Players)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Players.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Selector)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Selector.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Usage)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Usage.") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function InitCustomPlayerSlots takes nothing returns nothing call SetPlayerStartLocation(Player(0), 0) call SetPlayerColor(Player(0), ConvertPlayerColor(0)) call SetPlayerRacePreference(Player(0), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(0), true) call SetPlayerController(Player(0), MAP_CONTROL_USER) endfunction function config takes nothing returns nothing call SetMapName("Just another Warcraft III map") call SetMapDescription("Nondescript") call SetPlayers(1) call SetTeams(1) call SetGamePlacement(MAP_PLACEMENT_USE_MAP_SETTINGS) call DefineStartLocation(0, - 4160.0, - 6464.0) call InitCustomPlayerSlots() call SetPlayerSlotAvailable(Player(0), MAP_CONTROL_USER) call InitGenericPlayerSlots() endfunction