// 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 // playergameresult PLAYER_GAME_RESULT_VICTORY=null // playergameresult PLAYER_GAME_RESULT_DEFEAT=null // playergameresult PLAYER_GAME_RESULT_NEUTRAL=null // alliancetype ALLIANCE_PASSIVE=null // alliancetype ALLIANCE_HELP_REQUEST=null // alliancetype ALLIANCE_HELP_RESPONSE=null // alliancetype ALLIANCE_SHARED_XP=null // alliancetype ALLIANCE_SHARED_SPELLS=null // alliancetype ALLIANCE_SHARED_VISION=null // version VERSION_REIGN_OF_CHAOS=null // attacktype ATTACK_TYPE_NORMAL=null // attacktype ATTACK_TYPE_MELEE=null // attacktype ATTACK_TYPE_PIERCE=null // attacktype ATTACK_TYPE_SIEGE=null // attacktype ATTACK_TYPE_CHAOS=null // damagetype DAMAGE_TYPE_UNKNOWN=null // damagetype DAMAGE_TYPE_NORMAL=null // weapontype WEAPON_TYPE_WHOKNOWS=null // pathingtype PATHING_TYPE_WALKABILITY=null // racepreference RACE_PREF_HUMAN=null // racepreference RACE_PREF_UNDEAD=null // mapcontrol MAP_CONTROL_USER=null // mapcontrol MAP_CONTROL_COMPUTER=null // mapcontrol MAP_CONTROL_RESCUABLE=null // placement MAP_PLACEMENT_TEAMS_TOGETHER=null // startlocprio MAP_LOC_PRIO_HIGH=null // playerslotstate PLAYER_SLOT_STATE_PLAYING=null // volumegroup SOUND_VOLUMEGROUP_UI=null // fgamestate GAME_STATE_TIME_OF_DAY=null // playerstate PLAYER_STATE_RESOURCE_GOLD=null // playerstate PLAYER_STATE_RESOURCE_LUMBER=null // playerstate PLAYER_STATE_GIVES_BOUNTY=null // playerstate PLAYER_STATE_ALLIED_VICTORY=null // unitstate UNIT_STATE_LIFE=null // unitstate UNIT_STATE_MAX_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_CONSTRUCT_START=null // playerunitevent EVENT_PLAYER_UNIT_UPGRADE_START=null // playerunitevent EVENT_PLAYER_UNIT_UPGRADE_CANCEL=null // playerunitevent EVENT_PLAYER_UNIT_UPGRADE_FINISH=null // playerunitevent EVENT_PLAYER_UNIT_ISSUED_ORDER=null // playerunitevent EVENT_PLAYER_UNIT_ISSUED_POINT_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 // unitevent EVENT_UNIT_DEATH=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_DEAD=null // unittype UNIT_TYPE_STRUCTURE=null // unittype UNIT_TYPE_FLYING=null // unittype UNIT_TYPE_MAGIC_IMMUNE=null // itemtype ITEM_TYPE_PERMANENT=null // itemtype ITEM_TYPE_CHARGED=null // itemtype ITEM_TYPE_ARTIFACT=null // camerafield CAMERA_FIELD_TARGET_DISTANCE=null // camerafield CAMERA_FIELD_FARZ=null // camerafield CAMERA_FIELD_ANGLE_OF_ATTACK=null // camerafield CAMERA_FIELD_FIELD_OF_VIEW=null // camerafield CAMERA_FIELD_ROLL=null // camerafield CAMERA_FIELD_ROTATION=null // camerafield CAMERA_FIELD_ZOFFSET=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_PI=0. // 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 // timer bj_gameStartedTimer=null // boolean bj_isSinglePlayer=false // 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 // sound bj_victoryDialogSound=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. // boolean bj_changeLevelShowScores=false // string bj_changeLevelMapName=null // group bj_suspendDecayFleshGroup=null // group bj_suspendDecayBoneGroup=null // timer bj_delayedSuspendDecayTimer=null // trigger bj_delayedSuspendDecayTrig=null // integer bj_livingPlayerUnitsTypeId=0 // effect bj_lastCreatedEffect=null rect gg_rct_smallBot=null rect gg_rct_smallTop=null rect gg_rct_smallLeft=null rect gg_rct_smallRight=null rect gg_rct_bigLeftBot=null rect gg_rct_bigLeftTop=null rect gg_rct_bigTopLeft=null rect gg_rct_bigTopRight=null rect gg_rct_bigRightTop=null rect gg_rct_bigRightBot=null rect gg_rct_bigBotRight=null rect gg_rct_bigBotLeft=null camerasetup gg_cam_Camera_001=null camerasetup gg_cam_Camera_002=null camerasetup gg_cam_Camera_003=null camerasetup gg_cam_Camera_004=null camerasetup gg_cam_Camera_005=null trigger gg_trg_Untitled_Trigger_001=null trigger gg_trg_Untitled_Trigger_011=null trigger gg_trg_Untitled_Trigger_012=null unit gg_unit_h00E_0008=null unit gg_unit_h00E_0007=null trigger gg_trg_Untitled_Trigger_002=null string Abilities_aIamTarget=null string Abilities_avatarCaster=null string Abilities_bansheeMissile=null string Abilities_cannonTowerMissile=null string Abilities_charmTarget=null string Abilities_crushingWaveMissile=null string Abilities_deathCoilMissile=null string Abilities_faerieDragonMissile=null string Abilities_feralspiritdone=null string Abilities_fragDriller=null string Abilities_gryphonRiderMissileTarget=null string Abilities_howlTarget=null string Abilities_illidanMissile=null string Abilities_manaFlareBoltImpact=null string Abilities_markOfChaosTarget=null string Abilities_massTeleportTarget=null string Abilities_plagueCloudCaster=null string Abilities_resourceEffectTarget=null string Abilities_reviveHuman=null string Abilities_reviveNightElf=null string Abilities_roarCaster=null string Abilities_spellShieldCaster=null string Abilities_vampiricAuraTarget=null string Abilities_voodooAura=null real Angle_DEGTORAD=0. real Angle_RADTODEG=0. real ArtilleryTower_MISSILE_SPEED=0. integer ArtilleryTower_ART_TOWER_ID=0 integer ArtilleryTower_SPELL_ID=0 real Basics_ANIMATION_PERIOD=0. real Basics_MAX_COLLISION_SIZE=0. integer Basics_HEIGHT_ENABLER=0 integer Basics_LOCUST_ID=0 integer Basics_GHOST_VIS_ID=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 BossFour_jumpyBuff_abilId=0 integer BossFour_jumpyBuff_buffId=0 integer BossFour_JUMP_DIST=0 integer BossThree_pudgeBuffAbil_abilId=0 integer BossThree_pudgeBuffAbil_buffId=0 integer BossTwo_buffAbil_abilId=0 integer BossTwo_buffAbil_buffId=0 integer BossTwo_TENTACLE_ID=0 integer Boss_snd=0 real Bounty_TEXTTAG_TEXTSIZE=0. real Bounty_TEXTTAG_VELOCITY=0. real Bounty_TEXTTAG_LIFESPAN=0. real Buff_BUFF_ANIM_PERIOD=0. 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 group ClosureForGroups_DUMMY_GROUP=null integer array ClosureForGroups_tempCallbacks integer ClosureForGroups_tempCallbacksCount=0 integer ClosureForGroups_maxCount=0 integer ClosureForGroups_iterCount=0 filterfunc ClosureForGroups_filter=null 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 player Creep_CREEP_OWNER=null 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 DestroyerSummoner_SUMMONER_ID=0 integer DestroyerSummoner_DESTROYER_ID=0 integer DestroyerSummoner_SUMMON_CASTING_EFFECT_ABIL=0 integer DestroyerSummoner_SUMMONER_BOUNTY=0 integer DestroyerSummoner_DESTROYER_BOUNTY=0 real DestroyerSummoner_updatePeriod=0. real DestroyerSummoner_animationLoopPeriod=0. integer DummyRecycler_DUMMY_UNIT_ID=0 integer DummyRecycler_ROOT_ENABLER=0 integer DummyRecycler_DIFFERENT_ANGLES=0 real DummyRecycler_ANGLE_DEGREE=0. integer DummyRecycler_SAVED_UNITS_PER_ANGLE=0 integer array DummyRecycler_angleQueues integer Encoder_maxHash=0 integer EndBoss_ENDBOSS_ID=0 integer EndBoss_m=0 real EndBoss_stageTwoPercentage=0. real EndBoss_stageThreePercentage=0. integer EndBoss_currentEndBossFight=0 boolean EndGame_gameOver=false integer EntityManagement_activeItr=0 integer EntityManagement_buffItr=0 integer array Entity_entities integer Entity_DupletListModule_firstActive=0 integer Entity_DupletListModule_lastActive=0 integer Entity_DupletListModule_firstInactive=0 integer Entity_DupletListModule_lastInactive=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 string FlamethrowerTower_FX_PATH=null real FlamethrowerTower_AOE_RADIUS=0. integer FlamethrowerTower_FLAMETHROWER_ID=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_config_DYNAMIC_Z=false boolean Frentity_config_KILL_ACTORS=false boolean Frentity_config_DISABLE_TEAMATTACK=false boolean Frentity_config_SHOW_SQUARE=false timer GameConditions_gameTime=null real GameInit_pitch=0. integer GameInit_snd2=0 timer GameTimer_gameTimer=null real GameTimer_currentTime=0. integer GroupUtils_GROUP_NUMBER_LIMIT=0 integer GroupUtils_NEED_CREATE_GROUPS=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 boolean GroupUtils_shownDestrWarning=false group Group_ENUM_GROUP=null group Group_iterGroup=null hashtable HashList_ht=null hashtable HashList_occurences=null integer HealbackTower_HEALBACK_TOWER_ID=0 real array HealbackTower_HEALBACK_MULTIPLIERS integer array HealbackTower_HEALBACK_MISSILE_COUNTS real array HealbackTower_HEALBACK_RANGES real HealbackTower_HEALBACK_RADIUS=0. string HealbackTower_HEALBACK_EFFECT=null string HealbackTower_HEALBACK_MISSILE_EFFECT=null integer HealbackTower_nearEntities=0 real HealbackTower_statSource_x=0. real HealbackTower_statSource_y=0. integer HealbackTower_comparator=0 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 InstanceBoard_classes=0 multiboard InstanceBoard_mb=null integer array InstanceBoard_count string array InstanceBoard_nameOfClass 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 integer LZW_maxDictSize=0 string LZW_ALLOWED_PLAYER_CHARS=null integer LZW_dictionary=0 integer LZW_dictSize=0 integer LumberAndCoinSystem_WOOD_REDISTRIBUTE_THRESHOLD=0 integer LumberAndCoinSystem_WOOD_BOUNTY=0 integer LumberAndCoinSystem_COIN_ID=0 integer LumberAndCoinSystem_WOOD_ID=0 integer LumberAndCoinSystem_killcount=0 real LumberAndCoinSystem_killcap=0. integer LumberAndCoinSystem_coinCount=0 integer LumberAndCoinSystem_coinCap=0 integer LumberAndCoinSystem_coinsSpawned=0 real LumberAndCoinSystem_WOOD_REDISTRIBUTE_MIN_WAIT=0. real LumberAndCoinSystem_lastRedistribute=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 Maths_PI=0. real Maths_PI2=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. multiboard MultiboardSystem_mboard=null string ObjectIds_CHARMAP=null string Objects_demonLargeDeathExplode=null string Objects_demonSmallDeathExplode=null string Objects_entBirthTarget=null string Objects_hCancelDeath=null trigger OnUnitEnterLeave_eventTrigger=null group OnUnitEnterLeave_preplacedUnits=null unit array OnUnitEnterLeave_tempUnits integer OnUnitEnterLeave_tempUnitsCount=0 integer OnUnitEnterLeave_ABILITY_ID=0 integer OrderIds_attack=0 integer OrderIds_locustswarm=0 integer OrderIds_move=0 integer OrderIds_undefend=0 integer SpecialOrders_smart=0 real PhysicsConstants_defaultGravity=0. integer PlayerData_allPlayers=0 integer array PlayerData_pDatas boolean PlayerData_bigArena=false 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 boolean Preloader_autoFinish=false group Preloader_dumg=null unit Preloader_dum=null real Printing_DEBUG_MSG_DURATION=0. integer Printing_config_DEBUG_LEVEL=0 real Quaternion_IDENTITYQ_x=0. real Quaternion_IDENTITYQ_y=0. real Quaternion_IDENTITYQ_z=0. real Quaternion_IDENTITYQ_w=0. real Quaternion_EPSILON=0. real Real_REAL_MAX=0. trigger array RegisterEvents_t integer RegisterEvents_onCastMap=0 integer Reinforcements_ITEM_ID=0 integer Reinforcements_ARCHER_ID=0 integer Reinforcements_PRIEST_ID=0 integer Rocket_ROCKET_ITEM_ID=0 integer Rocket_ROCKET_SPELL_ID=0 integer Rocket_UNDER_ATTACK_SOUND=0 integer Selector_FAT_ID=0 integer Selector_SLIM_ID=0 integer Selector_ELVEN_ID=0 integer Selector_FAT_SPELL_ID=0 integer Selector_SLIM_SPELL_ID=0 integer Selector_ELVEN_SPELL_ID=0 integer Selector_PUDDING_ID=0 integer Selector_ENERGY_ID=0 integer Selector_ROCK_ID=0 integer ShieldKit_buffAbil_abilId=0 integer ShieldKit_buffAbil_buffId=0 boolean SoundUtils_DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE=false integer SoundUtils_DEFAULT_SOUND_FADE_IN_RATE=0 integer SoundUtils_DEFAULT_SOUND_FADE_OUT_RATE=0 string SoundUtils_DEFAULT_SOUND_EAX_SETTINGS=null integer SoundUtils_DEFAULT_SOUND_VOLUME=0 real SoundUtils_DEFAULT_SOUND_PITCH=0. integer SoundUtils_DEFAULT_SOUND_DURATION=0 integer SoundUtils_SOUND_CHANNEL=0 real SoundUtils_SOUND_MIN_DIST=0. real SoundUtils_SOUND_MAX_DIST=0. real SoundUtils_SOUND_DIST_CUT=0. string Sounds_abominationAlternateDeath1=null string Sounds_abominationPissed5=null string Sounds_airBargeDeath1=null string Sounds_duneWormDeath1=null string Sounds_genericWarningUnitAttack1=null string Sounds_h01Uther03=null string Sounds_humanCallToArmsWhat1=null string Sounds_hydraDeath1=null string Sounds_skeletonWhat2=null integer SpecialFive_SPAWNTIME=0 integer SpecialFive_SPAWNAMOUNT=0 integer SpecialFive_SPAWNID=0 integer SpecialTwo_SOUL1_ID=0 integer SpecialTwo_SOUL2_ID=0 integer SpecialTwo_SOUL3_ID=0 integer SpecialTwo_SOUL4_ID=0 integer Special_UNIT_ID_DARKONE=0 real SphereTower_AREA_OF_EFFECT=0. string array Squares_squares string array StringUtils_c2s integer StringUtils_MAX_INDEX=0 string String_charset=null string String_numberset=null integer String_charsetlength=0 integer SuperCharge_ITEM_ABILITY_ID=0 integer SuperCharge_REPAIR_ID=0 hashtable Table_ht=null real TerrainUtils_MAX_RANGE_SQ=0. integer TerrainUtils_DUMMY_ITEM_ID=0 item TerrainUtils_dummyItem=null rect TerrainUtils_itemSearchRect=null item array TerrainUtils_hiddenItems integer TerrainUtils_hiddenItemsCount=0 integer TerrainUtils_TILES_X=0 integer TerrainUtils_TILES_Y=0 integer ThermoTower_buffcode=0 integer ThermoTower_ORB_ID=0 timer array TimerUtils_freeTimers integer TimerUtils_freeTimersCount=0 integer TimerUtils_timerData=0 integer TimerUtils_HELD=0 integer TowerBlockade_blockadeBuff_abilId=0 integer TowerBlockade_blockadeBuff_buffId=0 real TowerBlockade_BLOCKADE_DURATION=0. integer TowerBlockade_BLOCKADE_UNIT=0 integer Tower_BASIC_TOWER_ID=0 integer Tower_BASIC_WALL_ID=0 integer Tower_STOPPER_QUICKBUILD_ID=0 integer TownBell_TOWN_BELL_ITEM_ID=0 integer TownBell_TOWER_ID=0 integer TownBell_DUMMY_ID=0 real TownBell_SPELL_DURATION=0. integer TownBell_snd=0 player TownBell_lastRinger=null integer TownBell_usages=0 real TrooperTower_DUMMY_DIST=0. integer TrooperTower_TOWER_TROOPER_ID=0 integer TrooperTower_TROOP_ID=0 integer TrooperTower_TROOPG_ID=0 integer TypeCasting_typecastdata=0 real TypeCasting_R2I_PRECISION=0. string UI_goldCredit=null integer UnitIds_shade=0 trigger UnitIndexer_onIndexTrigger=null trigger UnitIndexer_onDeindexTrigger=null unit array UnitIndexer_tempUnits integer UnitIndexer_tempUnitsCount=0 real UnitSpawnSystem_SPAWN_TIME=0. integer UnitSpawnSystem_normalWaves=0 integer UnitSpawnSystem_bossWaves=0 integer UnitSpawnSystem_specialWaves=0 boolean UnitSpawnSystem_stopSpawns=false integer UnitSpawnSystem_level=0 string Units_abominationExplosion=null 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 integer WarningBuff_warningBuffAbil_abilId=0 integer WarningBuff_warningBuffAbil_buffId=0 integer WaveTower_FIRST_WAVE_ID=0 real WaveTower_AREA_OF_EFFECT=0. rect array Wave_spawnRects integer Wave_startPosCount=0 real Wave_middle_x=0. real Wave_middle_y=0. hashtable hashtable_compiletime=null hashtable hashtable_compiletime_1226=null hashtable hashtable_compiletime_1227=null hashtable hashtable_compiletime_1228=null integer array Serializable_nextFree integer Serializable_firstFree=0 integer Serializable_maxIndex=0 integer array Serializable_typeId integer array EventListener_nextFree integer EventListener_firstFree=0 integer EventListener_maxIndex=0 integer array EventListener_typeId integer array OnCastListener_nextFree integer OnCastListener_firstFree=0 integer OnCastListener_maxIndex=0 integer array OnCastListener_typeId integer array CallbackSingle_nextFree integer CallbackSingle_firstFree=0 integer CallbackSingle_maxIndex=0 integer array CallbackSingle_typeId 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 Buff_nextFree integer Buff_firstFree=0 integer Buff_maxIndex=0 integer array Buff_typeId integer array OnExpireEvent_nextFree integer OnExpireEvent_firstFree=0 integer OnExpireEvent_maxIndex=0 integer array OnExpireEvent_typeId integer array DamageListener_nextFree integer DamageListener_firstFree=0 integer DamageListener_maxIndex=0 integer array DamageListener_typeId integer array BackIterator_nextFree integer BackIterator_firstFree=0 integer BackIterator_maxIndex=0 integer array Iterator_nextFree_575 integer Iterator_firstFree_569=0 integer Iterator_maxIndex_572=0 integer array Iterator_typeId_578 integer array ForGroupCallback_nextFree integer ForGroupCallback_firstFree=0 integer ForGroupCallback_maxIndex=0 integer array ForGroupCallback_typeId integer array CallbackCounted_nextFree integer CallbackCounted_firstFree=0 integer CallbackCounted_maxIndex=0 integer array CallbackCounted_typeId integer Callback_firstFree=0 integer array Callback_typeId integer array CallbackPeriodic_nextFree integer CallbackPeriodic_firstFree=0 integer CallbackPeriodic_maxIndex=0 integer array CallbackPeriodic_typeId integer array DamageElement_nextFree integer DamageElement_firstFree=0 integer DamageElement_maxIndex=0 integer array DamageInstance_nextFree integer DamageInstance_firstFree=0 integer DamageInstance_maxIndex=0 integer array DamageInstance_typeId integer array FinalBossSummoning_nextFree integer FinalBossSummoning_firstFree=0 integer FinalBossSummoning_maxIndex=0 integer array FinalBossSummoning_typeId integer array DummyDamage_nextFree integer DummyDamage_firstFree=0 integer DummyDamage_maxIndex=0 integer array DummyDamage_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 EndBossFight_nextFree integer EndBossFight_firstFree=0 integer EndBossFight_maxIndex=0 integer array EndBossFight_typeId integer array Music_nextFree integer Music_firstFree=0 integer Music_maxIndex=0 integer array Iterator_nextFree integer Iterator_firstFree=0 integer Iterator_maxIndex=0 integer array Iterator_typeId integer array FText_nextFree integer FText_firstFree=0 integer FText_maxIndex=0 integer array FText_typeId integer array BackIterator_nextFree_51 integer BackIterator_firstFree_47=0 integer BackIterator_maxIndex_49=0 integer array Iterator_nextFree_576 integer Iterator_firstFree_570=0 integer Iterator_maxIndex_573=0 integer array Iterator_typeId_579 integer array Fx2_nextFree integer Fx2_firstFree=0 integer Fx2_maxIndex=0 integer array Fx2_typeId integer array Fx_nextFree integer Fx_firstFree=0 integer Fx_maxIndex=0 integer array Fx_typeId integer array LLItrClosure_nextFree integer LLItrClosure_firstFree=0 integer LLItrClosure_maxIndex=0 integer array LLItrClosure_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 EntityWithDist_nextFree integer EntityWithDist_firstFree=0 integer EntityWithDist_maxIndex=0 integer array EntityWithDist_typeId integer array Comparator_nextFree integer Comparator_firstFree=0 integer Comparator_maxIndex=0 integer array Comparator_typeId integer array JsonParser_typeId integer array Json_typeId integer array Property_nextFree integer Property_firstFree=0 integer Property_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 MapClosure_typeId integer array IdGenerator_nextFree integer IdGenerator_firstFree=0 integer IdGenerator_maxIndex=0 integer array PlayerData_nextFree integer PlayerData_firstFree=0 integer PlayerData_maxIndex=0 integer array PlayerData_typeId integer OnEndListener_firstFree=0 integer array OnEndListener_typeId integer OnHitListener_firstFree=0 integer array OnHitListener_typeId integer array Delimiter_nextFree integer Delimiter_firstFree=0 integer Delimiter_maxIndex=0 integer Sim3DSound_firstFree=0 integer array Sim3DSound_typeId integer array SoundDefinition_nextFree integer SoundDefinition_firstFree=0 integer SoundDefinition_maxIndex=0 integer array SoundDefinition_typeId integer array SoundInstance_nextFree integer SoundInstance_firstFree=0 integer SoundInstance_maxIndex=0 integer array SoundInstance_typeId integer array UnitIndex_nextFree integer UnitIndex_firstFree=0 integer UnitIndex_maxIndex=0 integer array UnitIndex_typeId integer array CreateBoss_nextFree integer CreateBoss_firstFree=0 integer CreateBoss_maxIndex=0 integer array CreateBoss_typeId integer array CreateSpecial_nextFree integer CreateSpecial_firstFree=0 integer CreateSpecial_maxIndex=0 integer array CreateSpecial_typeId integer array BossWave_nextFree integer BossWave_firstFree=0 integer BossWave_maxIndex=0 integer array BossWave_typeId integer array NormalWave_nextFree integer NormalWave_firstFree=0 integer NormalWave_maxIndex=0 integer array NormalWave_typeId integer array SpecialWave_nextFree integer SpecialWave_firstFree=0 integer SpecialWave_maxIndex=0 integer array SpecialWave_typeId integer array Reference_integer__nextFree integer Reference_integer__firstFree=0 integer Reference_integer__maxIndex=0 integer array Reference_integer__typeId real array ArtilleryMissile_damage integer array ArtilleryTower_level integer array this_1504 integer array this_1505 integer array this_1506 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 integer array this_1493 integer array this_1494 real array target_x_1456 real array target_y_1458 real array JumpyBuff_lastCast integer array SludgeBuff_currentCol_red integer array SludgeBuff_currentCol_green integer array SludgeBuff_currentCol_blue integer array SludgeBuff_nextCol_red integer array SludgeBuff_nextCol_green integer array SludgeBuff_nextCol_blue real array SludgeBuff_dmgHold effect array Boss_glow unit array upg unit array Buff_target real array Buff_duration 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 Iterator_current_565 effect array eff 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 integer array w_count integer array CallbackCounted_count integer array CallbackCounted_maxCount timer array CallbackCounted_t timer array CallbackPeriodic_t timer array CallbackSingle_t integer array Creep_bounty boolean array Creep_dropCoin item array itm integer array this_1485 integer array this_1486 real array target_x real array target_y real array DamageInstance_amount boolean array DamageInstance_unreduced attacktype array DamageInstance_nativeAttackType damagetype array DamageInstance_nativeDamageType weapontype array DamageInstance_nativeWeaponType integer array DamageListener_next boolean array DestroyerSummoner_casting real array FinalBossSummoning_castPercent real array FinalBossSummoning_animationLoop integer array FinalBossSummoning_castingCount integer array FinalBossSummoning_summoners integer array FinalBossSummoning_summoningEffect integer array FinalBossSummoning_updateCb integer array FinalBossSummoning_summonText integer array FinalBossSummoning_endBossFightRef integer array destroyerFx integer array middleFx integer array this_1495 unit array DummyDamage_dummy widget array DummyDamage_target real array DummyDamage_amount boolean array DummyDamage_attack boolean array DummyDamage_ranged real array DummyDamage_origin_x real array DummyDamage_origin_y player array DummyDamage_attacker attacktype array DummyDamage_attackType damagetype array DummyDamage_damageType weapontype array DummyDamage_weaponType 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_1465 integer array onFinish integer array w_cur_1074 integer array this_1466 integer array bs integer array w_i integer array onFinishString integer array this_1467 integer array this_1468 integer array this_1469 integer array bs_1149 integer array onFinish_1245 integer array this_1470 integer array this_1471 integer array this_1472 integer array this_1473 integer array bs_1150 integer array onFinish_1246 integer array this_1474 integer array onFinishLoad integer array this_1475 integer array this_1476 integer array this_1477 integer array EndBoss_stage real array EndBoss_damageCount integer array EndBoss_bossFight integer array EndBoss_blockadeCount integer array EndBossFight_bosses integer array EndBossFight_destroyerSummoning boolean array EndBossFight_summoningComplete integer array this_1497 integer array this_1498 integer array this_1499 integer array this_1496 string array Music_path real array Entity_pos_x real array Entity_pos_y real array Entity_pos_z real array Entity_vel_x real array Entity_vel_y real array Entity_vel_z real array Entity_gravity real array Entity_radius real array Entity_radius2 real array Entity_speedFactor player array Entity_owner boolean array Entity_flying boolean array Entity_done boolean array Entity_sleeps integer array Entity_idleSeconds integer array Entity_DupletListModule_prev integer array Entity_DupletListModule_next boolean array Entity_DupletListModule_active integer array Iterator_current item array ItemEntity_actor unit array UnitEntity_actor 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_1478 integer array Iterator_current_566 boolean array Iterator_destroyOnClose integer array FlameMissile_level integer array FlamethrowerTower_level integer array Fx2Entity_fx boolean array Fx2Entity_silent effect array Fx2_eff integer array Fx2_tint_red integer array Fx2_tint_green integer array Fx2_tint_blue integer array Fx2_tint_alpha unit array Fx_dummy effect array Fx_fx integer array snd3 integer array instance1 integer array instance2 integer array snd3_1452 integer array createNow integer array HashList_size integer array HashMap_size integer array IterableMap_keys boolean array IterableMap__destroyed integer array EntityWithDist_ue integer array EntityWithDist_distSq real array HealbackMissile_heal integer array HealbackMissile_targetEntity real array HealbackMissile_startPos_x real array HealbackMissile_startPos_y real array HealbackMissile_startPos_z real array HealbackMissile_distanceToTravelSq integer array HealbackTower_level integer array targets integer array count integer array xRef integer array zMap integer array xRef_1607 integer array zMap_1609 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_1479 integer array finalCallback integer array this_1480 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_1247 integer array onFinish_1248 integer array encoder_1186 integer array encoder_1187 integer array onFinish_1249 integer array encoder_1188 integer array onFinish_1250 integer array encoder_1189 integer array dictSize_1171 integer array positions integer array onFinish_1251 integer array inc integer array data integer array A integer array B integer array intList_1235 integer array onFinish_1252 integer array onFinish_1253 integer array output integer array onFinish_1254 integer array itr_1241 string array A_1 string array B_45 integer array output_1259 integer array onFinish_1255 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 output_1260 integer array itr_1242 item array itm_1239 integer array PhysicsProjectile_oe real array PhysicsProjectile_PhysicsModule_terrainZ real array PhysicsProjectile_PhysicsModule_surfaceFriction player array PlayerData_p integer array PlayerData_kills boolean array PlayerData_alive integer array PlayerData_deaths integer array PlayerData_builder integer array PlayerData_select integer array PlayerData_btype real array ShieldBuff_blockAmount real array Projectile_xyAngle_radians real array Projectile_startpos_x real array Projectile_startpos_y real array Projectile_startpos_z boolean array Projectile_timed boolean array Projectile_ranged boolean array Projectile_use3DDistance group array Projectile_hitGroup boolean array Projectile_isPointTarget real array Projectile_targetPoint_x real array Projectile_targetPoint_y real array Projectile_targetPoint_z boolean array Projectile_killZ real array Projectile_killBelowZ real array Projectile_speed real array Projectile_acc real array Projectile_maxDist real array Projectile_time real array Projectile_maxTime integer array Projectile_target integer array Projectile_onHit integer array Projectile_onEnd integer array this real array Shrapnell_initialTime string array Delimiter_token integer array Selector_ownerTag real array Selector_finalPos_x real array Selector_finalPos_y real array Selector_finalPos_z real array Selector_mid_x real array Selector_mid_y real array Selector_mid_z real array Selector_p player array owner integer array this_1502 effect array eff_1184 integer array PayloadCallback_customData boolean array SeqCallback_done timer array SeqCallback_ref real array ShieldKitBuff_pos_x real array ShieldKitBuff_pos_y real array ShieldKitBuff_pos_z integer array SoundDefinition_soundStack string array SoundDefinition_file integer array SoundDefinition_duration boolean array SoundDefinition_looping boolean array SoundDefinition_is3D boolean array SoundDefinition_stopOnLeaveRange integer array SoundDefinition_fadeIn integer array SoundDefinition_fadeOut string array SoundDefinition_eaxSetting integer array this_1481 integer array snd integer array this_1482 integer array snd_1449 integer array this_1483 integer array snd_1450 integer array this_1484 integer array instance real array SoundInstance_pos_x real array SoundInstance_pos_y real array SoundInstance_pos_z sound array SoundInstance_snd integer array SoundInstance_soundDef unit array SoundInstance_onUnit player array SoundInstance_p integer array SoundInstance_s3s integer array SpecialFive_spawntimer integer array this_1501 real array ppos_x real array ppos_y real array ppos_x_1267 real array ppos_y_1271 real array ppos_z real array ppos_x_1268 real array ppos_y_1272 real array ppos_z_1275 real array ppos_x_1269 real array ppos_y_1273 real array ppos_z_1276 effect array Special_glow integer array Sphere_level unit array target integer array TextTagEntity_ftext real array TextTagEntity_dur integer array TextTagEntity_col_red integer array TextTagEntity_col_green integer array TextTagEntity_col_blue integer array TextTagEntity_col_alpha boolean array ThermoTower_isHot integer array ThermoTower_level integer array BlockadeShip_blockadeBuff integer array TowerBlockadeBuff_blockadeUnit effect array TowerBlockadeBuff_blockadeEffect integer array this_1500 integer array TowerBlockadeMissile_utarget integer array data_1167 integer array Tower_deathListener integer array this_1507 integer array this_1508 integer array TrooperTower_troops integer array TrooperTower_level integer array this_1509 integer array this_1510 unit array UnitIndex__unit real array WarningBuff_startedTime real array WarningBuff_lastWarning real array WarningBuff_lastSelect boolean array WarningBuff_dead player array WarningBuff_originalOwner integer array this_1503 group array WaveMissile_affected integer array WaveMissile_level integer array this_1511 integer array dotDmg integer array splashDmg integer array WaveTower_level integer array BossWave_bossId integer array BossWave_amount integer array BossWave_bounty integer array BossWave_s integer array BossWave_boss integer array NormalWave_meleeId integer array NormalWave_mageId integer array NormalWave_rangedId integer array NormalWave_amount integer array NormalWave_bounty integer array NormalWave_typ integer array this_1487 integer array this_1488 integer array this_1489 integer array id integer array this_1490 integer array SpecialWave_specialId integer array SpecialWave_amount integer array SpecialWave_bounty integer array SpecialWave_special integer array this_1491 integer array this_1492 integer array Reference_val real real_asAngleDegrees_return_radians=0. real real_fromDeg_return_radians=0. real real_fromRad_return_radians=0. real real_asAngleRadians_return_radians=0. real angle_op_plus_return_radians=0. real angle_op_divReal_return_radians=0. real vec2_polarOffset_return_x=0. real vec2_polarOffset_return_y=0. real vec2_op_plus_return_x=0. real vec2_op_plus_return_y=0. real vec2_setLength_return_x=0. real vec2_setLength_return_y=0. real vec2_op_mult_return_x=0. real vec2_op_mult_return_y=0. real getPathingNormal_return_x_1198=0. real getPathingNormal_return_y_1200=0. real vec2_toVec3_return_x=0. real vec2_toVec3_return_y=0. real vec2_toVec3_return_z=0. real vec3_project_return_x=0. real vec3_project_return_y=0. real vec3_project_return_z=0. real vec3_toVec2_return_x=0. real vec3_toVec2_return_y=0. real vec3_op_plus_return_x_1592=0. real vec3_op_plus_return_y_1594=0. real vec3_op_plus_return_z_1596=0. real getBounceVec_return_x_1192=0. real getBounceVec_return_y_1194=0. real getBounceVec_return_z_1196=0. real vec2_withZ_return_x=0. real vec2_withZ_return_y=0. real vec2_withZ_return_z=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 integer color_withAlpha_return_red=0 integer color_withAlpha_return_green=0 integer color_withAlpha_return_blue=0 integer color_withAlpha_return_alpha=0 integer color_lerp_return_red=0 integer color_lerp_return_green=0 integer color_lerp_return_blue=0 real getPathingNormal_return_x=0. real getPathingNormal_return_y=0. real getBounceVec_return_x=0. real getBounceVec_return_y=0. real getBounceVec_return_z=0. real vec2_op_minus_return_x=0. real vec2_op_minus_return_y=0. real quat_toEuler_return_x=0. real quat_toEuler_return_y=0. real quat_toEuler_return_z=0. real vec2_withHeightMap_return_x=0. real vec2_withHeightMap_return_y=0. real vec2_withHeightMap_return_z=0. real vec3_op_plus_return_x=0. real vec3_op_plus_return_y=0. real vec3_op_plus_return_z=0. real unit_getDynamicPos_return_x=0. real unit_getDynamicPos_return_y=0. real unit_getDynamicPos_return_z=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_withHeightMap_return_x_1560=0. real vec2_withHeightMap_return_y_1562=0. real vec2_withHeightMap_return_z_1564=0. real vec3_bezier3_return_x=0. real vec3_bezier3_return_y=0. real vec3_bezier3_return_z=0. real item_getPos_return_x=0. real item_getPos_return_y=0. real dispatch_UnitEntity_Entity_UnitEntity_getPos_return_x=0. real dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y=0. real dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z=0. real vec3_op_minus_return_x_1583=0. real vec3_op_minus_return_y_1585=0. real vec3_op_minus_return_z_1587=0. real getSlopeAngle_return_radians=0. real vec3_norm_return_x=0. real vec3_norm_return_y=0. real vec3_norm_return_z=0. real vec3_op_minus_return_x=0. real vec3_op_minus_return_y=0. real vec3_op_minus_return_z=0. real vec3_op_mult_return_x=0. real vec3_op_mult_return_y=0. real vec3_op_mult_return_z=0. real vec3_toQuat_return_x=0. real vec3_toQuat_return_y=0. real vec3_toQuat_return_z=0. real vec3_toQuat_return_w=0. real angle_toQuat_return_x=0. real angle_toQuat_return_y=0. real angle_toQuat_return_z=0. real angle_toQuat_return_w=0. real rect_randomPoint_return_x=0. real rect_randomPoint_return_y=0. integer tile_return_id=0 real tile_toVec2_return_x=0. real tile_toVec2_return_y=0. real unit_getFacingAngle_return_radians=0. real vec2_withRealZ_return_x=0. real vec2_withRealZ_return_y=0. real vec2_withRealZ_return_z=0. real unit_getPos3Real_return_x=0. real unit_getPos3Real_return_y=0. real unit_getPos3Real_return_z=0. real unit_getPos3Fly_return_x=0. real unit_getPos3Fly_return_y=0. real unit_getPos3Fly_return_z=0. real unit_getPos3Zero_return_x=0. real unit_getPos3Zero_return_y=0. real unit_getPos3Zero_return_z=0. real unit_getPos3with_return_x=0. real unit_getPos3with_return_y=0. real unit_getPos3with_return_z=0. real unit_getDefaultPropWindow_return_radians=0. real vec2_angleTo_return_radians=0. real angle_toVec_return_x=0. real angle_toVec_return_y=0. real vec3_add_return_x=0. real vec3_add_return_y=0. real vec3_add_return_z=0. real vec3_angleTo2d_return_radians=0. real vec3_angleTo2d_return_radians_1575=0. real dispatch_Entity_Entity_Entity_getPos_return_x=0. real dispatch_Entity_Entity_Entity_getPos_return_y=0. real dispatch_Entity_Entity_Entity_getPos_return_z=0. real dispatch_Projectile_Projectile_Projectile_getXYAngle_return_radians=0. real Entity_getPos_return_x=0. real Entity_getPos_return_y=0. real Entity_getPos_return_z=0. real Entity_getVel_return_x=0. real Entity_getVel_return_y=0. real Entity_getVel_return_z=0. real ItemEntity_getPos_return_x=0. real ItemEntity_getPos_return_y=0. real ItemEntity_getPos_return_z=0. real UnitEntity_getPos_return_x=0. real UnitEntity_getPos_return_y=0. real UnitEntity_getPos_return_z=0. real Projectile_getXYAngle_return_radians=0. real dispatch_Entity_Entity_Entity_getVel_return_x=0. real dispatch_Entity_Entity_Entity_getVel_return_y=0. real dispatch_Entity_Entity_Entity_getVel_return_z=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_Untitled_Trigger_001_Actions=null code ref_function_Trig_Untitled_Trigger_011_Actions=null code ref_function_Trig_Untitled_Trigger_012_Actions=null code ref_function_Trig_Untitled_Trigger_002_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_MagicFunctions=null code ref_function_init_Basics=null code ref_function_init_GameTimer=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_Printing_config=null code ref_function_init_Printing=null code ref_function_init_ErrorHandling=null code ref_function_init_Matrices=null code ref_function_init_Quaternion=null code ref_function_init_AbilityObjEditing=null code ref_function_init_TimerUtils=null code ref_function_init_RegisterEvents=null code ref_function_init_ClosureTimers=null code ref_function_init_ClosureForGroups=null code ref_function_init_LinkedList=null code ref_function_init_ObjectIds=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_Orders=null code ref_function_init_OnUnitEnterLeave=null code ref_function_init_UnitIndexer=null code ref_function_init_ClosureEvents=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_config=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_DamageEvent=null code ref_function_init_Squares=null code ref_function_init_Buff=null code ref_function_init_Tower=null code ref_function_init_BuffIds=null code ref_function_init_Buildings=null code ref_function_init_Doodads=null code ref_function_init_Environment=null code ref_function_init_Icons=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_AttachmentPoints=null code ref_function_init_Fx2Entity=null code ref_function_init_GroupUtils=null code ref_function_init_DummyRecycler=null code ref_function_init_ArtilleryTower=null code ref_function_init_AssassinTower=null code ref_function_init_BigNum=null code ref_function_init_BigString=null code ref_function_init_Bounty=null code ref_function_init_Creep=null code ref_function_init_LumberAndCoinSystem=null code ref_function_init_Simulate3dSound=null code ref_function_init_SoundUtils=null code ref_function_init_PhysicsEntity=null code ref_function_init_Boss=null code ref_function_init_BossFour=null code ref_function_init_WarningBuff=null code ref_function_init_BossThree=null code ref_function_init_BossTwo=null code ref_function_init_DebugInfo=null code ref_function_init_Destroy=null code ref_function_init_DestroyerSummoner=null code ref_function_init_Encoder=null code ref_function_init_TowerBlockade=null code ref_function_init_EndGame=null code ref_function_init_Special=null code ref_function_init_SpecialTwo=null code ref_function_init_SpecialFive=null code ref_function_init_UnitSpawnSystem=null code ref_function_init_EndBoss=null code ref_function_init_EntityManagement=null code ref_function_init_FieldGenerator=null code ref_function_init_FlamethrowerTower=null code ref_function_init_PlayerData=null code ref_function_init_GameConditions=null code ref_function_init_GameInit=null code ref_function_init_HealbackTower=null code ref_function_init_InstanceBoard=null code ref_function_init_LZW=null code ref_function_init_Json=null code ref_function_init_JsonParser=null code ref_function_init_MultiboardSystem=null code ref_function_init_Reinforcements=null code ref_function_init_RevivalSystem=null code ref_function_init_Rocket=null code ref_function_init_Selector=null code ref_function_init_ShieldKit=null code ref_function_init_SphereTower=null code ref_function_init_StompingTower=null code ref_function_init_SuperCharge=null code ref_function_init_ThermoTower=null code ref_function_init_TownBell=null code ref_function_init_TrooperTower=null code ref_function_init_WaveTower=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_updateActiveEntities=null code ref_function_updateBuffs=null code ref_function_updateInactiveEntities=null code ref_function_code__onUnitDeindex_EntityManagement=null code ref_function_executeCurrentCallback=null code ref_function_endGameTimer=null code ref_function_code__startPeriodic_GameTimer=null code ref_function_code__startPeriodic_MultiboardSystem=null code ref_function_code__registerPlayerUnitEvent_RegisterEvents=null code ref_function_code__start_SeqWorker=null code ref_function_code__start_SeqWorker_1315=null code ref_function_code__EnumItemsInRect_TerrainUtils=null code ref_function_code__onEnter_UnitIndexer=null code ref_function_code__onLeave_UnitIndexer=null code ref_function_onSpawnTime=null code ref_function_code__addAction_nullTimer_ClosureEvents=null code ref_function_code__addAction_nullTimer_ClosureEvents_1300=null code ref_function_code__addAction_nullTimer_ClosureEvents_1301=null code ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents=null code ref_function_CallbackCounted_staticCallback=null code ref_function_CallbackPeriodic_staticCallback=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 code ref_function_ThermoTower_removeFrostAbil=null integer tempReturn_integer=0 group tempReturn_group=null boolean tempReturn_boolean=false string tempReturn_string=null endglobals native UnitAlive takes unit id_1 returns boolean function CreateNeutralPassive takes nothing returns nothing local player p = Player(PLAYER_NEUTRAL_PASSIVE) call CreateUnit(p, 1966092595, - 260.6, - 191.0, 273.410) endfunction function CreateBuildingsForPlayer8 takes nothing returns nothing local player p = Player(8) set gg_unit_h00E_0007 = CreateUnit(p, 1747988549, 11776.0, - 512.0, 270.000) set gg_unit_h00E_0008 = CreateUnit(p, 1747988549, 2176.0, 1664.0, 270.000) endfunction function CreatePlayerBuildings takes nothing returns nothing call CreateBuildingsForPlayer8() endfunction function CreateUnitsForPlayer8 takes nothing returns nothing local player p = Player(8) call CreateUnit(p, 1747988548, 1572.2, 1225.6, 75.625) call CreateUnit(p, 1747988548, 2692.4, 1074.6, 167.672) call CreateUnit(p, 1747988548, 2791.5, 2055.3, 245.154) call CreateUnit(p, 1747988548, 1944.9, 2346.8, 317.448) call CreateUnit(p, 1747988548, 11015.8, 344.7, 338.577) call CreateUnit(p, 1747988548, 10816.3, - 1406.8, 292.862) call CreateUnit(p, 1747988548, 12896.9, - 1328.8, 262.199) call CreateUnit(p, 1747988548, 12725.4, 417.5, 140.251) call CreateUnit(p, 1747988548, 12771.2, - 1218.1, 85.048) call CreateUnit(p, 1747988548, 10913.2, - 1260.8, 12.948) call CreateUnit(p, 1747988548, 12665.1, 285.3, 259.360) call CreateUnit(p, 1747988548, 10982.0, 536.8, 144.404) endfunction function CreatePlayerUnits takes nothing returns nothing call CreateUnitsForPlayer8() endfunction function CreateAllUnits takes nothing returns nothing call CreatePlayerBuildings() call CreateNeutralPassive() call CreatePlayerUnits() endfunction function CreateCameras takes nothing returns nothing set gg_cam_Camera_001 = CreateCameraSetup() call CameraSetupSetField(gg_cam_Camera_001, CAMERA_FIELD_ZOFFSET, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_001, CAMERA_FIELD_ROTATION, 88.1, 0.0) call CameraSetupSetField(gg_cam_Camera_001, CAMERA_FIELD_ANGLE_OF_ATTACK, 269.5, 0.0) call CameraSetupSetField(gg_cam_Camera_001, CAMERA_FIELD_TARGET_DISTANCE, 5178.4, 0.0) call CameraSetupSetField(gg_cam_Camera_001, CAMERA_FIELD_ROLL, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_001, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0) call CameraSetupSetField(gg_cam_Camera_001, CAMERA_FIELD_FARZ, 8857.8, 0.0) call CameraSetupSetDestPosition(gg_cam_Camera_001, 2153.5, 1430.1, 0.0) set gg_cam_Camera_002 = CreateCameraSetup() call CameraSetupSetField(gg_cam_Camera_002, CAMERA_FIELD_ZOFFSET, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_002, CAMERA_FIELD_ROTATION, 90.0, 0.0) call CameraSetupSetField(gg_cam_Camera_002, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0) call CameraSetupSetField(gg_cam_Camera_002, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0) call CameraSetupSetField(gg_cam_Camera_002, CAMERA_FIELD_ROLL, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_002, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0) call CameraSetupSetField(gg_cam_Camera_002, CAMERA_FIELD_FARZ, 5000.0, 0.0) call CameraSetupSetDestPosition(gg_cam_Camera_002, 2171.5, 1599.6, 0.0) set gg_cam_Camera_003 = CreateCameraSetup() call CameraSetupSetField(gg_cam_Camera_003, CAMERA_FIELD_ZOFFSET, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_003, CAMERA_FIELD_ROTATION, 90.8, 0.0) call CameraSetupSetField(gg_cam_Camera_003, CAMERA_FIELD_ANGLE_OF_ATTACK, 321.9, 0.0) call CameraSetupSetField(gg_cam_Camera_003, CAMERA_FIELD_TARGET_DISTANCE, 5696.2, 0.0) call CameraSetupSetField(gg_cam_Camera_003, CAMERA_FIELD_ROLL, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_003, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0) call CameraSetupSetField(gg_cam_Camera_003, CAMERA_FIELD_FARZ, 10000.0, 0.0) call CameraSetupSetDestPosition(gg_cam_Camera_003, 11894.7, - 928.8, 0.0) set gg_cam_Camera_004 = CreateCameraSetup() call CameraSetupSetField(gg_cam_Camera_004, CAMERA_FIELD_ZOFFSET, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_004, CAMERA_FIELD_ROTATION, 90.0, 0.0) call CameraSetupSetField(gg_cam_Camera_004, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0) call CameraSetupSetField(gg_cam_Camera_004, CAMERA_FIELD_TARGET_DISTANCE, 1650.0, 0.0) call CameraSetupSetField(gg_cam_Camera_004, CAMERA_FIELD_ROLL, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_004, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0) call CameraSetupSetField(gg_cam_Camera_004, CAMERA_FIELD_FARZ, 5000.0, 0.0) call CameraSetupSetDestPosition(gg_cam_Camera_004, 11739.7, - 476.3, 0.0) set gg_cam_Camera_005 = CreateCameraSetup() call CameraSetupSetField(gg_cam_Camera_005, CAMERA_FIELD_ZOFFSET, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_005, CAMERA_FIELD_ROTATION, 90.0, 0.0) call CameraSetupSetField(gg_cam_Camera_005, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0) call CameraSetupSetField(gg_cam_Camera_005, CAMERA_FIELD_TARGET_DISTANCE, 13431.5, 0.0) call CameraSetupSetField(gg_cam_Camera_005, CAMERA_FIELD_ROLL, 0.0, 0.0) call CameraSetupSetField(gg_cam_Camera_005, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0) call CameraSetupSetField(gg_cam_Camera_005, CAMERA_FIELD_FARZ, 7320.5, 0.0) call CameraSetupSetDestPosition(gg_cam_Camera_005, 2424.6, 1759.9, 0.0) endfunction function CreateRegions takes nothing returns nothing set gg_rct_smallBot = Rect(1120.0, - 864.0, 3264.0, - 768.0) set gg_rct_smallTop = Rect(1344.0, 4032.0, 3488.0, 4128.0) set gg_rct_smallLeft = Rect( - 384.0, 1088.0, - 288.0, 2848.0) set gg_rct_smallRight = Rect(4576.0, 800.0, 4672.0, 2560.0) set gg_rct_bigLeftBot = Rect(7104.0, - 2912.0, 7232.0, - 1440.0) set gg_rct_bigLeftTop = Rect(7104.0, 1248.0, 7232.0, 2976.0) set gg_rct_bigTopLeft = Rect(9568.0, 4032.0, 11008.0, 4160.0) set gg_rct_bigTopRight = Rect(13312.0, 4000.0, 14784.0, 4128.0) set gg_rct_bigRightTop = Rect(16416.0, 544.0, 16544.0, 2016.0) set gg_rct_bigRightBot = Rect(16448.0, - 3072.0, 16576.0, - 1568.0) set gg_rct_bigBotRight = Rect(13440.0, - 5088.0, 14784.0, - 4960.0) set gg_rct_bigBotLeft = Rect(8768.0, - 5088.0, 10176.0, - 4960.0) endfunction function InitTrig_Untitled_Trigger_001 takes nothing returns nothing set gg_trg_Untitled_Trigger_001 = CreateTrigger() call TriggerAddAction(gg_trg_Untitled_Trigger_001, ref_function_Trig_Untitled_Trigger_001_Actions) endfunction function InitTrig_Untitled_Trigger_002 takes nothing returns nothing set gg_trg_Untitled_Trigger_002 = CreateTrigger() call TriggerAddAction(gg_trg_Untitled_Trigger_002, ref_function_Trig_Untitled_Trigger_002_Actions) endfunction function InitTrig_Untitled_Trigger_011 takes nothing returns nothing set gg_trg_Untitled_Trigger_011 = CreateTrigger() call TriggerAddAction(gg_trg_Untitled_Trigger_011, ref_function_Trig_Untitled_Trigger_011_Actions) endfunction function InitTrig_Untitled_Trigger_012 takes nothing returns nothing set gg_trg_Untitled_Trigger_012 = CreateTrigger() call TriggerAddAction(gg_trg_Untitled_Trigger_012, ref_function_Trig_Untitled_Trigger_012_Actions) endfunction function InitCustomTriggers takes nothing returns nothing call InitTrig_Untitled_Trigger_001() call InitTrig_Untitled_Trigger_011() call InitTrig_Untitled_Trigger_012() call InitTrig_Untitled_Trigger_002() endfunction function InitGlobals takes nothing returns nothing call CreateGroup() call CreateGroup() call CreateForce() 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_2283 takes player showTo, integer loglvl, string msg returns nothing local string compositeMsg if Printing_config_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_2283(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_1228 = InitHashtable() set hashtable_compiletime_1227 = InitHashtable() set hashtable_compiletime_1226 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime, 1, -242600650, 0) call SaveInteger(hashtable_compiletime, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime, 1, -647782241, 2) call SaveInteger(hashtable_compiletime, 1, -854572045, 3) call SaveInteger(hashtable_compiletime, 1, -680649701, 4) call SaveInteger(hashtable_compiletime, 1, -943650483, 5) call SaveInteger(hashtable_compiletime, 1, -671760605, 6) call SaveInteger(hashtable_compiletime, 1, 349230650, 7) call SaveInteger(hashtable_compiletime, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime, 1, 597637742, 14) call SaveInteger(hashtable_compiletime, 1, 789744696, 15) call SaveStr(hashtable_compiletime, 2, 0, "") call SaveInteger(hashtable_compiletime, 11, 0, 0) call SaveInteger(hashtable_compiletime, 11, 1, 0) call SaveInteger(hashtable_compiletime, 11, 2, 0) call SaveInteger(hashtable_compiletime, 11, 3, 0) call SaveInteger(hashtable_compiletime, 11, 4, 0) call SaveInteger(hashtable_compiletime, 11, 5, 0) call SaveInteger(hashtable_compiletime, 11, 6, 0) call SaveInteger(hashtable_compiletime, 11, 7, 0) call SaveInteger(hashtable_compiletime, 11, 8, 0) call SaveInteger(hashtable_compiletime, 11, 9, 0) call SaveInteger(hashtable_compiletime, 11, 10, 0) call SaveInteger(hashtable_compiletime, 11, 11, 0) call SaveInteger(hashtable_compiletime, 11, 12, 0) call SaveInteger(hashtable_compiletime, 11, 13, 0) call SaveInteger(hashtable_compiletime, 11, 14, 0) call SaveInteger(hashtable_compiletime, 11, 15, 0) call SaveInteger(hashtable_compiletime, 11, 16, 0) call SaveInteger(hashtable_compiletime, 11, 17, 0) call SaveInteger(hashtable_compiletime, 11, 18, 0) call SaveInteger(hashtable_compiletime, 11, 19, 0) call SaveInteger(hashtable_compiletime, 11, 20, 0) call SaveInteger(hashtable_compiletime, 11, 21, 0) call SaveInteger(hashtable_compiletime, 11, 22, 0) call SaveInteger(hashtable_compiletime, 11, 23, 0) call SaveInteger(hashtable_compiletime, 11, 24, 0) call SaveInteger(hashtable_compiletime, 11, 25, 0) call SaveInteger(hashtable_compiletime, 11, 26, 0) call SaveInteger(hashtable_compiletime, 11, 27, 0) call SaveInteger(hashtable_compiletime, 11, 28, 0) call SaveInteger(hashtable_compiletime, 11, 29, 0) call SaveInteger(hashtable_compiletime, 11, 30, 0) call SaveInteger(hashtable_compiletime, 11, 31, 0) call SaveInteger(hashtable_compiletime, 11, 32, 0) call SaveInteger(hashtable_compiletime, 11, 33, 0) call SaveInteger(hashtable_compiletime, 11, 34, 0) call SaveInteger(hashtable_compiletime, 11, 35, 0) call SaveInteger(hashtable_compiletime, 11, 36, 0) call SaveInteger(hashtable_compiletime, 11, 37, 0) call SaveInteger(hashtable_compiletime, 11, 38, 0) call SaveInteger(hashtable_compiletime, 11, 39, 0) call SaveInteger(hashtable_compiletime, 11, 40, 0) call SaveInteger(hashtable_compiletime, 11, 41, 0) call SaveInteger(hashtable_compiletime, 11, 42, 0) call SaveInteger(hashtable_compiletime, 11, 43, 0) call SaveInteger(hashtable_compiletime, 11, 44, 0) call SaveInteger(hashtable_compiletime, 11, 45, 0) call SaveInteger(hashtable_compiletime, 11, 46, 0) call SaveInteger(hashtable_compiletime, 11, 47, 0) call SaveInteger(hashtable_compiletime, 11, 48, 0) call SaveInteger(hashtable_compiletime, 11, 49, 0) call SaveInteger(hashtable_compiletime, 11, 50, 0) call SaveInteger(hashtable_compiletime, 11, 51, 0) call SaveInteger(hashtable_compiletime, 11, 52, 0) call SaveInteger(hashtable_compiletime, 11, 53, 0) call SaveInteger(hashtable_compiletime, 11, 54, 0) call SaveInteger(hashtable_compiletime, 11, 55, 0) call SaveInteger(hashtable_compiletime, 11, 56, 0) call SaveInteger(hashtable_compiletime, 11, 57, 0) call SaveInteger(hashtable_compiletime, 11, 58, 0) call SaveInteger(hashtable_compiletime, 11, 59, 0) call SaveInteger(hashtable_compiletime, 11, 60, 0) call SaveInteger(hashtable_compiletime, 11, 61, 0) call SaveInteger(hashtable_compiletime, 11, 62, 0) call SaveInteger(hashtable_compiletime, 11, 63, 0) call SaveStr(hashtable_compiletime, 2, 1804483594, "air") call SaveStr(hashtable_compiletime, 2, -1221441622, "debris") call SaveStr(hashtable_compiletime, 2, -681966791, "ground") call SaveStr(hashtable_compiletime, 2, -1912775212, "invulnerable") call SaveStr(hashtable_compiletime, 2, 392811314, "item") call SaveStr(hashtable_compiletime, 2, 124309475, "structure") call SaveStr(hashtable_compiletime, 2, -543400682, "vulnerable") call SaveStr(hashtable_compiletime, 2, -85648186, "ward") call SaveStr(hashtable_compiletime, 2, -612826229, "Avul") call SaveStr(hashtable_compiletime, 2, 1282521876, "Aloc") call SaveStr(hashtable_compiletime, 2, -1194720164, "AM06") endfunction function initCompiletimeState takes nothing returns nothing call ExecuteFunc("initCompiletimeState_0") endfunction function CallbackCounted_getCount takes integer this_1 returns integer local integer cond_result if CallbackCounted_count[this_1] < CallbackCounted_maxCount[this_1] then set cond_result = CallbackCounted_count[this_1] + 1 else set cond_result = CallbackCounted_count[this_1] endif return cond_result endfunction function dispatch_CallbackCounted_ClosureTimers_CallbackCounted_getCount takes integer this_1 returns integer local integer ClosureTimers_CallbackCounted_getCount_result if CallbackCounted_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackCounted.getCount") else call error("Called CallbackCounted.getCount on invalid object.") endif endif set ClosureTimers_CallbackCounted_getCount_result = CallbackCounted_getCount(this_1) return ClosureTimers_CallbackCounted_getCount_result endfunction function CallbackCounted_isLast takes integer this_1 returns boolean return CallbackCounted_count[this_1] == 0 endfunction function dispatch_CallbackCounted_ClosureTimers_CallbackCounted_isLast takes integer this_1 returns boolean local boolean ClosureTimers_CallbackCounted_isLast_result if CallbackCounted_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackCounted.isLast") else call error("Called CallbackCounted.isLast on invalid object.") endif endif set ClosureTimers_CallbackCounted_isLast_result = CallbackCounted_isLast(this_1) return ClosureTimers_CallbackCounted_isLast_result endfunction function CallbackCounted_progress takes integer this_1 returns real return 1. - CallbackCounted_count[this_1] * 1. / CallbackCounted_maxCount[this_1] endfunction function dispatch_CallbackCounted_ClosureTimers_CallbackCounted_progress takes integer this_1 returns real local real ClosureTimers_CallbackCounted_progress_result if CallbackCounted_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackCounted.progress") else call error("Called CallbackCounted.progress on invalid object.") endif endif set ClosureTimers_CallbackCounted_progress_result = CallbackCounted_progress(this_1) return ClosureTimers_CallbackCounted_progress_result endfunction function int_toString takes integer this_1 returns string return I2S(this_1) 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 real_toString takes real this_1 returns string return R2S(this_1) endfunction function real_assertEquals takes real this_1, real expected, real delta returns nothing if this_1 - expected > delta or expected - this_1 > delta then call testFail("Expected <" + real_toString(expected) + ">, Actual <" + real_toString(this_1) + " with delta " + real_toString(delta) + ">") endif endfunction function call_doPeriodicallyCounted_ClosureTimers takes integer this_1, integer cb_1 returns nothing call int_assertEquals(dispatch_CallbackCounted_ClosureTimers_CallbackCounted_getCount(cb_1), w_count[this_1]) if dispatch_CallbackCounted_ClosureTimers_CallbackCounted_isLast(cb_1) then call real_assertEquals(dispatch_CallbackCounted_ClosureTimers_CallbackCounted_progress(cb_1), 1., 0.0001) call int_assertEquals(dispatch_CallbackCounted_ClosureTimers_CallbackCounted_getCount(cb_1), 1) elseif w_count[this_1] == 3 then call real_assertEquals(dispatch_CallbackCounted_ClosureTimers_CallbackCounted_progress(cb_1), 0.33333, 0.00001) call int_assertEquals(dispatch_CallbackCounted_ClosureTimers_CallbackCounted_getCount(cb_1), 3) elseif w_count[this_1] == 2 then call real_assertEquals(dispatch_CallbackCounted_ClosureTimers_CallbackCounted_progress(cb_1), 0.66666, 0.00001) call int_assertEquals(dispatch_CallbackCounted_ClosureTimers_CallbackCounted_getCount(cb_1), 2) endif set w_count[this_1] = w_count[this_1] - 1 endfunction function sound_setPitch takes sound this_1, real pitch returns nothing call SetSoundPitch(this_1, pitch) endfunction function call_doPeriodicallyTimed_doAfter_GameInit takes integer this_1, integer cb_1 returns nothing set GameInit_pitch = GameInit_pitch * 0.99801 call sound_setPitch(SoundInstance_snd[instance1[this_1]], GameInit_pitch) endfunction function call_doPeriodicallyTimed_doAfter_doAfter_GameInit takes integer this_1, integer cb_1 returns nothing call sound_setPitch(SoundInstance_snd[instance2[this_1]], GameInit_pitch) endfunction function dispatch_CallbackCounted_ClosureTimers_CallbackCounted_call takes integer this_1, integer cb_1 returns nothing if CallbackCounted_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackCounted.call") else call error("Called CallbackCounted.call on invalid object.") endif endif if CallbackCounted_typeId[this_1] <= 659 then if CallbackCounted_typeId[this_1] <= 658 then call call_doPeriodicallyCounted_ClosureTimers(this_1, cb_1) else call call_doPeriodicallyTimed_doAfter_GameInit(this_1, cb_1) endif else call call_doPeriodicallyTimed_doAfter_doAfter_GameInit(this_1, cb_1) endif 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 handle_getTCHandleId takes handle this_1 returns integer return GetHandleId(this_1) 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 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 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 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 CallbackCounted_onDestroy takes integer this_1 returns nothing call timer_release(CallbackCounted_t[this_1]) endfunction function dealloc_CallbackCounted takes integer obj returns nothing if CallbackCounted_typeId[obj] == 0 then call error("Double free: object of type CallbackCounted") else set CallbackCounted_nextFree[CallbackCounted_firstFree] = obj set CallbackCounted_firstFree = CallbackCounted_firstFree + 1 set CallbackCounted_typeId[obj] = 0 endif endfunction function destroyCallbackCounted takes integer this_1 returns nothing call CallbackCounted_onDestroy(this_1) call dealloc_CallbackCounted(this_1) endfunction function dispatch_CallbackCounted_destroyCallbackCounted takes integer this_1 returns nothing if CallbackCounted_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackCounted.CallbackCounted") else call error("Called CallbackCounted.CallbackCounted on invalid object.") endif endif call destroyCallbackCounted(this_1) endfunction function CallbackCounted_callAndCount takes integer this_1 returns nothing if CallbackCounted_count[this_1] > 0 then set CallbackCounted_count[this_1] = CallbackCounted_count[this_1] - 1 call dispatch_CallbackCounted_ClosureTimers_CallbackCounted_call(this_1, this_1) else call dispatch_CallbackCounted_destroyCallbackCounted(this_1) endif endfunction function dispatch_CallbackCounted_ClosureTimers_CallbackCounted_callAndCount takes integer this_1 returns nothing if CallbackCounted_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackCounted.callAndCount") else call error("Called CallbackCounted.callAndCount on invalid object.") endif endif call CallbackCounted_callAndCount(this_1) endfunction function CallbackCounted_staticCallback takes nothing returns nothing call dispatch_CallbackCounted_ClosureTimers_CallbackCounted_callAndCount(timer_getData(GetExpiredTimer())) 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] = 860 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] = 860 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 FinalBossSummoning_getSummonSpeed takes integer this_1, integer castingCount returns real if castingCount <= 0 then return -1. endif return castingCount * 1. / 4 + castingCount * castingCount * 1. / 4 endfunction function dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_getSummonSpeed takes integer this_1, integer castingCount returns real local real DestroyerSummoner_FinalBossSummoning_getSummonSpeed_result if FinalBossSummoning_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FinalBossSummoning.getSummonSpeed") else call error("Called FinalBossSummoning.getSummonSpeed on invalid object.") endif endif set DestroyerSummoner_FinalBossSummoning_getSummonSpeed_result = FinalBossSummoning_getSummonSpeed(this_1, castingCount) return DestroyerSummoner_FinalBossSummoning_getSummonSpeed_result endfunction function unit_addAbility takes unit this_1, integer abil returns boolean return UnitAddAbility(this_1, abil) endfunction function unit_queueAnimation takes unit this_1, string animation returns nothing call QueueUnitAnimation(this_1, animation) endfunction function FinalBossSummoning_startCasting takes integer this_1, integer summoner returns nothing set Entity_sleeps[summoner] = true set DestroyerSummoner_casting[summoner] = true call unit_addAbility(UnitEntity_actor[summoner], DestroyerSummoner_SUMMON_CASTING_EFFECT_ABIL) call unit_queueAnimation(UnitEntity_actor[summoner], "attack spell") endfunction function dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_startCasting takes integer this_1, integer summoner returns nothing if FinalBossSummoning_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FinalBossSummoning.startCasting") else call error("Called FinalBossSummoning.startCasting on invalid object.") endif endif call FinalBossSummoning_startCasting(this_1, summoner) endfunction function alloc_CallbackSingle_doAfter_FinalBossSummoning_DestroyerSummoner 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] = 678 else call error("Out of memory: Could not create CallbackSingle_doAfter_FinalBossSummoning_DestroyerSummoner.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 678 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 BlockadeShip_init takes integer this_1 returns nothing endfunction function Buff_onApply takes integer this_1 returns nothing endfunction function Creep_init takes integer this_1 returns nothing endfunction function Log_warn takes string msg returns nothing call printLog_2283(Player_localPlayer, 3, msg) 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_2316 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_2316(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_1 = ClosureEvents_eventidToIndex[handle_getHandleId(this_1)] if id_1 == 0 then set id_1 = registerEventId(this_1) endif return id_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 EventListener_add_274 takes unit u_1, eventid eventId, integer listener returns integer local integer uid = unit_getIndex(u_1) if uid <= 0 then call Log_warn("Attempting to register event listener for a unit that is not indexed by UnitIndexer. " + "If this happens during initialization, consider registering the EventListener in a callback to nullTimer() instead.") return listener endif set EventListener_eventId[listener] = eventid_toIntId(eventId) set EventListener_uid[listener] = uid if EventListener_unitListenersFirsts[uid] != 0 then set EventListener_prev[EventListener_unitListenersFirsts[uid]] = listener set EventListener_next[listener] = EventListener_unitListenersFirsts[uid] endif set EventListener_unitListenersFirsts[uid] = listener return listener endfunction function Entity_DupletListModule_removeFromActive takes integer this_1 returns nothing set Entity_DupletListModule_activeSize = Entity_DupletListModule_activeSize - 1 if this_1 != Entity_DupletListModule_firstActive then set Entity_DupletListModule_next[Entity_DupletListModule_prev[this_1]] = Entity_DupletListModule_next[this_1] else set Entity_DupletListModule_firstActive = Entity_DupletListModule_next[this_1] endif if this_1 != Entity_DupletListModule_lastActive then set Entity_DupletListModule_prev[Entity_DupletListModule_next[this_1]] = Entity_DupletListModule_prev[this_1] else set Entity_DupletListModule_lastActive = Entity_DupletListModule_prev[this_1] endif set Entity_DupletListModule_prev[this_1] = 0 set Entity_DupletListModule_next[this_1] = 0 endfunction function dispatch_Entity_Entity_Entity_DupletListModule_removeFromActive 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.removeFromActive") else call error("Called Entity.removeFromActive on invalid object.") endif endif call Entity_DupletListModule_removeFromActive(this_1) endfunction function Entity_DupletListModule_removeFromInactive takes integer this_1 returns nothing set Entity_DupletListModule_inactiveSize = Entity_DupletListModule_inactiveSize - 1 if this_1 != Entity_DupletListModule_firstInactive then set Entity_DupletListModule_next[Entity_DupletListModule_prev[this_1]] = Entity_DupletListModule_next[this_1] else set Entity_DupletListModule_firstInactive = Entity_DupletListModule_next[this_1] endif if this_1 != Entity_DupletListModule_lastInactive then set Entity_DupletListModule_prev[Entity_DupletListModule_next[this_1]] = Entity_DupletListModule_prev[this_1] else set Entity_DupletListModule_lastInactive = Entity_DupletListModule_prev[this_1] endif set Entity_DupletListModule_prev[this_1] = 0 set Entity_DupletListModule_next[this_1] = 0 endfunction function dispatch_Entity_Entity_Entity_DupletListModule_removeFromInactive 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.removeFromInactive") else call error("Called Entity.removeFromInactive on invalid object.") endif endif call Entity_DupletListModule_removeFromInactive(this_1) endfunction function Entity_DupletListModule_remove takes integer this_1 returns nothing if Entity_DupletListModule_active[this_1] then set Entity_DupletListModule_active[this_1] = false call dispatch_Entity_Entity_Entity_DupletListModule_removeFromActive(this_1) else call dispatch_Entity_Entity_Entity_DupletListModule_removeFromInactive(this_1) endif endfunction function dispatch_Entity_Entity_Entity_DupletListModule_remove 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.remove") else call error("Called Entity.remove on invalid object.") endif endif call Entity_DupletListModule_remove(this_1) endfunction function Entity_onDestroy takes integer this_1 returns nothing call dispatch_Entity_Entity_Entity_DupletListModule_remove(this_1) endfunction function effect_destr takes effect this_1 returns nothing call DestroyEffect(this_1) endfunction function Fx2_onDestroy takes integer this_1 returns nothing call effect_destr(Fx2_eff[this_1]) endfunction function dealloc_Fx2 takes integer obj returns nothing if Fx2_typeId[obj] == 0 then call error("Double free: object of type Fx2") else set Fx2_nextFree[Fx2_firstFree] = obj set Fx2_firstFree = Fx2_firstFree + 1 set Fx2_typeId[obj] = 0 endif endfunction function destroyFx2 takes integer this_1 returns nothing call Fx2_onDestroy(this_1) call dealloc_Fx2(this_1) endfunction function dispatch_Fx2_destroyFx2 takes integer this_1 returns nothing if Fx2_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx2.Fx2") else call error("Called Fx2.Fx2 on invalid object.") endif endif call destroyFx2(this_1) endfunction function effect_setAlpha takes effect this_1, integer alpha returns nothing call BlzSetSpecialEffectAlpha(this_1, alpha) endfunction function effect_setPos_1850 takes effect this_1, real pos_x, real pos_y returns nothing call BlzSetSpecialEffectPosition(this_1, pos_x, pos_y, BlzGetLocalSpecialEffectZ(this_1)) endfunction function Fx2Entity_onDestroy takes integer this_1 returns nothing if Fx2Entity_silent[this_1] then call effect_setAlpha(Fx2_eff[Fx2Entity_fx[this_1]], 0) call effect_setPos_1850(Fx2_eff[Fx2Entity_fx[this_1]], MapBounds_boundMax_x, MapBounds_boundMax_y) endif call dispatch_Fx2_destroyFx2(Fx2Entity_fx[this_1]) call Entity_onDestroy(this_1) endfunction function dealloc_OnEndListener takes integer obj returns nothing if OnEndListener_typeId[obj] == 0 then call error("Double free: object of type OnEndListener") else set OnEndListener_firstFree = OnEndListener_firstFree + 1 set OnEndListener_typeId[obj] = 0 endif endfunction function destroyOnEndListener takes integer this_1 returns nothing call dealloc_OnEndListener(this_1) endfunction function dispatch_OnEndListener_destroyOnEndListener takes integer this_1 returns nothing if OnEndListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnEndListener.OnEndListener") else call error("Called OnEndListener.OnEndListener on invalid object.") endif endif call destroyOnEndListener(this_1) endfunction function dealloc_OnHitListener takes integer obj returns nothing if OnHitListener_typeId[obj] == 0 then call error("Double free: object of type OnHitListener") else set OnHitListener_firstFree = OnHitListener_firstFree + 1 set OnHitListener_typeId[obj] = 0 endif endfunction function destroyOnHitListener takes integer this_1 returns nothing call dealloc_OnHitListener(this_1) endfunction function dispatch_OnHitListener_destroyOnHitListener takes integer this_1 returns nothing if OnHitListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnHitListener.OnHitListener") else call error("Called OnHitListener.OnHitListener on invalid object.") endif endif call destroyOnHitListener(this_1) endfunction function group_destr takes group this_1 returns nothing call DestroyGroup(this_1) endfunction function Projectile_onDestroy takes integer this_1 returns nothing if Projectile_onEnd[this_1] != 0 then call group_destr(Projectile_hitGroup[this_1]) call dispatch_OnEndListener_destroyOnEndListener(Projectile_onEnd[this_1]) endif if Projectile_onHit[this_1] != 0 then call dispatch_OnHitListener_destroyOnHitListener(Projectile_onHit[this_1]) endif call Fx2Entity_onDestroy(this_1) endfunction function TowerBlockadeBuff_init takes integer this_1 returns nothing endfunction function unit_getEntity takes unit this_1 returns integer return Entity_entities[unit_getIndex(this_1)] endfunction function unit_isAlive takes unit this_1 returns boolean return UnitAlive(this_1) endfunction function unit_kill takes unit this_1 returns nothing call KillUnit(this_1) endfunction function unit_remove takes unit this_1 returns nothing call RemoveUnit(this_1) endfunction function unit_setEntity takes unit this_1, integer e returns nothing set Entity_entities[unit_getIndex(this_1)] = e endfunction function UnitEntity_onDestroy takes integer this_1 returns nothing if unit_getEntity(UnitEntity_actor[this_1]) == this_1 then call unit_setEntity(UnitEntity_actor[this_1], 0) if unit_isAlive(UnitEntity_actor[this_1]) then if Frentity_config_KILL_ACTORS then call unit_kill(UnitEntity_actor[this_1]) else call unit_remove(UnitEntity_actor[this_1]) endif endif endif set UnitEntity_actor[this_1] = null call Entity_onDestroy(this_1) endfunction function Tower_onDestroy takes integer this_1 returns nothing call UnitEntity_onDestroy(this_1) endfunction function TroopGround_init takes integer this_1 returns nothing endfunction function UnitEntity_init takes integer this_1 returns nothing set UnitEntity_actor[this_1] = null endfunction function addEffect takes string path, real pos_x, real pos_y returns effect return AddSpecialEffect(path, pos_x, pos_y) endfunction function alloc_BlockadeShip 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] = 934 else call error("Out of memory: Could not create BlockadeShip.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 934 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_Creep_Creep 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] = 672 else call error("Out of memory: Could not create CallbackSingle_doAfter_Creep_Creep.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 672 endif return this_1 endfunction function alloc_Creep 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] = 936 else call error("Out of memory: Could not create Creep.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 936 endif return this_1 endfunction function alloc_EventListener_add_BlockadeShip_TowerBlockade 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] = 751 else call error("Out of memory: Could not create EventListener_add_BlockadeShip_TowerBlockade.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 751 endif return this_1 endfunction function alloc_EventListener_add_Creep_Creep 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] = 754 else call error("Out of memory: Could not create EventListener_add_Creep_Creep.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 754 endif return this_1 endfunction function alloc_EventListener_add_TowerBlockadeBuff_TowerBlockade 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] = 769 else call error("Out of memory: Could not create EventListener_add_TowerBlockadeBuff_TowerBlockade.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 769 endif return this_1 endfunction function alloc_EventListener_add_WarningBuff_WarningBuff 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] = 775 else call error("Out of memory: Could not create EventListener_add_WarningBuff_WarningBuff.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 775 endif return this_1 endfunction function alloc_TowerBlockadeBuff takes nothing returns integer local integer this_1 if Buff_firstFree == 0 then if Buff_maxIndex < JASS_MAX_ARRAY_SIZE then set Buff_maxIndex = Buff_maxIndex + 1 set this_1 = Buff_maxIndex set Buff_typeId[this_1] = 650 else call error("Out of memory: Could not create TowerBlockadeBuff.") set this_1 = 0 endif else set Buff_firstFree = Buff_firstFree - 1 set this_1 = Buff_nextFree[Buff_firstFree] set Buff_typeId[this_1] = 650 endif return this_1 endfunction function alloc_TroopGround 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] = 964 else call error("Out of memory: Could not create TroopGround.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 964 endif return this_1 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 set Entity_DupletListModule_prev[this_1] = 0 else set Entity_DupletListModule_prev[this_1] = Entity_DupletListModule_lastActive set Entity_DupletListModule_next[Entity_DupletListModule_lastActive] = this_1 set Entity_DupletListModule_prev[Entity_DupletListModule_firstActive] = this_1 endif set Entity_DupletListModule_next[this_1] = 0 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_DupletListModule_active[this_1] = true set Entity_gravity[this_1] = PhysicsConstants_defaultGravity set Entity_speedFactor[this_1] = 1. set Entity_flying[this_1] = false set Entity_done[this_1] = false set Entity_sleeps[this_1] = true set Entity_idleSeconds[this_1] = 0 call construct_Entity_DupletListModule(this_1) endfunction function Entity_setFlying takes integer this_1, boolean flag returns nothing set Entity_flying[this_1] = flag 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_1, 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 cond_result local real temp local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 set tuple_temp_3 = vel_x set tuple_temp_4 = vel_y set tuple_temp_5 = vel_z set Entity_vel_x[this_1] = tuple_temp_3 set Entity_vel_y[this_1] = tuple_temp_4 set Entity_vel_z[this_1] = tuple_temp_5 set Entity_owner[this_1] = owner_1 set Entity_radius[this_1] = radius set Entity_radius2[this_1] = radius * radius set temp = pos_z if Frentity_config_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_1, 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_1, radius) endfunction function construct_Entity5 takes integer this_1, player owner_1, 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_1, radius) 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 NormalBuff_init takes integer this_1 returns nothing endfunction function construct_Buff_LinkedListModule takes integer this_1 returns nothing set Buff_LinkedListModule_size = Buff_LinkedListModule_size + 1 if Buff_LinkedListModule_size == 1 then set Buff_LinkedListModule_first = this_1 set Buff_LinkedListModule_prev[this_1] = 0 else set Buff_LinkedListModule_prev[this_1] = Buff_LinkedListModule_last set Buff_LinkedListModule_next[Buff_LinkedListModule_last] = this_1 set Buff_LinkedListModule_prev[Buff_LinkedListModule_first] = this_1 endif set Buff_LinkedListModule_next[this_1] = 0 set Buff_LinkedListModule_last = this_1 endfunction function Buff_init takes integer this_1 returns nothing set Buff_target[this_1] = null set Buff_done[this_1] = false call construct_Buff_LinkedListModule(this_1) endfunction function construct_Buff takes integer this_1, real duration, integer buffData_abilId, integer buffData_buffId returns nothing local integer tuple_temp local integer tuple_temp_1 call Buff_init(this_1) set Buff_duration[this_1] = duration set tuple_temp = buffData_abilId set tuple_temp_1 = buffData_buffId set Buff_buffData_abilId[this_1] = tuple_temp set Buff_buffData_buffId[this_1] = tuple_temp_1 endfunction function construct_NormalBuff takes integer this_1, real dur, integer buffData_abilId, integer buffData_buffId returns nothing call construct_Buff(this_1, dur, buffData_abilId, buffData_buffId) call NormalBuff_init(this_1) endfunction function angle_degrees takes real this_radians returns real return this_radians * Angle_RADTODEG endfunction function createUnit takes player p, integer unitId, real pos_x, real pos_y, real facing_radians returns unit return CreateUnit(p, unitId, pos_x, pos_y, angle_degrees(facing_radians)) endfunction function unit_setFlyHeight takes unit this_1, real height, real rate returns nothing call SetUnitFlyHeight(this_1, height, rate) endfunction function vec3_getTerrainZ takes real this_x, real this_y, real this_z returns real call MoveLocation(Vectors_tempLoc, this_x, this_y) return GetLocationZ(Vectors_tempLoc) endfunction function createUnitZ takes player p, integer unitId, real pos_x, real pos_y, real pos_z, real facing_radians returns unit local unit receiver = CreateUnit(p, unitId, pos_x, pos_y, angle_degrees(facing_radians)) call unit_setFlyHeight(receiver, pos_z - vec3_getTerrainZ(pos_x, pos_y, pos_z), 0.) return receiver endfunction function Buff_onEnd takes integer this_1 returns nothing 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] = 932 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] = 932 endif return this_1 endfunction function TextTagEntity_init takes integer this_1 returns nothing endfunction function alloc_Iterator_1079 takes nothing returns integer local integer this_1 if Iterator_firstFree_570 == 0 then if Iterator_maxIndex_573 < JASS_MAX_ARRAY_SIZE then set Iterator_maxIndex_573 = Iterator_maxIndex_573 + 1 set this_1 = Iterator_maxIndex_573 set Iterator_typeId_579[this_1] = 855 else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree_570 = Iterator_firstFree_570 - 1 set this_1 = Iterator_nextFree_576[Iterator_firstFree_570] set Iterator_typeId_579[this_1] = 855 endif return this_1 endfunction function Iterator_init_519 takes integer this_1 returns nothing set Iterator_current_566[this_1] = FText_LinkedListModule_first endfunction function construct_Iterator_1304 takes integer this_1, boolean destroyOnClose returns nothing call Iterator_init_519(this_1) set Iterator_destroyOnClose[this_1] = destroyOnClose endfunction function new_Iterator_2156 takes boolean destroyOnClose returns integer local integer this_1 = alloc_Iterator_1079() call construct_Iterator_1304(this_1, destroyOnClose) return this_1 endfunction function FText_LinkedListModule_iterator takes nothing returns integer return new_Iterator_2156(true) endfunction function Iterator_onDestroy_524 takes integer this_1 returns nothing endfunction function dealloc_Iterator_1442 takes integer obj returns nothing if Iterator_typeId_579[obj] == 0 then call error("Double free: object of type Iterator") else set Iterator_nextFree_576[Iterator_firstFree_570] = obj set Iterator_firstFree_570 = Iterator_firstFree_570 + 1 set Iterator_typeId_579[obj] = 0 endif endfunction function destroyIterator_1533 takes integer this_1 returns nothing call Iterator_onDestroy_524(this_1) call dealloc_Iterator_1442(this_1) endfunction function dispatch_Iterator_destroyIterator_1727 takes integer this_1 returns nothing if Iterator_typeId_579[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_1533(this_1) endfunction function Iterator_close_513 takes integer this_1 returns nothing if Iterator_destroyOnClose[this_1] then call dispatch_Iterator_destroyIterator_1727(this_1) endif endfunction function Iterator_hasNext_516 takes integer this_1 returns boolean return Iterator_current_566[this_1] != 0 endfunction function Iterator_next_522 takes integer this_1 returns integer local integer res = Iterator_current_566[this_1] set Iterator_current_566[this_1] = FText_LinkedListModule_next[Iterator_current_566[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] = 677 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] = 677 endif return this_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 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 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_1478[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 LLEntry_onDestroy takes integer this_1 returns nothing endfunction function dealloc_LLEntry takes integer obj returns nothing if LLEntry_typeId[obj] == 0 then call error("Double free: object of type LLEntry") else set LLEntry_nextFree[LLEntry_firstFree] = obj set LLEntry_firstFree = LLEntry_firstFree + 1 set LLEntry_typeId[obj] = 0 endif endfunction function destroyLLEntry takes integer this_1 returns nothing call LLEntry_onDestroy(this_1) call dealloc_LLEntry(this_1) endfunction function dispatch_LLEntry_destroyLLEntry takes integer this_1 returns nothing if LLEntry_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLEntry.LLEntry") else call error("Called LLEntry.LLEntry on invalid object.") endif endif call destroyLLEntry(this_1) endfunction function LinkedList_removeEntry takes integer this_1, integer entry returns nothing set LLEntry_next[LLEntry_prev[entry]] = LLEntry_next[entry] set LLEntry_prev[LLEntry_next[entry]] = LLEntry_prev[entry] call dispatch_LLEntry_destroyLLEntry(entry) set LinkedList_size[this_1] = LinkedList_size[this_1] - 1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_removeEntry takes integer this_1, integer entry returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.removeEntry") else call error("Called LinkedList.removeEntry on invalid object.") endif endif call LinkedList_removeEntry(this_1, entry) endfunction function LinkedList_dequeue takes integer this_1 returns integer local integer top = LLEntry_next[LinkedList_dummy[this_1]] local integer result_1 = 0 if top != LinkedList_dummy[this_1] then set result_1 = LLEntry_elem[top] call dispatch_LinkedList_LinkedList_LinkedList_removeEntry(this_1, top) endif return result_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_dequeue takes integer this_1 returns integer local integer LinkedList_LinkedList_dequeue_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.dequeue") else call error("Called LinkedList.dequeue on invalid object.") endif endif set LinkedList_LinkedList_dequeue_result = LinkedList_dequeue(this_1) return LinkedList_LinkedList_dequeue_result endfunction function 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] = 776 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] = 776 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_2373 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_1364 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_516(iterator) set etext = Iterator_next_522(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_513(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_2373(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 Entity_sleeps[this_1] = false set TextTagEntity_dur[this_1] = duration set tuple_temp = vel_x set tuple_temp_1 = vel_y set tuple_temp_2 = vel_z set Entity_vel_x[this_1] = tuple_temp set Entity_vel_y[this_1] = tuple_temp_1 set Entity_vel_z[this_1] = tuple_temp_2 set tuple_temp_3 = col_red set tuple_temp_4 = col_green set tuple_temp_5 = col_blue set tuple_temp_6 = col_alpha set TextTagEntity_col_red[this_1] = tuple_temp_3 set TextTagEntity_col_green[this_1] = tuple_temp_4 set TextTagEntity_col_blue[this_1] = tuple_temp_5 set TextTagEntity_col_alpha[this_1] = tuple_temp_6 set TextTagEntity_ftext[this_1] = createFText_1364(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 ShieldKitBuff_onEnd takes integer this_1 returns nothing if Buff_duration[this_1] == 90. then call new_TextTagEntity(ShieldKitBuff_pos_x[this_1], ShieldKitBuff_pos_y[this_1], ShieldKitBuff_pos_z[this_1], 0., 0., GetRandomReal(9., 12.), "Shield applied", 13., 1.55, 255, 204, 12, 255) else call new_TextTagEntity(ShieldKitBuff_pos_x[this_1], ShieldKitBuff_pos_y[this_1], ShieldKitBuff_pos_z[this_1], 0., 0., GetRandomReal(9., 12.), "Shield collapsed", 13., 1.55, 255, 204, 12, 255) endif endfunction function dealloc_BlockadeShip takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type BlockadeShip") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif 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_nextFree[Buff_firstFree] = obj 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 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 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_unpause takes unit this_1 returns nothing call PauseUnit(this_1, false) endfunction function Tower_unpause takes integer this_1 returns nothing call unit_unpause(UnitEntity_actor[this_1]) endfunction function TrooperTower_unpause takes integer this_1 returns nothing local integer iterator local integer troop call Tower_unpause(this_1) set iterator = LinkedList_iterator(TrooperTower_troops[this_1]) loop exitwhen not LLIterator_hasNext(iterator) set troop = LLIterator_next(iterator) call unit_unpause(UnitEntity_actor[troop]) endloop call LLIterator_close(iterator) endfunction function dispatch_Tower_Tower_Tower_unpause takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Tower.unpause") else call error("Called Tower.unpause on invalid object.") endif endif if Serializable_typeId[this_1] <= 960 then if Serializable_typeId[this_1] <= 959 then call Tower_unpause(this_1) else call TrooperTower_unpause(this_1) endif else call Tower_unpause(this_1) endif 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(10, 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 unit_isAlive(UnitEntity_actor[bff]) then call cyc_unit_removeBuff(10, null, BlockadeShip_blockadeBuff[bff]) endif call UnitEntity_onDestroy(bff) elseif funcChoice == 5 then call cyc_unit_removeBuff(4, null, bff) call dealloc_BlockadeShip(bff) elseif funcChoice == 6 then if Serializable_typeId[bff] == 0 then if bff == 0 then call error("Nullpointer exception when calling BlockadeShip.BlockadeShip") else call error("Called BlockadeShip.BlockadeShip on invalid object.") endif endif call cyc_unit_removeBuff(5, null, bff) elseif funcChoice == 7 then call effect_destr(TowerBlockadeBuff_blockadeEffect[bff]) if TowerBlockadeBuff_blockadeUnit[bff] != 0 and unit_isAlive(UnitEntity_actor[TowerBlockadeBuff_blockadeUnit[bff]]) then call cyc_unit_removeBuff(6, null, TowerBlockadeBuff_blockadeUnit[bff]) endif if Buff_target[bff] != null and unit_isAlive(Buff_target[bff]) then call dispatch_Tower_Tower_Tower_unpause(unit_getEntity(Buff_target[bff])) endif elseif funcChoice == 8 then if Buff_typeId[bff] == 0 then if bff == 0 then call error("Nullpointer exception when calling Buff.onEnd") else call error("Called Buff.onEnd on invalid object.") endif endif if Buff_typeId[bff] <= 649 then if Buff_typeId[bff] <= 648 then if Buff_typeId[bff] <= 647 then call Buff_onEnd(bff) else call ShieldKitBuff_onEnd(bff) endif else call Buff_onEnd(bff) endif elseif Buff_typeId[bff] <= 650 then call cyc_unit_removeBuff(7, null, bff) else call Buff_onEnd(bff) endif elseif funcChoice == 9 then if not Buff_done[bff] then set Buff_done[bff] = true call cyc_unit_removeBuff(8, null, bff) call cyc_unit_removeBuff(3, null, bff) endif elseif funcChoice == 10 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(9, null, bff) endif endfunction function dealloc_PhysicsProjectile takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type PhysicsProjectile") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function dealloc_Rocket takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Rocket") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function dealloc_Shrapnell takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Shrapnell") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function dealloc_TowerBlockadeMissile takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type TowerBlockadeMissile") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function dealloc_TrooperTower takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type TrooperTower") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function effect_setPos takes effect this_1, real pos_x, real pos_y, real pos_z returns nothing call BlzSetSpecialEffectPosition(this_1, pos_x, pos_y, pos_z) endfunction function addEffect_928 takes string path, real pos_x, real pos_y, real pos_z returns effect local effect receiver = AddSpecialEffect(path, pos_x, pos_y) call effect_setPos(receiver, pos_x, pos_y, pos_z) return receiver endfunction function DummyDamage_amount_1 takes integer this_1, real amount returns nothing set DummyDamage_amount[this_1] = amount endfunction function dispatch_DummyDamage_DummyDamage_DummyDamage_amount takes integer this_1, real amount returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.amount") else call error("Called DummyDamage.amount on invalid object.") endif endif call DummyDamage_amount_1(this_1, amount) 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] = 859 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] = 859 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 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 unitToIndex takes unit object returns integer return handle_getTCHandleId(object) endfunction function unit_pause takes unit this_1 returns nothing call PauseUnit(this_1, true) 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 DummyDamage_onDestroy takes integer this_1 returns nothing call DummyRecycler_recycle(DummyDamage_dummy[this_1]) endfunction function dealloc_DummyDamage takes integer obj returns nothing if DummyDamage_typeId[obj] == 0 then call error("Double free: object of type DummyDamage") else set DummyDamage_nextFree[DummyDamage_firstFree] = obj set DummyDamage_firstFree = DummyDamage_firstFree + 1 set DummyDamage_typeId[obj] = 0 endif endfunction function destroyDummyDamage takes integer this_1 returns nothing call DummyDamage_onDestroy(this_1) call dealloc_DummyDamage(this_1) endfunction function dispatch_DummyDamage_destroyDummyDamage takes integer this_1 returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.DummyDamage") else call error("Called DummyDamage.DummyDamage on invalid object.") endif endif call destroyDummyDamage(this_1) endfunction function unit_damageTarget takes unit this_1, widget target_1, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns nothing call UnitDamageTarget(this_1, target_1, amount, attack, ranged, attackType, damageType, weaponType) endfunction function DummyDamage_apply_206 takes integer this_1, boolean terminate returns nothing local unit receiver = DummyDamage_dummy[this_1] local unit receiver_1 call unit_setOwner(receiver, DummyDamage_attacker[this_1], false) set receiver_1 = receiver call unit_damageTarget(receiver_1, DummyDamage_target[this_1], DummyDamage_amount[this_1], DummyDamage_attack[this_1], DummyDamage_ranged[this_1], DummyDamage_attackType[this_1], DummyDamage_damageType[this_1], DummyDamage_weaponType[this_1]) if terminate then call dispatch_DummyDamage_destroyDummyDamage(this_1) endif endfunction function dispatch_DummyDamage_DummyDamage_DummyDamage_apply_1629 takes integer this_1, boolean terminate returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.apply") else call error("Called DummyDamage.apply on invalid object.") endif endif call DummyDamage_apply_206(this_1, terminate) endfunction function DummyDamage_apply takes integer this_1 returns nothing call dispatch_DummyDamage_DummyDamage_DummyDamage_apply_1629(this_1, false) endfunction function dispatch_DummyDamage_DummyDamage_DummyDamage_apply takes integer this_1 returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.apply") else call error("Called DummyDamage.apply on invalid object.") endif endif call DummyDamage_apply(this_1) endfunction function DummyDamage_attackType_1 takes integer this_1, attacktype attackType returns nothing set DummyDamage_attackType[this_1] = attackType endfunction function dispatch_DummyDamage_DummyDamage_DummyDamage_attackType takes integer this_1, attacktype attackType returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.attackType") else call error("Called DummyDamage.attackType on invalid object.") endif endif call DummyDamage_attackType_1(this_1, attackType) endfunction function DummyDamage_attacker_1 takes integer this_1, player attacker returns nothing set DummyDamage_attacker[this_1] = attacker endfunction function dispatch_DummyDamage_DummyDamage_DummyDamage_attacker takes integer this_1, player attacker returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.attacker") else call error("Called DummyDamage.attacker on invalid object.") endif endif call DummyDamage_attacker_1(this_1, attacker) endfunction function DummyDamage_target_1 takes integer this_1, widget target_1 returns nothing set DummyDamage_target[this_1] = target_1 endfunction function dispatch_DummyDamage_DummyDamage_DummyDamage_target takes integer this_1, widget target_1 returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.target") else call error("Called DummyDamage.target on invalid object.") endif endif call DummyDamage_target_1(this_1, target_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 isUnitTargetable takes unit u_1 returns boolean return ( not IsUnitType(u_1, UNIT_TYPE_DEAD)) and ( not IsUnitType(u_1, UNIT_TYPE_MAGIC_IMMUNE)) and ( not IsUnitType(u_1, UNIT_TYPE_STRUCTURE)) endfunction function alloc_DummyDamage takes nothing returns integer local integer this_1 if DummyDamage_firstFree == 0 then if DummyDamage_maxIndex < JASS_MAX_ARRAY_SIZE then set DummyDamage_maxIndex = DummyDamage_maxIndex + 1 set this_1 = DummyDamage_maxIndex set DummyDamage_typeId[this_1] = 741 else call error("Out of memory: Could not create DummyDamage.") set this_1 = 0 endif else set DummyDamage_firstFree = DummyDamage_firstFree - 1 set this_1 = DummyDamage_nextFree[DummyDamage_firstFree] set DummyDamage_typeId[this_1] = 741 endif return this_1 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 real_round takes real this_1 returns integer local integer cond_result if this_1 > 0. then set cond_result = real_toInt(this_1 + .5) else set cond_result = real_toInt(this_1 - .5) endif return cond_result endfunction function hashtable_loadUnitHandle takes hashtable this_1, integer parentKey, integer childKey returns unit return LoadUnitHandle(this_1, parentKey, childKey) endfunction function Table_loadUnit takes integer this_1, integer parentKey returns unit return hashtable_loadUnitHandle(Table_ht, this_1, parentKey) endfunction function dispatch_Table_Table_Table_loadUnit takes integer this_1, integer parentKey returns unit local unit Table_Table_loadUnit_result if Table_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Table.loadUnit") else call error("Called Table.loadUnit on invalid object.") endif endif set Table_Table_loadUnit_result = Table_loadUnit(this_1, parentKey) return Table_Table_loadUnit_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 unitFromIndex takes integer index returns unit call dispatch_Table_Table_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_Table_Table_loadUnit(TypeCasting_typecastdata, 0) endfunction function DummyRecycler_get takes real pos_x, real pos_y, real a_radians returns unit local integer angleIndex = ModuloInteger(real_round(ModuloReal(angle_degrees(a_radians), 360.) / DummyRecycler_ANGLE_DEGREE), DummyRecycler_DIFFERENT_ANGLES) local unit receiver local unit receiver_1 if dispatch_LinkedList_LinkedList_LinkedList_size(DummyRecycler_angleQueues[angleIndex]) > 0 then set receiver = unitFromIndex(dispatch_LinkedList_LinkedList_LinkedList_dequeue(DummyRecycler_angleQueues[angleIndex])) call unit_setXY(receiver, pos_x, pos_y) set receiver_1 = receiver call unit_unpause(receiver_1) return receiver_1 else return createDummy(pos_x, pos_y, a_radians) endif endfunction function DummyDamage_init takes integer this_1 returns nothing local real tuple_temp local real tuple_temp_1 set DummyDamage_dummy[this_1] = DummyRecycler_get(DummyDamage_origin_x[this_1], DummyDamage_origin_y[this_1], 0.) set DummyDamage_target[this_1] = null set DummyDamage_amount[this_1] = 0. set DummyDamage_attack[this_1] = false set DummyDamage_ranged[this_1] = false set tuple_temp = Vectors_ZERO2_x set tuple_temp_1 = Vectors_ZERO2_y set DummyDamage_origin_x[this_1] = tuple_temp set DummyDamage_origin_y[this_1] = tuple_temp_1 set DummyDamage_attacker[this_1] = Basics_DUMMY_PLAYER set DummyDamage_attackType[this_1] = ATTACK_TYPE_CHAOS set DummyDamage_damageType[this_1] = DAMAGE_TYPE_UNKNOWN set DummyDamage_weaponType[this_1] = WEAPON_TYPE_WHOKNOWS endfunction function construct_DummyDamage takes integer this_1 returns nothing call DummyDamage_init(this_1) endfunction function new_DummyDamage takes nothing returns integer local integer this_1 = alloc_DummyDamage() call construct_DummyDamage(this_1) return this_1 endfunction function ArtilleryMissile_onDestroy takes integer this_1 returns nothing local integer receiver = new_DummyDamage() local integer dmg local integer receiver_1 local integer receiver_2 local unit u_1 local group from local integer receiver_3 local integer receiver_4 call dispatch_DummyDamage_DummyDamage_DummyDamage_attacker(receiver, Entity_owner[this_1]) set receiver_1 = receiver call dispatch_DummyDamage_DummyDamage_DummyDamage_amount(receiver_1, ArtilleryMissile_damage[this_1]) set receiver_2 = receiver_1 call dispatch_DummyDamage_DummyDamage_DummyDamage_attackType(receiver_2, ATTACK_TYPE_SIEGE) set dmg = receiver_2 call GroupEnumUnitsInRange(Group_ENUM_GROUP, Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_radius[this_1], null) set from = Group_ENUM_GROUP loop exitwhen not group_hasNext(from) set u_1 = group_next(from) if isUnitTargetable(u_1) and IsUnitEnemy(u_1, Entity_owner[this_1]) then set receiver_3 = dmg call dispatch_DummyDamage_DummyDamage_DummyDamage_target(receiver_3, u_1) set receiver_4 = receiver_3 call dispatch_DummyDamage_DummyDamage_DummyDamage_apply(receiver_4) endif endloop call dispatch_DummyDamage_destroyDummyDamage(dmg) call effect_destr(addEffect_928(Abilities_fragDriller, Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1])) call Projectile_onDestroy(this_1) endfunction function dealloc_ArtilleryMissile takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type ArtilleryMissile") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyArtilleryMissile takes integer this_1 returns nothing call ArtilleryMissile_onDestroy(this_1) call dealloc_ArtilleryMissile(this_1) endfunction function ArtilleryTower_onDestroy takes integer this_1 returns nothing call Tower_onDestroy(this_1) endfunction function dealloc_ArtilleryTower takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type ArtilleryTower") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyArtilleryTower takes integer this_1 returns nothing call ArtilleryTower_onDestroy(this_1) call dealloc_ArtilleryTower(this_1) endfunction function Ball_onDestroy takes integer this_1 returns nothing call Fx2Entity_onDestroy(this_1) endfunction function dealloc_Ball takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Ball") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBall takes integer this_1 returns nothing call Ball_onDestroy(this_1) call dealloc_Ball(this_1) endfunction function Creep_onDestroy takes integer this_1 returns nothing call UnitEntity_onDestroy(this_1) endfunction function Boss_onDestroy takes integer this_1 returns nothing call Creep_onDestroy(this_1) endfunction function dealloc_Boss takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Boss") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBoss takes integer this_1 returns nothing call Boss_onDestroy(this_1) call dealloc_Boss(this_1) endfunction function BossFive_onDestroy takes integer this_1 returns nothing call Boss_onDestroy(this_1) endfunction function dealloc_BossFive takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type BossFive") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBossFive takes integer this_1 returns nothing call BossFive_onDestroy(this_1) call dealloc_BossFive(this_1) endfunction function BossFour_onDestroy takes integer this_1 returns nothing call Boss_onDestroy(this_1) endfunction function dealloc_BossFour takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type BossFour") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBossFour takes integer this_1 returns nothing call BossFour_onDestroy(this_1) call dealloc_BossFour(this_1) endfunction function BossOne_onDestroy takes integer this_1 returns nothing call Boss_onDestroy(this_1) endfunction function dealloc_BossOne takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type BossOne") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBossOne takes integer this_1 returns nothing call BossOne_onDestroy(this_1) call dealloc_BossOne(this_1) endfunction function BossThree_onDestroy takes integer this_1 returns nothing call Boss_onDestroy(this_1) endfunction function dealloc_BossThree takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type BossThree") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBossThree takes integer this_1 returns nothing call BossThree_onDestroy(this_1) call dealloc_BossThree(this_1) endfunction function BossTwo_onDestroy takes integer this_1 returns nothing call Boss_onDestroy(this_1) endfunction function dealloc_BossTwo takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type BossTwo") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBossTwo takes integer this_1 returns nothing call BossTwo_onDestroy(this_1) call dealloc_BossTwo(this_1) endfunction function player_getId takes player this_1 returns integer return GetPlayerId(this_1) endfunction function Builder_onDestroy takes integer this_1 returns nothing set PlayerData_builder[PlayerData_pDatas[player_getId(Entity_owner[this_1])]] = 0 call UnitEntity_onDestroy(this_1) endfunction function dealloc_Builder takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Builder") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyBuilder takes integer this_1 returns nothing call Builder_onDestroy(this_1) call dealloc_Builder(this_1) endfunction function dealloc_Creep takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Creep") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyCreep takes integer this_1 returns nothing call Creep_onDestroy(this_1) call dealloc_Creep(this_1) endfunction function DestroyerSummoner_onDestroy takes integer this_1 returns nothing call Creep_onDestroy(this_1) endfunction function dealloc_DestroyerSummoner takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type DestroyerSummoner") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyDestroyerSummoner takes integer this_1 returns nothing call DestroyerSummoner_onDestroy(this_1) call dealloc_DestroyerSummoner(this_1) endfunction function EndBoss_onDestroy takes integer this_1 returns nothing call Boss_onDestroy(this_1) endfunction function dealloc_EndBoss takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type EndBoss") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyEndBoss takes integer this_1 returns nothing call EndBoss_onDestroy(this_1) call dealloc_EndBoss(this_1) endfunction function dealloc_Entity takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Entity") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyEntity takes integer this_1 returns nothing call Entity_onDestroy(this_1) call dealloc_Entity(this_1) endfunction function FlameMissile_onDestroy takes integer this_1 returns nothing call Projectile_onDestroy(this_1) endfunction function dealloc_FlameMissile takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type FlameMissile") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyFlameMissile takes integer this_1 returns nothing call FlameMissile_onDestroy(this_1) call dealloc_FlameMissile(this_1) endfunction function FlamethrowerTower_onDestroy takes integer this_1 returns nothing call Tower_onDestroy(this_1) endfunction function dealloc_FlamethrowerTower takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type FlamethrowerTower") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyFlamethrowerTower takes integer this_1 returns nothing call FlamethrowerTower_onDestroy(this_1) call dealloc_FlamethrowerTower(this_1) endfunction function ForceField_onDestroy takes integer this_1 returns nothing call Fx2Entity_onDestroy(this_1) endfunction function dealloc_ForceField takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type ForceField") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyForceField takes integer this_1 returns nothing call ForceField_onDestroy(this_1) call dealloc_ForceField(this_1) endfunction function dealloc_Fx2Entity takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Fx2Entity") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyFx2Entity takes integer this_1 returns nothing call Fx2Entity_onDestroy(this_1) call dealloc_Fx2Entity(this_1) endfunction function HealbackMissile_onDestroy takes integer this_1 returns nothing call Projectile_onDestroy(this_1) endfunction function dealloc_HealbackMissile takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type HealbackMissile") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyHealbackMissile takes integer this_1 returns nothing call HealbackMissile_onDestroy(this_1) call dealloc_HealbackMissile(this_1) endfunction function HealbackTower_onDestroy takes integer this_1 returns nothing call Tower_onDestroy(this_1) endfunction function dealloc_HealbackTower takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type HealbackTower") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyHealbackTower takes integer this_1 returns nothing call HealbackTower_onDestroy(this_1) call dealloc_HealbackTower(this_1) 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 item_getTypeId takes item this_1 returns integer return GetItemTypeId(this_1) endfunction function item_isAlive takes item this_1 returns boolean return item_getTypeId(this_1) != 0 and GetWidgetLife(this_1) > .405 endfunction function item_remove takes item this_1 returns nothing call RemoveItem(this_1) endfunction function item_setUserData takes item this_1, integer data_1 returns nothing call SetItemUserData(this_1, data_1) endfunction function item_setEntity takes item this_1, integer e returns nothing call item_setUserData(this_1, e) endfunction function ItemEntity_onDestroy takes integer this_1 returns nothing if item_getEntity(ItemEntity_actor[this_1]) == this_1 then call item_setEntity(ItemEntity_actor[this_1], 0) if item_isAlive(ItemEntity_actor[this_1]) then call item_remove(ItemEntity_actor[this_1]) endif endif set ItemEntity_actor[this_1] = null call Entity_onDestroy(this_1) endfunction function dealloc_ItemEntity takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type ItemEntity") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyItemEntity takes integer this_1 returns nothing call ItemEntity_onDestroy(this_1) call dealloc_ItemEntity(this_1) endfunction function dealloc_Projectile takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Projectile") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyProjectile takes integer this_1 returns nothing call Projectile_onDestroy(this_1) call dealloc_Projectile(this_1) endfunction function Reinforcement_onDestroy takes integer this_1 returns nothing call UnitEntity_onDestroy(this_1) endfunction function dealloc_Reinforcement takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Reinforcement") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyReinforcement takes integer this_1 returns nothing call Reinforcement_onDestroy(this_1) call dealloc_Reinforcement(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 Selector_onDestroy takes integer this_1 returns nothing call unit_remove(UnitEntity_actor[this_1]) call dispatch_FText_destroyFText(Selector_ownerTag[this_1]) set PlayerData_select[PlayerData_pDatas[player_getId(Entity_owner[this_1])]] = 0 call UnitEntity_onDestroy(this_1) endfunction function dealloc_Selector takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Selector") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySelector takes integer this_1 returns nothing call Selector_onDestroy(this_1) call dealloc_Selector(this_1) endfunction function Special_onDestroy takes integer this_1 returns nothing call Creep_onDestroy(this_1) endfunction function Spawn_onDestroy takes integer this_1 returns nothing call Special_onDestroy(this_1) endfunction function dealloc_Spawn takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Spawn") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySpawn takes integer this_1 returns nothing call Spawn_onDestroy(this_1) call dealloc_Spawn(this_1) endfunction function dealloc_Special takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Special") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySpecial takes integer this_1 returns nothing call Special_onDestroy(this_1) call dealloc_Special(this_1) endfunction function SpecialFive_onDestroy takes integer this_1 returns nothing call Special_onDestroy(this_1) endfunction function dealloc_SpecialFive takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type SpecialFive") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySpecialFive takes integer this_1 returns nothing call SpecialFive_onDestroy(this_1) call dealloc_SpecialFive(this_1) endfunction function SpecialFour_onDestroy takes integer this_1 returns nothing call Special_onDestroy(this_1) endfunction function dealloc_SpecialFour takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type SpecialFour") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySpecialFour takes integer this_1 returns nothing call SpecialFour_onDestroy(this_1) call dealloc_SpecialFour(this_1) endfunction function SpecialOne_onDestroy takes integer this_1 returns nothing call Special_onDestroy(this_1) endfunction function dealloc_SpecialOne takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type SpecialOne") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySpecialOne takes integer this_1 returns nothing call SpecialOne_onDestroy(this_1) call dealloc_SpecialOne(this_1) endfunction function SpecialThree_onDestroy takes integer this_1 returns nothing call Special_onDestroy(this_1) endfunction function dealloc_SpecialThree takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type SpecialThree") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySpecialThree takes integer this_1 returns nothing call SpecialThree_onDestroy(this_1) call dealloc_SpecialThree(this_1) endfunction function SpecialTwo_onDestroy takes integer this_1 returns nothing call Special_onDestroy(this_1) endfunction function dealloc_SpecialTwo takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type SpecialTwo") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySpecialTwo takes integer this_1 returns nothing call SpecialTwo_onDestroy(this_1) call dealloc_SpecialTwo(this_1) endfunction function Sphere_onDestroy takes integer this_1 returns nothing call Projectile_onDestroy(this_1) endfunction function dealloc_Sphere takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Sphere") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroySphere takes integer this_1 returns nothing call Sphere_onDestroy(this_1) call dealloc_Sphere(this_1) endfunction function Tentacle_onDestroy takes integer this_1 returns nothing call Creep_onDestroy(this_1) endfunction function dealloc_Tentacle takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Tentacle") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyTentacle takes integer this_1 returns nothing call Tentacle_onDestroy(this_1) call dealloc_Tentacle(this_1) endfunction function ThermoTower_onDestroy takes integer this_1 returns nothing call Tower_onDestroy(this_1) endfunction function dealloc_ThermoTower takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type ThermoTower") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyThermoTower takes integer this_1 returns nothing call ThermoTower_onDestroy(this_1) call dealloc_ThermoTower(this_1) endfunction function dealloc_Tower takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Tower") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyTower takes integer this_1 returns nothing call Tower_onDestroy(this_1) call dealloc_Tower(this_1) endfunction function Treasure_onDestroy takes integer this_1 returns nothing call UnitEntity_onDestroy(this_1) endfunction function dealloc_Treasure takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Treasure") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyTreasure takes integer this_1 returns nothing call Treasure_onDestroy(this_1) call dealloc_Treasure(this_1) endfunction function Troop_onDestroy takes integer this_1 returns nothing if not IsUnitHidden(UnitEntity_actor[this_1]) then call SetUnitExploded(UnitEntity_actor[this_1], true) endif call unit_setEntity(UnitEntity_actor[this_1], 0) call KillUnit(UnitEntity_actor[this_1]) call unit_remove(UnitEntity_actor[this_1]) call UnitEntity_onDestroy(this_1) endfunction function dealloc_Troop takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Troop") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyTroop takes integer this_1 returns nothing call Troop_onDestroy(this_1) call dealloc_Troop(this_1) endfunction function TroopGround_onDestroy takes integer this_1 returns nothing call UnitEntity_onDestroy(this_1) endfunction function dealloc_TroopGround takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type TroopGround") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyTroopGround takes integer this_1 returns nothing call TroopGround_onDestroy(this_1) call dealloc_TroopGround(this_1) endfunction function dealloc_UnitEntity takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type UnitEntity") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyUnitEntity takes integer this_1 returns nothing call UnitEntity_onDestroy(this_1) call dealloc_UnitEntity(this_1) endfunction function Wall_onDestroy takes integer this_1 returns nothing call UnitEntity_onDestroy(this_1) endfunction function dealloc_Wall takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type Wall") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyWall takes integer this_1 returns nothing call Wall_onDestroy(this_1) call dealloc_Wall(this_1) endfunction function group_clear takes group this_1 returns nothing call GroupClear(this_1) 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 groupToIndex takes group object returns integer return handle_getTCHandleId(object) endfunction function group_isRecyclable takes group this_1 returns boolean return dispatch_HashMap_HashMap_HashMap_has(GroupUtils_used, groupToIndex(this_1)) endfunction function booleanFromIndex takes integer index returns boolean return index == 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 group_isUsed takes group this_1 returns boolean return booleanFromIndex(dispatch_HashMap_HashMap_HashMap_get(GroupUtils_used, groupToIndex(this_1))) 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 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] <= 985 then call HashMap_put(this_1, key, value) else call IterableMap_put(this_1, key, value) endif 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 group_recycle takes group this_1 returns nothing call group_clear(this_1) call push(this_1) endfunction function group_release takes group this_1 returns nothing if this_1 == Group_ENUM_GROUP then call Log_warn("Attemping to release ENUM_GROUP!") elseif group_isRecyclable(this_1) then if group_isUsed(this_1) then call group_recycle(this_1) else call Log_warn("Attemping to release an already released group!") endif else call group_clear(this_1) call group_destr(this_1) endif endfunction function WaveMissile_onDestroy takes integer this_1 returns nothing call group_release(WaveMissile_affected[this_1]) call Projectile_onDestroy(this_1) endfunction function dealloc_WaveMissile takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type WaveMissile") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyWaveMissile takes integer this_1 returns nothing call WaveMissile_onDestroy(this_1) call dealloc_WaveMissile(this_1) endfunction function WaveTower_onDestroy takes integer this_1 returns nothing call Tower_onDestroy(this_1) endfunction function dealloc_WaveTower takes integer obj returns nothing if Serializable_typeId[obj] == 0 then call error("Double free: object of type WaveTower") else set Serializable_nextFree[Serializable_firstFree] = obj set Serializable_firstFree = Serializable_firstFree + 1 set Serializable_typeId[obj] = 0 endif endfunction function destroyWaveTower takes integer this_1 returns nothing call WaveTower_onDestroy(this_1) call dealloc_WaveTower(this_1) endfunction function unit_hasAbility takes unit this_1, integer id_1 returns boolean return GetUnitAbilityLevel(this_1, id_1) > 0 endfunction function Buff_refresh_97 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 effect_setScale takes effect this_1, real scale returns nothing call BlzSetSpecialEffectScale(this_1, scale) endfunction function angle_radians takes real this_radians returns real return this_radians endfunction function effect_setYaw takes effect this_1, real yaw_radians returns nothing call BlzSetSpecialEffectYaw(this_1, angle_radians(yaw_radians)) endfunction function flashEffect_1875 takes string path, real pos_x, real pos_y, real scale, real yaw_radians returns nothing local effect receiver = addEffect(path, pos_x, pos_y) local effect receiver_1 local effect receiver_2 call effect_setScale(receiver, scale) set receiver_1 = receiver call effect_setYaw(receiver_1, yaw_radians) set receiver_2 = receiver_1 call effect_destr(receiver_2) endfunction function real_fromDeg takes real this_1 returns real set real_fromDeg_return_radians = this_1 * Angle_DEGTORAD return real_fromDeg_return_radians endfunction function flashEffect_1873 takes string path, real pos_x, real pos_y returns nothing call flashEffect_1875(path, pos_x, pos_y, 1.0, real_fromDeg(GetRandomReal(0., 359.))) 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 player_panCamToTimed takes player this_1, unit u_1, real time returns nothing if Player_localPlayer == this_1 then call PanCameraToTimed(unit_getX(u_1), unit_getY(u_1), time) endif endfunction function player_selectSingle takes player this_1, unit u_1 returns nothing if Player_localPlayer == this_1 then call ClearSelection() call SelectUnit(u_1, true) endif endfunction function unit_getOwner takes unit this_1 returns player return GetOwningPlayer(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 unit_setAnimation takes unit this_1, string name returns nothing call SetUnitAnimation(this_1, name) endfunction function unit_setState takes unit this_1, unitstate state, real value returns nothing call SetUnitState(this_1, state, value) endfunction function unit_setHP takes unit this_1, real hp returns nothing call unit_setState(this_1, UNIT_STATE_LIFE, hp) endfunction function unit_setTimeScale takes unit this_1, real scale returns nothing call SetUnitTimeScale(this_1, scale) endfunction function unit_show takes unit this_1 returns nothing call ShowUnit(this_1, true) endfunction function WarningBuff_refresh takes integer this_1, boolean forceRefresh returns nothing local integer bty local unit receiver local real cond_result local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 local unit receiver_6 local unit receiver_7 local player receiver_8 local player receiver_9 local unit temp call Buff_refresh_97(this_1, forceRefresh) if WarningBuff_dead[this_1] then set bty = PlayerData_btype[PlayerData_pDatas[player_getId(unit_getOwner(Buff_target[this_1]))]] set receiver = Buff_target[this_1] call unit_unpause(receiver) set receiver_1 = receiver set temp = receiver_1 if bty == 1 then set cond_result = 0.25 else set cond_result = 1.0 endif call unit_setTimeScale(temp, cond_result) set receiver_2 = receiver_1 call unit_setHP(receiver_2, 9999.) set receiver_3 = receiver_2 call unit_show(receiver_3) set receiver_4 = receiver_3 call unit_setAnimation(receiver_4, "stand") set receiver_5 = receiver_4 call unit_queueAnimation(receiver_5, "stand") set receiver_6 = receiver_5 call unit_removeAbility(receiver_6, 1098282348) set receiver_7 = receiver_6 call unit_setOwner(receiver_7, WarningBuff_originalOwner[this_1], false) set receiver_8 = unit_getOwner(Buff_target[this_1]) call player_selectSingle(receiver_8, Buff_target[this_1]) set receiver_9 = receiver_8 call player_panCamToTimed(receiver_9, Buff_target[this_1], 0.) call flashEffect_1873(Abilities_reviveHuman, unit_getPos(Buff_target[this_1]), unit_getPos_return_y) set WarningBuff_dead[this_1] = false set WarningBuff_startedTime[this_1] = GameTimer_currentTime endif endfunction function dispatch_Buff_Buff_Buff_refresh_1600 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 if Buff_typeId[this_1] <= 651 then if Buff_typeId[this_1] <= 650 then call Buff_refresh_97(this_1, forceRefresh) else call WarningBuff_refresh(this_1, forceRefresh) endif else call Buff_refresh_97(this_1, forceRefresh) endif endfunction function Buff_refresh takes integer this_1 returns nothing call dispatch_Buff_Buff_Buff_refresh_1600(this_1, false) endfunction function dispatch_Buff_Buff_Buff_refresh 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.refresh") else call error("Called Buff.refresh on invalid object.") endif endif call Buff_refresh(this_1) endfunction function Entity_getPos takes integer this_1 returns real set Entity_getPos_return_x = Entity_pos_x[this_1] set Entity_getPos_return_y = Entity_pos_y[this_1] set Entity_getPos_return_z = Entity_pos_z[this_1] return Entity_getPos_return_x endfunction function item_getX takes item this_1 returns real return GetItemX(this_1) endfunction function item_getY takes item this_1 returns real return GetItemY(this_1) endfunction function item_getPos takes item this_1 returns real set item_getPos_return_x = item_getX(this_1) set item_getPos_return_y = item_getY(this_1) return item_getPos_return_x endfunction function vec2_withHeightMap_2511 takes real this_x, real this_y, real zoffset returns real set vec2_withHeightMap_return_x_1560 = this_x set vec2_withHeightMap_return_y_1562 = this_y set vec2_withHeightMap_return_z_1564 = vec2_getHeightMap(this_x, this_y) + zoffset return vec2_withHeightMap_return_x_1560 endfunction function vec2_withHeightMap takes real this_x, real this_y returns real set vec2_withHeightMap_return_x = vec2_withHeightMap_2511(this_x, this_y, 0.) set vec2_withHeightMap_return_y = vec2_withHeightMap_return_y_1562 set vec2_withHeightMap_return_z = vec2_withHeightMap_return_z_1564 return vec2_withHeightMap_return_x endfunction function ItemEntity_getPos takes integer this_1 returns real local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if not Entity_DupletListModule_active[this_1] then set tuple_temp = vec2_withHeightMap(item_getPos(ItemEntity_actor[this_1]), item_getPos_return_y) set tuple_temp_1 = vec2_withHeightMap_return_y set tuple_temp_2 = vec2_withHeightMap_return_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 endif set ItemEntity_getPos_return_x = Entity_pos_x[this_1] set ItemEntity_getPos_return_y = Entity_pos_y[this_1] set ItemEntity_getPos_return_z = Entity_pos_z[this_1] return ItemEntity_getPos_return_x endfunction function unit_getFlyHeight takes unit this_1 returns real return GetUnitFlyHeight(this_1) endfunction function vec2_withZ takes real this_x, real this_y, real z returns real set vec2_withZ_return_x = this_x set vec2_withZ_return_y = this_y set vec2_withZ_return_z = z return vec2_withZ_return_x endfunction function vec3_op_plus takes real this_x, real this_y, real this_z, real v_x, real v_y, real v_z returns real set vec3_op_plus_return_x = this_x + v_x set vec3_op_plus_return_y = this_y + v_y set vec3_op_plus_return_z = this_z + v_z return vec3_op_plus_return_x endfunction function unit_getDynamicPos takes unit this_1 returns real if Frentity_config_DYNAMIC_Z then set unit_getDynamicPos_return_x = vec3_op_plus(vec2_withHeightMap(unit_getPos(this_1), unit_getPos_return_y), vec2_withHeightMap_return_y, vec2_withHeightMap_return_z, 0., 0., unit_getFlyHeight(this_1)) set unit_getDynamicPos_return_y = vec3_op_plus_return_y set unit_getDynamicPos_return_z = vec3_op_plus_return_z return unit_getDynamicPos_return_x endif set unit_getDynamicPos_return_x = vec2_withZ(unit_getPos(this_1), unit_getPos_return_y, 0.) set unit_getDynamicPos_return_y = vec2_withZ_return_y set unit_getDynamicPos_return_z = vec2_withZ_return_z return unit_getDynamicPos_return_x endfunction function unit_getPos3Fly takes unit this_1 returns real set unit_getPos3Fly_return_x = unit_getX(this_1) set unit_getPos3Fly_return_y = unit_getY(this_1) set unit_getPos3Fly_return_z = unit_getFlyHeight(this_1) return unit_getPos3Fly_return_x endfunction function UnitEntity_getPos takes integer this_1 returns real local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 if not Entity_DupletListModule_active[this_1] then if Frentity_config_DYNAMIC_Z then set tuple_temp = unit_getDynamicPos(UnitEntity_actor[this_1]) set tuple_temp_1 = unit_getDynamicPos_return_y set tuple_temp_2 = unit_getDynamicPos_return_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 else set tuple_temp_3 = unit_getPos3Fly(UnitEntity_actor[this_1]) set tuple_temp_4 = unit_getPos3Fly_return_y set tuple_temp_5 = unit_getPos3Fly_return_z set Entity_pos_x[this_1] = tuple_temp_3 set Entity_pos_y[this_1] = tuple_temp_4 set Entity_pos_z[this_1] = tuple_temp_5 endif endif set UnitEntity_getPos_return_x = Entity_pos_x[this_1] set UnitEntity_getPos_return_y = Entity_pos_y[this_1] set UnitEntity_getPos_return_z = Entity_pos_z[this_1] return UnitEntity_getPos_return_x endfunction function dispatch_Entity_Entity_Entity_getPos takes integer this_1 returns real local real Entity_Entity_getPos_result_x local real Entity_Entity_getPos_result_y local real Entity_Entity_getPos_result_z local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 local real tuple_temp_8 local real tuple_temp_9 local real tuple_temp_10 local real tuple_temp_11 if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.getPos") else call error("Called Entity.getPos on invalid object.") endif endif if Serializable_typeId[this_1] <= 931 then if Serializable_typeId[this_1] <= 930 then set tuple_temp = Entity_getPos(this_1) set tuple_temp_1 = Entity_getPos_return_y set tuple_temp_2 = Entity_getPos_return_z set Entity_Entity_getPos_result_x = tuple_temp set Entity_Entity_getPos_result_y = tuple_temp_1 set Entity_Entity_getPos_result_z = tuple_temp_2 else set tuple_temp_3 = ItemEntity_getPos(this_1) set tuple_temp_4 = ItemEntity_getPos_return_y set tuple_temp_5 = ItemEntity_getPos_return_z set Entity_Entity_getPos_result_x = tuple_temp_3 set Entity_Entity_getPos_result_y = tuple_temp_4 set Entity_Entity_getPos_result_z = tuple_temp_5 endif elseif Serializable_typeId[this_1] <= 932 then set tuple_temp_6 = Entity_getPos(this_1) set tuple_temp_7 = Entity_getPos_return_y set tuple_temp_8 = Entity_getPos_return_z set Entity_Entity_getPos_result_x = tuple_temp_6 set Entity_Entity_getPos_result_y = tuple_temp_7 set Entity_Entity_getPos_result_z = tuple_temp_8 else set tuple_temp_9 = UnitEntity_getPos(this_1) set tuple_temp_10 = UnitEntity_getPos_return_y set tuple_temp_11 = UnitEntity_getPos_return_z set Entity_Entity_getPos_result_x = tuple_temp_9 set Entity_Entity_getPos_result_y = tuple_temp_10 set Entity_Entity_getPos_result_z = tuple_temp_11 endif set dispatch_Entity_Entity_Entity_getPos_return_x = Entity_Entity_getPos_result_x set dispatch_Entity_Entity_Entity_getPos_return_y = Entity_Entity_getPos_result_y set dispatch_Entity_Entity_Entity_getPos_return_z = Entity_Entity_getPos_result_z return dispatch_Entity_Entity_Entity_getPos_return_x 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 dispatch_OnEndListener_Projectile_OnEndListener_run takes integer this_1 returns nothing endfunction function OnExpireEvent_onDestroy takes integer this_1 returns nothing endfunction function dealloc_OnExpireEvent takes integer obj returns nothing if OnExpireEvent_typeId[obj] == 0 then call error("Double free: object of type OnExpireEvent") else set OnExpireEvent_nextFree[OnExpireEvent_firstFree] = obj set OnExpireEvent_firstFree = OnExpireEvent_firstFree + 1 set OnExpireEvent_typeId[obj] = 0 endif endfunction function destroyOnExpireEvent takes integer this_1 returns nothing call OnExpireEvent_onDestroy(this_1) call dealloc_OnExpireEvent(this_1) endfunction function dispatch_OnExpireEvent_destroyOnExpireEvent takes integer this_1 returns nothing if OnExpireEvent_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnExpireEvent.OnExpireEvent") else call error("Called OnExpireEvent.OnExpireEvent on invalid object.") endif endif call destroyOnExpireEvent(this_1) endfunction function Projectile_getXYAngle takes integer this_1 returns real set Projectile_getXYAngle_return_radians = Projectile_xyAngle_radians[this_1] return Projectile_getXYAngle_return_radians endfunction function dispatch_Projectile_Projectile_Projectile_getXYAngle takes integer this_1 returns real local real Projectile_Projectile_getXYAngle_result_radians local real tuple_temp if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.getXYAngle") else call error("Called Projectile.getXYAngle on invalid object.") endif endif set tuple_temp = Projectile_getXYAngle(this_1) set Projectile_Projectile_getXYAngle_result_radians = tuple_temp set dispatch_Projectile_Projectile_Projectile_getXYAngle_return_radians = Projectile_Projectile_getXYAngle_result_radians return dispatch_Projectile_Projectile_Projectile_getXYAngle_return_radians endfunction function alloc_CallbackSingle_nullTimer_SoundDefinition_SoundUtils takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 711 else call error("Out of memory: Could not create CallbackSingle_nullTimer_SoundDefinition_SoundUtils.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 711 endif return this_1 endfunction function LinkedList_pop takes integer this_1 returns integer local integer top = LLEntry_prev[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_pop takes integer this_1 returns integer local integer LinkedList_LinkedList_pop_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.pop") else call error("Called LinkedList.pop on invalid object.") endif endif set LinkedList_LinkedList_pop_result = LinkedList_pop(this_1) return LinkedList_LinkedList_pop_result endfunction function alloc_SoundInstance takes nothing returns integer local integer this_1 if SoundInstance_firstFree == 0 then if SoundInstance_maxIndex < JASS_MAX_ARRAY_SIZE then set SoundInstance_maxIndex = SoundInstance_maxIndex + 1 set this_1 = SoundInstance_maxIndex set SoundInstance_typeId[this_1] = 968 else call error("Out of memory: Could not create SoundInstance.") set this_1 = 0 endif else set SoundInstance_firstFree = SoundInstance_firstFree - 1 set this_1 = SoundInstance_nextFree[SoundInstance_firstFree] set SoundInstance_typeId[this_1] = 968 endif return this_1 endfunction function SoundInstance_init takes integer this_1 returns nothing local real tuple_temp = Vectors_ZERO3_x local real tuple_temp_1 = Vectors_ZERO3_y local real tuple_temp_2 = Vectors_ZERO3_z set SoundInstance_pos_x[this_1] = tuple_temp set SoundInstance_pos_y[this_1] = tuple_temp_1 set SoundInstance_pos_z[this_1] = tuple_temp_2 set SoundInstance_onUnit[this_1] = null set SoundInstance_p[this_1] = null set SoundInstance_s3s[this_1] = 0 endfunction function construct_SoundInstance takes integer this_1 returns nothing call SoundInstance_init(this_1) endfunction function new_SoundInstance takes nothing returns integer local integer this_1 = alloc_SoundInstance() call construct_SoundInstance(this_1) return this_1 endfunction function sound_setChannel takes sound this_1, integer channel returns nothing call SetSoundChannel(this_1, channel) endfunction function sound_setDuration takes sound this_1, integer dur returns nothing call SetSoundDuration(this_1, dur) endfunction function sound_setVolume takes sound this_1, integer volume returns nothing call SetSoundVolume(this_1, volume) endfunction function SoundDefinition_getSound takes integer this_1, integer volume returns integer local integer shandle local sound receiver local sound receiver_1 local sound receiver_2 local integer sdata local sound receiver_3 local sound receiver_4 local sound receiver_5 local sound receiver_6 if dispatch_LinkedList_LinkedList_LinkedList_size(SoundDefinition_soundStack[this_1]) > 0 then set shandle = dispatch_LinkedList_LinkedList_LinkedList_pop(SoundDefinition_soundStack[this_1]) set receiver = SoundInstance_snd[shandle] call sound_setVolume(receiver, volume) set receiver_1 = receiver call sound_setPitch(receiver_1, SoundUtils_DEFAULT_SOUND_PITCH) set receiver_2 = receiver_1 call sound_setChannel(receiver_2, SoundUtils_SOUND_CHANNEL) return shandle else set sdata = new_SoundInstance() set SoundInstance_snd[sdata] = CreateSound(SoundDefinition_file[this_1], SoundDefinition_looping[this_1], SoundDefinition_is3D[this_1], SoundDefinition_stopOnLeaveRange[this_1], SoundDefinition_fadeIn[this_1], SoundDefinition_fadeOut[this_1], SoundDefinition_eaxSetting[this_1]) set SoundInstance_soundDef[sdata] = this_1 set receiver_3 = SoundInstance_snd[sdata] call sound_setDuration(receiver_3, SoundDefinition_duration[this_1]) set receiver_4 = receiver_3 call sound_setChannel(receiver_4, SoundUtils_SOUND_CHANNEL) set receiver_5 = receiver_4 call sound_setVolume(receiver_5, volume) set receiver_6 = receiver_5 call sound_setPitch(receiver_6, SoundUtils_DEFAULT_SOUND_PITCH) if SoundDefinition_is3D[this_1] then call SetSoundDistances(SoundInstance_snd[sdata], SoundUtils_SOUND_MIN_DIST, SoundUtils_SOUND_MAX_DIST) call SetSoundDistanceCutoff(SoundInstance_snd[sdata], SoundUtils_SOUND_DIST_CUT) call SetSoundConeAngles(SoundInstance_snd[sdata], 0., 0., volume) call SetSoundConeOrientation(SoundInstance_snd[sdata], 0., 0., 0.) endif return sdata endif endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_getSound takes integer this_1, integer volume returns integer local integer SoundUtils_SoundDefinition_getSound_result if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.getSound") else call error("Called SoundDefinition.getSound on invalid object.") endif endif set SoundUtils_SoundDefinition_getSound_result = SoundDefinition_getSound(this_1, volume) return SoundUtils_SoundDefinition_getSound_result endfunction function nullTimer takes integer cb_1 returns integer return doAfter(0., cb_1) endfunction function SoundDefinition_play_785 takes integer this_1, integer duration, integer volume returns integer local integer snd_1 local integer clVar set SoundDefinition_duration[this_1] = duration set snd_1 = dispatch_SoundDefinition_SoundUtils_SoundDefinition_getSound(this_1, volume) set clVar = alloc_CallbackSingle_nullTimer_SoundDefinition_SoundUtils() call construct_CallbackSingle(clVar) set this_1481[clVar] = this_1 set snd[clVar] = snd_1 call nullTimer(clVar) return snd_1 endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_play_1810 takes integer this_1, integer duration, integer volume returns integer local integer SoundUtils_SoundDefinition_play_result if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.play") else call error("Called SoundDefinition.play on invalid object.") endif endif set SoundUtils_SoundDefinition_play_result = SoundDefinition_play_785(this_1, duration, volume) return SoundUtils_SoundDefinition_play_result endfunction function SoundDefinition_play_784 takes integer this_1, integer duration returns integer return dispatch_SoundDefinition_SoundUtils_SoundDefinition_play_1810(this_1, duration, SoundUtils_DEFAULT_SOUND_VOLUME) endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_play_1809 takes integer this_1, integer duration returns integer local integer SoundUtils_SoundDefinition_play_result if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.play") else call error("Called SoundDefinition.play on invalid object.") endif endif set SoundUtils_SoundDefinition_play_result = SoundDefinition_play_784(this_1, duration) return SoundUtils_SoundDefinition_play_result endfunction function SoundDefinition_play takes integer this_1 returns integer return dispatch_SoundDefinition_SoundUtils_SoundDefinition_play_1809(this_1, SoundUtils_DEFAULT_SOUND_DURATION) endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_play takes integer this_1 returns integer local integer SoundUtils_SoundDefinition_play_result if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.play") else call error("Called SoundDefinition.play on invalid object.") endif endif set SoundUtils_SoundDefinition_play_result = SoundDefinition_play(this_1) return SoundUtils_SoundDefinition_play_result endfunction function Tower_pause takes integer this_1 returns nothing call unit_pause(UnitEntity_actor[this_1]) endfunction function TrooperTower_pause takes integer this_1 returns nothing local integer iterator local integer troop call Tower_pause(this_1) set iterator = LinkedList_iterator(TrooperTower_troops[this_1]) loop exitwhen not LLIterator_hasNext(iterator) set troop = LLIterator_next(iterator) call unit_pause(UnitEntity_actor[troop]) endloop call LLIterator_close(iterator) endfunction function dispatch_Tower_Tower_Tower_pause takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Tower.pause") else call error("Called Tower.pause on invalid object.") endif endif if Serializable_typeId[this_1] <= 960 then if Serializable_typeId[this_1] <= 959 then call Tower_pause(this_1) else call TrooperTower_pause(this_1) endif else call Tower_pause(this_1) endif endfunction function dispatch_UnitEntity_Entity_UnitEntity_getPos takes integer this_1 returns real local real Entity_UnitEntity_getPos_result_x local real Entity_UnitEntity_getPos_result_y local real Entity_UnitEntity_getPos_result_z local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitEntity.getPos") else call error("Called UnitEntity.getPos on invalid object.") endif endif set tuple_temp = UnitEntity_getPos(this_1) set tuple_temp_1 = UnitEntity_getPos_return_y set tuple_temp_2 = UnitEntity_getPos_return_z set Entity_UnitEntity_getPos_result_x = tuple_temp set Entity_UnitEntity_getPos_result_y = tuple_temp_1 set Entity_UnitEntity_getPos_result_z = tuple_temp_2 set dispatch_UnitEntity_Entity_UnitEntity_getPos_return_x = Entity_UnitEntity_getPos_result_x set dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y = Entity_UnitEntity_getPos_result_y set dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z = Entity_UnitEntity_getPos_result_z return dispatch_UnitEntity_Entity_UnitEntity_getPos_return_x endfunction function Entity_DupletListModule_activate takes integer this_1 returns nothing if not Entity_DupletListModule_active[this_1] then set Entity_DupletListModule_active[this_1] = true call dispatch_Entity_Entity_Entity_DupletListModule_removeFromInactive(this_1) call dispatch_Entity_Entity_Entity_DupletListModule_addToActive(this_1) endif endfunction function dispatch_Entity_Entity_Entity_DupletListModule_activate 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.activate") else call error("Called Entity.activate on invalid object.") endif endif call Entity_DupletListModule_activate(this_1) endfunction function Entity_setPos takes integer this_1, real pos_x, real pos_y, real pos_z returns nothing local real tuple_temp = pos_x local real tuple_temp_1 = pos_y local real tuple_temp_2 = pos_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 if pos_z > vec3_getHeightMap(pos_x, pos_y, pos_z) and Entity_gravity[this_1] != 0. then call dispatch_Entity_Entity_Entity_DupletListModule_activate(this_1) endif endfunction function unit_setPos takes unit this_1, real pos_x, real pos_y returns nothing call SetUnitPosition(this_1, pos_x, pos_y) endfunction function unit_setPos_2469 takes unit this_1, real x, real y returns nothing call SetUnitPosition(this_1, x, y) endfunction function unit_setPosReal takes unit this_1, real pos_x, real pos_y, real pos_z returns nothing call unit_setPos_2469(this_1, pos_x, pos_y) call unit_setFlyHeight(this_1, pos_z - vec3_getTerrainZ(pos_x, pos_y, pos_z), 0.) endfunction function UnitEntity_setPos takes integer this_1, real tpos_x, real tpos_y, real tpos_z returns nothing call Entity_setPos(this_1, tpos_x, tpos_y, tpos_z) if Frentity_config_DYNAMIC_Z then call unit_setPosReal(UnitEntity_actor[this_1], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) else call unit_setPos(UnitEntity_actor[this_1], vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) endif endfunction function dispatch_UnitEntity_Entity_UnitEntity_setPos takes integer this_1, real tpos_x, real tpos_y, real tpos_z returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitEntity.setPos") else call error("Called UnitEntity.setPos on invalid object.") endif endif call UnitEntity_setPos(this_1, tpos_x, tpos_y, tpos_z) endfunction function unit_setXYZ takes unit this_1, real pos_x, real pos_y, real pos_z returns nothing local unit receiver = this_1 local unit receiver_1 local unit receiver_2 call unit_setX(receiver, pos_x) set receiver_1 = receiver call unit_setY(receiver_1, pos_y) set receiver_2 = receiver_1 call unit_setFlyHeight(receiver_2, pos_z, 0.) endfunction function unit_setXYZReal takes unit this_1, real pos_x, real pos_y, real pos_z returns nothing call SetUnitX(this_1, pos_x) call SetUnitY(this_1, pos_y) call SetUnitFlyHeight(this_1, pos_z - vec3_getTerrainZ(pos_x, pos_y, pos_z), 0.) endfunction function inPlayableXY takes real x, real y returns boolean return x > MapBounds_playableMin_x and x < MapBounds_playableMax_x and y > MapBounds_playableMin_y and y < MapBounds_playableMax_y endfunction function vec3_inPlayable takes real this_x, real this_y, real this_z returns boolean return inPlayableXY(this_x, this_y) endfunction function vec3_toString takes real this_x, real this_y, real this_z returns string return "Vector3 [ " + real_toString(this_x) + ", " + real_toString(this_y) + ", " + real_toString(this_z) + " ]" endfunction function UnitEntity_setXY takes integer this_1, real tpos_x, real tpos_y, real tpos_z returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if vec3_inPlayable(tpos_x, tpos_y, tpos_z) then set tuple_temp = tpos_x set tuple_temp_1 = tpos_y set tuple_temp_2 = tpos_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 if Frentity_config_DYNAMIC_Z then call unit_setXYZReal(UnitEntity_actor[this_1], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) else call unit_setXYZ(UnitEntity_actor[this_1], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) endif else call Log_error("out of bounds: " + vec3_toString(tpos_x, tpos_y, tpos_z)) call dispatch_UnitEntity_Entity_UnitEntity_setPos(this_1, Vectors_ZERO3_x, Vectors_ZERO3_y, Vectors_ZERO3_z) endif endfunction function dispatch_UnitEntity_Entity_UnitEntity_setXY takes integer this_1, real tpos_x, real tpos_y, real tpos_z returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitEntity.setXY") else call error("Called UnitEntity.setXY on invalid object.") endif endif call UnitEntity_setXY(this_1, tpos_x, tpos_y, tpos_z) endfunction function alloc_Shrapnell 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] = 927 else call error("Out of memory: Could not create Shrapnell.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 927 endif return this_1 endfunction function Shrapnell_init takes integer this_1 returns nothing endfunction function construct_PhysicsProjectile_PhysicsModule takes integer this_1 returns nothing endfunction function PhysicsProjectile_init takes integer this_1 returns nothing set PhysicsProjectile_PhysicsModule_terrainZ[this_1] = 0. set PhysicsProjectile_PhysicsModule_surfaceFriction[this_1] = 0.9 call construct_PhysicsProjectile_PhysicsModule(this_1) endfunction function Projectile_init takes integer this_1 returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 set Projectile_timed[this_1] = false set Projectile_ranged[this_1] = false set Projectile_use3DDistance[this_1] = true set Projectile_hitGroup[this_1] = null set Projectile_isPointTarget[this_1] = false set tuple_temp = Vectors_ZERO3_x set tuple_temp_1 = Vectors_ZERO3_y set tuple_temp_2 = Vectors_ZERO3_z set Projectile_targetPoint_x[this_1] = tuple_temp set Projectile_targetPoint_y[this_1] = tuple_temp_1 set Projectile_targetPoint_z[this_1] = tuple_temp_2 set Projectile_killZ[this_1] = false set Projectile_killBelowZ[this_1] = 0. set Projectile_speed[this_1] = 0. set Projectile_acc[this_1] = 1.0 set Projectile_maxDist[this_1] = 0. set Projectile_time[this_1] = 0. set Projectile_maxTime[this_1] = 0. set Projectile_target[this_1] = 0 set Projectile_onHit[this_1] = 0 set Projectile_onEnd[this_1] = 0 endfunction function Fx2Entity_init takes integer this_1 returns nothing set Fx2Entity_silent[this_1] = false endfunction function angle_cos takes real this_radians returns real return Cos(this_radians) endfunction function angle_op_divReal takes real this_radians, real scalar returns real set angle_op_divReal_return_radians = this_radians / scalar return angle_op_divReal_return_radians endfunction function angle_sin takes real this_radians returns real return Sin(this_radians) endfunction function vec3_length takes real this_x, real this_y, real this_z returns real return SquareRoot(this_x * this_x + this_y * this_y + this_z * this_z) endfunction function vec3_norm takes real this_x, real this_y, real this_z returns real local real len = vec3_length(this_x, this_y, this_z) local real x = 0. local real y = 0. local real z = 0. if len != 0.0 then set x = this_x / len set y = this_y / len set z = this_z / len endif set vec3_norm_return_x = x set vec3_norm_return_y = y set vec3_norm_return_z = z return vec3_norm_return_x endfunction function vec3_toQuat takes real this_x, real this_y, real this_z, real angl_radians returns real local real tuple_temp = vec3_norm(this_x, this_y, this_z) local real tuple_temp_1 = vec3_norm_return_y local real tuple_temp_2 = vec3_norm_return_z local real v_x = tuple_temp local real v_y = tuple_temp_1 local real v_z = tuple_temp_2 local real sin = angle_sin(angle_op_divReal(angl_radians, 2)) set vec3_toQuat_return_x = v_x * sin set vec3_toQuat_return_y = v_y * sin set vec3_toQuat_return_z = v_z * sin set vec3_toQuat_return_w = angle_cos(angle_op_divReal(angl_radians, 2)) return vec3_toQuat_return_x endfunction function angle_toQuat takes real this_radians, real axis_x, real axis_y, real axis_z returns real set angle_toQuat_return_x = vec3_toQuat(axis_x, axis_y, axis_z, this_radians) set angle_toQuat_return_y = vec3_toQuat_return_y set angle_toQuat_return_z = vec3_toQuat_return_z set angle_toQuat_return_w = vec3_toQuat_return_w return angle_toQuat_return_x endfunction function quat_getGimbalPole takes real this_x, real this_y, real this_z, real this_w returns integer local real pole = this_x * this_z - this_y * this_w local integer cond_result local integer cond_result_1 if pole > 0.5 - Quaternion_EPSILON then set cond_result_1 = 1 else if pole < Quaternion_EPSILON - 0.5 then set cond_result = -1 else set cond_result = 0 endif set cond_result_1 = cond_result endif return cond_result_1 endfunction function quat_toEuler takes real this_x, real this_y, real this_z, real this_w returns real local integer temp = quat_getGimbalPole(this_x, this_y, this_z, this_w) local real yaw local real pitch local real roll local real cos local real sin if temp == 1 then set cos = 2. * this_x * this_z + 2. * this_y * this_w set sin = 2. * this_y * this_z - 2. * this_x * this_w set yaw = Atan2( - sin, - cos) set pitch = - (Maths_PI / 2.) set roll = 0. elseif temp == -1 then set cos = 2. * this_x * this_z + 2. * this_y * this_w set sin = 2. * this_y * this_z - 2. * this_x * this_w set yaw = Atan2(sin, cos) set pitch = Maths_PI / 2. set roll = 0. else set cos = 1. - 2. * this_y * this_y - 2. * this_z * this_z set sin = 2. * this_x * this_y + 2. * this_z * this_w set yaw = Atan2(sin, cos) set pitch = - Asin(2. * this_x * this_z - 2. * this_y * this_w) set cos = 1. - 2. * this_x * this_x - 2. * this_y * this_y set sin = 2. * this_y * this_z + 2. * this_x * this_w set roll = Atan2(sin, cos) endif set quat_toEuler_return_x = roll set quat_toEuler_return_y = pitch set quat_toEuler_return_z = yaw return quat_toEuler_return_x endfunction function effect_setOrientation takes effect this_1, real quaternion_x, real quaternion_y, real quaternion_z, real quaternion_w returns nothing local real tuple_temp = quat_toEuler(quaternion_x, quaternion_y, quaternion_z, quaternion_w) local real tuple_temp_1 = quat_toEuler_return_y local real tuple_temp_2 = quat_toEuler_return_z local real euler_x = tuple_temp local real euler_y = tuple_temp_1 local real euler_z = tuple_temp_2 call BlzSetSpecialEffectOrientation(this_1, euler_z, euler_y, euler_x) endfunction function Fx2_setOrientation takes integer this_1, real orientation_x, real orientation_y, real orientation_z, real orientation_w returns nothing call effect_setOrientation(Fx2_eff[this_1], orientation_x, orientation_y, orientation_z, orientation_w) endfunction function dispatch_Fx2_Fx2_Fx2_setOrientation takes integer this_1, real orientation_x, real orientation_y, real orientation_z, real orientation_w returns nothing if Fx2_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx2.setOrientation") else call error("Called Fx2.setOrientation on invalid object.") endif endif call Fx2_setOrientation(this_1, orientation_x, orientation_y, orientation_z, orientation_w) endfunction function alloc_Fx2 takes nothing returns integer local integer this_1 if Fx2_firstFree == 0 then if Fx2_maxIndex < JASS_MAX_ARRAY_SIZE then set Fx2_maxIndex = Fx2_maxIndex + 1 set this_1 = Fx2_maxIndex set Fx2_typeId[this_1] = 807 else call error("Out of memory: Could not create Fx2.") set this_1 = 0 endif else set Fx2_firstFree = Fx2_firstFree - 1 set this_1 = Fx2_nextFree[Fx2_firstFree] set Fx2_typeId[this_1] = 807 endif return this_1 endfunction function Fx2_init takes integer this_1 returns nothing local integer tuple_temp = Colors_COLOR_WHITE_red local integer tuple_temp_1 = Colors_COLOR_WHITE_green local integer tuple_temp_2 = Colors_COLOR_WHITE_blue local integer tuple_temp_3 = Colors_COLOR_WHITE_alpha set Fx2_tint_red[this_1] = tuple_temp set Fx2_tint_green[this_1] = tuple_temp_1 set Fx2_tint_blue[this_1] = tuple_temp_2 set Fx2_tint_alpha[this_1] = tuple_temp_3 endfunction function construct_Fx2 takes integer this_1, real pos_x, real pos_y, real pos_z, string path returns nothing call Fx2_init(this_1) set Fx2_eff[this_1] = addEffect_928(path, pos_x, pos_y, pos_z) endfunction function new_Fx2 takes real pos_x, real pos_y, real pos_z, string path returns integer local integer this_1 = alloc_Fx2() call construct_Fx2(this_1, pos_x, pos_y, pos_z, path) return this_1 endfunction function Fx2Entity_setupFx takes integer this_1, real xyAngle_radians, string sfxpath returns nothing set Fx2Entity_fx[this_1] = new_Fx2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], sfxpath) call dispatch_Fx2_Fx2_Fx2_setOrientation(Fx2Entity_fx[this_1], angle_toQuat(xyAngle_radians, 0., 0., 1.), angle_toQuat_return_y, angle_toQuat_return_z, angle_toQuat_return_w) endfunction function dispatch_Fx2Entity_Fx2Entity_Fx2Entity_setupFx takes integer this_1, real xyAngle_radians, string sfxpath returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx2Entity.setupFx") else call error("Called Fx2Entity.setupFx on invalid object.") endif endif call Fx2Entity_setupFx(this_1, xyAngle_radians, sfxpath) endfunction function construct_Fx2Entity takes integer this_1, player owner_1, real pos_x, real pos_y, real pos_z, real radius, real xyAngle_radians, string sfxpath returns nothing call construct_Entity5(this_1, owner_1, pos_x, pos_y, pos_z, radius) call Fx2Entity_init(this_1) call dispatch_Fx2Entity_Fx2Entity_Fx2Entity_setupFx(this_1, xyAngle_radians, sfxpath) endfunction function Projectile_setXYAngle takes integer this_1, real xyA_radians returns nothing local real tuple_temp = xyA_radians set Projectile_xyAngle_radians[this_1] = tuple_temp call effect_setYaw(Fx2_eff[Fx2Entity_fx[this_1]], xyA_radians) endfunction function dispatch_Projectile_Projectile_Projectile_setXYAngle takes integer this_1, real xyA_radians returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setXYAngle") else call error("Called Projectile.setXYAngle on invalid object.") endif endif call Projectile_setXYAngle(this_1, xyA_radians) endfunction function construct_Projectile takes integer this_1, real pos_x, real pos_y, real pos_z, real radius, player owner_1, real xyAngle_radians, string fxpath returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 call construct_Fx2Entity(this_1, owner_1, pos_x, pos_y, pos_z, radius, xyAngle_radians, fxpath) call Projectile_init(this_1) set tuple_temp = pos_x set tuple_temp_1 = pos_y set tuple_temp_2 = pos_z set Projectile_startpos_x[this_1] = tuple_temp set Projectile_startpos_y[this_1] = tuple_temp_1 set Projectile_startpos_z[this_1] = tuple_temp_2 call dispatch_Projectile_Projectile_Projectile_setXYAngle(this_1, xyAngle_radians) set Entity_sleeps[this_1] = false set Entity_gravity[this_1] = 0. endfunction function construct_PhysicsProjectile takes integer this_1, real pos_x, real pos_y, real pos_z, real radius, player owner_1, real xyAngle_radians, string fxpath, integer onEvent returns nothing call construct_Projectile(this_1, pos_x, pos_y, pos_z, radius, owner_1, xyAngle_radians, fxpath) call PhysicsProjectile_init(this_1) call dispatch_Projectile_Projectile_Projectile_setXYAngle(this_1, xyAngle_radians) set PhysicsProjectile_oe[this_1] = onEvent set Entity_gravity[this_1] = PhysicsConstants_defaultGravity endfunction function Entity_setVel takes integer this_1, real vel_x, real vel_y, real vel_z returns nothing local real tuple_temp = vel_x local real tuple_temp_1 = vel_y local real tuple_temp_2 = vel_z set Entity_vel_x[this_1] = tuple_temp set Entity_vel_y[this_1] = tuple_temp_1 set Entity_vel_z[this_1] = tuple_temp_2 call dispatch_Entity_Entity_Entity_DupletListModule_activate(this_1) endfunction function dispatch_Entity_Entity_Entity_setVel takes integer this_1, real vel_x, real vel_y, real vel_z returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.setVel") else call error("Called Entity.setVel on invalid object.") endif endif call Entity_setVel(this_1, vel_x, vel_y, vel_z) endfunction function Projectile_setSpeed takes integer this_1, real speed returns nothing set Projectile_speed[this_1] = speed call dispatch_Entity_Entity_Entity_setVel(this_1, angle_cos(Projectile_xyAngle_radians[this_1]) * speed, angle_sin(Projectile_xyAngle_radians[this_1]) * speed, 0.) endfunction function dispatch_Projectile_Projectile_Projectile_setSpeed takes integer this_1, real speed returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setSpeed") else call error("Called Projectile.setSpeed on invalid object.") endif endif call Projectile_setSpeed(this_1, speed) endfunction function Projectile_setTimed takes integer this_1, real lifespan returns nothing set Projectile_maxTime[this_1] = lifespan set Projectile_timed[this_1] = true endfunction function dispatch_Projectile_Projectile_Projectile_setTimed takes integer this_1, real lifespan returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setTimed") else call error("Called Projectile.setTimed on invalid object.") endif endif call Projectile_setTimed(this_1, lifespan) endfunction function effect_setColor takes effect this_1, integer color_red, integer color_green, integer color_blue, integer color_alpha returns nothing call BlzSetSpecialEffectColor(this_1, color_red, color_green, color_blue) call BlzSetSpecialEffectAlpha(this_1, color_alpha) endfunction function construct_Shrapnell takes integer this_1, real startPos_x, real startPos_y, real startPos_z returns nothing local effect receiver local effect receiver_1 call construct_PhysicsProjectile(this_1, startPos_x, startPos_y, startPos_z, 16., Basics_DUMMY_PLAYER, 0., "Abilities\\Weapons\\DruidoftheTalonMissile\\DruidoftheTalonMissile.mdl", 0) call Shrapnell_init(this_1) call dispatch_Projectile_Projectile_Projectile_setXYAngle(this_1, real_asAngleDegrees(GetRandomReal(0., 360.))) call dispatch_Projectile_Projectile_Projectile_setSpeed(this_1, GetRandomReal(5., 11.)) set receiver = Fx2_eff[Fx2Entity_fx[this_1]] call effect_setColor(receiver, GetRandomInt(0, 255), GetRandomInt(0, 255), GetRandomInt(0, 255), 255) set receiver_1 = receiver call effect_setScale(receiver_1, GetRandomReal(0.5, 2.)) set Entity_vel_z[this_1] = GetRandomReal(7., 17.) set Shrapnell_initialTime[this_1] = GetRandomReal(1., 2.5) call dispatch_Projectile_Projectile_Projectile_setTimed(this_1, Shrapnell_initialTime[this_1]) endfunction function new_Shrapnell takes real startPos_x, real startPos_y, real startPos_z returns integer local integer this_1 = alloc_Shrapnell() call construct_Shrapnell(this_1, startPos_x, startPos_y, startPos_z) return this_1 endfunction function shouldSpawnCoin takes nothing returns boolean set LumberAndCoinSystem_coinCount = LumberAndCoinSystem_coinCount + 1 if LumberAndCoinSystem_coinCount >= LumberAndCoinSystem_coinCap then set LumberAndCoinSystem_coinCount = 0 set LumberAndCoinSystem_coinCap = LumberAndCoinSystem_coinCap + 4 + GetRandomInt(-1, 2) + real_round(LumberAndCoinSystem_coinsSpawned / 4.) if PlayerData_bigArena then set LumberAndCoinSystem_coinCap = LumberAndCoinSystem_coinCap + 2 endif set LumberAndCoinSystem_coinsSpawned = LumberAndCoinSystem_coinsSpawned + 1 return true endif return false 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] = 867 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] = 867 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 unit_addBuff takes unit this_1, integer buffObj returns nothing local integer receiver if buffObj == 0 or this_1 == null then call error("Cannot add null buff or null target") endif if not unit_hasBuffs(this_1) then set receiver = new_LinkedList() call dispatch_LinkedList_LinkedList_LinkedList_add_1(receiver, buffObj) set Buff_buffMap[unit_getIndex(this_1)] = receiver else call dispatch_LinkedList_LinkedList_LinkedList_add_1(Buff_buffMap[unit_getIndex(this_1)], buffObj) endif endfunction function unit_issueImmediateOrder takes unit this_1, string order returns boolean return IssueImmediateOrder(this_1, order) endfunction function unit_setTimedLife takes unit this_1, real time returns nothing call UnitApplyTimedLife(this_1, 1112820806, time) endfunction function cyc_Projectile_terminate takes integer funcChoice, integer this_1, real pos_x, real pos_y, real pos_z, player owner_1, unit target_1, integer blockadeBuff, integer bounty, real target_x_1, real target_y_1, real ang_radians, real radius returns nothing local integer this_2 local integer iterator local integer trooper local integer clVar local unit temp local playerunitevent temp_1 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local integer iterator_1 local integer bff local integer sd local integer clVar_1 local unit temp_2 local playerunitevent temp_3 local integer this_3 local real targetPos_x local real targetPos_y local integer clVar_2 local unit temp_4 local playerunitevent temp_5 local real tuple_temp_3 local real tuple_temp_4 local integer iterator_2 local integer bff_1 local integer this_4 local integer i local integer this_5 local unit receiver local unit receiver_1 local unit receiver_2 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 local real tuple_temp_8 local real tuple_temp_9 local real tuple_temp_10 local integer clVar_3 local integer clVar_4 local unit temp_6 local playerunitevent temp_7 local real temp_8 local real tuple_temp_11 local real tuple_temp_12 if funcChoice == 0 then if not Entity_done[this_1] then if Projectile_onEnd[this_1] != 0 then call dispatch_OnEndListener_Projectile_OnEndListener_run(Projectile_onEnd[this_1]) endif call cyc_Projectile_terminate(29, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif elseif funcChoice == 1 then call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, createUnitZ(owner_1, TrooperTower_TROOPG_ID, pos_x, pos_y, pos_z, 0.), 0, 0, 0., 0., 0., 0.) call TroopGround_init(this_1) call dispatch_UnitEntity_Entity_UnitEntity_setXY(this_1, pos_x, pos_y, pos_z) elseif funcChoice == 2 then set this_2 = alloc_TroopGround() call cyc_Projectile_terminate(1, this_2, pos_x, pos_y, pos_z, owner_1, null, 0, 0, 0., 0., 0., 0.) set tempReturn_integer = this_2 return elseif funcChoice == 3 then set iterator = LinkedList_iterator(TrooperTower_troops[this_1]) loop exitwhen not LLIterator_hasNext(iterator) set trooper = LLIterator_next(iterator) call cyc_Projectile_terminate(2, 0, Entity_pos_x[trooper], Entity_pos_y[trooper], Entity_pos_z[trooper], Entity_owner[trooper], null, 0, 0, 0., 0., 0., 0.) call cyc_Projectile_terminate(30, trooper, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endloop call LLIterator_close(iterator) call dispatch_LinkedList_destroyLinkedList(TrooperTower_troops[this_1]) call Tower_onDestroy(this_1) elseif funcChoice == 4 then call cyc_Projectile_terminate(3, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call dealloc_TrooperTower(this_1) elseif funcChoice == 5 then call cyc_Projectile_terminate(13, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) set WarningBuff_startedTime[this_1] = GameTimer_currentTime set WarningBuff_originalOwner[this_1] = unit_getOwner(target_1) set temp = target_1 set temp_1 = EVENT_PLAYER_UNIT_DEATH set clVar = alloc_EventListener_add_WarningBuff_WarningBuff() call construct_EventListener(clVar) set this_1503[clVar] = this_1 call EventListener_add_274(temp, temp_1, clVar) elseif funcChoice == 6 then call cyc_Projectile_terminate(7, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) set tuple_temp = vec2_withHeightMap(unit_getPos(target_1), unit_getPos_return_y) set tuple_temp_1 = vec2_withHeightMap_return_y set tuple_temp_2 = vec2_withHeightMap_return_z set ShieldKitBuff_pos_x[this_1] = tuple_temp set ShieldKitBuff_pos_y[this_1] = tuple_temp_1 set ShieldKitBuff_pos_z[this_1] = tuple_temp_2 elseif funcChoice == 7 then if unit_isAlive(target_1) then set Buff_target[this_1] = target_1 if unit_hasBuffs(target_1) then set iterator_1 = LinkedList_iterator(unit_getBuffs(target_1)) loop exitwhen not LLIterator_hasNext(iterator_1) set bff = LLIterator_next(iterator_1) if Buff_typeId[bff] == Buff_typeId[this_1] and bff != this_1 then set sd = bff set Buff_duration[sd] = Buff_duration[this_1] set ShieldBuff_blockAmount[sd] = ShieldBuff_blockAmount[sd] + ShieldBuff_blockAmount[this_1] set Buff_target[this_1] = null call cyc_unit_removeBuff(10, null, this_1) call LLIterator_close(iterator_1) return endif endloop call LLIterator_close(iterator_1) endif call unit_addBuff(target_1, this_1) call dispatch_Buff_Buff_Buff_refresh(this_1) call cyc_Projectile_terminate(12, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif elseif funcChoice == 8 then call construct_Entity5(this_1, unit_getOwner(target_1), unit_getDynamicPos(target_1), unit_getDynamicPos_return_y, unit_getDynamicPos_return_z, 0.) call UnitEntity_init(this_1) call cyc_Projectile_terminate(32, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) elseif funcChoice == 9 then call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) call BlockadeShip_init(this_1) set BlockadeShip_blockadeBuff[this_1] = blockadeBuff set temp_2 = target_1 set temp_3 = EVENT_PLAYER_UNIT_DEATH set clVar_1 = alloc_EventListener_add_BlockadeShip_TowerBlockade() call construct_EventListener(clVar_1) call EventListener_add_274(temp_2, temp_3, clVar_1) elseif funcChoice == 10 then set this_3 = alloc_BlockadeShip() call cyc_Projectile_terminate(9, this_3, 0., 0., 0., null, target_1, blockadeBuff, 0, 0., 0., 0., 0.) set tempReturn_integer = this_3 return elseif funcChoice == 11 then set tuple_temp_3 = unit_getPos(Buff_target[this_1]) set tuple_temp_4 = unit_getPos_return_y set targetPos_x = tuple_temp_3 set targetPos_y = tuple_temp_4 call cyc_Projectile_terminate(10, 0, 0., 0., 0., null, createUnit(Creep_CREEP_OWNER, TowerBlockade_BLOCKADE_UNIT, targetPos_x, targetPos_y, 0.), this_1, 0, 0., 0., 0., 0.) set TowerBlockadeBuff_blockadeUnit[this_1] = tempReturn_integer set TowerBlockadeBuff_blockadeEffect[this_1] = addEffect(Abilities_howlTarget, targetPos_x, targetPos_y) call unit_addBuff(Buff_target[this_1], this_1) call unit_issueImmediateOrder(Buff_target[this_1], "stop") call dispatch_Tower_Tower_Tower_pause(unit_getEntity(Buff_target[this_1])) set temp_4 = Buff_target[this_1] set temp_5 = EVENT_PLAYER_UNIT_DEATH set clVar_2 = alloc_EventListener_add_TowerBlockadeBuff_TowerBlockade() call construct_EventListener(clVar_2) set this_1500[clVar_2] = this_1 call EventListener_add_274(temp_4, temp_5, clVar_2) elseif funcChoice == 12 then if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Buff.onApply") else call error("Called Buff.onApply on invalid object.") endif endif if Buff_typeId[this_1] <= 650 then if Buff_typeId[this_1] <= 649 then call Buff_onApply(this_1) else call cyc_Projectile_terminate(11, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif else call Buff_onApply(this_1) endif elseif funcChoice == 13 then if unit_isAlive(target_1) then set Buff_target[this_1] = target_1 if unit_hasBuffs(target_1) then set iterator_2 = LinkedList_iterator(unit_getBuffs(target_1)) loop exitwhen not LLIterator_hasNext(iterator_2) set bff_1 = LLIterator_next(iterator_2) if Buff_typeId[bff_1] == Buff_typeId[this_1] then set Buff_duration[bff_1] = Buff_duration[this_1] set Buff_target[this_1] = null call cyc_unit_removeBuff(10, null, this_1) call LLIterator_close(iterator_2) return endif endloop call LLIterator_close(iterator_2) endif call unit_addBuff(target_1, this_1) call dispatch_Buff_Buff_Buff_refresh(this_1) call cyc_Projectile_terminate(12, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif elseif funcChoice == 14 then if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling NormalBuff.apply") else call error("Called NormalBuff.apply on invalid object.") endif endif if Buff_typeId[this_1] <= 648 then if Buff_typeId[this_1] <= 647 then if Buff_typeId[this_1] <= 645 then call cyc_Projectile_terminate(13, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) else call cyc_Projectile_terminate(7, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif else call cyc_Projectile_terminate(6, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif elseif Buff_typeId[this_1] <= 650 then if Buff_typeId[this_1] <= 649 then call cyc_Projectile_terminate(7, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) else call cyc_Projectile_terminate(13, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif else call cyc_Projectile_terminate(5, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif elseif funcChoice == 15 then call construct_NormalBuff(this_1, TowerBlockade_BLOCKADE_DURATION, TowerBlockade_blockadeBuff_abilId, TowerBlockade_blockadeBuff_buffId) call TowerBlockadeBuff_init(this_1) call new_TextTagEntity(dispatch_UnitEntity_Entity_UnitEntity_getPos(blockadeBuff), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, GetRandomReal(-1., 1.), 0., GetRandomReal(7., 9.), "Blockaded!", 9., 1., 185, 14, 14, 255) call cyc_Projectile_terminate(14, this_1, 0., 0., 0., null, UnitEntity_actor[blockadeBuff], 0, 0, 0., 0., 0., 0.) elseif funcChoice == 16 then set this_4 = alloc_TowerBlockadeBuff() call cyc_Projectile_terminate(15, this_4, 0., 0., 0., null, null, this_1, 0, 0., 0., 0., 0.) set tempReturn_integer = this_4 return elseif funcChoice == 17 then call cyc_Projectile_terminate(16, TowerBlockadeMissile_utarget[this_1], 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call Projectile_onDestroy(this_1) elseif funcChoice == 18 then call cyc_Projectile_terminate(17, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call dealloc_TowerBlockadeMissile(this_1) elseif funcChoice == 19 then call cyc_Projectile_terminate(26, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) elseif funcChoice == 20 then call cyc_Projectile_terminate(19, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call dealloc_Shrapnell(this_1) elseif funcChoice == 21 then call new_TextTagEntity(dispatch_Entity_Entity_Entity_getPos(this_1), dispatch_Entity_Entity_Entity_getPos_return_y, dispatch_Entity_Entity_Entity_getPos_return_z, 0., 0., 17.5, "HELP!", 25., 2., 255, 50, 50, 255) call dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(Rocket_UNDER_ATTACK_SOUND) set i = 0 loop exitwhen i > 16 call new_Shrapnell(dispatch_Entity_Entity_Entity_getPos(this_1), dispatch_Entity_Entity_Entity_getPos_return_y, dispatch_Entity_Entity_Entity_getPos_return_z) set i = i + 1 endloop call cyc_Projectile_terminate(26, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) elseif funcChoice == 22 then call cyc_Projectile_terminate(21, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call dealloc_Rocket(this_1) elseif funcChoice == 23 then set this_5 = alloc_Creep() call cyc_Projectile_terminate(34, this_5, pos_x, pos_y, pos_z, null, null, blockadeBuff, bounty, target_x_1, target_y_1, ang_radians, 0.) set tempReturn_integer = this_5 return elseif funcChoice == 24 then call cyc_Projectile_terminate(23, 0, dispatch_Entity_Entity_Entity_getPos(blockadeBuff), dispatch_Entity_Entity_Entity_getPos_return_y, dispatch_Entity_Entity_Entity_getPos_return_z, null, null, 1966092374, 12, Wave_middle_x, Wave_middle_y, dispatch_Projectile_Projectile_Projectile_getXYAngle(blockadeBuff), 0.) set tempReturn_integer = tempReturn_integer return elseif funcChoice == 25 then if OnExpireEvent_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnExpireEvent.onExpire") else call error("Called OnExpireEvent.onExpire on invalid object.") endif endif call cyc_Projectile_terminate(24, this_1, 0., 0., 0., null, null, blockadeBuff, 0, 0., 0., 0., 0.) elseif funcChoice == 26 then if PhysicsProjectile_oe[this_1] != 0 then call cyc_Projectile_terminate(25, PhysicsProjectile_oe[this_1], 0., 0., 0., null, null, this_1, 0, 0., 0., 0., 0.) call dispatch_OnExpireEvent_destroyOnExpireEvent(PhysicsProjectile_oe[this_1]) endif call Projectile_onDestroy(this_1) elseif funcChoice == 27 then call cyc_Projectile_terminate(26, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call dealloc_PhysicsProjectile(this_1) elseif funcChoice == 28 then if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.Entity") else call error("Called Entity.Entity on invalid object.") endif endif if Serializable_typeId[this_1] <= 941 then if Serializable_typeId[this_1] <= 929 then if Serializable_typeId[this_1] <= 923 then if Serializable_typeId[this_1] <= 920 then if Serializable_typeId[this_1] <= 918 then if Serializable_typeId[this_1] <= 917 then call destroyEntity(this_1) else call destroyFx2Entity(this_1) endif elseif Serializable_typeId[this_1] <= 919 then call destroyBall(this_1) else call destroyForceField(this_1) endif elseif Serializable_typeId[this_1] <= 922 then if Serializable_typeId[this_1] <= 921 then call destroyProjectile(this_1) else call destroyArtilleryMissile(this_1) endif else call destroyFlameMissile(this_1) endif elseif Serializable_typeId[this_1] <= 926 then if Serializable_typeId[this_1] <= 925 then if Serializable_typeId[this_1] <= 924 then call destroyHealbackMissile(this_1) else call cyc_Projectile_terminate(27, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif else call cyc_Projectile_terminate(22, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif elseif Serializable_typeId[this_1] <= 928 then if Serializable_typeId[this_1] <= 927 then call cyc_Projectile_terminate(20, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) else call destroySphere(this_1) endif else call cyc_Projectile_terminate(18, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif elseif Serializable_typeId[this_1] <= 935 then if Serializable_typeId[this_1] <= 932 then if Serializable_typeId[this_1] <= 931 then if Serializable_typeId[this_1] <= 930 then call destroyWaveMissile(this_1) else call destroyItemEntity(this_1) endif else call destroyEntity(this_1) endif elseif Serializable_typeId[this_1] <= 934 then if Serializable_typeId[this_1] <= 933 then call destroyUnitEntity(this_1) else call cyc_unit_removeBuff(5, null, this_1) endif else call destroyBuilder(this_1) endif elseif Serializable_typeId[this_1] <= 938 then if Serializable_typeId[this_1] <= 937 then if Serializable_typeId[this_1] <= 936 then call destroyCreep(this_1) else call destroyBoss(this_1) endif else call destroyBossFive(this_1) endif elseif Serializable_typeId[this_1] <= 940 then if Serializable_typeId[this_1] <= 939 then call destroyBossFour(this_1) else call destroyBossOne(this_1) endif else call destroyBossThree(this_1) endif elseif Serializable_typeId[this_1] <= 953 then if Serializable_typeId[this_1] <= 947 then if Serializable_typeId[this_1] <= 944 then if Serializable_typeId[this_1] <= 943 then if Serializable_typeId[this_1] <= 942 then call destroyBossTwo(this_1) else call destroyEndBoss(this_1) endif else call destroyDestroyerSummoner(this_1) endif elseif Serializable_typeId[this_1] <= 946 then if Serializable_typeId[this_1] <= 945 then call destroySpecial(this_1) else call destroySpawn(this_1) endif else call destroySpecialFive(this_1) endif elseif Serializable_typeId[this_1] <= 950 then if Serializable_typeId[this_1] <= 949 then if Serializable_typeId[this_1] <= 948 then call destroySpecialFour(this_1) else call destroySpecialOne(this_1) endif else call destroySpecialThree(this_1) endif elseif Serializable_typeId[this_1] <= 952 then if Serializable_typeId[this_1] <= 951 then call destroySpecialTwo(this_1) else call destroyTentacle(this_1) endif else call destroyReinforcement(this_1) endif elseif Serializable_typeId[this_1] <= 959 then if Serializable_typeId[this_1] <= 956 then if Serializable_typeId[this_1] <= 955 then if Serializable_typeId[this_1] <= 954 then call destroySelector(this_1) else call destroyTower(this_1) endif else call destroyArtilleryTower(this_1) endif elseif Serializable_typeId[this_1] <= 958 then if Serializable_typeId[this_1] <= 957 then call destroyFlamethrowerTower(this_1) else call destroyHealbackTower(this_1) endif else call destroyThermoTower(this_1) endif elseif Serializable_typeId[this_1] <= 962 then if Serializable_typeId[this_1] <= 961 then if Serializable_typeId[this_1] <= 960 then call cyc_Projectile_terminate(4, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) else call destroyWaveTower(this_1) endif else call destroyTreasure(this_1) endif elseif Serializable_typeId[this_1] <= 964 then if Serializable_typeId[this_1] <= 963 then call destroyTroop(this_1) else call destroyTroopGround(this_1) endif else call destroyWall(this_1) endif elseif funcChoice == 29 then if not Entity_done[this_1] then set Entity_done[this_1] = true call cyc_Projectile_terminate(28, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif elseif funcChoice == 30 then if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.terminate") else call error("Called Entity.terminate on invalid object.") endif endif if Serializable_typeId[this_1] <= 930 then if Serializable_typeId[this_1] <= 920 then call cyc_Projectile_terminate(29, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) else call cyc_Projectile_terminate(0, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif else call cyc_Projectile_terminate(29, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif elseif funcChoice == 31 then set UnitEntity_actor[this_1] = target_1 call dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1) if not unit_isAlive(target_1) then call cyc_Projectile_terminate(30, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call error("Trying to assign entity to unit that is not alive") elseif unit_getEntity(target_1) != 0 then call cyc_Projectile_terminate(30, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) call error("Trying to assign entity to unit that already has an entity") endif set receiver = target_1 call unit_setEntity(receiver, this_1) set receiver_1 = receiver call unit_addAbility(receiver_1, Basics_HEIGHT_ENABLER) set receiver_2 = receiver_1 call unit_removeAbility(receiver_2, Basics_HEIGHT_ENABLER) if Frentity_config_DYNAMIC_Z then set tuple_temp_5 = unit_getDynamicPos(target_1) set tuple_temp_6 = unit_getDynamicPos_return_y set tuple_temp_7 = unit_getDynamicPos_return_z set Entity_pos_x[this_1] = tuple_temp_5 set Entity_pos_y[this_1] = tuple_temp_6 set Entity_pos_z[this_1] = tuple_temp_7 call unit_setXYZReal(target_1, Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) else set tuple_temp_8 = unit_getPos3Fly(target_1) set tuple_temp_9 = unit_getPos3Fly_return_y set tuple_temp_10 = unit_getPos3Fly_return_z set Entity_pos_x[this_1] = tuple_temp_8 set Entity_pos_y[this_1] = tuple_temp_9 set Entity_pos_z[this_1] = tuple_temp_10 call unit_setXYZ(target_1, Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) endif elseif funcChoice == 32 then if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitEntity.setupUnitEntity") else call error("Called UnitEntity.setupUnitEntity on invalid object.") endif endif call cyc_Projectile_terminate(31, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) elseif funcChoice == 33 then call construct_Entity5(this_1, unit_getOwner(target_1), target_x_1, target_y_1, ang_radians, radius) call UnitEntity_init(this_1) call cyc_Projectile_terminate(32, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) elseif funcChoice == 34 then call cyc_Projectile_terminate(33, this_1, 0., 0., 0., null, createUnit(Creep_CREEP_OWNER, blockadeBuff, vec3_toVec2(pos_x, pos_y, pos_z), vec3_toVec2_return_y, ang_radians), 0, 0, pos_x, pos_y, pos_z, 16.) call Creep_init(this_1) call unit_setAnimation(UnitEntity_actor[this_1], "birth") set Creep_bounty[this_1] = bounty set Creep_dropCoin[this_1] = shouldSpawnCoin() call unit_setTimedLife(UnitEntity_actor[this_1], 5.15 * 60.) set temp_6 = UnitEntity_actor[this_1] set temp_7 = EVENT_PLAYER_UNIT_DEATH set clVar_3 = alloc_EventListener_add_Creep_Creep() call construct_EventListener(clVar_3) set this_1485[clVar_3] = this_1 call EventListener_add_274(temp_6, temp_7, clVar_3) set temp_8 = GetRandomReal(0.01, 0.2) set clVar_4 = alloc_CallbackSingle_doAfter_Creep_Creep() call construct_CallbackSingle(clVar_4) set this_1486[clVar_4] = this_1 set tuple_temp_11 = target_x_1 set tuple_temp_12 = target_y_1 set target_x[clVar_4] = tuple_temp_11 set target_y[clVar_4] = tuple_temp_12 call doAfter(temp_8, clVar_4) endif endfunction function CallbackPeriodic_onDestroy takes integer this_1 returns nothing call timer_release(CallbackPeriodic_t[this_1]) endfunction function dealloc_CallbackPeriodic takes integer obj returns nothing if CallbackPeriodic_typeId[obj] == 0 then call error("Double free: object of type CallbackPeriodic") else set CallbackPeriodic_nextFree[CallbackPeriodic_firstFree] = obj set CallbackPeriodic_firstFree = CallbackPeriodic_firstFree + 1 set CallbackPeriodic_typeId[obj] = 0 endif endfunction function destroyCallbackPeriodic takes integer this_1 returns nothing call CallbackPeriodic_onDestroy(this_1) call dealloc_CallbackPeriodic(this_1) endfunction function dispatch_CallbackPeriodic_destroyCallbackPeriodic takes integer this_1 returns nothing if CallbackPeriodic_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackPeriodic.CallbackPeriodic") else call error("Called CallbackPeriodic.CallbackPeriodic on invalid object.") endif endif call destroyCallbackPeriodic(this_1) endfunction function alloc_CallbackSingle_doAfter_DummyRecycler_DummyRecycler 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] = 673 else call error("Out of memory: Could not create CallbackSingle_doAfter_DummyRecycler_DummyRecycler.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 673 endif return this_1 endfunction function DummyRecycler_recycle_215 takes unit u_1, real delay returns nothing local real temp = delay local integer clVar = alloc_CallbackSingle_doAfter_DummyRecycler_DummyRecycler() call construct_CallbackSingle(clVar) set u[clVar] = u_1 call doAfter(temp, clVar) endfunction function Fx_onDestroy takes integer this_1 returns nothing if Fx_fx[this_1] != null then call effect_destr(Fx_fx[this_1]) endif call DummyRecycler_recycle_215(Fx_dummy[this_1], 1.) endfunction function dealloc_Fx takes integer obj returns nothing if Fx_typeId[obj] == 0 then call error("Double free: object of type Fx") else set Fx_nextFree[Fx_firstFree] = obj set Fx_firstFree = Fx_firstFree + 1 set Fx_typeId[obj] = 0 endif endfunction function destroyFx takes integer this_1 returns nothing call Fx_onDestroy(this_1) call dealloc_Fx(this_1) endfunction function dispatch_Fx_destroyFx takes integer this_1 returns nothing if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.Fx") else call error("Called Fx.Fx on invalid object.") endif endif call destroyFx(this_1) endfunction function Fx_hiddenDestroy takes integer this_1 returns nothing call unit_setPos_2469(Fx_dummy[this_1], 2147483647., 2147483647.) call dispatch_Fx_destroyFx(this_1) endfunction function dispatch_Fx_Fx_Fx_hiddenDestroy takes integer this_1 returns nothing if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.hiddenDestroy") else call error("Called Fx.hiddenDestroy on invalid object.") endif endif call Fx_hiddenDestroy(this_1) endfunction function alloc_Fx takes nothing returns integer local integer this_1 if Fx_firstFree == 0 then if Fx_maxIndex < JASS_MAX_ARRAY_SIZE then set Fx_maxIndex = Fx_maxIndex + 1 set this_1 = Fx_maxIndex set Fx_typeId[this_1] = 806 else call error("Out of memory: Could not create Fx.") set this_1 = 0 endif else set Fx_firstFree = Fx_firstFree - 1 set this_1 = Fx_nextFree[Fx_firstFree] set Fx_typeId[this_1] = 806 endif return this_1 endfunction function Fx_init takes integer this_1 returns nothing set Fx_dummy[this_1] = null set Fx_fx[this_1] = null endfunction function widget_addEffect takes widget this_1, string modelName, string attachment returns effect return AddSpecialEffectTarget(modelName, this_1, attachment) endfunction function Fx_setFx takes integer this_1, string newpath returns nothing if Fx_fx[this_1] != null then call effect_destr(Fx_fx[this_1]) endif if newpath == "" then set Fx_fx[this_1] = null else set Fx_fx[this_1] = widget_addEffect(Fx_dummy[this_1], newpath, "origin") endif endfunction function dispatch_Fx_Fx_Fx_setFx takes integer this_1, string newpath returns nothing if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.setFx") else call error("Called Fx.setFx on invalid object.") endif endif call Fx_setFx(this_1, newpath) endfunction function Fx_setZ takes integer this_1, real z returns nothing call unit_setFlyHeight(Fx_dummy[this_1], z, 0.) endfunction function dispatch_Fx_Fx_Fx_setZ takes integer this_1, real z returns nothing if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.setZ") else call error("Called Fx.setZ on invalid object.") endif endif call Fx_setZ(this_1, z) endfunction function construct_Fx7 takes integer this_1, real pos_x, real pos_y, real pos_z, real facing_radians, string fxpath returns nothing call Fx_init(this_1) set Fx_dummy[this_1] = DummyRecycler_get(vec3_toVec2(pos_x, pos_y, pos_z), vec3_toVec2_return_y, facing_radians) call dispatch_Fx_Fx_Fx_setZ(this_1, pos_z) call dispatch_Fx_Fx_Fx_setFx(this_1, fxpath) endfunction function new_Fx_2147 takes real pos_x, real pos_y, real pos_z, real facing_radians, string fxpath returns integer local integer this_1 = alloc_Fx() call construct_Fx7(this_1, pos_x, pos_y, pos_z, facing_radians, fxpath) return this_1 endfunction function FinalBossSummoning_onDestroy takes integer this_1 returns nothing local integer iterator = LinkedList_iterator(FinalBossSummoning_summoners[this_1]) local integer s loop exitwhen not LLIterator_hasNext(iterator) set s = LLIterator_next(iterator) call dispatch_Fx_Fx_Fx_hiddenDestroy(new_Fx_2147(Entity_pos_x[s], Entity_pos_y[s], Entity_pos_z[s], 0., Abilities_aIamTarget)) call unit_kill(UnitEntity_actor[s]) endloop call LLIterator_close(iterator) call dispatch_LinkedList_destroyLinkedList(FinalBossSummoning_summoners[this_1]) call dispatch_CallbackPeriodic_destroyCallbackPeriodic(FinalBossSummoning_updateCb[this_1]) call dispatch_FText_destroyFText(FinalBossSummoning_summonText[this_1]) if FinalBossSummoning_summoningEffect[this_1] != 0 then call dispatch_Fx_destroyFx(FinalBossSummoning_summoningEffect[this_1]) endif endfunction function dealloc_FinalBossSummoning takes integer obj returns nothing if FinalBossSummoning_typeId[obj] == 0 then call error("Double free: object of type FinalBossSummoning") else set FinalBossSummoning_nextFree[FinalBossSummoning_firstFree] = obj set FinalBossSummoning_firstFree = FinalBossSummoning_firstFree + 1 set FinalBossSummoning_typeId[obj] = 0 endif endfunction function destroyFinalBossSummoning takes integer this_1 returns nothing call FinalBossSummoning_onDestroy(this_1) call dealloc_FinalBossSummoning(this_1) endfunction function dispatch_FinalBossSummoning_destroyFinalBossSummoning takes integer this_1 returns nothing if FinalBossSummoning_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FinalBossSummoning.FinalBossSummoning") else call error("Called FinalBossSummoning.FinalBossSummoning on invalid object.") endif endif call destroyFinalBossSummoning(this_1) endfunction function EndBossFight_endDestroyerSummoning takes integer this_1 returns nothing if not EndBossFight_summoningComplete[this_1] then set EndBossFight_summoningComplete[this_1] = true call dispatch_FinalBossSummoning_destroyFinalBossSummoning(EndBossFight_destroyerSummoning[this_1]) endif endfunction function dispatch_EndBossFight_EndBoss_EndBossFight_endDestroyerSummoning takes integer this_1 returns nothing if EndBossFight_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBossFight.endDestroyerSummoning") else call error("Called EndBossFight.endDestroyerSummoning on invalid object.") endif endif call EndBossFight_endDestroyerSummoning(this_1) endfunction function Fx_setScale takes integer this_1, real value returns nothing call unit_setScale(Fx_dummy[this_1], value) endfunction function dispatch_Fx_Fx_Fx_setScale takes integer this_1, real value returns nothing if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.setScale") else call error("Called Fx.setScale on invalid object.") endif endif call Fx_setScale(this_1, value) endfunction function construct_Fx4 takes integer this_1, real pos_x, real pos_y, real facing_radians, string fxpath returns nothing call Fx_init(this_1) set Fx_dummy[this_1] = DummyRecycler_get(pos_x, pos_y, facing_radians) call dispatch_Fx_Fx_Fx_setFx(this_1, fxpath) endfunction function new_Fx takes real pos_x, real pos_y, real facing_radians, string fxpath returns integer local integer this_1 = alloc_Fx() call construct_Fx4(this_1, pos_x, pos_y, facing_radians, fxpath) return this_1 endfunction function real_asAngleRadians takes real this_1 returns real set real_asAngleRadians_return_radians = this_1 return real_asAngleRadians_return_radians endfunction function vec2_angleTo takes real this_x, real this_y, real v_x, real v_y returns real set vec2_angleTo_return_radians = real_asAngleRadians(Atan2(v_y - this_y, v_x - this_x)) return vec2_angleTo_return_radians endfunction function angle_toVec takes real this_radians, real len returns real set angle_toVec_return_x = Cos(this_radians) * len set angle_toVec_return_y = Sin(this_radians) * len return angle_toVec_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 vec2_polarOffset takes real this_x, real this_y, real ang_radians, real dist returns real set vec2_polarOffset_return_x = vec2_op_plus(this_x, this_y, angle_toVec(ang_radians, dist), angle_toVec_return_y) set vec2_polarOffset_return_y = vec2_op_plus_return_y return vec2_polarOffset_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 FinalBossSummoning_summonDestroyer takes integer this_1 returns nothing local real tuple_temp = vec2_polarOffset(Wave_middle_x, Wave_middle_y, FinalBossSummoning_animationLoop[this_1] * 6.28, 200.) local real tuple_temp_1 = vec2_polarOffset_return_y local real summonPos_x = tuple_temp local real summonPos_y = tuple_temp_1 local integer destroyerFx_1 = new_Fx(summonPos_x, summonPos_y, 0., Abilities_markOfChaosTarget) local integer receiver = new_Fx(Wave_middle_x, Wave_middle_y, 0., Abilities_markOfChaosTarget) local integer middleFx_1 local integer clVar call dispatch_Fx_Fx_Fx_setScale(receiver, 2.) set middleFx_1 = receiver set clVar = alloc_CallbackSingle_doAfter_FinalBossSummoning_DestroyerSummoner() call construct_CallbackSingle(clVar) set destroyerFx[clVar] = destroyerFx_1 set middleFx[clVar] = middleFx_1 call doAfter(2., clVar) call cyc_Projectile_terminate(23, 0, vec2_toVec3(summonPos_x, summonPos_y), vec2_toVec3_return_y, vec2_toVec3_return_z, null, null, DestroyerSummoner_DESTROYER_ID, DestroyerSummoner_DESTROYER_BOUNTY, Wave_middle_x, Wave_middle_y, vec2_angleTo(summonPos_x, summonPos_y, Wave_middle_x, Wave_middle_y), 0.) call dispatch_EndBossFight_EndBoss_EndBossFight_endDestroyerSummoning(FinalBossSummoning_endBossFightRef[this_1]) endfunction function dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_summonDestroyer takes integer this_1 returns nothing if FinalBossSummoning_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FinalBossSummoning.summonDestroyer") else call error("Called FinalBossSummoning.summonDestroyer on invalid object.") endif endif call FinalBossSummoning_summonDestroyer(this_1) endfunction function Fx_setColor takes integer this_1, integer newColor_red, integer newColor_green, integer newColor_blue, integer newColor_alpha returns nothing call unit_setVertexColor(Fx_dummy[this_1], newColor_red, newColor_green, newColor_blue, newColor_alpha) endfunction function dispatch_Fx_Fx_Fx_setColor takes integer this_1, integer newColor_red, integer newColor_green, integer newColor_blue, integer newColor_alpha returns nothing if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.setColor") else call error("Called Fx.setColor on invalid object.") endif endif call Fx_setColor(this_1, newColor_red, newColor_green, newColor_blue, newColor_alpha) endfunction function Fx_getDummy takes integer this_1 returns unit return Fx_dummy[this_1] endfunction function dispatch_Fx_Fx_Fx_getDummy takes integer this_1 returns unit local unit Fx_Fx_getDummy_result if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.getDummy") else call error("Called Fx.getDummy on invalid object.") endif endif set Fx_Fx_getDummy_result = Fx_getDummy(this_1) return Fx_Fx_getDummy_result endfunction function unit_setColor takes unit this_1, playercolor c returns nothing call SetUnitColor(this_1, c) endfunction function Fx_setPlayerColor takes integer this_1, playercolor pc returns nothing call unit_setColor(dispatch_Fx_Fx_Fx_getDummy(this_1), pc) endfunction function dispatch_Fx_Fx_Fx_setPlayerColor takes integer this_1, playercolor pc returns nothing if Fx_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx.setPlayerColor") else call error("Called Fx.setPlayerColor on invalid object.") endif endif call Fx_setPlayerColor(this_1, pc) endfunction function construct_Fx8 takes integer this_1, playercolor pc, real pos_x, real pos_y, real pos_z, real facing_radians, string fxpath returns nothing call Fx_init(this_1) set Fx_dummy[this_1] = DummyRecycler_get(vec3_toVec2(pos_x, pos_y, pos_z), vec3_toVec2_return_y, facing_radians) call dispatch_Fx_Fx_Fx_setFx(this_1, fxpath) call dispatch_Fx_Fx_Fx_setZ(this_1, pos_z) call dispatch_Fx_Fx_Fx_setPlayerColor(this_1, pc) endfunction function new_Fx_2148 takes playercolor pc, real pos_x, real pos_y, real pos_z, real facing_radians, string fxpath returns integer local integer this_1 = alloc_Fx() call construct_Fx8(this_1, pc, pos_x, pos_y, pos_z, facing_radians, fxpath) return this_1 endfunction function texttag_setColor takes texttag this_1, integer r, integer g, integer b, integer a returns nothing call SetTextTagColor(this_1, r, g, b, a) endfunction function vec3_add takes real this_x, real this_y, real this_z, real x, real y, real z returns real set vec3_add_return_x = this_x + x set vec3_add_return_y = this_y + y set vec3_add_return_z = this_z + z return vec3_add_return_x endfunction function vec3_angleTo2d takes real this_x, real this_y, real this_z, real v_x, real v_y returns real set vec3_angleTo2d_return_radians = real_asAngleRadians(Atan2(v_y - this_y, v_x - this_x)) return vec3_angleTo2d_return_radians endfunction function FinalBossSummoning_updateAnimation takes integer this_1 returns nothing local integer percentComp local integer receiver local integer receiver_1 local integer receiver_2 local texttag receiver_3 local texttag receiver_4 local texttag receiver_5 local integer i local integer iterator local integer summoner set FinalBossSummoning_animationLoop[this_1] = ModuloReal(FinalBossSummoning_animationLoop[this_1] + DestroyerSummoner_updatePeriod / DestroyerSummoner_animationLoopPeriod, 1.) if FinalBossSummoning_castingCount[this_1] > 0 or FinalBossSummoning_castPercent[this_1] > 0. then set percentComp = PercentTo255(FinalBossSummoning_castPercent[this_1]) if FinalBossSummoning_summoningEffect[this_1] == 0 then set receiver = new_Fx_2148(PLAYER_COLOR_LIGHT_GRAY, vec2_toVec3(Wave_middle_x, Wave_middle_y), vec2_toVec3_return_y, vec2_toVec3_return_z, 0., Abilities_voodooAura) call dispatch_Fx_Fx_Fx_setColor(receiver, 255, 255, 255, 0) set FinalBossSummoning_summoningEffect[this_1] = receiver endif set receiver_1 = FinalBossSummoning_summoningEffect[this_1] call dispatch_Fx_Fx_Fx_setScale(receiver_1, 1.2 + FinalBossSummoning_castPercent[this_1] / 75.) set receiver_2 = receiver_1 call dispatch_Fx_Fx_Fx_setColor(receiver_2, 63 + real_toInt(percentComp * 3. / 4.), 0, 0, percentComp) set receiver_3 = FText_tt[FinalBossSummoning_summonText[this_1]] call texttag_setVisibility(receiver_3, true) set receiver_4 = receiver_3 call texttag_setText(receiver_4, int_toString(real_toInt(FinalBossSummoning_castPercent[this_1])) + "%", 12.) set receiver_5 = receiver_4 call texttag_setColor(receiver_5, percentComp, 155 - percentComp, 0, 255) else if FinalBossSummoning_summoningEffect[this_1] != 0 then call dispatch_Fx_destroyFx(FinalBossSummoning_summoningEffect[this_1]) set FinalBossSummoning_summoningEffect[this_1] = 0 endif call texttag_setVisibility(FText_tt[FinalBossSummoning_summonText[this_1]], false) endif set i = 0 set iterator = LinkedList_iterator(FinalBossSummoning_summoners[this_1]) loop exitwhen not LLIterator_hasNext(iterator) set summoner = LLIterator_next(iterator) if DestroyerSummoner_casting[summoner] then call dispatch_UnitEntity_Entity_UnitEntity_setPos(summoner, vec3_add(vec2_toVec3(vec2_polarOffset(Wave_middle_x, Wave_middle_y, (FinalBossSummoning_animationLoop[this_1] + (i - FinalBossSummoning_castingCount[this_1]) * 1. / FinalBossSummoning_castingCount[this_1]) * 6.28, 200.), vec2_polarOffset_return_y), vec2_toVec3_return_y, vec2_toVec3_return_z, 0., 0., 120.), vec3_add_return_y, vec3_add_return_z) call unit_setFacing(UnitEntity_actor[summoner], vec3_angleTo2d(Entity_pos_x[summoner], Entity_pos_y[summoner], Entity_pos_z[summoner], Wave_middle_x, Wave_middle_y)) set i = i + 1 endif endloop call LLIterator_close(iterator) endfunction function dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_updateAnimation takes integer this_1 returns nothing if FinalBossSummoning_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FinalBossSummoning.updateAnimation") else call error("Called FinalBossSummoning.updateAnimation on invalid object.") endif endif call FinalBossSummoning_updateAnimation(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 real_squared takes real this_1 returns real return this_1 * this_1 endfunction function vec3_distanceTo2d_2519 takes real this_x, real this_y, real this_z, real v_x, real v_y returns real return SquareRoot(real_squared(v_x - this_x) + real_squared(v_y - this_y)) endfunction function FinalBossSummoning_update takes integer this_1 returns nothing local integer newCastingCount = 0 local integer iterator = LinkedList_iterator(FinalBossSummoning_summoners[this_1]) local integer summoner loop exitwhen not LLIterator_hasNext(iterator) set summoner = LLIterator_next(iterator) if unit_isAlive(UnitEntity_actor[summoner]) then if not DestroyerSummoner_casting[summoner] then if vec3_distanceTo2d_2519(dispatch_UnitEntity_Entity_UnitEntity_getPos(summoner), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, Wave_middle_x, Wave_middle_y) < 220. then call dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_startCasting(this_1, summoner) set newCastingCount = newCastingCount + 1 endif else set newCastingCount = newCastingCount + 1 endif else call dispatch_LinkedList_LinkedList_LinkedList_remove(FinalBossSummoning_summoners[this_1], summoner) endif endloop call LLIterator_close(iterator) set FinalBossSummoning_castingCount[this_1] = newCastingCount set FinalBossSummoning_castPercent[this_1] = FinalBossSummoning_castPercent[this_1] + dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_getSummonSpeed(this_1, FinalBossSummoning_castingCount[this_1]) * 2. * Basics_ANIMATION_PERIOD if FinalBossSummoning_castPercent[this_1] < 0. then set FinalBossSummoning_castPercent[this_1] = 0. endif if FinalBossSummoning_castPercent[this_1] >= 100. then set FinalBossSummoning_castPercent[this_1] = 0. call dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_summonDestroyer(this_1) else call dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_updateAnimation(this_1) endif endfunction function dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_update takes integer this_1 returns nothing if FinalBossSummoning_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FinalBossSummoning.update") else call error("Called FinalBossSummoning.update on invalid object.") endif endif call FinalBossSummoning_update(this_1) endfunction function call_doPeriodically_FinalBossSummoning_DestroyerSummoner takes integer this_1, integer cb_1 returns nothing call dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_update(this_1495[this_1]) endfunction function dispatch_CallbackPeriodic_ClosureTimers_CallbackPeriodic_call takes integer this_1, integer cb_1 returns nothing if CallbackPeriodic_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackPeriodic.call") else call error("Called CallbackPeriodic.call on invalid object.") endif endif call call_doPeriodically_FinalBossSummoning_DestroyerSummoner(this_1, cb_1) endfunction function CallbackPeriodic_staticCallback takes nothing returns nothing local integer cb_1 = timer_getData(GetExpiredTimer()) call dispatch_CallbackPeriodic_ClosureTimers_CallbackPeriodic_call(cb_1, cb_1) endfunction function onEvent_add_ArtilleryTower_ArtilleryTower takes integer this_1 returns nothing local integer ord = GetIssuedOrderId() if ord == SpecialOrders_smart or ord == OrderIds_move then call unit_issueImmediateOrder(UnitEntity_actor[this_1504[this_1]], "stop") endif endfunction function BlockadeShip_terminateBuff takes integer this_1 returns nothing call cyc_unit_removeBuff(10, null, BlockadeShip_blockadeBuff[this_1]) endfunction function dispatch_BlockadeShip_TowerBlockade_BlockadeShip_terminateBuff takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BlockadeShip.terminateBuff") else call error("Called BlockadeShip.terminateBuff on invalid object.") endif endif call BlockadeShip_terminateBuff(this_1) endfunction function onEvent_add_BlockadeShip_TowerBlockade takes integer this_1 returns nothing local integer buffUnit = unit_getEntity(GetTriggerUnit()) if buffUnit != 0 then call dispatch_BlockadeShip_TowerBlockade_BlockadeShip_terminateBuff(buffUnit) endif 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] = 701 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] = 701 endif return 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 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(10, 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_2204 takes integer this_1 returns nothing local unit u_1 = GetTriggerUnit() call unit_clearBuffs(u_1) endfunction function alloc_CallbackSingle_doAfter_Creep_Creep_952 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_doAfter_Creep_Creep.") 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 createItem_1368 takes integer itemId, real pos_x, real pos_y, real pos_z returns item return CreateItem(itemId, pos_x, pos_y) endfunction function player_getState takes player this_1, playerstate state returns integer return GetPlayerState(this_1, state) endfunction function player_addState takes player this_1, playerstate state, integer wval returns nothing call SetPlayerState(this_1, state, player_getState(this_1, state) + wval) endfunction function player_addGold takes player this_1, integer wval returns nothing call player_addState(this_1, PLAYER_STATE_RESOURCE_GOLD, wval) endfunction function createFText_1363 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, player p returns integer local integer ft = createFText_1364(pos_x, pos_y, pos_z, text, size, lifespan, vel_x, vel_y, col_red, col_green, col_blue, col_alpha) call texttag_setVisibility(FText_tt[ft], GetLocalPlayer() == p) return ft endfunction function showBountyTextTag takes integer bounty, unit receiver, player p returns nothing if bounty > 0 then call createFText_1363(GetUnitX(receiver) - 20., GetUnitY(receiver), - 30., "+" + int_toString(bounty), Bounty_TEXTTAG_TEXTSIZE, Bounty_TEXTTAG_LIFESPAN, 0., Bounty_TEXTTAG_VELOCITY, 255, 220, 0, 255, p) endif endfunction function Creep_onDeath takes integer this_1 returns nothing local unit killer = GetKillingUnit() local item itm_1 local integer clVar local integer size local integer killBounty local integer iterator local integer pd local integer killBounty_1 local integer restBounty local integer iterator_1 local integer pd_1 if Creep_dropCoin[this_1] then set itm_1 = createItem_1368(LumberAndCoinSystem_COIN_ID, dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z) call item_setUserData(itm_1, real_round(getElapsedGameTime() / 17.)) set clVar = alloc_CallbackSingle_doAfter_Creep_Creep_952() call construct_CallbackSingle(clVar) set itm[clVar] = itm_1 call doAfter(45., clVar) endif if killer != null and unit_getOwner(killer) != Entity_owner[this_1] then set size = dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) if PlayerData_pDatas[player_getId(unit_getOwner(killer))] == 0 then set killBounty = Creep_bounty[this_1] / size if killBounty <= 0 then set killBounty = 1 endif set iterator = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator) set pd = LLIterator_next(iterator) if PlayerData_p[pd] != unit_getOwner(killer) then call player_addGold(PlayerData_p[pd], killBounty) call showBountyTextTag(killBounty, UnitEntity_actor[this_1], PlayerData_p[pd]) endif endloop call LLIterator_close(iterator) elseif size > 0 and Creep_bounty[this_1] > 0 then set killBounty_1 = Creep_bounty[this_1] / size + ModuloInteger(Creep_bounty[this_1], size) if killBounty_1 < 1 then set killBounty_1 = 1 endif set restBounty = 0 if size > 1 and Creep_bounty[this_1] - killBounty_1 > 0 then set restBounty = real_round((Creep_bounty[this_1] - killBounty_1) / (size - 1.)) endif call player_addGold(unit_getOwner(killer), killBounty_1) call showBountyTextTag(killBounty_1, UnitEntity_actor[this_1], unit_getOwner(killer)) if restBounty > 0 then set iterator_1 = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator_1) set pd_1 = LLIterator_next(iterator_1) if PlayerData_p[pd_1] != unit_getOwner(killer) then call player_addGold(PlayerData_p[pd_1], restBounty) call showBountyTextTag(restBounty, UnitEntity_actor[this_1], PlayerData_p[pd_1]) endif endloop call LLIterator_close(iterator_1) endif endif endif endfunction function player_addLumber takes player this_1, integer wval returns nothing call player_addState(this_1, PLAYER_STATE_RESOURCE_LUMBER, wval) endfunction function player_getLumber takes player this_1 returns integer return player_getState(this_1, PLAYER_STATE_RESOURCE_LUMBER) endfunction function player_setState takes player this_1, playerstate state, integer wval returns nothing call SetPlayerState(this_1, state, wval) endfunction function player_setLumber takes player this_1, integer wval returns nothing call player_setState(this_1, PLAYER_STATE_RESOURCE_LUMBER, wval) endfunction function printTimedToPlayer takes string msg, real duration, player p returns nothing call DisplayTimedTextToPlayer(p, 0., 0., duration, msg) endfunction function LinkedList_addLumber takes integer this_1, integer amt, boolean redistribute returns nothing local integer iterator = LinkedList_iterator(this_1) local integer pd local integer iterator_1 local integer pd_1 local integer wval local integer remainder loop exitwhen not LLIterator_hasNext(iterator) set pd = LLIterator_next(iterator) call player_addLumber(PlayerData_p[pd], amt) endloop call LLIterator_close(iterator) if redistribute and dispatch_LinkedList_LinkedList_LinkedList_size(this_1) > 1 and getElapsedGameTime() > LumberAndCoinSystem_lastRedistribute + LumberAndCoinSystem_WOOD_REDISTRIBUTE_MIN_WAIT then set iterator_1 = LinkedList_iterator(this_1) loop exitwhen not LLIterator_hasNext(iterator_1) set pd_1 = LLIterator_next(iterator_1) if player_getLumber(PlayerData_p[pd_1]) > LumberAndCoinSystem_WOOD_REDISTRIBUTE_THRESHOLD then set LumberAndCoinSystem_lastRedistribute = getElapsedGameTime() set wval = real_toInt(player_getLumber(PlayerData_p[pd_1]) * 1. / dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers)) set remainder = ModuloInteger(player_getLumber(PlayerData_p[pd_1]), dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers)) call player_setLumber(PlayerData_p[pd_1], remainder) call LinkedList_addLumber(PlayerData_allPlayers, wval, false) call printTimedToPlayer("Due to inactivity, your lumber has been dispersed amongst your teammates!", 10., PlayerData_p[pd_1]) endif endloop call LLIterator_close(iterator_1) endif endfunction function Boss_onDeath takes integer this_1 returns nothing call LinkedList_addLumber(PlayerData_allPlayers, 1, true) if Boss_glow[this_1] != null then call effect_destr(Boss_glow[this_1]) endif call Creep_onDeath(this_1) endfunction function alloc_OnExpireEvent_setTimed_setVel_BossOne_BossOne takes nothing returns integer local integer this_1 if OnExpireEvent_firstFree == 0 then if OnExpireEvent_maxIndex < JASS_MAX_ARRAY_SIZE then set OnExpireEvent_maxIndex = OnExpireEvent_maxIndex + 1 set this_1 = OnExpireEvent_maxIndex set OnExpireEvent_typeId[this_1] = 889 else call error("Out of memory: Could not create OnExpireEvent_setTimed_setVel_BossOne_BossOne.") set this_1 = 0 endif else set OnExpireEvent_firstFree = OnExpireEvent_firstFree - 1 set this_1 = OnExpireEvent_nextFree[OnExpireEvent_firstFree] set OnExpireEvent_typeId[this_1] = 889 endif return this_1 endfunction function OnExpireEvent_init takes integer this_1 returns nothing endfunction function construct_OnExpireEvent takes integer this_1 returns nothing call OnExpireEvent_init(this_1) endfunction function alloc_PhysicsProjectile 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] = 925 else call error("Out of memory: Could not create PhysicsProjectile.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 925 endif return this_1 endfunction function new_PhysicsProjectile takes real pos_x, real pos_y, real pos_z, real radius, player owner_1, real xyAngle_radians, string fxpath, integer onEvent returns integer local integer this_1 = alloc_PhysicsProjectile() call construct_PhysicsProjectile(this_1, pos_x, pos_y, pos_z, radius, owner_1, xyAngle_radians, fxpath, onEvent) return this_1 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 vec2_withRealZ takes real this_x, real this_y, unit u_1 returns real set vec2_withRealZ_return_x = this_x set vec2_withRealZ_return_y = this_y set vec2_withRealZ_return_z = vec2_getTerrainZ(this_x, this_y) + unit_getFlyHeight(u_1) return vec2_withRealZ_return_x endfunction function unit_getPos3Real takes unit this_1 returns real set unit_getPos3Real_return_x = vec2_withRealZ(unit_getPos(this_1), unit_getPos_return_y, this_1) set unit_getPos3Real_return_y = vec2_withRealZ_return_y set unit_getPos3Real_return_z = vec2_withRealZ_return_z return unit_getPos3Real_return_x endfunction function BossOne_onDeath takes integer this_1 returns nothing local integer i local integer pj local integer clVar local integer receiver local integer receiver_1 local real temp_x local real temp_y local real temp_z local player temp local real temp_radians local string temp_1 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 call flashEffect_1873(Units_abominationExplosion, unit_getPos(UnitEntity_actor[this_1]), unit_getPos_return_y) set i = 0 loop exitwhen i > 5 set tuple_temp = vec3_op_plus(unit_getPos3Real(UnitEntity_actor[this_1]), unit_getPos3Real_return_y, unit_getPos3Real_return_z, 0., 0., 64.) set tuple_temp_1 = vec3_op_plus_return_y set tuple_temp_2 = vec3_op_plus_return_z set temp_x = tuple_temp set temp_y = tuple_temp_1 set temp_z = tuple_temp_2 set temp = Entity_owner[this_1] set tuple_temp_3 = real_asAngleRadians(GetRandomReal(0., 1.)) set temp_radians = tuple_temp_3 set temp_1 = Abilities_illidanMissile set clVar = alloc_OnExpireEvent_setTimed_setVel_BossOne_BossOne() call construct_OnExpireEvent(clVar) set receiver = new_PhysicsProjectile(temp_x, temp_y, temp_z, 16., temp, temp_radians, temp_1, clVar) call dispatch_Projectile_Projectile_Projectile_setTimed(receiver, GetRandomReal(1.25, 3.5)) set receiver_1 = receiver call dispatch_Entity_Entity_Entity_setVel(receiver_1, GetRandomReal(-6., 6.), GetRandomReal(-6., 6.), GetRandomReal(4.5, 9.)) set pj = receiver_1 set PhysicsProjectile_PhysicsModule_surfaceFriction[pj] = 0.605 set i = i + 1 endloop call Boss_onDeath(this_1) endfunction function flashEffect_1876 takes string path, real pos_x, real pos_y, real pos_z, real scale, real yaw_radians returns nothing local effect receiver = addEffect_928(path, pos_x, pos_y, pos_z) local effect receiver_1 local effect receiver_2 call effect_setScale(receiver, scale) set receiver_1 = receiver call effect_setYaw(receiver_1, yaw_radians) set receiver_2 = receiver_1 call effect_destr(receiver_2) endfunction function flashEffect_1874 takes string path, real pos_x, real pos_y, real pos_z, real scale returns nothing call flashEffect_1876(path, pos_x, pos_y, pos_z, scale, real_fromDeg(GetRandomReal(0., 359.))) endfunction function flashEffect takes string path, real pos_x, real pos_y, real pos_z returns nothing call flashEffect_1874(path, pos_x, pos_y, pos_z, 1.0) endfunction function BossThree_onDeath takes integer this_1 returns nothing call Boss_onDeath(this_1) call flashEffect(Objects_demonLargeDeathExplode, dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z) endfunction function DestroyerSummoner_onDeath takes integer this_1 returns nothing call Creep_onDeath(this_1) set DestroyerSummoner_casting[this_1] = false endfunction function alloc_CallbackSingle_doAfter_EndBoss 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] = 674 else call error("Out of memory: Could not create CallbackSingle_doAfter_EndBoss.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 674 endif return this_1 endfunction function printTimed takes string msg, real duration returns nothing call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., duration, msg) 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 set Iterator_typeId[this_1] = 853 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] set Iterator_typeId[this_1] = 853 endif return this_1 endfunction function Iterator_init takes integer this_1 returns nothing set Iterator_current[this_1] = Entity_DupletListModule_firstActive endfunction function construct_Iterator takes integer this_1 returns nothing call Iterator_init(this_1) endfunction function new_Iterator takes nothing returns integer local integer this_1 = alloc_Iterator() call construct_Iterator(this_1) return this_1 endfunction function Entity_DupletListModule_iterator takes nothing returns integer return new_Iterator() 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[Iterator_firstFree] = obj set Iterator_firstFree = Iterator_firstFree + 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 call dispatch_Iterator_destroyIterator(this_1) 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] = Entity_DupletListModule_next[Iterator_current[this_1]] return res endfunction function print takes string msg returns nothing call DisplayTimedTextToPlayer(Player_localPlayer, 0., 0., Printing_DEBUG_MSG_DURATION, msg) endfunction function winGame takes nothing returns nothing local integer ea local integer ue local integer iterator local integer e local integer ue_1 local integer instanceOfTemp local integer instanceOfTemp_1 call print("|cff666666Victory!") set ea = Entity_DupletListModule_firstInactive loop exitwhen not (ea != 0) set instanceOfTemp = Serializable_typeId[ea] if instanceOfTemp >= 933 and instanceOfTemp <= 965 then set ue = ea call unit_setTimeScale(UnitEntity_actor[ue], 0.) call unit_pause(UnitEntity_actor[ue]) endif set ea = Entity_DupletListModule_next[ea] endloop set iterator = Entity_DupletListModule_iterator() loop exitwhen not Iterator_hasNext(iterator) set e = Iterator_next(iterator) set instanceOfTemp_1 = Serializable_typeId[e] if instanceOfTemp_1 >= 933 and instanceOfTemp_1 <= 965 then set ue_1 = e call unit_setTimeScale(UnitEntity_actor[ue_1], 0.) call unit_pause(UnitEntity_actor[ue_1]) endif endloop call Iterator_close(iterator) set EndGame_gameOver = true endfunction function onVictory takes nothing returns nothing local integer clVar call printTimed("|cffFFCC00>> |cffFFA53ACongratulations, you won!|r\n |cff7B7B7BThe game will end in 20 seconds.", 25.) call winGame() set clVar = alloc_CallbackSingle_doAfter_EndBoss() call construct_CallbackSingle(clVar) call doAfter(20., clVar) endfunction function EndBossFight_onDestroy takes integer this_1 returns nothing call dispatch_EndBossFight_EndBoss_EndBossFight_endDestroyerSummoning(this_1) call dispatch_LinkedList_destroyLinkedList(EndBossFight_bosses[this_1]) call onVictory() endfunction function dealloc_EndBossFight takes integer obj returns nothing if EndBossFight_typeId[obj] == 0 then call error("Double free: object of type EndBossFight") else set EndBossFight_nextFree[EndBossFight_firstFree] = obj set EndBossFight_firstFree = EndBossFight_firstFree + 1 set EndBossFight_typeId[obj] = 0 endif endfunction function destroyEndBossFight takes integer this_1 returns nothing call EndBossFight_onDestroy(this_1) call dealloc_EndBossFight(this_1) endfunction function dispatch_EndBossFight_destroyEndBossFight takes integer this_1 returns nothing if EndBossFight_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBossFight.EndBossFight") else call error("Called EndBossFight.EndBossFight on invalid object.") endif endif call destroyEndBossFight(this_1) endfunction function EndBossFight_onBossDeath takes integer this_1, integer b returns nothing call dispatch_LinkedList_LinkedList_LinkedList_remove(EndBossFight_bosses[this_1], b) if dispatch_LinkedList_LinkedList_LinkedList_size(EndBossFight_bosses[this_1]) == 0 then call dispatch_EndBossFight_destroyEndBossFight(this_1) endif endfunction function dispatch_EndBossFight_EndBoss_EndBossFight_onBossDeath takes integer this_1, integer b returns nothing if EndBossFight_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBossFight.onBossDeath") else call error("Called EndBossFight.onBossDeath on invalid object.") endif endif call EndBossFight_onBossDeath(this_1, b) endfunction function EndBoss_onDeath takes integer this_1 returns nothing call Boss_onDeath(this_1) call dispatch_EndBossFight_EndBoss_EndBossFight_onBossDeath(EndBoss_bossFight[this_1], this_1) endfunction function alloc_CallbackSingle_doAfter_SpecialTwo_SpecialTwo 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] = 695 else call error("Out of memory: Could not create CallbackSingle_doAfter_SpecialTwo_SpecialTwo.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 695 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_SpecialTwo_SpecialTwo_976 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] = 696 else call error("Out of memory: Could not create CallbackSingle_doAfter_SpecialTwo_SpecialTwo.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 696 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_SpecialTwo_SpecialTwo_977 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] = 697 else call error("Out of memory: Could not create CallbackSingle_doAfter_SpecialTwo_SpecialTwo.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 697 endif return this_1 endfunction function unit_getTypeId takes unit this_1 returns integer return GetUnitTypeId(this_1) endfunction function SpecialTwo_onDeath takes integer this_1 returns nothing local real tuple_temp = dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1) local real tuple_temp_1 = dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y local real tuple_temp_2 = dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z local real ppos_x_1 = tuple_temp local real ppos_y_1 = tuple_temp_1 local real ppos_z_1 = tuple_temp_2 local integer clVar local integer clVar_1 local integer clVar_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 local real tuple_temp_8 local real tuple_temp_9 local real tuple_temp_10 local real tuple_temp_11 if unit_getTypeId(UnitEntity_actor[this_1]) == SpecialTwo_SOUL1_ID then set clVar = alloc_CallbackSingle_doAfter_SpecialTwo_SpecialTwo() call construct_CallbackSingle(clVar) set tuple_temp_3 = ppos_x_1 set tuple_temp_4 = ppos_y_1 set tuple_temp_5 = ppos_z_1 set ppos_x_1267[clVar] = tuple_temp_3 set ppos_y_1271[clVar] = tuple_temp_4 set ppos_z[clVar] = tuple_temp_5 call doAfter(0.75, clVar) elseif unit_getTypeId(UnitEntity_actor[this_1]) == SpecialTwo_SOUL2_ID then set clVar_1 = alloc_CallbackSingle_doAfter_SpecialTwo_SpecialTwo_976() call construct_CallbackSingle(clVar_1) set tuple_temp_6 = ppos_x_1 set tuple_temp_7 = ppos_y_1 set tuple_temp_8 = ppos_z_1 set ppos_x_1268[clVar_1] = tuple_temp_6 set ppos_y_1272[clVar_1] = tuple_temp_7 set ppos_z_1275[clVar_1] = tuple_temp_8 call doAfter(0.75, clVar_1) elseif unit_getTypeId(UnitEntity_actor[this_1]) == SpecialTwo_SOUL3_ID then set clVar_2 = alloc_CallbackSingle_doAfter_SpecialTwo_SpecialTwo_977() call construct_CallbackSingle(clVar_2) set tuple_temp_9 = ppos_x_1 set tuple_temp_10 = ppos_y_1 set tuple_temp_11 = ppos_z_1 set ppos_x_1269[clVar_2] = tuple_temp_9 set ppos_y_1273[clVar_2] = tuple_temp_10 set ppos_z_1276[clVar_2] = tuple_temp_11 call doAfter(0.75, clVar_2) endif endfunction function Special_onDeath takes integer this_1 returns nothing if Special_glow[this_1] != null then call effect_destr(Special_glow[this_1]) endif call Creep_onDeath(this_1) endfunction function dispatch_Creep_Creep_Creep_onDeath takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Creep.onDeath") else call error("Called Creep.onDeath on invalid object.") endif endif if Serializable_typeId[this_1] <= 942 then if Serializable_typeId[this_1] <= 940 then if Serializable_typeId[this_1] <= 939 then if Serializable_typeId[this_1] <= 936 then call Creep_onDeath(this_1) else call Boss_onDeath(this_1) endif else call BossOne_onDeath(this_1) endif elseif Serializable_typeId[this_1] <= 941 then call BossThree_onDeath(this_1) else call Boss_onDeath(this_1) endif elseif Serializable_typeId[this_1] <= 950 then if Serializable_typeId[this_1] <= 944 then if Serializable_typeId[this_1] <= 943 then call EndBoss_onDeath(this_1) else call DestroyerSummoner_onDeath(this_1) endif else call Special_onDeath(this_1) endif elseif Serializable_typeId[this_1] <= 951 then call SpecialTwo_onDeath(this_1) else call Creep_onDeath(this_1) endif endfunction function onEvent_add_Creep_Creep takes integer this_1 returns nothing call dispatch_Creep_Creep_Creep_onDeath(this_1485[this_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 DamageEvent_addAmount takes real amount returns nothing call dispatch_DamageInstance_DamageEvent_DamageInstance_setAmount(DamageInstance_current, DamageInstance_amount[DamageInstance_current] + amount) endfunction function createFText_1362 takes real pos_x, real pos_y, real pos_z, real vel_x, real vel_y, string text, real size, real lifespan, integer col_red, integer col_green, integer col_blue, integer col_alpha, player p returns integer return createFText_1363(pos_x, pos_y, pos_z, text, size, lifespan, vel_x, vel_y, col_red, col_green, col_blue, col_alpha, p) endfunction function unit_getState takes unit this_1, unitstate state returns real return GetUnitState(this_1, state) endfunction function unit_getMaxHP takes unit this_1 returns real return unit_getState(this_1, UNIT_STATE_MAX_LIFE) endfunction function unit_getPos3Zero takes unit this_1 returns real set unit_getPos3Zero_return_x = unit_getX(this_1) set unit_getPos3Zero_return_y = unit_getY(this_1) set unit_getPos3Zero_return_z = 0. return unit_getPos3Zero_return_x endfunction function PudgePowerBuff_attackModifier takes integer this_1 returns nothing local unit target_1 = GetTriggerUnit() if unit_getOwner(target_1) != Player_players[8] then call flashEffect_1873(Objects_hCancelDeath, unit_getPos(target_1), unit_getPos_return_y) call flashEffect_1873(Objects_demonSmallDeathExplode, unit_getPos(target_1), unit_getPos_return_y) if not (Serializable_typeId[unit_getEntity(target_1)] == 935) then call DamageEvent_addAmount(unit_getMaxHP(target_1) * 0.30) call createFText_1362(unit_getPos3Zero(target_1), unit_getPos3Zero_return_y, unit_getPos3Zero_return_z, 0., .015, "-30% !!!", 11.5, 2., 255, 0, 0, 255, Player_localPlayer) endif endif 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 if Buff_typeId[this_1] <= 645 then if Buff_typeId[this_1] <= 644 then call Buff_attackModifier(this_1) else call PudgePowerBuff_attackModifier(this_1) endif else call Buff_attackModifier(this_1) endif endfunction function Buff_defenseModifier takes integer this_1 returns nothing endfunction function vec3_angleTo2d_2516 takes real this_x, real this_y, real this_z, real v_x, real v_y, real v_z returns real set vec3_angleTo2d_return_radians_1575 = real_asAngleRadians(Atan2(v_y - this_y, v_x - this_x)) return vec3_angleTo2d_return_radians_1575 endfunction function vec3_distanceTo2d takes real this_x, real this_y, real this_z, real v_x, real v_y, real v_z returns real return SquareRoot(real_squared(v_x - this_x) + real_squared(v_y - this_y)) endfunction function Entity_setTarget takes integer this_1, real tpos_x, real tpos_y, real tpos_z, real speed returns nothing local real t = vec3_distanceTo2d(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], tpos_x, tpos_y, tpos_z) / speed local real tuple_temp = vec3_angleTo2d_2516(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], tpos_x, tpos_y, tpos_z) local real tangle_radians = tuple_temp local real e = 0. local real startZVelocity if Frentity_config_DYNAMIC_Z then set e = vec3_getHeightMap(tpos_x, tpos_y, tpos_z) endif if t < 1. then set t = 1. / speed endif set startZVelocity = ( - (Entity_gravity[this_1] * t)) / 2. - Entity_pos_z[this_1] / t + e / t call dispatch_Entity_Entity_Entity_setVel(this_1, vec2_withZ(angle_toVec(tangle_radians, speed), angle_toVec_return_y, startZVelocity), vec2_withZ_return_y, vec2_withZ_return_z) endfunction function dispatch_Entity_Entity_Entity_setTarget takes integer this_1, real tpos_x, real tpos_y, real tpos_z, real speed returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.setTarget") else call error("Called Entity.setTarget on invalid object.") endif endif call Entity_setTarget(this_1, tpos_x, tpos_y, tpos_z, speed) endfunction function player_isEnemyOf takes player this_1, player p returns boolean return IsPlayerEnemy(this_1, p) endfunction function vec2_distanceToSq takes real this_x, real this_y, real v_x, real v_y returns real return real_squared(v_x - this_x) + real_squared(v_y - this_y) endfunction function JumpyBuff_defenseModifier takes integer this_1 returns nothing local unit attacker = GetEventDamageSource() if unit_getFlyHeight(Buff_target[this_1]) <= 1. and player_isEnemyOf(unit_getOwner(attacker), unit_getOwner(Buff_target[this_1])) and vec2_distanceToSq(unit_getPos(attacker), unit_getPos_return_y, unit_getPos(Buff_target[this_1]), unit_getPos_return_y) < BossFour_JUMP_DIST and vec2_distanceToSq(unit_getPos(attacker), unit_getPos_return_y, unit_getPos(Buff_target[this_1]), unit_getPos_return_y) > 42. and JumpyBuff_lastCast[this_1] + 4. < getElapsedGameTime() then call dispatch_Entity_Entity_Entity_setTarget(unit_getEntity(Buff_target[this_1]), unit_getPos3Real(GetEventDamageSource()), unit_getPos3Real_return_y, unit_getPos3Real_return_z, 8.) call effect_destr(addEffect(Abilities_roarCaster, unit_getPos(Buff_target[this_1]), unit_getPos_return_y)) set JumpyBuff_lastCast[this_1] = getElapsedGameTime() endif 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(10, null, this_1) else call DamageEvent_setAmount(0.) set ShieldBuff_blockAmount[this_1] = ShieldBuff_blockAmount[this_1] - dmg endif endfunction function ShieldKitBuff_defenseModifier takes integer this_1 returns nothing call ShieldBuff_defenseModifier(this_1) if ShieldBuff_blockAmount[this_1] > 0. then call new_TextTagEntity(ShieldKitBuff_pos_x[this_1], ShieldKitBuff_pos_y[this_1], ShieldKitBuff_pos_z[this_1], GetRandomReal(-2., 2.), 0., GetRandomReal(8., 12.), int_toString(real_toInt(ShieldBuff_blockAmount[this_1])), 10., 1., 255, 204, 12, 255) endif endfunction function angle_op_plus takes real this_radians, real other_radians returns real set angle_op_plus_return_radians = this_radians + other_radians return angle_op_plus_return_radians endfunction function alloc_Tentacle 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] = 952 else call error("Out of memory: Could not create Tentacle.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 952 endif return this_1 endfunction function Tentacle_init takes integer this_1 returns nothing endfunction function real_fromRad takes real this_1 returns real set real_fromRad_return_radians = this_1 return real_fromRad_return_radians endfunction function unit_setPropWindow takes unit this_1, real value_radians returns nothing call SetUnitPropWindow(this_1, angle_radians(value_radians)) endfunction function construct_Tentacle takes integer this_1, real pos_x, real pos_y, real pos_z returns nothing call cyc_Projectile_terminate(34, this_1, pos_x, pos_y, pos_z, null, null, BossTwo_TENTACLE_ID, 6, Wave_middle_x, Wave_middle_y, real_fromRad(GetRandomReal(0., Maths_PI2)), 0.) call Tentacle_init(this_1) call unit_setPropWindow(UnitEntity_actor[this_1], real_fromDeg(0.)) endfunction function new_Tentacle takes real pos_x, real pos_y, real pos_z returns integer local integer this_1 = alloc_Tentacle() call construct_Tentacle(this_1, pos_x, pos_y, pos_z) return this_1 endfunction function unit_getFacingAngle takes unit this_1 returns real set unit_getFacingAngle_return_radians = real_asAngleDegrees(GetUnitFacing(this_1)) return unit_getFacingAngle_return_radians endfunction function SludgeBuff_defenseModifier takes integer this_1 returns nothing local integer tuple_temp local integer tuple_temp_1 local integer tuple_temp_2 set SludgeBuff_dmgHold[this_1] = SludgeBuff_dmgHold[this_1] + DamageEvent_getAmount() if SludgeBuff_dmgHold[this_1] > 500. then set SludgeBuff_dmgHold[this_1] = SludgeBuff_dmgHold[this_1] - 500. set tuple_temp = GetRandomInt(25, 255) set tuple_temp_1 = GetRandomInt(25, 255) set tuple_temp_2 = GetRandomInt(25, 255) set SludgeBuff_nextCol_red[this_1] = tuple_temp set SludgeBuff_nextCol_green[this_1] = tuple_temp_1 set SludgeBuff_nextCol_blue[this_1] = tuple_temp_2 call unit_issueImmediateOrder(UnitEntity_actor[new_Tentacle(vec2_withHeightMap(vec2_polarOffset(unit_getPos(Buff_target[this_1]), unit_getPos_return_y, angle_op_plus(unit_getFacingAngle(Buff_target[this_1]), GetRandomReal( - 0.75, 0.75)), GetRandomReal(64., 188.)), vec2_polarOffset_return_y), vec2_withHeightMap_return_y, vec2_withHeightMap_return_z)], "stop") endif 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_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_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_2258 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_2258(this_1, removeHash) + "|r" endfunction function player_getNameColored_2260 takes player this_1 returns string return player_getNameColored(this_1, false) endfunction function unit_getHP takes unit this_1 returns real return unit_getState(this_1, UNIT_STATE_LIFE) endfunction function unit_hide takes unit this_1 returns nothing call ShowUnit(this_1, false) endfunction function vec3_op_minus takes real this_x, real this_y, real this_z, real v_x, real v_y, real v_z returns real set vec3_op_minus_return_x = this_x - v_x set vec3_op_minus_return_y = this_y - v_y set vec3_op_minus_return_z = this_z - v_z return vec3_op_minus_return_x endfunction function WarningBuff_defenseModifier takes integer this_1 returns nothing local real tuple_temp = unit_getPos(Buff_target[this_1]) local real tuple_temp_1 = unit_getPos_return_y local real pos_x = tuple_temp local real pos_y = tuple_temp_1 local unit u_1 local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 local unit receiver_6 local player owner_1 if WarningBuff_startedTime[this_1] + 15. > GameTimer_currentTime then call new_TextTagEntity(vec3_op_minus(vec2_withHeightMap(unit_getPos(Buff_target[this_1]), unit_getPos_return_y), vec2_withHeightMap_return_y, vec2_withHeightMap_return_z, -75., 0., 0.), vec3_op_minus_return_y, vec3_op_minus_return_z, GetRandomReal( - 2.5, 2.5), 0., GetRandomReal(8., 10.), "Spawn-Protection", 10., 1., 155, 185, 55, 255) call effect_destr(addEffect(Abilities_spellShieldCaster, unit_getPos(Buff_target[this_1]), unit_getPos_return_y)) call DamageEvent_setAmount(0.) endif if WarningBuff_lastWarning[this_1] + 1. < GameTimer_currentTime and unit_getHP(Buff_target[this_1]) - DamageEvent_getAmount() < unit_getMaxHP(Buff_target[this_1]) / 1.5 then call new_TextTagEntity(vec3_op_minus(vec2_withHeightMap(unit_getPos(Buff_target[this_1]), unit_getPos_return_y), vec2_withHeightMap_return_y, vec2_withHeightMap_return_z, 20., 0., 0.), vec3_op_minus_return_y, vec3_op_minus_return_z, GetRandomReal(-1., 1.), GetRandomReal(-1., 1.), GetRandomReal(7., 12.), "ATTENTION!!", 15., 1., 255, 25, 25, 255) set WarningBuff_lastWarning[this_1] = GameTimer_currentTime endif if WarningBuff_lastSelect[this_1] + 5. < GameTimer_currentTime and unit_getHP(Buff_target[this_1]) - DamageEvent_getAmount() < unit_getMaxHP(Buff_target[this_1]) / 2. then call PanCameraToTimedForPlayer(unit_getOwner(Buff_target[this_1]), pos_x, pos_y, 0.25) call player_selectSingle(unit_getOwner(Buff_target[this_1]), Buff_target[this_1]) set WarningBuff_lastSelect[this_1] = GameTimer_currentTime endif if DamageEvent_getAmount() >= unit_getHP(Buff_target[this_1]) - 1.0 then call DamageEvent_setAmount(0.) if not WarningBuff_dead[this_1] then set WarningBuff_dead[this_1] = true set u_1 = Buff_target[this_1] set receiver = u_1 call unit_setHP(receiver, 9999.) set receiver_1 = receiver call unit_setOwner(receiver_1, Basics_DUMMY_PLAYER, false) set receiver_2 = receiver_1 call unit_addAbility(receiver_2, 1098282348) set receiver_3 = receiver_2 call unit_pause(receiver_3) set receiver_4 = receiver_3 call unit_hide(receiver_4) set receiver_5 = receiver_4 call unit_setTimeScale(receiver_5, 0.0001) set receiver_6 = createUnit(WarningBuff_originalOwner[this_1], unit_getTypeId(Buff_target[this_1]), unit_getPos(u_1), unit_getPos_return_y, unit_getFacingAngle(u_1)) call unit_setXY(receiver_6, unit_getPos(u_1), unit_getPos_return_y) call unit_kill(receiver_6) set owner_1 = unit_getOwner(Buff_target[this_1]) set PlayerData_alive[PlayerData_pDatas[player_getId(owner_1)]] = false set PlayerData_deaths[PlayerData_pDatas[player_getId(owner_1)]] = PlayerData_deaths[PlayerData_pDatas[player_getId(owner_1)]] + 1 call printTimed("|cffFFCC00>>|r " + player_getNameColored_2260(owner_1) + " |cffCE2119has been killed!", 20.) endif 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] <= 646 then if Buff_typeId[this_1] <= 645 then call Buff_defenseModifier(this_1) else call ShieldBuff_defenseModifier(this_1) endif elseif Buff_typeId[this_1] <= 647 then call JumpyBuff_defenseModifier(this_1) else call ShieldKitBuff_defenseModifier(this_1) endif elseif Buff_typeId[this_1] <= 650 then if Buff_typeId[this_1] <= 649 then call SludgeBuff_defenseModifier(this_1) else call Buff_defenseModifier(this_1) endif elseif Buff_typeId[this_1] <= 651 then call WarningBuff_defenseModifier(this_1) else call Buff_defenseModifier(this_1) endif endfunction function getSquare takes nothing returns string return Squares_squares[GetRandomInt(0, 20)] endfunction function player_isAllyOf takes player this_1, player p returns boolean return IsPlayerAlly(this_1, p) 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_config_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_config_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 getSpeed takes integer level returns real return 6.45 + level * 1.55 endfunction function alloc_FlameMissile 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] = 923 else call error("Out of memory: Could not create FlameMissile.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 923 endif return this_1 endfunction function FlameMissile_init takes integer this_1 returns nothing endfunction function Projectile_setAcc takes integer this_1, real factor returns nothing set Projectile_acc[this_1] = factor endfunction function dispatch_Projectile_Projectile_Projectile_setAcc takes integer this_1, real factor returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setAcc") else call error("Called Projectile.setAcc on invalid object.") endif endif call Projectile_setAcc(this_1, factor) endfunction function Projectile_setRanged_650 takes integer this_1, real maxDistance, boolean use3DDistance returns nothing set Projectile_maxDist[this_1] = maxDistance * maxDistance set Projectile_use3DDistance[this_1] = use3DDistance set Projectile_ranged[this_1] = true endfunction function dispatch_Projectile_Projectile_Projectile_setRanged_1792 takes integer this_1, real maxDistance, boolean use3DDistance returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setRanged") else call error("Called Projectile.setRanged on invalid object.") endif endif call Projectile_setRanged_650(this_1, maxDistance, use3DDistance) endfunction function Projectile_setRanged takes integer this_1, real maxDistance returns nothing call dispatch_Projectile_Projectile_Projectile_setRanged_1792(this_1, maxDistance, Projectile_use3DDistance[this_1]) endfunction function dispatch_Projectile_Projectile_Projectile_setRanged takes integer this_1, real maxDistance returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setRanged") else call error("Called Projectile.setRanged on invalid object.") endif endif call Projectile_setRanged(this_1, maxDistance) endfunction function construct_FlameMissile takes integer this_1, real pos_x, real pos_y, real pos_z, real target_x_1, real target_y_1, real speed, player owner_1, integer level returns nothing local integer temp = this_1 local real tuple_temp = pos_x local real tuple_temp_1 = pos_y local real tuple_temp_2 = pos_z local real temp_x = tuple_temp local real temp_y = tuple_temp_1 local real temp_z = tuple_temp_2 local real temp_1 = FlamethrowerTower_AOE_RADIUS local player temp_2 = owner_1 local real tuple_temp_3 = vec3_angleTo2d(pos_x, pos_y, pos_z, target_x_1, target_y_1) local real temp_tuple_radians = tuple_temp_3 local effect receiver local effect receiver_1 local effect receiver_2 call construct_Projectile(temp, temp_x, temp_y, temp_z, temp_1, temp_2, real_asAngleRadians(temp_tuple_radians + GetRandomReal( - 0.025, 0.025)), FlamethrowerTower_FX_PATH) call FlameMissile_init(this_1) call dispatch_Projectile_Projectile_Projectile_setSpeed(this_1, speed + GetRandomReal( - 0.5, 0.5)) call dispatch_Projectile_Projectile_Projectile_setRanged(this_1, 712. + GetRandomReal(-5., 5.)) call dispatch_Projectile_Projectile_Projectile_setAcc(this_1, 1.0195 + GetRandomReal( - 0.0025, 0.0075)) set receiver = Fx2_eff[Fx2Entity_fx[this_1]] call effect_setScale(receiver, 0.2) set receiver_1 = receiver call effect_setColor(receiver_1, GetRandomInt(0, 255), GetRandomInt(0, 255), GetRandomInt(0, 255), 255) set receiver_2 = receiver_1 call effect_setScale(receiver_2, 0.75) set FlameMissile_level[this_1] = level endfunction function new_FlameMissile takes real pos_x, real pos_y, real pos_z, real target_x_1, real target_y_1, real speed, player owner_1, integer level returns integer local integer this_1 = alloc_FlameMissile() call construct_FlameMissile(this_1, pos_x, pos_y, pos_z, target_x_1, target_y_1, speed, owner_1, level) return this_1 endfunction function FlamethrowerTower_onAttack takes integer this_1, integer ud returns nothing call new_FlameMissile(vec2_withHeightMap_2511(vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y, 58.), vec2_withHeightMap_return_y_1562, vec2_withHeightMap_return_z_1564, vec3_toVec2(dispatch_UnitEntity_Entity_UnitEntity_getPos(ud), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z), vec3_toVec2_return_y, getSpeed(FlamethrowerTower_level[this_1]), Entity_owner[this_1], FlamethrowerTower_level[this_1]) endfunction function HealbackTower_getMultiplier takes integer level returns real return HealbackTower_HEALBACK_MULTIPLIERS[level - 1] endfunction function HealbackTower_getMissileCount takes integer level returns integer return HealbackTower_HEALBACK_MISSILE_COUNTS[level - 1] endfunction function alloc_ForGroupCallback_forUnitsInRange_HealbackTower_HealbackTower 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] = 799 else call error("Out of memory: Could not create ForGroupCallback_forUnitsInRange_HealbackTower_HealbackTower.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 799 endif return this_1 endfunction function alloc_LLItrClosure_forEach_HealbackTower_HealbackTower takes nothing returns integer local integer this_1 if LLItrClosure_firstFree == 0 then if LLItrClosure_maxIndex < JASS_MAX_ARRAY_SIZE then set LLItrClosure_maxIndex = LLItrClosure_maxIndex + 1 set this_1 = LLItrClosure_maxIndex set LLItrClosure_typeId[this_1] = 863 else call error("Out of memory: Could not create LLItrClosure_forEach_HealbackTower_HealbackTower.") set this_1 = 0 endif else set LLItrClosure_firstFree = LLItrClosure_firstFree - 1 set this_1 = LLItrClosure_nextFree[LLItrClosure_firstFree] set LLItrClosure_typeId[this_1] = 863 endif return this_1 endfunction function LinkedList_clear takes integer this_1 returns nothing local integer 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 set LLEntry_next[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] set LLEntry_prev[LinkedList_dummy[this_1]] = LinkedList_dummy[this_1] set LinkedList_size[this_1] = 0 endfunction function dispatch_LinkedList_LinkedList_LinkedList_clear 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.clear") else call error("Called LinkedList.clear on invalid object.") endif endif call LinkedList_clear(this_1) endfunction function run_forEach_GameInit takes integer this_1, integer pd returns player local player receiver = PlayerData_p[pd] local player receiver_1 call player_addGold(receiver, 100000) set receiver_1 = receiver call player_addLumber(receiver_1, 10000) return receiver_1 endfunction function EntityWithDist_onDestroy takes integer this_1 returns nothing endfunction function dealloc_EntityWithDist takes integer obj returns nothing if EntityWithDist_typeId[obj] == 0 then call error("Double free: object of type EntityWithDist") else set EntityWithDist_nextFree[EntityWithDist_firstFree] = obj set EntityWithDist_firstFree = EntityWithDist_firstFree + 1 set EntityWithDist_typeId[obj] = 0 endif endfunction function destroyEntityWithDist takes integer this_1 returns nothing call EntityWithDist_onDestroy(this_1) call dealloc_EntityWithDist(this_1) endfunction function dispatch_EntityWithDist_destroyEntityWithDist takes integer this_1 returns nothing if EntityWithDist_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EntityWithDist.EntityWithDist") else call error("Called EntityWithDist.EntityWithDist on invalid object.") endif endif call destroyEntityWithDist(this_1) endfunction function run_forEach_HealbackTower_HealbackTower takes integer this_1, integer e returns nothing if dispatch_LinkedList_LinkedList_LinkedList_size(targets[this_1]) < count[this_1] then call dispatch_LinkedList_LinkedList_LinkedList_add_1(targets[this_1], EntityWithDist_ue[e]) endif call dispatch_EntityWithDist_destroyEntityWithDist(e) endfunction function string_charAt takes string this_1, integer index returns string return SubString(this_1, index, index + 1) 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 run_map_ObjectIds takes integer this_1, integer t returns string return int_toRawCode(t) 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 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 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 run_wrapper takes integer this_1, integer t returns integer return stringToIndex(run_map_ObjectIds(this_1, t)) endfunction function dispatch_MapClosure_LinkedList_MapClosure_run takes integer this_1, integer t returns integer local integer LinkedList_MapClosure_run_result if MapClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling MapClosure.run") else call error("Called MapClosure.run on invalid object.") endif endif set LinkedList_MapClosure_run_result = run_wrapper(this_1, t) return LinkedList_MapClosure_run_result endfunction function run_forEach_LinkedList_LinkedList takes integer this_1, integer t returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(output_1260[this_1], dispatch_MapClosure_LinkedList_MapClosure_run(itr_1242[this_1], t)) endfunction function dispatch_LLItrClosure_LinkedList_LLItrClosure_run takes integer this_1, integer t returns nothing if LLItrClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLItrClosure.run") else call error("Called LLItrClosure.run on invalid object.") endif endif if LLItrClosure_typeId[this_1] <= 863 then if LLItrClosure_typeId[this_1] <= 862 then call run_forEach_GameInit(this_1, t) else call run_forEach_HealbackTower_HealbackTower(this_1, t) endif else call run_forEach_LinkedList_LinkedList(this_1, t) endif endfunction function dealloc_LLItrClosure takes integer obj returns nothing if LLItrClosure_typeId[obj] == 0 then call error("Double free: object of type LLItrClosure") else set LLItrClosure_nextFree[LLItrClosure_firstFree] = obj set LLItrClosure_firstFree = LLItrClosure_firstFree + 1 set LLItrClosure_typeId[obj] = 0 endif endfunction function destroyLLItrClosure takes integer this_1 returns nothing call dealloc_LLItrClosure(this_1) endfunction function dispatch_LLItrClosure_destroyLLItrClosure takes integer this_1 returns nothing if LLItrClosure_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LLItrClosure.LLItrClosure") else call error("Called LLItrClosure.LLItrClosure on invalid object.") endif endif call destroyLLItrClosure(this_1) endfunction function LinkedList_forEach takes integer this_1, integer itr_1 returns integer local integer r = LLEntry_next[LinkedList_dummy[this_1]] loop exitwhen not (r != LinkedList_dummy[this_1]) call dispatch_LLItrClosure_LinkedList_LLItrClosure_run(itr_1, LLEntry_elem[r]) set r = LLEntry_next[r] endloop call dispatch_LLItrClosure_destroyLLItrClosure(itr_1) return this_1 endfunction function dispatch_LinkedList_LinkedList_LinkedList_forEach takes integer this_1, integer itr_1 returns integer local integer LinkedList_LinkedList_forEach_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.forEach") else call error("Called LinkedList.forEach on invalid object.") endif endif set LinkedList_LinkedList_forEach_result = LinkedList_forEach(this_1, itr_1) return LinkedList_LinkedList_forEach_result endfunction function compare_HealbackTower_HealbackTower takes integer this_1, integer e1, integer e2 returns integer return EntityWithDist_distSq[e1] - EntityWithDist_distSq[e2] endfunction function compare_LinkedList_1245 takes integer this_1, integer i1, integer i2 returns integer return i1 - i2 endfunction function compare_LinkedList takes integer this_1, real r1, real r2 returns integer return real_toInt(r1 - r2) endfunction function realFromIndex takes integer index returns real return index / TypeCasting_R2I_PRECISION endfunction function compare_wrapper takes integer this_1, integer o1, integer o2 returns integer return compare_LinkedList(this_1, realFromIndex(o1), realFromIndex(o2)) endfunction function min_2 takes integer numbers_0, integer numbers_1 returns integer local integer minNumber = Integer_INT_MAX local integer cond_result if numbers_0 < minNumber then set cond_result = numbers_0 else set cond_result = minNumber endif set minNumber = cond_result if numbers_1 < minNumber then set cond_result = numbers_1 else set cond_result = minNumber endif set minNumber = cond_result return minNumber endfunction function string_toCharsetInt takes string this_1 returns integer local integer i local integer temp if string_length(this_1) > 1 then return -1 else set i = 0 set temp = String_charsetlength - 1 loop exitwhen i > temp if string_substring(String_charset, i, i + 1) == this_1 then return i endif set i = i + 1 endloop return -1 endif endfunction function stringCompare takes string s1, string s2 returns integer local integer s1Len = string_length(s1) local integer s2Len = string_length(s2) local integer i = 0 local integer temp = min_2(s1Len, s2Len) local integer char1Int local integer char2Int loop exitwhen i > temp set char1Int = string_toCharsetInt(string_charAt(s1, i)) set char2Int = string_toCharsetInt(string_charAt(s2, i)) if char1Int < char2Int then return -1 elseif char1Int > char2Int then return 1 endif set i = i + 1 endloop if s1Len < s2Len then return -1 elseif s1Len > s2Len then return 1 endif return 0 endfunction function compare_LinkedList_1246 takes integer this_1, string s1, string s2 returns integer return stringCompare(s1, s2) endfunction function stringFromIndex takes integer index returns string local string str = dispatch_Table_Table_Table_loadString(TypeCasting_typecastdata, index) return str endfunction function compare_wrapper_1248 takes integer this_1, integer o1, integer o2 returns integer return compare_LinkedList_1246(this_1, stringFromIndex(o1), stringFromIndex(o2)) endfunction function dispatch_Comparator_LinkedList_Comparator_compare takes integer this_1, integer o1, integer o2 returns integer local integer LinkedList_Comparator_compare_result if Comparator_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Comparator.compare") else call error("Called Comparator.compare on invalid object.") endif endif if Comparator_typeId[this_1] <= 718 then if Comparator_typeId[this_1] <= 717 then set LinkedList_Comparator_compare_result = compare_HealbackTower_HealbackTower(this_1, o1, o2) else set LinkedList_Comparator_compare_result = compare_wrapper(this_1, o1, o2) endif elseif Comparator_typeId[this_1] <= 719 then set LinkedList_Comparator_compare_result = compare_LinkedList_1245(this_1, o1, o2) else set LinkedList_Comparator_compare_result = compare_wrapper_1248(this_1, o1, o2) endif return LinkedList_Comparator_compare_result endfunction function LinkedList_sortMerge takes integer this_1, integer comparator, integer pa, integer pb returns integer local integer a = pa local integer b = pb local integer head local integer tail if a == LinkedList_dummy[this_1] then return b endif if b == LinkedList_dummy[this_1] then return a endif if dispatch_Comparator_LinkedList_Comparator_compare(comparator, LLEntry_elem[a], LLEntry_elem[b]) < 0 then set head = a set tail = a set a = LLEntry_next[a] else set head = b set tail = b set b = LLEntry_next[b] endif loop exitwhen not true if a == LinkedList_dummy[this_1] then set LLEntry_next[tail] = b set LLEntry_prev[b] = tail exitwhen true endif if b == LinkedList_dummy[this_1] then set LLEntry_next[tail] = a set LLEntry_prev[a] = tail exitwhen true endif if dispatch_Comparator_LinkedList_Comparator_compare(comparator, LLEntry_elem[a], LLEntry_elem[b]) < 0 then set LLEntry_next[tail] = a set LLEntry_prev[a] = tail set tail = a set a = LLEntry_next[a] else set LLEntry_next[tail] = b set LLEntry_prev[b] = tail set tail = b set b = LLEntry_next[b] endif endloop return head endfunction function dispatch_LinkedList_LinkedList_LinkedList_sortMerge takes integer this_1, integer comparator, integer pa, integer pb returns integer local integer LinkedList_LinkedList_sortMerge_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.sortMerge") else call error("Called LinkedList.sortMerge on invalid object.") endif endif set LinkedList_LinkedList_sortMerge_result = LinkedList_sortMerge(this_1, comparator, pa, pb) return LinkedList_LinkedList_sortMerge_result endfunction function LinkedList_split takes integer this_1, integer e returns integer local integer normalRef = e local integer halfRef = e local integer tmp loop exitwhen not (LLEntry_next[normalRef] != LinkedList_dummy[this_1] and LLEntry_next[LLEntry_next[normalRef]] != LinkedList_dummy[this_1]) set normalRef = LLEntry_next[LLEntry_next[normalRef]] set halfRef = LLEntry_next[halfRef] endloop set tmp = LLEntry_next[halfRef] set LLEntry_next[halfRef] = LinkedList_dummy[this_1] return tmp endfunction function dispatch_LinkedList_LinkedList_LinkedList_split takes integer this_1, integer e returns integer local integer LinkedList_LinkedList_split_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.split") else call error("Called LinkedList.split on invalid object.") endif endif set LinkedList_LinkedList_split_result = LinkedList_split(this_1, e) return LinkedList_LinkedList_split_result endfunction function LinkedList_sort takes integer this_1, integer comparator, integer e returns integer local integer second local integer first if e == LinkedList_dummy[this_1] or LLEntry_next[e] == LinkedList_dummy[this_1] then return e endif set second = dispatch_LinkedList_LinkedList_LinkedList_split(this_1, e) set first = LinkedList_sort(this_1, comparator, e) set second = LinkedList_sort(this_1, comparator, second) return dispatch_LinkedList_LinkedList_LinkedList_sortMerge(this_1, comparator, first, second) endfunction function dispatch_LinkedList_LinkedList_LinkedList_sort takes integer this_1, integer comparator, integer e returns integer local integer LinkedList_LinkedList_sort_result if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.sort") else call error("Called LinkedList.sort on invalid object.") endif endif set LinkedList_LinkedList_sort_result = LinkedList_sort(this_1, comparator, e) return LinkedList_LinkedList_sort_result endfunction function LinkedList_sortWith takes integer this_1, integer comparator returns nothing local integer last if comparator != 0 and dispatch_LinkedList_LinkedList_LinkedList_size(this_1) > 1 then set LLEntry_next[LinkedList_dummy[this_1]] = dispatch_LinkedList_LinkedList_LinkedList_sort(this_1, comparator, LLEntry_next[LinkedList_dummy[this_1]]) set LLEntry_prev[LLEntry_next[LinkedList_dummy[this_1]]] = LinkedList_dummy[this_1] set last = LLEntry_next[LinkedList_dummy[this_1]] loop exitwhen not (LLEntry_next[last] != LinkedList_dummy[this_1]) set last = LLEntry_next[last] endloop set LLEntry_prev[LinkedList_dummy[this_1]] = last endif endfunction function dispatch_LinkedList_LinkedList_LinkedList_sortWith takes integer this_1, integer comparator returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.sortWith") else call error("Called LinkedList.sortWith on invalid object.") endif endif call LinkedList_sortWith(this_1, comparator) 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 callback_forEachFrom_Preloader takes integer this_1, unit u_1 returns nothing call unit_remove(u_1) endfunction function alloc_TowerBlockadeMissile 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] = 929 else call error("Out of memory: Could not create TowerBlockadeMissile.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 929 endif return this_1 endfunction function TowerBlockadeMissile_init takes integer this_1 returns nothing endfunction function Projectile_setTargetted takes integer this_1, integer target_1 returns nothing set Projectile_target[this_1] = target_1 endfunction function dispatch_Projectile_Projectile_Projectile_setTargetted takes integer this_1, integer target_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setTargetted") else call error("Called Projectile.setTargetted on invalid object.") endif endif call Projectile_setTargetted(this_1, target_1) endfunction function construct_TowerBlockadeMissile takes integer this_1, real pos_x, real pos_y, real pos_z, player owner_1, integer target_1 returns nothing call construct_Projectile(this_1, pos_x, pos_y, pos_z, 16., owner_1, vec3_angleTo2d_2516(pos_x, pos_y, pos_z, dispatch_UnitEntity_Entity_UnitEntity_getPos(target_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z), Abilities_deathCoilMissile) call TowerBlockadeMissile_init(this_1) set TowerBlockadeMissile_utarget[this_1] = target_1 call dispatch_Entity_Entity_Entity_setTarget(this_1, vec3_add(dispatch_UnitEntity_Entity_UnitEntity_getPos(target_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, 0., 0., 64.), vec3_add_return_y, vec3_add_return_z, 14.) call dispatch_Projectile_Projectile_Projectile_setTargetted(this_1, target_1) endfunction function new_TowerBlockadeMissile takes real pos_x, real pos_y, real pos_z, player owner_1, integer target_1 returns integer local integer this_1 = alloc_TowerBlockadeMissile() call construct_TowerBlockadeMissile(this_1, pos_x, pos_y, pos_z, owner_1, target_1) return this_1 endfunction function EndBoss_castTowerBlockade takes integer this_1, integer tower returns nothing call new_TowerBlockadeMissile(vec3_add(dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, 0., 0., 64.), vec3_add_return_y, vec3_add_return_z, Entity_owner[this_1], tower) endfunction function dispatch_EndBoss_EndBoss_EndBoss_castTowerBlockade takes integer this_1, integer tower returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBoss.castTowerBlockade") else call error("Called EndBoss.castTowerBlockade on invalid object.") endif endif call EndBoss_castTowerBlockade(this_1, tower) endfunction function callback_forUnitsInRange_EndBoss_EndBoss takes integer this_1, unit u_1 returns nothing local integer tower local boolean hasBuff local integer iterator local integer bff local integer instanceOfTemp local boolean andLeft if EndBoss_blockadeCount[this_1499[this_1]] > 0 and IsUnitType(u_1, UNIT_TYPE_STRUCTURE) and unit_isAlive(u_1) then set instanceOfTemp = Serializable_typeId[unit_getEntity(u_1)] set andLeft = instanceOfTemp >= 955 and instanceOfTemp <= 961 else set andLeft = false endif if andLeft and PlayerData_pDatas[player_getId(unit_getOwner(u_1))] != 0 then set tower = unit_getEntity(u_1) set hasBuff = false if unit_hasBuffs(u_1) then set iterator = LinkedList_iterator(unit_getBuffs(u_1)) loop exitwhen not LLIterator_hasNext(iterator) set bff = LLIterator_next(iterator) if Buff_typeId[bff] == 650 then set hasBuff = true exitwhen true endif endloop call LLIterator_close(iterator) endif if not hasBuff then call dispatch_EndBoss_EndBoss_EndBoss_castTowerBlockade(this_1499[this_1], tower) set EndBoss_blockadeCount[this_1499[this_1]] = EndBoss_blockadeCount[this_1499[this_1]] - 1 endif endif endfunction function unit_addState takes unit this_1, unitstate state, real value returns nothing call SetUnitState(this_1, state, unit_getState(this_1, state) + value) endfunction function unit_addHP takes unit this_1, real wval returns nothing call unit_addState(this_1, UNIT_STATE_LIFE, wval) endfunction function callback_forUnitsInRange_FieldGenerator takes integer this_1, unit u_1 returns nothing call unit_addHP(u_1, 100.) endfunction function alloc_EntityWithDist takes nothing returns integer local integer this_1 if EntityWithDist_firstFree == 0 then if EntityWithDist_maxIndex < JASS_MAX_ARRAY_SIZE then set EntityWithDist_maxIndex = EntityWithDist_maxIndex + 1 set this_1 = EntityWithDist_maxIndex set EntityWithDist_typeId[this_1] = 746 else call error("Out of memory: Could not create EntityWithDist.") set this_1 = 0 endif else set EntityWithDist_firstFree = EntityWithDist_firstFree - 1 set this_1 = EntityWithDist_nextFree[EntityWithDist_firstFree] set EntityWithDist_typeId[this_1] = 746 endif return this_1 endfunction function EntityWithDist_init takes integer this_1 returns nothing endfunction function construct_EntityWithDist takes integer this_1, integer ue, real dist returns nothing call EntityWithDist_init(this_1) set EntityWithDist_ue[this_1] = ue set EntityWithDist_distSq[this_1] = real_toInt(dist) endfunction function new_EntityWithDist takes integer ue, real dist returns integer local integer this_1 = alloc_EntityWithDist() call construct_EntityWithDist(this_1, ue, dist) return this_1 endfunction function callback_forUnitsInRange_HealbackTower_HealbackTower takes integer this_1, unit u_1 returns nothing local boolean viable = true local integer e local integer instanceOfTemp local boolean andLeft if ( not IsUnitType(u_1, UNIT_TYPE_STRUCTURE)) or ( not unit_isAlive(u_1)) then set viable = false endif if viable and PlayerData_pDatas[player_getId(unit_getOwner(u_1))] == 0 then set viable = false endif if viable then set e = unit_getEntity(u_1) if Serializable_typeId[e] == 965 then set andLeft = true else set instanceOfTemp = Serializable_typeId[e] set andLeft = instanceOfTemp >= 955 and instanceOfTemp <= 961 endif if not andLeft then set viable = false endif if unit_getHP(u_1) == unit_getMaxHP(u_1) then set viable = false endif endif if viable then call dispatch_LinkedList_LinkedList_LinkedList_add_1(HealbackTower_nearEntities, new_EntityWithDist(unit_getEntity(u_1), vec2_distanceToSq(HealbackTower_statSource_x, HealbackTower_statSource_y, unit_getPos(u_1), unit_getPos_return_y))) endif 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 getKB takes integer level returns real return 4.85 + level * level endfunction function min_2_2104 takes real numbers_0, real numbers_1 returns real local real minNumber = Real_REAL_MAX local real 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 unit_getMoveSpeed takes unit this_1 returns real return GetUnitMoveSpeed(this_1) endfunction function unit_isType takes unit this_1, unittype utype returns boolean return IsUnitType(this_1, utype) endfunction function vec3_lengthSquared takes real this_x, real this_y, real this_z returns real return this_x * this_x + this_y * this_y + this_z * this_z endfunction function widget_getLife takes widget this_1 returns real return GetWidgetLife(this_1) endfunction function widget_isAliveTrick takes widget this_1 returns boolean return .405 < widget_getLife(this_1) endfunction function callback_forUnitsInRange_WaveMissile_WaveTower takes integer this_1, unit u_1 returns nothing local integer data_1 local integer receiver local integer receiver_1 local integer cd local integer receiver_2 local integer receiver_3 local real upos_x local real upos_y local real upos_z local real ang_radians local real kb local real speedPerc local integer instanceOfTemp local integer instanceOfTemp_1 local boolean andLeft local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 if widget_isAliveTrick(u_1) and ( not unit_isType(u_1, UNIT_TYPE_FLYING)) then set data_1 = unit_getEntity(u_1) if group_has(WaveMissile_affected[this_1511[this_1]], u_1) then set receiver = dotDmg[this_1] call dispatch_DummyDamage_DummyDamage_DummyDamage_target(receiver, u_1) set receiver_1 = receiver call dispatch_DummyDamage_DummyDamage_DummyDamage_apply(receiver_1) else if data_1 != 0 then set instanceOfTemp = Serializable_typeId[data_1] set andLeft = instanceOfTemp >= 936 and instanceOfTemp <= 952 else set andLeft = false endif if andLeft and ( not Entity_done[data_1]) then set cd = data_1 call group_has(WaveMissile_affected[this_1511[this_1]], u_1) set receiver_2 = splashDmg[this_1] call dispatch_DummyDamage_DummyDamage_DummyDamage_target(receiver_2, u_1) set receiver_3 = receiver_2 call dispatch_DummyDamage_DummyDamage_DummyDamage_apply(receiver_3) set tuple_temp = dispatch_UnitEntity_Entity_UnitEntity_getPos(data_1) set tuple_temp_1 = dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y set tuple_temp_2 = dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z set upos_x = tuple_temp set upos_y = tuple_temp_1 set upos_z = tuple_temp_2 set tuple_temp_3 = vec3_angleTo2d_2516(Entity_pos_x[this_1511[this_1]], Entity_pos_y[this_1511[this_1]], Entity_pos_z[this_1511[this_1]], upos_x, upos_y, upos_z) set ang_radians = tuple_temp_3 set kb = getKB(WaveMissile_level[this_1511[this_1]]) * min_2_2104(0.35, vec3_lengthSquared(Entity_vel_x[this_1511[this_1]], Entity_vel_y[this_1511[this_1]], Entity_vel_z[this_1511[this_1]]) / (16. * 16.)) set instanceOfTemp_1 = Serializable_typeId[data_1] if instanceOfTemp_1 >= 937 and instanceOfTemp_1 <= 943 then set speedPerc = 0.25 + unit_getMoveSpeed(UnitEntity_actor[cd]) / 522. * 0.75 call dispatch_Entity_Entity_Entity_setVel(data_1, angle_cos(ang_radians) * kb * speedPerc, angle_sin(ang_radians) * kb * speedPerc, 0.) else call dispatch_Entity_Entity_Entity_setVel(data_1, angle_cos(ang_radians) * kb, angle_sin(ang_radians) * kb, 0.) endif call effect_destr(addEffect(Abilities_gryphonRiderMissileTarget, unit_getPos(u_1), unit_getPos_return_y)) endif endif endif endfunction function callback_forUnitsOfPlayer_TownBell takes integer this_1, unit u_1 returns nothing local real pos_x local real pos_y local real facing_radians local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if unit_getTypeId(u_1) == TownBell_DUMMY_ID then set tuple_temp = unit_getPos(u_1) set tuple_temp_1 = unit_getPos_return_y set pos_x = tuple_temp set pos_y = tuple_temp_1 set tuple_temp_2 = unit_getFacingAngle(u_1) set facing_radians = tuple_temp_2 call effect_destr(addEffect(Abilities_avatarCaster, pos_x, pos_y)) call unit_remove(u_1) call createUnit(TownBell_lastRinger, TownBell_TOWER_ID, pos_x, pos_y, facing_radians) endif endfunction function callback_forUnitsOfPlayer_doAfter_TownBell takes integer this_1, unit u_1 returns nothing local real pos_x local real pos_y local real facing_radians local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if unit_getTypeId(u_1) == TownBell_TOWER_ID then set tuple_temp = unit_getPos(u_1) set tuple_temp_1 = unit_getPos_return_y set pos_x = tuple_temp set pos_y = tuple_temp_1 set tuple_temp_2 = unit_getFacingAngle(u_1) set facing_radians = tuple_temp_2 call effect_destr(addEffect(UI_goldCredit, pos_x, pos_y)) call unit_remove(u_1) call createUnit(Player_players[8], TownBell_DUMMY_ID, pos_x, pos_y, facing_radians) 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] <= 799 then if ForGroupCallback_typeId[this_1] <= 797 then if ForGroupCallback_typeId[this_1] <= 796 then if ForGroupCallback_typeId[this_1] <= 795 then call callback_forEachFrom_LinkedList(this_1, u_1) else call callback_forEachFrom_Preloader(this_1, u_1) endif else call callback_forUnitsInRange_EndBoss_EndBoss(this_1, u_1) endif elseif ForGroupCallback_typeId[this_1] <= 798 then call callback_forUnitsInRange_FieldGenerator(this_1, u_1) else call callback_forUnitsInRange_HealbackTower_HealbackTower(this_1, u_1) endif elseif ForGroupCallback_typeId[this_1] <= 801 then if ForGroupCallback_typeId[this_1] <= 800 then call callback_forUnitsInRange_Projectile_Projectile(this_1, u_1) else call callback_forUnitsInRange_WaveMissile_WaveTower(this_1, u_1) endif elseif ForGroupCallback_typeId[this_1] <= 802 then call callback_forUnitsOfPlayer_TownBell(this_1, u_1) else call callback_forUnitsOfPlayer_doAfter_TownBell(this_1, u_1) endif 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 popCallback takes nothing returns nothing call group_clear(ClosureForGroups_DUMMY_GROUP) set ClosureForGroups_tempCallbacksCount = ClosureForGroups_tempCallbacksCount - 1 call dispatch_ForGroupCallback_destroyForGroupCallback(ClosureForGroups_tempCallbacks[ClosureForGroups_tempCallbacksCount]) endfunction function pushCallback takes integer c returns nothing set ClosureForGroups_tempCallbacks[ClosureForGroups_tempCallbacksCount] = c set ClosureForGroups_tempCallbacksCount = ClosureForGroups_tempCallbacksCount + 1 set ClosureForGroups_iterCount = 0 set ClosureForGroups_maxCount = Integer_INT_MAX endfunction function forUnitsInRange_1878 takes real pos_x, real pos_y, real radius, boolean collisionSizeFiltering, integer c returns nothing local unit u_1 local group from if collisionSizeFiltering then call pushCallback(c) call GroupEnumUnitsInRange(Group_ENUM_GROUP, pos_x, pos_y, radius + Basics_MAX_COLLISION_SIZE, null) set from = Group_ENUM_GROUP loop exitwhen not group_hasNext(from) set u_1 = group_next(from) if IsUnitInRangeXY(u_1, pos_x, pos_y, radius) then call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(c, u_1) endif endloop call popCallback() else call pushCallback(c) call GroupEnumUnitsInRange(ClosureForGroups_DUMMY_GROUP, pos_x, pos_y, radius, ClosureForGroups_filter) call popCallback() endif endfunction function forUnitsInRange takes real pos_x, real pos_y, real radius, integer c returns nothing call forUnitsInRange_1878(pos_x, pos_y, radius, false, c) endfunction function HealbackTower_getNearestBuilding takes real source_x, real source_y, integer count_1, real range returns integer local real tuple_temp = source_x local real tuple_temp_1 = source_y local integer clVar local integer targets_1 local integer clVar_1 local real temp_x local real temp_y local real temp local integer temp_1 local real tuple_temp_2 local real tuple_temp_3 set HealbackTower_statSource_x = tuple_temp set HealbackTower_statSource_y = tuple_temp_1 set tuple_temp_2 = source_x set tuple_temp_3 = source_y set temp_x = tuple_temp_2 set temp_y = tuple_temp_3 set temp = range set clVar = alloc_ForGroupCallback_forUnitsInRange_HealbackTower_HealbackTower() call forUnitsInRange(temp_x, temp_y, temp, clVar) call dispatch_LinkedList_LinkedList_LinkedList_sortWith(HealbackTower_nearEntities, HealbackTower_comparator) set targets_1 = new_LinkedList() set temp_1 = HealbackTower_nearEntities set clVar_1 = alloc_LLItrClosure_forEach_HealbackTower_HealbackTower() set targets[clVar_1] = targets_1 set count[clVar_1] = count_1 call dispatch_LinkedList_LinkedList_LinkedList_forEach(temp_1, clVar_1) call dispatch_LinkedList_LinkedList_LinkedList_clear(HealbackTower_nearEntities) return targets_1 endfunction function HealbackTower_getRange takes integer level returns real return HealbackTower_HEALBACK_RANGES[level - 1] endfunction function alloc_HealbackMissile 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] = 924 else call error("Out of memory: Could not create HealbackMissile.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 924 endif return this_1 endfunction function HealbackMissile_init takes integer this_1 returns nothing endfunction function Fx2_setTint takes integer this_1, integer tint_red, integer tint_green, integer tint_blue, integer tint_alpha returns nothing local integer tuple_temp = tint_red local integer tuple_temp_1 = tint_green local integer tuple_temp_2 = tint_blue local integer tuple_temp_3 = tint_alpha set Fx2_tint_red[this_1] = tuple_temp set Fx2_tint_green[this_1] = tuple_temp_1 set Fx2_tint_blue[this_1] = tuple_temp_2 set Fx2_tint_alpha[this_1] = tuple_temp_3 call effect_setColor(Fx2_eff[this_1], tint_red, tint_green, tint_blue, tint_alpha) endfunction function dispatch_Fx2_Fx2_Fx2_setTint takes integer this_1, integer tint_red, integer tint_green, integer tint_blue, integer tint_alpha returns nothing if Fx2_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Fx2.setTint") else call error("Called Fx2.setTint on invalid object.") endif endif call Fx2_setTint(this_1, tint_red, tint_green, tint_blue, tint_alpha) endfunction function vec3_distanceToSq takes real this_x, real this_y, real this_z, real v_x, real v_y, real v_z returns real return real_squared(v_x - this_x) + real_squared(v_y - this_y) + real_squared(v_z - this_z) endfunction function construct_HealbackMissile takes integer this_1, real pos_x, real pos_y, real pos_z, player owner_1, real heal, integer target_1 returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 call construct_Projectile(this_1, pos_x, pos_y, pos_z, HealbackTower_HEALBACK_RADIUS, owner_1, vec3_angleTo2d_2516(pos_x, pos_y, pos_z, dispatch_UnitEntity_Entity_UnitEntity_getPos(target_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z), HealbackTower_HEALBACK_MISSILE_EFFECT) call HealbackMissile_init(this_1) call dispatch_Fx2_Fx2_Fx2_setTint(Fx2Entity_fx[this_1], 0, 255, 0, 255) set HealbackMissile_heal[this_1] = heal set HealbackMissile_targetEntity[this_1] = target_1 set tuple_temp = pos_x set tuple_temp_1 = pos_y set tuple_temp_2 = pos_z set HealbackMissile_startPos_x[this_1] = tuple_temp set HealbackMissile_startPos_y[this_1] = tuple_temp_1 set HealbackMissile_startPos_z[this_1] = tuple_temp_2 set HealbackMissile_distanceToTravelSq[this_1] = vec3_distanceToSq(dispatch_UnitEntity_Entity_UnitEntity_getPos(target_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, HealbackMissile_startPos_x[this_1], HealbackMissile_startPos_y[this_1], HealbackMissile_startPos_z[this_1]) call dispatch_Entity_Entity_Entity_setTarget(this_1, vec3_add(unit_getPos3Real(UnitEntity_actor[target_1]), unit_getPos3Real_return_y, unit_getPos3Real_return_z, 0., 0., 32.), vec3_add_return_y, vec3_add_return_z, 19.25) call dispatch_Fx2_Fx2_Fx2_setTint(Fx2Entity_fx[this_1], 215, 255, 215, 168) call dispatch_Projectile_Projectile_Projectile_setRanged(this_1, 2000.) endfunction function new_HealbackMissile takes real pos_x, real pos_y, real pos_z, player owner_1, real heal, integer target_1 returns integer local integer this_1 = alloc_HealbackMissile() call construct_HealbackMissile(this_1, pos_x, pos_y, pos_z, owner_1, heal, target_1) return this_1 endfunction function HealbackTower_launchHealback takes integer this_1, integer attacked, real damage returns nothing local real tuple_temp = unit_getPos3Real(UnitEntity_actor[attacked]) local real tuple_temp_1 = unit_getPos3Real_return_y local real tuple_temp_2 = unit_getPos3Real_return_z local real creepPos_x = tuple_temp local real creepPos_y = tuple_temp_1 local real creepPos_z = tuple_temp_2 local integer targets_1 = HealbackTower_getNearestBuilding(vec3_toVec2(creepPos_x, creepPos_y, creepPos_z), vec3_toVec2_return_y, HealbackTower_getMissileCount(HealbackTower_level[this_1]), HealbackTower_getRange(HealbackTower_level[this_1])) local integer iterator = LinkedList_iterator(targets_1) local integer target_1 loop exitwhen not LLIterator_hasNext(iterator) set target_1 = LLIterator_next(iterator) call new_HealbackMissile(vec3_add(creepPos_x, creepPos_y, creepPos_z, 0., 0., 48.), vec3_add_return_y, vec3_add_return_z, Entity_owner[this_1], damage, target_1) endloop call LLIterator_close(iterator) call dispatch_LinkedList_destroyLinkedList(targets_1) endfunction function dispatch_HealbackTower_HealbackTower_HealbackTower_launchHealback takes integer this_1, integer attacked, real damage returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HealbackTower.launchHealback") else call error("Called HealbackTower.launchHealback on invalid object.") endif endif call HealbackTower_launchHealback(this_1, attacked, damage) endfunction function HealbackTower_onAttack takes integer this_1, integer target_1 returns nothing if DamageEvent_getAmount() > 0. and Entity_owner[target_1] == Creep_CREEP_OWNER then call dispatch_HealbackTower_HealbackTower_HealbackTower_launchHealback(this_1, target_1, DamageEvent_getAmount() * HealbackTower_getMultiplier(HealbackTower_level[this_1])) endif endfunction function ThermoTower_getDamage takes integer this_1 returns real return 50. + 40 * ThermoTower_level[this_1] endfunction function dispatch_ThermoTower_ThermoTower_ThermoTower_getDamage takes integer this_1 returns real local real ThermoTower_ThermoTower_getDamage_result if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ThermoTower.getDamage") else call error("Called ThermoTower.getDamage on invalid object.") endif endif set ThermoTower_ThermoTower_getDamage_result = ThermoTower_getDamage(this_1) return ThermoTower_ThermoTower_getDamage_result endfunction function ThermoTower_onAttack takes integer this_1, integer ud returns nothing local timer t if ThermoTower_isHot[this_1] then if GetUnitAbilityLevel(UnitEntity_actor[ud], ThermoTower_buffcode) > 0 then call UnitDamageTarget(UnitEntity_actor[this_1], UnitEntity_actor[ud], dispatch_ThermoTower_ThermoTower_ThermoTower_getDamage(this_1), true, false, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS) call unit_removeAbility(UnitEntity_actor[ud], ThermoTower_buffcode) endif call unit_addAbility(UnitEntity_actor[this_1], ThermoTower_ORB_ID) set ThermoTower_isHot[this_1] = false else set t = getTimer() call timer_setData(t, this_1) call timer_start(t, 1.3, ref_function_ThermoTower_removeFrostAbil) set ThermoTower_isHot[this_1] = true endif endfunction function Tower_onAttack takes integer this_1, integer w_target returns nothing endfunction function unit_issueTargetOrder takes unit this_1, string order, widget targetWidget returns boolean return IssueTargetOrder(this_1, order, targetWidget) endfunction function TrooperTower_onAttack takes integer this_1, integer target_1 returns nothing local integer iterator = LinkedList_iterator(TrooperTower_troops[this_1]) local integer troop loop exitwhen not LLIterator_hasNext(iterator) set troop = LLIterator_next(iterator) call unit_issueTargetOrder(UnitEntity_actor[troop], "smart", UnitEntity_actor[target_1]) endloop call LLIterator_close(iterator) endfunction function alloc_WaveMissile 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] = 930 else call error("Out of memory: Could not create WaveMissile.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 930 endif return this_1 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] = 784 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] = 784 endif return this_1 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_2277 takes nothing returns nothing set Execute_tempCallbacksCount = Execute_tempCallbacksCount - 1 call dispatch_ForForceCallback_destroyForForceCallback(Execute_tempCallbacks[Execute_tempCallbacksCount]) endfunction function pushCallback_2288 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_2288(c) set suppressErrors = ErrorHandling_suppressErrorMessages set ErrorHandling_suppressErrorMessages = true call force_forEach(Execute_executeForce, ref_function_executeCurrentCallback) set ErrorHandling_suppressErrorMessages = suppressErrors call popCallback_2277() 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 max_2 takes integer numbers_0, integer numbers_1 returns integer local integer maxNumber = Integer_INT_MIN local integer cond_result if numbers_0 > maxNumber then set cond_result = numbers_0 else set cond_result = maxNumber endif set maxNumber = cond_result if numbers_1 > maxNumber then set cond_result = numbers_1 else set cond_result = maxNumber endif set maxNumber = cond_result return maxNumber endfunction function createGroups takes integer number returns nothing local integer maxCreatePerCycle = 256 local integer actualLimit = max_2(JASS_MAX_ARRAY_SIZE - 1, GroupUtils_GROUP_NUMBER_LIMIT) local integer numTarget = GroupUtils_numTotal + number local integer overflow = max_2(0, numTarget - actualLimit) local integer toCreate = max_2(0, numTarget - overflow) local integer createNow_1 local integer clVar loop exitwhen not (toCreate > 0) set createNow_1 = min_2(toCreate, maxCreatePerCycle) set toCreate = toCreate - createNow_1 set clVar = alloc_ForForceCallback_execute_GroupUtils() set createNow[clVar] = createNow_1 call execute(clVar) endloop if GroupUtils_numTotal >= GroupUtils_GROUP_NUMBER_LIMIT and ( not GroupUtils_shownMaxError) then call Log_warn("Maximum number of GroupUtils groups (" + int_toString(GroupUtils_GROUP_NUMBER_LIMIT) + ") created. " + "All newly created groups will be non-recyclable.") set GroupUtils_shownMaxError = true endif endfunction function cyc_pop takes integer funcChoice returns nothing local group retVal local group retVal_1 if funcChoice == 0 then set GroupUtils_numStack = GroupUtils_numStack - 1 set retVal = GroupUtils_stack[GroupUtils_numStack] if GroupUtils_stack[GroupUtils_numStack] != null then call dispatch_HashMap_HashMap_HashMap_put(GroupUtils_used, groupToIndex(GroupUtils_stack[GroupUtils_numStack]), booleanToIndex(true)) else if not GroupUtils_shownDestrWarning then call Log_warn("Groups on the GroupUtils stack shouldn't be destroyed! Use .release() instead.") set GroupUtils_shownDestrWarning = true endif call cyc_pop(1) set retVal = tempReturn_group endif set tempReturn_group = retVal return elseif funcChoice == 1 then if GroupUtils_numStack > 0 then call cyc_pop(0) set retVal_1 = tempReturn_group elseif GroupUtils_numStack <= 0 and GroupUtils_numTotal < GroupUtils_GROUP_NUMBER_LIMIT then call createGroups(GroupUtils_NEED_CREATE_GROUPS) call cyc_pop(0) set retVal_1 = tempReturn_group else set retVal_1 = CreateGroup() endif set tempReturn_group = retVal_1 return endif endfunction function WaveMissile_init takes integer this_1 returns nothing call cyc_pop(1) set WaveMissile_affected[this_1] = tempReturn_group endfunction function effect_setPitch takes effect this_1, real pitch_radians returns nothing call BlzSetSpecialEffectPitch(this_1, angle_radians(pitch_radians)) endfunction function Projectile_setZAngle takes integer this_1, real zA_radians returns nothing call effect_setPitch(Fx2_eff[Fx2Entity_fx[this_1]], zA_radians) endfunction function dispatch_Projectile_Projectile_Projectile_setZAngle takes integer this_1, real zA_radians returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.setZAngle") else call error("Called Projectile.setZAngle on invalid object.") endif endif call Projectile_setZAngle(this_1, zA_radians) endfunction function construct_WaveMissile takes integer this_1, real pos_x, real pos_y, real pos_z, real target_x_1, real target_y_1, real speed, player owner_1, integer level, unit tower returns nothing call construct_Projectile(this_1, pos_x, pos_y, pos_z, WaveTower_AREA_OF_EFFECT, owner_1, vec3_angleTo2d(pos_x, pos_y, pos_z, target_x_1, target_y_1), Abilities_crushingWaveMissile) call WaveMissile_init(this_1) call dispatch_Projectile_Projectile_Projectile_setZAngle(this_1, 0.) call dispatch_Projectile_Projectile_Projectile_setSpeed(this_1, speed) call dispatch_Projectile_Projectile_Projectile_setAcc(this_1, 0.975) set WaveMissile_level[this_1] = level endfunction function new_WaveMissile takes real pos_x, real pos_y, real pos_z, real target_x_1, real target_y_1, real speed, player owner_1, integer level, unit tower returns integer local integer this_1 = alloc_WaveMissile() call construct_WaveMissile(this_1, pos_x, pos_y, pos_z, target_x_1, target_y_1, speed, owner_1, level, tower) return this_1 endfunction function WaveTower_onAttack takes integer this_1, integer ud returns nothing call new_WaveMissile(vec2_withHeightMap_2511(vec3_toVec2(dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z), vec3_toVec2_return_y, 38.), vec2_withHeightMap_return_y_1562, vec2_withHeightMap_return_z_1564, vec3_toVec2(dispatch_UnitEntity_Entity_UnitEntity_getPos(ud), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z), vec3_toVec2_return_y, 22., Entity_owner[this_1], WaveTower_level[this_1], UnitEntity_actor[this_1]) endfunction function dispatch_Tower_Tower_Tower_onAttack takes integer this_1, integer w_target returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Tower.onAttack") else call error("Called Tower.onAttack on invalid object.") endif endif if Serializable_typeId[this_1] <= 958 then if Serializable_typeId[this_1] <= 957 then if Serializable_typeId[this_1] <= 956 then call Tower_onAttack(this_1, w_target) else call FlamethrowerTower_onAttack(this_1, w_target) endif else call HealbackTower_onAttack(this_1, w_target) endif elseif Serializable_typeId[this_1] <= 960 then if Serializable_typeId[this_1] <= 959 then call ThermoTower_onAttack(this_1, w_target) else call TrooperTower_onAttack(this_1, w_target) endif else call WaveTower_onAttack(this_1, w_target) endif endfunction function onEvent_addListener_Tower takes integer this_1 returns nothing local unit damager = GetEventDamageSource() local unit damaged = GetTriggerUnit() local integer e local integer t local integer instanceOfTemp if damager != damaged and unit_getEntity(damager) != 0 and unit_isAlive(damaged) then set e = unit_getEntity(damager) set instanceOfTemp = Serializable_typeId[e] if instanceOfTemp >= 955 and instanceOfTemp <= 961 then set t = e if unit_getEntity(damaged) != 0 then call dispatch_Tower_Tower_Tower_onAttack(t, unit_getEntity(damaged)) else call unit_issueImmediateOrder(UnitEntity_actor[t], "stop") endif 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 if DamageListener_typeId[this_1] <= 737 then call onEvent_addListener_Buff(this_1) else call onEvent_addListener_Tower(this_1) endif 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] = 735 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] = 735 endif return this_1 endfunction function DamageInstance_init takes integer this_1 returns nothing endfunction function construct_DamageInstance takes integer this_1, integer id_1, unit source, unit target_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_1, 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_1, 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_2207 takes integer this_1 returns nothing call DamageEvent_onDamage() endfunction function Log_setLevel takes integer lvl returns nothing set Printing_config_DEBUG_LEVEL = lvl 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 alloc_CallbackSingle_doAfter_EndBoss_EndBoss 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] = 675 else call error("Out of memory: Could not create CallbackSingle_doAfter_EndBoss_EndBoss.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 675 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_EndBoss_EndBoss_956 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] = 676 else call error("Out of memory: Could not create CallbackSingle_doAfter_EndBoss_EndBoss.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 676 endif return this_1 endfunction function unit_pauseEx takes unit this_1 returns nothing call BlzPauseUnitEx(this_1, true) endfunction function EndBoss_castAbility takes integer this_1 returns nothing local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local integer abil local integer temp local integer clVar local integer clVar_1 local real temp_1 local real temp_2 call new_TextTagEntity(dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, GetRandomReal(-1., 1.), 0., GetRandomReal(9., 12.), "Casting..", 12., 1., 162, 9, 182, 255) set receiver = UnitEntity_actor[this_1] call unit_pauseEx(receiver) set receiver_1 = receiver call unit_setAnimation(receiver_1, "spell") set receiver_2 = receiver_1 call unit_queueAnimation(receiver_2, "spell") set receiver_3 = receiver_2 call unit_setTimeScale(receiver_3, 0.25) set abil = GetRandomInt(0, 2) set temp = abil if temp == 0 then set temp_1 = GetRandomReal(1., 3.) set clVar = alloc_CallbackSingle_doAfter_EndBoss_EndBoss() call construct_CallbackSingle(clVar) set this_1497[clVar] = this_1 call doAfter(temp_1, clVar) elseif temp == 1 or temp == 2 then set temp_2 = GetRandomReal(1., 3.) set clVar_1 = alloc_CallbackSingle_doAfter_EndBoss_EndBoss_956() call construct_CallbackSingle(clVar_1) set this_1498[clVar_1] = this_1 call doAfter(temp_2, clVar_1) endif endfunction function dispatch_EndBoss_EndBoss_EndBoss_castAbility takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBoss.castAbility") else call error("Called EndBoss.castAbility on invalid object.") endif endif call EndBoss_castAbility(this_1) endfunction function EndBoss_onEnbossDamage takes integer this_1 returns nothing call dispatch_EndBoss_EndBoss_EndBoss_castAbility(this_1) endfunction function dispatch_EndBoss_EndBoss_EndBoss_onEnbossDamage takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBoss.onEnbossDamage") else call error("Called EndBoss.onEnbossDamage on invalid object.") endif endif call EndBoss_onEnbossDamage(this_1) endfunction function onEvent_add_EndBoss_EndBoss takes integer this_1 returns nothing set EndBoss_damageCount[this_1496[this_1]] = EndBoss_damageCount[this_1496[this_1]] + GetEventDamage() if EndBoss_damageCount[this_1496[this_1]] > 2500. then set EndBoss_damageCount[this_1496[this_1]] = EndBoss_damageCount[this_1496[this_1]] - (2500. + GetRandomReal(500., 1500.)) call dispatch_EndBoss_EndBoss_EndBoss_onEnbossDamage(this_1496[this_1]) endif endfunction function dispatch_ItemEntity_Entity_ItemEntity_onPickup takes integer this_1, integer entity returns nothing 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_2211 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_2212 takes integer this_1 returns nothing call onItemUse() endfunction function alloc_CallbackSingle_doAfter_LumberAndCoinSystem 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] = 686 else call error("Out of memory: Could not create CallbackSingle_doAfter_LumberAndCoinSystem.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 686 endif return this_1 endfunction function createItem takes integer itemId, real pos_x, real pos_y returns item return createItem_1368(itemId, vec2_toVec3(pos_x, pos_y), vec2_toVec3_return_y, vec2_toVec3_return_z) endfunction function getExtraBounty takes nothing returns nothing local player victim = unit_getOwner(GetDyingUnit()) local player killer = unit_getOwner(GetKillingUnit()) local item itm_1 local integer clVar if victim == Creep_CREEP_OWNER and killer != Creep_CREEP_OWNER then set PlayerData_kills[PlayerData_pDatas[player_getId(killer)]] = PlayerData_kills[PlayerData_pDatas[player_getId(killer)]] + 1 set LumberAndCoinSystem_killcount = LumberAndCoinSystem_killcount + 1 if LumberAndCoinSystem_killcount >= LumberAndCoinSystem_killcap then set LumberAndCoinSystem_killcap = LumberAndCoinSystem_killcap + 1. if PlayerData_bigArena then set LumberAndCoinSystem_killcap = LumberAndCoinSystem_killcap + 3. set LumberAndCoinSystem_killcap = LumberAndCoinSystem_killcap * 1.015 endif set LumberAndCoinSystem_killcount = 0 set itm_1 = createItem(LumberAndCoinSystem_WOOD_ID, unit_getPos(GetDyingUnit()), unit_getPos_return_y) set clVar = alloc_CallbackSingle_doAfter_LumberAndCoinSystem() call construct_CallbackSingle(clVar) set itm_1239[clVar] = itm_1 call doAfter(45., clVar) endif endif endfunction function onEvent_add_LumberAndCoinSystem takes integer this_1 returns nothing call getExtraBounty() endfunction function createFText_1361 takes real pos_x, real pos_y, real pos_z, string text, real size, real lifespan, real vel_x, real vel_y returns integer return createFText_1364(pos_x, pos_y, pos_z, text, size, lifespan, vel_x, vel_y, Colors_COLOR_WHITE_red, Colors_COLOR_WHITE_green, Colors_COLOR_WHITE_blue, Colors_COLOR_WHITE_alpha) endfunction function createFText takes real pos_x, real pos_y, real pos_z, string text, real size returns integer return createFText_1361(pos_x, pos_y, pos_z, text, size, 0., Vectors_ZERO2_x, Vectors_ZERO2_y) endfunction function vec3_op_minus_2530 takes real this_x, real this_y, real this_z, real v_x, real v_y returns real set vec3_op_minus_return_x_1583 = this_x - v_x set vec3_op_minus_return_y_1585 = this_y - v_y set vec3_op_minus_return_z_1587 = this_z return vec3_op_minus_return_x_1583 endfunction function grantCoinsAndLumber takes nothing returns nothing local item itm_1 = GetManipulatedItem() local integer gold local integer iterator local integer p local integer receiver local texttag receiver_1 local texttag receiver_2 local integer iterator_1 local integer pd local integer receiver_3 local texttag receiver_4 local texttag receiver_5 if item_getTypeId(itm_1) == LumberAndCoinSystem_COIN_ID then set gold = item_getUserData(itm_1) call flashEffect_1873(UI_goldCredit, unit_getPos(GetManipulatingUnit()), unit_getPos_return_y) call printTimed("|cffFFCC00>> " + player_getNameColored_2260(unit_getOwner(GetManipulatingUnit())) + " picked up a coin!", 10.) set iterator = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator) set p = LLIterator_next(iterator) call player_addGold(PlayerData_p[p], gold) if UnitEntity_actor[PlayerData_builder[p]] != null and unit_isAlive(UnitEntity_actor[PlayerData_builder[p]]) then set receiver = createFText(vec3_op_minus_2530(dispatch_UnitEntity_Entity_UnitEntity_getPos(PlayerData_builder[p]), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, 16., 0.), vec3_op_minus_return_y_1585, vec3_op_minus_return_z_1587, "+" + int_toString(gold), 0.024 / 0.0023) call dispatch_FText_FText_FText_setDynamic(receiver, 0., .03, 3.) set receiver_1 = FText_tt[receiver] call texttag_setFadepoint(receiver_1, 2.) set receiver_2 = receiver_1 call texttag_setColor(receiver_2, 255, 220, 0, 255) call flashEffect(Abilities_resourceEffectTarget, dispatch_UnitEntity_Entity_UnitEntity_getPos(PlayerData_builder[p]), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z) endif endloop call LLIterator_close(iterator) endif if item_getTypeId(itm_1) == LumberAndCoinSystem_WOOD_ID then call flashEffect_1873(Objects_entBirthTarget, unit_getPos(GetManipulatingUnit()), unit_getPos_return_y) call printTimed("|cffFFCC00>> " + player_getNameColored_2260(unit_getOwner(GetManipulatingUnit())) + " picked up a lumber bundle!", 10.) call LinkedList_addLumber(PlayerData_allPlayers, LumberAndCoinSystem_WOOD_BOUNTY, true) set iterator_1 = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator_1) set pd = LLIterator_next(iterator_1) if UnitEntity_actor[PlayerData_builder[pd]] != null and unit_isAlive(UnitEntity_actor[PlayerData_builder[pd]]) then set receiver_3 = createFText(vec3_op_minus_2530(dispatch_UnitEntity_Entity_UnitEntity_getPos(PlayerData_builder[pd]), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, 16., 0.), vec3_op_minus_return_y_1585, vec3_op_minus_return_z_1587, "+" + int_toString(LumberAndCoinSystem_WOOD_BOUNTY), 0.024 / 0.0023) call dispatch_FText_FText_FText_setDynamic(receiver_3, 0., .03, 3.) set receiver_4 = FText_tt[receiver_3] call texttag_setFadepoint(receiver_4, 2.) set receiver_5 = receiver_4 call texttag_setColor(receiver_5, 0, 200, 80, 255) endif endloop call LLIterator_close(iterator_1) endif endfunction function onEvent_add_LumberAndCoinSystem_2214 takes integer this_1 returns nothing call grantCoinsAndLumber() endfunction function player_getGold takes player this_1 returns integer return player_getState(this_1, PLAYER_STATE_RESOURCE_GOLD) endfunction function player_setGold takes player this_1, integer wval returns nothing call player_setState(this_1, PLAYER_STATE_RESOURCE_GOLD, wval) endfunction function PlayerData_onDestroy takes integer this_1 returns nothing local integer goldSplit local integer iterator local integer pd local integer lumberSplit local integer iterator_1 local integer pd_1 local player receiver local player receiver_1 call dispatch_LinkedList_LinkedList_LinkedList_remove(PlayerData_allPlayers, this_1) if dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) > 0 then set goldSplit = real_round(player_getGold(PlayerData_p[this_1]) * 1. / dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) * 1.15) set iterator = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator) set pd = LLIterator_next(iterator) call player_addGold(PlayerData_p[pd], goldSplit) endloop call LLIterator_close(iterator) set lumberSplit = real_round(player_getLumber(PlayerData_p[this_1]) * 1. / dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) * 1.15) set iterator_1 = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator_1) set pd_1 = LLIterator_next(iterator_1) call player_addGold(PlayerData_p[pd_1], lumberSplit) endloop call LLIterator_close(iterator_1) endif if PlayerData_builder[this_1] != 0 then call cyc_Projectile_terminate(30, PlayerData_builder[this_1], 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif if PlayerData_select[this_1] != 0 then call cyc_Projectile_terminate(30, PlayerData_select[this_1], 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif set PlayerData_pDatas[player_getId(PlayerData_p[this_1])] = 0 set receiver = PlayerData_p[this_1] call player_setGold(receiver, 0) set receiver_1 = receiver call player_setLumber(receiver_1, 0) if not EndGame_gameOver then call printTimed(player_getNameColored_2260(PlayerData_p[this_1]) + " has left! Their resources have been distributed.", 10.) endif endfunction function dealloc_PlayerData takes integer obj returns nothing if PlayerData_typeId[obj] == 0 then call error("Double free: object of type PlayerData") else set PlayerData_nextFree[PlayerData_firstFree] = obj set PlayerData_firstFree = PlayerData_firstFree + 1 set PlayerData_typeId[obj] = 0 endif endfunction function destroyPlayerData takes integer this_1 returns nothing call PlayerData_onDestroy(this_1) call dealloc_PlayerData(this_1) endfunction function dispatch_PlayerData_destroyPlayerData takes integer this_1 returns nothing if PlayerData_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PlayerData.PlayerData") else call error("Called PlayerData.PlayerData on invalid object.") endif endif call destroyPlayerData(this_1) endfunction function onEvent_add_PlayerData takes integer this_1 returns nothing call dispatch_PlayerData_destroyPlayerData(PlayerData_pDatas[player_getId(GetTriggerPlayer())]) endfunction function alloc_Reinforcement 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] = 953 else call error("Out of memory: Could not create Reinforcement.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 953 endif return this_1 endfunction function Reinforcement_init takes integer this_1 returns nothing endfunction function construct_Reinforcement takes integer this_1, real pos_x, real pos_y, player owne, integer id_1, real angl_radians returns nothing call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, createUnit(owne, id_1, pos_x, pos_y, angl_radians), 0, 0, 0., 0., 0., 0.) call Reinforcement_init(this_1) call flashEffect_1873(Abilities_massTeleportTarget, pos_x, pos_y) call unit_setTimedLife(UnitEntity_actor[this_1], 60.) endfunction function new_Reinforcement takes real pos_x, real pos_y, player owne, integer id_1, real angl_radians returns integer local integer this_1 = alloc_Reinforcement() call construct_Reinforcement(this_1, pos_x, pos_y, owne, id_1, angl_radians) return this_1 endfunction function onReinforcements takes nothing returns nothing local integer wval = real_round(getElapsedGameTime() / 80. + 1.5) local player owner_1 = unit_getOwner(GetManipulatingUnit()) local integer toV = min_2(7, wval) local integer i = 0 local integer temp = toV - 1 local real angl_radians local integer toVal local integer i_1 local integer temp_1 local real angl_radians_1 local real tuple_temp local real tuple_temp_1 loop exitwhen i > temp set tuple_temp = real_asAngleDegrees(i * (360. / toV)) set angl_radians = tuple_temp call new_Reinforcement(vec2_polarOffset(Wave_middle_x, Wave_middle_y, angl_radians, 256.), vec2_polarOffset_return_y, owner_1, Reinforcements_ARCHER_ID, angl_radians) set i = i + 1 endloop if wval >= 5 then set toVal = min_2(7, wval - 4) set i_1 = 0 set temp_1 = toVal - 1 loop exitwhen i_1 > temp_1 set tuple_temp_1 = real_asAngleDegrees(-15. + i_1 * (360. / toVal)) set angl_radians_1 = tuple_temp_1 call new_Reinforcement(vec2_polarOffset(Wave_middle_x, Wave_middle_y, angl_radians_1, 256.), vec2_polarOffset_return_y, owner_1, Reinforcements_PRIEST_ID, angl_radians_1) set i_1 = i_1 + 1 endloop endif endfunction function onEvent_add_Reinforcements takes integer this_1 returns nothing if item_getTypeId(GetManipulatedItem()) == Reinforcements_ITEM_ID then call item_remove(GetManipulatedItem()) call onReinforcements() endif endfunction function onEvent_add_RevivalSystem takes integer this_1 returns nothing local integer reviver local real revPos_x local real revPos_y local string s local integer iterator local integer pd local integer iterator_1 local integer bff local real tuple_temp local real tuple_temp_1 if item_getTypeId(GetManipulatedItem()) == 1227894839 then set reviver = PlayerData_pDatas[player_getId(GetTriggerPlayer())] set tuple_temp = vec3_toVec2(dispatch_UnitEntity_Entity_UnitEntity_getPos(PlayerData_builder[reviver]), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z) set tuple_temp_1 = vec3_toVec2_return_y set revPos_x = tuple_temp set revPos_y = tuple_temp_1 set s = "" set iterator = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator) set pd = LLIterator_next(iterator) if not PlayerData_alive[pd] then set s = s + " " + player_getNameColored_2260(PlayerData_p[pd]) call unit_setPos(UnitEntity_actor[PlayerData_builder[pd]], vec2_polarOffset(revPos_x, revPos_y, real_asAngleRadians(GetRandomReal(0., 1.)), 64.), vec2_polarOffset_return_y) set iterator_1 = LinkedList_iterator(unit_getBuffs(UnitEntity_actor[PlayerData_builder[pd]])) loop exitwhen not LLIterator_hasNext(iterator_1) set bff = LLIterator_next(iterator_1) call dispatch_Buff_Buff_Buff_refresh(bff) endloop call LLIterator_close(iterator_1) call effect_destr(addEffect(Abilities_reviveNightElf, unit_getPos(UnitEntity_actor[PlayerData_builder[pd]]), unit_getPos_return_y)) call printTimedToPlayer("|cffFFCC00>>|r You have been revived!", 15., PlayerData_p[pd]) set PlayerData_alive[pd] = true endif endloop call LLIterator_close(iterator) if string_length(s) > 0 then set s = s + "." call printTimed("|cffFFCC00>>|r " + player_getNameColored_2260(GetTriggerPlayer()) + " |cff21C55Ahas revived the following players:|r " + s, 15.) endif endif endfunction function alloc_Tower 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] = 955 else call error("Out of memory: Could not create Tower.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 955 endif return this_1 endfunction function Tower_init takes integer this_1 returns nothing set Tower_deathListener[this_1] = 0 endfunction function alloc_EventListener_add_Tower_Tower 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] = 770 else call error("Out of memory: Could not create EventListener_add_Tower_Tower.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 770 endif return this_1 endfunction function construct_UnitEntity2 takes integer this_1, unit actor, real pos_x, real pos_y, real pos_z returns nothing call construct_Entity5(this_1, unit_getOwner(actor), pos_x, pos_y, pos_z, 0.) call UnitEntity_init(this_1) call cyc_Projectile_terminate(32, this_1, 0., 0., 0., null, actor, 0, 0, 0., 0., 0., 0.) endfunction function construct_Tower takes integer this_1, unit tower returns nothing local integer clVar local unit temp local playerunitevent temp_1 call construct_UnitEntity2(this_1, tower, unit_getPos3Real(tower), unit_getPos3Real_return_y, unit_getPos3Real_return_z) call Tower_init(this_1) set temp = UnitEntity_actor[this_1] set temp_1 = EVENT_PLAYER_UNIT_DEATH set clVar = alloc_EventListener_add_Tower_Tower() call construct_EventListener(clVar) set this_1507[clVar] = this_1 set Tower_deathListener[this_1] = EventListener_add_274(temp, temp_1, clVar) endfunction function new_Tower takes unit tower returns integer local integer this_1 = alloc_Tower() call construct_Tower(this_1, tower) return this_1 endfunction function alloc_Wall 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] = 965 else call error("Out of memory: Could not create Wall.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 965 endif return this_1 endfunction function Wall_init takes integer this_1 returns nothing endfunction function construct_Wall takes integer this_1, unit wall returns nothing call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, wall, 0, 0, 0., 0., 0., 0.) call Wall_init(this_1) endfunction function new_Wall takes unit wall returns integer local integer this_1 = alloc_Wall() call construct_Wall(this_1, wall) return this_1 endfunction function onEvent_add_Tower takes integer this_1 returns nothing local unit u_1 = GetConstructingStructure() local integer id_1 = unit_getTypeId(u_1) if id_1 == Tower_BASIC_TOWER_ID then call new_Tower(u_1) elseif id_1 == Tower_BASIC_WALL_ID or id_1 == Tower_STOPPER_QUICKBUILD_ID then call new_Wall(u_1) endif endfunction function onEvent_add_TowerBlockadeBuff_TowerBlockade takes integer this_1 returns nothing call cyc_unit_removeBuff(10, null, this_1500[this_1]) endfunction function alloc_CallbackSingle_doAfter_add_Tower 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] = 702 else call error("Out of memory: Could not create CallbackSingle_doAfter_add_Tower.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 702 endif return this_1 endfunction function checkTech takes unit u_1 returns nothing if unit_getTypeId(u_1) == 1747988563 or unit_getTypeId(u_1) == 1747988564 then call SetPlayerTechMaxAllowed(unit_getOwner(u_1), 1747989048, -1) endif endfunction function onEvent_add_Tower_2219 takes integer this_1 returns nothing local unit u_1 = GetTriggerUnit() local integer data_1 local integer clVar local integer instanceOfTemp local boolean andLeft call checkTech(u_1) set data_1 = unit_getEntity(u_1) if data_1 != 0 then set instanceOfTemp = Serializable_typeId[data_1] set andLeft = instanceOfTemp >= 955 and instanceOfTemp <= 961 else set andLeft = false endif if andLeft then set clVar = alloc_CallbackSingle_doAfter_add_Tower() call construct_CallbackSingle(clVar) set data_1167[clVar] = data_1 call doAfter(0.01, clVar) endif endfunction function onEvent_add_Tower_Tower takes integer this_1 returns nothing if not Entity_done[this_1507[this_1]] then call cyc_Projectile_terminate(30, this_1507[this_1], 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif endfunction function onEvent_add_Tower_Tower_2222 takes integer this_1 returns nothing if not Entity_done[this_1508[this_1]] then call cyc_Projectile_terminate(30, this_1508[this_1], 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif endfunction function alloc_CallbackSingle_doAfter_TownBell 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] = 700 else call error("Out of memory: Could not create CallbackSingle_doAfter_TownBell.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 700 endif return this_1 endfunction function alloc_ForGroupCallback_forUnitsOfPlayer_TownBell 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] = 802 else call error("Out of memory: Could not create ForGroupCallback_forUnitsOfPlayer_TownBell.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 802 endif return this_1 endfunction function forUnitsOfPlayer takes player p, integer c returns nothing call pushCallback(c) call GroupEnumUnitsOfPlayer(ClosureForGroups_DUMMY_GROUP, p, ClosureForGroups_filter) call popCallback() endfunction function onTownBell takes nothing returns nothing local integer clVar local integer clVar_1 local player temp local real temp_1 call dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(TownBell_snd) set TownBell_lastRinger = unit_getOwner(GetManipulatingUnit()) set temp = Player_players[8] set clVar = alloc_ForGroupCallback_forUnitsOfPlayer_TownBell() call forUnitsOfPlayer(temp, clVar) set temp_1 = TownBell_SPELL_DURATION set clVar_1 = alloc_CallbackSingle_doAfter_TownBell() call construct_CallbackSingle(clVar_1) call doAfter(temp_1, clVar_1) set TownBell_usages = TownBell_usages + 1 endfunction function onEvent_add_TownBell takes integer this_1 returns nothing if item_getTypeId(GetManipulatedItem()) == TownBell_TOWN_BELL_ITEM_ID then call item_remove(GetManipulatedItem()) call onTownBell() endif endfunction function TrooperTower_onUpgradeStart takes integer this_1 returns nothing local integer iterator = LinkedList_iterator(TrooperTower_troops[this_1]) local integer troop loop exitwhen not LLIterator_hasNext(iterator) set troop = LLIterator_next(iterator) call unit_setVertexColor(UnitEntity_actor[troop], Colors_COLOR_BLACK_red, Colors_COLOR_BLACK_green, Colors_COLOR_BLACK_blue, Colors_COLOR_BLACK_alpha) call unit_pause(UnitEntity_actor[troop]) endloop call LLIterator_close(iterator) endfunction function dispatch_TrooperTower_TrooperTower_TrooperTower_onUpgradeStart takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling TrooperTower.onUpgradeStart") else call error("Called TrooperTower.onUpgradeStart on invalid object.") endif endif call TrooperTower_onUpgradeStart(this_1) endfunction function onEvent_add_TrooperTower_TrooperTower takes integer this_1 returns nothing call dispatch_TrooperTower_TrooperTower_TrooperTower_onUpgradeStart(this_1509[this_1]) endfunction function TrooperTower_onUpgradeCancel takes integer this_1 returns nothing local integer iterator = LinkedList_iterator(TrooperTower_troops[this_1]) local integer troop loop exitwhen not LLIterator_hasNext(iterator) set troop = LLIterator_next(iterator) call unit_setVertexColor(UnitEntity_actor[troop], Colors_COLOR_WHITE_red, Colors_COLOR_WHITE_green, Colors_COLOR_WHITE_blue, Colors_COLOR_WHITE_alpha) call unit_unpause(UnitEntity_actor[troop]) call dispatch_UnitEntity_Entity_UnitEntity_setXY(troop, Entity_pos_x[troop], Entity_pos_y[troop], Entity_pos_z[troop]) endloop call LLIterator_close(iterator) endfunction function dispatch_TrooperTower_TrooperTower_TrooperTower_onUpgradeCancel takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling TrooperTower.onUpgradeCancel") else call error("Called TrooperTower.onUpgradeCancel on invalid object.") endif endif call TrooperTower_onUpgradeCancel(this_1) endfunction function onEvent_add_TrooperTower_TrooperTower_2225 takes integer this_1 returns nothing call dispatch_TrooperTower_TrooperTower_TrooperTower_onUpgradeCancel(this_1510[this_1]) endfunction function WarningBuff_onDeath takes integer this_1 returns nothing local unit u_1 local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local unit receiver_4 local unit receiver_5 local player owner_1 if not WarningBuff_dead[this_1] then set WarningBuff_dead[this_1] = true set receiver = createUnit(WarningBuff_originalOwner[this_1], unit_getTypeId(Buff_target[this_1]), unit_getPos(Buff_target[this_1]), unit_getPos_return_y, unit_getFacingAngle(Buff_target[this_1])) call unit_setXY(receiver, unit_getPos(Buff_target[this_1]), unit_getPos_return_y) set u_1 = receiver set receiver_1 = u_1 call unit_setOwner(receiver_1, Basics_DUMMY_PLAYER, false) set receiver_2 = receiver_1 call unit_addAbility(receiver_2, 1098282348) set receiver_3 = receiver_2 call unit_pause(receiver_3) set receiver_4 = receiver_3 call unit_hide(receiver_4) set receiver_5 = receiver_4 call unit_setTimeScale(receiver_5, 0.0001) set owner_1 = unit_getOwner(Buff_target[this_1]) set PlayerData_alive[PlayerData_pDatas[player_getId(owner_1)]] = false set PlayerData_deaths[PlayerData_pDatas[player_getId(owner_1)]] = PlayerData_deaths[PlayerData_pDatas[player_getId(owner_1)]] + 1 call printTimed("|cffFFCC00>>|r " + player_getNameColored_2260(owner_1) + " |cffCE2119has been killed!", 20.) endif endfunction function dispatch_WarningBuff_WarningBuff_WarningBuff_onDeath takes integer this_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling WarningBuff.onDeath") else call error("Called WarningBuff.onDeath on invalid object.") endif endif call WarningBuff_onDeath(this_1) endfunction function onEvent_add_WarningBuff_WarningBuff takes integer this_1 returns nothing if not Buff_done[this_1503[this_1]] then call dispatch_WarningBuff_WarningBuff_WarningBuff_onDeath(this_1503[this_1]) endif endfunction function dispatch_EventListener_ClosureEvents_EventListener_onEvent takes integer this_1 returns nothing if EventListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EventListener.onEvent") else call error("Called EventListener.onEvent on invalid object.") endif endif if EventListener_typeId[this_1] <= 762 then if EventListener_typeId[this_1] <= 756 then if EventListener_typeId[this_1] <= 753 then if EventListener_typeId[this_1] <= 751 then if EventListener_typeId[this_1] <= 750 then call onEvent_add_ArtilleryTower_ArtilleryTower(this_1) else call onEvent_add_BlockadeShip_TowerBlockade(this_1) endif elseif EventListener_typeId[this_1] <= 752 then call onEvent_add_Buff(this_1) else call onEvent_add_Buff_2204(this_1) endif elseif EventListener_typeId[this_1] <= 755 then if EventListener_typeId[this_1] <= 754 then call onEvent_add_Creep_Creep(this_1) else call onEvent_add_DamageEvent(this_1) endif else call onEvent_add_DamageEvent_2207(this_1) endif elseif EventListener_typeId[this_1] <= 759 then if EventListener_typeId[this_1] <= 758 then if EventListener_typeId[this_1] <= 757 then call onEvent_add_DebugInfo(this_1) else call onEvent_add_EndBoss_EndBoss(this_1) endif else call onEvent_add_Entity(this_1) endif elseif EventListener_typeId[this_1] <= 761 then if EventListener_typeId[this_1] <= 760 then call onEvent_add_Entity_2211(this_1) else call onEvent_add_Entity_2212(this_1) endif else call onEvent_add_LumberAndCoinSystem(this_1) endif elseif EventListener_typeId[this_1] <= 769 then if EventListener_typeId[this_1] <= 766 then if EventListener_typeId[this_1] <= 764 then if EventListener_typeId[this_1] <= 763 then call onEvent_add_LumberAndCoinSystem_2214(this_1) else call onEvent_add_PlayerData(this_1) endif elseif EventListener_typeId[this_1] <= 765 then call onEvent_add_Reinforcements(this_1) else call onEvent_add_RevivalSystem(this_1) endif elseif EventListener_typeId[this_1] <= 768 then if EventListener_typeId[this_1] <= 767 then call onEvent_add_Tower(this_1) else call onEvent_add_Tower_2219(this_1) endif else call onEvent_add_TowerBlockadeBuff_TowerBlockade(this_1) endif elseif EventListener_typeId[this_1] <= 772 then if EventListener_typeId[this_1] <= 771 then if EventListener_typeId[this_1] <= 770 then call onEvent_add_Tower_Tower(this_1) else call onEvent_add_Tower_Tower_2222(this_1) endif else call onEvent_add_TownBell(this_1) endif elseif EventListener_typeId[this_1] <= 774 then if EventListener_typeId[this_1] <= 773 then call onEvent_add_TrooperTower_TrooperTower(this_1) else call onEvent_add_TrooperTower_TrooperTower_2225(this_1) endif else call onEvent_add_WarningBuff_WarningBuff(this_1) endif 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_1 = 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_1 then call dispatch_EventListener_ClosureEvents_EventListener_onEvent(listener) endif set listener = nextListener endloop endif endif if EventListener_generalListenersFirsts[id_1] != 0 then set listener_1 = EventListener_generalListenersFirsts[id_1] loop exitwhen not (listener_1 != 0) set nextListener_1 = EventListener_next[listener_1] call dispatch_EventListener_ClosureEvents_EventListener_onEvent(listener_1) set listener_1 = nextListener_1 endloop endif endfunction function ThermoTower_removeFrostAbil takes nothing returns nothing local integer t = timer_getData(GetExpiredTimer()) call timer_release(GetExpiredTimer()) call unit_removeAbility(UnitEntity_actor[t], ThermoTower_ORB_ID) endfunction function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing call AddSpecialEffectLocBJ(GetRectCenter(GetPlayableMapRect()), "Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl") call KillUnit(gg_unit_h00E_0008) call KillUnit(gg_unit_h00E_0007) endfunction function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing call UnitPauseTimedLifeBJ(true, GetTriggerUnit()) endfunction function Trig_Untitled_Trigger_011_Actions takes nothing returns nothing call CameraSetupApplyForPlayer(true, gg_cam_Camera_001, Player(0), 0.) call CameraSetupApplyForPlayer(true, gg_cam_Camera_002, Player(0), 1.50) call CameraSetupApplyForPlayer(true, gg_cam_Camera_003, Player(0), 1.50) call CameraSetupApplyForPlayer(true, gg_cam_Camera_004, Player(0), 1.50) endfunction function Trig_Untitled_Trigger_012_Actions takes nothing returns nothing call CameraSetupApplyForPlayer(true, gg_cam_Camera_005, Player(0), 0.) endfunction function item_isVisible takes item this_1 returns boolean return IsItemVisible(this_1) endfunction function item_setVisible takes item this_1, boolean flag returns nothing call SetItemVisible(this_1, flag) endfunction function code__EnumItemsInRect_TerrainUtils takes nothing returns nothing if item_isVisible(GetEnumItem()) then set TerrainUtils_hiddenItems[TerrainUtils_hiddenItemsCount] = GetEnumItem() call item_setVisible(TerrainUtils_hiddenItems[TerrainUtils_hiddenItemsCount], false) set TerrainUtils_hiddenItemsCount = TerrainUtils_hiddenItemsCount + 1 endif endfunction function currentCallback takes nothing returns integer return ClosureForGroups_tempCallbacks[ClosureForGroups_tempCallbacksCount - 1] 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_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_1222 takes nothing returns nothing call EventListener_generalEventCallback() endfunction function code__addAction_nullTimer_ClosureEvents_1223 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] = 995 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] = 995 endif return this_1 endfunction function UnitIndex_init takes integer this_1 returns nothing endfunction function popUnit_2279 takes nothing returns nothing set UnitIndexer_tempUnitsCount = UnitIndexer_tempUnitsCount - 1 endfunction function pushUnit_2290 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_2290(whichUnit) call trigger_evaluate(UnitIndexer_onIndexTrigger) call popUnit_2279() endfunction function new_UnitIndex takes unit whichUnit returns integer local integer this_1 = alloc_UnitIndex() call construct_UnitIndex(this_1, whichUnit) return this_1 endfunction function unit_toUnitIndex takes unit this_1 returns integer local integer instance_1 = unit_getUserData(this_1) if instance_1 == 0 then set instance_1 = new_UnitIndex(this_1) endif return instance_1 endfunction function code__onEnter_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_toUnitIndex(getEnterLeaveUnit()) endif endfunction function UnitIndex_onDestroy takes integer this_1 returns nothing call pushUnit_2290(UnitIndex__unit[this_1]) call trigger_evaluate(UnitIndexer_onDeindexTrigger) call popUnit_2279() call unit_setUserData(UnitIndex__unit[this_1], 0) endfunction function dealloc_UnitIndex takes integer obj returns nothing if UnitIndex_typeId[obj] == 0 then call error("Double free: object of type UnitIndex") else set UnitIndex_nextFree[UnitIndex_firstFree] = obj set UnitIndex_firstFree = UnitIndex_firstFree + 1 set UnitIndex_typeId[obj] = 0 endif endfunction function destroyUnitIndex takes integer this_1 returns nothing call UnitIndex_onDestroy(this_1) call dealloc_UnitIndex(this_1) endfunction function dispatch_UnitIndex_destroyUnitIndex takes integer this_1 returns nothing if UnitIndex_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling UnitIndex.UnitIndex") else call error("Called UnitIndex.UnitIndex on invalid object.") endif endif call destroyUnitIndex(this_1) endfunction function unit_deindex takes unit this_1 returns boolean if unit_getUserData(this_1) == 0 then return false else call dispatch_UnitIndex_destroyUnitIndex(unit_toUnitIndex(this_1)) return true endif endfunction function code__onLeave_UnitIndexer takes nothing returns nothing if shouldIndex(getEnterLeaveUnit()) then call unit_deindex(getEnterLeaveUnit()) endif endfunction function getIndexingUnit takes nothing returns unit return UnitIndexer_tempUnits[UnitIndexer_tempUnitsCount - 1] endfunction function Table_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] <= 985 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_nextFree[OnCastListener_firstFree] = obj 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_2283(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_1 returns nothing local integer listener local integer t if id_1 > 0 then if EventListener_unitListenersFirsts[id_1] != 0 then call Log_trace("unregister unit has listeners. startid: " + int_toString(id_1)) set listener = EventListener_unitListenersFirsts[id_1] set EventListener_unitListenersFirsts[id_1] = 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 code__onUnitDeindex_EntityManagement takes nothing returns nothing local integer e = unit_getEntity(getIndexingUnit()) if e != 0 then call cyc_Projectile_terminate(30, e, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif 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 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 alloc_CallbackSingle_doAfter_onCast_Selector_Selector 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] = 705 else call error("Out of memory: Could not create CallbackSingle_doAfter_onCast_Selector_Selector.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 705 endif return this_1 endfunction function alloc_Builder 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] = 935 else call error("Out of memory: Could not create Builder.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 935 endif return this_1 endfunction function Builder_init takes integer this_1 returns nothing endfunction function Entity_DupletListModule_addToInactive takes integer this_1 returns nothing set Entity_DupletListModule_inactiveSize = Entity_DupletListModule_inactiveSize + 1 if Entity_DupletListModule_inactiveSize == 1 then set Entity_DupletListModule_firstInactive = this_1 set Entity_DupletListModule_prev[this_1] = 0 else set Entity_DupletListModule_prev[this_1] = Entity_DupletListModule_lastInactive set Entity_DupletListModule_next[Entity_DupletListModule_lastInactive] = this_1 set Entity_DupletListModule_prev[Entity_DupletListModule_firstInactive] = this_1 endif set Entity_DupletListModule_next[this_1] = 0 set Entity_DupletListModule_lastInactive = this_1 endfunction function dispatch_Entity_Entity_Entity_DupletListModule_addToInactive 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.addToInactive") else call error("Called Entity.addToInactive on invalid object.") endif endif call Entity_DupletListModule_addToInactive(this_1) endfunction function Entity_DupletListModule_deactivate takes integer this_1 returns nothing if Entity_DupletListModule_active[this_1] then set Entity_DupletListModule_active[this_1] = false call dispatch_Entity_Entity_Entity_DupletListModule_removeFromActive(this_1) call dispatch_Entity_Entity_Entity_DupletListModule_addToInactive(this_1) endif endfunction function dispatch_Entity_Entity_Entity_DupletListModule_deactivate 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.deactivate") else call error("Called Entity.deactivate on invalid object.") endif endif call Entity_DupletListModule_deactivate(this_1) endfunction function Entity_setXY takes integer this_1, real pos_x, real pos_y, real pos_z returns nothing local real tuple_temp = pos_x local real tuple_temp_1 = pos_y local real tuple_temp_2 = pos_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 endfunction function Fx2Entity_setXY takes integer this_1, real tpos_x, real tpos_y, real tpos_z returns nothing local real tuple_temp = tpos_x local real tuple_temp_1 = tpos_y local real tuple_temp_2 = tpos_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 call effect_setPos(Fx2_eff[Fx2Entity_fx[this_1]], tpos_x, tpos_y, tpos_z) endfunction function item_setPos takes item this_1, real pos_x, real pos_y returns nothing call SetItemPosition(this_1, pos_x, pos_y) endfunction function ItemEntity_setXY takes integer this_1, real tpos_x, real tpos_y, real tpos_z returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if vec3_inPlayable(tpos_x, tpos_y, tpos_z) then set tuple_temp = tpos_x set tuple_temp_1 = tpos_y set tuple_temp_2 = tpos_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 call item_setPos(ItemEntity_actor[this_1], vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) else call cyc_Projectile_terminate(30, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif endfunction function dispatch_Entity_Entity_Entity_setXY takes integer this_1, real pos_x, real pos_y, real pos_z returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.setXY") else call error("Called Entity.setXY on invalid object.") endif endif if Serializable_typeId[this_1] <= 931 then if Serializable_typeId[this_1] <= 930 then if Serializable_typeId[this_1] <= 917 then call Entity_setXY(this_1, pos_x, pos_y, pos_z) else call Fx2Entity_setXY(this_1, pos_x, pos_y, pos_z) endif else call ItemEntity_setXY(this_1, pos_x, pos_y, pos_z) endif elseif Serializable_typeId[this_1] <= 932 then call Entity_setXY(this_1, pos_x, pos_y, pos_z) else call UnitEntity_setXY(this_1, pos_x, pos_y, pos_z) endif endfunction function vec3_op_mult takes real this_x, real this_y, real this_z, real factor returns real set vec3_op_mult_return_x = this_x * factor set vec3_op_mult_return_y = this_y * factor set vec3_op_mult_return_z = this_z * factor return vec3_op_mult_return_x endfunction function Entity_update takes integer this_1 returns nothing local real tz local real cond_result if Entity_sleeps[this_1] and ( not Entity_flying[this_1]) and vec3_lengthSquared(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1]) < 1.5 then call dispatch_Entity_Entity_Entity_DupletListModule_deactivate(this_1) else if Frentity_config_DYNAMIC_Z then set cond_result = vec3_getHeightMap(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) else set cond_result = 0. endif set tz = cond_result if Entity_pos_z[this_1] >= tz then set Entity_vel_z[this_1] = Entity_vel_z[this_1] + Entity_gravity[this_1] call dispatch_Entity_Entity_Entity_setFlying(this_1, true) else set Entity_pos_z[this_1] = tz - 0.01 call dispatch_Entity_Entity_Entity_setFlying(this_1, false) endif call dispatch_Entity_Entity_Entity_setXY(this_1, vec3_op_plus(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], vec3_op_mult(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1], Entity_speedFactor[this_1]), vec3_op_mult_return_y, vec3_op_mult_return_z), vec3_op_plus_return_y, vec3_op_plus_return_z) endif endfunction function unit_getPos3with takes unit this_1, real z returns real set unit_getPos3with_return_x = unit_getX(this_1) set unit_getPos3with_return_y = unit_getY(this_1) set unit_getPos3with_return_z = z return unit_getPos3with_return_x endfunction function UnitEntity_update takes integer this_1 returns nothing local real tuple_temp = unit_getPos3with(UnitEntity_actor[this_1], Entity_pos_z[this_1]) local real tuple_temp_1 = unit_getPos3with_return_y local real tuple_temp_2 = unit_getPos3with_return_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 call Entity_update(this_1) endfunction function createUnit_1372 takes player p, integer unitId, real pos_x, real pos_y, real pos_z, real facing_radians returns unit local unit u_1 = CreateUnit(p, unitId, pos_x, pos_y, angle_degrees(facing_radians)) call unit_setFlyHeight(u_1, pos_z, 0.) return u_1 endfunction function dispatch_WarningBuff_WarningBuff_WarningBuff_apply takes integer this_1, unit target_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling WarningBuff.apply") else call error("Called WarningBuff.apply on invalid object.") endif endif call cyc_Projectile_terminate(5, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endfunction function alloc_WarningBuff takes nothing returns integer local integer this_1 if Buff_firstFree == 0 then if Buff_maxIndex < JASS_MAX_ARRAY_SIZE then set Buff_maxIndex = Buff_maxIndex + 1 set this_1 = Buff_maxIndex set Buff_typeId[this_1] = 651 else call error("Out of memory: Could not create WarningBuff.") set this_1 = 0 endif else set Buff_firstFree = Buff_firstFree - 1 set this_1 = Buff_nextFree[Buff_firstFree] set Buff_typeId[this_1] = 651 endif return this_1 endfunction function WarningBuff_init takes integer this_1 returns nothing set WarningBuff_dead[this_1] = false endfunction function construct_WarningBuff takes integer this_1 returns nothing call construct_NormalBuff(this_1, 9999., WarningBuff_warningBuffAbil_abilId, WarningBuff_warningBuffAbil_buffId) call WarningBuff_init(this_1) set WarningBuff_startedTime[this_1] = GameTimer_currentTime set WarningBuff_lastWarning[this_1] = GameTimer_currentTime set WarningBuff_lastSelect[this_1] = GameTimer_currentTime endfunction function new_WarningBuff takes nothing returns integer local integer this_1 = alloc_WarningBuff() call construct_WarningBuff(this_1) return this_1 endfunction function construct_Builder takes integer this_1, real pos_x, real pos_y, real pos_z, integer owner_1, integer id_1 returns nothing local unit receiver local unit receiver_1 local unit receiver_2 call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, createUnit_1372(PlayerData_p[owner_1], id_1, pos_x, pos_y, pos_z, 0.), 0, 0, 0., 0., 0., 0.) call Builder_init(this_1) set receiver = UnitEntity_actor[this_1] call unit_addAbility(receiver, Basics_GHOST_VIS_ID) set receiver_1 = receiver call unit_addAbility(receiver_1, 1095331446) set receiver_2 = receiver_1 call unit_addAbility(receiver_2, 1097364080) if id_1 == Selector_FAT_ID then call unit_setTimeScale(UnitEntity_actor[this_1], 0.25) endif call player_panCamToTimed(PlayerData_p[owner_1], UnitEntity_actor[this_1], 0.) call unit_issueImmediateOrder(UnitEntity_actor[this_1], "repairon") call player_selectSingle(PlayerData_p[owner_1], UnitEntity_actor[this_1]) call dispatch_WarningBuff_WarningBuff_WarningBuff_apply(new_WarningBuff(), UnitEntity_actor[this_1]) call UnitEntity_update(this_1) call unit_setXYZReal(UnitEntity_actor[this_1], pos_x, pos_y, pos_z) endfunction function new_Builder takes real pos_x, real pos_y, real pos_z, integer owner_1, integer id_1 returns integer local integer this_1 = alloc_Builder() call construct_Builder(this_1, pos_x, pos_y, pos_z, owner_1, id_1) return this_1 endfunction function player_getName takes player this_1 returns string return player_getName_2258(this_1, false) endfunction function string_toLowerCase takes string this_1 returns string return StringCase(this_1, false) endfunction function unit_addItemById takes unit this_1, integer itemId returns item return UnitAddItemById(this_1, itemId) endfunction function fireEx_onCast_Selector_Selector takes integer this_1, integer id_1 returns nothing local integer pd = PlayerData_pDatas[player_getId(owner[this_1])] local integer temp = id_1 local effect eff_1 local integer clVar if temp == Selector_FAT_SPELL_ID then set PlayerData_builder[pd] = new_Builder(unit_getPos3Zero(UnitEntity_actor[this_1502[this_1]]), unit_getPos3Zero_return_y, unit_getPos3Zero_return_z, pd, Selector_FAT_ID) call unit_addItemById(UnitEntity_actor[PlayerData_builder[pd]], Selector_PUDDING_ID) if string_toLowerCase(player_getName(owner[this_1])) == "cokemonkey11" or string_toLowerCase(player_getName(owner[this_1])) == "waterknight" then set eff_1 = addEffect_928(Abilities_plagueCloudCaster, dispatch_UnitEntity_Entity_UnitEntity_getPos(PlayerData_builder[pd]), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z) set clVar = alloc_CallbackSingle_doAfter_onCast_Selector_Selector() call construct_CallbackSingle(clVar) set eff_1184[clVar] = eff_1 call doAfter(5., clVar) endif elseif temp == Selector_SLIM_SPELL_ID then set PlayerData_builder[pd] = new_Builder(unit_getPos3Zero(UnitEntity_actor[this_1502[this_1]]), unit_getPos3Zero_return_y, unit_getPos3Zero_return_z, pd, Selector_SLIM_ID) call unit_addItemById(UnitEntity_actor[PlayerData_builder[pd]], Selector_ENERGY_ID) elseif temp == Selector_ELVEN_SPELL_ID then set PlayerData_builder[pd] = new_Builder(unit_getPos3Zero(UnitEntity_actor[this_1502[this_1]]), unit_getPos3Zero_return_y, unit_getPos3Zero_return_z, pd, Selector_ELVEN_ID) call unit_addItemById(UnitEntity_actor[PlayerData_builder[pd]], Selector_ROCK_ID) endif call unit_addItemById(UnitEntity_actor[PlayerData_builder[pd]], Rocket_ROCKET_ITEM_ID) call cyc_Projectile_terminate(30, this_1502[this_1], 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endfunction function dispatch_OnCast_ClosureEvents_OnCast_fireEx takes integer this_1, integer id_1 returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnCast.fireEx") else call error("Called OnCast.fireEx on invalid object.") endif endif call fireEx_onCast_Selector_Selector(this_1, id_1) 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 alloc_Rocket 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] = 926 else call error("Out of memory: Could not create Rocket.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 926 endif return this_1 endfunction function Rocket_init takes integer this_1 returns nothing endfunction function construct_Rocket takes integer this_1, real startPos_x, real startPos_y, real startPos_z, real targetPos_x, real targetPos_y returns nothing call construct_PhysicsProjectile(this_1, startPos_x, startPos_y, startPos_z, 16., Basics_DUMMY_PLAYER, 0., "Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl", 0) call Rocket_init(this_1) call PingMinimapForForce(GetPlayersAll(), startPos_x, startPos_y, 5.) call dispatch_Projectile_Projectile_Projectile_setXYAngle(this_1, vec3_angleTo2d(startPos_x, startPos_y, startPos_z, targetPos_x, targetPos_y)) call dispatch_Projectile_Projectile_Projectile_setSpeed(this_1, GetRandomReal(5., 7.)) set Entity_vel_z[this_1] = GetRandomReal(15., 16.) endfunction function new_Rocket takes real startPos_x, real startPos_y, real startPos_z, real targetPos_x, real targetPos_y returns integer local integer this_1 = alloc_Rocket() call construct_Rocket(this_1, startPos_x, startPos_y, startPos_z, targetPos_x, targetPos_y) return this_1 endfunction function fireEx_onPointCast_Rocket takes integer this_1, unit caster, real target_x_1, real target_y_1 returns nothing call new_Rocket(vec3_op_plus(unit_getPos3Real(caster), unit_getPos3Real_return_y, unit_getPos3Real_return_z, 0., 0., 90.), vec3_op_plus_return_y, vec3_op_plus_return_z, target_x_1, target_y_1) endfunction function dispatch_OnPointCast_ClosureEvents_OnPointCast_fireEx takes integer this_1, unit caster, real target_x_1, real target_y_1 returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnPointCast.fireEx") else call error("Called OnPointCast.fireEx on invalid object.") endif endif call fireEx_onPointCast_Rocket(this_1, caster, target_x_1, target_y_1) 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_ShieldKitBuff_ShieldKit_ShieldKitBuff_apply takes integer this_1, unit ue returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ShieldKitBuff.apply") else call error("Called ShieldKitBuff.apply on invalid object.") endif endif call cyc_Projectile_terminate(6, this_1, 0., 0., 0., null, ue, 0, 0, 0., 0., 0., 0.) endfunction function alloc_ShieldKitBuff takes nothing returns integer local integer this_1 if Buff_firstFree == 0 then if Buff_maxIndex < JASS_MAX_ARRAY_SIZE then set Buff_maxIndex = Buff_maxIndex + 1 set this_1 = Buff_maxIndex set Buff_typeId[this_1] = 648 else call error("Out of memory: Could not create ShieldKitBuff.") set this_1 = 0 endif else set Buff_firstFree = Buff_firstFree - 1 set this_1 = Buff_nextFree[Buff_firstFree] set Buff_typeId[this_1] = 648 endif return this_1 endfunction function ShieldKitBuff_init takes integer this_1 returns nothing endfunction function ShieldBuff_init takes integer this_1 returns nothing endfunction function construct_ShieldBuff takes integer this_1, real dur, integer buffData_abilId, integer buffData_buffId, real amount returns nothing call construct_NormalBuff(this_1, dur, buffData_abilId, buffData_buffId) call ShieldBuff_init(this_1) set ShieldBuff_blockAmount[this_1] = amount endfunction function construct_ShieldKitBuff takes integer this_1, real amount returns nothing call construct_ShieldBuff(this_1, 90., ShieldKit_buffAbil_abilId, ShieldKit_buffAbil_buffId, amount) call ShieldKitBuff_init(this_1) endfunction function new_ShieldKitBuff takes real amount returns integer local integer this_1 = alloc_ShieldKitBuff() call construct_ShieldKitBuff(this_1, amount) return this_1 endfunction function fireEx_onTargetCast_ShieldKit takes integer this_1, unit caster, unit target_1 returns nothing call dispatch_ShieldKitBuff_ShieldKit_ShieldKitBuff_apply(new_ShieldKitBuff(200. + getElapsedGameTime() * 2.), target_1) endfunction function alloc_CallbackSingle_doAfter_onTargetCast_SuperCharge 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] = 706 else call error("Out of memory: Could not create CallbackSingle_doAfter_onTargetCast_SuperCharge.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 706 endif return this_1 endfunction function unit_setAbilityLevel takes unit this_1, integer abilId, integer lvl returns nothing call SetUnitAbilityLevel(this_1, abilId, lvl) endfunction function fireEx_onTargetCast_SuperCharge takes integer this_1, unit caster, unit target_1 returns nothing local integer clVar call unit_setAbilityLevel(target_1, SuperCharge_REPAIR_ID, 2) call flashEffect_1873(Abilities_manaFlareBoltImpact, unit_getPos(target_1), unit_getPos_return_y) set clVar = alloc_CallbackSingle_doAfter_onTargetCast_SuperCharge() call construct_CallbackSingle(clVar) set target[clVar] = target_1 call doAfter(15., clVar) endfunction function dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx takes integer this_1, unit caster, unit target_1 returns nothing if OnCastListener_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling OnUnitCast.fireEx") else call error("Called OnUnitCast.fireEx on invalid object.") endif endif if OnCastListener_typeId[this_1] <= 885 then call fireEx_onTargetCast_ShieldKit(this_1, caster, target_1) else call fireEx_onTargetCast_SuperCharge(this_1, caster, target_1) endif endfunction function OnUnitCast_fire takes integer this_1, unit caster returns nothing call dispatch_OnUnitCast_ClosureEvents_OnUnitCast_fireEx(this_1, caster, GetSpellTargetUnit()) endfunction function alloc_CallbackSingle_nullTimer_onCast_ArtilleryTower_ArtilleryTower 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] = 715 else call error("Out of memory: Could not create CallbackSingle_nullTimer_onCast_ArtilleryTower_ArtilleryTower.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 715 endif return this_1 endfunction function alloc_ArtilleryMissile 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] = 922 else call error("Out of memory: Could not create ArtilleryMissile.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 922 endif return this_1 endfunction function ArtilleryMissile_init takes integer this_1 returns nothing endfunction function Projectile_getSpeed takes integer this_1 returns real return Projectile_speed[this_1] endfunction function dispatch_Projectile_Projectile_Projectile_getSpeed takes integer this_1 returns real local real Projectile_Projectile_getSpeed_result if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.getSpeed") else call error("Called Projectile.getSpeed on invalid object.") endif endif set Projectile_Projectile_getSpeed_result = Projectile_getSpeed(this_1) return Projectile_Projectile_getSpeed_result endfunction function construct_ArtilleryMissile takes integer this_1, real pos_x, real pos_y, real pos_z, real radius, player owner_1, real targetangle_radians, real damage returns nothing call construct_Projectile(this_1, pos_x, pos_y, pos_z, radius, owner_1, targetangle_radians, Abilities_cannonTowerMissile) call ArtilleryMissile_init(this_1) call dispatch_Projectile_Projectile_Projectile_setSpeed(this_1, ArtilleryTower_MISSILE_SPEED + GetRandomReal(-10., 6.)) call dispatch_Projectile_Projectile_Projectile_setZAngle(this_1, real_asAngleDegrees(-45.)) set Entity_vel_z[this_1] = - dispatch_Projectile_Projectile_Projectile_getSpeed(this_1) set ArtilleryMissile_damage[this_1] = damage endfunction function new_ArtilleryMissile takes real pos_x, real pos_y, real pos_z, real radius, player owner_1, real targetangle_radians, real damage returns integer local integer this_1 = alloc_ArtilleryMissile() call construct_ArtilleryMissile(this_1, pos_x, pos_y, pos_z, radius, owner_1, targetangle_radians, damage) return this_1 endfunction function fire_onCast_ArtilleryTower_ArtilleryTower takes integer this_1, unit id_1 returns nothing local integer clVar local real a_radians local integer i local integer temp local real startPos_x local real startPos_y local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if vec3_distanceTo2d_2519(Entity_pos_x[this_1505[this_1]], Entity_pos_y[this_1505[this_1]], Entity_pos_z[this_1505[this_1]], EventData_getSpellTargetPos(), EventData_getSpellTargetPos_return_y) > 2950. then set clVar = alloc_CallbackSingle_nullTimer_onCast_ArtilleryTower_ArtilleryTower() call construct_CallbackSingle(clVar) set this_1506[clVar] = this_1505[this_1] call nullTimer(clVar) endif set tuple_temp = vec3_angleTo2d(Entity_pos_x[this_1505[this_1]], Entity_pos_y[this_1505[this_1]], Entity_pos_z[this_1505[this_1]], EventData_getSpellTargetPos(), EventData_getSpellTargetPos_return_y) set a_radians = tuple_temp set i = 0 set temp = 3 + ArtilleryTower_level[this_1505[this_1]] * 3 loop exitwhen i > temp set tuple_temp_1 = vec2_op_plus(EventData_getSpellTargetPos(), EventData_getSpellTargetPos_return_y, GetRandomReal( - 200., 200.), GetRandomReal( - 200., 200.)) set tuple_temp_2 = vec2_op_plus_return_y set startPos_x = tuple_temp_1 set startPos_y = tuple_temp_2 call new_ArtilleryMissile(vec2_withZ(vec2_polarOffset(startPos_x, startPos_y, a_radians, -1000.), vec2_polarOffset_return_y, 1000.), vec2_withZ_return_y, vec2_withZ_return_z, 50. + ArtilleryTower_level[this_1505[this_1]] * 50, Entity_owner[this_1505[this_1]], a_radians, 250. + ArtilleryTower_level[this_1505[this_1]] * 225) set i = i + 1 endloop endfunction function fire_onCast_Destroy takes integer this_1, unit caster returns nothing call unit_kill(caster) call flashEffect_1873(Abilities_charmTarget, unit_getPos(caster), unit_getPos_return_y) 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] <= 881 then if OnCastListener_typeId[this_1] <= 880 then if OnCastListener_typeId[this_1] <= 879 then call OnCast_fire(this_1, caster) else call fire_onCast_ArtilleryTower_ArtilleryTower(this_1, caster) endif else call fire_onCast_Destroy(this_1, caster) endif elseif OnCastListener_typeId[this_1] <= 883 then call OnPointCast_fire(this_1, caster) 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_1 returns integer return GetUnitAbilityLevel(this_1, id_1) endfunction function code__registerPlayerUnitEvent_nullTimer_OnUnitEnterLeave takes nothing returns nothing local unit leavingUnit = GetTriggerUnit() if unit_getAbilityLevel(leavingUnit, OnUnitEnterLeave_ABILITY_ID) == 0 and GetIssuedOrderId() == OrderIds_undefend then call pushUnit(leavingUnit) call trigger_execute(OnUnitEnterLeave_eventTrigger) call popUnit() endif endfunction function 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_1 returns nothing call MultiboardSetColumnCount(this_1, count_1) 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_1 returns nothing call MultiboardSetRowCount(this_1, count_1) 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 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 multiboarditem_setIcon takes multiboarditem this_1, string iconFileName returns nothing local string v local string cond_result if iconFileName == null then set cond_result = "" else set cond_result = iconFileName endif set v = cond_result call MultiboardSetItemIcon(this_1, v) endfunction function multiboarditem_setStyle takes multiboarditem this_1, boolean showValue, boolean showIcon returns nothing call MultiboardSetItemStyle(this_1, showValue, showIcon) endfunction function update takes nothing returns nothing local integer i local integer iterator local integer pd local multiboarditem receiver local multiboarditem receiver_1 local multiboarditem receiver_2 local multiboarditem receiver_3 local multiboarditem receiver_4 local multiboarditem receiver_5 local multiboarditem receiver_6 local multiboarditem receiver_7 local multiboarditem receiver_8 local multiboarditem receiver_9 local multiboarditem receiver_10 call multiboard_setRowCount(MultiboardSystem_mboard, dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers)) call multiboard_setColumnCount(MultiboardSystem_mboard, 4) call multiboard_setTitle(MultiboardSystem_mboard, "Forest Defense") set i = 0 set iterator = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator) set pd = LLIterator_next(iterator) set receiver = multiboard_getItem(MultiboardSystem_mboard, i, 0) call multiboarditem_setStyle(receiver, true, false) set receiver_1 = receiver call multiboarditem_setWidth(receiver_1, 0.05) if PlayerData_alive[pd] then call multiboarditem_setValue(multiboard_getItem(MultiboardSystem_mboard, i, 0), player_getNameColored_2260(PlayerData_p[pd])) else call multiboarditem_setValue(multiboard_getItem(MultiboardSystem_mboard, i, 0), "|cff636363†" + player_getName(PlayerData_p[pd]) + "|r") endif set receiver_2 = multiboard_getItem(MultiboardSystem_mboard, i, 1) call multiboarditem_setValue(receiver_2, int_toString(player_getGold(PlayerData_p[pd]))) set receiver_3 = receiver_2 call multiboarditem_setIcon(receiver_3, "UI\\Feedback\\Resources\\ResourceGold.blp") set receiver_4 = receiver_3 call multiboarditem_setWidth(receiver_4, 0.035) set receiver_5 = multiboard_getItem(MultiboardSystem_mboard, i, 2) call multiboarditem_setValue(receiver_5, int_toString(player_getLumber(PlayerData_p[pd]))) set receiver_6 = receiver_5 call multiboarditem_setIcon(receiver_6, "UI\\Feedback\\Resources\\ResourceLumber.blp") set receiver_7 = receiver_6 call multiboarditem_setWidth(receiver_7, 0.025) set receiver_8 = multiboard_getItem(MultiboardSystem_mboard, i, 3) call multiboarditem_setValue(receiver_8, int_toString(PlayerData_kills[pd])) set receiver_9 = receiver_8 call multiboarditem_setIcon(receiver_9, "ReplaceableTextures\\CommandButtons\\BTNSacrifice.blp") set receiver_10 = receiver_9 call multiboarditem_setWidth(receiver_10, 0.035) set i = i + 1 endloop call LLIterator_close(iterator) endfunction function code__startPeriodic_MultiboardSystem takes nothing returns nothing call update() endfunction function unit_issueImmediateOrderById takes unit this_1, integer id_1 returns boolean return IssueImmediateOrderById(this_1, id_1) endfunction function call_doAfter_BossFive_BossFive takes integer this_1 returns boolean return unit_issueImmediateOrderById(UnitEntity_actor[this_1493[this_1]], OrderIds_locustswarm) endfunction function unit_issuePointOrderById takes unit this_1, integer id_1, real target_x_1, real target_y_1 returns boolean return IssuePointOrderById(this_1, id_1, target_x_1, target_y_1) endfunction function call_doAfter_BossFive_BossFive_1150 takes integer this_1 returns boolean return unit_issuePointOrderById(UnitEntity_actor[this_1494[this_1]], OrderIds_attack, target_x_1456[this_1], target_y_1458[this_1]) endfunction function call_doAfter_Builder takes integer this_1 returns nothing call effect_destr(eff[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_1153 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x + 50 endfunction function call_doAfter_ClosureTimers_1154 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x * 2 endfunction function call_doAfter_ClosureTimers_1155 takes integer this_1 returns nothing set ClosureTimers_x = ClosureTimers_x / 2 call int_assertEquals(ClosureTimers_x, 250) endfunction function unit_issuePointOrder takes unit this_1, string order, real target_x_1, real target_y_1 returns boolean return IssuePointOrder(this_1, order, target_x_1, target_y_1) endfunction function call_doAfter_Creep_Creep takes integer this_1 returns nothing call unit_issuePointOrder(UnitEntity_actor[this_1486[this_1]], "attack", target_x[this_1], target_y[this_1]) endfunction function call_doAfter_Creep_Creep_1157 takes integer this_1 returns nothing if itm[this_1] != null and GetWidgetLife(itm[this_1]) > .405 then call item_remove(itm[this_1]) endif endfunction function call_doAfter_DummyRecycler_DummyRecycler takes integer this_1 returns nothing call DummyRecycler_recycle(u[this_1]) endfunction function call_doAfter_EndBoss takes integer this_1 returns nothing local integer iterator = LinkedList_iterator(PlayerData_allPlayers) local integer pd loop exitwhen not LLIterator_hasNext(iterator) set pd = LLIterator_next(iterator) call CustomVictoryBJ(PlayerData_p[pd], true, false) endloop call LLIterator_close(iterator) endfunction function alloc_ForGroupCallback_forUnitsInRange_EndBoss_EndBoss 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] = 797 else call error("Out of memory: Could not create ForGroupCallback_forUnitsInRange_EndBoss_EndBoss.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 797 endif return this_1 endfunction function EndBoss_tryCastTowerBlockade takes integer this_1 returns nothing local real tuple_temp = vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) local real tuple_temp_1 = vec3_toVec2_return_y local real temp_x = tuple_temp local real temp_y = tuple_temp_1 local integer clVar = alloc_ForGroupCallback_forUnitsInRange_EndBoss_EndBoss() set this_1499[clVar] = this_1 call forUnitsInRange(temp_x, temp_y, 1024., clVar) endfunction function dispatch_EndBoss_EndBoss_EndBoss_tryCastTowerBlockade takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBoss.tryCastTowerBlockade") else call error("Called EndBoss.tryCastTowerBlockade on invalid object.") endif endif call EndBoss_tryCastTowerBlockade(this_1) endfunction function unit_unpauseEx takes unit this_1 returns nothing call BlzPauseUnitEx(this_1, false) endfunction function call_doAfter_EndBoss_EndBoss takes integer this_1 returns nothing local unit receiver local unit receiver_1 set EndBoss_blockadeCount[this_1497[this_1]] = GetRandomInt(1, 2) set receiver = UnitEntity_actor[this_1497[this_1]] call unit_unpauseEx(receiver) set receiver_1 = receiver call unit_setTimeScale(receiver_1, 1.) call new_TextTagEntity(dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1497[this_1]), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, GetRandomReal(-1., 1.), 0., GetRandomReal(9., 12.), "Tower Blockade!", 12., 1., 196, 163, 17, 255) call dispatch_EndBoss_EndBoss_EndBoss_tryCastTowerBlockade(this_1497[this_1]) endfunction function FinalBossSummoning_addSummoner takes integer this_1, integer summoner returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(FinalBossSummoning_summoners[this_1], summoner) endfunction function dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_addSummoner takes integer this_1, integer summoner returns nothing if FinalBossSummoning_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling FinalBossSummoning.addSummoner") else call error("Called FinalBossSummoning.addSummoner on invalid object.") endif endif call FinalBossSummoning_addSummoner(this_1, summoner) endfunction function alloc_DestroyerSummoner 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] = 944 else call error("Out of memory: Could not create DestroyerSummoner.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 944 endif return this_1 endfunction function DestroyerSummoner_init takes integer this_1 returns nothing set DestroyerSummoner_casting[this_1] = false endfunction function construct_DestroyerSummoner takes integer this_1, real pos_x, real pos_y, real pos_z returns nothing local integer receiver local integer receiver_1 call cyc_Projectile_terminate(34, this_1, pos_x, pos_y, pos_z, null, null, DestroyerSummoner_SUMMONER_ID, DestroyerSummoner_SUMMONER_BOUNTY, Wave_middle_x, Wave_middle_y, vec3_angleTo2d(pos_x, pos_y, pos_z, Wave_middle_x, Wave_middle_y), 0.) call DestroyerSummoner_init(this_1) set receiver = new_Fx_2147(pos_x, pos_y, pos_z, 0., Abilities_feralspiritdone) call dispatch_Fx_Fx_Fx_setZ(receiver, 180.) set receiver_1 = receiver call dispatch_Fx_Fx_Fx_setScale(receiver_1, 1.5) call dispatch_Fx_destroyFx(receiver_1) endfunction function new_DestroyerSummoner takes real pos_x, real pos_y, real pos_z returns integer local integer this_1 = alloc_DestroyerSummoner() call construct_DestroyerSummoner(this_1, pos_x, pos_y, pos_z) return this_1 endfunction function EndBossFight_createDestroyerSummoner takes integer this_1, integer castingBoss returns nothing local integer summoner if not EndBossFight_summoningComplete[this_1] then set summoner = new_DestroyerSummoner(dispatch_UnitEntity_Entity_UnitEntity_getPos(castingBoss), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z) call dispatch_FinalBossSummoning_DestroyerSummoner_FinalBossSummoning_addSummoner(EndBossFight_destroyerSummoning[this_1], summoner) endif endfunction function dispatch_EndBossFight_EndBoss_EndBossFight_createDestroyerSummoner takes integer this_1, integer castingBoss returns nothing if EndBossFight_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBossFight.createDestroyerSummoner") else call error("Called EndBossFight.createDestroyerSummoner on invalid object.") endif endif call EndBossFight_createDestroyerSummoner(this_1, castingBoss) endfunction function EndBoss_castDestroyerSummoner takes integer this_1 returns nothing call dispatch_EndBossFight_EndBoss_EndBossFight_createDestroyerSummoner(EndBoss_currentEndBossFight, this_1) endfunction function dispatch_EndBoss_EndBoss_EndBoss_castDestroyerSummoner takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling EndBoss.castDestroyerSummoner") else call error("Called EndBoss.castDestroyerSummoner on invalid object.") endif endif call EndBoss_castDestroyerSummoner(this_1) endfunction function call_doAfter_EndBoss_EndBoss_1161 takes integer this_1 returns nothing local unit receiver = UnitEntity_actor[this_1498[this_1]] local unit receiver_1 call unit_unpauseEx(receiver) set receiver_1 = receiver call unit_setTimeScale(receiver_1, 1.) call new_TextTagEntity(dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1498[this_1]), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, GetRandomReal(-1., 1.), 0., GetRandomReal(9., 12.), "Destroy Summoner!", 12., 1., 196, 163, 17, 255) call dispatch_EndBoss_EndBoss_EndBoss_castDestroyerSummoner(this_1498[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_2373(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_1478[this_1]) endfunction function call_doAfter_FinalBossSummoning_DestroyerSummoner takes integer this_1 returns nothing call dispatch_Fx_destroyFx(destroyerFx[this_1]) call dispatch_Fx_destroyFx(middleFx[this_1]) endfunction function loseGame takes nothing returns nothing local integer ea local integer ue local integer iterator local integer e local integer ue_1 local integer instanceOfTemp local integer instanceOfTemp_1 call print("|cff666666Game over") set ea = Entity_DupletListModule_firstInactive loop exitwhen not (ea != 0) set instanceOfTemp = Serializable_typeId[ea] if instanceOfTemp >= 933 and instanceOfTemp <= 965 then set ue = ea call unit_setTimeScale(UnitEntity_actor[ue], 0.) call unit_pause(UnitEntity_actor[ue]) endif set ea = Entity_DupletListModule_next[ea] endloop set iterator = Entity_DupletListModule_iterator() loop exitwhen not Iterator_hasNext(iterator) set e = Iterator_next(iterator) set instanceOfTemp_1 = Serializable_typeId[e] if instanceOfTemp_1 >= 933 and instanceOfTemp_1 <= 965 then set ue_1 = e call unit_setTimeScale(UnitEntity_actor[ue_1], 0.) call unit_pause(UnitEntity_actor[ue_1]) endif endloop call Iterator_close(iterator) set EndGame_gameOver = true endfunction function call_doAfter_GameConditions takes integer this_1 returns nothing call loseGame() endfunction function alloc_EndBossFight takes nothing returns integer local integer this_1 if EndBossFight_firstFree == 0 then if EndBossFight_maxIndex < JASS_MAX_ARRAY_SIZE then set EndBossFight_maxIndex = EndBossFight_maxIndex + 1 set this_1 = EndBossFight_maxIndex set EndBossFight_typeId[this_1] = 745 else call error("Out of memory: Could not create EndBossFight.") set this_1 = 0 endif else set EndBossFight_firstFree = EndBossFight_firstFree - 1 set this_1 = EndBossFight_nextFree[EndBossFight_firstFree] set EndBossFight_typeId[this_1] = 745 endif return this_1 endfunction function EndBossFight_init takes integer this_1 returns nothing set EndBossFight_bosses[this_1] = new_LinkedList() set EndBossFight_summoningComplete[this_1] = false endfunction function alloc_EndBoss 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] = 943 else call error("Out of memory: Could not create EndBoss.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 943 endif return this_1 endfunction function EndBoss_init takes integer this_1 returns nothing set EndBoss_stage[this_1] = 1 set EndBoss_damageCount[this_1] = GetRandomReal(-1500., 500.) set EndBoss_blockadeCount[this_1] = 0 endfunction function alloc_EventListener_add_EndBoss_EndBoss 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] = 758 else call error("Out of memory: Could not create EventListener_add_EndBoss_EndBoss.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 758 endif return this_1 endfunction function Boss_init takes integer this_1 returns nothing endfunction function construct_Boss takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call cyc_Projectile_terminate(34, this_1, pos_x, pos_y, pos_z, null, null, typId, bounty, target_x_1, target_y_1, vec3_angleTo2d(pos_x, pos_y, pos_z, target_x_1, target_y_1), 0.) call Boss_init(this_1) set Boss_glow[this_1] = widget_addEffect(UnitEntity_actor[this_1], "war3mapImported\\GeneralHeroGlow.mdx", "origin") call UnitPauseTimedLife(UnitEntity_actor[this_1], true) if typId == 1848651827 then call dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(Boss_snd) endif endfunction function construct_EndBoss takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1, integer bossFight returns nothing local integer clVar local unit temp local unitevent temp_1 call construct_Boss(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call EndBoss_init(this_1) set EndBoss_bossFight[this_1] = bossFight set temp = UnitEntity_actor[this_1] set temp_1 = EVENT_UNIT_DAMAGED set clVar = alloc_EventListener_add_EndBoss_EndBoss() call construct_EventListener(clVar) set this_1496[clVar] = this_1 call EventListener_add_274(temp, temp_1, clVar) endfunction function new_EndBoss takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1, integer bossFight returns integer local integer this_1 = alloc_EndBoss() call construct_EndBoss(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1, bossFight) return this_1 endfunction function alloc_FinalBossSummoning takes nothing returns integer local integer this_1 if FinalBossSummoning_firstFree == 0 then if FinalBossSummoning_maxIndex < JASS_MAX_ARRAY_SIZE then set FinalBossSummoning_maxIndex = FinalBossSummoning_maxIndex + 1 set this_1 = FinalBossSummoning_maxIndex set FinalBossSummoning_typeId[this_1] = 777 else call error("Out of memory: Could not create FinalBossSummoning.") set this_1 = 0 endif else set FinalBossSummoning_firstFree = FinalBossSummoning_firstFree - 1 set this_1 = FinalBossSummoning_nextFree[FinalBossSummoning_firstFree] set FinalBossSummoning_typeId[this_1] = 777 endif return this_1 endfunction function FinalBossSummoning_init takes integer this_1 returns nothing set FinalBossSummoning_castPercent[this_1] = 0. set FinalBossSummoning_animationLoop[this_1] = 0. set FinalBossSummoning_castingCount[this_1] = 0 set FinalBossSummoning_summoners[this_1] = new_LinkedList() set FinalBossSummoning_summoningEffect[this_1] = 0 set FinalBossSummoning_summonText[this_1] = createFText(vec2_toVec3(Wave_middle_x, Wave_middle_y), vec2_toVec3_return_y, vec2_toVec3_return_z, "0%", 12.) endfunction function alloc_CallbackPeriodic_doPeriodically_FinalBossSummoning_DestroyerSummoner takes nothing returns integer local integer this_1 if CallbackPeriodic_firstFree == 0 then if CallbackPeriodic_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackPeriodic_maxIndex = CallbackPeriodic_maxIndex + 1 set this_1 = CallbackPeriodic_maxIndex set CallbackPeriodic_typeId[this_1] = 662 else call error("Out of memory: Could not create CallbackPeriodic_doPeriodically_FinalBossSummoning_DestroyerSummoner.") set this_1 = 0 endif else set CallbackPeriodic_firstFree = CallbackPeriodic_firstFree - 1 set this_1 = CallbackPeriodic_nextFree[CallbackPeriodic_firstFree] set CallbackPeriodic_typeId[this_1] = 662 endif return this_1 endfunction function CallbackPeriodic_init takes integer this_1 returns nothing endfunction function construct_CallbackPeriodic takes integer this_1 returns nothing call CallbackPeriodic_init(this_1) endfunction function CallbackPeriodic_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_startPeriodic(receiver_1, time, ref_function_CallbackPeriodic_staticCallback) set CallbackPeriodic_t[this_1] = receiver_1 endfunction function dispatch_CallbackPeriodic_ClosureTimers_CallbackPeriodic_start takes integer this_1, timer whichTimer, real time returns nothing if CallbackPeriodic_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackPeriodic.start") else call error("Called CallbackPeriodic.start on invalid object.") endif endif call CallbackPeriodic_start(this_1, whichTimer, time) endfunction function timer_doPeriodically takes timer this_1, real time, integer cb_1 returns integer call dispatch_CallbackPeriodic_ClosureTimers_CallbackPeriodic_start(cb_1, this_1, time) return cb_1 endfunction function doPeriodically takes real time, integer cb_1 returns integer return timer_doPeriodically(getTimer(), time, cb_1) endfunction function construct_FinalBossSummoning takes integer this_1, integer endBossFightRef returns nothing local integer clVar local real temp call FinalBossSummoning_init(this_1) set FinalBossSummoning_endBossFightRef[this_1] = endBossFightRef call texttag_setVisibility(FText_tt[FinalBossSummoning_summonText[this_1]], false) set temp = DestroyerSummoner_updatePeriod set clVar = alloc_CallbackPeriodic_doPeriodically_FinalBossSummoning_DestroyerSummoner() call construct_CallbackPeriodic(clVar) set this_1495[clVar] = this_1 set FinalBossSummoning_updateCb[this_1] = doPeriodically(temp, clVar) endfunction function new_FinalBossSummoning takes integer endBossFightRef returns integer local integer this_1 = alloc_FinalBossSummoning() call construct_FinalBossSummoning(this_1, endBossFightRef) return this_1 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 rect_randomPoint takes rect this_1 returns real set rect_randomPoint_return_x = GetRandomReal(rect_getMinX(this_1), rect_getMaxX(this_1)) set rect_randomPoint_return_y = GetRandomReal(rect_getMinY(this_1), rect_getMaxY(this_1)) return rect_randomPoint_return_x endfunction function construct_EndBossFight takes integer this_1 returns nothing local integer j local integer temp call EndBossFight_init(this_1) call PlayMusic(Music_path[EndBoss_m]) call print("|cffE62121 Prepare for your end!") set j = 0 set temp = Wave_startPosCount loop exitwhen j > temp call dispatch_LinkedList_LinkedList_LinkedList_add_1(EndBossFight_bosses[this_1], new_EndBoss(vec2_toVec3(rect_randomPoint(Wave_spawnRects[j]), rect_randomPoint_return_y), vec2_toVec3_return_y, vec2_toVec3_return_z, EndBoss_ENDBOSS_ID, 175, Wave_middle_x, Wave_middle_y, this_1)) set j = j + 1 endloop set EndBossFight_destroyerSummoning[this_1] = new_FinalBossSummoning(this_1) endfunction function new_EndBossFight takes nothing returns integer local integer this_1 = alloc_EndBossFight() call construct_EndBossFight(this_1) return this_1 endfunction function stopSpawn takes nothing returns nothing set UnitSpawnSystem_stopSpawns = true endfunction function startEndBoss takes nothing returns nothing call printTimed(" |cffFFC519Beat the final boss to win!", 25.) call stopSpawn() set EndBoss_currentEndBossFight = new_EndBossFight() endfunction function call_doAfter_GameConditions_1165 takes integer this_1 returns nothing call startEndBoss() endfunction function alloc_CallbackSingle_doAfter_GameInit_963 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] = 683 else call error("Out of memory: Could not create CallbackSingle_doAfter_GameInit.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 683 endif return this_1 endfunction function alloc_SoundDefinition takes nothing returns integer local integer this_1 if SoundDefinition_firstFree == 0 then if SoundDefinition_maxIndex < JASS_MAX_ARRAY_SIZE then set SoundDefinition_maxIndex = SoundDefinition_maxIndex + 1 set this_1 = SoundDefinition_maxIndex set SoundDefinition_typeId[this_1] = 967 else call error("Out of memory: Could not create SoundDefinition.") set this_1 = 0 endif else set SoundDefinition_firstFree = SoundDefinition_firstFree - 1 set this_1 = SoundDefinition_nextFree[SoundDefinition_firstFree] set SoundDefinition_typeId[this_1] = 967 endif return this_1 endfunction function SoundDefinition_init takes integer this_1 returns nothing set SoundDefinition_soundStack[this_1] = new_LinkedList() set SoundDefinition_duration[this_1] = 10000 set SoundDefinition_looping[this_1] = false set SoundDefinition_is3D[this_1] = false set SoundDefinition_stopOnLeaveRange[this_1] = SoundUtils_DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE set SoundDefinition_fadeIn[this_1] = SoundUtils_DEFAULT_SOUND_FADE_IN_RATE set SoundDefinition_fadeOut[this_1] = SoundUtils_DEFAULT_SOUND_FADE_OUT_RATE set SoundDefinition_eaxSetting[this_1] = SoundUtils_DEFAULT_SOUND_EAX_SETTINGS endfunction function construct_SoundDefinition2 takes integer this_1, string file, boolean looping returns nothing call SoundDefinition_init(this_1) set SoundDefinition_file[this_1] = file set SoundDefinition_looping[this_1] = looping endfunction function new_SoundDefinition takes string file, boolean looping returns integer local integer this_1 = alloc_SoundDefinition() call construct_SoundDefinition2(this_1, file, looping) return this_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 startSpawn takes nothing returns nothing local timer t = CreateTimer() if dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) <= 1 and player_getName(PlayerData_p[dispatch_LinkedList_LinkedList_LinkedList_get(PlayerData_allPlayers, 0)]) == "WorldEdit" or player_getName(PlayerData_p[dispatch_LinkedList_LinkedList_LinkedList_get(PlayerData_allPlayers, 0)]) == "Frotty" then call print("|cffFFCC00>>|r Fast Spawn") call timer_startPeriodic(t, UnitSpawnSystem_SPAWN_TIME / 2., ref_function_onSpawnTime) else call timer_startPeriodic(t, UnitSpawnSystem_SPAWN_TIME, ref_function_onSpawnTime) endif call printTimed("|cffFFCC00>>|r Enemies spawn in " + int_toString(real_toInt(UnitSpawnSystem_SPAWN_TIME)) + " seconds.", 25.) endfunction function spawn takes nothing returns nothing local integer snd_1 = new_SoundDefinition("Sound\\Dialogue\\HumanCampaign\\Human03\\H03Priest21.mp3", false) local integer snd3_1 = new_SoundDefinition("Units\\Orc\\Peon\\PeonYesAttack1.wav", false) local integer clVar call dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(snd_1) call startSpawn() set clVar = alloc_CallbackSingle_doAfter_GameInit_963() call construct_CallbackSingle(clVar) set snd3[clVar] = snd3_1 call doAfter(7.75, clVar) endfunction function call_doAfter_GameInit takes integer this_1 returns nothing call spawn() endfunction function call_doAfter_GameInit_1167 takes integer this_1 returns nothing call spawn() endfunction function alloc_CallbackCounted_doPeriodicallyTimed_doAfter_GameInit takes nothing returns integer local integer this_1 if CallbackCounted_firstFree == 0 then if CallbackCounted_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackCounted_maxIndex = CallbackCounted_maxIndex + 1 set this_1 = CallbackCounted_maxIndex set CallbackCounted_typeId[this_1] = 659 else call error("Out of memory: Could not create CallbackCounted_doPeriodicallyTimed_doAfter_GameInit.") set this_1 = 0 endif else set CallbackCounted_firstFree = CallbackCounted_firstFree - 1 set this_1 = CallbackCounted_nextFree[CallbackCounted_firstFree] set CallbackCounted_typeId[this_1] = 659 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_doAfter_GameInit 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] = 703 else call error("Out of memory: Could not create CallbackSingle_doAfter_doAfter_GameInit.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 703 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_doAfter_GameInit_984 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] = 704 else call error("Out of memory: Could not create CallbackSingle_doAfter_doAfter_GameInit.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 704 endif return this_1 endfunction function CallbackCounted_init takes integer this_1 returns nothing set CallbackCounted_count[this_1] = 0 set CallbackCounted_maxCount[this_1] = 0 endfunction function construct_CallbackCounted takes integer this_1 returns nothing call CallbackCounted_init(this_1) endfunction function CallbackCounted_start takes integer this_1, timer whichTimer, real time, integer callAmount returns nothing local timer receiver local timer receiver_1 set CallbackCounted_count[this_1] = callAmount set CallbackCounted_maxCount[this_1] = callAmount set receiver = whichTimer call timer_setData(receiver, this_1) set receiver_1 = receiver call timer_startPeriodic(receiver_1, time, ref_function_CallbackCounted_staticCallback) set CallbackCounted_t[this_1] = receiver_1 endfunction function dispatch_CallbackCounted_ClosureTimers_CallbackCounted_start takes integer this_1, timer whichTimer, real time, integer callAmount returns nothing if CallbackCounted_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CallbackCounted.start") else call error("Called CallbackCounted.start on invalid object.") endif endif call CallbackCounted_start(this_1, whichTimer, time, callAmount) endfunction function timer_doPeriodicallyCounted takes timer this_1, real time, integer callAmount, integer cb_1 returns integer call dispatch_CallbackCounted_ClosureTimers_CallbackCounted_start(cb_1, this_1, time, callAmount) return cb_1 endfunction function timer_doPeriodicallyTimed takes timer this_1, real interval, real timerDuration, integer cb_1 returns integer return timer_doPeriodicallyCounted(this_1, interval, real_toInt(timerDuration / interval + 0.5), cb_1) endfunction function doPeriodicallyTimed takes real interval, real timerDuration, integer cb_1 returns integer return timer_doPeriodicallyTimed(getTimer(), interval, timerDuration, cb_1) endfunction function call_doAfter_GameInit_1168 takes integer this_1 returns nothing local integer instance1_1 = dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(GameInit_snd2) local integer clVar = alloc_CallbackCounted_doPeriodicallyTimed_doAfter_GameInit() local integer clVar_1 local integer clVar_2 call construct_CallbackCounted(clVar) set instance1[clVar] = instance1_1 call doPeriodicallyTimed(0.3, 10., clVar) set clVar_1 = alloc_CallbackSingle_doAfter_doAfter_GameInit() call construct_CallbackSingle(clVar_1) call doAfter(0.55, clVar_1) set clVar_2 = alloc_CallbackSingle_doAfter_doAfter_GameInit_984() call construct_CallbackSingle(clVar_2) set snd3_1452[clVar_2] = snd3[this_1] call doAfter(14.25, clVar_2) endfunction function alloc_CallbackSingle_doAfter_GameInit 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] = 681 else call error("Out of memory: Could not create CallbackSingle_doAfter_GameInit.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 681 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_GameInit_962 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] = 682 else call error("Out of memory: Could not create CallbackSingle_doAfter_GameInit.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 682 endif return this_1 endfunction function alloc_LLItrClosure_forEach_GameInit takes nothing returns integer local integer this_1 if LLItrClosure_firstFree == 0 then if LLItrClosure_maxIndex < JASS_MAX_ARRAY_SIZE then set LLItrClosure_maxIndex = LLItrClosure_maxIndex + 1 set this_1 = LLItrClosure_maxIndex set LLItrClosure_typeId[this_1] = 862 else call error("Out of memory: Could not create LLItrClosure_forEach_GameInit.") set this_1 = 0 endif else set LLItrClosure_firstFree = LLItrClosure_firstFree - 1 set this_1 = LLItrClosure_nextFree[LLItrClosure_firstFree] set LLItrClosure_typeId[this_1] = 862 endif return this_1 endfunction function initAssassinTower takes nothing returns nothing endfunction function alloc_CallbackSingle_doAfter_GameConditions_960 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] = 680 else call error("Out of memory: Could not create CallbackSingle_doAfter_GameConditions.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 680 endif return this_1 endfunction function alloc_Treasure 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] = 962 else call error("Out of memory: Could not create Treasure.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 962 endif return this_1 endfunction function Treasure_init takes integer this_1 returns nothing endfunction function construct_Treasure takes integer this_1, unit existing returns nothing call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, existing, 0, 0, 0., 0., 0., 0.) call Treasure_init(this_1) endfunction function new_Treasure takes unit existing returns integer local integer this_1 = alloc_Treasure() call construct_Treasure(this_1, existing) return this_1 endfunction function initConds takes nothing returns nothing local timer temp = GameConditions_gameTime local real temp_1 = 16. * 60. + 20. local integer clVar = alloc_CallbackSingle_doAfter_GameConditions_960() local timerdialog td local trigger tr call construct_CallbackSingle(clVar) call timer_doAfter(temp, temp_1, clVar) set td = CreateTimerDialog(GameConditions_gameTime) call TimerDialogSetTitle(td, "Until Finale: ") call TimerDialogDisplay(td, true) call print("|cffFFCC00>> Visit our discord server: discord.gg/yr3ZyYQ") call print("|cffFFCC00>> You have one minute to build up defenses..") set tr = CreateTrigger() if PlayerData_bigArena then call TriggerRegisterUnitEvent(tr, gg_unit_h00E_0007, EVENT_UNIT_DEATH) call new_Treasure(gg_unit_h00E_0007) call unit_remove(gg_unit_h00E_0008) else call TriggerRegisterUnitEvent(tr, gg_unit_h00E_0008, EVENT_UNIT_DEATH) call new_Treasure(gg_unit_h00E_0008) call unit_remove(gg_unit_h00E_0007) endif call TriggerAddAction(tr, ref_function_endGameTimer) 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_LumberAndCoinSystem 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] = 762 else call error("Out of memory: Could not create EventListener_add_LumberAndCoinSystem.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 762 endif return this_1 endfunction function alloc_EventListener_add_LumberAndCoinSystem_1033 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] = 763 else call error("Out of memory: Could not create EventListener_add_LumberAndCoinSystem.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 763 endif return this_1 endfunction function initLumberSystem takes nothing returns nothing local integer clVar local integer clVar_1 local playerunitevent temp local playerunitevent temp_1 if dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) <= 2 then set LumberAndCoinSystem_WOOD_BOUNTY = 2 endif if PlayerData_bigArena then set LumberAndCoinSystem_killcap = 32. set LumberAndCoinSystem_coinCap = 54 + GetRandomInt(-6, 6) endif set temp = EVENT_PLAYER_UNIT_DEATH set clVar = alloc_EventListener_add_LumberAndCoinSystem() call construct_EventListener(clVar) call EventListener_add(temp, clVar) set temp_1 = EVENT_PLAYER_UNIT_PICKUP_ITEM set clVar_1 = alloc_EventListener_add_LumberAndCoinSystem_1033() call construct_EventListener(clVar_1) call EventListener_add(temp_1, clVar_1) endfunction function alloc_EventListener_add_PlayerData 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] = 764 else call error("Out of memory: Could not create EventListener_add_PlayerData.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 764 endif return this_1 endfunction function camerasetup_applyForceDuration takes camerasetup this_1, boolean doPan, real forceDuration returns nothing call CameraSetupApplyForceDuration(this_1, doPan, forceDuration) endfunction function initCreepStarts takes boolean eight returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 if eight then set Wave_startPosCount = 7 set Wave_spawnRects[0] = gg_rct_bigLeftTop set Wave_spawnRects[1] = gg_rct_bigTopLeft set Wave_spawnRects[2] = gg_rct_bigTopRight set Wave_spawnRects[3] = gg_rct_bigRightTop set Wave_spawnRects[4] = gg_rct_bigRightBot set Wave_spawnRects[5] = gg_rct_bigBotRight set Wave_spawnRects[6] = gg_rct_bigBotLeft set Wave_spawnRects[7] = gg_rct_bigLeftBot set tuple_temp = unit_getX(gg_unit_h00E_0007) set tuple_temp_1 = unit_getY(gg_unit_h00E_0007) set Wave_middle_x = tuple_temp set Wave_middle_y = tuple_temp_1 else set Wave_startPosCount = 3 set Wave_spawnRects[0] = gg_rct_smallBot set Wave_spawnRects[1] = gg_rct_smallLeft set Wave_spawnRects[2] = gg_rct_smallTop set Wave_spawnRects[3] = gg_rct_smallRight set tuple_temp_2 = unit_getX(gg_unit_h00E_0008) set tuple_temp_3 = unit_getY(gg_unit_h00E_0008) set Wave_middle_x = tuple_temp_2 set Wave_middle_y = tuple_temp_3 endif endfunction function alloc_PlayerData takes nothing returns integer local integer this_1 if PlayerData_firstFree == 0 then if PlayerData_maxIndex < JASS_MAX_ARRAY_SIZE then set PlayerData_maxIndex = PlayerData_maxIndex + 1 set this_1 = PlayerData_maxIndex set PlayerData_typeId[this_1] = 897 else call error("Out of memory: Could not create PlayerData.") set this_1 = 0 endif else set PlayerData_firstFree = PlayerData_firstFree - 1 set this_1 = PlayerData_nextFree[PlayerData_firstFree] set PlayerData_typeId[this_1] = 897 endif return this_1 endfunction function PlayerData_init takes integer this_1 returns nothing set PlayerData_kills[this_1] = 0 set PlayerData_alive[this_1] = true set PlayerData_deaths[this_1] = 0 set PlayerData_builder[this_1] = 0 set PlayerData_select[this_1] = 0 endfunction function construct_PlayerData takes integer this_1, player p returns nothing call PlayerData_init(this_1) set PlayerData_p[this_1] = p set PlayerData_pDatas[player_getId(p)] = this_1 call dispatch_LinkedList_LinkedList_LinkedList_add_1(PlayerData_allPlayers, this_1) call SetPlayerTechMaxAllowed(p, 1747989048, 0) endfunction function new_PlayerData takes player p returns integer local integer this_1 = alloc_PlayerData() call construct_PlayerData(this_1, p) return this_1 endfunction function alloc_Selector 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] = 954 else call error("Out of memory: Could not create Selector.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 954 endif return this_1 endfunction function EventListener_addSpellInternal takes unit u_1, integer abilId, integer listener returns integer local integer index set OnCastListener_abilId[listener] = abilId if u_1 != null then set OnCastListener_eventUnit[listener] = u_1 set index = unit_getIndex(u_1) if EventListener_castMapCasters[index] != 0 then set OnCastListener_prev[EventListener_castMapCasters[index]] = listener set OnCastListener_next[listener] = EventListener_castMapCasters[index] endif set EventListener_castMapCasters[index] = listener else if dispatch_HashMap_HashMap_HashMap_has(EventListener_castMap, abilId) then set OnCastListener_prev[dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId)] = listener set OnCastListener_next[listener] = dispatch_HashMap_HashMap_HashMap_get(EventListener_castMap, abilId) endif call dispatch_HashMap_HashMap_HashMap_put(EventListener_castMap, abilId, listener) endif return listener endfunction function EventListener_onCast_280 takes unit u_1, integer listener returns integer return EventListener_addSpellInternal(u_1, -1, listener) endfunction function Selector_init takes integer this_1 returns nothing set Selector_p[this_1] = 0. endfunction function alloc_OnCast_onCast_Selector_Selector takes nothing returns integer local integer this_1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < JASS_MAX_ARRAY_SIZE then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set this_1 = OnCastListener_maxIndex set OnCastListener_typeId[this_1] = 879 else call error("Out of memory: Could not create OnCast_onCast_Selector_Selector.") set this_1 = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set this_1 = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[this_1] = 879 endif return this_1 endfunction function color_withAlpha takes integer this_red, integer this_green, integer this_blue, integer a returns integer set color_withAlpha_return_red = this_red set color_withAlpha_return_green = this_green set color_withAlpha_return_blue = this_blue set color_withAlpha_return_alpha = a return color_withAlpha_return_red endfunction function OnCast_init takes integer this_1 returns nothing endfunction function OnCastListener_init takes integer this_1 returns nothing set OnCastListener_next[this_1] = 0 set OnCastListener_prev[this_1] = 0 set OnCastListener_eventUnit[this_1] = null endfunction function construct_OnCastListener takes integer this_1 returns nothing call OnCastListener_init(this_1) endfunction function construct_OnCast takes integer this_1 returns nothing call construct_OnCastListener(this_1) call OnCast_init(this_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 player_select takes player this_1, unit u_1 returns nothing if Player_localPlayer == this_1 then call SelectUnit(u_1, true) endif endfunction function construct_Selector takes integer this_1, real ppos_x_1, real ppos_y_1, real ppos_z_1, player owner_1 returns nothing local unit receiver local unit receiver_1 local player receiver_2 local player receiver_3 local integer clVar local unit temp 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 call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, createUnit_1372(owner_1, 1747989043, vec2_toVec3(Wave_middle_x, Wave_middle_y), vec2_toVec3_return_y, vec2_toVec3_return_z, 0.), 0, 0, 0., 0., 0., 0.) call Selector_init(this_1) set Selector_ownerTag[this_1] = createFText(vec3_op_minus(ppos_x_1, ppos_y_1, ppos_z_1, 20., 25., 0.), vec3_op_minus_return_y, vec3_op_minus_return_z, player_getNameColored_2260(owner_1), 12.5) set receiver = UnitEntity_actor[this_1] call unit_setVertexColor(receiver, color_withAlpha(playercolor_toColor(player_getColor(owner_1)), playercolor_toColor_return_green, playercolor_toColor_return_blue, 255), color_withAlpha_return_green, color_withAlpha_return_blue, color_withAlpha_return_alpha) set receiver_1 = receiver call unit_setPropWindow(receiver_1, 0.) set tuple_temp = ppos_x_1 set tuple_temp_1 = ppos_y_1 set tuple_temp_2 = ppos_z_1 set Selector_finalPos_x[this_1] = tuple_temp set Selector_finalPos_y[this_1] = tuple_temp_1 set Selector_finalPos_z[this_1] = tuple_temp_2 set tuple_temp_3 = vec2_toVec3(vec2_polarOffset(Wave_middle_x, Wave_middle_y, angle_op_plus(vec2_angleTo(Wave_middle_x, Wave_middle_y, vec3_toVec2(Selector_finalPos_x[this_1], Selector_finalPos_y[this_1], Selector_finalPos_z[this_1]), vec3_toVec2_return_y), real_fromDeg(48.)), 168.), vec2_polarOffset_return_y) set tuple_temp_4 = vec2_toVec3_return_y set tuple_temp_5 = vec2_toVec3_return_z set Selector_mid_x[this_1] = tuple_temp_3 set Selector_mid_y[this_1] = tuple_temp_4 set Selector_mid_z[this_1] = tuple_temp_5 set receiver_2 = owner_1 call player_select(receiver_2, UnitEntity_actor[this_1]) set receiver_3 = receiver_2 call player_panCameraToTimed(receiver_3, unit_getPos(UnitEntity_actor[this_1]), unit_getPos_return_y, 0.) set temp = UnitEntity_actor[this_1] set clVar = alloc_OnCast_onCast_Selector_Selector() call construct_OnCast(clVar) set owner[clVar] = owner_1 set this_1502[clVar] = this_1 call EventListener_onCast_280(temp, clVar) endfunction function new_Selector takes real ppos_x_1, real ppos_y_1, real ppos_z_1, player owner_1 returns integer local integer this_1 = alloc_Selector() call construct_Selector(this_1, ppos_x_1, ppos_y_1, ppos_z_1, owner_1) return this_1 endfunction function player_getController takes player this_1 returns mapcontrol return GetPlayerController(this_1) endfunction function player_getSlotState takes player this_1 returns playerslotstate return GetPlayerSlotState(this_1) endfunction function initPlayers takes nothing returns nothing local playerevent temp = EVENT_PLAYER_LEAVE local integer clVar = alloc_EventListener_add_PlayerData() local integer i local real gold local real anglePerP local real current local integer iterator local integer p call construct_EventListener(clVar) call EventListener_add(temp, clVar) set i = 0 loop exitwhen i > 7 if player_getSlotState(Player_players[i]) == PLAYER_SLOT_STATE_PLAYING and player_getController(Player_players[i]) == MAP_CONTROL_USER then call new_PlayerData(Player_players[i]) endif set i = i + 1 endloop if dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) > 4 then set PlayerData_bigArena = true set LumberAndCoinSystem_WOOD_REDISTRIBUTE_THRESHOLD = LumberAndCoinSystem_WOOD_REDISTRIBUTE_THRESHOLD + 7 call initCreepStarts(true) set gold = 1245. call camerasetup_applyForceDuration(gg_cam_Camera_003, true, 0.) call camerasetup_applyForceDuration(gg_cam_Camera_004, true, 1.5) else set PlayerData_bigArena = false call initCreepStarts(false) set gold = 490. call camerasetup_applyForceDuration(gg_cam_Camera_001, true, 0.) call camerasetup_applyForceDuration(gg_cam_Camera_002, true, 1.5) endif set anglePerP = 360 * 1. / dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) set current = GetRandomInt(0, dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers)) * anglePerP + GetRandomInt(0, 4) * 90 set iterator = LinkedList_iterator(PlayerData_allPlayers) loop exitwhen not LLIterator_hasNext(iterator) set p = LLIterator_next(iterator) set PlayerData_select[p] = new_Selector(vec2_toVec3(vec2_polarOffset(Wave_middle_x, Wave_middle_y, real_asAngleDegrees(current), 285.), vec2_polarOffset_return_y), vec2_toVec3_return_y, vec2_toVec3_return_z, PlayerData_p[p]) set current = current + anglePerP call player_addGold(PlayerData_p[p], real_toInt(gold / dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers))) endloop call LLIterator_close(iterator) call createFText(vec3_op_minus(vec2_toVec3(Wave_middle_x, Wave_middle_y), vec2_toVec3_return_y, vec2_toVec3_return_z, 80., 0., 0.), vec3_op_minus_return_y, vec3_op_minus_return_z, "Item Shop", 17.5) endfunction function onUnitDeindex takes code func returns nothing call trigger_addCondition(UnitIndexer_onDeindexTrigger, Condition(func)) endfunction function startEntityLoop takes nothing returns boolean call timer_startPeriodic(getTimer(), Basics_ANIMATION_PERIOD, ref_function_updateActiveEntities) call timer_startPeriodic(getTimer(), Buff_BUFF_ANIM_PERIOD, ref_function_updateBuffs) call timer_startPeriodic(getTimer(), 1.0, ref_function_updateInactiveEntities) call onUnitDeindex(ref_function_code__onUnitDeindex_EntityManagement) return true endfunction function start takes nothing returns nothing local integer clVar local integer clVar_1 local integer clVar_2 local integer temp call initPlayers() call initLumberSystem() call initAssassinTower() call initConds() call startEntityLoop() call dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(new_SoundDefinition(Sounds_h01Uther03, false)) call print("|cffffcc00Leave space between walls and towers in order to repair damaged walls!") if dispatch_LinkedList_LinkedList_LinkedList_size(PlayerData_allPlayers) <= 2 and player_getName(PlayerData_p[dispatch_LinkedList_LinkedList_LinkedList_get(PlayerData_allPlayers, 0)]) == "WorldEdit" or player_getName(PlayerData_p[dispatch_LinkedList_LinkedList_LinkedList_get(PlayerData_allPlayers, 0)]) == "Frotty" then set temp = PlayerData_allPlayers set clVar = alloc_LLItrClosure_forEach_GameInit() call dispatch_LinkedList_LinkedList_LinkedList_forEach(temp, clVar) set clVar_1 = alloc_CallbackSingle_doAfter_GameInit() call construct_CallbackSingle(clVar_1) call doAfter(15., clVar_1) call Cheat("warpten") call Cheat("iseedeadpeople") call print("|cffFFCC00>>|r Editor Test Mode activated") else set clVar_2 = alloc_CallbackSingle_doAfter_GameInit_962() call construct_CallbackSingle(clVar_2) call doAfter(50., clVar_2) endif endfunction function call_doAfter_GameInit_1169 takes integer this_1 returns nothing call start() endfunction function createMultiboard_1370 takes nothing returns nothing local multiboarditem mbi local integer i local integer temp local string s set InstanceBoard_mb = CreateMultiboard() call multiboard_setColumnCount(InstanceBoard_mb, 2) call multiboard_setRowCount(InstanceBoard_mb, InstanceBoard_classes + 1) call multiboard_setItemsStyle(InstanceBoard_mb, true, false) call multiboard_setItemsWidth(InstanceBoard_mb, 0.10) call multiboard_setTitle(InstanceBoard_mb, "Instance Board") set mbi = multiboard_getItem(InstanceBoard_mb, 0, 0) call multiboarditem_setValue(mbi, "ClassName") set mbi = multiboard_getItem(InstanceBoard_mb, 0, 1) call multiboarditem_setValue(mbi, "Instance count") set i = 1 set temp = InstanceBoard_classes loop exitwhen i > temp set s = InstanceBoard_nameOfClass[i] if s != null then set mbi = multiboard_getItem(InstanceBoard_mb, i, 0) call multiboarditem_setValue(mbi, s) set mbi = multiboard_getItem(InstanceBoard_mb, i, 1) call multiboarditem_setValue(mbi, int_toString(InstanceBoard_count[i])) endif set i = i + 1 endloop call multiboard_display(InstanceBoard_mb, true) endfunction function call_doAfter_InstanceBoard takes integer this_1 returns nothing call createMultiboard_1370() endfunction function call_doAfter_LumberAndCoinSystem takes integer this_1 returns nothing if itm_1239[this_1] != null and widget_getLife(itm_1239[this_1]) > .405 then call item_remove(itm_1239[this_1]) endif endfunction function initMultiboard takes nothing returns nothing set MultiboardSystem_mboard = CreateMultiboard() call update() call multiboard_display(MultiboardSystem_mboard, true) call timer_startPeriodic(CreateTimer(), 0.5, ref_function_code__startPeriodic_MultiboardSystem) endfunction function call_doAfter_MultiboardSystem takes integer this_1 returns nothing call initMultiboard() endfunction function alloc_CallbackSingle_doAfter_NormalWave_Wave_969 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] = 689 else call error("Out of memory: Could not create CallbackSingle_doAfter_NormalWave_Wave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 689 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_NormalWave_Wave_970 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] = 690 else call error("Out of memory: Could not create CallbackSingle_doAfter_NormalWave_Wave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 690 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_NormalWave_Wave_971 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] = 691 else call error("Out of memory: Could not create CallbackSingle_doAfter_NormalWave_Wave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 691 endif return this_1 endfunction function NormalWave_onDestroy takes integer this_1 returns nothing endfunction function dealloc_NormalWave takes integer obj returns nothing if NormalWave_typeId[obj] == 0 then call error("Double free: object of type NormalWave") else set NormalWave_nextFree[NormalWave_firstFree] = obj set NormalWave_firstFree = NormalWave_firstFree + 1 set NormalWave_typeId[obj] = 0 endif endfunction function destroyNormalWave takes integer this_1 returns nothing call NormalWave_onDestroy(this_1) call dealloc_NormalWave(this_1) endfunction function dispatch_NormalWave_destroyNormalWave takes integer this_1 returns nothing if NormalWave_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling NormalWave.NormalWave") else call error("Called NormalWave.NormalWave on invalid object.") endif endif call destroyNormalWave(this_1) endfunction function int_toReal takes integer this_1 returns real return this_1 * 1. endfunction function NormalWave_spawnCallback takes integer this_1 returns nothing local boolean destroyWave = false local integer temp = NormalWave_typ[this_1] local integer id_1 local integer clVar local integer clVar_1 local integer i local integer temp_1 local integer clVar_2 local real temp_2 if temp == 0 then set id_1 = NormalWave_meleeId[this_1] set NormalWave_typ[this_1] = 1 set clVar = alloc_CallbackSingle_doAfter_NormalWave_Wave_969() call construct_CallbackSingle(clVar) set this_1488[clVar] = this_1 call doAfter(0.8, clVar) elseif temp == 1 then set id_1 = NormalWave_mageId[this_1] set NormalWave_typ[this_1] = 2 set clVar_1 = alloc_CallbackSingle_doAfter_NormalWave_Wave_970() call construct_CallbackSingle(clVar_1) set this_1489[clVar_1] = this_1 call doAfter(0.8, clVar_1) else set id_1 = NormalWave_rangedId[this_1] set destroyWave = true endif set i = 0 set temp_1 = NormalWave_amount[this_1] - 1 loop exitwhen i > temp_1 set temp_2 = int_toReal(i) set clVar_2 = alloc_CallbackSingle_doAfter_NormalWave_Wave_971() call construct_CallbackSingle(clVar_2) set id[clVar_2] = id_1 set this_1490[clVar_2] = this_1 call doAfter(temp_2, clVar_2) set i = i + 1 endloop if destroyWave then call dispatch_NormalWave_destroyNormalWave(this_1) endif endfunction function dispatch_NormalWave_Wave_NormalWave_spawnCallback takes integer this_1 returns nothing if NormalWave_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling NormalWave.spawnCallback") else call error("Called NormalWave.spawnCallback on invalid object.") endif endif call NormalWave_spawnCallback(this_1) endfunction function call_doAfter_NormalWave_Wave takes integer this_1 returns nothing call dispatch_NormalWave_Wave_NormalWave_spawnCallback(this_1487[this_1]) endfunction function call_doAfter_NormalWave_Wave_1174 takes integer this_1 returns nothing call NormalWave_spawnCallback(this_1488[this_1]) endfunction function call_doAfter_NormalWave_Wave_1175 takes integer this_1 returns nothing call NormalWave_spawnCallback(this_1489[this_1]) endfunction function call_doAfter_NormalWave_Wave_1176 takes integer this_1 returns nothing local integer j = 0 local integer temp = Wave_startPosCount local real spoint_x local real spoint_y local real spoint_z local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 loop exitwhen j > temp set tuple_temp = vec2_toVec3(rect_randomPoint(Wave_spawnRects[j]), rect_randomPoint_return_y) set tuple_temp_1 = vec2_toVec3_return_y set tuple_temp_2 = vec2_toVec3_return_z set spoint_x = tuple_temp set spoint_y = tuple_temp_1 set spoint_z = tuple_temp_2 call cyc_Projectile_terminate(23, 0, spoint_x, spoint_y, spoint_z, null, null, id[this_1], NormalWave_bounty[this_1490[this_1]], Wave_middle_x, Wave_middle_y, vec3_angleTo2d(spoint_x, spoint_y, spoint_z, Wave_middle_x, Wave_middle_y), 0.) set j = j + 1 endloop endfunction function LinkedList_push takes integer this_1, integer elem returns nothing call dispatch_LinkedList_LinkedList_LinkedList_add_1(this_1, elem) endfunction function dispatch_LinkedList_LinkedList_LinkedList_push takes integer this_1, integer elem returns nothing if LinkedList_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling LinkedList.push") else call error("Called LinkedList.push on invalid object.") endif endif call LinkedList_push(this_1, elem) endfunction function Sim3DSound_onDestroy takes integer this_1 returns nothing endfunction function dealloc_Sim3DSound takes integer obj returns nothing if Sim3DSound_typeId[obj] == 0 then call error("Double free: object of type Sim3DSound") else set Sim3DSound_firstFree = Sim3DSound_firstFree + 1 set Sim3DSound_typeId[obj] = 0 endif endfunction function destroySim3DSound takes integer this_1 returns nothing call Sim3DSound_onDestroy(this_1) call dealloc_Sim3DSound(this_1) endfunction function dispatch_Sim3DSound_destroySim3DSound takes integer this_1 returns nothing if Sim3DSound_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Sim3DSound.Sim3DSound") else call error("Called Sim3DSound.Sim3DSound on invalid object.") endif endif call destroySim3DSound(this_1) endfunction function sound_stop takes sound this_1, boolean killWhenDone, boolean fadeOut returns nothing call StopSound(this_1, killWhenDone, fadeOut) endfunction function SoundInstance_onDestroy takes integer this_1 returns nothing call sound_stop(SoundInstance_snd[this_1], true, false) endfunction function dealloc_SoundInstance takes integer obj returns nothing if SoundInstance_typeId[obj] == 0 then call error("Double free: object of type SoundInstance") else set SoundInstance_nextFree[SoundInstance_firstFree] = obj set SoundInstance_firstFree = SoundInstance_firstFree + 1 set SoundInstance_typeId[obj] = 0 endif endfunction function destroySoundInstance takes integer this_1 returns nothing call SoundInstance_onDestroy(this_1) call dealloc_SoundInstance(this_1) endfunction function dispatch_SoundInstance_destroySoundInstance takes integer this_1 returns nothing if SoundInstance_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundInstance.SoundInstance") else call error("Called SoundInstance.SoundInstance on invalid object.") endif endif call destroySoundInstance(this_1) endfunction function SoundDefinition_recycle takes integer this_1, integer instance_1 returns nothing set SoundInstance_p[instance_1] = null if SoundInstance_s3s[instance_1] != 0 then call dispatch_Sim3DSound_destroySim3DSound(SoundInstance_s3s[instance_1]) endif if dispatch_LinkedList_LinkedList_LinkedList_size(SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]]) < 4 then call dispatch_LinkedList_LinkedList_LinkedList_push(SoundDefinition_soundStack[SoundInstance_soundDef[instance_1]], instance_1) else call dispatch_SoundInstance_destroySoundInstance(instance_1) endif endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_recycle takes integer this_1, integer instance_1 returns nothing if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.recycle") else call error("Called SoundDefinition.recycle on invalid object.") endif endif call SoundDefinition_recycle(this_1, instance_1) endfunction function call_doAfter_SoundDefinition_SoundUtils takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_recycle(this_1484[this_1], instance[this_1]) endfunction function unit_getDefaultPropWindow takes unit this_1 returns real set unit_getDefaultPropWindow_return_radians = real_fromDeg(GetUnitDefaultPropWindow(this_1)) return unit_getDefaultPropWindow_return_radians endfunction function call_doAfter_SpecialFive_SpecialFive takes integer this_1 returns nothing call unit_setPropWindow(UnitEntity_actor[this_1501[this_1]], unit_getDefaultPropWindow(UnitEntity_actor[this_1501[this_1]])) endfunction function alloc_Spawn 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] = 946 else call error("Out of memory: Could not create Spawn.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 946 endif return this_1 endfunction function Spawn_init takes integer this_1 returns nothing endfunction function Special_init takes integer this_1 returns nothing endfunction function construct_Special takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call cyc_Projectile_terminate(34, this_1, pos_x, pos_y, pos_z, null, null, typId, bounty, target_x_1, target_y_1, vec3_angleTo2d(pos_x, pos_y, pos_z, target_x_1, target_y_1), 0.) call Special_init(this_1) set Special_glow[this_1] = widget_addEffect(UnitEntity_actor[this_1], "war3mapImported\\GeneralHeroGlow.mdx", "origin") endfunction function construct_Spawn takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Special(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call Spawn_init(this_1) endfunction function new_Spawn takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_Spawn() call construct_Spawn(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function call_doAfter_SpecialFive_SpecialFive_1179 takes integer this_1 returns nothing local integer spawn_1 = new_Spawn(vec2_toVec3(ppos_x[this_1], ppos_y[this_1]), vec2_toVec3_return_y, vec2_toVec3_return_z, SpecialFive_SPAWNID, 0, Wave_middle_x, Wave_middle_y) call flashEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl", dispatch_UnitEntity_Entity_UnitEntity_getPos(spawn_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z) endfunction function alloc_SpecialTwo 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] = 951 else call error("Out of memory: Could not create SpecialTwo.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 951 endif return this_1 endfunction function SpecialTwo_init takes integer this_1 returns nothing endfunction function construct_SpecialTwo takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Special(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call SpecialTwo_init(this_1) endfunction function new_SpecialTwo takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_SpecialTwo() call construct_SpecialTwo(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function vec3_op_plus_2533 takes real this_x, real this_y, real this_z, real v_x, real v_y returns real set vec3_op_plus_return_x_1592 = this_x + v_x set vec3_op_plus_return_y_1594 = this_y + v_y set vec3_op_plus_return_z_1596 = this_z return vec3_op_plus_return_x_1592 endfunction function call_doAfter_SpecialTwo_SpecialTwo takes integer this_1 returns nothing local integer i = 0 loop exitwhen i > 3 call new_SpecialTwo(vec3_op_plus_2533(ppos_x_1267[this_1], ppos_y_1271[this_1], ppos_z[this_1], GetRandomReal(-16., 16.), GetRandomReal(-16., 16.)), vec3_op_plus_return_y_1594, vec3_op_plus_return_z_1596, SpecialTwo_SOUL2_ID, 8, Wave_middle_x, Wave_middle_y) set i = i + 1 endloop endfunction function call_doAfter_SpecialTwo_SpecialTwo_1181 takes integer this_1 returns nothing local integer i = 0 loop exitwhen i > 2 call new_SpecialTwo(vec3_op_plus_2533(ppos_x_1268[this_1], ppos_y_1272[this_1], ppos_z_1275[this_1], GetRandomReal(-16., 16.), GetRandomReal(-16., 16.)), vec3_op_plus_return_y_1594, vec3_op_plus_return_z_1596, SpecialTwo_SOUL3_ID, 7, Wave_middle_x, Wave_middle_y) set i = i + 1 endloop endfunction function call_doAfter_SpecialTwo_SpecialTwo_1182 takes integer this_1 returns nothing call new_SpecialTwo(vec3_op_plus_2533(ppos_x_1269[this_1], ppos_y_1273[this_1], ppos_z_1276[this_1], GetRandomReal(-16., 16.), GetRandomReal(-16., 16.)), vec3_op_plus_return_y_1594, vec3_op_plus_return_z_1596, SpecialTwo_SOUL4_ID, 6, Wave_middle_x, Wave_middle_y) endfunction function alloc_SpecialOne 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] = 949 else call error("Out of memory: Could not create SpecialOne.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 949 endif return this_1 endfunction function SpecialOne_init takes integer this_1 returns nothing endfunction function construct_SpecialOne takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Special(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call SpecialOne_init(this_1) endfunction function new_SpecialOne takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_SpecialOne() call construct_SpecialOne(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1379 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_SpecialOne(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function create_add_UnitSpawnSystem_1380 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_SpecialTwo(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function alloc_SpecialThree 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] = 950 else call error("Out of memory: Could not create SpecialThree.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 950 endif return this_1 endfunction function SpecialThree_init takes integer this_1 returns nothing endfunction function construct_SpecialThree takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Special(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call SpecialThree_init(this_1) endfunction function new_SpecialThree takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_SpecialThree() call construct_SpecialThree(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1381 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_SpecialThree(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function alloc_SpecialFour 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] = 948 else call error("Out of memory: Could not create SpecialFour.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 948 endif return this_1 endfunction function SpecialFour_init takes integer this_1 returns nothing endfunction function construct_SpecialFour takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Special(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call SpecialFour_init(this_1) endfunction function new_SpecialFour takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_SpecialFour() call construct_SpecialFour(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1382 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_SpecialFour(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function alloc_SpecialFive 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] = 947 else call error("Out of memory: Could not create SpecialFive.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 947 endif return this_1 endfunction function SpecialFive_init takes integer this_1 returns nothing set SpecialFive_spawntimer[this_1] = 5 + GetRandomInt(-4, 4) endfunction function construct_SpecialFive takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Special(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call SpecialFive_init(this_1) endfunction function new_SpecialFive takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_SpecialFive() call construct_SpecialFive(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1383 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_SpecialFive(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function dispatch_CreateSpecial_Wave_CreateSpecial_create takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing if CreateSpecial_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CreateSpecial.create") else call error("Called CreateSpecial.create on invalid object.") endif endif if CreateSpecial_typeId[this_1] <= 730 then if CreateSpecial_typeId[this_1] <= 729 then if CreateSpecial_typeId[this_1] <= 728 then call create_add_UnitSpawnSystem_1379(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) else call create_add_UnitSpawnSystem_1380(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endif else call create_add_UnitSpawnSystem_1381(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endif elseif CreateSpecial_typeId[this_1] <= 731 then call create_add_UnitSpawnSystem_1382(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) else call create_add_UnitSpawnSystem_1383(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endif endfunction function call_doAfter_SpecialWave_Wave takes integer this_1 returns nothing local integer j = 0 local integer temp = Wave_startPosCount loop exitwhen j > temp call dispatch_CreateSpecial_Wave_CreateSpecial_create(SpecialWave_special[this_1491[this_1]], vec2_toVec3(rect_randomPoint(Wave_spawnRects[j]), rect_randomPoint_return_y), vec2_toVec3_return_y, vec2_toVec3_return_z, SpecialWave_specialId[this_1491[this_1]], SpecialWave_bounty[this_1491[this_1]], Wave_middle_x, Wave_middle_y) set j = j + 1 endloop endfunction function CreateSpecial_onDestroy takes integer this_1 returns nothing endfunction function dealloc_CreateSpecial takes integer obj returns nothing if CreateSpecial_typeId[obj] == 0 then call error("Double free: object of type CreateSpecial") else set CreateSpecial_nextFree[CreateSpecial_firstFree] = obj set CreateSpecial_firstFree = CreateSpecial_firstFree + 1 set CreateSpecial_typeId[obj] = 0 endif endfunction function destroyCreateSpecial takes integer this_1 returns nothing call CreateSpecial_onDestroy(this_1) call dealloc_CreateSpecial(this_1) endfunction function dispatch_CreateSpecial_destroyCreateSpecial takes integer this_1 returns nothing if CreateSpecial_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CreateSpecial.CreateSpecial") else call error("Called CreateSpecial.CreateSpecial on invalid object.") endif endif call destroyCreateSpecial(this_1) endfunction function call_doAfter_SpecialWave_Wave_1184 takes integer this_1 returns nothing call dispatch_CreateSpecial_destroyCreateSpecial(SpecialWave_special[this_1492[this_1]]) endfunction function alloc_ForGroupCallback_forUnitsOfPlayer_doAfter_TownBell 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] = 803 else call error("Out of memory: Could not create ForGroupCallback_forUnitsOfPlayer_doAfter_TownBell.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 803 endif return this_1 endfunction function call_doAfter_TownBell takes integer this_1 returns nothing local player temp = TownBell_lastRinger local integer clVar = alloc_ForGroupCallback_forUnitsOfPlayer_doAfter_TownBell() call forUnitsOfPlayer(temp, clVar) 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_1600(bff, true) endloop call LLIterator_close(iterator) endif endfunction function ArtilleryTower_onUpgrade takes integer this_1 returns nothing local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 set ArtilleryTower_level[this_1] = ArtilleryTower_level[this_1] + 1 set receiver = UnitEntity_actor[this_1] call unit_addAbility(receiver, ArtilleryTower_SPELL_ID) set receiver_1 = receiver call unit_setAbilityLevel(receiver_1, ArtilleryTower_SPELL_ID, ArtilleryTower_level[this_1]) set receiver_2 = receiver_1 call unit_setPropWindow(receiver_2, real_fromDeg(0.)) set receiver_3 = receiver_2 call unit_issueImmediateOrderById(receiver_3, OrderId("stop")) endfunction function FlamethrowerTower_onUpgrade takes integer this_1 returns nothing call unit_issueImmediateOrderById(UnitEntity_actor[this_1], OrderId("stop")) set FlamethrowerTower_level[this_1] = FlamethrowerTower_level[this_1] + 1 endfunction function HealbackTower_onUpgrade takes integer this_1 returns nothing set HealbackTower_level[this_1] = HealbackTower_level[this_1] + 1 endfunction function ThermoTower_onUpgrade takes integer this_1 returns nothing set ThermoTower_level[this_1] = ThermoTower_level[this_1] + 1 endfunction function alloc_ArtilleryTower 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] = 956 else call error("Out of memory: Could not create ArtilleryTower.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 956 endif return this_1 endfunction function ArtilleryTower_init takes integer this_1 returns nothing set ArtilleryTower_level[this_1] = 1 endfunction function alloc_EventListener_add_Tower_Tower_1041 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] = 771 else call error("Out of memory: Could not create EventListener_add_Tower_Tower.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 771 endif return this_1 endfunction function FixedBuff_apply takes integer this_1, unit target_1 returns nothing local integer iterator local integer bff set Buff_target[this_1] = target_1 set iterator = LinkedList_iterator(unit_getBuffs(target_1)) loop exitwhen not LLIterator_hasNext(iterator) set bff = LLIterator_next(iterator) if Buff_typeId[bff] == Buff_typeId[this_1] then set Buff_target[this_1] = null call cyc_unit_removeBuff(10, null, this_1) call LLIterator_close(iterator) return endif endloop call LLIterator_close(iterator) call unit_addBuff(target_1, this_1) call dispatch_Buff_Buff_Buff_refresh(this_1) call cyc_Projectile_terminate(12, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endfunction function StackingBuff_apply takes integer this_1, unit target_1 returns nothing if unit_isAlive(target_1) then set Buff_target[this_1] = target_1 call unit_addBuff(target_1, this_1) call dispatch_Buff_Buff_Buff_refresh(this_1) call cyc_Projectile_terminate(12, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif endfunction function dispatch_Buff_Buff_Buff_apply takes integer this_1, unit target_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Buff.apply") else call error("Called Buff.apply on invalid object.") endif endif if Buff_typeId[this_1] <= 648 then if Buff_typeId[this_1] <= 645 then if Buff_typeId[this_1] <= 643 then call FixedBuff_apply(this_1, target_1) else call cyc_Projectile_terminate(13, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif elseif Buff_typeId[this_1] <= 647 then call cyc_Projectile_terminate(7, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) else call cyc_Projectile_terminate(6, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif elseif Buff_typeId[this_1] <= 650 then if Buff_typeId[this_1] <= 649 then call cyc_Projectile_terminate(7, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) else call cyc_Projectile_terminate(13, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif elseif Buff_typeId[this_1] <= 651 then call cyc_Projectile_terminate(5, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) else call StackingBuff_apply(this_1, target_1) endif endfunction function unit_transferBuffs takes unit this_1, unit otherEntity returns nothing local integer buffs local integer iterator local integer bff if otherEntity == null then call error("Target Entity may not be null") endif if this_1 == null then call error("Origin Entity may not be null") endif set buffs = unit_getBuffs(this_1) if buffs == 0 or dispatch_LinkedList_LinkedList_LinkedList_size(buffs) == 0 then return endif set iterator = LinkedList_iterator(buffs) loop exitwhen not LLIterator_hasNext(iterator) set bff = LLIterator_next(iterator) if not Buff_done[bff] then call dispatch_Buff_Buff_Buff_apply(bff, otherEntity) endif endloop call LLIterator_close(iterator) call dispatch_LinkedList_destroyLinkedList(buffs) set Buff_buffMap[unit_getIndex(this_1)] = 0 endfunction function construct_Tower2 takes integer this_1, integer oldTower returns nothing local integer clVar local unit temp local playerunitevent temp_1 call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, UnitEntity_actor[oldTower], 0, 0, 0., 0., 0., 0.) call Tower_init(this_1) call dispatch_EventListener_destroyEventListener(Tower_deathListener[oldTower]) call unit_transferBuffs(UnitEntity_actor[oldTower], UnitEntity_actor[this_1]) call cyc_Projectile_terminate(30, oldTower, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) set temp = UnitEntity_actor[this_1] set temp_1 = EVENT_PLAYER_UNIT_DEATH set clVar = alloc_EventListener_add_Tower_Tower_1041() call construct_EventListener(clVar) set this_1508[clVar] = this_1 set Tower_deathListener[this_1] = EventListener_add_274(temp, temp_1, clVar) endfunction function EventListener_onCast takes unit u_1, integer abilId, integer listener returns integer return EventListener_addSpellInternal(u_1, abilId, listener) endfunction function alloc_EventListener_add_ArtilleryTower_ArtilleryTower 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] = 750 else call error("Out of memory: Could not create EventListener_add_ArtilleryTower_ArtilleryTower.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 750 endif return this_1 endfunction function alloc_OnCastListener_onCast_ArtilleryTower_ArtilleryTower takes nothing returns integer local integer this_1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < JASS_MAX_ARRAY_SIZE then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set this_1 = OnCastListener_maxIndex set OnCastListener_typeId[this_1] = 880 else call error("Out of memory: Could not create OnCastListener_onCast_ArtilleryTower_ArtilleryTower.") set this_1 = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set this_1 = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[this_1] = 880 endif return this_1 endfunction function ArtilleryTower_registerSpell takes integer this_1 returns nothing local unit temp = UnitEntity_actor[this_1] local playerunitevent temp_1 = EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER local integer clVar = alloc_EventListener_add_ArtilleryTower_ArtilleryTower() local integer clVar_1 local unit temp_2 local integer temp_3 call construct_EventListener(clVar) set this_1504[clVar] = this_1 call EventListener_add_274(temp, temp_1, clVar) set temp_2 = UnitEntity_actor[this_1] set temp_3 = ArtilleryTower_SPELL_ID set clVar_1 = alloc_OnCastListener_onCast_ArtilleryTower_ArtilleryTower() call construct_OnCastListener(clVar_1) set this_1505[clVar_1] = this_1 call EventListener_onCast(temp_2, temp_3, clVar_1) endfunction function dispatch_ArtilleryTower_ArtilleryTower_ArtilleryTower_registerSpell takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ArtilleryTower.registerSpell") else call error("Called ArtilleryTower.registerSpell on invalid object.") endif endif call ArtilleryTower_registerSpell(this_1) endfunction function construct_ArtilleryTower takes integer this_1, integer t returns nothing local unit receiver local unit receiver_1 call construct_Tower2(this_1, t) call ArtilleryTower_init(this_1) set receiver = UnitEntity_actor[this_1] call unit_setPropWindow(receiver, real_fromDeg(0.)) set receiver_1 = receiver call unit_addAbility(receiver_1, ArtilleryTower_SPELL_ID) call dispatch_ArtilleryTower_ArtilleryTower_ArtilleryTower_registerSpell(this_1) endfunction function new_ArtilleryTower takes integer t returns integer local integer this_1 = alloc_ArtilleryTower() call construct_ArtilleryTower(this_1, t) return this_1 endfunction function alloc_FlamethrowerTower 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] = 957 else call error("Out of memory: Could not create FlamethrowerTower.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 957 endif return this_1 endfunction function FlamethrowerTower_init takes integer this_1 returns nothing set FlamethrowerTower_level[this_1] = 1 endfunction function construct_FlamethrowerTower takes integer this_1, integer t returns nothing call construct_Tower2(this_1, t) call FlamethrowerTower_init(this_1) endfunction function new_FlamethrowerTower takes integer t returns integer local integer this_1 = alloc_FlamethrowerTower() call construct_FlamethrowerTower(this_1, t) return this_1 endfunction function alloc_HealbackTower 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] = 958 else call error("Out of memory: Could not create HealbackTower.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 958 endif return this_1 endfunction function HealbackTower_init takes integer this_1 returns nothing set HealbackTower_level[this_1] = 1 endfunction function construct_HealbackTower takes integer this_1, integer t returns nothing call construct_Tower2(this_1, t) call HealbackTower_init(this_1) endfunction function new_HealbackTower takes integer t returns integer local integer this_1 = alloc_HealbackTower() call construct_HealbackTower(this_1, t) return this_1 endfunction function alloc_TrooperTower 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] = 960 else call error("Out of memory: Could not create TrooperTower.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 960 endif return this_1 endfunction function TrooperTower_init takes integer this_1 returns nothing set TrooperTower_troops[this_1] = new_LinkedList() set TrooperTower_level[this_1] = 0 endfunction function alloc_EventListener_add_TrooperTower_TrooperTower 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] = 773 else call error("Out of memory: Could not create EventListener_add_TrooperTower_TrooperTower.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 773 endif return this_1 endfunction function alloc_EventListener_add_TrooperTower_TrooperTower_1044 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] = 774 else call error("Out of memory: Could not create EventListener_add_TrooperTower_TrooperTower.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 774 endif return this_1 endfunction function alloc_Troop 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] = 963 else call error("Out of memory: Could not create Troop.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 963 endif return this_1 endfunction function Troop_init takes integer this_1 returns nothing endfunction function construct_Troop takes integer this_1, real pos_x, real pos_y, real pos_z, player owner_1 returns nothing call cyc_Projectile_terminate(8, this_1, 0., 0., 0., null, createUnitZ(owner_1, TrooperTower_TROOP_ID, pos_x, pos_y, pos_z, 0.), 0, 0, 0., 0., 0., 0.) call Troop_init(this_1) call dispatch_Entity_Entity_Entity_DupletListModule_deactivate(this_1) call unit_addAbility(UnitEntity_actor[this_1], Basics_LOCUST_ID) call unit_setPropWindow(UnitEntity_actor[this_1], real_fromDeg(0.)) endfunction function new_Troop takes real pos_x, real pos_y, real pos_z, player owner_1 returns integer local integer this_1 = alloc_Troop() call construct_Troop(this_1, pos_x, pos_y, pos_z, owner_1) return this_1 endfunction function TrooperTower_addTrooper takes integer this_1 returns nothing local real angleV local real angleD local integer iterator local integer troop local real tpos_x local real tpos_y local real tpos_z local unit receiver local unit receiver_1 local unit receiver_2 local unit receiver_3 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 call dispatch_LinkedList_LinkedList_LinkedList_add_1(TrooperTower_troops[this_1], new_Troop(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], Entity_owner[this_1])) set angleV = 360. / dispatch_LinkedList_LinkedList_LinkedList_size(TrooperTower_troops[this_1]) set angleD = 0. set iterator = LinkedList_iterator(TrooperTower_troops[this_1]) loop exitwhen not LLIterator_hasNext(iterator) set troop = LLIterator_next(iterator) set tuple_temp = vec2_withZ(vec2_polarOffset(vec3_toVec2(dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z), vec3_toVec2_return_y, real_asAngleDegrees(angleD), TrooperTower_DUMMY_DIST), vec2_polarOffset_return_y, vec3_getHeightMap(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) + 160.) set tuple_temp_1 = vec2_withZ_return_y set tuple_temp_2 = vec2_withZ_return_z set tpos_x = tuple_temp set tpos_y = tuple_temp_1 set tpos_z = tuple_temp_2 set receiver = UnitEntity_actor[troop] call unit_setVertexColor(receiver, Colors_COLOR_WHITE_red, Colors_COLOR_WHITE_green, Colors_COLOR_WHITE_blue, Colors_COLOR_WHITE_alpha) set receiver_1 = receiver call unit_unpause(receiver_1) set receiver_2 = receiver_1 call unit_setFacing(receiver_2, real_asAngleDegrees(angleD)) set receiver_3 = receiver_2 call unit_addAbility(receiver_3, Basics_LOCUST_ID) call dispatch_UnitEntity_Entity_UnitEntity_setXY(troop, tpos_x, tpos_y, tpos_z) set angleD = angleD + angleV endloop call LLIterator_close(iterator) endfunction function dispatch_TrooperTower_TrooperTower_TrooperTower_addTrooper takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling TrooperTower.addTrooper") else call error("Called TrooperTower.addTrooper on invalid object.") endif endif call TrooperTower_addTrooper(this_1) endfunction function construct_TrooperTower takes integer this_1, integer t returns nothing local integer clVar local integer clVar_1 local unit temp local playerunitevent temp_1 local unit temp_2 local playerunitevent temp_3 call construct_Tower2(this_1, t) call TrooperTower_init(this_1) call dispatch_TrooperTower_TrooperTower_TrooperTower_addTrooper(this_1) call dispatch_TrooperTower_TrooperTower_TrooperTower_addTrooper(this_1) call dispatch_TrooperTower_TrooperTower_TrooperTower_addTrooper(this_1) set temp = UnitEntity_actor[this_1] set temp_1 = EVENT_PLAYER_UNIT_UPGRADE_START set clVar = alloc_EventListener_add_TrooperTower_TrooperTower() call construct_EventListener(clVar) set this_1509[clVar] = this_1 call EventListener_add_274(temp, temp_1, clVar) set temp_2 = UnitEntity_actor[this_1] set temp_3 = EVENT_PLAYER_UNIT_UPGRADE_CANCEL set clVar_1 = alloc_EventListener_add_TrooperTower_TrooperTower_1044() call construct_EventListener(clVar_1) set this_1510[clVar_1] = this_1 call EventListener_add_274(temp_2, temp_3, clVar_1) endfunction function new_TrooperTower takes integer t returns integer local integer this_1 = alloc_TrooperTower() call construct_TrooperTower(this_1, t) return this_1 endfunction function alloc_WaveTower 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] = 961 else call error("Out of memory: Could not create WaveTower.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 961 endif return this_1 endfunction function WaveTower_init takes integer this_1 returns nothing set WaveTower_level[this_1] = 1 endfunction function construct_WaveTower takes integer this_1, integer t returns nothing call construct_Tower2(this_1, t) call WaveTower_init(this_1) endfunction function new_WaveTower takes integer t returns integer local integer this_1 = alloc_WaveTower() call construct_WaveTower(this_1, t) return this_1 endfunction function printLog takes integer loglvl, string msg returns nothing call printLog_2283(Player_localPlayer, loglvl, msg) endfunction function Tower_onUpgrade takes integer this_1 returns nothing local integer temp = unit_getTypeId(UnitEntity_actor[this_1]) if temp == WaveTower_FIRST_WAVE_ID then call unit_setEntity(UnitEntity_actor[this_1], 0) call new_WaveTower(this_1) elseif temp == TrooperTower_TOWER_TROOPER_ID then call unit_setEntity(UnitEntity_actor[this_1], 0) call new_TrooperTower(this_1) elseif temp == FlamethrowerTower_FLAMETHROWER_ID then call unit_setEntity(UnitEntity_actor[this_1], 0) call new_FlamethrowerTower(this_1) elseif temp == ArtilleryTower_ART_TOWER_ID then call unit_setEntity(UnitEntity_actor[this_1], 0) call new_ArtilleryTower(this_1) elseif temp == HealbackTower_HEALBACK_TOWER_ID then call unit_setEntity(UnitEntity_actor[this_1], 0) call new_HealbackTower(this_1) else call printLog(0, "upgrade not catched") endif call unit_issueImmediateOrder(UnitEntity_actor[this_1], "stop") endfunction function TrooperTower_onUpgrade takes integer this_1 returns nothing set TrooperTower_level[this_1] = TrooperTower_level[this_1] + 1 call dispatch_TrooperTower_TrooperTower_TrooperTower_addTrooper(this_1) call unit_issueImmediateOrder(UnitEntity_actor[this_1], "stop") endfunction function WaveTower_onUpgrade takes integer this_1 returns nothing call unit_issueImmediateOrderById(UnitEntity_actor[this_1], OrderId("stop")) set WaveTower_level[this_1] = WaveTower_level[this_1] + 1 endfunction function dispatch_Tower_Tower_Tower_onUpgrade takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Tower.onUpgrade") else call error("Called Tower.onUpgrade on invalid object.") endif endif if Serializable_typeId[this_1] <= 958 then if Serializable_typeId[this_1] <= 956 then if Serializable_typeId[this_1] <= 955 then call Tower_onUpgrade(this_1) else call ArtilleryTower_onUpgrade(this_1) endif elseif Serializable_typeId[this_1] <= 957 then call FlamethrowerTower_onUpgrade(this_1) else call HealbackTower_onUpgrade(this_1) endif elseif Serializable_typeId[this_1] <= 960 then if Serializable_typeId[this_1] <= 959 then call ThermoTower_onUpgrade(this_1) else call TrooperTower_onUpgrade(this_1) endif else call WaveTower_onUpgrade(this_1) endif endfunction function call_doAfter_add_Tower takes integer this_1 returns nothing call dispatch_Tower_Tower_Tower_onUpgrade(data_1167[this_1]) endfunction function alloc_CallbackCounted_doPeriodicallyTimed_doAfter_doAfter_GameInit takes nothing returns integer local integer this_1 if CallbackCounted_firstFree == 0 then if CallbackCounted_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackCounted_maxIndex = CallbackCounted_maxIndex + 1 set this_1 = CallbackCounted_maxIndex set CallbackCounted_typeId[this_1] = 660 else call error("Out of memory: Could not create CallbackCounted_doPeriodicallyTimed_doAfter_doAfter_GameInit.") set this_1 = 0 endif else set CallbackCounted_firstFree = CallbackCounted_firstFree - 1 set this_1 = CallbackCounted_nextFree[CallbackCounted_firstFree] set CallbackCounted_typeId[this_1] = 660 endif return this_1 endfunction function call_doAfter_doAfter_GameInit takes integer this_1 returns nothing local integer instance2_1 = dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(GameInit_snd2) local integer clVar = alloc_CallbackCounted_doPeriodicallyTimed_doAfter_doAfter_GameInit() call construct_CallbackCounted(clVar) set instance2[clVar] = instance2_1 call doPeriodicallyTimed(0.3, 10., clVar) endfunction function call_doAfter_doAfter_GameInit_1189 takes integer this_1 returns integer return dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(snd3_1452[this_1]) endfunction function call_doAfter_onCast_Selector_Selector takes integer this_1 returns nothing call effect_destr(eff_1184[this_1]) endfunction function call_doAfter_onTargetCast_SuperCharge takes integer this_1 returns nothing call unit_setAbilityLevel(target[this_1], SuperCharge_REPAIR_ID, 1) endfunction function trigger_registerPlayerChatEvent takes trigger this_1, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns event return TriggerRegisterPlayerChatEvent(this_1, whichPlayer, chatMessageToDetect, exactMatchOnly) endfunction function call_nullTimer_ClosureEvents takes integer this_1 returns nothing local integer i local integer temp local trigger receiver local trigger receiver_1 local trigger receiver_2 local trigger receiver_3 local trigger receiver_4 local trigger receiver_5 local trigger receiver_6 local trigger receiver_7 local trigger receiver_8 local trigger receiver_9 call trigger_addAction(ClosureEvents_unitTrig, ref_function_code__addAction_nullTimer_ClosureEvents) call trigger_addAction(ClosureEvents_leaveTrig, ref_function_code__addAction_nullTimer_ClosureEvents_1300) call trigger_addAction(ClosureEvents_keyTrig, ref_function_code__addAction_nullTimer_ClosureEvents_1301) 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_2316(EVENT_PLAYER_UNIT_SPELL_EFFECT, null, ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents, null) endfunction function Log_debug takes string msg returns nothing call printLog_2283(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] = 790 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] = 790 endif return this_1 endfunction function alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_1060 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] = 791 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] = 791 endif return this_1 endfunction function alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_1061 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] = 792 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] = 792 endif return this_1 endfunction function alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_1062 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] = 793 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] = 793 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 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_1469[this_1]])) set clVar = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder() set this_1470[clVar] = this_1469[this_1] call execute(clVar) call Log_debug("encoded hash") set clVar_1 = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_1060() set this_1471[clVar_1] = this_1469[this_1] call execute(clVar_1) call Log_debug("clean") set clVar_2 = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_1061() set this_1472[clVar_2] = this_1469[this_1] call execute(clVar_2) call Log_debug("before toString bs: " + int_toString(dispatch_BigString_BigString_BigString_getLength(bs_1149[this_1]))) set clVar_3 = alloc_ForForceCallback_execute_nullTimer_Encoder_Encoder_1062() set this_1473[clVar_3] = this_1469[this_1] set bs_1150[clVar_3] = bs_1149[this_1] set onFinish_1246[clVar_3] = onFinish_1245[this_1] call execute(clVar_3) endfunction function group_enumUnitsInRect_1908 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_1908(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 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] = 796 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] = 796 endif return this_1 endfunction function group_forEachFrom takes group this_1, integer cb_1 returns nothing local group from = this_1 local unit u_1 loop exitwhen not group_hasNext(from) set u_1 = group_next(from) call dispatch_ForGroupCallback_ClosureForGroups_ForGroupCallback_callback(cb_1, u_1) endloop call dispatch_ForGroupCallback_destroyForGroupCallback(cb_1) endfunction function finishPreload takes nothing returns nothing local integer clVar local group temp call unit_remove(Preloader_dum) set temp = Preloader_dumg set clVar = alloc_ForGroupCallback_forEachFrom_Preloader() call group_forEachFrom(temp, clVar) call group_destr(Preloader_dumg) set Preloader_dumg = null endfunction function call_nullTimer_Preloader takes integer this_1 returns nothing call finishPreload() endfunction function alloc_CallbackSingle_doAfter_SoundDefinition_SoundUtils takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 692 else call error("Out of memory: Could not create CallbackSingle_doAfter_SoundDefinition_SoundUtils.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 692 endif return this_1 endfunction function sound_play takes sound this_1 returns nothing call StartSound(this_1) endfunction function SoundDefinition_playSound takes integer this_1, integer instance_1 returns nothing local integer clVar local real temp if SoundInstance_onUnit[instance_1] != null then call AttachSoundToUnit(SoundInstance_snd[instance_1], SoundInstance_onUnit[instance_1]) endif if SoundInstance_pos_x[instance_1] != 0. or SoundInstance_pos_y[instance_1] != 0. then call SetSoundPosition(SoundInstance_snd[instance_1], SoundInstance_pos_x[instance_1], SoundInstance_pos_y[instance_1], SoundInstance_pos_z[instance_1]) endif if SoundInstance_p[instance_1] != null then if GetLocalPlayer() == SoundInstance_p[instance_1] then call StartSound(SoundInstance_snd[instance_1]) endif else call sound_play(SoundInstance_snd[instance_1]) endif set temp = SoundDefinition_duration[SoundInstance_soundDef[instance_1]] * 0.001 set clVar = alloc_CallbackSingle_doAfter_SoundDefinition_SoundUtils() call construct_CallbackSingle(clVar) set this_1484[clVar] = this_1 set instance[clVar] = instance_1 call doAfter(temp, clVar) endfunction function dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound takes integer this_1, integer instance_1 returns nothing if SoundDefinition_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SoundDefinition.playSound") else call error("Called SoundDefinition.playSound on invalid object.") endif endif call SoundDefinition_playSound(this_1, instance_1) endfunction function call_nullTimer_SoundDefinition_SoundUtils takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_1481[this_1], snd[this_1]) endfunction function call_nullTimer_SoundDefinition_SoundUtils_1201 takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_1482[this_1], snd_1449[this_1]) endfunction function call_nullTimer_SoundDefinition_SoundUtils_1202 takes integer this_1 returns nothing call dispatch_SoundDefinition_SoundUtils_SoundDefinition_playSound(this_1483[this_1], snd_1450[this_1]) 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] = 915 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] = 915 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 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_1188[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_1189[clVar] = encoder_1188[this_1] set dictSize_1171[clVar] = dictSize_1 set positions[clVar] = positions_1 set onFinish_1251[clVar] = onFinish_1250[this_1] call doSeq(clVar) endfunction function call_nullTimer_onCast_ArtilleryTower_ArtilleryTower takes integer this_1 returns nothing local unit receiver = UnitEntity_actor[this_1506[this_1]] local unit receiver_1 local unit receiver_2 call unit_issueImmediateOrderById(receiver, OrderId("stop")) set receiver_1 = receiver call unit_removeAbility(receiver_1, ArtilleryTower_SPELL_ID) set receiver_2 = receiver_1 call unit_addAbility(receiver_2, ArtilleryTower_SPELL_ID) 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] <= 689 then if CallbackSingle_typeId[this_1] <= 676 then if CallbackSingle_typeId[this_1] <= 670 then if CallbackSingle_typeId[this_1] <= 667 then if CallbackSingle_typeId[this_1] <= 665 then if CallbackSingle_typeId[this_1] <= 664 then call call_doAfter_BossFive_BossFive(this_1) else call call_doAfter_BossFive_BossFive_1150(this_1) endif elseif CallbackSingle_typeId[this_1] <= 666 then call call_doAfter_Builder(this_1) else call call_doAfter_ClosureTimers(this_1) endif elseif CallbackSingle_typeId[this_1] <= 669 then if CallbackSingle_typeId[this_1] <= 668 then call call_doAfter_ClosureTimers_1153(this_1) else call call_doAfter_ClosureTimers_1154(this_1) endif else call call_doAfter_ClosureTimers_1155(this_1) endif elseif CallbackSingle_typeId[this_1] <= 673 then if CallbackSingle_typeId[this_1] <= 672 then if CallbackSingle_typeId[this_1] <= 671 then call call_doAfter_Creep_Creep_1157(this_1) else call call_doAfter_Creep_Creep(this_1) endif else call call_doAfter_DummyRecycler_DummyRecycler(this_1) endif elseif CallbackSingle_typeId[this_1] <= 675 then if CallbackSingle_typeId[this_1] <= 674 then call call_doAfter_EndBoss(this_1) else call call_doAfter_EndBoss_EndBoss(this_1) endif else call call_doAfter_EndBoss_EndBoss_1161(this_1) endif elseif CallbackSingle_typeId[this_1] <= 683 then if CallbackSingle_typeId[this_1] <= 680 then if CallbackSingle_typeId[this_1] <= 678 then if CallbackSingle_typeId[this_1] <= 677 then call call_doAfter_FText_FText(this_1) else call call_doAfter_FinalBossSummoning_DestroyerSummoner(this_1) endif elseif CallbackSingle_typeId[this_1] <= 679 then call call_doAfter_GameConditions(this_1) else call call_doAfter_GameConditions_1165(this_1) endif elseif CallbackSingle_typeId[this_1] <= 682 then if CallbackSingle_typeId[this_1] <= 681 then call call_doAfter_GameInit(this_1) else call call_doAfter_GameInit_1167(this_1) endif else call call_doAfter_GameInit_1168(this_1) endif elseif CallbackSingle_typeId[this_1] <= 686 then if CallbackSingle_typeId[this_1] <= 685 then if CallbackSingle_typeId[this_1] <= 684 then call call_doAfter_GameInit_1169(this_1) else call call_doAfter_InstanceBoard(this_1) endif else call call_doAfter_LumberAndCoinSystem(this_1) endif elseif CallbackSingle_typeId[this_1] <= 688 then if CallbackSingle_typeId[this_1] <= 687 then call call_doAfter_MultiboardSystem(this_1) else call call_doAfter_NormalWave_Wave(this_1) endif else call call_doAfter_NormalWave_Wave_1174(this_1) endif elseif CallbackSingle_typeId[this_1] <= 702 then if CallbackSingle_typeId[this_1] <= 696 then if CallbackSingle_typeId[this_1] <= 693 then if CallbackSingle_typeId[this_1] <= 691 then if CallbackSingle_typeId[this_1] <= 690 then call call_doAfter_NormalWave_Wave_1175(this_1) else call call_doAfter_NormalWave_Wave_1176(this_1) endif elseif CallbackSingle_typeId[this_1] <= 692 then call call_doAfter_SoundDefinition_SoundUtils(this_1) else call call_doAfter_SpecialFive_SpecialFive(this_1) endif elseif CallbackSingle_typeId[this_1] <= 695 then if CallbackSingle_typeId[this_1] <= 694 then call call_doAfter_SpecialFive_SpecialFive_1179(this_1) else call call_doAfter_SpecialTwo_SpecialTwo(this_1) endif else call call_doAfter_SpecialTwo_SpecialTwo_1181(this_1) endif elseif CallbackSingle_typeId[this_1] <= 699 then if CallbackSingle_typeId[this_1] <= 698 then if CallbackSingle_typeId[this_1] <= 697 then call call_doAfter_SpecialTwo_SpecialTwo_1182(this_1) else call call_doAfter_SpecialWave_Wave(this_1) endif else call call_doAfter_SpecialWave_Wave_1184(this_1) endif elseif CallbackSingle_typeId[this_1] <= 701 then if CallbackSingle_typeId[this_1] <= 700 then call call_doAfter_TownBell(this_1) else call call_doAfter_add_Buff(this_1) endif else call call_doAfter_add_Tower(this_1) endif elseif CallbackSingle_typeId[this_1] <= 709 then if CallbackSingle_typeId[this_1] <= 706 then if CallbackSingle_typeId[this_1] <= 704 then if CallbackSingle_typeId[this_1] <= 703 then call call_doAfter_doAfter_GameInit(this_1) else call call_doAfter_doAfter_GameInit_1189(this_1) endif elseif CallbackSingle_typeId[this_1] <= 705 then call call_doAfter_onCast_Selector_Selector(this_1) else call call_doAfter_onTargetCast_SuperCharge(this_1) endif elseif CallbackSingle_typeId[this_1] <= 708 then if CallbackSingle_typeId[this_1] <= 707 then call call_nullTimer_ClosureEvents(this_1) else call call_nullTimer_Encoder_Encoder(this_1) endif else call call_nullTimer_OnUnitEnterLeave(this_1) endif elseif CallbackSingle_typeId[this_1] <= 712 then if CallbackSingle_typeId[this_1] <= 711 then if CallbackSingle_typeId[this_1] <= 710 then call call_nullTimer_Preloader(this_1) else call call_nullTimer_SoundDefinition_SoundUtils(this_1) endif else call call_nullTimer_SoundDefinition_SoundUtils_1201(this_1) endif elseif CallbackSingle_typeId[this_1] <= 714 then if CallbackSingle_typeId[this_1] <= 713 then call call_nullTimer_SoundDefinition_SoundUtils_1202(this_1) else call call_nullTimer_load_LZW(this_1) endif else call call_nullTimer_onCast_ArtilleryTower_ArtilleryTower(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] = 787 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] = 787 endif return this_1 endfunction function alloc_ForForceCallback_execute_fromString_Encoder_Encoder_1057 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] = 788 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] = 788 endif return this_1 endfunction function alloc_ForForceCallback_execute_fromString_Encoder_Encoder_1058 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] = 789 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] = 789 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_config_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] = 914 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] = 914 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_2160 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_2160(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_1241[clVar] = itr_1 set A_1[clVar] = A_2 set B_45[clVar] = B_1 set output_1259[clVar] = output[this_1] set onFinish_1255[clVar] = onFinish_1254[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] = 714 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] = 714 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 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_1188[clVar] = encoder_1187[this_1] set onFinish_1250[clVar] = onFinish_1249[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_1248[this_1]] = PayloadCallback_customData[pc] call dispatch_Encoder_destroyEncoder(encoder_1186[this_1]) call cyc_onExecute_save_doSeq_LZW(5, onFinish_1248[this_1], 0) elseif funcChoice == 1 then call Log_debug("loaded..") set clVar = alloc_ForForceCallback_execute_fromString_Encoder_Encoder() set this_1475[clVar] = this_1474[this_1] call execute(clVar) call Log_debug("decoded..") set clVar_1 = alloc_ForForceCallback_execute_fromString_Encoder_Encoder_1057() set this_1476[clVar_1] = this_1474[this_1] call execute(clVar_1) call Log_debug("claned..") set clVar_2 = alloc_ForForceCallback_execute_fromString_Encoder_Encoder_1058() set this_1477[clVar_2] = this_1474[this_1] call execute(clVar_2) call Log_debug("hashed..") set PayloadCallback_customData[onFinishLoad[this_1]] = boolean_toInt(Encoder_inputhash[this_1474[this_1]] == Encoder_comparehash[this_1474[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_1253[this_1]] = encoded call cyc_onExecute_save_doSeq_LZW(5, onFinish_1253[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] <= 894 then if PayloadCallback_typeId[this_1] <= 893 then if PayloadCallback_typeId[this_1] <= 892 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] <= 895 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_2364 takes string this_1, integer start_1 returns string return SubString(this_1, start_1, 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_2364(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_1465[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] = 636 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] = 636 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_2229 takes integer this_1, integer cb_1 returns boolean local boolean continue = true set BigNum_l_leaf[w_cur_1074[this_1]] = dispatch_Encoder_Encoder_Encoder_chartoi(this_1466[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_1074[this_1]] = new_BigNum_l() set w_cur_1074[this_1] = BigNum_l_next[w_cur_1074[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] = 638 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] = 638 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_1, integer length returns nothing call BigSubString_init(this_1) set BigSubString_parent[this_1] = parent set BigSubString_start[this_1] = start_1 set BigSubString_length[this_1] = length endfunction function new_BigSubString_2125 takes integer parent, integer start_1, integer length returns integer local integer this_1 = alloc_BigSubString() call construct_BigSubString2(this_1, parent, start_1, 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_2125(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_2125(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_1479[this_1]] < dispatch_BigString_BigString_BigString_getLength(JsonParser_bigInput[this_1479[this_1]]) then call dispatch_JsonParser_JsonParser_JsonParser_parseListSeq(this_1479[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_2125(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_2125(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_2125(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_2125(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_2125(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_2231 takes integer this_1, integer cb_1 returns boolean local boolean continue = true if JsonParser_currentPosition[this_1480[this_1]] < dispatch_BigString_BigString_BigString_getLength(JsonParser_bigInput[this_1480[this_1]]) then call dispatch_JsonParser_JsonParser_JsonParser_parseSeq(this_1480[this_1]) else set continue = false if JsonParser_propStartPosition[this_1480[this_1]] < JsonParser_currentPosition[this_1480[this_1]] then set JsonParser_propVal[this_1480[this_1]] = new_BigSubString_2125(JsonParser_bigInput[this_1480[this_1]], JsonParser_propStartPosition[this_1480[this_1]], JsonParser_currentPosition[this_1480[this_1]] - JsonParser_propStartPosition[this_1480[this_1]]) call dispatch_Json_Json_Json_addProperty(JsonParser_output[this_1480[this_1]], new_Property(JsonParser_propName[this_1480[this_1]], JsonParser_propVal[this_1480[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] = 896 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] = 896 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] = 708 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] = 708 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] = 781 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] = 781 endif return this_1 endfunction function alloc_ForForceCallback_execute_Encoder_Encoder_1051 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] = 782 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] = 782 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_1467[clVar] = this_1 call execute(clVar) call Log_debug("save2") set Encoder_hash[this_1] = -1 set clVar_1 = alloc_ForForceCallback_execute_Encoder_Encoder_1051() set this_1468[clVar_1] = this_1 call execute(clVar_1) set clVar_2 = alloc_CallbackSingle_nullTimer_Encoder_Encoder() call construct_CallbackSingle(clVar_2) set this_1469[clVar_2] = this_1 set bs_1149[clVar_2] = bs_1 set onFinish_1245[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] = 637 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] = 637 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_1248[clVar] = onFinish_1247[this_1] set encoder_1186[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] = 893 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] = 893 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_2125(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] = 912 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] = 912 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] = 744 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] = 744 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] = 635 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] = 635 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 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_config_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_1247[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 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 onExecute_doSeq_LZW_2233 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_1235[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_1235[this_1], dispatch_HashMap_HashMap_HashMap_get(LZW_dictionary, stringToIndex(dispatch_BigSubString_BigString_BigSubString_getSingle(B[this_1])))) endif set temp = intList_1235[this_1] set temp_1 = LZW_dictSize set clVar = alloc_PayloadCallback_encodePositions_doSeq_LZW() call construct_PayloadCallback(clVar) set onFinish_1253[clVar] = onFinish_1252[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_1241[this_1]) then set idx = dispatch_LLIterator_LinkedList_LLIterator_next(itr_1241[this_1]) set A_1[this_1] = dispatch_Table_Table_Table_loadString(LZW_dictionary, idx) if dispatch_LLIterator_LinkedList_LLIterator_hasNext(itr_1241[this_1]) and dispatch_LLIterator_LinkedList_LLIterator_lookahead(itr_1241[this_1]) < LZW_dictSize then set B_45[this_1] = dispatch_Table_Table_Table_loadString(LZW_dictionary, dispatch_LLIterator_LinkedList_LLIterator_lookahead(itr_1241[this_1])) set B_45[this_1] = string_charAt(B_45[this_1], 0) elseif not dispatch_LLIterator_LinkedList_LLIterator_hasNext(itr_1241[this_1]) then set B_45[this_1] = null else set B_45[this_1] = string_charAt(A_1[this_1], 0) endif if B_45[this_1] != null and string_length(B_45[this_1]) > 0 then call putDict(A_1[this_1] + B_45[this_1]) endif call dispatch_BigString_BigString_BigString_addString(output_1259[this_1], A_1[this_1]) else set continue = false call Log_debug("decompressed") call dispatch_BigString_BigString_BigString_debugPrint(output_1259[this_1]) set PayloadCallback_customData[onFinish_1255[this_1]] = output_1259[this_1] call cyc_onExecute_save_doSeq_LZW(5, onFinish_1255[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_1189[this_1]]) then set dec = dispatch_Encoder_Encoder_Encoder_decode(encoder_1189[this_1], dictSize_1171[this_1]) call dispatch_LinkedList_LinkedList_LinkedList_addtoStart(positions[this_1], dec) else set continue = false if Printing_config_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_1251[this_1]] = positions[this_1] call cyc_onExecute_save_doSeq_LZW(5, onFinish_1251[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] <= 911 then if SeqCallback_typeId[this_1] <= 909 then if SeqCallback_typeId[this_1] <= 908 then set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_Encoder_Encoder(this_1, cb_1) else set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_Encoder_Encoder_2229(this_1, cb_1) endif elseif SeqCallback_typeId[this_1] <= 910 then set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_JsonParser_JsonParser(this_1, cb_1) else set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_JsonParser_JsonParser_2231(this_1, cb_1) endif elseif SeqCallback_typeId[this_1] <= 913 then if SeqCallback_typeId[this_1] <= 912 then set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_LZW(this_1, cb_1) else set SeqWorker_SeqCallback_onExecute_result = onExecute_doSeq_LZW_2233(this_1, cb_1) endif elseif SeqCallback_typeId[this_1] <= 914 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_1315) 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_1237 takes nothing returns nothing call onSeq() endfunction function alloc_CallbackSingle_doAfter_GameConditions 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] = 679 else call error("Out of memory: Could not create CallbackSingle_doAfter_GameConditions.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 679 endif return this_1 endfunction function endGameTimer takes nothing returns nothing local integer clVar call print("|cffFFCC00>> The Magic Treasure has been destroyed.|r\nYou failed!") call timer_pause(GameConditions_gameTime) set clVar = alloc_CallbackSingle_doAfter_GameConditions() call construct_CallbackSingle(clVar) call doAfter(1., clVar) call stopSpawn() 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_1467[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_2318 takes integer this_1 returns nothing set Encoder_hash[this_1468[this_1]] = dispatch_Encoder_Encoder_Encoder_hash(this_1468[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] = 783 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] = 783 endif return this_1 endfunction function executeWhileInternal takes integer resetCount_1, integer condition_1, integer action_1 returns nothing local integer clVar = alloc_ForForceCallback_execute_Execute() set condition[clVar] = condition_1 set resetCount[clVar] = resetCount_1 set action[clVar] = action_1 call execute(clVar) endfunction function run_execute_Execute takes integer this_1 returns nothing local integer i = 0 loop exitwhen not (dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check(condition[this_1]) and i < resetCount[this_1]) call dispatch_LimitedExecuteAction_Execute_LimitedExecuteAction_run(action[this_1]) set i = i + 1 endloop if dispatch_LimitedExecuteCondition_Execute_LimitedExecuteCondition_check(condition[this_1]) then call executeWhileInternal(resetCount[this_1], condition[this_1], action[this_1]) endif endfunction function run_execute_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 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 run_execute_Heightmap_2322 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_1607[this_1]] = Reference_val[xRef_1607[this_1]] + 1 set x = Reference_val[xRef_1607[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_1609[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_1609[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_1609[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_1609[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 run_execute_fromString_Encoder_Encoder takes integer this_1 returns nothing set Encoder_inputhash[this_1475[this_1]] = dispatch_Encoder_Encoder_Encoder_decode(this_1475[this_1], Encoder_maxHash) endfunction function run_execute_fromString_Encoder_Encoder_2324 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_clean(this_1476[this_1]) endfunction function run_execute_fromString_Encoder_Encoder_2325 takes integer this_1 returns nothing set Encoder_comparehash[this_1477[this_1]] = dispatch_Encoder_Encoder_Encoder_hash(this_1477[this_1]) endfunction function run_execute_nullTimer_Encoder_Encoder takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_encode(this_1470[this_1], Encoder_hash[this_1470[this_1]], Encoder_maxHash) endfunction function run_execute_nullTimer_Encoder_Encoder_2327 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_clean(this_1471[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_2328 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_pad(this_1472[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] = 908 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] = 908 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_1465[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_2329 takes integer this_1 returns nothing call dispatch_Encoder_Encoder_Encoder_toString(this_1473[this_1], bs_1150[this_1], onFinish_1246[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] <= 787 then if ForForceCallback_typeId[this_1] <= 784 then if ForForceCallback_typeId[this_1] <= 782 then if ForForceCallback_typeId[this_1] <= 781 then call run_execute_Encoder_Encoder(this_1) else call run_execute_Encoder_Encoder_2318(this_1) endif elseif ForForceCallback_typeId[this_1] <= 783 then call run_execute_Execute(this_1) else call run_execute_GroupUtils(this_1) endif elseif ForForceCallback_typeId[this_1] <= 786 then if ForForceCallback_typeId[this_1] <= 785 then call run_execute_Heightmap(this_1) else call run_execute_Heightmap_2322(this_1) endif else call run_execute_fromString_Encoder_Encoder(this_1) endif elseif ForForceCallback_typeId[this_1] <= 790 then if ForForceCallback_typeId[this_1] <= 789 then if ForForceCallback_typeId[this_1] <= 788 then call run_execute_fromString_Encoder_Encoder_2324(this_1) else call run_execute_fromString_Encoder_Encoder_2325(this_1) endif else call run_execute_nullTimer_Encoder_Encoder(this_1) endif elseif ForForceCallback_typeId[this_1] <= 792 then if ForForceCallback_typeId[this_1] <= 791 then call run_execute_nullTimer_Encoder_Encoder_2327(this_1) else call run_execute_nullTimer_Encoder_Encoder_2328(this_1) endif else call run_execute_nullTimer_Encoder_Encoder_2329(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 set Abilities_aIamTarget = "Abilities\\Spells\\Items\\AIam\\AIamTarget.mdx" set Abilities_avatarCaster = "Abilities\\Spells\\Human\\Avatar\\AvatarCaster.mdx" set Abilities_bansheeMissile = "Abilities\\Weapons\\BansheeMissile\\BansheeMissile.mdx" set Abilities_cannonTowerMissile = "Abilities\\Weapons\\CannonTowerMissile\\CannonTowerMissile.mdx" set Abilities_charmTarget = "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdx" set Abilities_crushingWaveMissile = "Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveMissile.mdx" set Abilities_deathCoilMissile = "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdx" set Abilities_faerieDragonMissile = "Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdx" set Abilities_feralspiritdone = "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdx" set Abilities_fragDriller = "Abilities\\Weapons\\FragDriller\\FragDriller.mdx" set Abilities_gryphonRiderMissileTarget = "Abilities\\Weapons\\GryphonRiderMissile\\GryphonRiderMissileTarget.mdx" set Abilities_howlTarget = "Abilities\\Spells\\Other\\HowlOfTerror\\HowlTarget.mdx" set Abilities_illidanMissile = "Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdx" set Abilities_manaFlareBoltImpact = "Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdx" set Abilities_markOfChaosTarget = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdx" set Abilities_massTeleportTarget = "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdx" set Abilities_plagueCloudCaster = "Abilities\\Spells\\Undead\\PlagueCloud\\PlagueCloudCaster.mdx" set Abilities_resourceEffectTarget = "Abilities\\Spells\\Items\\ResourceItems\\ResourceEffectTarget.mdx" set Abilities_reviveHuman = "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdx" set Abilities_reviveNightElf = "Abilities\\Spells\\NightElf\\ReviveNightElf\\ReviveNightElf.mdx" set Abilities_roarCaster = "Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdx" set Abilities_spellShieldCaster = "Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdx" set Abilities_vampiricAuraTarget = "Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdx" set Abilities_voodooAura = "Abilities\\Spells\\Orc\\Voodoo\\VoodooAura.mdx" 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_ArtilleryTower takes nothing returns boolean set ArtilleryTower_MISSILE_SPEED = 1000. * Basics_ANIMATION_PERIOD set ArtilleryTower_ART_TOWER_ID = 1747988815 set ArtilleryTower_SPELL_ID = 1093677396 return true endfunction function init_AssassinTower takes nothing returns boolean 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_MAX_COLLISION_SIZE = 197.0 set Basics_HEIGHT_ENABLER = 1097691750 set Basics_LOCUST_ID = 1097625443 set Basics_GHOST_VIS_ID = 1097167976 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 init_Boss takes nothing returns boolean set Boss_snd = new_SoundDefinition(Sounds_abominationAlternateDeath1, false) return true endfunction function init_BossFour takes nothing returns boolean local integer tuple_temp = 1095577657 local integer tuple_temp_1 = 1112354870 set BossFour_jumpyBuff_abilId = tuple_temp set BossFour_jumpyBuff_buffId = tuple_temp_1 set BossFour_JUMP_DIST = 512 * 512 return true endfunction function init_BossThree takes nothing returns boolean local integer tuple_temp = 1095577656 local integer tuple_temp_1 = 1112354869 set BossThree_pudgeBuffAbil_abilId = tuple_temp set BossThree_pudgeBuffAbil_buffId = tuple_temp_1 return true endfunction function init_BossTwo takes nothing returns boolean local integer tuple_temp = 1095577655 local integer tuple_temp_1 = 1112354868 set BossTwo_buffAbil_abilId = tuple_temp set BossTwo_buffAbil_buffId = tuple_temp_1 set BossTwo_TENTACLE_ID = 1966092375 return true endfunction function init_Bounty takes nothing returns boolean set Bounty_TEXTTAG_TEXTSIZE = 0.024 / 0.0023 set Bounty_TEXTTAG_VELOCITY = .03 set Bounty_TEXTTAG_LIFESPAN = 3. return true endfunction function DamageEvent_addListener_170 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_170(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] = 737 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] = 737 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] = 752 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] = 752 endif return this_1 endfunction function alloc_EventListener_add_Buff_1023 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] = 753 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] = 753 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_1078 takes nothing returns integer local integer this_1 if Iterator_firstFree_569 == 0 then if Iterator_maxIndex_572 < JASS_MAX_ARRAY_SIZE then set Iterator_maxIndex_572 = Iterator_maxIndex_572 + 1 set this_1 = Iterator_maxIndex_572 set Iterator_typeId_578[this_1] = 854 else call error("Out of memory: Could not create Iterator.") set this_1 = 0 endif else set Iterator_firstFree_569 = Iterator_firstFree_569 - 1 set this_1 = Iterator_nextFree_575[Iterator_firstFree_569] set Iterator_typeId_578[this_1] = 854 endif return this_1 endfunction function Iterator_init_518 takes integer this_1 returns nothing set Iterator_current_565[this_1] = Buff_LinkedListModule_first endfunction function construct_Iterator_1303 takes integer this_1, boolean destroyOnClose returns nothing call Iterator_init_518(this_1) endfunction function new_Iterator_2155 takes boolean destroyOnClose returns integer local integer this_1 = alloc_Iterator_1078() call construct_Iterator_1303(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_BUFF_ANIM_PERIOD = 0.25 set Buff_LinkedListModule_first = 0 set Buff_LinkedListModule_last = 0 set Buff_LinkedListModule_size = 0 call new_Iterator_2155(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_1023() 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_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] = 707 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] = 707 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] = 985 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] = 985 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 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 set ClosureForGroups_DUMMY_GROUP = CreateGroup() set ClosureForGroups_tempCallbacksCount = 0 set ClosureForGroups_maxCount = Integer_INT_MAX set ClosureForGroups_iterCount = 0 set ClosureForGroups_filter = 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 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] = 984 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] = 984 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 init_Creep takes nothing returns boolean local integer i set Creep_CREEP_OWNER = Player_players[9] set i = 0 loop exitwhen i > 31 call R2I(Pow(2., I2R(i))) set i = i + 1 endloop 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] = 755 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] = 755 endif return this_1 endfunction function alloc_EventListener_add_DamageEvent_1026 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] = 756 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] = 756 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_1026() 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] = 757 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] = 757 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 EventListener_onCast_279 takes integer abilId, integer listener returns integer return EventListener_addSpellInternal(null, abilId, listener) endfunction function alloc_OnCastListener_onCast_Destroy takes nothing returns integer local integer this_1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < JASS_MAX_ARRAY_SIZE then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set this_1 = OnCastListener_maxIndex set OnCastListener_typeId[this_1] = 881 else call error("Out of memory: Could not create OnCastListener_onCast_Destroy.") set this_1 = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set this_1 = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[this_1] = 881 endif return this_1 endfunction function init_Destroy takes nothing returns boolean local integer clVar = alloc_OnCastListener_onCast_Destroy() call construct_OnCastListener(clVar) call EventListener_onCast_279(1093677125, clVar) return true endfunction function init_DestroyerSummoner takes nothing returns boolean set DestroyerSummoner_SUMMONER_ID = 1966092598 set DestroyerSummoner_DESTROYER_ID = 1848651857 set DestroyerSummoner_SUMMON_CASTING_EFFECT_ABIL = 1093677642 set DestroyerSummoner_SUMMONER_BOUNTY = 99 set DestroyerSummoner_DESTROYER_BOUNTY = 666 set DestroyerSummoner_updatePeriod = .05 set DestroyerSummoner_animationLoopPeriod = 45. return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_Doodads takes nothing returns boolean return true 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 = 2016423986 set DummyRecycler_ROOT_ENABLER = 1095577653 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_Music takes nothing returns integer local integer this_1 if Music_firstFree == 0 then if Music_maxIndex < JASS_MAX_ARRAY_SIZE then set Music_maxIndex = Music_maxIndex + 1 set this_1 = Music_maxIndex else call error("Out of memory: Could not create Music.") set this_1 = 0 endif else set Music_firstFree = Music_firstFree - 1 set this_1 = Music_nextFree[Music_firstFree] endif return this_1 endfunction function Music_init takes integer this_1 returns nothing endfunction function string_lastIndexOf takes string this_1, string s returns integer local integer i = string_length(this_1) - string_length(s) loop exitwhen i < 0 if string_substring(this_1, i, i + string_length(s)) == s then return i endif set i = i - 1 endloop return -1 endfunction function construct_Music takes integer this_1, integer id_1, string path returns nothing call Music_init(this_1) set Music_path[this_1] = path call GetSoundFileDuration(path) call string_substring(path, string_lastIndexOf(path, "\\") + 1, string_lastIndexOf(path, ".")) endfunction function new_Music takes integer id_1, string path returns integer local integer this_1 = alloc_Music() call construct_Music(this_1, id_1, path) return this_1 endfunction function init_EndBoss takes nothing returns boolean set EndBoss_ENDBOSS_ID = 1848651856 set EndBoss_m = new_Music(808464432, "Sound\\Music\\mp3Music\\Doom.mp3") set EndBoss_stageTwoPercentage = .33 set EndBoss_stageThreePercentage = .10 return true endfunction function init_EndGame takes nothing returns boolean set EndGame_gameOver = false 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] = 759 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] = 759 endif return this_1 endfunction function alloc_EventListener_add_Entity_1030 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] = 760 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] = 760 endif return this_1 endfunction function alloc_EventListener_add_Entity_1031 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] = 761 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] = 761 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_firstInactive = 0 set Entity_DupletListModule_lastInactive = 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_1030() 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_1031() 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_2155(true) endfunction function init_EntityManagement takes nothing returns boolean set EntityManagement_activeItr = Entity_DupletListModule_iterator() set EntityManagement_buffItr = 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_1228 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_932 takes nothing returns integer local integer this_1 if BackIterator_firstFree_47 == 0 then if BackIterator_maxIndex_49 < JASS_MAX_ARRAY_SIZE then set BackIterator_maxIndex_49 = BackIterator_maxIndex_49 + 1 set this_1 = BackIterator_maxIndex_49 else call error("Out of memory: Could not create BackIterator.") set this_1 = 0 endif else set BackIterator_firstFree_47 = BackIterator_firstFree_47 - 1 set this_1 = BackIterator_nextFree_51[BackIterator_firstFree_47] endif return this_1 endfunction function BackIterator_init_18 takes integer this_1 returns nothing endfunction function construct_BackIterator_1254 takes integer this_1, boolean destroyOnClose returns nothing call BackIterator_init_18(this_1) endfunction function new_BackIterator_2120 takes boolean destroyOnClose returns integer local integer this_1 = alloc_BackIterator_932() call construct_BackIterator_1254(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_2156(false) call new_BackIterator_2120(false) return true endfunction function alloc_ForGroupCallback_forUnitsInRange_FieldGenerator 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] = 798 else call error("Out of memory: Could not create ForGroupCallback_forUnitsInRange_FieldGenerator.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 798 endif return this_1 endfunction function init_FieldGenerator takes nothing returns boolean local real tuple_temp = Vectors_ZERO2_x local real tuple_temp_1 = Vectors_ZERO2_y local real temp_x = tuple_temp local real temp_y = tuple_temp_1 local integer clVar = alloc_ForGroupCallback_forUnitsInRange_FieldGenerator() call forUnitsInRange(temp_x, temp_y, 128., clVar) return true endfunction function init_FlamethrowerTower takes nothing returns boolean set FlamethrowerTower_FX_PATH = "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl" set FlamethrowerTower_AOE_RADIUS = 48. set FlamethrowerTower_FLAMETHROWER_ID = 1747988803 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_1, string inherits, integer createContext returns framehandle call verifyFrameNameLength(name) return BlzCreateFrameByType(typeName, name, owner_1, 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 return true endfunction function init_Frentity_config takes nothing returns boolean set Frentity_config_DYNAMIC_Z = true set Frentity_config_KILL_ACTORS = true set Frentity_config_DISABLE_TEAMATTACK = true set Frentity_config_SHOW_SQUARE = true return true endfunction function init_Fx2Entity takes nothing returns boolean return true endfunction function init_GameConditions takes nothing returns boolean set GameConditions_gameTime = getTimer() return true endfunction function alloc_CallbackSingle_doAfter_GameInit_964 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] = 684 else call error("Out of memory: Could not create CallbackSingle_doAfter_GameInit.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 684 endif return this_1 endfunction function init_GameInit takes nothing returns boolean local integer clVar set GameInit_pitch = 1.01 set GameInit_snd2 = new_SoundDefinition("Sound\\Dialogue\\OrcCampaign\\Orc04Interlude\\O04Mannoroth38.mp3", false) call CameraSetupApplyForceDuration(gg_cam_Camera_003, true, 0.) set clVar = alloc_CallbackSingle_doAfter_GameInit_964() call construct_CallbackSingle(clVar) call doAfter(0.025, clVar) 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 set Group_ENUM_GROUP = CreateGroup() return true 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_NEED_CREATE_GROUPS = 64 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() set GroupUtils_shownDestrWarning = false return true endfunction function init_HashList takes nothing returns boolean set HashList_ht = hashtable_compiletime_1226 set HashList_occurences = hashtable_compiletime_1227 return true endfunction function alloc_Comparator_HealbackTower_HealbackTower 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 set Comparator_typeId[this_1] = 717 else call error("Out of memory: Could not create Comparator_HealbackTower_HealbackTower.") set this_1 = 0 endif else set Comparator_firstFree = Comparator_firstFree - 1 set this_1 = Comparator_nextFree[Comparator_firstFree] set Comparator_typeId[this_1] = 717 endif return this_1 endfunction function init_HealbackTower takes nothing returns boolean local integer clVar local real tuple_temp local real tuple_temp_1 set HealbackTower_HEALBACK_TOWER_ID = 1747989057 set HealbackTower_HEALBACK_MULTIPLIERS[0] = 1.75 set HealbackTower_HEALBACK_MULTIPLIERS[1] = 1.5 set HealbackTower_HEALBACK_MULTIPLIERS[2] = 2.0 set HealbackTower_HEALBACK_MULTIPLIERS[3] = 1.95 set HealbackTower_HEALBACK_MISSILE_COUNTS[0] = 1 set HealbackTower_HEALBACK_MISSILE_COUNTS[1] = 2 set HealbackTower_HEALBACK_MISSILE_COUNTS[2] = 2 set HealbackTower_HEALBACK_MISSILE_COUNTS[3] = 3 set HealbackTower_HEALBACK_RANGES[0] = 865. set HealbackTower_HEALBACK_RANGES[1] = 885. set HealbackTower_HEALBACK_RANGES[2] = 915. set HealbackTower_HEALBACK_RANGES[3] = 950. set HealbackTower_nearEntities = new_LinkedList() set tuple_temp = Vectors_ZERO2_x set tuple_temp_1 = Vectors_ZERO2_y set HealbackTower_statSource_x = tuple_temp set HealbackTower_statSource_y = tuple_temp_1 set clVar = alloc_Comparator_HealbackTower_HealbackTower() set HealbackTower_comparator = clVar set HealbackTower_HEALBACK_RADIUS = 32. set HealbackTower_HEALBACK_EFFECT = Abilities_vampiricAuraTarget set HealbackTower_HEALBACK_MISSILE_EFFECT = Abilities_faerieDragonMissile 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] = 785 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] = 785 endif return this_1 endfunction function alloc_ForForceCallback_execute_Heightmap_1055 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] = 786 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] = 786 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] <= 985 then if Table_typeId[this_1] <= 984 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] <= 985 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] = 904 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] = 904 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_1055() set xRef_1607[clVar_1] = xRef_1 set zMap_1609[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 init_Icons takes nothing returns boolean return true endfunction function alloc_CallbackSingle_doAfter_InstanceBoard 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] = 685 else call error("Out of memory: Could not create CallbackSingle_doAfter_InstanceBoard.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 685 endif return this_1 endfunction function init_InstanceBoard takes nothing returns boolean local integer clVar set InstanceBoard_classes = 0 call InitHashtable() set InstanceBoard_mb = null set clVar = alloc_CallbackSingle_doAfter_InstanceBoard() call construct_CallbackSingle(clVar) call doAfter(0.0, clVar) 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 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 set Comparator_typeId[this_1] = 718 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] set Comparator_typeId[this_1] = 718 endif return this_1 endfunction function alloc_Comparator_LinkedList_996 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 set Comparator_typeId[this_1] = 719 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] set Comparator_typeId[this_1] = 719 endif return this_1 endfunction function alloc_Comparator_LinkedList_997 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 set Comparator_typeId[this_1] = 720 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] set Comparator_typeId[this_1] = 720 endif return this_1 endfunction function init_LinkedList takes nothing returns boolean call alloc_Comparator_LinkedList() call alloc_Comparator_LinkedList_996() call alloc_Comparator_LinkedList_997() call realToIndex(0.) return true endfunction function init_LumberAndCoinSystem takes nothing returns boolean set LumberAndCoinSystem_WOOD_REDISTRIBUTE_THRESHOLD = 15 set LumberAndCoinSystem_WOOD_BOUNTY = 1 set LumberAndCoinSystem_COIN_ID = 1227894854 set LumberAndCoinSystem_WOOD_ID = 1227894856 set LumberAndCoinSystem_killcount = 0 set LumberAndCoinSystem_killcap = 18. set LumberAndCoinSystem_coinCount = GetRandomInt(-2, 3) set LumberAndCoinSystem_coinCap = 16 set LumberAndCoinSystem_coinsSpawned = 0 set LumberAndCoinSystem_WOOD_REDISTRIBUTE_MIN_WAIT = 60. set LumberAndCoinSystem_lastRedistribute = 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 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 set Maths_PI = 3.141592654 set Maths_PI2 = 6.28318 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_CallbackSingle_doAfter_MultiboardSystem 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] = 687 else call error("Out of memory: Could not create CallbackSingle_doAfter_MultiboardSystem.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 687 endif return this_1 endfunction function init_MultiboardSystem takes nothing returns boolean local integer clVar = alloc_CallbackSingle_doAfter_MultiboardSystem() call construct_CallbackSingle(clVar) call doAfter(0.25, clVar) return true endfunction function alloc_IdGenerator takes nothing returns integer local integer this_1 if IdGenerator_firstFree == 0 then if IdGenerator_maxIndex < JASS_MAX_ARRAY_SIZE then set IdGenerator_maxIndex = IdGenerator_maxIndex + 1 set this_1 = IdGenerator_maxIndex else call error("Out of memory: Could not create IdGenerator.") set this_1 = 0 endif else set IdGenerator_firstFree = IdGenerator_firstFree - 1 set this_1 = IdGenerator_nextFree[IdGenerator_firstFree] endif return this_1 endfunction function IdGenerator_init takes integer this_1 returns nothing endfunction function construct_IdGenerator takes integer this_1, integer start_1 returns nothing call IdGenerator_init(this_1) endfunction function new_IdGenerator takes integer start_1 returns integer local integer this_1 = alloc_IdGenerator() call construct_IdGenerator(this_1, start_1) return this_1 endfunction function init_ObjectIdGenerator takes nothing returns boolean call new_IdGenerator(2016423984) call new_IdGenerator(1213018160) call new_IdGenerator(1095577648) call new_IdGenerator(1112354864) call new_IdGenerator(1229795376) call new_IdGenerator(1380790320) return true endfunction function init_ObjectIds takes nothing returns boolean set ObjectIds_CHARMAP = ".................................!.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................." return true endfunction function init_Objects takes nothing returns boolean set Objects_demonLargeDeathExplode = "Objects\\Spawnmodels\\Demon\\DemonLargeDeathExplode\\DemonLargeDeathExplode.mdx" set Objects_demonSmallDeathExplode = "Objects\\Spawnmodels\\Demon\\DemonSmallDeathExplode\\DemonSmallDeathExplode.mdx" set Objects_entBirthTarget = "Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdx" set Objects_hCancelDeath = "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdx" return true endfunction function alloc_CallbackSingle_nullTimer_OnUnitEnterLeave takes nothing returns integer local integer this_1 if CallbackSingle_firstFree == 0 then if CallbackSingle_maxIndex < JASS_MAX_ARRAY_SIZE then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_1 = CallbackSingle_maxIndex set CallbackSingle_typeId[this_1] = 709 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] = 709 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 SpecialOrders_smart = 851971 set OrderIds_attack = 851983 set OrderIds_locustswarm = 852556 set OrderIds_move = 851986 set OrderIds_undefend = 852056 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_PlayerData takes nothing returns boolean set PlayerData_allPlayers = new_LinkedList() 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_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] = 710 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] = 710 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_MSG_DURATION = 45. return true endfunction function init_Printing_config takes nothing returns boolean set Printing_config_DEBUG_LEVEL = 4 return true endfunction function init_Quaternion 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 = 1. set Quaternion_IDENTITYQ_x = tuple_temp set Quaternion_IDENTITYQ_y = tuple_temp_1 set Quaternion_IDENTITYQ_z = tuple_temp_2 set Quaternion_IDENTITYQ_w = tuple_temp_3 set Quaternion_EPSILON = 0.001 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 alloc_EventListener_add_Reinforcements 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] = 765 else call error("Out of memory: Could not create EventListener_add_Reinforcements.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 765 endif return this_1 endfunction function init_Reinforcements takes nothing returns boolean local integer clVar local playerunitevent temp set Reinforcements_ITEM_ID = 1227894838 set Reinforcements_ARCHER_ID = 1848651853 set Reinforcements_PRIEST_ID = 1848651854 set temp = EVENT_PLAYER_UNIT_PICKUP_ITEM set clVar = alloc_EventListener_add_Reinforcements() call construct_EventListener(clVar) call EventListener_add(temp, clVar) return true endfunction function alloc_EventListener_add_RevivalSystem 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] = 766 else call error("Out of memory: Could not create EventListener_add_RevivalSystem.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 766 endif return this_1 endfunction function init_RevivalSystem takes nothing returns boolean local playerunitevent temp = EVENT_PLAYER_UNIT_USE_ITEM local integer clVar = alloc_EventListener_add_RevivalSystem() call construct_EventListener(clVar) call EventListener_add(temp, clVar) return true endfunction function EventListener_onPointCast takes integer abilId, integer listener returns integer return EventListener_addSpellInternal(null, abilId, listener) endfunction function alloc_OnPointCast_onPointCast_Rocket takes nothing returns integer local integer this_1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < JASS_MAX_ARRAY_SIZE then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set this_1 = OnCastListener_maxIndex set OnCastListener_typeId[this_1] = 883 else call error("Out of memory: Could not create OnPointCast_onPointCast_Rocket.") set this_1 = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set this_1 = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[this_1] = 883 endif return this_1 endfunction function OnPointCast_init takes integer this_1 returns nothing endfunction function construct_OnPointCast takes integer this_1 returns nothing call construct_OnCastListener(this_1) call OnPointCast_init(this_1) endfunction function init_Rocket takes nothing returns boolean local integer clVar local integer temp set Rocket_ROCKET_ITEM_ID = 1227894832 set Rocket_ROCKET_SPELL_ID = 1093677402 set Rocket_UNDER_ATTACK_SOUND = new_SoundDefinition(Sounds_genericWarningUnitAttack1, false) set temp = Rocket_ROCKET_SPELL_ID set clVar = alloc_OnPointCast_onPointCast_Rocket() call construct_OnPointCast(clVar) call EventListener_onPointCast(temp, clVar) return true endfunction function init_Selector takes nothing returns boolean set Selector_FAT_ID = 1747989042 set Selector_SLIM_ID = 1747988550 set Selector_ELVEN_ID = 1747989049 set Selector_FAT_SPELL_ID = 1093677401 set Selector_SLIM_SPELL_ID = 1093677400 set Selector_ELVEN_SPELL_ID = 1093677388 set Selector_PUDDING_ID = 1227894850 set Selector_ENERGY_ID = 1227894851 set Selector_ROCK_ID = 1227894852 call new_SoundDefinition("Units\\Creeps\\Ogre\\OgrePissed5.wav", false) return true endfunction function EventListener_onTargetCast takes integer abilId, integer listener returns integer return EventListener_addSpellInternal(null, abilId, listener) endfunction function alloc_OnUnitCast_onTargetCast_ShieldKit takes nothing returns integer local integer this_1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < JASS_MAX_ARRAY_SIZE then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set this_1 = OnCastListener_maxIndex set OnCastListener_typeId[this_1] = 885 else call error("Out of memory: Could not create OnUnitCast_onTargetCast_ShieldKit.") set this_1 = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set this_1 = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[this_1] = 885 endif return this_1 endfunction function OnUnitCast_init takes integer this_1 returns nothing endfunction function construct_OnUnitCast takes integer this_1 returns nothing call construct_OnCastListener(this_1) call OnUnitCast_init(this_1) endfunction function init_ShieldKit takes nothing returns boolean local integer tuple_temp = 1095577650 local integer tuple_temp_1 = 1112354865 local integer clVar set ShieldKit_buffAbil_abilId = tuple_temp set ShieldKit_buffAbil_buffId = tuple_temp_1 set clVar = alloc_OnUnitCast_onTargetCast_ShieldKit() call construct_OnUnitCast(clVar) call EventListener_onTargetCast(1093677124, clVar) return true endfunction function init_Simulate3dSound takes nothing returns boolean return true endfunction function init_SoundUtils takes nothing returns boolean set SoundUtils_DEFAULT_SOUND_STOPS_ON_LEAVE_RANGE = true set SoundUtils_DEFAULT_SOUND_FADE_IN_RATE = 10 set SoundUtils_DEFAULT_SOUND_FADE_OUT_RATE = 10 set SoundUtils_DEFAULT_SOUND_EAX_SETTINGS = "CombatSoundsEAX" set SoundUtils_DEFAULT_SOUND_VOLUME = 127 set SoundUtils_DEFAULT_SOUND_PITCH = 1. set SoundUtils_DEFAULT_SOUND_DURATION = 10000 set SoundUtils_SOUND_CHANNEL = 5 set SoundUtils_SOUND_MIN_DIST = 600. set SoundUtils_SOUND_MAX_DIST = 8000. set SoundUtils_SOUND_DIST_CUT = 1500. return true endfunction function init_Sounds takes nothing returns boolean set Sounds_abominationAlternateDeath1 = "Units\\Undead\\Abomination\\AbominationAlternateDeath1.wav" set Sounds_abominationPissed5 = "Units\\Undead\\Abomination\\AbominationPissed5.wav" set Sounds_airBargeDeath1 = "Units\\Undead\\UndeadAirBarge\\AirBargeDeath1.wav" set Sounds_duneWormDeath1 = "Units\\Critters\\DuneWorm\\DuneWormDeath1.wav" set Sounds_genericWarningUnitAttack1 = "Sound\\Dialogue\\GenericWarnings\\GenericWarningUnitAttack1.mp3" set Sounds_h01Uther03 = "Sound\\Dialogue\\HumanCampaign\\Human01\\H01Uther03.mp3" set Sounds_humanCallToArmsWhat1 = "Abilities\\Spells\\Human\\CallToArms\\HumanCallToArmsWhat1.wav" set Sounds_hydraDeath1 = "Units\\Creeps\\Hydra\\HydraDeath1.wav" set Sounds_skeletonWhat2 = "Units\\Undead\\Skeleton\\SkeletonWhat2.wav" return true endfunction function init_Soundsets takes nothing returns boolean return true endfunction function init_Special takes nothing returns boolean set Special_UNIT_ID_DARKONE = 2016423985 return true endfunction function init_SpecialFive takes nothing returns boolean set SpecialFive_SPAWNTIME = 35 set SpecialFive_SPAWNAMOUNT = 2 set SpecialFive_SPAWNID = 1966092597 return true endfunction function init_SpecialTwo takes nothing returns boolean set SpecialTwo_SOUL1_ID = 1966092354 set SpecialTwo_SOUL2_ID = 1966092355 set SpecialTwo_SOUL3_ID = 1966092356 set SpecialTwo_SOUL4_ID = 1966092357 return true endfunction function init_SphereTower takes nothing returns boolean set SphereTower_AREA_OF_EFFECT = 40. 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_StompingTower takes nothing returns boolean return true endfunction function init_String takes nothing returns boolean set String_charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" set String_numberset = "0123456789" call string_length(String_numberset) set String_charsetlength = 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_2073 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_2073() call stringToIndex("") return true endfunction function alloc_OnUnitCast_onTargetCast_SuperCharge takes nothing returns integer local integer this_1 if OnCastListener_firstFree == 0 then if OnCastListener_maxIndex < JASS_MAX_ARRAY_SIZE then set OnCastListener_maxIndex = OnCastListener_maxIndex + 1 set this_1 = OnCastListener_maxIndex set OnCastListener_typeId[this_1] = 886 else call error("Out of memory: Could not create OnUnitCast_onTargetCast_SuperCharge.") set this_1 = 0 endif else set OnCastListener_firstFree = OnCastListener_firstFree - 1 set this_1 = OnCastListener_nextFree[OnCastListener_firstFree] set OnCastListener_typeId[this_1] = 886 endif return this_1 endfunction function init_SuperCharge takes nothing returns boolean local integer clVar local integer temp set SuperCharge_ITEM_ABILITY_ID = 1093677389 set SuperCharge_REPAIR_ID = 1097364080 set temp = SuperCharge_ITEM_ABILITY_ID set clVar = alloc_OnUnitCast_onTargetCast_SuperCharge() call construct_OnUnitCast(clVar) call EventListener_onTargetCast(temp, clVar) return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime return true endfunction function init_TargetsAllowed takes nothing returns boolean return true endfunction function init_TerrainUtils takes nothing returns boolean local item receiver set TerrainUtils_MAX_RANGE_SQ = 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) set TerrainUtils_dummyItem = receiver set TerrainUtils_itemSearchRect = Rect(0., 0., 128., 128.) set TerrainUtils_hiddenItemsCount = 0 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_ThermoTower takes nothing returns boolean set ThermoTower_buffcode = 1114010223 set ThermoTower_ORB_ID = 1093677395 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 alloc_DamageListener_addListener_Tower 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] = 738 else call error("Out of memory: Could not create DamageListener_addListener_Tower.") set this_1 = 0 endif else set DamageListener_firstFree = DamageListener_firstFree - 1 set this_1 = DamageListener_nextFree[DamageListener_firstFree] set DamageListener_typeId[this_1] = 738 endif return this_1 endfunction function alloc_EventListener_add_Tower 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] = 767 else call error("Out of memory: Could not create EventListener_add_Tower.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 767 endif return this_1 endfunction function alloc_EventListener_add_Tower_1038 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] = 768 else call error("Out of memory: Could not create EventListener_add_Tower.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 768 endif return this_1 endfunction function init_Tower takes nothing returns boolean local integer clVar local integer clVar_1 local integer clVar_2 local playerunitevent temp local playerunitevent temp_1 set Tower_BASIC_TOWER_ID = 1747988531 set Tower_BASIC_WALL_ID = 1747988528 set Tower_STOPPER_QUICKBUILD_ID = 1747989048 set temp = EVENT_PLAYER_UNIT_CONSTRUCT_START set clVar = alloc_EventListener_add_Tower() call construct_EventListener(clVar) call EventListener_add(temp, clVar) set temp_1 = EVENT_PLAYER_UNIT_UPGRADE_FINISH set clVar_1 = alloc_EventListener_add_Tower_1038() call construct_EventListener(clVar_1) call EventListener_add(temp_1, clVar_1) set clVar_2 = alloc_DamageListener_addListener_Tower() call construct_DamageListener(clVar_2) call DamageEvent_addListener(clVar_2) return true endfunction function init_TowerBlockade takes nothing returns boolean local integer tuple_temp = 1095577652 local integer tuple_temp_1 = 1112354867 set TowerBlockade_blockadeBuff_abilId = tuple_temp set TowerBlockade_blockadeBuff_buffId = tuple_temp_1 set TowerBlockade_BLOCKADE_DURATION = 25. set TowerBlockade_BLOCKADE_UNIT = 1966092599 return true endfunction function alloc_EventListener_add_TownBell 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] = 772 else call error("Out of memory: Could not create EventListener_add_TownBell.") set this_1 = 0 endif else set EventListener_firstFree = EventListener_firstFree - 1 set this_1 = EventListener_nextFree[EventListener_firstFree] set EventListener_typeId[this_1] = 772 endif return this_1 endfunction function init_TownBell takes nothing returns boolean local integer clVar local playerunitevent temp set TownBell_TOWN_BELL_ITEM_ID = 1227894853 set TownBell_TOWER_ID = 1747989045 set TownBell_DUMMY_ID = 1747988548 set TownBell_SPELL_DURATION = 30.0 set TownBell_snd = new_SoundDefinition(Sounds_humanCallToArmsWhat1, false) set TownBell_usages = 0 set temp = EVENT_PLAYER_UNIT_PICKUP_ITEM set clVar = alloc_EventListener_add_TownBell() call construct_EventListener(clVar) call EventListener_add(temp, clVar) return true endfunction function init_TrooperTower takes nothing returns boolean set TrooperTower_DUMMY_DIST = 15. set TrooperTower_TOWER_TROOPER_ID = 1747988805 set TrooperTower_TROOP_ID = 1747988806 set TrooperTower_TROOPG_ID = 1747989060 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 set UI_goldCredit = "UI\\Feedback\\GoldCredit\\GoldCredit.mdx" 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 alloc_CreateBoss_add_UnitSpawnSystem takes nothing returns integer local integer this_1 if CreateBoss_firstFree == 0 then if CreateBoss_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateBoss_maxIndex = CreateBoss_maxIndex + 1 set this_1 = CreateBoss_maxIndex set CreateBoss_typeId[this_1] = 722 else call error("Out of memory: Could not create CreateBoss_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateBoss_firstFree = CreateBoss_firstFree - 1 set this_1 = CreateBoss_nextFree[CreateBoss_firstFree] set CreateBoss_typeId[this_1] = 722 endif return this_1 endfunction function alloc_CreateBoss_add_UnitSpawnSystem_1000 takes nothing returns integer local integer this_1 if CreateBoss_firstFree == 0 then if CreateBoss_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateBoss_maxIndex = CreateBoss_maxIndex + 1 set this_1 = CreateBoss_maxIndex set CreateBoss_typeId[this_1] = 724 else call error("Out of memory: Could not create CreateBoss_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateBoss_firstFree = CreateBoss_firstFree - 1 set this_1 = CreateBoss_nextFree[CreateBoss_firstFree] set CreateBoss_typeId[this_1] = 724 endif return this_1 endfunction function alloc_CreateBoss_add_UnitSpawnSystem_1001 takes nothing returns integer local integer this_1 if CreateBoss_firstFree == 0 then if CreateBoss_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateBoss_maxIndex = CreateBoss_maxIndex + 1 set this_1 = CreateBoss_maxIndex set CreateBoss_typeId[this_1] = 725 else call error("Out of memory: Could not create CreateBoss_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateBoss_firstFree = CreateBoss_firstFree - 1 set this_1 = CreateBoss_nextFree[CreateBoss_firstFree] set CreateBoss_typeId[this_1] = 725 endif return this_1 endfunction function alloc_CreateBoss_add_UnitSpawnSystem_1002 takes nothing returns integer local integer this_1 if CreateBoss_firstFree == 0 then if CreateBoss_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateBoss_maxIndex = CreateBoss_maxIndex + 1 set this_1 = CreateBoss_maxIndex set CreateBoss_typeId[this_1] = 726 else call error("Out of memory: Could not create CreateBoss_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateBoss_firstFree = CreateBoss_firstFree - 1 set this_1 = CreateBoss_nextFree[CreateBoss_firstFree] set CreateBoss_typeId[this_1] = 726 endif return this_1 endfunction function alloc_CreateBoss_add_UnitSpawnSystem_999 takes nothing returns integer local integer this_1 if CreateBoss_firstFree == 0 then if CreateBoss_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateBoss_maxIndex = CreateBoss_maxIndex + 1 set this_1 = CreateBoss_maxIndex set CreateBoss_typeId[this_1] = 723 else call error("Out of memory: Could not create CreateBoss_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateBoss_firstFree = CreateBoss_firstFree - 1 set this_1 = CreateBoss_nextFree[CreateBoss_firstFree] set CreateBoss_typeId[this_1] = 723 endif return this_1 endfunction function alloc_CreateSpecial_add_UnitSpawnSystem takes nothing returns integer local integer this_1 if CreateSpecial_firstFree == 0 then if CreateSpecial_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateSpecial_maxIndex = CreateSpecial_maxIndex + 1 set this_1 = CreateSpecial_maxIndex set CreateSpecial_typeId[this_1] = 728 else call error("Out of memory: Could not create CreateSpecial_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateSpecial_firstFree = CreateSpecial_firstFree - 1 set this_1 = CreateSpecial_nextFree[CreateSpecial_firstFree] set CreateSpecial_typeId[this_1] = 728 endif return this_1 endfunction function alloc_CreateSpecial_add_UnitSpawnSystem_1004 takes nothing returns integer local integer this_1 if CreateSpecial_firstFree == 0 then if CreateSpecial_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateSpecial_maxIndex = CreateSpecial_maxIndex + 1 set this_1 = CreateSpecial_maxIndex set CreateSpecial_typeId[this_1] = 729 else call error("Out of memory: Could not create CreateSpecial_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateSpecial_firstFree = CreateSpecial_firstFree - 1 set this_1 = CreateSpecial_nextFree[CreateSpecial_firstFree] set CreateSpecial_typeId[this_1] = 729 endif return this_1 endfunction function alloc_CreateSpecial_add_UnitSpawnSystem_1005 takes nothing returns integer local integer this_1 if CreateSpecial_firstFree == 0 then if CreateSpecial_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateSpecial_maxIndex = CreateSpecial_maxIndex + 1 set this_1 = CreateSpecial_maxIndex set CreateSpecial_typeId[this_1] = 730 else call error("Out of memory: Could not create CreateSpecial_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateSpecial_firstFree = CreateSpecial_firstFree - 1 set this_1 = CreateSpecial_nextFree[CreateSpecial_firstFree] set CreateSpecial_typeId[this_1] = 730 endif return this_1 endfunction function alloc_CreateSpecial_add_UnitSpawnSystem_1006 takes nothing returns integer local integer this_1 if CreateSpecial_firstFree == 0 then if CreateSpecial_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateSpecial_maxIndex = CreateSpecial_maxIndex + 1 set this_1 = CreateSpecial_maxIndex set CreateSpecial_typeId[this_1] = 731 else call error("Out of memory: Could not create CreateSpecial_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateSpecial_firstFree = CreateSpecial_firstFree - 1 set this_1 = CreateSpecial_nextFree[CreateSpecial_firstFree] set CreateSpecial_typeId[this_1] = 731 endif return this_1 endfunction function alloc_CreateSpecial_add_UnitSpawnSystem_1007 takes nothing returns integer local integer this_1 if CreateSpecial_firstFree == 0 then if CreateSpecial_maxIndex < JASS_MAX_ARRAY_SIZE then set CreateSpecial_maxIndex = CreateSpecial_maxIndex + 1 set this_1 = CreateSpecial_maxIndex set CreateSpecial_typeId[this_1] = 732 else call error("Out of memory: Could not create CreateSpecial_add_UnitSpawnSystem.") set this_1 = 0 endif else set CreateSpecial_firstFree = CreateSpecial_firstFree - 1 set this_1 = CreateSpecial_nextFree[CreateSpecial_firstFree] set CreateSpecial_typeId[this_1] = 732 endif return this_1 endfunction function CreateBoss_init takes integer this_1 returns nothing endfunction function construct_CreateBoss takes integer this_1 returns nothing call CreateBoss_init(this_1) endfunction function CreateSpecial_init takes integer this_1 returns nothing endfunction function construct_CreateSpecial takes integer this_1 returns nothing call CreateSpecial_init(this_1) endfunction function alloc_BossWave takes nothing returns integer local integer this_1 if BossWave_firstFree == 0 then if BossWave_maxIndex < JASS_MAX_ARRAY_SIZE then set BossWave_maxIndex = BossWave_maxIndex + 1 set this_1 = BossWave_maxIndex set BossWave_typeId[this_1] = 641 else call error("Out of memory: Could not create BossWave.") set this_1 = 0 endif else set BossWave_firstFree = BossWave_firstFree - 1 set this_1 = BossWave_nextFree[BossWave_firstFree] set BossWave_typeId[this_1] = 641 endif return this_1 endfunction function BossWave_init takes integer this_1 returns nothing endfunction function construct_BossWave takes integer this_1, integer bossId, integer amount, integer bounty, string s, integer boss returns nothing call BossWave_init(this_1) set BossWave_bossId[this_1] = bossId set BossWave_amount[this_1] = amount set BossWave_bounty[this_1] = bounty set BossWave_s[this_1] = new_SoundDefinition(s, false) set BossWave_boss[this_1] = boss endfunction function new_BossWave takes integer bossId, integer amount, integer bounty, string s, integer boss returns integer local integer this_1 = alloc_BossWave() call construct_BossWave(this_1, bossId, amount, bounty, s, boss) return this_1 endfunction function alloc_NormalWave takes nothing returns integer local integer this_1 if NormalWave_firstFree == 0 then if NormalWave_maxIndex < JASS_MAX_ARRAY_SIZE then set NormalWave_maxIndex = NormalWave_maxIndex + 1 set this_1 = NormalWave_maxIndex set NormalWave_typeId[this_1] = 875 else call error("Out of memory: Could not create NormalWave.") set this_1 = 0 endif else set NormalWave_firstFree = NormalWave_firstFree - 1 set this_1 = NormalWave_nextFree[NormalWave_firstFree] set NormalWave_typeId[this_1] = 875 endif return this_1 endfunction function NormalWave_init takes integer this_1 returns nothing set NormalWave_typ[this_1] = 0 endfunction function construct_NormalWave takes integer this_1, integer meleeId, integer mageId, integer rangedId, integer amount, integer bounty returns nothing call NormalWave_init(this_1) set NormalWave_meleeId[this_1] = meleeId set NormalWave_mageId[this_1] = mageId set NormalWave_rangedId[this_1] = rangedId set NormalWave_amount[this_1] = amount set NormalWave_bounty[this_1] = bounty endfunction function new_NormalWave takes integer meleeId, integer mageId, integer rangedId, integer amount, integer bounty returns integer local integer this_1 = alloc_NormalWave() call construct_NormalWave(this_1, meleeId, mageId, rangedId, amount, bounty) return this_1 endfunction function alloc_SpecialWave takes nothing returns integer local integer this_1 if SpecialWave_firstFree == 0 then if SpecialWave_maxIndex < JASS_MAX_ARRAY_SIZE then set SpecialWave_maxIndex = SpecialWave_maxIndex + 1 set this_1 = SpecialWave_maxIndex set SpecialWave_typeId[this_1] = 975 else call error("Out of memory: Could not create SpecialWave.") set this_1 = 0 endif else set SpecialWave_firstFree = SpecialWave_firstFree - 1 set this_1 = SpecialWave_nextFree[SpecialWave_firstFree] set SpecialWave_typeId[this_1] = 975 endif return this_1 endfunction function SpecialWave_init takes integer this_1 returns nothing endfunction function construct_SpecialWave takes integer this_1, integer specialId, integer amount, integer bounty, integer special returns nothing call SpecialWave_init(this_1) set SpecialWave_specialId[this_1] = specialId set SpecialWave_amount[this_1] = amount set SpecialWave_bounty[this_1] = bounty set SpecialWave_special[this_1] = special endfunction function new_SpecialWave takes integer specialId, integer amount, integer bounty, integer special returns integer local integer this_1 = alloc_SpecialWave() call construct_SpecialWave(this_1, specialId, amount, bounty, special) return this_1 endfunction function init_UnitSpawnSystem takes nothing returns boolean 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 integer clVar_8 local integer clVar_9 local string temp local integer temp_1 local string temp_2 local integer temp_3 local string temp_4 local integer temp_5 local string temp_6 local integer temp_7 local string temp_8 local integer temp_9 local integer temp_10 local integer temp_11 local integer temp_12 local integer temp_13 local integer temp_14 local integer temp_15 set UnitSpawnSystem_SPAWN_TIME = 20.0 set UnitSpawnSystem_normalWaves = new_LinkedList() set UnitSpawnSystem_bossWaves = new_LinkedList() set UnitSpawnSystem_specialWaves = new_LinkedList() set UnitSpawnSystem_stopSpawns = false set UnitSpawnSystem_level = 1 call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092336, 1966092339, 1848651824, 1, 6)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092336, 1966092339, 1848651824, 2, 6)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092336, 1966092339, 1848651824, 3, 6)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092337, 1966092340, 1848651825, 1, 10)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092337, 1966092340, 1848651825, 2, 10)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092337, 1966092340, 1848651825, 3, 10)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092338, 1966092341, 1848651826, 1, 11)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092338, 1966092341, 1848651826, 2, 11)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092338, 1966092341, 1848651826, 3, 11)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092342, 1966092343, 1848651829, 1, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092342, 1966092343, 1848651829, 2, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092342, 1966092343, 1848651829, 3, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092344, 1966092345, 1848651830, 1, 13)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092344, 1966092345, 1848651830, 2, 13)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092344, 1966092345, 1848651830, 3, 13)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092359, 1966092360, 1848651832, 1, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092359, 1966092360, 1848651832, 2, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092359, 1966092360, 1848651832, 3, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092361, 1966092363, 1848651833, 1, 15)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092361, 1966092363, 1848651833, 2, 15)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092361, 1966092363, 1848651833, 3, 15)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092362, 1966092364, 1848651841, 1, 16)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092362, 1966092364, 1848651841, 2, 16)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092362, 1966092364, 1848651841, 3, 16)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092366, 1966092365, 1848651844, 1, 16)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092366, 1966092365, 1848651844, 2, 16)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092366, 1966092365, 1848651844, 3, 16)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092371, 1966092368, 1848651846, 1, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092371, 1966092368, 1848651846, 2, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092371, 1966092368, 1848651846, 2, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092372, 1966092369, 1848651847, 1, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092372, 1966092369, 1848651847, 2, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092372, 1966092369, 1848651847, 2, 14)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092373, 1966092370, 1848651848, 2, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092373, 1966092370, 1848651848, 2, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092373, 1966092370, 1848651848, 2, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092376, 1966092592, 1848651849, 2, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092376, 1966092592, 1848651849, 3, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092376, 1966092592, 1848651849, 3, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092377, 1966092593, 1848651850, 2, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092377, 1966092593, 1848651850, 2, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092378, 1966092594, 1848651851, 1, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092378, 1966092594, 1848651851, 1, 12)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092378, 1966092594, 1848651851, 1, 10)) call dispatch_LinkedList_LinkedList_LinkedList_add_1(UnitSpawnSystem_normalWaves, new_NormalWave(1966092378, 1966092594, 1848651851, 1, 10)) set temp_1 = UnitSpawnSystem_bossWaves set temp = Sounds_skeletonWhat2 set clVar = alloc_CreateBoss_add_UnitSpawnSystem() call construct_CreateBoss(clVar) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_1, new_BossWave(1848651827, 1, 85, temp, clVar)) set temp_3 = UnitSpawnSystem_bossWaves set temp_2 = Sounds_duneWormDeath1 set clVar_1 = alloc_CreateBoss_add_UnitSpawnSystem_999() call construct_CreateBoss(clVar_1) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_3, new_BossWave(1848651828, 1, 100, temp_2, clVar_1)) set temp_5 = UnitSpawnSystem_bossWaves set temp_4 = Sounds_abominationPissed5 set clVar_2 = alloc_CreateBoss_add_UnitSpawnSystem_1000() call construct_CreateBoss(clVar_2) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_5, new_BossWave(1848651831, 1, 125, temp_4, clVar_2)) set temp_7 = UnitSpawnSystem_bossWaves set temp_6 = Sounds_hydraDeath1 set clVar_3 = alloc_CreateBoss_add_UnitSpawnSystem_1001() call construct_CreateBoss(clVar_3) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_7, new_BossWave(1848651842, 1, 150, temp_6, clVar_3)) set temp_9 = UnitSpawnSystem_bossWaves set temp_8 = Sounds_airBargeDeath1 set clVar_4 = alloc_CreateBoss_add_UnitSpawnSystem_1002() call construct_CreateBoss(clVar_4) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_9, new_BossWave(1848651845, 1, 175, temp_8, clVar_4)) set temp_10 = UnitSpawnSystem_specialWaves set clVar_5 = alloc_CreateSpecial_add_UnitSpawnSystem() call construct_CreateSpecial(clVar_5) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_10, new_SpecialWave(1966092353, 3, 15, clVar_5)) set temp_11 = UnitSpawnSystem_specialWaves set clVar_6 = alloc_CreateSpecial_add_UnitSpawnSystem_1004() call construct_CreateSpecial(clVar_6) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_11, new_SpecialWave(1966092354, 1, 25, clVar_6)) set temp_12 = UnitSpawnSystem_specialWaves set clVar_7 = alloc_CreateSpecial_add_UnitSpawnSystem_1005() call construct_CreateSpecial(clVar_7) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_12, new_SpecialWave(1966092358, 4, 10, clVar_7)) set temp_13 = UnitSpawnSystem_specialWaves set clVar_8 = alloc_CreateSpecial_add_UnitSpawnSystem_1006() call construct_CreateSpecial(clVar_8) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_13, new_SpecialWave(1966092367, 25, 4, clVar_8)) set temp_15 = UnitSpawnSystem_specialWaves set temp_14 = Special_UNIT_ID_DARKONE set clVar_9 = alloc_CreateSpecial_add_UnitSpawnSystem_1007() call construct_CreateSpecial(clVar_9) call dispatch_LinkedList_LinkedList_LinkedList_add_1(temp_15, new_SpecialWave(temp_14, 4, 65, clVar_9)) return true endfunction function init_Units takes nothing returns boolean set Units_abominationExplosion = "Units\\Undead\\Abomination\\AbominationExplosion.mdx" 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_WarningBuff takes nothing returns boolean local integer tuple_temp local integer tuple_temp_1 call new_SoundDefinition("Abilities\\Spells\\Other\\Silence\\Silence1.wav", false) set tuple_temp = 1095577651 set tuple_temp_1 = 1112354866 set WarningBuff_warningBuffAbil_abilId = tuple_temp set WarningBuff_warningBuffAbil_buffId = tuple_temp_1 return true endfunction function init_WaveTower takes nothing returns boolean set WaveTower_FIRST_WAVE_ID = 1747988814 set WaveTower_AREA_OF_EFFECT = 192. return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function alloc_BossOne 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] = 940 else call error("Out of memory: Could not create BossOne.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 940 endif return this_1 endfunction function BossOne_init takes integer this_1 returns nothing endfunction function construct_BossOne takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Boss(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call BossOne_init(this_1) endfunction function new_BossOne takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_BossOne() call construct_BossOne(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_BossOne(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function alloc_BossTwo 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] = 942 else call error("Out of memory: Could not create BossTwo.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 942 endif return this_1 endfunction function BossTwo_init takes integer this_1 returns nothing endfunction function dispatch_ShieldBuff_PresetBuffs_ShieldBuff_apply takes integer this_1, unit target_1 returns nothing if Buff_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling ShieldBuff.apply") else call error("Called ShieldBuff.apply on invalid object.") endif endif if Buff_typeId[this_1] <= 648 then if Buff_typeId[this_1] <= 647 then call cyc_Projectile_terminate(7, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) else call cyc_Projectile_terminate(6, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif else call cyc_Projectile_terminate(7, this_1, 0., 0., 0., null, target_1, 0, 0, 0., 0., 0., 0.) endif endfunction function alloc_SludgeBuff takes nothing returns integer local integer this_1 if Buff_firstFree == 0 then if Buff_maxIndex < JASS_MAX_ARRAY_SIZE then set Buff_maxIndex = Buff_maxIndex + 1 set this_1 = Buff_maxIndex set Buff_typeId[this_1] = 649 else call error("Out of memory: Could not create SludgeBuff.") set this_1 = 0 endif else set Buff_firstFree = Buff_firstFree - 1 set this_1 = Buff_nextFree[Buff_firstFree] set Buff_typeId[this_1] = 649 endif return this_1 endfunction function SludgeBuff_init takes integer this_1 returns nothing local integer tuple_temp = 155 local integer tuple_temp_1 = 255 local integer tuple_temp_2 = 155 local integer tuple_temp_3 local integer tuple_temp_4 local integer tuple_temp_5 set SludgeBuff_currentCol_red[this_1] = tuple_temp set SludgeBuff_currentCol_green[this_1] = tuple_temp_1 set SludgeBuff_currentCol_blue[this_1] = tuple_temp_2 set tuple_temp_3 = 155 set tuple_temp_4 = 255 set tuple_temp_5 = 155 set SludgeBuff_nextCol_red[this_1] = tuple_temp_3 set SludgeBuff_nextCol_green[this_1] = tuple_temp_4 set SludgeBuff_nextCol_blue[this_1] = tuple_temp_5 set SludgeBuff_dmgHold[this_1] = 0. endfunction function construct_SludgeBuff takes integer this_1, real dur returns nothing local integer tuple_temp local integer tuple_temp_1 local integer tuple_temp_2 call construct_ShieldBuff(this_1, dur, BossTwo_buffAbil_abilId, BossTwo_buffAbil_buffId, 6500.) call SludgeBuff_init(this_1) set tuple_temp = 155 set tuple_temp_1 = 255 set tuple_temp_2 = 155 set SludgeBuff_currentCol_red[this_1] = tuple_temp set SludgeBuff_currentCol_green[this_1] = tuple_temp_1 set SludgeBuff_currentCol_blue[this_1] = tuple_temp_2 endfunction function new_SludgeBuff takes real dur returns integer local integer this_1 = alloc_SludgeBuff() call construct_SludgeBuff(this_1, dur) return this_1 endfunction function construct_BossTwo takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Boss(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call BossTwo_init(this_1) call dispatch_ShieldBuff_PresetBuffs_ShieldBuff_apply(new_SludgeBuff(99999.), UnitEntity_actor[this_1]) endfunction function new_BossTwo takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_BossTwo() call construct_BossTwo(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1375 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_BossTwo(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function alloc_BossThree 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] = 941 else call error("Out of memory: Could not create BossThree.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 941 endif return this_1 endfunction function BossThree_init takes integer this_1 returns nothing endfunction function alloc_PudgePowerBuff takes nothing returns integer local integer this_1 if Buff_firstFree == 0 then if Buff_maxIndex < JASS_MAX_ARRAY_SIZE then set Buff_maxIndex = Buff_maxIndex + 1 set this_1 = Buff_maxIndex set Buff_typeId[this_1] = 645 else call error("Out of memory: Could not create PudgePowerBuff.") set this_1 = 0 endif else set Buff_firstFree = Buff_firstFree - 1 set this_1 = Buff_nextFree[Buff_firstFree] set Buff_typeId[this_1] = 645 endif return this_1 endfunction function PudgePowerBuff_init takes integer this_1 returns nothing endfunction function construct_PudgePowerBuff takes integer this_1, real duration returns nothing call construct_NormalBuff(this_1, duration, BossThree_pudgeBuffAbil_abilId, BossThree_pudgeBuffAbil_buffId) call PudgePowerBuff_init(this_1) endfunction function new_PudgePowerBuff takes real duration returns integer local integer this_1 = alloc_PudgePowerBuff() call construct_PudgePowerBuff(this_1, duration) return this_1 endfunction function construct_BossThree takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Boss(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call BossThree_init(this_1) call cyc_Projectile_terminate(14, new_PudgePowerBuff(9999.), 0., 0., 0., null, UnitEntity_actor[this_1], 0, 0, 0., 0., 0., 0.) endfunction function new_BossThree takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_BossThree() call construct_BossThree(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1376 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_BossThree(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function alloc_BossFour 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] = 939 else call error("Out of memory: Could not create BossFour.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 939 endif return this_1 endfunction function BossFour_init takes integer this_1 returns nothing endfunction function alloc_JumpyBuff takes nothing returns integer local integer this_1 if Buff_firstFree == 0 then if Buff_maxIndex < JASS_MAX_ARRAY_SIZE then set Buff_maxIndex = Buff_maxIndex + 1 set this_1 = Buff_maxIndex set Buff_typeId[this_1] = 647 else call error("Out of memory: Could not create JumpyBuff.") set this_1 = 0 endif else set Buff_firstFree = Buff_firstFree - 1 set this_1 = Buff_nextFree[Buff_firstFree] set Buff_typeId[this_1] = 647 endif return this_1 endfunction function JumpyBuff_init takes integer this_1 returns nothing set JumpyBuff_lastCast[this_1] = 0. endfunction function construct_JumpyBuff takes integer this_1, real dur returns nothing call construct_ShieldBuff(this_1, dur, BossFour_jumpyBuff_abilId, BossFour_jumpyBuff_buffId, 6500.) call JumpyBuff_init(this_1) endfunction function new_JumpyBuff takes real dur returns integer local integer this_1 = alloc_JumpyBuff() call construct_JumpyBuff(this_1, dur) return this_1 endfunction function construct_BossFour takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing call construct_Boss(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call BossFour_init(this_1) call dispatch_ShieldBuff_PresetBuffs_ShieldBuff_apply(new_JumpyBuff(55555.), UnitEntity_actor[this_1]) endfunction function new_BossFour takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_BossFour() call construct_BossFour(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1377 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_BossFour(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function alloc_BossFive 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] = 938 else call error("Out of memory: Could not create BossFive.") set this_1 = 0 endif else set Serializable_firstFree = Serializable_firstFree - 1 set this_1 = Serializable_nextFree[Serializable_firstFree] set Serializable_typeId[this_1] = 938 endif return this_1 endfunction function BossFive_init takes integer this_1 returns nothing endfunction function alloc_CallbackSingle_doAfter_BossFive_BossFive 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_BossFive_BossFive.") 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 alloc_CallbackSingle_doAfter_BossFive_BossFive_949 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_BossFive_BossFive.") 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 construct_BossFive takes integer this_1, real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns nothing local integer clVar local integer clVar_1 local real tuple_temp local real tuple_temp_1 call construct_Boss(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) call BossFive_init(this_1) set clVar = alloc_CallbackSingle_doAfter_BossFive_BossFive() call construct_CallbackSingle(clVar) set this_1493[clVar] = this_1 call doAfter(10., clVar) set clVar_1 = alloc_CallbackSingle_doAfter_BossFive_BossFive_949() call construct_CallbackSingle(clVar_1) set this_1494[clVar_1] = this_1 set tuple_temp = target_x_1 set tuple_temp_1 = target_y_1 set target_x_1456[clVar_1] = tuple_temp set target_y_1458[clVar_1] = tuple_temp_1 call doAfter(11., clVar_1) endfunction function new_BossFive takes real pos_x, real pos_y, real pos_z, integer typId, integer bounty, real target_x_1, real target_y_1 returns integer local integer this_1 = alloc_BossFive() call construct_BossFive(this_1, pos_x, pos_y, pos_z, typId, bounty, target_x_1, target_y_1) return this_1 endfunction function create_add_UnitSpawnSystem_1378 takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing call new_BossFive(startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endfunction function dispatch_CreateBoss_Wave_CreateBoss_create takes integer this_1, real startPos_x, real startPos_y, real startPos_z, integer unitId, integer bounty, real middle_x, real middle_y returns nothing if CreateBoss_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CreateBoss.create") else call error("Called CreateBoss.create on invalid object.") endif endif if CreateBoss_typeId[this_1] <= 724 then if CreateBoss_typeId[this_1] <= 723 then if CreateBoss_typeId[this_1] <= 722 then call create_add_UnitSpawnSystem(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) else call create_add_UnitSpawnSystem_1375(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endif else call create_add_UnitSpawnSystem_1376(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endif elseif CreateBoss_typeId[this_1] <= 725 then call create_add_UnitSpawnSystem_1377(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) else call create_add_UnitSpawnSystem_1378(this_1, startPos_x, startPos_y, startPos_z, unitId, bounty, middle_x, middle_y) endif endfunction function CreateBoss_onDestroy takes integer this_1 returns nothing endfunction function dealloc_CreateBoss takes integer obj returns nothing if CreateBoss_typeId[obj] == 0 then call error("Double free: object of type CreateBoss") else set CreateBoss_nextFree[CreateBoss_firstFree] = obj set CreateBoss_firstFree = CreateBoss_firstFree + 1 set CreateBoss_typeId[obj] = 0 endif endfunction function destroyCreateBoss takes integer this_1 returns nothing call CreateBoss_onDestroy(this_1) call dealloc_CreateBoss(this_1) endfunction function dispatch_CreateBoss_destroyCreateBoss takes integer this_1 returns nothing if CreateBoss_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling CreateBoss.CreateBoss") else call error("Called CreateBoss.CreateBoss on invalid object.") endif endif call destroyCreateBoss(this_1) endfunction function BossWave_spawn takes integer this_1 returns nothing local integer i local integer temp local integer j local integer temp_1 call dispatch_SoundDefinition_SoundUtils_SoundDefinition_play(BossWave_s[this_1]) call print("|cffE62121## Attention:|r Boss incoming!") set i = 0 set temp = BossWave_amount[this_1] - 1 loop exitwhen i > temp set j = 0 set temp_1 = Wave_startPosCount loop exitwhen j > temp_1 call dispatch_CreateBoss_Wave_CreateBoss_create(BossWave_boss[this_1], vec2_toVec3(rect_randomPoint(Wave_spawnRects[j]), rect_randomPoint_return_y), vec2_toVec3_return_y, vec2_toVec3_return_z, BossWave_bossId[this_1], BossWave_bounty[this_1], Wave_middle_x, Wave_middle_y) set j = j + 1 endloop set i = i + 1 endloop call dispatch_CreateBoss_destroyCreateBoss(BossWave_boss[this_1]) endfunction function dispatch_BossWave_Wave_BossWave_spawn takes integer this_1 returns nothing if BossWave_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling BossWave.spawn") else call error("Called BossWave.spawn on invalid object.") endif endif call BossWave_spawn(this_1) endfunction function alloc_CallbackSingle_doAfter_NormalWave_Wave 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] = 688 else call error("Out of memory: Could not create CallbackSingle_doAfter_NormalWave_Wave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 688 endif return this_1 endfunction function NormalWave_spawn takes integer this_1 returns nothing local integer clVar = alloc_CallbackSingle_doAfter_NormalWave_Wave() call construct_CallbackSingle(clVar) set this_1487[clVar] = this_1 call doAfter(0.1, clVar) endfunction function dispatch_NormalWave_Wave_NormalWave_spawn takes integer this_1 returns nothing if NormalWave_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling NormalWave.spawn") else call error("Called NormalWave.spawn on invalid object.") endif endif call NormalWave_spawn(this_1) endfunction function alloc_CallbackSingle_doAfter_SpecialWave_Wave 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] = 698 else call error("Out of memory: Could not create CallbackSingle_doAfter_SpecialWave_Wave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 698 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_SpecialWave_Wave_979 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] = 699 else call error("Out of memory: Could not create CallbackSingle_doAfter_SpecialWave_Wave.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 699 endif return this_1 endfunction function SpecialWave_spawn takes integer this_1 returns nothing local integer i local integer temp local integer clVar local integer clVar_1 local real temp_1 local real temp_2 call print("|cffE62121##|r |cff087BB5B|r|cff0C79B1r|r|cff1077ADa|r|cff1475A9c|r|cff1873A5e|r |cff206F9Dy|r|cff246D99o|r|cff286B95u|r|cff2C6991r|r|cff30678Ds|r|cff346589e|r|cff386385l|r|cff3C6181v|r|cff405F7De|r|cff445D79s|r|cff485B75:|r |cff50576DS|r|cff545569p|r|cff585365e|r|cff5C5161c|r|cff604F5Di|r|cff644D59a|r|cff684B55l|r|cff6C4951s|r |cff744549a|r|cff784345r|r|cff7C4141e|r |cff843D39c|r|cff883B35o|r|cff8C3931m|r|cff90372Di|r|cff943529n|r|cff983325g|r|cff9C3121!|r") set i = 0 set temp = SpecialWave_amount[this_1] - 1 loop exitwhen i > temp set temp_1 = int_toReal(i) set clVar = alloc_CallbackSingle_doAfter_SpecialWave_Wave() call construct_CallbackSingle(clVar) set this_1491[clVar] = this_1 call doAfter(temp_1, clVar) set i = i + 1 endloop set temp_2 = int_toReal(SpecialWave_amount[this_1]) set clVar_1 = alloc_CallbackSingle_doAfter_SpecialWave_Wave_979() call construct_CallbackSingle(clVar_1) set this_1492[clVar_1] = this_1 call doAfter(temp_2, clVar_1) endfunction function dispatch_SpecialWave_Wave_SpecialWave_spawn takes integer this_1 returns nothing if SpecialWave_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling SpecialWave.spawn") else call error("Called SpecialWave.spawn on invalid object.") endif endif call SpecialWave_spawn(this_1) endfunction function onSpawnTime takes nothing returns nothing if UnitSpawnSystem_stopSpawns then return endif if ModuloInteger(UnitSpawnSystem_level, 7) == 0 and dispatch_LinkedList_LinkedList_LinkedList_size(UnitSpawnSystem_specialWaves) > 0 then call dispatch_SpecialWave_Wave_SpecialWave_spawn(dispatch_LinkedList_LinkedList_LinkedList_dequeue(UnitSpawnSystem_specialWaves)) else if dispatch_LinkedList_LinkedList_LinkedList_size(UnitSpawnSystem_normalWaves) > 0 then call dispatch_NormalWave_Wave_NormalWave_spawn(dispatch_LinkedList_LinkedList_LinkedList_dequeue(UnitSpawnSystem_normalWaves)) endif if ModuloInteger(UnitSpawnSystem_level, 4) == 0 and dispatch_LinkedList_LinkedList_LinkedList_size(UnitSpawnSystem_bossWaves) > 0 then call dispatch_BossWave_Wave_BossWave_spawn(dispatch_LinkedList_LinkedList_LinkedList_dequeue(UnitSpawnSystem_bossWaves)) endif endif set UnitSpawnSystem_level = UnitSpawnSystem_level + 1 if UnitSpawnSystem_level > 7 then set UnitSpawnSystem_level = 1 endif if dispatch_LinkedList_LinkedList_LinkedList_size(UnitSpawnSystem_specialWaves) <= 0 and dispatch_LinkedList_LinkedList_LinkedList_size(UnitSpawnSystem_bossWaves) <= 0 and dispatch_LinkedList_LinkedList_LinkedList_size(UnitSpawnSystem_normalWaves) <= 0 then set UnitSpawnSystem_stopSpawns = true endif endfunction function Fx2Entity_update takes integer this_1 returns nothing if vec3_inPlayable(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) then call Entity_update(this_1) call effect_setPos(Fx2_eff[Fx2Entity_fx[this_1]], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) else call cyc_Projectile_terminate(30, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif endfunction function alloc_ForGroupCallback_forUnitsInRange_Projectile_Projectile 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] = 800 else call error("Out of memory: Could not create ForGroupCallback_forUnitsInRange_Projectile_Projectile.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 800 endif return this_1 endfunction function dispatch_Projectile_Projectile_Projectile_terminate takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Projectile.terminate") else call error("Called Projectile.terminate on invalid object.") endif endif call cyc_Projectile_terminate(0, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endfunction function Projectile_update takes integer this_1 returns nothing local real tuple_temp = vec3_op_mult(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1], Projectile_acc[this_1]) local real tuple_temp_1 = vec3_op_mult_return_y local real tuple_temp_2 = vec3_op_mult_return_z local integer clVar local real cond_result local real cond_result_1 local real temp_x local real temp_y local real temp local real tuple_temp_3 local real tuple_temp_4 set Entity_vel_x[this_1] = tuple_temp set Entity_vel_y[this_1] = tuple_temp_1 set Entity_vel_z[this_1] = tuple_temp_2 call Fx2Entity_update(this_1) if not Entity_done[this_1] then if Projectile_onHit[this_1] != 0 then set tuple_temp_3 = vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) set tuple_temp_4 = vec3_toVec2_return_y set temp_x = tuple_temp_3 set temp_y = tuple_temp_4 set temp = Entity_radius[this_1] set clVar = alloc_ForGroupCallback_forUnitsInRange_Projectile_Projectile() set this[clVar] = this_1 call forUnitsInRange(temp_x, temp_y, temp, clVar) endif if Projectile_isPointTarget[this_1] then if Projectile_use3DDistance[this_1] then set cond_result = vec3_distanceToSq(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], Projectile_targetPoint_x[this_1], Projectile_targetPoint_y[this_1], Projectile_targetPoint_z[this_1]) else set cond_result = vec2_distanceToSq(vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y, vec3_toVec2(Projectile_targetPoint_x[this_1], Projectile_targetPoint_y[this_1], Projectile_targetPoint_z[this_1]), vec3_toVec2_return_y) endif if cond_result < Entity_radius2[this_1] then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif endif if ( not Entity_done[this_1]) and Entity_vel_z[this_1] < 0. and Projectile_killZ[this_1] and Entity_pos_z[this_1] <= Projectile_killBelowZ[this_1] then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif if ( not Entity_done[this_1]) and Projectile_timed[this_1] then set Projectile_time[this_1] = Projectile_time[this_1] + Basics_ANIMATION_PERIOD if Projectile_time[this_1] >= Projectile_maxTime[this_1] then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif endif if ( not Entity_done[this_1]) and Projectile_ranged[this_1] then if Projectile_use3DDistance[this_1] then set cond_result_1 = vec3_distanceToSq(Projectile_startpos_x[this_1], Projectile_startpos_y[this_1], Projectile_startpos_z[this_1], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) else set cond_result_1 = vec2_distanceToSq(vec3_toVec2(Projectile_startpos_x[this_1], Projectile_startpos_y[this_1], Projectile_startpos_z[this_1]), vec3_toVec2_return_y, vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) endif if cond_result_1 > Projectile_maxDist[this_1] then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif endif if ( not Entity_done[this_1]) and Projectile_target[this_1] != 0 then if vec2_distanceToSq(vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y, vec3_toVec2(dispatch_Entity_Entity_Entity_getPos(Projectile_target[this_1]), dispatch_Entity_Entity_Entity_getPos_return_y, dispatch_Entity_Entity_Entity_getPos_return_z), vec3_toVec2_return_y) < Entity_radius2[this_1] then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif endif endif endfunction function ArtilleryMissile_update takes integer this_1 returns nothing if Entity_pos_z[this_1] < vec3_getHeightMap(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) + 4. then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) return endif call Projectile_update(this_1) endfunction function vec3_dot takes real this_x, real this_y, real this_z, real v_x, real v_y, real v_z returns real return this_x * v_x + this_y * v_y + this_z * v_z endfunction function vec3_project takes real this_x, real this_y, real this_z, real direction_x, real direction_y, real direction_z returns real local real l = vec3_lengthSquared(direction_x, direction_y, direction_z) if l == 0.0 then set vec3_project_return_x = 0. set vec3_project_return_y = 0. set vec3_project_return_z = 0. return vec3_project_return_x endif set l = vec3_dot(this_x, this_y, this_z, direction_x, direction_y, direction_z) / l set vec3_project_return_x = direction_x * l set vec3_project_return_y = direction_y * l set vec3_project_return_z = direction_z * l return vec3_project_return_x endfunction function getBounceVec_1885 takes real vel3_x, real vel3_y, real vel3_z, real nor2_x, real nor2_y returns real local real tuple_temp = vec2_toVec3(nor2_x, nor2_y) local real tuple_temp_1 = vec2_toVec3_return_y local real tuple_temp_2 = vec2_toVec3_return_z local real nor3_x = tuple_temp local real nor3_y = tuple_temp_1 local real nor3_z = tuple_temp_2 local real tuple_temp_3 = vec3_project(vel3_x, vel3_y, vel3_z, nor3_x, nor3_y, nor3_z) local real tuple_temp_4 = vec3_project_return_y local real tuple_temp_5 = vec3_project_return_z local real pv3_x = tuple_temp_3 local real pv3_y = tuple_temp_4 local real pv3_z = tuple_temp_5 local real tuple_temp_6 = vec3_toVec2(pv3_x, pv3_y, pv3_z) local real tuple_temp_7 = vec3_toVec2_return_y local real pv2_x = tuple_temp_6 local real pv2_y = tuple_temp_7 local real tuple_temp_8 = vec2_op_mult(pv2_x, pv2_y, - 1.9) local real tuple_temp_9 = vec2_op_mult_return_y set pv2_x = tuple_temp_8 set pv2_y = tuple_temp_9 set getBounceVec_return_x_1192 = vec3_op_plus_2533(vel3_x, vel3_y, vel3_z, pv2_x, pv2_y) set getBounceVec_return_y_1194 = vec3_op_plus_return_y_1594 set getBounceVec_return_z_1196 = vec3_op_plus_return_z_1596 return getBounceVec_return_x_1192 endfunction function alloc_CallbackSingle_doAfter_Builder 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_doAfter_Builder.") 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 rect_moveTo takes rect this_1, real newCenter_x, real newCenter_y returns nothing call MoveRectTo(this_1, newCenter_x, newCenter_y) endfunction function vec2_isTerrainPathable takes real this_x, real this_y, pathingtype ttype returns boolean return IsTerrainPathable(this_x, this_y, ttype) endfunction function vec2_isTerrainWalkable takes real this_x, real this_y returns boolean local real tempPos_x local real tempPos_y local real tuple_temp local real tuple_temp_1 call rect_moveTo(TerrainUtils_itemSearchRect, this_x, this_y) call EnumItemsInRect(TerrainUtils_itemSearchRect, null, ref_function_code__EnumItemsInRect_TerrainUtils) call item_setPos(TerrainUtils_dummyItem, this_x, this_y) set tuple_temp = item_getPos(TerrainUtils_dummyItem) set tuple_temp_1 = item_getPos_return_y set tempPos_x = tuple_temp set tempPos_y = tuple_temp_1 call item_setVisible(TerrainUtils_dummyItem, false) loop exitwhen not (TerrainUtils_hiddenItemsCount > 0) set TerrainUtils_hiddenItemsCount = TerrainUtils_hiddenItemsCount - 1 call item_setVisible(TerrainUtils_hiddenItems[TerrainUtils_hiddenItemsCount], true) set TerrainUtils_hiddenItems[TerrainUtils_hiddenItemsCount] = null endloop return (tempPos_x - this_x) * (tempPos_x - this_x) + (tempPos_y - this_y) * (tempPos_y - this_y) <= TerrainUtils_MAX_RANGE_SQ and ( not vec2_isTerrainPathable(this_x, this_y, PATHING_TYPE_WALKABILITY)) endfunction function vec2_setLength takes real this_x, real this_y, real length returns real local real l = SquareRoot(this_x * this_x + this_y * this_y) if l == 0. then set vec2_setLength_return_x = 0. set vec2_setLength_return_y = 0. return vec2_setLength_return_x endif set l = length / l set vec2_setLength_return_x = this_x * l set vec2_setLength_return_y = this_y * l return vec2_setLength_return_x endfunction function getPathingNormal_1895 takes real pos_x, real pos_y returns real local integer numberOfTests = 9 local real radius = 32. local real tuple_temp = 0. local real tuple_temp_1 = 0. local real addedVecs_x = tuple_temp local real addedVecs_y = tuple_temp_1 local integer i = 0 local integer temp = numberOfTests - 1 local real direction_x local real direction_y local real testPoint_x local real testPoint_y local effect eff_1 local integer clVar 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 loop exitwhen i > temp set tuple_temp_2 = vec2_polarOffset(0., 0., real_asAngleRadians(i * 2 * bj_PI / numberOfTests), radius) set tuple_temp_3 = vec2_polarOffset_return_y set direction_x = tuple_temp_2 set direction_y = tuple_temp_3 set tuple_temp_4 = vec2_op_plus(pos_x, pos_y, direction_x, direction_y) set tuple_temp_5 = vec2_op_plus_return_y set testPoint_x = tuple_temp_4 set testPoint_y = tuple_temp_5 set eff_1 = addEffect(Abilities_bansheeMissile, testPoint_x, testPoint_y) set clVar = alloc_CallbackSingle_doAfter_Builder() call construct_CallbackSingle(clVar) set eff[clVar] = eff_1 call doAfter(1., clVar) if vec2_isTerrainWalkable(testPoint_x, testPoint_y) then set tuple_temp_6 = vec2_op_plus(addedVecs_x, addedVecs_y, direction_x, direction_y) set tuple_temp_7 = vec2_op_plus_return_y set addedVecs_x = tuple_temp_6 set addedVecs_y = tuple_temp_7 endif set i = i + 1 endloop set getPathingNormal_return_x_1198 = vec2_op_mult(vec2_setLength(addedVecs_x, addedVecs_y, 1.), vec2_setLength_return_y, - 1.) set getPathingNormal_return_y_1200 = vec2_op_mult_return_y return getPathingNormal_return_x_1198 endfunction function vec2_dot takes real this_x, real this_y, real v_x, real v_y returns real return this_x * v_x + this_y * v_y endfunction function vec2_lengthSq takes real this_x, real this_y returns real return this_x * this_x + this_y * this_y endfunction function Ball_update takes integer this_1 returns nothing local real normal_x local real normal_y 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 Fx2Entity_update(this_1) if not vec2_isTerrainWalkable(vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) then set tuple_temp = getPathingNormal_1895(vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) set tuple_temp_1 = getPathingNormal_return_y_1200 set normal_x = tuple_temp set normal_y = tuple_temp_1 if vec2_lengthSq(normal_x, normal_y) == 0. then set tuple_temp_2 = vec3_toVec2(vec3_op_mult(vec3_norm(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1]), vec3_norm_return_y, vec3_norm_return_z, -1), vec3_op_mult_return_y, vec3_op_mult_return_z) set tuple_temp_3 = vec3_toVec2_return_y set normal_x = tuple_temp_2 set normal_y = tuple_temp_3 endif if vec2_dot(vec3_toVec2(vec3_norm(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1]), vec3_norm_return_y, vec3_norm_return_z), vec3_toVec2_return_y, normal_x, normal_y) < 0. then call print("bounced " + real_toString(vec2_dot(vec3_toVec2(vec3_norm(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1]), vec3_norm_return_y, vec3_norm_return_z), vec3_toVec2_return_y, normal_x, normal_y))) set tuple_temp_4 = getBounceVec_1885(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1], normal_x, normal_y) set tuple_temp_5 = getBounceVec_return_y_1194 set tuple_temp_6 = getBounceVec_return_z_1196 set Entity_vel_x[this_1] = tuple_temp_4 set Entity_vel_y[this_1] = tuple_temp_5 set Entity_vel_z[this_1] = tuple_temp_6 endif endif set tuple_temp_7 = vec3_op_plus(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1]) set tuple_temp_8 = vec3_op_plus_return_y set tuple_temp_9 = vec3_op_plus_return_z set Entity_pos_x[this_1] = tuple_temp_7 set Entity_pos_y[this_1] = tuple_temp_8 set Entity_pos_z[this_1] = tuple_temp_9 call effect_setPos(Fx2_eff[Fx2Entity_fx[this_1]], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) call effect_setYaw(Fx2_eff[Fx2Entity_fx[this_1]], vec3_angleTo2d_2516(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], vec3_op_plus(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1]), vec3_op_plus_return_y, vec3_op_plus_return_z)) endfunction function getBounceVec takes real vel3_x, real vel3_y, real vel3_z, real nor2_x, real nor2_y returns real local real tuple_temp = vec2_toVec3(nor2_x, nor2_y) local real tuple_temp_1 = vec2_toVec3_return_y local real tuple_temp_2 = vec2_toVec3_return_z local real nor3_x = tuple_temp local real nor3_y = tuple_temp_1 local real nor3_z = tuple_temp_2 local real tuple_temp_3 = vec3_project(vel3_x, vel3_y, vel3_z, nor3_x, nor3_y, nor3_z) local real tuple_temp_4 = vec3_project_return_y local real tuple_temp_5 = vec3_project_return_z local real pv3_x = tuple_temp_3 local real pv3_y = tuple_temp_4 local real pv3_z = tuple_temp_5 local real tuple_temp_6 = vec3_toVec2(pv3_x, pv3_y, pv3_z) local real tuple_temp_7 = vec3_toVec2_return_y local real pv2_x = tuple_temp_6 local real pv2_y = tuple_temp_7 local real tuple_temp_8 = vec2_op_mult(pv2_x, pv2_y, - 1.25) local real tuple_temp_9 = vec2_op_mult_return_y set pv2_x = tuple_temp_8 set pv2_y = tuple_temp_9 set getBounceVec_return_x = vec3_op_plus_2533(vel3_x, vel3_y, vel3_z, pv2_x, pv2_y) set getBounceVec_return_y = vec3_op_plus_return_y_1594 set getBounceVec_return_z = vec3_op_plus_return_z_1596 return getBounceVec_return_x endfunction function getPathingNormal takes real pos_x, real pos_y returns real local integer numberOfTests = 8 local real radius = 64. local real tuple_temp = 0. local real tuple_temp_1 = 0. local real addedVecs_x = tuple_temp local real addedVecs_y = tuple_temp_1 local integer i = 1 local integer temp = numberOfTests local real direction_x local real direction_y local real testPoint_x local real testPoint_y 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 loop exitwhen i > temp set tuple_temp_2 = vec2_polarOffset(0., 0., real_asAngleRadians(i * 2 * bj_PI / numberOfTests), radius) set tuple_temp_3 = vec2_polarOffset_return_y set direction_x = tuple_temp_2 set direction_y = tuple_temp_3 set tuple_temp_4 = vec2_op_plus(pos_x, pos_y, direction_x, direction_y) set tuple_temp_5 = vec2_op_plus_return_y set testPoint_x = tuple_temp_4 set testPoint_y = tuple_temp_5 if vec2_isTerrainWalkable(testPoint_x, testPoint_y) then set tuple_temp_6 = vec2_op_plus(addedVecs_x, addedVecs_y, direction_x, direction_y) set tuple_temp_7 = vec2_op_plus_return_y set addedVecs_x = tuple_temp_6 set addedVecs_y = tuple_temp_7 endif set i = i + 1 endloop set getPathingNormal_return_x = vec2_op_mult(vec2_setLength(addedVecs_x, addedVecs_y, 1.), vec2_setLength_return_y, - 1.) set getPathingNormal_return_y = vec2_op_mult_return_y return getPathingNormal_return_x endfunction function Creep_update takes integer this_1 returns nothing local real normal_x local real normal_y 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 vec2_isTerrainWalkable(vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) then set tuple_temp = vec3_op_mult(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1], 0.975) set tuple_temp_1 = vec3_op_mult_return_y set tuple_temp_2 = vec3_op_mult_return_z set Entity_vel_x[this_1] = tuple_temp set Entity_vel_y[this_1] = tuple_temp_1 set Entity_vel_z[this_1] = tuple_temp_2 else set tuple_temp_3 = getPathingNormal(vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) set tuple_temp_4 = getPathingNormal_return_y set normal_x = tuple_temp_3 set normal_y = tuple_temp_4 set tuple_temp_5 = getBounceVec(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1], normal_x, normal_y) set tuple_temp_6 = getBounceVec_return_y set tuple_temp_7 = getBounceVec_return_z set Entity_vel_x[this_1] = tuple_temp_5 set Entity_vel_y[this_1] = tuple_temp_6 set Entity_vel_z[this_1] = tuple_temp_7 endif call UnitEntity_update(this_1) endfunction function BossFour_update takes integer this_1 returns nothing call Creep_update(this_1) call unit_setXYZReal(UnitEntity_actor[this_1], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) endfunction function EndBoss_update takes integer this_1 returns nothing local real percentage call Creep_update(this_1) set percentage = unit_getHP(UnitEntity_actor[this_1]) / unit_getMaxHP(UnitEntity_actor[this_1]) if EndBoss_stage[this_1] == 1 and percentage < EndBoss_stageTwoPercentage then set EndBoss_stage[this_1] = 2 endif if EndBoss_stage[this_1] == 2 and percentage < EndBoss_stageThreePercentage then set EndBoss_stage[this_1] = 3 endif endfunction function getDamage takes integer level returns real return 9. + 5.75 * level endfunction function isUnitTargetable_2084 takes unit u_1 returns boolean return ( not IsUnitType(u_1, UNIT_TYPE_DEAD)) and ( not IsUnitType(u_1, UNIT_TYPE_MAGIC_IMMUNE)) and ( not IsUnitType(u_1, UNIT_TYPE_STRUCTURE)) and ( not IsUnitType(u_1, UNIT_TYPE_FLYING)) endfunction function FlameMissile_update takes integer this_1 returns nothing local integer receiver = new_DummyDamage() local integer dmg local integer receiver_1 local integer receiver_2 local unit u_1 local group from local integer receiver_3 local integer receiver_4 call dispatch_DummyDamage_DummyDamage_DummyDamage_attacker(receiver, Entity_owner[this_1]) set receiver_1 = receiver call dispatch_DummyDamage_DummyDamage_DummyDamage_amount(receiver_1, getDamage(FlameMissile_level[this_1])) set receiver_2 = receiver_1 call dispatch_DummyDamage_DummyDamage_DummyDamage_attackType(receiver_2, ATTACK_TYPE_SIEGE) set dmg = receiver_2 call GroupEnumUnitsInRange(Group_ENUM_GROUP, Entity_pos_x[this_1], Entity_pos_y[this_1], FlamethrowerTower_AOE_RADIUS, null) set from = Group_ENUM_GROUP loop exitwhen not group_hasNext(from) set u_1 = group_next(from) if IsUnitEnemy(u_1, Entity_owner[this_1]) and isUnitTargetable_2084(u_1) then set receiver_3 = dmg call dispatch_DummyDamage_DummyDamage_DummyDamage_target(receiver_3, u_1) set receiver_4 = receiver_3 call dispatch_DummyDamage_DummyDamage_DummyDamage_apply(receiver_4) endif endloop call dispatch_DummyDamage_destroyDummyDamage(dmg) call Projectile_update(this_1) endfunction function HealbackMissile_onReachTarget takes integer this_1 returns nothing if HealbackMissile_targetEntity[this_1] != 0 and unit_isAlive(UnitEntity_actor[HealbackMissile_targetEntity[this_1]]) then call flashEffect(HealbackTower_HEALBACK_EFFECT, vec3_add(Entity_pos_x[HealbackMissile_targetEntity[this_1]], Entity_pos_y[HealbackMissile_targetEntity[this_1]], Entity_pos_z[HealbackMissile_targetEntity[this_1]], 0., 0., 50.), vec3_add_return_y, vec3_add_return_z) call unit_addHP(UnitEntity_actor[HealbackMissile_targetEntity[this_1]], HealbackMissile_heal[this_1]) call new_TextTagEntity(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], GetRandomReal(-1., 1.), 0., GetRandomReal(7., 9.), int_toString(real_toInt(HealbackMissile_heal[this_1])), 8., .75, 223, 255, 52, 255) endif endfunction function dispatch_HealbackMissile_HealbackTower_HealbackMissile_onReachTarget takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling HealbackMissile.onReachTarget") else call error("Called HealbackMissile.onReachTarget on invalid object.") endif endif call HealbackMissile_onReachTarget(this_1) endfunction function inBoundsXY takes real x, real y returns boolean return x > MapBounds_boundMin_x and x < MapBounds_boundMax_x and y > MapBounds_boundMin_y and y < MapBounds_boundMax_y endfunction function vec3_inBounds takes real this_x, real this_y, real this_z returns boolean return inBoundsXY(this_x, this_y) endfunction function HealbackMissile_update takes integer this_1 returns nothing call Projectile_update(this_1) if not vec3_inBounds(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif if vec3_distanceToSq(HealbackMissile_startPos_x[this_1], HealbackMissile_startPos_y[this_1], HealbackMissile_startPos_z[this_1], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) > HealbackMissile_distanceToTravelSq[this_1] then call dispatch_HealbackMissile_HealbackTower_HealbackMissile_onReachTarget(this_1) call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif endfunction function PhysicsProjectile_PhysicsModule_onEscapeGround takes integer this_1 returns nothing endfunction function dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_onEscapeGround takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PhysicsProjectile.onEscapeGround") else call error("Called PhysicsProjectile.onEscapeGround on invalid object.") endif endif call PhysicsProjectile_PhysicsModule_onEscapeGround(this_1) endfunction function PhysicsProjectile_PhysicsModule_inAir takes integer this_1, integer e returns nothing if not Entity_flying[e] then set Entity_flying[e] = true call dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_onEscapeGround(this_1) endif endfunction function dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_inAir takes integer this_1, integer e returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PhysicsProjectile.inAir") else call error("Called PhysicsProjectile.inAir on invalid object.") endif endif call PhysicsProjectile_PhysicsModule_inAir(this_1, e) endfunction function Entity_scaleVel takes integer this_1, real factor returns nothing local real tuple_temp = vec3_op_mult(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1], factor) local real tuple_temp_1 = vec3_op_mult_return_y local real tuple_temp_2 = vec3_op_mult_return_z set Entity_vel_x[this_1] = tuple_temp set Entity_vel_y[this_1] = tuple_temp_1 set Entity_vel_z[this_1] = tuple_temp_2 endfunction function dispatch_Entity_Entity_Entity_scaleVel takes integer this_1, real factor returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.scaleVel") else call error("Called Entity.scaleVel on invalid object.") endif endif call Entity_scaleVel(this_1, factor) endfunction function PhysicsProjectile_PhysicsModule_onGroundHit takes integer this_1 returns nothing endfunction function dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_onGroundHit takes integer this_1 returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PhysicsProjectile.onGroundHit") else call error("Called PhysicsProjectile.onGroundHit on invalid object.") endif endif call PhysicsProjectile_PhysicsModule_onGroundHit(this_1) endfunction function PhysicsProjectile_PhysicsModule_onGround takes integer this_1, integer e returns nothing call dispatch_Entity_Entity_Entity_scaleVel(e, PhysicsProjectile_PhysicsModule_surfaceFriction[this_1]) if Entity_flying[e] then set Entity_flying[e] = false call dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_onGroundHit(this_1) endif endfunction function dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_onGround takes integer this_1, integer e returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PhysicsProjectile.onGround") else call error("Called PhysicsProjectile.onGround on invalid object.") endif endif call PhysicsProjectile_PhysicsModule_onGround(this_1, e) endfunction function PhysicsProjectile_PhysicsModule_physicsUpdate takes integer this_1, integer e returns nothing local real pos_x local real pos_y local real pos_z local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if ( not Entity_done[e]) and Entity_DupletListModule_active[e] then set tuple_temp = dispatch_Entity_Entity_Entity_getPos(e) set tuple_temp_1 = dispatch_Entity_Entity_Entity_getPos_return_y set tuple_temp_2 = dispatch_Entity_Entity_Entity_getPos_return_z set pos_x = tuple_temp set pos_y = tuple_temp_1 set pos_z = tuple_temp_2 if Frentity_config_DYNAMIC_Z then set PhysicsProjectile_PhysicsModule_terrainZ[this_1] = vec3_getHeightMap(pos_x, pos_y, pos_z) endif if pos_z > PhysicsProjectile_PhysicsModule_terrainZ[this_1] then call dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_inAir(this_1, e) else call dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_onGround(this_1, e) endif endif endfunction function dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_physicsUpdate takes integer this_1, integer e returns nothing if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling PhysicsProjectile.physicsUpdate") else call error("Called PhysicsProjectile.physicsUpdate on invalid object.") endif endif call PhysicsProjectile_PhysicsModule_physicsUpdate(this_1, e) endfunction function getSlopeAngle takes real z1, real z2, real dist returns real set getSlopeAngle_return_radians = Atan2(z2 - z1, dist) return getSlopeAngle_return_radians endfunction function PhysicsProjectile_update takes integer this_1 returns nothing call dispatch_PhysicsProjectile_PhysicsProjectile_PhysicsProjectile_PhysicsModule_physicsUpdate(this_1, this_1) call dispatch_Projectile_Projectile_Projectile_setXYAngle(this_1, vec3_angleTo2d_2516(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], vec3_op_plus(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1]), vec3_op_plus_return_y, vec3_op_plus_return_z)) call dispatch_Projectile_Projectile_Projectile_setZAngle(this_1, getSlopeAngle(Entity_pos_z[this_1], Entity_pos_z[this_1] + Entity_vel_z[this_1], 2.)) call Projectile_update(this_1) endfunction function Rocket_update takes integer this_1 returns nothing call PhysicsProjectile_update(this_1) if Entity_vel_z[this_1] <= 0. then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) endif endfunction function real_lerp takes real this_1, real target_1, real alpha returns real return this_1 * (1.0 - alpha) + target_1 * alpha endfunction function bezier3 takes real start_1, real mid, real stop, real p returns real return start_1 + 2. * (mid - start_1) * p + (stop - 2. * mid + start_1) * p * p endfunction function vec3_bezier3 takes real this_x, real this_y, real this_z, real mid_x, real mid_y, real mid_z, real stop_x, real stop_y, real stop_z, real p returns real set vec3_bezier3_return_x = bezier3(this_x, mid_x, stop_x, p) set vec3_bezier3_return_y = bezier3(this_y, mid_y, stop_y, p) set vec3_bezier3_return_z = bezier3(this_z, mid_z, stop_z, p) return vec3_bezier3_return_x endfunction function Selector_update takes integer this_1 returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if Selector_p[this_1] > 0.990 then call dispatch_Entity_Entity_Entity_DupletListModule_deactivate(this_1) return endif set Selector_p[this_1] = real_lerp(Selector_p[this_1], 1., 0.025) set tuple_temp = vec3_bezier3(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], Selector_mid_x[this_1], Selector_mid_y[this_1], Selector_mid_z[this_1], Selector_finalPos_x[this_1], Selector_finalPos_y[this_1], Selector_finalPos_z[this_1], Selector_p[this_1]) set tuple_temp_1 = vec3_bezier3_return_y set tuple_temp_2 = vec3_bezier3_return_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 call unit_setXY(UnitEntity_actor[this_1], vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]), vec3_toVec2_return_y) call texttag_setPos(FText_tt[Selector_ownerTag[this_1]], vec3_op_minus(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], 20., 25., 0.), vec3_op_minus_return_y, vec3_op_minus_return_z) call player_selectSingle(Entity_owner[this_1], UnitEntity_actor[this_1]) endfunction function Shrapnell_update takes integer this_1 returns nothing local integer tuple_temp = Fx2_tint_red[Fx2Entity_fx[this_1]] local integer tuple_temp_1 = Fx2_tint_green[Fx2Entity_fx[this_1]] local integer tuple_temp_2 = Fx2_tint_blue[Fx2Entity_fx[this_1]] local integer tuple_temp_3 = Fx2_tint_alpha[Fx2Entity_fx[this_1]] local integer col_red = tuple_temp local integer col_green = tuple_temp_1 local integer col_blue = tuple_temp_2 local integer col_alpha = tuple_temp_3 local integer tuple_temp_4 local integer tuple_temp_5 local integer tuple_temp_6 local integer tuple_temp_7 set col_alpha = real_toInt(bezier3(255., 200., -5., Projectile_time[this_1] / Shrapnell_initialTime[this_1])) set tuple_temp_4 = col_red set tuple_temp_5 = col_green set tuple_temp_6 = col_blue set tuple_temp_7 = col_alpha set Fx2_tint_red[Fx2Entity_fx[this_1]] = tuple_temp_4 set Fx2_tint_green[Fx2Entity_fx[this_1]] = tuple_temp_5 set Fx2_tint_blue[Fx2Entity_fx[this_1]] = tuple_temp_6 set Fx2_tint_alpha[Fx2Entity_fx[this_1]] = tuple_temp_7 call PhysicsProjectile_update(this_1) endfunction function DummyDamage_damageType_1 takes integer this_1, damagetype damageType returns nothing set DummyDamage_damageType[this_1] = damageType endfunction function dispatch_DummyDamage_DummyDamage_DummyDamage_damageType takes integer this_1, damagetype damageType returns nothing if DummyDamage_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling DummyDamage.damageType") else call error("Called DummyDamage.damageType on invalid object.") endif endif call DummyDamage_damageType_1(this_1, damageType) endfunction function group_close takes group this_1 returns nothing call group_clear(this_1) call group_destr(this_1) endfunction function group_add_1_1903 takes group this_1, group groups_0 returns integer local integer i = 0 set i = i + BlzGroupAddGroupFast(groups_0, this_1) return i endfunction function group_iterator takes group this_1 returns group set Group_iterGroup = CreateGroup() call group_add_1_1903(Group_iterGroup, this_1) return Group_iterGroup endfunction function isUnitTargetable_2085 takes unit u_1 returns boolean return ( not IsUnitType(u_1, UNIT_TYPE_DEAD)) and ( not IsUnitType(u_1, UNIT_TYPE_MAGIC_IMMUNE)) and ( not IsUnitType(u_1, UNIT_TYPE_STRUCTURE)) endfunction function Sphere_update takes integer this_1 returns nothing local group iterator local unit u_1 local integer receiver local integer receiver_1 local integer receiver_2 local integer receiver_3 local integer receiver_4 local integer receiver_5 call Projectile_update(this_1) call GroupEnumUnitsInRange(Group_ENUM_GROUP, Entity_pos_x[this_1], Entity_pos_y[this_1], SphereTower_AREA_OF_EFFECT, null) set iterator = group_iterator(Group_ENUM_GROUP) loop exitwhen not group_hasNext(iterator) set u_1 = group_next(iterator) if isUnitTargetable_2085(u_1) and IsUnitEnemy(u_1, Entity_owner[this_1]) then set receiver = new_DummyDamage() call dispatch_DummyDamage_DummyDamage_DummyDamage_attacker(receiver, Entity_owner[this_1]) set receiver_1 = receiver call dispatch_DummyDamage_DummyDamage_DummyDamage_target(receiver_1, u_1) set receiver_2 = receiver_1 call dispatch_DummyDamage_DummyDamage_DummyDamage_amount(receiver_2, 5. * Sphere_level[this_1]) set receiver_3 = receiver_2 call dispatch_DummyDamage_DummyDamage_DummyDamage_attackType(receiver_3, ATTACK_TYPE_PIERCE) set receiver_4 = receiver_3 call dispatch_DummyDamage_DummyDamage_DummyDamage_damageType(receiver_4, DAMAGE_TYPE_NORMAL) set receiver_5 = receiver_4 call dispatch_DummyDamage_DummyDamage_DummyDamage_apply_1629(receiver_5, true) endif endloop call group_close(iterator) call group_clear(Group_ENUM_GROUP) endfunction function TextTagEntity_update takes integer this_1 returns nothing local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 set Entity_vel_z[this_1] = Entity_vel_z[this_1] + Entity_gravity[this_1] set tuple_temp = vec3_op_plus(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1], vec3_op_mult(Entity_vel_x[this_1], Entity_vel_y[this_1], Entity_vel_z[this_1], Entity_speedFactor[this_1]), vec3_op_mult_return_y, vec3_op_mult_return_z) set tuple_temp_1 = vec3_op_plus_return_y set tuple_temp_2 = vec3_op_plus_return_z set Entity_pos_x[this_1] = tuple_temp set Entity_pos_y[this_1] = tuple_temp_1 set Entity_pos_z[this_1] = tuple_temp_2 call texttag_setPos(FText_tt[TextTagEntity_ftext[this_1]], Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) call texttag_setColor_2373(FText_tt[TextTagEntity_ftext[this_1]], TextTagEntity_col_red[this_1], TextTagEntity_col_green[this_1], TextTagEntity_col_blue[this_1], TextTagEntity_col_alpha[this_1]) set TextTagEntity_dur[this_1] = TextTagEntity_dur[this_1] - Basics_ANIMATION_PERIOD if TextTagEntity_dur[this_1] <= 0. then call cyc_Projectile_terminate(30, this_1, 0., 0., 0., null, null, 0, 0, 0., 0., 0., 0.) endif endfunction function alloc_ForGroupCallback_forUnitsInRange_WaveMissile_WaveTower 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] = 801 else call error("Out of memory: Could not create ForGroupCallback_forUnitsInRange_WaveMissile_WaveTower.") set this_1 = 0 endif else set ForGroupCallback_firstFree = ForGroupCallback_firstFree - 1 set this_1 = ForGroupCallback_nextFree[ForGroupCallback_firstFree] set ForGroupCallback_typeId[this_1] = 801 endif return this_1 endfunction function Entity_getVel takes integer this_1 returns real set Entity_getVel_return_x = Entity_vel_x[this_1] set Entity_getVel_return_y = Entity_vel_y[this_1] set Entity_getVel_return_z = Entity_vel_z[this_1] return Entity_getVel_return_x endfunction function dispatch_Entity_Entity_Entity_getVel takes integer this_1 returns real local real Entity_Entity_getVel_result_x local real Entity_Entity_getVel_result_y local real Entity_Entity_getVel_result_z local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 if Serializable_typeId[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Entity.getVel") else call error("Called Entity.getVel on invalid object.") endif endif set tuple_temp = Entity_getVel(this_1) set tuple_temp_1 = Entity_getVel_return_y set tuple_temp_2 = Entity_getVel_return_z set Entity_Entity_getVel_result_x = tuple_temp set Entity_Entity_getVel_result_y = tuple_temp_1 set Entity_Entity_getVel_result_z = tuple_temp_2 set dispatch_Entity_Entity_Entity_getVel_return_x = Entity_Entity_getVel_result_x set dispatch_Entity_Entity_Entity_getVel_return_y = Entity_Entity_getVel_result_y set dispatch_Entity_Entity_Entity_getVel_return_z = Entity_Entity_getVel_result_z return dispatch_Entity_Entity_Entity_getVel_return_x endfunction function getBlowDamage takes integer level returns real return 75. * level + 125. endfunction function getDOT takes integer level returns real return 4.5 * level endfunction function WaveMissile_update takes integer this_1 returns nothing local integer dotDmg_1 local integer receiver local integer receiver_1 local integer receiver_2 local integer splashDmg_1 local integer receiver_3 local integer receiver_4 local integer receiver_5 local integer clVar local real temp_x local real temp_y local real temp local real tuple_temp local real tuple_temp_1 call Projectile_update(this_1) if vec3_lengthSquared(dispatch_Entity_Entity_Entity_getVel(this_1), dispatch_Entity_Entity_Entity_getVel_return_y, dispatch_Entity_Entity_Entity_getVel_return_z) < 16. then call dispatch_Projectile_Projectile_Projectile_terminate(this_1) return endif set receiver = new_DummyDamage() call dispatch_DummyDamage_DummyDamage_DummyDamage_attacker(receiver, Entity_owner[this_1]) set receiver_1 = receiver call dispatch_DummyDamage_DummyDamage_DummyDamage_amount(receiver_1, getDOT(WaveMissile_level[this_1])) set receiver_2 = receiver_1 call dispatch_DummyDamage_DummyDamage_DummyDamage_attackType(receiver_2, ATTACK_TYPE_PIERCE) set dotDmg_1 = receiver_2 set receiver_3 = new_DummyDamage() call dispatch_DummyDamage_DummyDamage_DummyDamage_attacker(receiver_3, Entity_owner[this_1]) set receiver_4 = receiver_3 call dispatch_DummyDamage_DummyDamage_DummyDamage_amount(receiver_4, getBlowDamage(WaveMissile_level[this_1])) set receiver_5 = receiver_4 call dispatch_DummyDamage_DummyDamage_DummyDamage_attackType(receiver_5, ATTACK_TYPE_PIERCE) set splashDmg_1 = receiver_5 set tuple_temp = vec3_toVec2(Entity_pos_x[this_1], Entity_pos_y[this_1], Entity_pos_z[this_1]) set tuple_temp_1 = vec3_toVec2_return_y set temp_x = tuple_temp set temp_y = tuple_temp_1 set temp = WaveTower_AREA_OF_EFFECT set clVar = alloc_ForGroupCallback_forUnitsInRange_WaveMissile_WaveTower() set this_1511[clVar] = this_1 set dotDmg[clVar] = dotDmg_1 set splashDmg[clVar] = splashDmg_1 call forUnitsInRange(temp_x, temp_y, temp, clVar) call dispatch_DummyDamage_destroyDummyDamage(dotDmg_1) call dispatch_DummyDamage_destroyDummyDamage(splashDmg_1) endfunction function dispatch_Entity_Entity_Entity_update 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.update") else call error("Called Entity.update on invalid object.") endif endif if Serializable_typeId[this_1] <= 929 then if Serializable_typeId[this_1] <= 923 then if Serializable_typeId[this_1] <= 920 then if Serializable_typeId[this_1] <= 918 then if Serializable_typeId[this_1] <= 917 then call Entity_update(this_1) else call Fx2Entity_update(this_1) endif elseif Serializable_typeId[this_1] <= 919 then call Ball_update(this_1) else call Fx2Entity_update(this_1) endif elseif Serializable_typeId[this_1] <= 922 then if Serializable_typeId[this_1] <= 921 then call Projectile_update(this_1) else call ArtilleryMissile_update(this_1) endif else call FlameMissile_update(this_1) endif elseif Serializable_typeId[this_1] <= 926 then if Serializable_typeId[this_1] <= 925 then if Serializable_typeId[this_1] <= 924 then call HealbackMissile_update(this_1) else call PhysicsProjectile_update(this_1) endif else call Rocket_update(this_1) endif elseif Serializable_typeId[this_1] <= 928 then if Serializable_typeId[this_1] <= 927 then call Shrapnell_update(this_1) else call Sphere_update(this_1) endif else call Projectile_update(this_1) endif elseif Serializable_typeId[this_1] <= 939 then if Serializable_typeId[this_1] <= 932 then if Serializable_typeId[this_1] <= 931 then if Serializable_typeId[this_1] <= 930 then call WaveMissile_update(this_1) else call Entity_update(this_1) endif else call TextTagEntity_update(this_1) endif elseif Serializable_typeId[this_1] <= 938 then if Serializable_typeId[this_1] <= 935 then call UnitEntity_update(this_1) else call Creep_update(this_1) endif else call BossFour_update(this_1) endif elseif Serializable_typeId[this_1] <= 952 then if Serializable_typeId[this_1] <= 943 then if Serializable_typeId[this_1] <= 942 then call Creep_update(this_1) else call EndBoss_update(this_1) endif else call Creep_update(this_1) endif elseif Serializable_typeId[this_1] <= 954 then if Serializable_typeId[this_1] <= 953 then call UnitEntity_update(this_1) else call Selector_update(this_1) endif else call UnitEntity_update(this_1) endif endfunction function Iterator_reset takes integer this_1 returns nothing set Iterator_current[this_1] = Entity_DupletListModule_firstActive endfunction function dispatch_Iterator_Entity_Entity_DupletListModule_Iterator_reset 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.reset") else call error("Called Iterator.reset on invalid object.") endif endif call Iterator_reset(this_1) endfunction function updateActiveEntities takes nothing returns nothing local integer e local integer from call dispatch_Iterator_Entity_Entity_DupletListModule_Iterator_reset(EntityManagement_activeItr) set from = EntityManagement_activeItr loop exitwhen not Iterator_hasNext(from) set e = Iterator_next(from) if not Entity_done[e] then call dispatch_Entity_Entity_Entity_update(e) endif endloop endfunction function Iterator_hasNext_515 takes integer this_1 returns boolean return Iterator_current_565[this_1] != 0 endfunction function Iterator_next_521 takes integer this_1 returns integer local integer res = Iterator_current_565[this_1] set Iterator_current_565[this_1] = Buff_LinkedListModule_next[Iterator_current_565[this_1]] return res endfunction function Buff_update takes integer this_1 returns nothing if Buff_duration[this_1] <= 0. then call cyc_unit_removeBuff(10, null, this_1) else set Buff_duration[this_1] = Buff_duration[this_1] - Buff_BUFF_ANIM_PERIOD endif endfunction function ShieldBuff_update takes integer this_1 returns nothing call Buff_update(this_1) if ShieldBuff_blockAmount[this_1] <= 0. then call cyc_unit_removeBuff(10, null, this_1) endif endfunction function JumpyBuff_update takes integer this_1 returns nothing call ShieldBuff_update(this_1) endfunction function PudgePowerBuff_update takes integer this_1 returns nothing call Buff_update(this_1) endfunction function int_lerp takes integer this_1, integer target_1, real alpha returns integer return real_round(this_1 * (1. - alpha) + target_1 * alpha) endfunction function color_lerp takes integer this_red, integer this_green, integer this_blue, integer target_red, integer target_green, integer target_blue, real smoothness returns integer set color_lerp_return_red = int_lerp(this_red, target_red, smoothness) set color_lerp_return_green = int_lerp(this_green, target_green, smoothness) set color_lerp_return_blue = int_lerp(this_blue, target_blue, smoothness) return color_lerp_return_red endfunction function unit_setVertexColor_2478 takes unit this_1, integer col_red, integer col_green, integer col_blue returns nothing call SetUnitVertexColor(this_1, col_red, col_green, col_blue, 255) endfunction function SludgeBuff_update takes integer this_1 returns nothing local integer tuple_temp local integer tuple_temp_1 local integer tuple_temp_2 call ShieldBuff_update(this_1) set tuple_temp = color_lerp(SludgeBuff_currentCol_red[this_1], SludgeBuff_currentCol_green[this_1], SludgeBuff_currentCol_blue[this_1], SludgeBuff_nextCol_red[this_1], SludgeBuff_nextCol_green[this_1], SludgeBuff_nextCol_blue[this_1], 0.35) set tuple_temp_1 = color_lerp_return_green set tuple_temp_2 = color_lerp_return_blue set SludgeBuff_currentCol_red[this_1] = tuple_temp set SludgeBuff_currentCol_green[this_1] = tuple_temp_1 set SludgeBuff_currentCol_blue[this_1] = tuple_temp_2 call unit_setVertexColor_2478(Buff_target[this_1], SludgeBuff_currentCol_red[this_1], SludgeBuff_currentCol_green[this_1], SludgeBuff_currentCol_blue[this_1]) endfunction function dispatch_Buff_Buff_Buff_update 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.update") else call error("Called Buff.update on invalid object.") endif endif if Buff_typeId[this_1] <= 647 then if Buff_typeId[this_1] <= 645 then if Buff_typeId[this_1] <= 644 then call Buff_update(this_1) else call PudgePowerBuff_update(this_1) endif elseif Buff_typeId[this_1] <= 646 then call ShieldBuff_update(this_1) else call JumpyBuff_update(this_1) endif elseif Buff_typeId[this_1] <= 649 then if Buff_typeId[this_1] <= 648 then call ShieldBuff_update(this_1) else call SludgeBuff_update(this_1) endif else call Buff_update(this_1) endif endfunction function Iterator_reset_526 takes integer this_1 returns nothing set Iterator_current_565[this_1] = Buff_LinkedListModule_first endfunction function dispatch_Iterator_Buff_Buff_LinkedListModule_Iterator_reset takes integer this_1 returns nothing if Iterator_typeId_578[this_1] == 0 then if this_1 == 0 then call error("Nullpointer exception when calling Iterator.reset") else call error("Called Iterator.reset on invalid object.") endif endif call Iterator_reset_526(this_1) endfunction function updateBuffs takes nothing returns nothing local integer b local integer from call dispatch_Iterator_Buff_Buff_LinkedListModule_Iterator_reset(EntityManagement_buffItr) set from = EntityManagement_buffItr loop exitwhen not Iterator_hasNext_515(from) set b = Iterator_next_521(from) if not Buff_done[b] then call dispatch_Buff_Buff_Buff_update(b) endif endloop endfunction function Entity_slowUpdate takes integer this_1 returns nothing set Entity_idleSeconds[this_1] = Entity_idleSeconds[this_1] + 1 endfunction function panCameraToTimed takes real pos_x, real pos_y, real pos_z, real duration returns nothing call PanCameraToTimedWithZ(pos_x, pos_y, pos_z - vec2_getTerrainZ(vec3_toVec2(pos_x, pos_y, pos_z), vec3_toVec2_return_y), duration) endfunction function player_panCameraToTimed_2267 takes player this_1, real pos_x, real pos_y, real pos_z, real duration returns nothing if Player_localPlayer == this_1 then call panCameraToTimed(pos_x, pos_y, pos_z, duration) endif endfunction function Selector_slowUpdate takes integer this_1 returns nothing call Entity_slowUpdate(this_1) call player_panCameraToTimed_2267(Entity_owner[this_1], dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z, 0.) call player_selectSingle(Entity_owner[this_1], UnitEntity_actor[this_1]) endfunction function alloc_CallbackSingle_doAfter_SpecialFive_SpecialFive 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] = 693 else call error("Out of memory: Could not create CallbackSingle_doAfter_SpecialFive_SpecialFive.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 693 endif return this_1 endfunction function alloc_CallbackSingle_doAfter_SpecialFive_SpecialFive_974 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] = 694 else call error("Out of memory: Could not create CallbackSingle_doAfter_SpecialFive_SpecialFive.") set this_1 = 0 endif else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_1 = CallbackSingle_nextFree[CallbackSingle_firstFree] set CallbackSingle_typeId[this_1] = 694 endif return this_1 endfunction function SpecialFive_slowUpdate takes integer this_1 returns nothing local unit receiver local unit receiver_1 local unit receiver_2 local integer clVar local real ppos_x_1 local real ppos_y_1 local integer i local integer temp local integer clVar_1 local real temp_1 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 call Entity_slowUpdate(this_1) if unit_isAlive(UnitEntity_actor[this_1]) then set SpecialFive_spawntimer[this_1] = SpecialFive_spawntimer[this_1] + 1 if SpecialFive_spawntimer[this_1] >= SpecialFive_SPAWNTIME then set SpecialFive_spawntimer[this_1] = GetRandomInt(-4, 4) set receiver = UnitEntity_actor[this_1] call unit_setPropWindow(receiver, real_fromDeg(0.)) set receiver_1 = receiver call unit_setAnimation(receiver_1, "Stand Work Gold") set receiver_2 = receiver_1 call unit_queueAnimation(receiver_2, "Stand Work Gold") set clVar = alloc_CallbackSingle_doAfter_SpecialFive_SpecialFive() call construct_CallbackSingle(clVar) set this_1501[clVar] = this_1 call doAfter(6., clVar) set tuple_temp = vec2_polarOffset(vec3_toVec2(dispatch_UnitEntity_Entity_UnitEntity_getPos(this_1), dispatch_UnitEntity_Entity_UnitEntity_getPos_return_y, dispatch_UnitEntity_Entity_UnitEntity_getPos_return_z), vec3_toVec2_return_y, unit_getFacingAngle(UnitEntity_actor[this_1]), 128.) set tuple_temp_1 = vec2_polarOffset_return_y set ppos_x_1 = tuple_temp set ppos_y_1 = tuple_temp_1 set i = 1 set temp = SpecialFive_SPAWNAMOUNT loop exitwhen i > temp set temp_1 = int_toReal(i - 1) * 1.5 set clVar_1 = alloc_CallbackSingle_doAfter_SpecialFive_SpecialFive_974() call construct_CallbackSingle(clVar_1) set tuple_temp_2 = ppos_x_1 set tuple_temp_3 = ppos_y_1 set ppos_x[clVar_1] = tuple_temp_2 set ppos_y[clVar_1] = tuple_temp_3 call doAfter(temp_1, clVar_1) set i = i + 1 endloop endif endif endfunction function dispatch_Entity_Entity_Entity_slowUpdate 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.slowUpdate") else call error("Called Entity.slowUpdate on invalid object.") endif endif if Serializable_typeId[this_1] <= 953 then if Serializable_typeId[this_1] <= 947 then if Serializable_typeId[this_1] <= 946 then call Entity_slowUpdate(this_1) else call SpecialFive_slowUpdate(this_1) endif else call Entity_slowUpdate(this_1) endif elseif Serializable_typeId[this_1] <= 954 then call Selector_slowUpdate(this_1) else call Entity_slowUpdate(this_1) endif endfunction function updateInactiveEntities takes nothing returns nothing local integer e = Entity_DupletListModule_firstInactive loop exitwhen not (e != 0) call dispatch_Entity_Entity_Entity_slowUpdate(e) set e = Entity_DupletListModule_next[e] endloop endfunction function initGlobals takes nothing returns nothing set gg_rct_smallBot = null set gg_rct_smallTop = null set gg_rct_smallLeft = null set gg_rct_smallRight = null set gg_rct_bigLeftBot = null set gg_rct_bigLeftTop = null set gg_rct_bigTopLeft = null set gg_rct_bigTopRight = null set gg_rct_bigRightTop = null set gg_rct_bigRightBot = null set gg_rct_bigBotRight = null set gg_rct_bigBotLeft = null set gg_cam_Camera_001 = null set gg_cam_Camera_002 = null set gg_cam_Camera_003 = null set gg_cam_Camera_004 = null set gg_cam_Camera_005 = null set gg_trg_Untitled_Trigger_001 = null set gg_trg_Untitled_Trigger_011 = null set gg_trg_Untitled_Trigger_012 = null set gg_unit_h00E_0008 = null set gg_unit_h00E_0007 = null set gg_trg_Untitled_Trigger_002 = null set Serializable_firstFree = 0 set Serializable_maxIndex = 0 set EventListener_firstFree = 0 set EventListener_maxIndex = 0 set OnCastListener_firstFree = 0 set OnCastListener_maxIndex = 0 set CallbackSingle_firstFree = 0 set CallbackSingle_maxIndex = 0 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 Buff_firstFree = 0 set Buff_maxIndex = 0 set OnExpireEvent_firstFree = 0 set OnExpireEvent_maxIndex = 0 set DamageListener_firstFree = 0 set DamageListener_maxIndex = 0 set BackIterator_firstFree = 0 set BackIterator_maxIndex = 0 set Iterator_firstFree_569 = 0 set Iterator_maxIndex_572 = 0 set ForGroupCallback_firstFree = 0 set ForGroupCallback_maxIndex = 0 set CallbackCounted_firstFree = 0 set CallbackCounted_maxIndex = 0 set Callback_firstFree = 0 set CallbackPeriodic_firstFree = 0 set CallbackPeriodic_maxIndex = 0 set DamageElement_firstFree = 0 set DamageElement_maxIndex = 0 set DamageInstance_firstFree = 0 set DamageInstance_maxIndex = 0 set FinalBossSummoning_firstFree = 0 set FinalBossSummoning_maxIndex = 0 set DummyDamage_firstFree = 0 set DummyDamage_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 EndBossFight_firstFree = 0 set EndBossFight_maxIndex = 0 set Music_firstFree = 0 set Music_maxIndex = 0 set Iterator_firstFree = 0 set Iterator_maxIndex = 0 set FText_firstFree = 0 set FText_maxIndex = 0 set BackIterator_firstFree_47 = 0 set BackIterator_maxIndex_49 = 0 set Iterator_firstFree_570 = 0 set Iterator_maxIndex_573 = 0 set Fx2_firstFree = 0 set Fx2_maxIndex = 0 set Fx_firstFree = 0 set Fx_maxIndex = 0 set LLItrClosure_firstFree = 0 set LLItrClosure_maxIndex = 0 set HashList_firstFree = 0 set Table_firstFree = 0 set Table_maxIndex = 0 set EntityWithDist_firstFree = 0 set EntityWithDist_maxIndex = 0 set Comparator_firstFree = 0 set Comparator_maxIndex = 0 set Property_firstFree = 0 set Property_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 PlayerData_firstFree = 0 set PlayerData_maxIndex = 0 set OnEndListener_firstFree = 0 set OnHitListener_firstFree = 0 set Delimiter_firstFree = 0 set Delimiter_maxIndex = 0 set Sim3DSound_firstFree = 0 set SoundDefinition_firstFree = 0 set SoundDefinition_maxIndex = 0 set SoundInstance_firstFree = 0 set SoundInstance_maxIndex = 0 set UnitIndex_firstFree = 0 set UnitIndex_maxIndex = 0 set CreateBoss_firstFree = 0 set CreateBoss_maxIndex = 0 set CreateSpecial_firstFree = 0 set CreateSpecial_maxIndex = 0 set BossWave_firstFree = 0 set BossWave_maxIndex = 0 set NormalWave_firstFree = 0 set NormalWave_maxIndex = 0 set SpecialWave_firstFree = 0 set SpecialWave_maxIndex = 0 set Reference_integer__firstFree = 0 set Reference_integer__maxIndex = 0 set ref_function_Trig_Untitled_Trigger_001_Actions = function Trig_Untitled_Trigger_001_Actions set ref_function_Trig_Untitled_Trigger_011_Actions = function Trig_Untitled_Trigger_011_Actions set ref_function_Trig_Untitled_Trigger_012_Actions = function Trig_Untitled_Trigger_012_Actions set ref_function_Trig_Untitled_Trigger_002_Actions = function Trig_Untitled_Trigger_002_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_MagicFunctions = function init_MagicFunctions set ref_function_init_Basics = function init_Basics set ref_function_init_GameTimer = function init_GameTimer 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_Printing_config = function init_Printing_config set ref_function_init_Printing = function init_Printing 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_AbilityObjEditing = function init_AbilityObjEditing set ref_function_init_TimerUtils = function init_TimerUtils set ref_function_init_RegisterEvents = function init_RegisterEvents set ref_function_init_ClosureTimers = function init_ClosureTimers 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_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_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_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_config = function init_Frentity_config 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_DamageEvent = function init_DamageEvent set ref_function_init_Squares = function init_Squares set ref_function_init_Buff = function init_Buff set ref_function_init_Tower = function init_Tower set ref_function_init_BuffIds = function init_BuffIds set ref_function_init_Buildings = function init_Buildings set ref_function_init_Doodads = function init_Doodads set ref_function_init_Environment = function init_Environment set ref_function_init_Icons = function init_Icons 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_AttachmentPoints = function init_AttachmentPoints set ref_function_init_Fx2Entity = function init_Fx2Entity set ref_function_init_GroupUtils = function init_GroupUtils set ref_function_init_DummyRecycler = function init_DummyRecycler set ref_function_init_ArtilleryTower = function init_ArtilleryTower set ref_function_init_AssassinTower = function init_AssassinTower set ref_function_init_BigNum = function init_BigNum set ref_function_init_BigString = function init_BigString set ref_function_init_Bounty = function init_Bounty set ref_function_init_Creep = function init_Creep set ref_function_init_LumberAndCoinSystem = function init_LumberAndCoinSystem set ref_function_init_Simulate3dSound = function init_Simulate3dSound set ref_function_init_SoundUtils = function init_SoundUtils set ref_function_init_PhysicsEntity = function init_PhysicsEntity set ref_function_init_Boss = function init_Boss set ref_function_init_BossFour = function init_BossFour set ref_function_init_WarningBuff = function init_WarningBuff set ref_function_init_BossThree = function init_BossThree set ref_function_init_BossTwo = function init_BossTwo set ref_function_init_DebugInfo = function init_DebugInfo set ref_function_init_Destroy = function init_Destroy set ref_function_init_DestroyerSummoner = function init_DestroyerSummoner set ref_function_init_Encoder = function init_Encoder set ref_function_init_TowerBlockade = function init_TowerBlockade set ref_function_init_EndGame = function init_EndGame set ref_function_init_Special = function init_Special set ref_function_init_SpecialTwo = function init_SpecialTwo set ref_function_init_SpecialFive = function init_SpecialFive set ref_function_init_UnitSpawnSystem = function init_UnitSpawnSystem set ref_function_init_EndBoss = function init_EndBoss set ref_function_init_EntityManagement = function init_EntityManagement set ref_function_init_FieldGenerator = function init_FieldGenerator set ref_function_init_FlamethrowerTower = function init_FlamethrowerTower set ref_function_init_PlayerData = function init_PlayerData set ref_function_init_GameConditions = function init_GameConditions set ref_function_init_GameInit = function init_GameInit set ref_function_init_HealbackTower = function init_HealbackTower set ref_function_init_InstanceBoard = function init_InstanceBoard 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_MultiboardSystem = function init_MultiboardSystem set ref_function_init_Reinforcements = function init_Reinforcements set ref_function_init_RevivalSystem = function init_RevivalSystem set ref_function_init_Rocket = function init_Rocket set ref_function_init_Selector = function init_Selector set ref_function_init_ShieldKit = function init_ShieldKit set ref_function_init_SphereTower = function init_SphereTower set ref_function_init_StompingTower = function init_StompingTower set ref_function_init_SuperCharge = function init_SuperCharge set ref_function_init_ThermoTower = function init_ThermoTower set ref_function_init_TownBell = function init_TownBell set ref_function_init_TrooperTower = function init_TrooperTower set ref_function_init_WaveTower = function init_WaveTower 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_updateActiveEntities = function updateActiveEntities set ref_function_updateBuffs = function updateBuffs set ref_function_updateInactiveEntities = function updateInactiveEntities set ref_function_code__onUnitDeindex_EntityManagement = function code__onUnitDeindex_EntityManagement set ref_function_executeCurrentCallback = function executeCurrentCallback set ref_function_endGameTimer = function endGameTimer set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer set ref_function_code__startPeriodic_MultiboardSystem = function code__startPeriodic_MultiboardSystem 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_1315 = function code__start_SeqWorker_1237 set ref_function_code__EnumItemsInRect_TerrainUtils = function code__EnumItemsInRect_TerrainUtils set ref_function_code__onEnter_UnitIndexer = function code__onEnter_UnitIndexer set ref_function_code__onLeave_UnitIndexer = function code__onLeave_UnitIndexer set ref_function_onSpawnTime = function onSpawnTime set ref_function_code__addAction_nullTimer_ClosureEvents = function code__addAction_nullTimer_ClosureEvents set ref_function_code__addAction_nullTimer_ClosureEvents_1300 = function code__addAction_nullTimer_ClosureEvents_1222 set ref_function_code__addAction_nullTimer_ClosureEvents_1301 = function code__addAction_nullTimer_ClosureEvents_1223 set ref_function_code__registerPlayerUnitEvent_nullTimer_ClosureEvents = function code__registerPlayerUnitEvent_nullTimer_ClosureEvents set ref_function_CallbackCounted_staticCallback = function CallbackCounted_staticCallback set ref_function_CallbackPeriodic_staticCallback = function CallbackPeriodic_staticCallback 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 set ref_function_ThermoTower_removeFrostAbil = function ThermoTower_removeFrostAbil endfunction function main takes nothing returns nothing local weathereffect we local trigger initTrig call initGlobals() call initCompiletimeState() call SetCameraBounds(( - 1280.0) + GetCameraMargin(CAMERA_MARGIN_LEFT), ( - 5632.0) + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 17664.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 5120.0 - GetCameraMargin(CAMERA_MARGIN_TOP), ( - 1280.0) + GetCameraMargin(CAMERA_MARGIN_LEFT), 5120.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 17664.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), ( - 5632.0) + GetCameraMargin(CAMERA_MARGIN_BOTTOM)) call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl") call SetTerrainFogEx(0, 600.0, 5000.0, 0.500, 0.078, 0.078, 0.196) call SetWaterBaseColor(100, 100, 150, 255) set we = AddWeatherEffect(Rect( - 2048.0, - 6144.0, 18432.0, 6144.0), 1380019314) call EnableWeatherEffect(we, true) call NewSoundEnvironment("Default") call SetAmbientDaySound("VillageDay") call SetAmbientNightSound("VillageNight") call SetMapMusic("Music", true, 0) call CreateRegions() call CreateCameras() call CreateAllUnits() 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_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_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_Printing_config)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Printing_config.") 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_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_AbilityObjEditing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityObjEditing.") 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_RegisterEvents)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package RegisterEvents.") 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_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_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_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_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_config)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Frentity_config.") 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_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_Buff)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Buff.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Tower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Tower.") 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_Doodads)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Doodads.") 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_Icons)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Icons.") 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_AttachmentPoints)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AttachmentPoints.") 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_GroupUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GroupUtils.") 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_ArtilleryTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ArtilleryTower.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_AssassinTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AssassinTower.") 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_Bounty)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Bounty.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Creep)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Creep.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_LumberAndCoinSystem)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package LumberAndCoinSystem.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Simulate3dSound)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Simulate3dSound.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SoundUtils)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SoundUtils.") 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_Boss)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Boss.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BossFour)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BossFour.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WarningBuff)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WarningBuff.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BossThree)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BossThree.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_BossTwo)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package BossTwo.") 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_Destroy)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Destroy.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_DestroyerSummoner)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package DestroyerSummoner.") 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_TowerBlockade)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TowerBlockade.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_EndGame)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EndGame.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Special)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Special.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SpecialTwo)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SpecialTwo.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SpecialFive)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SpecialFive.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_UnitSpawnSystem)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package UnitSpawnSystem.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_EndBoss)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EndBoss.") 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_FieldGenerator)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package FieldGenerator.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_FlamethrowerTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package FlamethrowerTower.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_PlayerData)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package PlayerData.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameConditions)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameConditions.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameInit)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameInit.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HealbackTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HealbackTower.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_InstanceBoard)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package InstanceBoard.") 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_MultiboardSystem)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MultiboardSystem.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Reinforcements)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Reinforcements.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_RevivalSystem)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package RevivalSystem.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Rocket)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Rocket.") 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_ShieldKit)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ShieldKit.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SphereTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SphereTower.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_StompingTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package StompingTower.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_SuperCharge)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package SuperCharge.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ThermoTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ThermoTower.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TownBell)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TownBell.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TrooperTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TrooperTower.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WaveTower)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WaveTower.") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function InitAllyPriorities takes nothing returns nothing call SetStartLocPrioCount(0, 7) call SetStartLocPrio(0, 0, 1, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(0, 1, 2, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(0, 2, 3, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(0, 3, 4, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(0, 4, 5, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(0, 5, 6, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(0, 6, 7, MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(1, 7) call SetStartLocPrio(1, 0, 0, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(1, 1, 2, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(1, 2, 3, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(1, 3, 4, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(1, 4, 5, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(1, 5, 6, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(1, 6, 7, MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(2, 7) call SetStartLocPrio(2, 0, 0, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(2, 1, 1, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(2, 2, 3, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(2, 3, 4, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(2, 4, 5, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(2, 5, 6, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(2, 6, 7, MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(3, 7) call SetStartLocPrio(3, 0, 0, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(3, 1, 1, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(3, 2, 2, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(3, 3, 4, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(3, 4, 5, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(3, 5, 6, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(3, 6, 7, MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(4, 7) call SetStartLocPrio(4, 0, 0, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(4, 1, 1, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(4, 2, 2, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(4, 3, 3, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(4, 4, 5, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(4, 5, 6, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(4, 6, 7, MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(5, 7) call SetStartLocPrio(5, 0, 0, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(5, 1, 1, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(5, 2, 2, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(5, 3, 3, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(5, 4, 4, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(5, 5, 6, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(5, 6, 7, MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(6, 7) call SetStartLocPrio(6, 0, 0, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6, 1, 1, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6, 2, 2, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6, 3, 3, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6, 4, 4, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6, 5, 5, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(6, 6, 7, MAP_LOC_PRIO_HIGH) call SetStartLocPrioCount(7, 7) call SetStartLocPrio(7, 0, 0, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(7, 1, 1, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(7, 2, 2, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(7, 3, 3, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(7, 4, 4, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(7, 5, 5, MAP_LOC_PRIO_HIGH) call SetStartLocPrio(7, 6, 6, MAP_LOC_PRIO_HIGH) endfunction function InitCustomPlayerSlots takes nothing returns nothing call SetPlayerStartLocation(Player(0), 0) call ForcePlayerStartLocation(Player(0), 0) call SetPlayerColor(Player(0), ConvertPlayerColor(0)) call SetPlayerRacePreference(Player(0), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(0), false) call SetPlayerController(Player(0), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(1), 1) call ForcePlayerStartLocation(Player(1), 1) call SetPlayerColor(Player(1), ConvertPlayerColor(1)) call SetPlayerRacePreference(Player(1), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(1), false) call SetPlayerController(Player(1), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(2), 2) call ForcePlayerStartLocation(Player(2), 2) call SetPlayerColor(Player(2), ConvertPlayerColor(2)) call SetPlayerRacePreference(Player(2), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(2), false) call SetPlayerController(Player(2), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(3), 3) call ForcePlayerStartLocation(Player(3), 3) call SetPlayerColor(Player(3), ConvertPlayerColor(3)) call SetPlayerRacePreference(Player(3), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(3), false) call SetPlayerController(Player(3), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(4), 4) call ForcePlayerStartLocation(Player(4), 4) call SetPlayerColor(Player(4), ConvertPlayerColor(4)) call SetPlayerRacePreference(Player(4), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(4), false) call SetPlayerController(Player(4), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(5), 5) call ForcePlayerStartLocation(Player(5), 5) call SetPlayerColor(Player(5), ConvertPlayerColor(5)) call SetPlayerRacePreference(Player(5), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(5), false) call SetPlayerController(Player(5), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(6), 6) call ForcePlayerStartLocation(Player(6), 6) call SetPlayerColor(Player(6), ConvertPlayerColor(6)) call SetPlayerRacePreference(Player(6), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(6), false) call SetPlayerController(Player(6), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(7), 7) call ForcePlayerStartLocation(Player(7), 7) call SetPlayerColor(Player(7), ConvertPlayerColor(7)) call SetPlayerRacePreference(Player(7), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(7), false) call SetPlayerController(Player(7), MAP_CONTROL_USER) call SetPlayerStartLocation(Player(8), 8) call ForcePlayerStartLocation(Player(8), 8) call SetPlayerColor(Player(8), ConvertPlayerColor(8)) call SetPlayerRacePreference(Player(8), RACE_PREF_HUMAN) call SetPlayerRaceSelectable(Player(8), false) call SetPlayerController(Player(8), MAP_CONTROL_COMPUTER) call SetPlayerStartLocation(Player(9), 9) call ForcePlayerStartLocation(Player(9), 9) call SetPlayerColor(Player(9), ConvertPlayerColor(9)) call SetPlayerRacePreference(Player(9), RACE_PREF_UNDEAD) call SetPlayerRaceSelectable(Player(9), false) call SetPlayerController(Player(9), MAP_CONTROL_COMPUTER) endfunction function InitCustomTeams takes nothing returns nothing call SetPlayerTeam(Player(0), 0) call SetPlayerState(Player(0), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(1), 0) call SetPlayerState(Player(1), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(2), 0) call SetPlayerState(Player(2), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(3), 0) call SetPlayerState(Player(3), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(4), 0) call SetPlayerState(Player(4), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(5), 0) call SetPlayerState(Player(5), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(6), 0) call SetPlayerState(Player(6), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(7), 0) call SetPlayerState(Player(7), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerTeam(Player(8), 0) call SetPlayerState(Player(8), PLAYER_STATE_ALLIED_VICTORY, 1) call SetPlayerAllianceStateAllyBJ(Player(0), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(0), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(0), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(0), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(0), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(0), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(0), Player(7), true) call SetPlayerAllianceStateAllyBJ(Player(0), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(7), true) call SetPlayerAllianceStateAllyBJ(Player(1), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(7), true) call SetPlayerAllianceStateAllyBJ(Player(2), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(7), true) call SetPlayerAllianceStateAllyBJ(Player(3), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(7), true) call SetPlayerAllianceStateAllyBJ(Player(4), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(7), true) call SetPlayerAllianceStateAllyBJ(Player(5), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(7), true) call SetPlayerAllianceStateAllyBJ(Player(6), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(7), Player(8), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(0), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(1), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(2), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(3), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(4), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(5), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(6), true) call SetPlayerAllianceStateAllyBJ(Player(8), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(0), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(1), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(2), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(3), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(4), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(5), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(7), true) call SetPlayerAllianceStateVisionBJ(Player(6), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(7), Player(8), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(0), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(1), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(2), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(3), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(4), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(5), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(6), true) call SetPlayerAllianceStateVisionBJ(Player(8), Player(7), true) call SetPlayerTeam(Player(9), 1) call SetPlayerState(Player(9), PLAYER_STATE_ALLIED_VICTORY, 1) endfunction function config takes nothing returns nothing call SetMapName("TRIGSTR_1745") call SetMapDescription("TRIGSTR_014") call SetPlayers(10) call SetTeams(10) call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER) call DefineStartLocation(0, 2176.0, 1664.0) call DefineStartLocation(1, 2176.0, 1664.0) call DefineStartLocation(2, 2176.0, 1664.0) call DefineStartLocation(3, 2176.0, 1664.0) call DefineStartLocation(4, 2176.0, 1664.0) call DefineStartLocation(5, 2176.0, 1664.0) call DefineStartLocation(6, 2176.0, 1664.0) call DefineStartLocation(7, 2176.0, 1664.0) call DefineStartLocation(8, 2176.0, 1664.0) call DefineStartLocation(9, 2176.0, 1664.0) call InitCustomPlayerSlots() call InitCustomTeams() call InitAllyPriorities() endfunction