// this script was compiled with wurst 1.5.0.0-jenkins-Wurst-97 globals integer array LinkedList_dummy integer array LinkedList_size integer array LLEntry_elem integer array LLEntry_prev integer array LLEntry_next integer array LLIterator_dummy integer array LLIterator_current string array Char_c2s integer array Char_s2c integer Char_MAX_INDEX=0 string String_charset=null string String_numberset=null hashtable Table_ht=null integer Colors_decs=0 real Maths_DEGTORAD=0. real Maths_RADTODEG=0. real Terrain_MAX_RANGE=0. integer Terrain_DUMMY_ITEM_ID=0 location Terrain_tempLoc=null item Terrain_dItem=null rect Terrain_find=null item array Terrain_hid integer Terrain_hidMax=0 real Terrain_tempPos_x=0. real Terrain_tempPos_y=0. boolean array PrintingHelper_wantDebug real PrintingHelper_DEBUG_MSG_DURATION=0. boolean MagicFunctions_compiletime=false integer array W3UDefinition_def timer array TimerUtils_freeTimers integer TimerUtils_freeTimersCount=0 integer TimerUtils_timerData=0 integer TimerUtils_HELD=0 group TempGroups_ENUM_GROUP=null integer Basics_DUMMY_UNIT_ID=0 integer Basics_HEIGHT_ENABLER=0 integer Basics_LOCUST_ID=0 real Basics_ANIMATION_PERIOD=0. player Basics_DUMMY_PLAYER=null integer TypeCasting_typecastdata=0 string ObjectIds_charMap=null integer array OrderStringFactory_counter string array OrderStringFactory_orderStrings integer ChannelAbilityPreset_odf=0 integer ChannelAbilityPreset_visibleval=0 integer ChannelAbilityPreset_targetimageval=0 integer ChannelAbilityPreset_physicalspellval=0 integer ChannelAbilityPreset_universalspellval=0 integer ChannelAbilityPreset_uniquecastval=0 integer array lc integer array lc_2 integer array lc_3 integer array AbilityDefinition_def integer array AbilityDefinition_lvls integer array AbilityDefinition_tooltipGen integer array ttype integer array this boolean array ChannelAbilityPreset_VISIBLE integer array ChannelAbilityPreset_optionval string AbilityTooltipGenerator_TITLE_COLOR=null integer AbilityTooltipGenerator_MAX_TITLES=0 integer array AbilityTooltipGenerator_maxLevel integer array AbilityTooltipGenerator_titleCount hashtable HashMap_ht=null real TrackableEx_doubleClickSpeed=0. timer array TrackableEx_playerDoubleClickTimer integer array TrackableEx_playerClickBefore integer TrackableEx_trackableOwner=0 integer TrackableEx_trackableObjects=0 trigger TrackableEx_trackTrigger=null trigger TrackableEx_clickTrigger=null integer array TrackableEx_onTrack integer array TrackableEx_onClick integer array TrackableEx_onDoubleClick integer array Event_first integer array Event_last boolean array Event_checkData integer array Action_next integer array Action_prev integer array Action_ev unit Filter_filterCheckUnit=null real Helper_rot45=0. timer GameTimer_gameTimer=null real GameTimer_currentTime=0. boolean DebugFile_bufferWasCleared=false string DebugFile_path=null string DebugFile_filetype=null integer DebugFile_lastSavedFile=0 string array DebugFile_filename string array DebugFile_buffer integer array DebugFile_content integer array DebugFile_currentLine hashtable HashList_ht=null integer array HashList_size integer Setup_maxBonSize=0 integer Setup_attackRaw=0 integer Setup_attackSpeedRaw=0 integer Setup_armorRaw=0 integer Setup_lifeRaw=0 integer Setup_manaRaw=0 integer Setup_agiRaw=0 integer Setup_strRaw=0 integer Setup_intRaw=0 integer Setup_lifeRegRaw=0 integer Setup_manaRegRaw=0 integer Setup_permAttackItemRaw=0 integer Setup_permAttackRaw=0 item array Setup_permAttackTome item Setup_permAttackNegTome=null integer Setup_debugFile=0 integer Setup_allPlayers=0 real Setup_recycleGraveyard_x=0. real Setup_recycleGraveyard_y=0. real Setup_menuStart_x=0. real Setup_menuStart_y=0. hashtable Setup_trackBlacklist=null integer Setup_tileSize=0 integer Setup_menuHeight=0 integer Setup_menuWidth=0 integer array Setup_tracks integer array ElementLoop_a integer array ElementLoop_a_2 integer array ElementLoop_b integer array ElementLoop_b_2 integer array ElementLoop_start timer array CallbackPeriodic_t integer PreloadSystem_preloadActions=0 integer PreloadSystem_abilitysToPreload=0 integer PreloadSystem_unitsToPreload=0 integer PreloadSystem_buffsToPreload=0 integer PreloadSystem_itemsToPreload=0 integer PreloadSystem_destructablesToPreload=0 unit PreloadSystem_preloadDummy=null real PreloadSystem_abilityLoadTime=0. real PreloadSystem_abilityLoadTimeLvlBonus=0. real PreloadSystem_unitLoadTime=0. real PreloadSystem_buffLoadTime=0. real PreloadSystem_itemLoadTime=0. real PreloadSystem_destructableLoadTime=0. integer array Ability_id integer array Ability_lvl unit array u destructable array d integer array Dot_a integer array Dot_u integer array Dot_source real array Dot_damage timer array Dot_t integer LinkedListModule_first=0 integer LinkedListModule_last=0 integer LinkedListModule_size=0 integer array LinkedListModule_prev integer array LinkedListModule_next integer array this_2 integer InstanceBoard_classes=0 multiboard InstanceBoard_mb=null integer array InstanceBoard_count string array InstanceBoard_nameOfClass integer array Buff_action integer array Buff_bon integer array Buff_u integer array Buff_btyp integer array Buff_btyp_2 effect array Buff_fx timer array Buff_fxTimer timer array Buff_t integer array this_3 integer array TextTag_u texttag array TextTag_tt timer array TextTag_t real array TextTag_amount integer array TextTag_tType integer ShowInstances_classId=0 integer array ShieldList_first integer array ShieldList_last real array ShieldList_shieldSum integer array Shield_prev integer array Shield_next integer array Shield_referingList timer array Shield_t real array Shield_amount integer array Shield_target integer array Shield_shieldDestroyed string HeroBar_hpColorDead=null string HeroBar_shieldColor=null string HeroBar_mpColor=null string HeroBar_mpColorDead=null string HeroBar_endColor=null string HeroBar_marker=null string HeroBar_bar=null integer HeroBar_realBarCount=0 integer HeroBar_fakeBarCount=0 integer HeroBar_seperateAt=0 integer array Bar_owner boolean array Bar_isVisible boolean array Bar_check string array Bar_hpFull integer array Bar_markerDistance texttag array Bar_tt integer LinkedListModule_first_2=0 integer array LinkedListModule_next_2 string Lightning_FINGER_OF_DEATH=null rect MapBounds_playableMapRect=null rect MapBounds_boundRect=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. integer NewDummyRecycler_DIFFERENT_ANGLES=0 real NewDummyRecycler_ANGLE_DEGREE=0. integer NewDummyRecycler_SAVED_UNITS_PER_ANGLE=0 integer array DummyRecycler_angleQueues integer array ArrayQueue_fp integer array ArrayQueue_rp integer array ArrayQueue_size timer DelayNode_t=null unit array DelayNode_u real array DelayNode_delayTime integer array DelayNode_next integer DelayNode_first=0 integer DelayNode_last=0 unit array Fx_dummy effect array Fx_fx string array CrigBar_borderPath string array CrigBar_barPath real array CrigBar_barScaleFactor integer array CrigBar_barColor integer array CrigBar_barColor_2 integer array CrigBar_barColor_3 real array CrigBar_pos real array CrigBar_pos_2 real array CrigBar_offset real array CrigBar_offset_2 real array CrigBar_offset_3 real array CrigBar_basicOffset real array CrigBar_basicOffset_2 real array CrigBar_basicOffset_3 real array CrigBar_basicBarOffset real array CrigBar_basicBarOffset_2 real array CrigBar_basicBarOffset_3 image array CrigBar_border image array CrigBar_bar image array CrigBar_barBackground real array CrigBar_percent real array CrigBar_height real array CrigBar_width integer ControlPoint_model=0 integer ControlPoint_modelMorphed=0 integer ControlPoint_decoCystalGreenId=0 integer ControlPoint_decoCystalRedId=0 integer ControlPoint_decoLightGreenId=0 integer ControlPoint_decoLightRedId=0 string ControlPoint_teamEverlivingLightning=null string ControlPoint_teamWargrinLightning=null real ControlPoint_decoCrystalOusideScale=0. real ControlPoint_decoCrystalInsideScale=0. integer ControlPoint_morphAbi=0 real ControlPoint_height=0. real ControlPoint_captureSpeed=0. real ControlPoint_maxDistance=0. real ControlPoint_captureDamage=0. real ControlPoint_regenerationSpeed=0. lightning array CaptureData_l1 lightning array CaptureData_l2 real array CaptureData_blitzPos boolean array CaptureData_wantCapture integer array CaptureData_onDeath integer array CaptureData_captureCancel integer array CaptureData_fx integer array this_4 integer array this_5 integer array data integer array h integer array fx destructable array des integer array this_6 integer array newCrystalId real array desPos real array desPos_2 real array desPos_3 real array z integer array tempGlowMarkers integer array newDecoId lightning array ls integer array sideCrystalFx integer array this_7 integer array mainCrystalFx integer array tempOutsideCrystals string array lightningId integer array this_8 string array effectPath integer array newCrystalId_2 real array z_2 integer array tempGlowMarkers_2 integer array newDecoId_2 integer array this_9 integer array newCrystalId_3 real array z_3 integer ControlPoint_captureData=0 timer array ControlPoint_rangeCheckTimer timer array ControlPoint_inRangeTimer real array ControlPoint_pos3 real array ControlPoint_pos3_2 real array ControlPoint_pos3_3 real array ControlPoint_pos2 real array ControlPoint_pos2_2 unit array ControlPoint_clickDummy group array ControlPoint_inRange integer array ControlPoint_bar integer array ControlPoint_owner real array ControlPoint_hp destructable array ControlPoint_mainCrystal integer array ControlPoint_outsideCrystals integer array ControlPoint_glowMarkers integer array this_10 integer OrderHandling_smartId=0 integer OrderHandling_stopId=0 integer OrderHandling_attackId=0 integer OrderHandling_scoreboardId=0 integer array ObjectIdGenerator_id integer ObjectIdGenerator_heroPrefix=0 integer ObjectIdGenerator_nonheroPrefix=0 boolean ObjectIdGenerator_helperActivator=false integer array StringList_first integer array StringList_last string array String_content integer array String_next integer array StringIteratorC_pos integer array FreeNode_dataPos integer array FreeNode_size integer array FreeNode_next integer ArrayList_freeList=0 integer Spell_qSpellId=0 integer Spell_wSpellId=0 integer Spell_eSpellId=0 integer Spell_rSpellId=0 integer Spell_dSpellId=0 integer Spell_fSpellId=0 integer Spell_qLearnId=0 integer Spell_wLearnId=0 integer Spell_eLearnId=0 integer Spell_rLearnId=0 integer Spell_dLearnId=0 integer Spell_fLearnId=0 integer array BasicSpellDef_spell integer array BasicSpellDef_learn integer UnitTypes_unitTypes=0 integer UnitType_basicId=0 integer UnitType_basicMovespeed=0 real UnitType_turnRate=0. real UnitType_castPoint=0. real UnitType_castBackPoint=0. real UnitType_animationSmoothingFactor=0. integer UnitType_moveInterpolation=0 real UnitType_attackCooldown=0. integer UnitType_basicAttack=0 integer UnitType_diceSides=0 integer UnitType_diceCount=0 integer UnitType_foodCost=0 integer UnitType_sightRange=0 integer UnitType_startMana=0 integer UnitType_baseBounty=0 real UnitType_baseMass=0. real UnitType_baseRadius=0. real UnitType_baseHeight=0. integer array UnitType_def integer array UnitType_id boolean array UnitType_isHero integer array UnitType_moveSpeed integer array UnitType_moveSpeed_2 integer array UnitType_abis real array UnitType_walkSpeed integer array UnitType_walkSpeed_2 real array UnitType_runSpeed integer array UnitType_runSpeed_2 real array UnitType_selectionRadius integer array UnitType_selectionRadius_2 boolean array UnitType_ranged integer array UnitType_ranged_2 real array UnitType_missleTargetZ integer array UnitType_missleTargetZ_2 real array UnitType_missleStart_x real array UnitType_missleStart_y real array UnitType_missleStart_z integer array UnitType_missleStart string array UnitType_model integer array UnitType_model_2 real array UnitType_shaddowSize_x real array UnitType_shaddowSize_y integer array UnitType_shaddowSize real array UnitType_shaddowPosFix_x real array UnitType_shaddowPosFix_y integer array UnitType_shaddowPosFix real array UnitType_scale integer array UnitType_scale_2 string array UnitType_icon integer array UnitType_icon_2 real array UnitType_attackBackswingPoint integer array UnitType_attackBackswingPoint_2 real array UnitType_attackDamagePoint integer array UnitType_attackDamagePoint_2 integer array UnitType_attack integer array UnitType_attack_2 real array UnitType_missleArc integer array UnitType_missleArc_2 string array UnitType_missleModel integer array UnitType_missleModel_2 integer array UnitType_missleSpeed integer array UnitType_missleSpeed_2 integer array UnitType_attackRange integer array UnitType_attackRange_2 integer array UnitType_weaponSound integer array UnitType_weaponSound_2 integer array UnitType_armor integer array UnitType_armor_2 integer array UnitType_armorType integer array UnitType_armorType_2 string array UnitType_soundSet integer array UnitType_soundSet_2 string array UnitType_name integer array UnitType_name_2 real array UnitType_collisionSize integer array UnitType_collisionSize_2 integer array UnitType_mana integer array UnitType_mana_2 integer array UnitType_life integer array UnitType_life_2 integer array UnitType_bounty integer array UnitType_bounty_2 real array UnitType_mass integer array UnitType_mass_2 real array UnitType_radius integer array UnitType_radius_2 real array UnitType_height integer array UnitType_height_2 integer HeroTypes_heros=0 string HeroType_heroAbis=null integer array HeroType_dummyId integer array HeroType_morphId integer array HeroType_dummyDef string array HeroType_properName integer array HeroType_properName_2 integer array HeroType_captureAnimationIndex integer array HeroType_captureAnimationIndex_2 integer array HeroType_standAnimationIndex integer array HeroType_standAnimationIndex_2 boolean array HeroType_hasPeriodicAnimation integer array HeroType_hasPeriodicAnimation_2 real array HeroType_captureAnimationSpeed integer array HeroType_captureAnimationSpeed_2 real array HeroType_captureOffset_x real array HeroType_captureOffset_y real array HeroType_captureOffset_z integer array HeroType_captureOffset unit InstantDummyCaster_caster=null integer InstantDummyCaster_id=0 integer InstantDummyCaster_DUMMY_CASTER_UNIT_ID=0 integer array this_11 real array amount integer array this_12 real array amount_2 integer array this_13 real array amount_3 integer array this_14 real array amount_4 integer array this_15 real array amount_5 integer array this_16 real array amount_6 integer array this_17 real array amount_7 integer array this_18 real array amount_8 integer array this_19 real array amount_9 integer array this_20 real array amount_10 integer array this_21 real array amount_11 integer array this_22 real array amount_12 integer array this_23 real array amount_13 integer array this_24 real array amount_14 integer array this_25 real array amount_15 integer array this_26 real array amount_16 integer array this_27 real array amount_17 integer array this_28 real array amount_18 integer array this_29 real array amount_19 integer array this_30 real array amount_20 integer array this_31 real array amount_21 integer array this_32 real array amount_22 integer array this_33 real array amount_23 integer array this_34 real array amount_24 integer array this_35 real array amount_25 integer array this_36 real array amount_26 integer array this_37 real array amount_27 integer array this_38 real array amount_28 integer array this_39 real array amount_29 integer array this_40 real array amount_30 integer array this_41 real array amount_31 integer array this_42 real array amount_32 integer array this_43 real array amount_33 integer array this_44 real array amount_34 integer array this_45 real array amount_35 integer array this_46 real array amount_36 integer array this_47 real array amount_37 integer array this_48 real array amount_38 integer array this_49 real array amount_39 integer array this_50 real array amount_40 integer array this_51 real array amount_41 integer array this_52 real array amount_42 integer array this_53 real array amount_43 integer array this_54 real array amount_44 integer array this_55 real array amount_45 integer array this_56 real array amount_46 integer array this_57 real array amount_47 integer array this_58 real array amount_48 integer array this_59 real array amount_49 integer array this_60 real array amount_50 integer array this_61 integer array this_62 real Unit_knockbackFactor=0. integer array Unit_typ integer array Unit_team unit array Unit_u real array Unit_attack real array Unit_bonusAttack real array Unit_bonusAttackPer real array Unit_armor real array Unit_bonusArmor real array Unit_bonusArmorPer real array Unit_life real array Unit_bonusLife real array Unit_bonusLifePer real array Unit_mana real array Unit_bonusMana real array Unit_bonusManaPer real array Unit_lifeReg real array Unit_bonusLifeReg real array Unit_bonusLifeRegPer real array Unit_manaReg real array Unit_bonusManaReg real array Unit_bonusManaRegPer real array Unit_bonusAttackspeed real array Unit_spellpower real array Unit_spellpowerPer real array Unit_movespeed real array Unit_bonusMovespeed real array Unit_bonusMovespeedPer real array Unit_magicReduction real array Unit_normalReduction real array Unit_bonusResistance real array Unit_bonusResistancePer real array Unit_hitchance real array Unit_evade real array Unit_critchance real array Unit_critdamage real array Unit_bonusDamage real array Unit_normalDeflection real array Unit_lifesteal real array Unit_spellVamp boolean array Unit_vunerable integer array Unit_shieldList integer array Unit_lastHeroDamager real array Unit_mass real array Unit_knockSpeed real array Unit_knockSpeed_2 real array Unit_radius real array Unit_height boolean array Unit_hasKnockback boolean array Unit_isHero boolean array Unit_isDead integer array Unit_bounty integer array Unit_ownerId player array Unit_owner integer array Unit_damageTT integer array Unit_healTT integer array Unit_dotTT real array Unit_systemDamage real array Unit_totalDamage integer array Unit_playerDamage integer array Unit_allDots integer array Unit_allBuffs integer array Unit_takeHitPre integer array Unit_takeHitOn integer array Unit_causeHitPre integer array Unit_causeHitOn integer array Unit_takeCritHitOn integer array Unit_causeCritHitOn integer array Unit_onDodge integer array Unit_onMiss integer array Unit_onDeath integer array Unit_causeDeath trigger Unit_damageDetect=null integer array Unit_action integer ShowInstances_classId_2=0 integer CreationEvent_create=0 integer CreationEvent_dest=0 integer array this_63 integer array this_64 integer array b integer Hero_toMove=0 integer Hero_heroOfPlayer=0 integer array Hero_htyp integer array Hero_armorBuffer integer array Hero_attackBuffer boolean array Hero_onAdd boolean array Hero_isCasting integer array Hero_nextOrder integer array Hero_lastOrder integer array Hero_captureCancel integer array Hero_smartEvent boolean array Hero_playsAnimation integer array Hero_hb trigger GetOrders_orderDetect=null integer array this_65 integer array OnDamageData_source real array OnDamageData_damage boolean array OnDamageData_stop boolean array SpellData_spellSuccess integer array Units_target integer UnitClass_knocklist=0 integer UnitClass_last=0 integer Cast_casts=0 real Missle_missleStartSpeed=0. real Missle_speedLost=0. real Missle_speedAccel=0. real Missle_missleRadius=0. real Missle_knockback=0. real Missle_knockbackRange=0. integer array Missle_missle integer array Missle_owner integer array Missle_target real array Missle_speed real array Missle_speed_2 timer array Missle_t timer array Missle_destroyTimer boolean array Missle_canHitCaster real Conductor_range=0. real Conductor_missleRadius=0. real Conductor_missleHeight=0. real Conductor_missleSpeed=0. real Conductor_baseDamage=0. real Conductor_bonusDamage=0. real Conductor_lvlFactor=0. integer array Conductor_dummy real array Conductor_speed real array Conductor_speed_2 unit array Conductor_owner timer array Conductor_t integer array Conductor_lvl integer array Conductor_typ real array Conductor_distance timer array Pull2_t unit array Pull2_u unit array Pull2_ut lightning array Pull2_l integer array Pull2_i integer array Pull2_imax integer array Pull2_uut integer HeroInit_t=0 integer UnitInit_t=0 real CreepSpawn_wargrinTopStart_x=0. real CreepSpawn_wargrinTopStart_y=0. real CreepSpawn_everlivingTopStart_x=0. real CreepSpawn_everlivingTopStart_y=0. player CreepSpawn_wargrinOwner=null integer PlayerClass_playerData=0 timer array Player_camSet integer array Stack_dummy integer array Stack_top integer array Stack_size integer array SEntry_elem integer array SEntry_prev string array Widget_backgroundTexture integer array Widget_pos integer array Widget_pos_2 integer array Widget_size integer array Widget_size_2 integer array Observable_content integer array Observable_click integer array Observable_dClick integer array Observable_track integer array Observable_unTrack boolean array Observable_playClickAnimation boolean array Observable_playDoubleClickAnimation boolean array Observable_playHoverAnimation integer array WindowManager_currentWindow integer array WindowManager_currentObservable integer array Window_content integer array Window_trackMap integer array Window_wantToClose integer array Window_voidClick integer array w integer FontArial_FONT_HEIGHT=0 integer FontArial_FONT_RESOLUTION=0 string array FontArial_paths integer array FontArial_widths integer TextSplat_DISABLE_COLOR_ALPHA=0 real TextSplat_DISABLE_MAX_WIDTH=0. real array TextSplat_pos real array TextSplat_pos_2 real array TextSplat_dimensions real array TextSplat_dimensions_2 real array TextSplat_cursor real array TextSplat_cursor_2 real array TextSplat_maxWidth integer array TextSplat_images integer array TextSplat_layer real array TextSplat_fontSize image array ImageListEntry_img integer array ImageListEntry_prev integer array ImageList_last string array TextBox_content integer array TextBox_splat integer array TextBox_col integer array TextBox_col_2 integer array TextBox_col_3 integer Model_dummyID=0 unit array Model_u integer array Model_col integer array Model_col_2 integer array Model_col_3 image array ImageEx_content integer IconType_iconMap1=0 integer IconType_iconMap2=0 real IconType_restColor=0. integer array ImageList_first integer array ImageList_last_2 image array ListImage_img integer array ListImage_next integer array ImageIterator_pos integer Pane_tileSize=0 integer Pane_tileDimensions_x=0 integer Pane_tileDimensions_y=0 string Pane_horizontalSide=null string Pane_verticalSide=null string Pane_leftBotCorner=null string Pane_rightBotCorner=null string Pane_rightTopCorner=null string Pane_leftTopCorner=null real Pane_sizeFix_x=0. real Pane_sizeFix_y=0. real Pane_posFixBot_x=0. real Pane_posFixBot_y=0. real Pane_posFixTop_x=0. real Pane_posFixTop_y=0. real Pane_posFixRight_x=0. real Pane_posFixRight_y=0. real Pane_posFixLeft_x=0. real Pane_posFixLeft_y=0. integer array Pane_onExit integer array Pane_list integer array Pane_content integer array this_66 integer array this_67 integer ToolTipTypes_tipMap=0 string Button_buttonTexture=null real Button_sizeFix_x=0. real Button_sizeFix_y=0. real Button_posFix_x=0. real Button_posFix_y=0. integer array Button_splat string array Button_name integer array this_68 player array p integer Tooltip_dummyTip=0 destructable array Tooltip_d real array Tooltip_realPos real array Tooltip_realPos_2 integer array Tooltip_id real Icon_animationSpeedHover=0. real Icon_animationSpeedHit=0. integer Icon_dummyIcon=0 integer array Icon_typ integer array Icon_typ_2 real array Icon_realPos real array Icon_realPos_2 integer array Icon_scale leaderboard HandleCounter_board=null integer HandleCounter_stackEndTreshold=0 timer HandleCounter_clock=null integer HandleCounter_seconds=0 integer HandleCounter_maxHandleCount=0 boolean PreloadHandler_autoFinish=false group PreloadHandler_dumg=null unit PreloadHandler_dum=null trigger GameStart_testt=null integer GameStart_uList=0 integer GameStart_testh=0 integer GameStart_shopWindow=0 integer GameStart_scoreWindow=0 integer GameStart_guideWindow=0 integer GameStart_statsWindow=0 real Preload_maxProgress=0. string array Preload_initOrder real Preload_progress=0. integer Preload_preloadStatus=0 integer Preload_preloadEnd=0 boolean Preload_showProgress=false integer Preload_loopCounter=0 integer array shopT1 integer array shopT3 integer array shopT2 integer array shopT7 integer array shopT8 integer array shopT9 integer array buttonLayerShop01 integer array buttonLayerShop02 integer array buttonLayerShop03 integer array buttonLayerShop04 integer array buttonLayerShop05 integer array buttonLayerShop06 integer array buttonLayerShop07 integer array buttonLayerShop08 integer array buttonLayerShop09 integer array buttonLayerShop10 integer array buttonLayerShop11 integer array buttonLayerShop12 integer array buttonLayerShop13 integer array buttonLayerShop14 integer array buttonLayerShop15 integer array buttonLayerShop16 integer array buttonLayerShop17 integer array buttonLayerShop18 integer array buttonLayerShop19 integer array buttonLayerShop20 integer array buttonLayerShop32 integer array shopB integer array shopOb integer array scoreB integer array scoreOb integer array guideB integer array guideOb integer array statsB integer array statsOb integer array arrow1 integer array arrow2 integer array arrow3 integer array arrow4 integer array arrow5 integer array arrow6 integer array arrow7 integer array arrow8 integer array arrow9 integer array arrow10 integer array arrow11 integer array shopPmiddle integer array shopPleft integer array shopPleftBot integer array shopPleftBot2 integer array shop1 integer array shop2 integer array shop3 integer array shop4 integer array shop5 integer array shop6 integer array shop7 integer array shop8 integer array shop9 integer array shop10 integer array shop11 integer array shop12 integer array shop13 integer array shop14 integer array shop15 integer array shop16 integer array shop17 integer array shop18 integer array shop19 integer array shop20 integer array shop24 integer array shop25 integer array shop26 integer array shop27 integer array shop28 integer array shop29 integer array shop30 integer array shop31 integer array shop32 integer array buttonLayerShopBuy integer array buttonLayerShopSell integer array buttonLayerCateAgr integer array buttonLayerCateDef integer array buttonLayerCateUti integer array picked1 integer array picked2 integer array picked3 integer array picked4 integer array picked5 integer array picked6 integer array picked7 integer array picked8 integer array picked9 integer array picked10 integer array picked11 integer array picked12 integer array pickable1 integer array pickable2 integer array pickable3 integer array pickable4 integer array pickable5 integer array pickable6 integer array pickable7 integer array pickable8 integer array pickable9 integer array pickable10 integer array pickable11 integer array pickable12 integer array pickability1 integer array pickability2 integer array pickability3 integer array pickability4 integer array pickability5 integer array pickability6 integer array abilityUpgrade1 integer array abilityUpgrade3 integer array abilityUpgrade6 integer array abilityUpgrade9 integer array abilityUpgradeU integer array pickablesPane integer array pickedHeroPane integer array pickedAbilityPane integer array model1 integer array playerName1 integer array playerName2 integer array playerName3 integer array playerName4 integer array playerName5 integer array playerName6 integer array playerName7 integer array playerName8 integer array playerName9 integer array playerName10 integer array playerName11 integer array playerName12 integer array StringLevelClosure_nextFree integer StringLevelClosure_firstFree=0 integer StringLevelClosure_maxIndex=0 integer array StringLevelClosure_typeId integer array IntLevelClosure_nextFree integer IntLevelClosure_firstFree=0 integer IntLevelClosure_maxIndex=0 integer array IntLevelClosure_typeId integer array RealLevelClosure_nextFree integer RealLevelClosure_firstFree=0 integer RealLevelClosure_maxIndex=0 integer array RealLevelClosure_typeId integer array BooleanLevelClosure_nextFree integer BooleanLevelClosure_firstFree=0 integer BooleanLevelClosure_maxIndex=0 integer array BooleanLevelClosure_typeId integer array LinkedList_nextFree integer LinkedList_firstFree=0 integer LinkedList_maxIndex=0 integer array LinkedList_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 Table_nextFree integer Table_firstFree=0 integer Table_maxIndex=0 integer array Table_typeId integer array W3UDefinition_nextFree integer W3UDefinition_firstFree=0 integer W3UDefinition_maxIndex=0 integer array W3UDefinition_typeId integer array OrderStringFactory_nextFree integer OrderStringFactory_firstFree=0 integer OrderStringFactory_maxIndex=0 integer array OrderStringFactory_typeId integer array AbilityDefinition_nextFree integer AbilityDefinition_firstFree=0 integer AbilityDefinition_maxIndex=0 integer array AbilityDefinition_typeId integer array AbilityTooltipGenerator_typeId integer array HashMap_nextFree integer HashMap_firstFree=0 integer HashMap_maxIndex=0 integer array HashMap_typeId integer array TrackableAction_nextFree integer TrackableAction_firstFree=0 integer TrackableAction_maxIndex=0 integer array TrackableAction_typeId integer array TrackableEx_nextFree integer TrackableEx_firstFree=0 integer TrackableEx_maxIndex=0 integer array TrackableEx_typeId integer array Event_nextFree integer Event_firstFree=0 integer Event_maxIndex=0 integer array Event_typeId integer array Action_nextFree integer Action_firstFree=0 integer Action_maxIndex=0 integer array Action_typeId integer array DebugFile_nextFree integer DebugFile_firstFree=0 integer DebugFile_maxIndex=0 integer array DebugFile_typeId integer array HashList_nextFree integer HashList_firstFree=0 integer HashList_maxIndex=0 integer array HashList_typeId integer array ElementLoop_nextFree integer ElementLoop_firstFree=0 integer ElementLoop_maxIndex=0 integer array ElementLoop_typeId integer array CallbackSingle_nextFree integer CallbackSingle_firstFree=0 integer CallbackSingle_maxIndex=0 integer array CallbackSingle_typeId integer array CallbackPeriodic_nextFree integer CallbackPeriodic_firstFree=0 integer CallbackPeriodic_maxIndex=0 integer array CallbackPeriodic_typeId integer array PreloadAction_nextFree integer PreloadAction_firstFree=0 integer PreloadAction_maxIndex=0 integer array PreloadAction_typeId integer array Ability_nextFree integer Ability_firstFree=0 integer Ability_maxIndex=0 integer Dot_firstFree=0 integer array Dot_typeId integer Buff_firstFree=0 integer array Buff_typeId integer array TextTag_nextFree integer TextTag_firstFree=0 integer TextTag_maxIndex=0 integer array TextTag_typeId integer array ShieldList_nextFree integer ShieldList_firstFree=0 integer ShieldList_maxIndex=0 integer array ShieldList_typeId integer array Shield_nextFree integer Shield_firstFree=0 integer Shield_maxIndex=0 integer array Shield_typeId integer array Bar_typeId integer array ArrayQueue_nextFree integer ArrayQueue_firstFree=0 integer ArrayQueue_maxIndex=0 integer array ArrayQueue_typeId integer array DelayNode_nextFree integer DelayNode_firstFree=0 integer DelayNode_maxIndex=0 integer array DelayNode_typeId integer array Fx_nextFree integer Fx_firstFree=0 integer Fx_maxIndex=0 integer array Fx_typeId integer array CrigBar_nextFree integer CrigBar_firstFree=0 integer CrigBar_maxIndex=0 integer array CrigBar_typeId integer array CaptureData_nextFree integer CaptureData_firstFree=0 integer CaptureData_maxIndex=0 integer array CaptureData_typeId integer array ControlPoint_nextFree integer ControlPoint_firstFree=0 integer ControlPoint_maxIndex=0 integer array ControlPoint_typeId integer array StringList_nextFree integer StringList_firstFree=0 integer StringList_maxIndex=0 integer array StringList_typeId integer array String_nextFree integer String_firstFree=0 integer String_maxIndex=0 integer array StringIteratorC_nextFree integer StringIteratorC_firstFree=0 integer StringIteratorC_maxIndex=0 integer array StringIteratorC_typeId integer array FreeNode_nextFree integer FreeNode_firstFree=0 integer FreeNode_maxIndex=0 integer array ArrayList_nextFree integer ArrayList_firstFree=0 integer ArrayList_maxIndex=0 integer array ArrayList_typeId integer array BasicSpellDef_nextFree integer BasicSpellDef_firstFree=0 integer BasicSpellDef_maxIndex=0 integer array UnitType_nextFree integer UnitType_firstFree=0 integer UnitType_maxIndex=0 integer array UnitType_typeId integer array Unit_nextFree integer Unit_firstFree=0 integer Unit_maxIndex=0 integer array Unit_typeId integer array Bonus_nextFree integer Bonus_firstFree=0 integer Bonus_maxIndex=0 integer array Bonus_typeId integer array Order_nextFree integer Order_firstFree=0 integer Order_maxIndex=0 integer array Order_typeId integer array SmartData_nextFree integer SmartData_firstFree=0 integer SmartData_maxIndex=0 integer array SmartData_typeId integer array PreDamageData_nextFree integer PreDamageData_firstFree=0 integer PreDamageData_maxIndex=0 integer array PreDamageData_typeId integer array OnDamageData_nextFree integer OnDamageData_firstFree=0 integer OnDamageData_maxIndex=0 integer array OnDamageData_typeId integer array Units_nextFree integer Units_firstFree=0 integer Units_maxIndex=0 integer array Units_typeId integer array Cast_nextFree integer Cast_firstFree=0 integer Cast_maxIndex=0 integer array Cast_typeId integer array Missle_nextFree integer Missle_firstFree=0 integer Missle_maxIndex=0 integer array Missle_typeId integer array Conductor_nextFree integer Conductor_firstFree=0 integer Conductor_maxIndex=0 integer array Conductor_typeId integer array Pull2_nextFree integer Pull2_firstFree=0 integer Pull2_maxIndex=0 integer array Pull2_typeId integer array Player_nextFree integer Player_firstFree=0 integer Player_maxIndex=0 integer array Stack_nextFree integer Stack_firstFree=0 integer Stack_maxIndex=0 integer array Stack_typeId integer array SEntry_nextFree integer SEntry_firstFree=0 integer SEntry_maxIndex=0 integer array Widget_nextFree integer Widget_firstFree=0 integer Widget_maxIndex=0 integer array Widget_typeId integer array PlayerAction_nextFree integer PlayerAction_firstFree=0 integer PlayerAction_maxIndex=0 integer array PlayerAction_typeId integer array Window_nextFree integer Window_firstFree=0 integer Window_maxIndex=0 integer array Window_typeId integer array TextSplat_nextFree integer TextSplat_firstFree=0 integer TextSplat_maxIndex=0 integer array TextSplat_typeId integer array ImageListEntry_nextFree integer ImageListEntry_firstFree=0 integer ImageListEntry_maxIndex=0 integer array ImageListEntry_typeId integer array ImageList_nextFree integer ImageList_firstFree=0 integer ImageList_maxIndex=0 integer array ImageList_typeId integer array ImageList_nextFree_2 integer ImageList_firstFree_2=0 integer ImageList_maxIndex_2=0 integer array ImageList_typeId_2 integer array ListImage_nextFree integer ListImage_firstFree=0 integer ListImage_maxIndex=0 integer array ImageIterator_nextFree integer ImageIterator_firstFree=0 integer ImageIterator_maxIndex=0 integer array ImageIterator_typeId string array AbilityTooltipGenerator_values_0 string array AbilityTooltipGenerator_values_1 string array AbilityTooltipGenerator_values_2 string array AbilityTooltipGenerator_values_3 string array AbilityTooltipGenerator_values_4 string array AbilityTooltipGenerator_values_5 string array AbilityTooltipGenerator_values_6 string array AbilityTooltipGenerator_values_7 string array AbilityTooltipGenerator_values_8 string array AbilityTooltipGenerator_values_9 unit array ArrayQueue_units_0 unit array ArrayQueue_units_1 unit array ArrayQueue_units_2 unit array ArrayQueue_units_3 unit array ArrayQueue_units_4 unit array ArrayQueue_units_5 destructable array Icon_structs_0 destructable array Icon_structs_1 destructable array Icon_structs_2 destructable array Icon_structs_3 destructable array Icon_structs_4 destructable array Icon_structs_5 destructable array Icon_structs_6 destructable array Icon_structs_7 destructable array Icon_structs_8 destructable array Icon_structs_9 destructable array Icon_structs_10 destructable array Icon_structs_11 boolean array Icon_isDisabled_0 boolean array Icon_isDisabled_1 boolean array Icon_isDisabled_2 boolean array Icon_isDisabled_3 boolean array Icon_isDisabled_4 boolean array Icon_isDisabled_5 boolean array Icon_isDisabled_6 boolean array Icon_isDisabled_7 boolean array Icon_isDisabled_8 boolean array Icon_isDisabled_9 boolean array Icon_isDisabled_10 boolean array Icon_isDisabled_11 real angle_toVec_return_x=0. real angle_toVec_return_y=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_op_plus_return_x=0. real vec3_op_plus_return_y=0. real vec3_op_plus_return_z=0. real vec2_rotate_return_x=0. real vec2_rotate_return_y=0. real vec2_op_plus_return_x=0. real vec2_op_plus_return_y=0. real vec2_op_minus_return_x=0. real vec2_op_minus_return_y=0. real vec2_op_mult_return_x=0. real vec2_op_mult_return_y=0. real real_op_mult_return_x=0. real real_op_mult_return_y=0. real item_getPos_return_x=0. real item_getPos_return_y=0. real vec3_toVec2_return_x=0. real vec3_toVec2_return_y=0. real vec2_withZ_return_x=0. real vec2_withZ_return_y=0. real vec2_withZ_return_z=0. real vec2_polarOffset_return_x=0. real vec2_polarOffset_return_y=0. real vec2_setLength_return_x=0. real vec2_setLength_return_y=0. real dispatch_Hero_getBarPos_return_x=0. real dispatch_Hero_getBarPos_return_y=0. real dispatch_Hero_getBarPos_return_z=0. real unit_getPos_return_x=0. real unit_getPos_return_y=0. real dispatch_Unit_getMiddle_return_x=0. real dispatch_Unit_getMiddle_return_y=0. real dispatch_Unit_getMiddle_return_z=0. real dispatch_Fx_getPos3d_return_x=0. real dispatch_Fx_getPos3d_return_y=0. real dispatch_Fx_getPos3d_return_z=0. real dispatch_Hero_getCaptureAttackPoint_return_x=0. real dispatch_Hero_getCaptureAttackPoint_return_y=0. real dispatch_Hero_getCaptureAttackPoint_return_z=0. real dispatch_ControlPoint_getBlitzPos_return_x=0. real dispatch_ControlPoint_getBlitzPos_return_y=0. real dispatch_ControlPoint_getBlitzPos_return_z=0. real dispatch_HeroType_getCaptureOffset_return_x=0. real dispatch_HeroType_getCaptureOffset_return_y=0. real dispatch_HeroType_getCaptureOffset_return_z=0. real vec2_rotate_return_x_2=0. real vec2_rotate_return_y_2=0. real checkForPathing_return_x=0. real checkForPathing_return_y=0. real getPathingNormal_return_x=0. real getPathingNormal_return_y=0. real getLastPathablePoint_return_x=0. real getLastPathablePoint_return_y=0. real getBounceVec_return_x=0. real getBounceVec_return_y=0. real vec2_norm_return_x=0. real vec2_norm_return_y=0. real dispatch_Fx_getPos2_return_x=0. real dispatch_Fx_getPos2_return_y=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 element_op_plus_return_x=0 integer element_op_plus_return_y=0 integer element_op_minus_return_x=0 integer element_op_minus_return_y=0 integer dispatch_ElementLoop_next_return_x=0 integer dispatch_ElementLoop_next_return_y=0 real element_toVec_return_x=0. real element_toVec_return_y=0. integer getIconType_return_normalId=0 integer getIconType_return_diableId=0 integer ElementLoop_next_return_x=0 integer ElementLoop_next_return_y=0 real Fx_getPos2_return_x=0. real Fx_getPos2_return_y=0. real Fx_getPos3d_return_x=0. real Fx_getPos3d_return_y=0. real Fx_getPos3d_return_z=0. real ControlPoint_getBlitzPos_return_x=0. real ControlPoint_getBlitzPos_return_y=0. real ControlPoint_getBlitzPos_return_z=0. real HeroType_getCaptureOffset_return_x=0. real HeroType_getCaptureOffset_return_y=0. real HeroType_getCaptureOffset_return_z=0. real Unit_getMiddle_return_x=0. real Unit_getMiddle_return_y=0. real Unit_getMiddle_return_z=0. real Hero_getBarPos_return_x=0. real Hero_getBarPos_return_y=0. real Hero_getBarPos_return_z=0. real Hero_getCaptureAttackPoint_return_x=0. real Hero_getCaptureAttackPoint_return_y=0. real Hero_getCaptureAttackPoint_return_z=0. code ref_function_hideItem=null code ref_function_closure_impl=null code ref_function_CallbackPeriodic_staticCallback=null code ref_function_CallbackSingle_staticCallback=null code ref_function_TextTag_destroyTextTag=null code ref_function_TextTag_destroyTextTag_2=null code ref_function_TextTag_destroyTextTag_3=null code ref_function_Shield_onExpire=null code ref_function_Bar_callUpdateEx=null code ref_function_DelayNode_recycle=null code ref_function_DelayNode_recycle_2=null code ref_function_DelayNode_recycle_3=null code ref_function_closure_impl_2=null code ref_function_closure_impl_3=null code ref_function_closure_impl_4=null code ref_function_closure_impl_5=null code ref_function_notUnit=null code ref_function_closure_impl_6=null code ref_function_closure_impl_7=null code ref_function_closure_impl_8=null code ref_function_closure_impl_9=null code ref_function_Pull2_blackHCall=null code ref_function_Player_setCam=null code ref_function_Preload_preload=null code ref_function_Preload_preload_2=null code ref_function_switchDebug=null code ref_function_closure_impl_10=null code ref_function_closure_impl_11=null code ref_function_closure_impl_12=null code ref_function_createMultiboard=null code ref_function_Bar_updatePos=null code ref_function_Bar_updateVision=null code ref_function_closure_impl_13=null code ref_function_GetOrders_callOnOrder=null code ref_function_Unit_tookDamage=null code ref_function_handleCasts=null code ref_function_spellCondition=null code ref_function_spellStart=null code ref_function_updateTime=null code ref_function_finishPreload=null code ref_function_setCallLimit=null code ref_function_Dot_loopList=null code ref_function_callKnockback=null code ref_function_camTest=null code ref_function_onEsc=null timer getTimertempReturn=null unit group_nexttempReturn=null image createImagetempReturn=null image createImagetempReturn_2=null unit DummyRecycler_gettempReturn=null unit createDummytempReturn=null image ImageIterator_nexttempReturn=null player dispatch_Table_loadPlayertempReturn=null destructable dispatch_Table_loadDestructabletempReturn=null unit dispatch_ArrayQueue_dequeuetempReturn=null unit dispatch_Fx_getDummytempReturn=null image dispatch_ImageIterator_nexttempReturn=null unit ArrayQueue_units_gettempReturn=null destructable Icon_structs_gettempReturn=null endglobals function roundReal takes real value returns integer if value > 0. then return R2I(value + 0.5) else return R2I(value - 0.5) endif endfunction function unit_getState takes unit this_69, unitstate state returns real return GetUnitState(this_69, state) endfunction function unit_getHP takes unit this_69 returns real return unit_getState(this_69, UNIT_STATE_LIFE) endfunction function Bar_update takes integer this_69 returns nothing local real hp = unit_getHP(Unit_u[Bar_owner[this_69]]) local real maxHp = GetUnitState(Unit_u[Bar_owner[this_69]], UNIT_STATE_MAX_LIFE) local real per = hp / maxHp local integer barsGot = roundReal(per * HeroBar_realBarCount) * 2 local integer shieldBars = roundReal(ShieldList_shieldSum[Unit_shieldList[Bar_owner[this_69]]] / maxHp * HeroBar_realBarCount) * 2 local integer barsLeft = HeroBar_fakeBarCount - barsGot - shieldBars local string hpGot local string shield local integer manaBarsGot local integer manaBarsLeft local string manaGot local string manaDead local string final set barsGot = barsGot + barsGot / (Bar_markerDistance[this_69] + 2) * 12 set hpGot = SubString(Bar_hpFull[this_69], 0, barsGot) set shield = SubString(HeroBar_bar, 0, shieldBars) set manaBarsGot = roundReal(GetUnitState(Unit_u[Bar_owner[this_69]], UNIT_STATE_MANA) / GetUnitState(Unit_u[Bar_owner[this_69]], UNIT_STATE_MAX_MANA) * HeroBar_realBarCount) * 2 set manaBarsLeft = HeroBar_fakeBarCount - manaBarsGot set manaGot = SubString(HeroBar_bar, 0, manaBarsGot) set manaDead = SubString(HeroBar_bar, 0, manaBarsLeft) if barsLeft <= 0 then set final = hpGot + HeroBar_shieldColor + shield + HeroBar_endColor + "|n" + HeroBar_mpColor + manaGot + HeroBar_endColor + HeroBar_mpColorDead + manaDead + HeroBar_endColor else set final = hpGot + HeroBar_shieldColor + shield + HeroBar_endColor + HeroBar_hpColorDead + SubString(HeroBar_bar, 0, barsLeft) + HeroBar_endColor + "|n" + HeroBar_mpColor + manaGot + HeroBar_endColor + HeroBar_mpColorDead + manaDead + HeroBar_endColor endif call SetTextTagText(Bar_tt[this_69], final, 0.01) endfunction function print takes string msg returns nothing call DisplayTimedTextToPlayer(GetLocalPlayer(), 0., 0., PrintingHelper_DEBUG_MSG_DURATION, msg) endfunction function error takes string msg returns nothing call print("|cffFF3A29Error:|r " + msg + "") call I2S(1 / 0) endfunction function dispatch_Bar_update takes integer this_69 returns nothing if Bar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Bar.update") else call error("Called Bar.update on invalid object.") endif endif call Bar_update(this_69) endfunction function Bar_updateExDirect takes integer this_69 returns nothing local integer i local integer temp local integer charCount set Bar_markerDistance[this_69] = (HeroBar_seperateAt * HeroBar_realBarCount / R2I(GetUnitState(Unit_u[Bar_owner[this_69]], UNIT_STATE_MAX_LIFE)) - 1) * 2 set Bar_hpFull[this_69] = "" set i = 1 set temp = HeroBar_fakeBarCount / (Bar_markerDistance[this_69] + 2) loop exitwhen i > temp set Bar_hpFull[this_69] = Bar_hpFull[this_69] + SubString(HeroBar_bar, 0, Bar_markerDistance[this_69]) set Bar_hpFull[this_69] = Bar_hpFull[this_69] + HeroBar_marker set i = i + 1 endloop set charCount = HeroBar_fakeBarCount / (Bar_markerDistance[this_69] + 2) * (Bar_markerDistance[this_69] + 2) set Bar_hpFull[this_69] = Bar_hpFull[this_69] + SubString(HeroBar_bar, 0, HeroBar_fakeBarCount - charCount) call dispatch_Bar_update(this_69) endfunction function dispatch_Bar_updateExDirect takes integer this_69 returns nothing if Bar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Bar.updateExDirect") else call error("Called Bar.updateExDirect on invalid object.") endif endif call Bar_updateExDirect(this_69) endfunction function hashtable_loadInt takes hashtable this_69, integer parentKey, integer childKey returns integer return LoadInteger(this_69, parentKey, childKey) endfunction function Table_loadInt takes integer this_69, integer parentKey returns integer return hashtable_loadInt(Table_ht, this_69, parentKey) endfunction function dispatch_Table_loadInt takes integer this_69, integer parentKey returns integer local integer loadInt_result if Table_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Table.loadInt") else call error("Called Table.loadInt on invalid object.") endif endif set loadInt_result = Table_loadInt(this_69, parentKey) return loadInt_result endfunction function timer_getData takes timer this_69 returns integer return dispatch_Table_loadInt(TimerUtils_timerData, GetHandleId(this_69)) endfunction function timer_pause takes timer this_69 returns nothing call PauseTimer(this_69) endfunction function hashtable_saveInt takes hashtable this_69, integer parentKey, integer childKey, integer value returns nothing call SaveInteger(this_69, parentKey, childKey, value) endfunction function Table_saveInt takes integer this_69, integer parentKey, integer value returns nothing call hashtable_saveInt(Table_ht, this_69, parentKey, value) endfunction function dispatch_Table_saveInt takes integer this_69, integer parentKey, integer value returns nothing if Table_typeId[this_69] == 0 then if this_69 == 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_69, parentKey, value) endfunction function timer_setData takes timer this_69, integer data_2 returns nothing call dispatch_Table_saveInt(TimerUtils_timerData, GetHandleId(this_69), data_2) endfunction function timer_release takes timer this_69 returns nothing if this_69 == null then call error("Trying to release a null timer") return endif if timer_getData(this_69) == TimerUtils_HELD then call error("ReleaseTimer: Double free!") return endif call timer_setData(this_69, TimerUtils_HELD) call timer_pause(this_69) set TimerUtils_freeTimers[TimerUtils_freeTimersCount] = this_69 set TimerUtils_freeTimersCount = TimerUtils_freeTimersCount + 1 endfunction function Bar_callUpdateEx takes nothing returns nothing local timer t = GetExpiredTimer() call dispatch_Bar_updateExDirect(timer_getData(t)) call timer_release(t) set t = null set t = null endfunction function unit_getX takes unit this_69 returns real return GetUnitX(this_69) endfunction function unit_getY takes unit this_69 returns real return GetUnitY(this_69) endfunction function Hero_getBarPos takes integer this_69 returns real set Hero_getBarPos_return_x = unit_getX(Unit_u[this_69]) - 80. set Hero_getBarPos_return_y = unit_getY(Unit_u[this_69]) set Hero_getBarPos_return_z = GetUnitFlyHeight(Unit_u[this_69]) + 200. return Hero_getBarPos_return_x endfunction function dispatch_Hero_getBarPos takes integer this_69 returns real local real getBarPos_result_x local real getBarPos_result_y local real getBarPos_result_z local real temp_getBarPos_result_x local real temp_getBarPos_result_y local real temp_getBarPos_result_z if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.getBarPos") else call error("Called Hero.getBarPos on invalid object.") endif endif set temp_getBarPos_result_x = Hero_getBarPos(this_69) set temp_getBarPos_result_y = Hero_getBarPos_return_y set temp_getBarPos_result_z = Hero_getBarPos_return_z set getBarPos_result_x = temp_getBarPos_result_x set getBarPos_result_y = temp_getBarPos_result_y set getBarPos_result_z = temp_getBarPos_result_z set dispatch_Hero_getBarPos_return_x = getBarPos_result_x set dispatch_Hero_getBarPos_return_y = getBarPos_result_y set dispatch_Hero_getBarPos_return_z = getBarPos_result_z return dispatch_Hero_getBarPos_return_x endfunction function texttag_setPos takes texttag this_69, real pos_x, real pos_y, real pos_z returns nothing call SetTextTagPos(this_69, pos_x, pos_y, pos_z) endfunction function Bar_updatePos takes nothing returns nothing local integer b_2 = LinkedListModule_first_2 loop exitwhen not (b_2 != 0) if Bar_isVisible[b_2] then call texttag_setPos(Bar_tt[b_2], dispatch_Hero_getBarPos(Bar_owner[b_2]), dispatch_Hero_getBarPos_return_y, dispatch_Hero_getBarPos_return_z) endif set b_2 = LinkedListModule_next_2[b_2] endloop endfunction function texttag_setVisibility takes texttag this_69, boolean flag returns nothing call SetTextTagVisibility(this_69, flag) endfunction function Bar_updateVision takes nothing returns nothing local integer b_2 = LinkedListModule_first_2 loop exitwhen not (b_2 != 0) if Bar_check[b_2] then if IsVisibleToPlayer(unit_getX(Unit_u[Bar_owner[b_2]]), unit_getY(Unit_u[Bar_owner[b_2]]), GetLocalPlayer()) then set Bar_isVisible[b_2] = true call texttag_setVisibility(Bar_tt[b_2], true) else set Bar_isVisible[b_2] = false call texttag_setVisibility(Bar_tt[b_2], false) endif call dispatch_Bar_update(b_2) set b_2 = LinkedListModule_next_2[b_2] endif endloop endfunction function LLIterator_onDestroy takes integer this_69 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_69 returns nothing call LLIterator_onDestroy(this_69) call dealloc_LLIterator(this_69) endfunction function dispatch_LLIterator_destroyLLIterator takes integer this_69 returns nothing if LLIterator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling LLIterator.destroyLLIterator") else call error("Called LLIterator.destroyLLIterator on invalid object.") endif endif call destroyLLIterator(this_69) endfunction function LLIterator_close takes integer this_69 returns nothing call dispatch_LLIterator_destroyLLIterator(this_69) endfunction function dispatch_LLIterator_close takes integer this_69 returns nothing if LLIterator_typeId[this_69] == 0 then if this_69 == 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_69) endfunction function LLIterator_hasNext takes integer this_69 returns boolean return LLEntry_next[LLIterator_current[this_69]] != LLIterator_dummy[this_69] endfunction function dispatch_LLIterator_hasNext takes integer this_69 returns boolean local boolean hasNext_result if LLIterator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling LLIterator.hasNext") else call error("Called LLIterator.hasNext on invalid object.") endif endif set hasNext_result = LLIterator_hasNext(this_69) return hasNext_result endfunction function LLIterator_next takes integer this_69 returns integer set LLIterator_current[this_69] = LLEntry_next[LLIterator_current[this_69]] return LLEntry_elem[LLIterator_current[this_69]] endfunction function dispatch_LLIterator_next takes integer this_69 returns integer local integer next_result if LLIterator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling LLIterator.next") else call error("Called LLIterator.next on invalid object.") endif endif set next_result = LLIterator_next(this_69) return next_result endfunction function alloc_LLIterator takes nothing returns integer local integer this_69 if LLIterator_firstFree == 0 then set LLIterator_maxIndex = LLIterator_maxIndex + 1 set this_69 = LLIterator_maxIndex else set LLIterator_firstFree = LLIterator_firstFree - 1 set this_69 = LLIterator_nextFree[LLIterator_firstFree] endif set LLIterator_typeId[this_69] = 29 return this_69 endfunction function construct_LLIterator takes integer this_69, integer dummy returns nothing set LLIterator_dummy[this_69] = dummy set LLIterator_current[this_69] = dummy endfunction function new_LLIterator takes integer dummy returns integer local integer this_69 = alloc_LLIterator() call construct_LLIterator(this_69, dummy) return this_69 endfunction function LinkedList_iterator takes integer this_69 returns integer return new_LLIterator(LinkedList_dummy[this_69]) endfunction function dispatch_LinkedList_iterator takes integer this_69 returns integer local integer iterator_result if LinkedList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling LinkedList.iterator") else call error("Called LinkedList.iterator on invalid object.") endif endif set iterator_result = LinkedList_iterator(this_69) return iterator_result endfunction function alloc_LLEntry takes nothing returns integer local integer this_69 if LLEntry_firstFree == 0 then set LLEntry_maxIndex = LLEntry_maxIndex + 1 set this_69 = LLEntry_maxIndex else set LLEntry_firstFree = LLEntry_firstFree - 1 set this_69 = LLEntry_nextFree[LLEntry_firstFree] endif set LLEntry_typeId[this_69] = 28 return this_69 endfunction function construct_LLEntry takes integer this_69, integer elem, integer prev, integer next returns nothing set LLEntry_elem[this_69] = elem set LLEntry_prev[this_69] = prev set LLEntry_next[this_69] = next endfunction function new_LLEntry takes integer elem, integer prev, integer next returns integer local integer this_69 = alloc_LLEntry() call construct_LLEntry(this_69, elem, prev, next) return this_69 endfunction function LinkedList_add takes integer this_69, integer elem returns nothing local integer entry = new_LLEntry(elem, LLEntry_prev[LinkedList_dummy[this_69]], LinkedList_dummy[this_69]) set LLEntry_next[LLEntry_prev[LinkedList_dummy[this_69]]] = entry set LLEntry_prev[LinkedList_dummy[this_69]] = entry set LinkedList_size[this_69] = LinkedList_size[this_69] + 1 endfunction function dispatch_LinkedList_add takes integer this_69, integer elem returns nothing if LinkedList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling LinkedList.add") else call error("Called LinkedList.add on invalid object.") endif endif call LinkedList_add(this_69, elem) 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 Unit_addKnock takes integer this_69, real x, real y returns nothing local integer tempIndex = this_69 local integer temp = tempIndex local integer tempIndex_2 = this_69 set Unit_knockSpeed[temp] = vec2_op_plus(Unit_knockSpeed[tempIndex_2], Unit_knockSpeed_2[tempIndex_2], x, y) set Unit_knockSpeed_2[tempIndex] = vec2_op_plus_return_y if not Unit_hasKnockback[this_69] then set Unit_hasKnockback[this_69] = true call dispatch_LinkedList_add(UnitClass_knocklist, this_69) endif endfunction function dispatch_Unit_addKnock takes integer this_69, real x, real y returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.addKnock") else call error("Called Unit.addKnock on invalid object.") endif endif call Unit_addKnock(this_69, x, y) endfunction function Unit_addKnock_2 takes integer this_69, real momentum_x, real momentum_y returns nothing call dispatch_Unit_addKnock(this_69, momentum_x, momentum_y) endfunction function dispatch_Unit_addKnock_2 takes integer this_69, real momentum_x, real momentum_y returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.addKnock") else call error("Called Unit.addKnock on invalid object.") endif endif call Unit_addKnock_2(this_69, momentum_x, momentum_y) endfunction function unit_getPos takes unit this_69 returns real set unit_getPos_return_x = unit_getX(this_69) set unit_getPos_return_y = unit_getY(this_69) return unit_getPos_return_x endfunction function real_asAngleRadians takes real this_69 returns real return this_69 endfunction function vec2_angleTo takes real this_x, real this_y, real v_x, real v_y returns real return real_asAngleRadians(Atan2(v_y - this_y, v_x - this_x)) 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 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_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 closure_impl takes integer this_69, integer cb returns nothing local integer wurst__iterator0 = dispatch_LinkedList_iterator(GameStart_uList) local integer u_2 loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator0) set u_2 = dispatch_LLIterator_next(wurst__iterator0) call dispatch_Unit_addKnock_2(u_2, vec2_op_minus(vec2_polarOffset(unit_getPos(Unit_u[u_2]), unit_getPos_return_y, vec2_angleTo(unit_getPos(Unit_u[u_2]), unit_getPos_return_y, -2000., 0.), 0.2), vec2_polarOffset_return_y, unit_getPos(Unit_u[u_2]), unit_getPos_return_y), vec2_op_minus_return_y) endloop call dispatch_LLIterator_close(wurst__iterator0) endfunction function dispatch_CallbackPeriodic_call takes integer this_69, integer cb returns nothing if CallbackPeriodic_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CallbackPeriodic.call") else call error("Called CallbackPeriodic.call on invalid object.") endif endif call closure_impl(this_69, cb) endfunction function CallbackPeriodic_staticCallback takes nothing returns nothing local integer cb = timer_getData(GetExpiredTimer()) call dispatch_CallbackPeriodic_call(cb, cb) endfunction function closure_impl_2 takes integer this_69 returns nothing set Unit_spellpower[this_16[this_69]] = Unit_spellpower[this_16[this_69]] - amount_6[this_69] endfunction function closure_impl_3 takes integer this_69 returns nothing set Unit_bonusResistancePer[this_38[this_69]] = Unit_bonusResistancePer[this_38[this_69]] - amount_28[this_69] endfunction function closure_impl_4 takes integer this_69 returns nothing set Unit_normalReduction[this_22[this_69]] = Unit_normalReduction[this_22[this_69]] - amount_12[this_69] endfunction function alloc_ControlPoint takes nothing returns integer local integer this_69 if ControlPoint_firstFree == 0 then set ControlPoint_maxIndex = ControlPoint_maxIndex + 1 set this_69 = ControlPoint_maxIndex else set ControlPoint_firstFree = ControlPoint_firstFree - 1 set this_69 = ControlPoint_nextFree[ControlPoint_firstFree] endif set ControlPoint_typeId[this_69] = 781 return this_69 endfunction function alloc_Closure takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 729 return this_69 endfunction function handle_getHandleId takes handle this_69 returns integer return GetHandleId(this_69) endfunction function destructableToIndex takes destructable object returns integer return handle_getHandleId(object) endfunction function angle_degrees takes real this_radians returns real return this_radians * Maths_RADTODEG endfunction function ControlPoint_getRadius takes integer this_69, real ang_radians returns real return ControlPoint_maxDistance * Sin(60. * Maths_DEGTORAD) / Sin((120. - ModuloReal(angle_degrees(ang_radians) + 30., 60.)) * Maths_DEGTORAD) endfunction function dispatch_ControlPoint_getRadius takes integer this_69, real ang_radians returns real local real getRadius_result if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.getRadius") else call error("Called ControlPoint.getRadius on invalid object.") endif endif set getRadius_result = ControlPoint_getRadius(this_69, ang_radians) return getRadius_result endfunction function getTerrainZ takes real v_x, real v_y returns real call MoveLocation(Terrain_tempLoc, v_x, v_y) return GetLocationZ(Terrain_tempLoc) endfunction function int_toReal takes integer this_69 returns real return this_69 * 1. endfunction function real_asAngleDegrees takes real this_69 returns real return this_69 * Maths_DEGTORAD endfunction function ControlPoint_createDeco takes integer this_69 returns nothing local integer tempIndex = this_69 local real z_4 = getTerrainZ(ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex]) local integer i local real tempPos_x local real tempPos_y local integer i_2 local real tempPos_x_2 local real tempPos_y_2 local integer i_3 local real tempPos_x_3 local real tempPos_y_3 local integer i_4 local real tempPos_x_4 local real tempPos_y_4 local integer tempIndex_2 local real tempTupleSelectionResult_1 local real temp_tempTupleSelectionResult_1 local integer tempIndex_3 local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local integer tempIndex_4 local real temp_tempPos_x local real temp_tempPos_y local integer tempIndex_5 local real temp_tempPos_x_2 local real temp_tempPos_y_2 local integer tempIndex_6 local real tempTupleSelectionResult_1_2 local real temp_tempTupleSelectionResult_1_2 local integer tempIndex_7 local real tempTupleSelectionResult_2_2 local real temp_tempTupleSelectionResult_2_2 local integer tempIndex_8 local real temp_tempPos_x_3 local real temp_tempPos_y_3 local integer tempIndex_9 local real temp_tempPos_x_4 local real temp_tempPos_y_4 local integer temp local real temp_2 local integer temp_3 local integer temp_4 local real temp_5 local integer temp_6 if ControlPoint_owner[this_69] == 0 then set temp_3 = this_69 set temp = ControlPoint_decoCystalRedId set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_1 = ControlPoint_pos2[tempIndex_2] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 set temp_2 = tempTupleSelectionResult_1 - 10. set tempIndex_3 = this_69 set temp_tempTupleSelectionResult_2 = ControlPoint_pos2_2[tempIndex_3] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set ControlPoint_mainCrystal[temp_3] = CreateDestructableZ(temp, temp_2, tempTupleSelectionResult_2, z_4 + ControlPoint_height - 35., 0., ControlPoint_decoCrystalInsideScale, 0) set i = 30 loop exitwhen i > 360 set tempIndex_4 = this_69 set temp_tempPos_x = vec2_polarOffset(ControlPoint_pos2[tempIndex_4], ControlPoint_pos2_2[tempIndex_4], real_asAngleDegrees(int_toReal(i)), dispatch_ControlPoint_getRadius(this_69, real_asAngleDegrees(int_toReal(i))) - 160.) set temp_tempPos_y = vec2_polarOffset_return_y set tempPos_x = temp_tempPos_x set tempPos_y = temp_tempPos_y call dispatch_LinkedList_add(ControlPoint_outsideCrystals[this_69], destructableToIndex(CreateDestructableZ(ControlPoint_decoCystalRedId, tempPos_x, tempPos_y, z_4 + 100., int_toReal(i), ControlPoint_decoCrystalOusideScale, 0))) set i = i + 60 endloop set i_2 = 0 loop exitwhen i_2 > 300 set tempIndex_5 = this_69 set temp_tempPos_x_2 = vec2_polarOffset(ControlPoint_pos2[tempIndex_5], ControlPoint_pos2_2[tempIndex_5], real_asAngleDegrees(int_toReal(i_2)), dispatch_ControlPoint_getRadius(this_69, real_asAngleDegrees(int_toReal(i_2)))) set temp_tempPos_y_2 = vec2_polarOffset_return_y set tempPos_x_2 = temp_tempPos_x_2 set tempPos_y_2 = temp_tempPos_y_2 call dispatch_LinkedList_add(ControlPoint_glowMarkers[this_69], destructableToIndex(CreateDestructableZ(ControlPoint_decoLightRedId, tempPos_x_2, tempPos_y_2, z_4, int_toReal(i_2) + 270., 7.80, 0))) set i_2 = i_2 + 60 endloop else set temp_6 = this_69 set temp_4 = ControlPoint_decoCystalGreenId set tempIndex_6 = this_69 set temp_tempTupleSelectionResult_1_2 = ControlPoint_pos2[tempIndex_6] set tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 set temp_5 = tempTupleSelectionResult_1_2 - 10. set tempIndex_7 = this_69 set temp_tempTupleSelectionResult_2_2 = ControlPoint_pos2_2[tempIndex_7] set tempTupleSelectionResult_2_2 = temp_tempTupleSelectionResult_2_2 set ControlPoint_mainCrystal[temp_6] = CreateDestructableZ(temp_4, temp_5, tempTupleSelectionResult_2_2, z_4 + ControlPoint_height - 35., 0., ControlPoint_decoCrystalInsideScale, 0) set i_3 = 30 loop exitwhen i_3 > 360 set tempIndex_8 = this_69 set temp_tempPos_x_3 = vec2_polarOffset(ControlPoint_pos2[tempIndex_8], ControlPoint_pos2_2[tempIndex_8], real_asAngleDegrees(int_toReal(i_3)), dispatch_ControlPoint_getRadius(this_69, real_asAngleDegrees(int_toReal(i_3))) - 160.) set temp_tempPos_y_3 = vec2_polarOffset_return_y set tempPos_x_3 = temp_tempPos_x_3 set tempPos_y_3 = temp_tempPos_y_3 call dispatch_LinkedList_add(ControlPoint_outsideCrystals[this_69], destructableToIndex(CreateDestructableZ(ControlPoint_decoCystalGreenId, tempPos_x_3, tempPos_y_3, z_4 + 100., int_toReal(i_3), ControlPoint_decoCrystalOusideScale, 0))) set i_3 = i_3 + 60 endloop set i_4 = 0 loop exitwhen i_4 > 300 set tempIndex_9 = this_69 set temp_tempPos_x_4 = vec2_polarOffset(ControlPoint_pos2[tempIndex_9], ControlPoint_pos2_2[tempIndex_9], real_asAngleDegrees(int_toReal(i_4)), dispatch_ControlPoint_getRadius(this_69, real_asAngleDegrees(int_toReal(i_4)))) set temp_tempPos_y_4 = vec2_polarOffset_return_y set tempPos_x_4 = temp_tempPos_x_4 set tempPos_y_4 = temp_tempPos_y_4 call dispatch_LinkedList_add(ControlPoint_glowMarkers[this_69], destructableToIndex(CreateDestructableZ(ControlPoint_decoLightGreenId, tempPos_x_4, tempPos_y_4, z_4, int_toReal(i_4) + 270., 7.80, 0))) set i_4 = i_4 + 60 endloop endif endfunction function dispatch_ControlPoint_createDeco takes integer this_69 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.createDeco") else call error("Called ControlPoint.createDeco on invalid object.") endif endif call ControlPoint_createDeco(this_69) endfunction function createImage takes string path, real pos_x, real pos_y, real sizeX, real sizeY returns image local image temp = CreateImage(path, sizeX, sizeY, 0., pos_x, pos_y, 0., 0., 0., 0., 1) set createImagetempReturn = temp set temp = null return createImagetempReturn endfunction function image_setPos takes image this_69, real pos_x, real pos_y, real pos_z returns nothing call SetImagePosition(this_69, pos_x, pos_y, 0.) call SetImageConstantHeight(this_69, true, pos_z) endfunction function vec2_withZ takes real this_x, real this_y, real z_4 returns real set vec2_withZ_return_x = this_x set vec2_withZ_return_y = this_y set vec2_withZ_return_z = z_4 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 CrigBar_setOffset takes integer this_69, real offset_x, real offset_y, real offset_z returns nothing local integer tempIndex = this_69 local integer tempIndex_2 local integer tempIndex_3 local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 local integer tempIndex_7 local integer tempIndex_8 local integer tempIndex_9 local integer tempIndex_10 local real temp local real temp_2 local real temp_3 local real temp_4 local real temp_5 local image temp_6 local real temp_7 local real temp_8 local real temp_9 local real temp_10 local real temp_11 local image temp_12 local real temp_13 local real temp_14 local real temp_15 local real temp_16 local real temp_17 local image temp_18 set CrigBar_offset[tempIndex] = offset_x set CrigBar_offset_2[tempIndex] = offset_y set CrigBar_offset_3[tempIndex] = offset_z set temp_6 = CrigBar_border[this_69] set tempIndex_2 = this_69 set temp = CrigBar_pos[tempIndex_2] set temp_2 = CrigBar_pos_2[tempIndex_2] set tempIndex_3 = this_69 set temp_3 = vec3_op_plus(vec2_withZ(temp, temp_2, getTerrainZ(CrigBar_pos[tempIndex_3], CrigBar_pos_2[tempIndex_3])), vec2_withZ_return_y, vec2_withZ_return_z, offset_x, offset_y, offset_z) set temp_4 = vec3_op_plus_return_y set temp_5 = vec3_op_plus_return_z set tempIndex_4 = this_69 call image_setPos(temp_6, vec3_op_plus(temp_3, temp_4, temp_5, CrigBar_basicOffset[tempIndex_4], CrigBar_basicOffset_2[tempIndex_4], CrigBar_basicOffset_3[tempIndex_4]), vec3_op_plus_return_y, vec3_op_plus_return_z) set temp_12 = CrigBar_bar[this_69] set tempIndex_5 = this_69 set temp_7 = CrigBar_pos[tempIndex_5] set temp_8 = CrigBar_pos_2[tempIndex_5] set tempIndex_6 = this_69 set temp_9 = vec3_op_plus(vec2_withZ(temp_7, temp_8, getTerrainZ(CrigBar_pos[tempIndex_6], CrigBar_pos_2[tempIndex_6])), vec2_withZ_return_y, vec2_withZ_return_z, offset_x, offset_y, offset_z) set temp_10 = vec3_op_plus_return_y set temp_11 = vec3_op_plus_return_z set tempIndex_7 = this_69 call image_setPos(temp_12, vec3_op_plus(temp_9, temp_10, temp_11, CrigBar_basicBarOffset[tempIndex_7], CrigBar_basicBarOffset_2[tempIndex_7], CrigBar_basicBarOffset_3[tempIndex_7]), vec3_op_plus_return_y, vec3_op_plus_return_z) if CrigBar_barBackground[this_69] != null then set temp_18 = CrigBar_barBackground[this_69] set tempIndex_8 = this_69 set temp_13 = CrigBar_pos[tempIndex_8] set temp_14 = CrigBar_pos_2[tempIndex_8] set tempIndex_9 = this_69 set temp_15 = vec3_op_plus(vec2_withZ(temp_13, temp_14, getTerrainZ(CrigBar_pos[tempIndex_9], CrigBar_pos_2[tempIndex_9])), vec2_withZ_return_y, vec2_withZ_return_z, offset_x, offset_y, offset_z) set temp_16 = vec3_op_plus_return_y set temp_17 = vec3_op_plus_return_z set tempIndex_10 = this_69 call image_setPos(temp_18, vec3_op_plus(temp_15, temp_16, temp_17, CrigBar_basicBarOffset[tempIndex_10], CrigBar_basicBarOffset_2[tempIndex_10], CrigBar_basicBarOffset_3[tempIndex_10]), vec3_op_plus_return_y, vec3_op_plus_return_z) endif set temp_6 = null set temp_12 = null set temp_18 = null endfunction function dispatch_CrigBar_setOffset takes integer this_69, real offset_x, real offset_y, real offset_z returns nothing if CrigBar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CrigBar.setOffset") else call error("Called CrigBar.setOffset on invalid object.") endif endif call CrigBar_setOffset(this_69, offset_x, offset_y, offset_z) endfunction function image_setColor takes image this_69, integer col_red, integer col_green, integer col_blue returns nothing call SetImageColor(this_69, col_red, col_green, col_blue, 255) endfunction function image_setLevel takes image this_69, integer layer returns nothing call SetImageType(this_69, layer + 1) endfunction function image_show takes image this_69 returns nothing call SetImageRenderAlways(this_69, true) 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 CrigBar_setBackground takes integer this_69, integer col_red, integer col_green, integer col_blue returns nothing local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local real temp local real temp_2 local string temp_3 local integer temp_4 local integer temp_5 if CrigBar_barBackground[this_69] != null then call image_setColor(CrigBar_barBackground[this_69], col_red, col_green, col_blue) else set temp_4 = this_69 set temp_3 = CrigBar_barPath[this_69] set tempIndex = this_69 set temp = CrigBar_pos[tempIndex] set temp_2 = CrigBar_pos_2[tempIndex] set tempIndex_2 = this_69 set CrigBar_barBackground[temp_4] = createImage(temp_3, vec2_op_plus(temp, temp_2, vec3_toVec2(CrigBar_basicBarOffset[tempIndex_2], CrigBar_basicBarOffset_2[tempIndex_2], CrigBar_basicBarOffset_3[tempIndex_2]), vec3_toVec2_return_y), vec2_op_plus_return_y, CrigBar_percent[this_69] * CrigBar_width[this_69] * CrigBar_barScaleFactor[this_69], CrigBar_height[this_69] * CrigBar_barScaleFactor[this_69]) call image_setLevel(CrigBar_barBackground[this_69], 0) call image_setColor(CrigBar_barBackground[this_69], col_red, col_green, col_blue) call image_show(CrigBar_barBackground[this_69]) set temp_5 = this_69 set tempIndex_3 = this_69 call dispatch_CrigBar_setOffset(temp_5, CrigBar_offset[tempIndex_3], CrigBar_offset_2[tempIndex_3], CrigBar_offset_3[tempIndex_3]) call image_setLevel(CrigBar_bar[this_69], 0) call image_setLevel(CrigBar_border[this_69], 0) endif endfunction function dispatch_CrigBar_setBackground takes integer this_69, integer col_red, integer col_green, integer col_blue returns nothing if CrigBar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CrigBar.setBackground") else call error("Called CrigBar.setBackground on invalid object.") endif endif call CrigBar_setBackground(this_69, col_red, col_green, col_blue) endfunction function CrigBar_setBarColor takes integer this_69, integer col_red, integer col_green, integer col_blue returns nothing local integer tempIndex = this_69 set CrigBar_barColor[tempIndex] = col_red set CrigBar_barColor_2[tempIndex] = col_green set CrigBar_barColor_3[tempIndex] = col_blue call image_setColor(CrigBar_bar[this_69], col_red, col_green, col_blue) endfunction function dispatch_CrigBar_setBarColor takes integer this_69, integer col_red, integer col_green, integer col_blue returns nothing if CrigBar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CrigBar.setBarColor") else call error("Called CrigBar.setBarColor on invalid object.") endif endif call CrigBar_setBarColor(this_69, col_red, col_green, col_blue) 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) set receiver = null return TimerUtils_freeTimers[TimerUtils_freeTimersCount] else set receiver = CreateTimer() call timer_setData(receiver, 0) set getTimertempReturn = receiver set receiver = null return getTimertempReturn endif endfunction function timer_start takes timer this_69, real time, code timerCallBack returns nothing call TimerStart(this_69, time, false, timerCallBack) endfunction function CallbackSingle_start takes integer this_69, real time returns nothing local timer receiver = getTimer() local timer receiver_2 call timer_setData(receiver, this_69) set receiver_2 = receiver call timer_start(receiver_2, time, ref_function_CallbackSingle_staticCallback) set receiver = null set receiver_2 = null endfunction function dispatch_CallbackSingle_start takes integer this_69, real time returns nothing if CallbackSingle_typeId[this_69] == 0 then if this_69 == 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_69, time) endfunction function doAfter takes real timeToWait, integer cb returns nothing call dispatch_CallbackSingle_start(cb, timeToWait) endfunction function alloc_CrigBar takes nothing returns integer local integer this_69 if CrigBar_firstFree == 0 then set CrigBar_maxIndex = CrigBar_maxIndex + 1 set this_69 = CrigBar_maxIndex else set CrigBar_firstFree = CrigBar_firstFree - 1 set this_69 = CrigBar_nextFree[CrigBar_firstFree] endif set CrigBar_typeId[this_69] = 779 return this_69 endfunction function image_setColor_2 takes image this_69, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing call SetImageColor(this_69, col_red, col_green, col_blue, col_alpha) 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 construct_CrigBar takes integer this_69, real pos_x, real pos_y, real width, real height returns nothing local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 local integer tempIndex_7 local integer tempIndex_8 local integer tempIndex_9 local real temp local real temp_2 local string temp_3 local integer temp_4 local real temp_5 local real temp_6 local string temp_7 local integer temp_8 local image temp_9 local real temp_10 local real temp_11 local string temp_12 local integer temp_13 set CrigBar_borderPath[this_69] = "UI\\Widgets\\Glues\\Loading-NameBackground.blp" set CrigBar_barPath[this_69] = "white128.blp" set CrigBar_barScaleFactor[this_69] = 0.85 set tempIndex = this_69 set CrigBar_barColor[tempIndex] = 255 set CrigBar_barColor_2[tempIndex] = 70 set CrigBar_barColor_3[tempIndex] = 70 set CrigBar_barBackground[this_69] = null set CrigBar_percent[this_69] = 1. set tempIndex_2 = this_69 set CrigBar_pos[tempIndex_2] = pos_x set CrigBar_pos_2[tempIndex_2] = pos_y set CrigBar_height[this_69] = height set CrigBar_width[this_69] = width set tempIndex_3 = this_69 set CrigBar_basicOffset[tempIndex_3] = - (width / 2.) set CrigBar_basicOffset_2[tempIndex_3] = - (height / 2.) set CrigBar_basicOffset_3[tempIndex_3] = 0. set temp_4 = this_69 set temp_3 = CrigBar_barPath[this_69] set temp = pos_x set temp_2 = pos_y set tempIndex_4 = this_69 set CrigBar_barBackground[temp_4] = createImage(temp_3, vec2_op_plus(temp, temp_2, vec3_toVec2(CrigBar_basicBarOffset[tempIndex_4], CrigBar_basicBarOffset_2[tempIndex_4], CrigBar_basicBarOffset_3[tempIndex_4]), vec3_toVec2_return_y), vec2_op_plus_return_y, CrigBar_percent[this_69] * width * CrigBar_barScaleFactor[this_69], height * CrigBar_barScaleFactor[this_69]) call image_setLevel(CrigBar_barBackground[this_69], 0) call image_setColor_2(CrigBar_barBackground[this_69], 0, 0, 0, 0) call image_show(CrigBar_barBackground[this_69]) set tempIndex_5 = this_69 set CrigBar_basicBarOffset[tempIndex_5] = vec3_op_mult( - (width / 2.), - (height / 2.), 0., CrigBar_barScaleFactor[this_69]) set CrigBar_basicBarOffset_2[tempIndex_5] = vec3_op_mult_return_y set CrigBar_basicBarOffset_3[tempIndex_5] = vec3_op_mult_return_z set temp_8 = this_69 set temp_7 = CrigBar_barPath[this_69] set temp_5 = pos_x set temp_6 = pos_y set tempIndex_6 = this_69 set CrigBar_bar[temp_8] = createImage(temp_7, vec2_op_plus(temp_5, temp_6, vec3_toVec2(CrigBar_basicBarOffset[tempIndex_6], CrigBar_basicBarOffset_2[tempIndex_6], CrigBar_basicBarOffset_3[tempIndex_6]), vec3_toVec2_return_y), vec2_op_plus_return_y, CrigBar_percent[this_69] * width * CrigBar_barScaleFactor[this_69], height * CrigBar_barScaleFactor[this_69]) call image_setLevel(CrigBar_bar[this_69], 0) set temp_9 = CrigBar_bar[this_69] set tempIndex_7 = this_69 call image_setColor(temp_9, CrigBar_barColor[tempIndex_7], CrigBar_barColor_2[tempIndex_7], CrigBar_barColor_3[tempIndex_7]) call image_show(CrigBar_bar[this_69]) set temp_13 = this_69 set temp_12 = CrigBar_borderPath[this_69] set tempIndex_8 = this_69 set temp_10 = CrigBar_pos[tempIndex_8] set temp_11 = CrigBar_pos_2[tempIndex_8] set tempIndex_9 = this_69 set CrigBar_border[temp_13] = createImage(temp_12, vec2_op_plus(temp_10, temp_11, vec3_toVec2(CrigBar_basicOffset[tempIndex_9], CrigBar_basicOffset_2[tempIndex_9], CrigBar_basicOffset_3[tempIndex_9]), vec3_toVec2_return_y), vec2_op_plus_return_y, width, height) call image_setLevel(CrigBar_border[this_69], 0) call image_show(CrigBar_border[this_69]) set temp_9 = null endfunction function new_CrigBar takes real pos_x, real pos_y, real width, real height returns integer local integer this_69 = alloc_CrigBar() call construct_CrigBar(this_69, pos_x, pos_y, width, height) return this_69 endfunction function alloc_LinkedList takes nothing returns integer local integer this_69 if LinkedList_firstFree == 0 then set LinkedList_maxIndex = LinkedList_maxIndex + 1 set this_69 = LinkedList_maxIndex else set LinkedList_firstFree = LinkedList_firstFree - 1 set this_69 = LinkedList_nextFree[LinkedList_firstFree] endif set LinkedList_typeId[this_69] = 27 return this_69 endfunction function construct_LinkedList takes integer this_69 returns nothing set LinkedList_size[this_69] = 0 set LinkedList_dummy[this_69] = new_LLEntry(0, 0, 0) set LLEntry_next[LinkedList_dummy[this_69]] = LinkedList_dummy[this_69] set LLEntry_prev[LinkedList_dummy[this_69]] = LinkedList_dummy[this_69] endfunction function new_LinkedList takes nothing returns integer local integer this_69 = alloc_LinkedList() call construct_LinkedList(this_69) return this_69 endfunction function timer_startPeriodic takes timer this_69, real time, code timerCallBack returns nothing call TimerStart(this_69, time, true, timerCallBack) endfunction function unit_addAbility takes unit this_69, integer abil returns boolean return UnitAddAbility(this_69, abil) endfunction function unit_setFlyHeight takes unit this_69, real height, real rate returns nothing call SetUnitFlyHeight(this_69, height, rate) endfunction function unit_setUserData takes unit this_69, integer data_2 returns nothing call SetUnitUserData(this_69, data_2) endfunction function construct_ControlPoint takes integer this_69, real pos_x, real pos_y, integer owner returns nothing local integer clVar local timer receiver local timer receiver_2 local timer receiver_3 local timer receiver_4 local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local integer temp set ControlPoint_inRange[this_69] = CreateGroup() set ControlPoint_hp[this_69] = 0.05 set ControlPoint_outsideCrystals[this_69] = new_LinkedList() set ControlPoint_glowMarkers[this_69] = new_LinkedList() set ControlPoint_clickDummy[this_69] = CreateUnit(Player(1), ControlPoint_model, pos_x + 10., pos_y, 0.) call unit_addAbility(ControlPoint_clickDummy[this_69], ControlPoint_morphAbi) call unit_setUserData(ControlPoint_clickDummy[this_69], this_69) set clVar = alloc_Closure() set this_10[clVar] = this_69 call doAfter(1., clVar) call unit_addAbility(ControlPoint_clickDummy[this_69], 1098015094) call unit_setFlyHeight(ControlPoint_clickDummy[this_69], ControlPoint_height + 40., 0.) set ControlPoint_owner[this_69] = owner set tempIndex = this_69 set ControlPoint_pos2[tempIndex] = pos_x set ControlPoint_pos2_2[tempIndex] = pos_y set tempIndex_2 = this_69 set ControlPoint_pos3[tempIndex_2] = vec2_withZ(pos_x, pos_y, ControlPoint_height) set ControlPoint_pos3_2[tempIndex_2] = vec2_withZ_return_y set ControlPoint_pos3_3[tempIndex_2] = vec2_withZ_return_z call dispatch_ControlPoint_createDeco(this_69) set receiver = getTimer() call timer_setData(receiver, this_69) set receiver_2 = receiver call timer_startPeriodic(receiver_2, 0.1, ref_function_closure_impl_4) set ControlPoint_rangeCheckTimer[this_69] = receiver_2 set receiver_3 = getTimer() call timer_setData(receiver_3, this_69) set receiver_4 = receiver_3 call timer_startPeriodic(receiver_4, 0.03, ref_function_closure_impl_5) set ControlPoint_inRangeTimer[this_69] = receiver_4 set temp = this_69 set tempIndex_3 = this_69 set ControlPoint_bar[temp] = new_CrigBar(ControlPoint_pos2[tempIndex_3], ControlPoint_pos2_2[tempIndex_3], 250., 50.) if owner == 0 then call dispatch_CrigBar_setBarColor(ControlPoint_bar[this_69], 40, 255, 40) call dispatch_CrigBar_setBackground(ControlPoint_bar[this_69], 255, 40, 40) else call dispatch_CrigBar_setBarColor(ControlPoint_bar[this_69], 255, 40, 40) call dispatch_CrigBar_setBackground(ControlPoint_bar[this_69], 40, 255, 40) endif call dispatch_CrigBar_setOffset(ControlPoint_bar[this_69], 0., 70., ControlPoint_height + 150.) set receiver = null set receiver_2 = null set receiver_3 = null set receiver_4 = null endfunction function new_ControlPoint takes real pos_x, real pos_y, integer owner returns integer local integer this_69 = alloc_ControlPoint() call construct_ControlPoint(this_69, pos_x, pos_y, owner) return this_69 endfunction function closure_impl_5 takes integer this_69 returns integer return new_ControlPoint(5190., 9660., 0) endfunction function alloc_Closure_2 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 725 return this_69 endfunction function Tooltip_showDirect takes integer this_69, player p_2 returns nothing local integer temp = Tooltip_dummyTip local integer clVar local integer tempIndex local real tempTupleSelectionResult_1 local real temp_tempTupleSelectionResult_1 local integer tempIndex_2 local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local integer temp_2 local real temp_3 local integer temp_4 if GetLocalPlayer() == p_2 then set temp = Tooltip_id[this_69] endif set temp_4 = this_69 set temp_2 = temp set tempIndex = this_69 set temp_tempTupleSelectionResult_1 = Tooltip_realPos[tempIndex] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 set temp_3 = tempTupleSelectionResult_1 set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_2 = Tooltip_realPos_2[tempIndex_2] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set Tooltip_d[temp_4] = CreateDestructable(temp_2, temp_3, tempTupleSelectionResult_2, 0., 8., 0) set clVar = alloc_Closure_2() set this_68[clVar] = this_69 call doAfter(0.15, clVar) endfunction function dispatch_Tooltip_showDirect takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Tooltip.showDirect") else call error("Called Tooltip.showDirect on invalid object.") endif endif call Tooltip_showDirect(this_69, p_2) endfunction function alloc_Tooltip takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 874 return this_69 endfunction function construct_Widget takes integer this_69, integer pos_x, integer pos_y, integer size_x, integer size_y returns nothing local integer tempIndex = this_69 local integer tempIndex_2 set Widget_pos[tempIndex] = pos_x set Widget_pos_2[tempIndex] = pos_y set tempIndex_2 = this_69 set Widget_size[tempIndex_2] = size_x set Widget_size_2[tempIndex_2] = size_y endfunction function element_toVec takes integer this_x, integer this_y returns real set element_toVec_return_x = this_x * Setup_tileSize * 1. set element_toVec_return_y = this_y * Setup_tileSize * 1. return element_toVec_return_x endfunction function HashMap_get takes integer this_69, integer key returns integer return hashtable_loadInt(HashMap_ht, this_69, key) endfunction function dispatch_HashMap_get takes integer this_69, integer key returns integer local integer get_result if HashMap_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HashMap.get") else call error("Called HashMap.get on invalid object.") endif endif set get_result = HashMap_get(this_69, key) return get_result endfunction function getTipType takes string s returns integer return dispatch_HashMap_get(ToolTipTypes_tipMap, StringHash(s)) endfunction function construct_Tooltip takes integer this_69, integer pos_x, integer pos_y, string tiptype returns nothing local integer tempIndex call construct_Widget(this_69, pos_x, pos_y, 10, 10) set Tooltip_id[this_69] = getTipType(tiptype) set tempIndex = this_69 set Tooltip_realPos[tempIndex] = vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y) set Tooltip_realPos_2[tempIndex] = vec2_op_plus_return_y endfunction function new_Tooltip takes integer pos_x, integer pos_y, string tiptype returns integer local integer this_69 = alloc_Tooltip() call construct_Tooltip(this_69, pos_x, pos_y, tiptype) return this_69 endfunction function closure_impl_6 takes integer this_69 returns nothing call dispatch_Tooltip_showDirect(new_Tooltip(27, 0, "test2"), Player(0)) endfunction function alloc_DelayNode takes nothing returns integer local integer this_69 if DelayNode_firstFree == 0 then set DelayNode_maxIndex = DelayNode_maxIndex + 1 set this_69 = DelayNode_maxIndex else set DelayNode_firstFree = DelayNode_firstFree - 1 set this_69 = DelayNode_nextFree[DelayNode_firstFree] endif set DelayNode_typeId[this_69] = 777 return this_69 endfunction function timer_getElapsed takes timer this_69 returns real return TimerGetElapsed(this_69) endfunction function getElapsedGameTime takes nothing returns real return timer_getElapsed(GameTimer_gameTimer) endfunction function timer_getRemaining takes timer this_69 returns real return TimerGetRemaining(this_69) endfunction function construct_DelayNode takes integer this_69, unit u_2, real time returns nothing local integer tmp set DelayNode_next[this_69] = 0 set DelayNode_u[this_69] = u_2 set DelayNode_delayTime[this_69] = getElapsedGameTime() + time if DelayNode_first == 0 then set DelayNode_first = this_69 set DelayNode_last = DelayNode_first else set tmp = DelayNode_first loop exitwhen not (DelayNode_next[tmp] != 0 and DelayNode_delayTime[tmp] < DelayNode_delayTime[this_69]) set tmp = DelayNode_next[tmp] endloop if DelayNode_delayTime[tmp] < DelayNode_delayTime[this_69] then if tmp == DelayNode_last then set DelayNode_next[tmp] = this_69 set DelayNode_last = this_69 else set DelayNode_next[this_69] = DelayNode_next[tmp] set DelayNode_next[tmp] = this_69 endif elseif tmp == DelayNode_first then set DelayNode_first = this_69 set DelayNode_next[this_69] = tmp elseif tmp == DelayNode_last then set DelayNode_next[tmp] = this_69 set DelayNode_last = tmp else set DelayNode_next[this_69] = DelayNode_next[tmp] set DelayNode_next[tmp] = this_69 endif if timer_getRemaining(DelayNode_t) > 0. and time < timer_getRemaining(DelayNode_t) then call timer_start(DelayNode_t, time, ref_function_DelayNode_recycle_2) elseif timer_getRemaining(DelayNode_t) <= 0. then call timer_start(DelayNode_t, time, ref_function_DelayNode_recycle_3) endif endif endfunction function new_DelayNode takes unit u_2, real time returns integer local integer this_69 = alloc_DelayNode() call construct_DelayNode(this_69, u_2, time) return this_69 endfunction function DummyRecycler_recycle takes unit u_2, real delay returns nothing call new_DelayNode(u_2, delay) endfunction function effect_destr takes effect this_69 returns nothing call DestroyEffect(this_69) endfunction function Fx_onDestroy takes integer this_69 returns nothing if Fx_fx[this_69] != null then call effect_destr(Fx_fx[this_69]) endif call DummyRecycler_recycle(Fx_dummy[this_69], 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_69 returns nothing call Fx_onDestroy(this_69) call dealloc_Fx(this_69) endfunction function dispatch_Fx_destroyFx takes integer this_69 returns nothing if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.destroyFx") else call error("Called Fx.destroyFx on invalid object.") endif endif call destroyFx(this_69) endfunction function lightning_destr takes lightning this_69 returns nothing call DestroyLightning(this_69) endfunction function closure_impl_7 takes integer this_69 returns nothing call lightning_destr(ls[this_69]) call dispatch_Fx_destroyFx(sideCrystalFx[this_69]) endfunction function Unit_updateMovespeed takes integer this_69 returns nothing call SetUnitMoveSpeed(Unit_u[this_69], (Unit_movespeed[this_69] + Unit_bonusMovespeed[this_69]) * (1. + Unit_bonusMovespeedPer[this_69] / 100.)) endfunction function LLEntry_onDestroy takes integer this_69 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_69 returns nothing call LLEntry_onDestroy(this_69) call dealloc_LLEntry(this_69) endfunction function dispatch_LLEntry_destroyLLEntry takes integer this_69 returns nothing if LLEntry_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling LLEntry.destroyLLEntry") else call error("Called LLEntry.destroyLLEntry on invalid object.") endif endif call destroyLLEntry(this_69) endfunction function LinkedList_remove takes integer this_69, integer t returns nothing local integer r = LLEntry_next[LinkedList_dummy[this_69]] loop exitwhen not (r != LinkedList_dummy[this_69]) if LLEntry_elem[r] == t then set LLEntry_next[LLEntry_prev[r]] = LLEntry_next[r] set LLEntry_prev[LLEntry_next[r]] = LLEntry_prev[r] call dispatch_LLEntry_destroyLLEntry(r) set LinkedList_size[this_69] = LinkedList_size[this_69] - 1 return endif set r = LLEntry_next[r] endloop endfunction function dispatch_LinkedList_remove takes integer this_69, integer t returns nothing if LinkedList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling LinkedList.remove") else call error("Called LinkedList.remove on invalid object.") endif endif call LinkedList_remove(this_69, t) endfunction function Unit_getMovespeed takes integer this_69, boolean withBonus returns real if withBonus then return (Unit_movespeed[this_69] + Unit_bonusMovespeed[this_69]) * (1. + Unit_bonusMovespeedPer[this_69] / 100.) else return Unit_movespeed[this_69] endif endfunction function dispatch_Unit_getMovespeed takes integer this_69, boolean withBonus returns real local real getMovespeed_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.getMovespeed") else call error("Called Unit.getMovespeed on invalid object.") endif endif set getMovespeed_result = Unit_getMovespeed(this_69, withBonus) return getMovespeed_result endfunction function Hero_updateMovespeed takes integer this_69 returns nothing call Unit_updateMovespeed(this_69) if dispatch_Unit_getMovespeed(this_69, true) > 522. then call dispatch_LinkedList_add(Hero_toMove, this_69) else call dispatch_LinkedList_remove(Hero_toMove, this_69) endif endfunction function dispatch_Unit_updateMovespeed takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateMovespeed") else call error("Called Unit.updateMovespeed on invalid object.") endif endif if Unit_typeId[this_69] <= 796 then call Unit_updateMovespeed(this_69) else call Hero_updateMovespeed(this_69) endif endfunction function closure_impl_8 takes integer this_69 returns nothing set Unit_bonusMovespeedPer[this_44[this_69]] = Unit_bonusMovespeedPer[this_44[this_69]] - amount_34[this_69] call dispatch_Unit_updateMovespeed(this_44[this_69]) endfunction function closure_impl_9 takes integer this_69 returns nothing set Unit_magicReduction[this_24[this_69]] = Unit_magicReduction[this_24[this_69]] - amount_14[this_69] endfunction function Unit_addAbility takes integer this_69, integer abi returns nothing call unit_addAbility(Unit_u[this_69], abi) endfunction function dispatch_Unit_addAbility takes integer this_69, integer abi returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.addAbility") else call error("Called Unit.addAbility on invalid object.") endif endif call Unit_addAbility(this_69, abi) endfunction function unit_removeAbility takes unit this_69, integer abil returns nothing call UnitRemoveAbility(this_69, abil) endfunction function Unit_updateState takes integer this_69, integer amount_51, integer raw returns nothing local integer i local integer temp local integer statHelper local integer i_2 local integer temp_2 local integer i_3 local integer temp_3 call unit_removeAbility(Unit_u[this_69], raw + 45) set i = raw + 97 set temp = raw + 97 + (Setup_maxBonSize - 1) loop exitwhen i > temp call unit_removeAbility(Unit_u[this_69], i) set i = i + 1 endloop set statHelper = amount_51 if statHelper >= 0 then set i_2 = raw + 97 set temp_2 = raw + 97 + (Setup_maxBonSize - 1) loop exitwhen i_2 > temp_2 if ModuloInteger(statHelper, 2) == 1 then call dispatch_Unit_addAbility(this_69, i_2) endif set statHelper = statHelper / 2 if statHelper == 0 then return endif set i_2 = i_2 + 1 endloop else set statHelper = statHelper + 1 set i_3 = raw + 97 set temp_3 = raw + 97 + (Setup_maxBonSize - 1) loop exitwhen i_3 > temp_3 if ModuloInteger(statHelper, 2) == 0 then call dispatch_Unit_addAbility(this_69, i_3) endif set statHelper = statHelper / 2 set i_3 = i_3 + 1 endloop call dispatch_Unit_addAbility(this_69, raw + 45) endif endfunction function dispatch_Unit_updateState takes integer this_69, integer amount_51, integer raw returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateState") else call error("Called Unit.updateState on invalid object.") endif endif call Unit_updateState(this_69, amount_51, raw) endfunction function Unit_updateLife takes integer this_69 returns nothing call dispatch_Unit_updateState(this_69, roundReal((Unit_life[this_69] + Unit_bonusLife[this_69]) * (1. + Unit_bonusLifePer[this_69] / 100.) - Unit_life[this_69]), Setup_lifeRaw) endfunction function Bar_updateEx takes integer this_69 returns nothing local timer receiver = getTimer() local timer receiver_2 call timer_setData(receiver, this_69) set receiver_2 = receiver call timer_start(receiver_2, 0.0, ref_function_Bar_callUpdateEx) set receiver = null set receiver_2 = null endfunction function dispatch_Bar_updateEx takes integer this_69 returns nothing if Bar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Bar.updateEx") else call error("Called Bar.updateEx on invalid object.") endif endif call Bar_updateEx(this_69) endfunction function Hero_updateLife takes integer this_69 returns nothing call dispatch_Bar_updateEx(Hero_hb[this_69]) call Unit_updateLife(this_69) endfunction function dispatch_Unit_updateLife takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateLife") else call error("Called Unit.updateLife on invalid object.") endif endif if Unit_typeId[this_69] <= 796 then call Unit_updateLife(this_69) else call Hero_updateLife(this_69) endif endfunction function closure_impl_10 takes integer this_69 returns nothing set Unit_bonusLifePer[this_48[this_69]] = Unit_bonusLifePer[this_48[this_69]] - amount_38[this_69] call dispatch_Unit_updateLife(this_48[this_69]) endfunction function unit_setVertexColor takes unit this_69, integer col_red, integer col_green, integer col_blue, integer col_alpha returns nothing call SetUnitVertexColor(this_69, col_red, col_green, col_blue, col_alpha) endfunction function closure_impl_11 takes integer this_69 returns nothing call unit_setVertexColor(ControlPoint_clickDummy[this_10[this_69]], 0, 0, 0, 1) endfunction function Unit_updateLifeReg takes integer this_69 returns nothing call dispatch_Unit_updateState(this_69, roundReal((Unit_lifeReg[this_69] + Unit_bonusLifeReg[this_69]) * (1. + Unit_bonusLifeRegPer[this_69] / 100.) - Unit_lifeReg[this_69]), Setup_lifeRegRaw) endfunction function dispatch_Unit_updateLifeReg takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateLifeReg") else call error("Called Unit.updateLifeReg on invalid object.") endif endif call Unit_updateLifeReg(this_69) endfunction function closure_impl_12 takes integer this_69 returns nothing set Unit_bonusLifeReg[this_50[this_69]] = Unit_bonusLifeReg[this_50[this_69]] - amount_40[this_69] call dispatch_Unit_updateLifeReg(this_50[this_69]) endfunction function item_setPos takes item this_69, real pos_x, real pos_y returns nothing call SetItemPosition(this_69, pos_x, pos_y) endfunction function Unit_addAttack takes integer this_69, real amount_51 returns nothing local integer bonus local integer statHelper local integer i local integer i_2 set Unit_attack[this_69] = Unit_attack[this_69] + amount_51 set bonus = 8192 set statHelper = roundReal(amount_51) call dispatch_Unit_addAbility(this_69, 1768846953) if statHelper >= 0 then set i = Setup_maxBonSize - 1 loop exitwhen i < 0 if statHelper >= bonus then call UnitAddItem(Unit_u[this_69], Setup_permAttackTome[i]) call item_setPos(Setup_permAttackTome[i], Setup_recycleGraveyard_x, Setup_recycleGraveyard_y) set statHelper = statHelper - bonus endif set bonus = bonus / 2 set i = i - 1 endloop else set statHelper = 16384 - ( - (1 * statHelper)) set i_2 = Setup_maxBonSize - 1 loop exitwhen i_2 < 0 if statHelper >= bonus then call UnitAddItem(Unit_u[this_69], Setup_permAttackTome[i_2]) call item_setPos(Setup_permAttackTome[i_2], Setup_recycleGraveyard_x, Setup_recycleGraveyard_y) set statHelper = statHelper - bonus endif set bonus = bonus / 2 set i_2 = i_2 - 1 endloop call UnitAddItem(Unit_u[this_69], Setup_permAttackNegTome) call item_setPos(Setup_permAttackNegTome, Setup_recycleGraveyard_x, Setup_recycleGraveyard_y) endif call unit_removeAbility(Unit_u[this_69], 1768846953) endfunction function closure_impl_13 takes integer this_69 returns nothing set Unit_spellpowerPer[this_29[this_69]] = Unit_spellpowerPer[this_29[this_69]] - amount_19[this_69] endfunction function closure_impl_14 takes integer this_69 returns nothing set Unit_bonusResistancePer[this_37[this_69]] = Unit_bonusResistancePer[this_37[this_69]] - amount_27[this_69] endfunction function Unit_updateMana takes integer this_69 returns nothing call dispatch_Unit_updateState(this_69, roundReal((Unit_mana[this_69] + Unit_bonusMana[this_69]) * (1. + Unit_bonusManaPer[this_69] / 100.) - Unit_mana[this_69]), Setup_manaRaw) endfunction function Hero_updateMana takes integer this_69 returns nothing call dispatch_Bar_updateEx(Hero_hb[this_69]) call Unit_updateMana(this_69) endfunction function dispatch_Unit_updateMana takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateMana") else call error("Called Unit.updateMana on invalid object.") endif endif if Unit_typeId[this_69] <= 796 then call Unit_updateMana(this_69) else call Hero_updateMana(this_69) endif endfunction function closure_impl_15 takes integer this_69 returns nothing set Unit_bonusMana[this_53[this_69]] = Unit_bonusMana[this_53[this_69]] - amount_43[this_69] call dispatch_Unit_updateMana(this_53[this_69]) endfunction function closure_impl_16 takes integer this_69 returns nothing set Unit_critdamage[this_27[this_69]] = Unit_critdamage[this_27[this_69]] - amount_17[this_69] endfunction function Unit_updateAttack takes integer this_69 returns nothing call dispatch_Unit_updateState(this_69, roundReal((Unit_attack[this_69] + Unit_bonusAttack[this_69]) * (1. + Unit_bonusAttackPer[this_69] / 100.) - Unit_attack[this_69]), Setup_attackRaw) endfunction function dispatch_Unit_updateAttack takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateAttack") else call error("Called Unit.updateAttack on invalid object.") endif endif call Unit_updateAttack(this_69) endfunction function closure_impl_17 takes integer this_69 returns nothing set Unit_bonusAttack[this_11[this_69]] = Unit_bonusAttack[this_11[this_69]] - amount[this_69] call dispatch_Unit_updateAttack(this_11[this_69]) endfunction function closure_impl_18 takes integer this_69 returns nothing set Unit_normalReduction[this_21[this_69]] = Unit_normalReduction[this_21[this_69]] - amount_11[this_69] endfunction function Unit_updateAttackspeed takes integer this_69 returns nothing call dispatch_Unit_updateState(this_69, roundReal(Unit_bonusAttackspeed[this_69]), Setup_attackSpeedRaw) endfunction function dispatch_Unit_updateAttackspeed takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateAttackspeed") else call error("Called Unit.updateAttackspeed on invalid object.") endif endif call Unit_updateAttackspeed(this_69) endfunction function closure_impl_19 takes integer this_69 returns nothing set Unit_bonusAttackspeed[this_39[this_69]] = Unit_bonusAttackspeed[this_39[this_69]] - amount_29[this_69] call dispatch_Unit_updateAttackspeed(this_39[this_69]) endfunction function closure_impl_20 takes integer this_69 returns nothing set Unit_bonusLifeRegPer[this_51[this_69]] = Unit_bonusLifeRegPer[this_51[this_69]] - amount_41[this_69] call dispatch_Unit_updateLifeReg(this_51[this_69]) endfunction function closure_impl_21 takes integer this_69 returns nothing set Unit_bonusLife[this_45[this_69]] = Unit_bonusLife[this_45[this_69]] - amount_35[this_69] call dispatch_Unit_updateLife(this_45[this_69]) endfunction function Unit_updateArmor takes integer this_69 returns nothing call dispatch_Unit_updateState(this_69, roundReal((Unit_armor[this_69] + Unit_bonusArmor[this_69]) * (1. + Unit_bonusArmorPer[this_69] / 100.) - Unit_armor[this_69]), Setup_armorRaw) endfunction function dispatch_Unit_updateArmor takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateArmor") else call error("Called Unit.updateArmor on invalid object.") endif endif call Unit_updateArmor(this_69) endfunction function closure_impl_22 takes integer this_69 returns nothing set Unit_bonusArmorPer[this_33[this_69]] = Unit_bonusArmorPer[this_33[this_69]] - amount_23[this_69] call dispatch_Unit_updateArmor(this_33[this_69]) endfunction function closure_impl_23 takes integer this_69 returns nothing set Unit_bonusLifeReg[this_49[this_69]] = Unit_bonusLifeReg[this_49[this_69]] - amount_39[this_69] call dispatch_Unit_updateLifeReg(this_49[this_69]) endfunction function closure_impl_24 takes integer this_69 returns nothing set Unit_magicReduction[this_23[this_69]] = Unit_magicReduction[this_23[this_69]] - amount_13[this_69] endfunction function closure_impl_25 takes integer this_69 returns nothing set Unit_spellVamp[this_19[this_69]] = Unit_spellVamp[this_19[this_69]] - amount_9[this_69] endfunction function closure_impl_26 takes integer this_69 returns nothing set Unit_bonusResistance[this_35[this_69]] = Unit_bonusResistance[this_35[this_69]] - amount_25[this_69] endfunction function closure_impl_27 takes integer this_69 returns nothing set Unit_spellpower[this_15[this_69]] = Unit_spellpower[this_15[this_69]] - amount_5[this_69] endfunction function Unit_updateManaReg takes integer this_69 returns nothing call dispatch_Unit_updateState(this_69, roundReal((Unit_manaReg[this_69] + Unit_bonusManaReg[this_69]) * (1. + Unit_bonusManaRegPer[this_69] / 100.) - Unit_manaReg[this_69]), Setup_manaRegRaw) endfunction function dispatch_Unit_updateManaReg takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.updateManaReg") else call error("Called Unit.updateManaReg on invalid object.") endif endif call Unit_updateManaReg(this_69) endfunction function closure_impl_28 takes integer this_69 returns nothing set Unit_bonusManaRegPer[this_59[this_69]] = Unit_bonusManaRegPer[this_59[this_69]] - amount_49[this_69] call dispatch_Unit_updateManaReg(this_59[this_69]) endfunction function closure_impl_29 takes integer this_69 returns nothing set Unit_bonusMovespeed[this_41[this_69]] = Unit_bonusMovespeed[this_41[this_69]] - amount_31[this_69] call dispatch_Unit_updateMovespeed(this_41[this_69]) endfunction function closure_impl_30 takes integer this_69 returns nothing set Unit_bonusManaPer[this_55[this_69]] = Unit_bonusManaPer[this_55[this_69]] - amount_45[this_69] call dispatch_Unit_updateMana(this_55[this_69]) endfunction function closure_impl_31 takes integer this_69 returns nothing set Unit_bonusMovespeedPer[this_43[this_69]] = Unit_bonusMovespeedPer[this_43[this_69]] - amount_33[this_69] call dispatch_Unit_updateMovespeed(this_43[this_69]) endfunction function closure_impl_32 takes integer this_69 returns nothing set Unit_bonusManaReg[this_57[this_69]] = Unit_bonusManaReg[this_57[this_69]] - amount_47[this_69] call dispatch_Unit_updateManaReg(this_57[this_69]) endfunction function closure_impl_33 takes integer this_69 returns nothing set Unit_bonusArmor[this_31[this_69]] = Unit_bonusArmor[this_31[this_69]] - amount_21[this_69] call dispatch_Unit_updateArmor(this_31[this_69]) endfunction function closure_impl_34 takes integer this_69 returns nothing set Unit_bonusLifePer[this_47[this_69]] = Unit_bonusLifePer[this_47[this_69]] - amount_37[this_69] call dispatch_Unit_updateLife(this_47[this_69]) endfunction function closure_impl_35 takes integer this_69 returns nothing set Unit_lifesteal[this_17[this_69]] = Unit_lifesteal[this_17[this_69]] - amount_7[this_69] endfunction function closure_impl_36 takes integer this_69 returns nothing set Unit_critchance[this_25[this_69]] = Unit_critchance[this_25[this_69]] - amount_15[this_69] endfunction function closure_impl_37 takes integer this_69 returns nothing set Unit_bonusAttackPer[this_13[this_69]] = Unit_bonusAttackPer[this_13[this_69]] - amount_3[this_69] call dispatch_Unit_updateAttack(this_13[this_69]) endfunction function dispatch_Bonus_remove takes integer this_69 returns nothing if Bonus_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Bonus.remove") else call error("Called Bonus.remove on invalid object.") endif endif if Bonus_typeId[this_69] <= 817 then if Bonus_typeId[this_69] <= 811 then if Bonus_typeId[this_69] <= 808 then if Bonus_typeId[this_69] <= 806 then if Bonus_typeId[this_69] <= 805 then call closure_impl_23(this_69) else call closure_impl_13(this_69) endif elseif Bonus_typeId[this_69] <= 807 then call closure_impl_30(this_69) else call closure_impl_37(this_69) endif elseif Bonus_typeId[this_69] <= 810 then if Bonus_typeId[this_69] <= 809 then call closure_impl_33(this_69) else call closure_impl_14(this_69) endif else call closure_impl_26(this_69) endif elseif Bonus_typeId[this_69] <= 814 then if Bonus_typeId[this_69] <= 813 then if Bonus_typeId[this_69] <= 812 then call closure_impl_34(this_69) else call closure_impl_20(this_69) endif else call closure_impl_32(this_69) endif elseif Bonus_typeId[this_69] <= 816 then if Bonus_typeId[this_69] <= 815 then call closure_impl_28(this_69) else call closure_impl_19(this_69) endif else call closure_impl_15(this_69) endif elseif Bonus_typeId[this_69] <= 823 then if Bonus_typeId[this_69] <= 820 then if Bonus_typeId[this_69] <= 819 then if Bonus_typeId[this_69] <= 818 then call closure_impl_27(this_69) else call closure_impl_24(this_69) endif else call closure_impl_17(this_69) endif elseif Bonus_typeId[this_69] <= 822 then if Bonus_typeId[this_69] <= 821 then call closure_impl_16(this_69) else call closure_impl_18(this_69) endif else call closure_impl_36(this_69) endif elseif Bonus_typeId[this_69] <= 826 then if Bonus_typeId[this_69] <= 825 then if Bonus_typeId[this_69] <= 824 then call closure_impl_31(this_69) else call closure_impl_25(this_69) endif else call closure_impl_22(this_69) endif elseif Bonus_typeId[this_69] <= 828 then if Bonus_typeId[this_69] <= 827 then call closure_impl_35(this_69) else call closure_impl_21(this_69) endif else call closure_impl_29(this_69) endif endfunction function Bonus_onDestroy takes integer this_69 returns nothing call dispatch_Bonus_remove(this_69) endfunction function dealloc_Bonus takes integer obj returns nothing if Bonus_typeId[obj] == 0 then call error("Double free: object of type Bonus") else set Bonus_nextFree[Bonus_firstFree] = obj set Bonus_firstFree = Bonus_firstFree + 1 set Bonus_typeId[obj] = 0 endif endfunction function destroyBonus takes integer this_69 returns nothing call Bonus_onDestroy(this_69) call dealloc_Bonus(this_69) endfunction function dispatch_Bonus_destroyBonus takes integer this_69 returns nothing if Bonus_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Bonus.destroyBonus") else call error("Called Bonus.destroyBonus on invalid object.") endif endif call destroyBonus(this_69) endfunction function dispatch_Hero_updateLife takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.updateLife") else call error("Called Hero.updateLife on invalid object.") endif endif call Hero_updateLife(this_69) endfunction function dispatch_Hero_updateMana takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.updateMana") else call error("Called Hero.updateMana on invalid object.") endif endif call Hero_updateMana(this_69) endfunction function closure_impl_38 takes integer this_69 returns nothing set Hero_onAdd[this_64[this_69]] = false call Unit_addAttack(this_64[this_69], I2R(Hero_attackBuffer[this_64[this_69]])) call dispatch_Unit_updateArmor(this_64[this_69]) call dispatch_Hero_updateLife(this_64[this_69]) call dispatch_Hero_updateMana(this_64[this_69]) call dispatch_Bonus_destroyBonus(b[this_69]) endfunction function closure_impl_39 takes integer this_69 returns nothing set Unit_bonusResistance[this_36[this_69]] = Unit_bonusResistance[this_36[this_69]] - amount_26[this_69] endfunction function closure_impl_40 takes integer this_69 returns nothing set Unit_bonusArmor[this_32[this_69]] = Unit_bonusArmor[this_32[this_69]] - amount_22[this_69] call dispatch_Unit_updateArmor(this_32[this_69]) endfunction function closure_impl_41 takes integer this_69 returns nothing call RemoveDestructable(d[this_69]) endfunction function unit_remove takes unit this_69 returns nothing call RemoveUnit(this_69) endfunction function closure_impl_42 takes integer this_69 returns nothing call unit_remove(u[this_69]) endfunction function closure_impl_43 takes integer this_69 returns nothing set Unit_bonusAttack[this_12[this_69]] = Unit_bonusAttack[this_12[this_69]] - amount_2[this_69] call dispatch_Unit_updateAttack(this_12[this_69]) endfunction function closure_impl_44 takes integer this_69 returns nothing set Unit_bonusManaReg[this_58[this_69]] = Unit_bonusManaReg[this_58[this_69]] - amount_48[this_69] call dispatch_Unit_updateManaReg(this_58[this_69]) endfunction function closure_impl_45 takes integer this_69 returns nothing set Unit_lifesteal[this_18[this_69]] = Unit_lifesteal[this_18[this_69]] - amount_8[this_69] endfunction function alloc_Unit takes nothing returns integer local integer this_69 if Unit_firstFree == 0 then set Unit_maxIndex = Unit_maxIndex + 1 set this_69 = Unit_maxIndex else set Unit_firstFree = Unit_firstFree - 1 set this_69 = Unit_nextFree[Unit_firstFree] endif set Unit_typeId[this_69] = 796 return this_69 endfunction function alloc_Closure_3 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 744 return this_69 endfunction function booleanToIndex takes boolean u_2 returns integer if u_2 then return 1 endif return 0 endfunction function HashMap_put takes integer this_69, integer key, integer value returns nothing call hashtable_saveInt(HashMap_ht, this_69, key, value) endfunction function dispatch_HashMap_put takes integer this_69, integer key, integer value returns nothing if HashMap_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HashMap.put") else call error("Called HashMap.put on invalid object.") endif endif call HashMap_put(this_69, key, value) endfunction function alloc_SEntry takes nothing returns integer local integer this_69 if SEntry_firstFree == 0 then set SEntry_maxIndex = SEntry_maxIndex + 1 set this_69 = SEntry_maxIndex else set SEntry_firstFree = SEntry_firstFree - 1 set this_69 = SEntry_nextFree[SEntry_firstFree] endif return this_69 endfunction function construct_SEntry takes integer this_69, integer elem, integer prev returns nothing set SEntry_elem[this_69] = elem set SEntry_prev[this_69] = prev endfunction function new_SEntry takes integer elem, integer prev returns integer local integer this_69 = alloc_SEntry() call construct_SEntry(this_69, elem, prev) return this_69 endfunction function Stack_push takes integer this_69, integer elem returns nothing set Stack_top[this_69] = new_SEntry(elem, Stack_top[this_69]) set Stack_size[this_69] = Stack_size[this_69] + 1 endfunction function dispatch_Stack_push takes integer this_69, integer elem returns nothing if Stack_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Stack.push") else call error("Called Stack.push on invalid object.") endif endif call Stack_push(this_69, elem) endfunction function Icon_isDisabled_get takes integer index1, integer index2 returns boolean local boolean returnVal if index2 < 0 or index2 >= 12 then call error("Index out of Bounds") elseif index2 <= 5 then if index2 <= 2 then if index2 <= 1 then if index2 <= 0 then set returnVal = Icon_isDisabled_0[index1] else set returnVal = Icon_isDisabled_1[index1] endif else set returnVal = Icon_isDisabled_2[index1] endif elseif index2 <= 4 then if index2 <= 3 then set returnVal = Icon_isDisabled_3[index1] else set returnVal = Icon_isDisabled_4[index1] endif else set returnVal = Icon_isDisabled_5[index1] endif elseif index2 <= 8 then if index2 <= 7 then if index2 <= 6 then set returnVal = Icon_isDisabled_6[index1] else set returnVal = Icon_isDisabled_7[index1] endif else set returnVal = Icon_isDisabled_8[index1] endif elseif index2 <= 10 then if index2 <= 9 then set returnVal = Icon_isDisabled_9[index1] else set returnVal = Icon_isDisabled_10[index1] endif else set returnVal = Icon_isDisabled_11[index1] endif return returnVal endfunction function Icon_structs_get takes integer index1, integer index2 returns destructable local destructable returnVal if index2 < 0 or index2 >= 12 then call error("Index out of Bounds") elseif index2 <= 5 then if index2 <= 2 then if index2 <= 1 then if index2 <= 0 then set returnVal = Icon_structs_0[index1] else set returnVal = Icon_structs_1[index1] endif else set returnVal = Icon_structs_2[index1] endif elseif index2 <= 4 then if index2 <= 3 then set returnVal = Icon_structs_3[index1] else set returnVal = Icon_structs_4[index1] endif else set returnVal = Icon_structs_5[index1] endif elseif index2 <= 8 then if index2 <= 7 then if index2 <= 6 then set returnVal = Icon_structs_6[index1] else set returnVal = Icon_structs_7[index1] endif else set returnVal = Icon_structs_8[index1] endif elseif index2 <= 10 then if index2 <= 9 then set returnVal = Icon_structs_9[index1] else set returnVal = Icon_structs_10[index1] endif else set returnVal = Icon_structs_11[index1] endif set Icon_structs_gettempReturn = returnVal set returnVal = null return Icon_structs_gettempReturn endfunction function Icon_structs_set takes integer instanceId, integer arrayIndex, destructable value returns nothing if arrayIndex < 0 or arrayIndex >= 12 then call error("Index out of Bounds") elseif arrayIndex <= 5 then if arrayIndex <= 2 then if arrayIndex <= 1 then if arrayIndex <= 0 then set Icon_structs_0[instanceId] = value else set Icon_structs_1[instanceId] = value endif else set Icon_structs_2[instanceId] = value endif elseif arrayIndex <= 4 then if arrayIndex <= 3 then set Icon_structs_3[instanceId] = value else set Icon_structs_4[instanceId] = value endif else set Icon_structs_5[instanceId] = value endif elseif arrayIndex <= 8 then if arrayIndex <= 7 then if arrayIndex <= 6 then set Icon_structs_6[instanceId] = value else set Icon_structs_7[instanceId] = value endif else set Icon_structs_8[instanceId] = value endif elseif arrayIndex <= 10 then if arrayIndex <= 9 then set Icon_structs_9[instanceId] = value else set Icon_structs_10[instanceId] = value endif else set Icon_structs_11[instanceId] = value endif endfunction function player_getId takes player this_69 returns integer return GetPlayerId(this_69) endfunction function Icon_showDirect takes integer this_69, player p_2 returns nothing local destructable d_2 = Icon_structs_get(this_69, player_getId(p_2)) local integer id local integer tempIndex local integer tempTupleSelectionResult_2 local integer temp_tempTupleSelectionResult_2 local integer tempIndex_2 local integer tempTupleSelectionResult_1 local integer temp_tempTupleSelectionResult_1 local integer tempIndex_3 local real tempTupleSelectionResult_1_2 local real temp_tempTupleSelectionResult_1_2 local integer tempIndex_4 local real tempTupleSelectionResult_2_2 local real temp_tempTupleSelectionResult_2_2 local integer temp local real temp_2 local integer temp_3 local integer temp_4 if d_2 == null then set id = Icon_dummyIcon if GetLocalPlayer() == p_2 then if Icon_isDisabled_get(this_69, player_getId(p_2)) then set tempIndex = this_69 set temp_tempTupleSelectionResult_2 = Icon_typ_2[tempIndex] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set id = tempTupleSelectionResult_2 call print("is Disabled") else set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_1 = Icon_typ[tempIndex_2] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 set id = tempTupleSelectionResult_1 endif endif set temp_3 = this_69 set temp_4 = player_getId(p_2) set temp = id set tempIndex_3 = this_69 set temp_tempTupleSelectionResult_1_2 = Icon_realPos[tempIndex_3] set tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 set temp_2 = tempTupleSelectionResult_1_2 set tempIndex_4 = this_69 set temp_tempTupleSelectionResult_2_2 = Icon_realPos_2[tempIndex_4] set tempTupleSelectionResult_2_2 = temp_tempTupleSelectionResult_2_2 call Icon_structs_set(temp_3, temp_4, CreateDestructable(temp, temp_2, tempTupleSelectionResult_2_2, 0., Icon_scale[this_69] * 1., 1)) endif set d_2 = null endfunction function image_show_2 takes image this_69, player p_2 returns nothing if GetLocalPlayer() == p_2 then call SetImageRenderAlways(this_69, true) endif endfunction function ImageEx_showDirect takes integer this_69, player p_2 returns nothing call image_show_2(ImageEx_content[this_69], p_2) 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 Model_showDirect takes integer this_69, player p_2 returns nothing local unit temp = Model_u[this_69] local integer tempIndex = this_69 call unit_setVertexColor(temp, color_withAlpha(Model_col[tempIndex], Model_col_2[tempIndex], Model_col_3[tempIndex], 255), color_withAlpha_return_green, color_withAlpha_return_blue, color_withAlpha_return_alpha) set temp = null endfunction function char takes string s returns integer local integer a if "\\" == s then return 92 endif set a = Char_s2c[StringHash(s) / 2033480 + 1002] if s != Char_c2s[a] then return a + 32 endif return a endfunction function alloc_ImageListEntry takes nothing returns integer local integer this_69 if ImageListEntry_firstFree == 0 then set ImageListEntry_maxIndex = ImageListEntry_maxIndex + 1 set this_69 = ImageListEntry_maxIndex else set ImageListEntry_firstFree = ImageListEntry_firstFree - 1 set this_69 = ImageListEntry_nextFree[ImageListEntry_firstFree] endif set ImageListEntry_typeId[this_69] = 895 return this_69 endfunction function construct_ImageListEntry takes integer this_69, image img, integer prev returns nothing set ImageListEntry_img[this_69] = img set ImageListEntry_prev[this_69] = prev endfunction function new_ImageListEntry takes image img, integer prev returns integer local integer this_69 = alloc_ImageListEntry() call construct_ImageListEntry(this_69, img, prev) return this_69 endfunction function ImageList_add takes integer this_69, image i returns nothing set ImageList_last[this_69] = new_ImageListEntry(i, ImageList_last[this_69]) endfunction function dispatch_ImageList_add takes integer this_69, image i returns nothing if ImageList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageList.add") else call error("Called ImageList.add on invalid object.") endif endif call ImageList_add(this_69, i) endfunction function TextSplat_updateDimY takes integer this_69 returns nothing local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_2 = TextSplat_cursor_2[tempIndex] local real tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 local real temp = tempTupleSelectionResult_2 local integer tempIndex_2 = this_69 local real temp_tempTupleSelectionResult_2_2 = TextSplat_dimensions_2[tempIndex_2] local real tempTupleSelectionResult_2_2 = temp_tempTupleSelectionResult_2_2 local integer tempIndex_3 local integer tempIndex_4 local real tempTupleSelectionResult_2_3 local real temp_tempTupleSelectionResult_2_3 if temp < tempTupleSelectionResult_2_2 then set tempIndex_3 = this_69 set tempIndex_4 = this_69 set temp_tempTupleSelectionResult_2_3 = TextSplat_cursor_2[tempIndex_4] set tempTupleSelectionResult_2_3 = temp_tempTupleSelectionResult_2_3 set TextSplat_dimensions_2[tempIndex_3] = tempTupleSelectionResult_2_3 endif endfunction function dispatch_TextSplat_updateDimY takes integer this_69 returns nothing if TextSplat_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextSplat.updateDimY") else call error("Called TextSplat.updateDimY on invalid object.") endif endif call TextSplat_updateDimY(this_69) endfunction function getFontHeight takes nothing returns integer return FontArial_FONT_HEIGHT endfunction function getFontResolution takes nothing returns integer return FontArial_FONT_RESOLUTION endfunction function TextSplat_newline takes integer this_69 returns nothing local integer tempIndex = this_69 local integer tempIndex_2 = this_69 local real temp_tempTupleSelectionResult_1 = TextSplat_pos[tempIndex_2] local real tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 local integer tempIndex_3 local integer tempIndex_4 local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local integer temp set TextSplat_cursor[tempIndex] = tempTupleSelectionResult_1 set tempIndex_3 = this_69 set temp = tempIndex_3 set tempIndex_4 = this_69 set temp_tempTupleSelectionResult_2 = TextSplat_cursor_2[tempIndex_4] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set TextSplat_cursor_2[temp] = tempTupleSelectionResult_2 - TextSplat_fontSize[this_69] * getFontHeight() / getFontResolution() call dispatch_TextSplat_updateDimY(this_69) endfunction function dispatch_TextSplat_newline takes integer this_69 returns nothing if TextSplat_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextSplat.newline") else call error("Called TextSplat.newline on invalid object.") endif endif call TextSplat_newline(this_69) endfunction function TextSplat_updateDimX takes integer this_69 returns nothing local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_1 = TextSplat_cursor[tempIndex] local real tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 local real temp = tempTupleSelectionResult_1 local integer tempIndex_2 = this_69 local real temp_tempTupleSelectionResult_1_2 = TextSplat_dimensions[tempIndex_2] local real tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 local integer tempIndex_3 local integer tempIndex_4 local real tempTupleSelectionResult_1_3 local real temp_tempTupleSelectionResult_1_3 if temp > tempTupleSelectionResult_1_2 then set tempIndex_3 = this_69 set tempIndex_4 = this_69 set temp_tempTupleSelectionResult_1_3 = TextSplat_cursor[tempIndex_4] set tempTupleSelectionResult_1_3 = temp_tempTupleSelectionResult_1_3 set TextSplat_dimensions[tempIndex_3] = tempTupleSelectionResult_1_3 endif endfunction function dispatch_TextSplat_updateDimX takes integer this_69 returns nothing if TextSplat_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextSplat.updateDimX") else call error("Called TextSplat.updateDimX on invalid object.") endif endif call TextSplat_updateDimX(this_69) endfunction function char_toInt takes integer this_c returns integer return this_c endfunction function getFontPath takes integer c_c returns string return FontArial_paths[char_toInt(c_c)] endfunction function getFontWidth takes integer c_c returns integer return FontArial_widths[char_toInt(c_c)] endfunction function string_charAt takes string this_69, integer index returns string return SubString(this_69, index, index + 1) endfunction function string_length takes string this_69 returns integer return StringLength(this_69) endfunction function TextSplat_append takes integer this_69, string text, integer col_red, integer col_green, integer col_blue, integer col_alpha, player p_2 returns nothing local integer c_c local real charWidth local integer n local integer temp local image img local image receiver local integer tempIndex local real tempTupleSelectionResult_1 local real temp_tempTupleSelectionResult_1 local integer tempIndex_2 local real tempTupleSelectionResult_1_2 local real temp_tempTupleSelectionResult_1_2 local integer tempIndex_3 local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local integer tempIndex_4 local integer tempIndex_5 local real tempTupleSelectionResult_1_3 local real temp_tempTupleSelectionResult_1_3 local string temp_2 local real temp_3 local real temp_4 local real temp_5 local integer temp_6 if GetLocalPlayer() == p_2 then set n = 0 set temp = string_length(text) - 1 loop exitwhen n > temp set c_c = char(string_charAt(text, n)) set charWidth = TextSplat_fontSize[this_69] * getFontWidth(c_c) / getFontResolution() set tempIndex = this_69 set temp_tempTupleSelectionResult_1 = TextSplat_cursor[tempIndex] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 if tempTupleSelectionResult_1 + charWidth > TextSplat_maxWidth[this_69] then call dispatch_TextSplat_newline(this_69) endif if c_c != 32 then set temp_2 = getFontPath(c_c) set temp_3 = TextSplat_fontSize[this_69] set temp_4 = TextSplat_fontSize[this_69] set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_1_2 = TextSplat_cursor[tempIndex_2] set tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 set temp_5 = tempTupleSelectionResult_1_2 set tempIndex_3 = this_69 set temp_tempTupleSelectionResult_2 = TextSplat_cursor_2[tempIndex_3] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set receiver = CreateImage(temp_2, temp_3, temp_4, 0., temp_5, tempTupleSelectionResult_2, 0., 0., 0., 0., TextSplat_layer[this_69] + 1) call image_show(receiver) set img = receiver if col_alpha != TextSplat_DISABLE_COLOR_ALPHA then call image_setColor_2(img, col_red, col_green, col_blue, col_alpha) endif call dispatch_ImageList_add(TextSplat_images[this_69], img) endif set tempIndex_4 = this_69 set temp_6 = tempIndex_4 set tempIndex_5 = this_69 set temp_tempTupleSelectionResult_1_3 = TextSplat_cursor[tempIndex_5] set tempTupleSelectionResult_1_3 = temp_tempTupleSelectionResult_1_3 set TextSplat_cursor[temp_6] = tempTupleSelectionResult_1_3 + charWidth call dispatch_TextSplat_updateDimX(this_69) set n = n + 1 endloop endif set img = null set receiver = null endfunction function dispatch_TextSplat_append takes integer this_69, string text, integer col_red, integer col_green, integer col_blue, integer col_alpha, player p_2 returns nothing if TextSplat_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextSplat.append") else call error("Called TextSplat.append on invalid object.") endif endif call TextSplat_append(this_69, text, col_red, col_green, col_blue, col_alpha, p_2) endfunction function ImageListEntry_onDestroy takes integer this_69 returns nothing endfunction function dealloc_ImageListEntry takes integer obj returns nothing if ImageListEntry_typeId[obj] == 0 then call error("Double free: object of type ImageListEntry") else set ImageListEntry_nextFree[ImageListEntry_firstFree] = obj set ImageListEntry_firstFree = ImageListEntry_firstFree + 1 set ImageListEntry_typeId[obj] = 0 endif endfunction function destroyImageListEntry takes integer this_69 returns nothing call ImageListEntry_onDestroy(this_69) call dealloc_ImageListEntry(this_69) endfunction function dispatch_ImageListEntry_destroyImageListEntry takes integer this_69 returns nothing if ImageListEntry_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageListEntry.destroyImageListEntry") else call error("Called ImageListEntry.destroyImageListEntry on invalid object.") endif endif call destroyImageListEntry(this_69) endfunction function image_remove takes image this_69 returns nothing if this_69 != null then call DestroyImage(this_69) else call error("Nullpointer exeption by destroying an image") endif endfunction function ImageList_eraseAll takes integer this_69 returns nothing local integer e = ImageList_last[this_69] loop exitwhen not (e != 0) call image_remove(ImageListEntry_img[e]) call dispatch_ImageListEntry_destroyImageListEntry(e) set e = ImageListEntry_prev[e] endloop set ImageList_last[this_69] = 0 endfunction function dispatch_ImageList_eraseAll takes integer this_69 returns nothing if ImageList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageList.eraseAll") else call error("Called ImageList.eraseAll on invalid object.") endif endif call ImageList_eraseAll(this_69) endfunction function TextSplat_clear takes integer this_69, player p_2 returns nothing local integer tempIndex local integer tempIndex_2 local real tempTupleSelectionResult_1 local real temp_tempTupleSelectionResult_1 local integer tempIndex_3 local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local integer tempIndex_4 local integer tempIndex_5 local integer temp local integer temp_2 if GetLocalPlayer() == p_2 then call dispatch_ImageList_eraseAll(TextSplat_images[this_69]) set tempIndex = this_69 set temp = tempIndex set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_1 = TextSplat_pos[tempIndex_2] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 set TextSplat_cursor[temp] = tempTupleSelectionResult_1 set temp_2 = tempIndex set tempIndex_3 = this_69 set temp_tempTupleSelectionResult_2 = TextSplat_pos_2[tempIndex_3] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set TextSplat_cursor_2[temp_2] = tempTupleSelectionResult_2 - TextSplat_fontSize[this_69] set tempIndex_4 = this_69 set tempIndex_5 = this_69 set TextSplat_dimensions[tempIndex_4] = TextSplat_pos[tempIndex_5] set TextSplat_dimensions_2[tempIndex_4] = TextSplat_pos_2[tempIndex_5] endif endfunction function dispatch_TextSplat_clear takes integer this_69, player p_2 returns nothing if TextSplat_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextSplat.clear") else call error("Called TextSplat.clear on invalid object.") endif endif call TextSplat_clear(this_69, p_2) endfunction function TextBox_showDirect takes integer this_69, player p_2 returns nothing local integer tempIndex local integer temp local string temp_2 call dispatch_TextSplat_clear(TextBox_splat[this_69], p_2) set temp = TextBox_splat[this_69] set temp_2 = TextBox_content[this_69] set tempIndex = this_69 call dispatch_TextSplat_append(temp, temp_2, color_withAlpha(TextBox_col[tempIndex], TextBox_col_2[tempIndex], TextBox_col_3[tempIndex], 255), color_withAlpha_return_green, color_withAlpha_return_blue, color_withAlpha_return_alpha, p_2) endfunction function ImageIterator_onDestroy takes integer this_69 returns nothing endfunction function dealloc_ImageIterator takes integer obj returns nothing if ImageIterator_typeId[obj] == 0 then call error("Double free: object of type ImageIterator") else set ImageIterator_nextFree[ImageIterator_firstFree] = obj set ImageIterator_firstFree = ImageIterator_firstFree + 1 set ImageIterator_typeId[obj] = 0 endif endfunction function destroyImageIterator takes integer this_69 returns nothing call ImageIterator_onDestroy(this_69) call dealloc_ImageIterator(this_69) endfunction function dispatch_ImageIterator_destroyImageIterator takes integer this_69 returns nothing if ImageIterator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageIterator.destroyImageIterator") else call error("Called ImageIterator.destroyImageIterator on invalid object.") endif endif call destroyImageIterator(this_69) endfunction function ImageIterator_close takes integer this_69 returns nothing call dispatch_ImageIterator_destroyImageIterator(this_69) endfunction function dispatch_ImageIterator_close takes integer this_69 returns nothing if ImageIterator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageIterator.close") else call error("Called ImageIterator.close on invalid object.") endif endif call ImageIterator_close(this_69) endfunction function ImageIterator_hasNext takes integer this_69 returns boolean return ImageIterator_pos[this_69] != 0 endfunction function dispatch_ImageIterator_hasNext takes integer this_69 returns boolean local boolean hasNext_result if ImageIterator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageIterator.hasNext") else call error("Called ImageIterator.hasNext on invalid object.") endif endif set hasNext_result = ImageIterator_hasNext(this_69) return hasNext_result endfunction function ImageIterator_next takes integer this_69 returns image local image img = ListImage_img[ImageIterator_pos[this_69]] set ImageIterator_pos[this_69] = ListImage_next[ImageIterator_pos[this_69]] set ImageIterator_nexttempReturn = img set img = null return ImageIterator_nexttempReturn endfunction function dispatch_ImageIterator_next takes integer this_69 returns image local image next_result if ImageIterator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageIterator.next") else call error("Called ImageIterator.next on invalid object.") endif endif set next_result = ImageIterator_next(this_69) set dispatch_ImageIterator_nexttempReturn = next_result set next_result = null return dispatch_ImageIterator_nexttempReturn endfunction function alloc_ImageIterator takes nothing returns integer local integer this_69 if ImageIterator_firstFree == 0 then set ImageIterator_maxIndex = ImageIterator_maxIndex + 1 set this_69 = ImageIterator_maxIndex else set ImageIterator_firstFree = ImageIterator_firstFree - 1 set this_69 = ImageIterator_nextFree[ImageIterator_firstFree] endif set ImageIterator_typeId[this_69] = 900 return this_69 endfunction function construct_ImageIterator takes integer this_69, integer start returns nothing set ImageIterator_pos[this_69] = start endfunction function new_ImageIterator takes integer start returns integer local integer this_69 = alloc_ImageIterator() call construct_ImageIterator(this_69, start) return this_69 endfunction function ImageList_iterator takes integer this_69 returns integer return new_ImageIterator(ImageList_first[this_69]) endfunction function dispatch_ImageList_iterator takes integer this_69 returns integer local integer iterator_result if ImageList_typeId_2[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageList.iterator") else call error("Called ImageList.iterator on invalid object.") endif endif set iterator_result = ImageList_iterator(this_69) return iterator_result endfunction function TextSplat_append_2 takes integer this_69, string text, player p_2 returns nothing call dispatch_TextSplat_append(this_69, text, 0, 0, 0, TextSplat_DISABLE_COLOR_ALPHA, p_2) endfunction function dispatch_TextSplat_append_2 takes integer this_69, string text, player p_2 returns nothing if TextSplat_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextSplat.append") else call error("Called TextSplat.append on invalid object.") endif endif call TextSplat_append_2(this_69, text, p_2) endfunction function cyc_cyc_dispatch_Widget_showDirect takes integer funcChoice, integer funcChoice_2, integer this_69, player p_2 returns nothing local integer wurst__iterator1 local image img local integer wurst__iterator2 local integer w_2 if funcChoice == 0 then if funcChoice_2 == 0 then if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Widget.showDirect") else call error("Called Widget.showDirect on invalid object.") endif endif if Widget_typeId[this_69] <= 876 then if Widget_typeId[this_69] <= 874 then if Widget_typeId[this_69] <= 873 then call cyc_cyc_dispatch_Widget_showDirect(0, 1, this_69, p_2) else call Tooltip_showDirect(this_69, p_2) endif elseif Widget_typeId[this_69] <= 875 then call Model_showDirect(this_69, p_2) else call Icon_showDirect(this_69, p_2) endif elseif Widget_typeId[this_69] <= 878 then if Widget_typeId[this_69] <= 877 then call cyc_cyc_dispatch_Widget_showDirect(2, this_69, 0, p_2) else call cyc_cyc_dispatch_Widget_showDirect(1, this_69, 0, p_2) endif elseif Widget_typeId[this_69] <= 879 then call TextBox_showDirect(this_69, p_2) else call ImageEx_showDirect(this_69, p_2) endif elseif funcChoice_2 == 1 then if GetLocalPlayer() == p_2 then set wurst__iterator1 = dispatch_ImageList_iterator(Pane_list[this_69]) loop exitwhen not dispatch_ImageIterator_hasNext(wurst__iterator1) set img = dispatch_ImageIterator_next(wurst__iterator1) call image_show(img) endloop call dispatch_ImageIterator_close(wurst__iterator1) set wurst__iterator2 = dispatch_LinkedList_iterator(Pane_content[this_69]) loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator2) set w_2 = dispatch_LLIterator_next(wurst__iterator2) call cyc_cyc_dispatch_Widget_showDirect(0, 0, w_2, p_2) endloop call dispatch_LLIterator_close(wurst__iterator2) endif endif elseif funcChoice == 1 then call dispatch_TextSplat_append_2(Button_splat[funcChoice_2], Button_name[funcChoice_2], p_2) call cyc_cyc_dispatch_Widget_showDirect(2, funcChoice_2, 0, p_2) elseif funcChoice == 2 then call cyc_cyc_dispatch_Widget_showDirect(0, 0, Observable_content[funcChoice_2], p_2) endif set img = null endfunction function Window_showContent takes integer this_69, player p_2 returns nothing local integer wurst__iterator0 = dispatch_LinkedList_iterator(Window_content[this_69]) local integer g loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator0) set g = dispatch_LLIterator_next(wurst__iterator0) call cyc_cyc_dispatch_Widget_showDirect(0, 0, g, p_2) endloop call dispatch_LLIterator_close(wurst__iterator0) endfunction function dispatch_Window_showContent takes integer this_69, player p_2 returns nothing if Window_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Window.showContent") else call error("Called Window.showContent on invalid object.") endif endif call Window_showContent(this_69, p_2) endfunction function playerToIndex takes player object returns integer return handle_getHandleId(object) endfunction function WindowManager_openWindow takes integer w_2, player p_2 returns nothing call dispatch_HashMap_put(Window_wantToClose[w_2], playerToIndex(p_2), booleanToIndex(false)) call dispatch_Window_showContent(w_2, p_2) call dispatch_Stack_push(WindowManager_currentWindow[GetPlayerId(p_2)], w_2) endfunction function afterPreload takes nothing returns nothing call WindowManager_openWindow(GameStart_shopWindow, Player(0)) endfunction function closure_impl_46 takes integer this_69, integer i returns nothing call afterPreload() endfunction function Action_onDestroy takes integer this_69 returns nothing if Event_first[Action_ev[this_69]] != this_69 then set Action_next[Action_prev[this_69]] = Action_next[this_69] else set Event_first[Action_ev[this_69]] = Action_next[this_69] endif if Event_last[Action_ev[this_69]] != this_69 then set Action_prev[Action_next[this_69]] = Action_prev[this_69] else set Event_last[Action_ev[this_69]] = Action_prev[this_69] endif endfunction function dealloc_Action takes integer obj returns nothing if Action_typeId[obj] == 0 then call error("Double free: object of type Action") else set Action_nextFree[Action_firstFree] = obj set Action_firstFree = Action_firstFree + 1 set Action_typeId[obj] = 0 endif endfunction function destroyAction takes integer this_69 returns nothing call Action_onDestroy(this_69) call dealloc_Action(this_69) endfunction function dispatch_Action_destroyAction takes integer this_69 returns nothing if Action_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Action.destroyAction") else call error("Called Action.destroyAction on invalid object.") endif endif call destroyAction(this_69) endfunction function unit_setOwner takes unit this_69, player p_2, boolean changeColor returns nothing call SetUnitOwner(this_69, p_2, changeColor) endfunction function InstantDummyCaster_finish takes nothing returns nothing local unit receiver = InstantDummyCaster_caster local unit receiver_2 call unit_setOwner(receiver, Basics_DUMMY_PLAYER, false) set receiver_2 = receiver call unit_removeAbility(receiver_2, InstantDummyCaster_id) set receiver = null set receiver_2 = null endfunction function unit_setAbilityLevel takes unit this_69, integer abilId, integer lvl returns nothing call SetUnitAbilityLevel(this_69, abilId, lvl) endfunction function InstantDummyCaster_prepare takes player owner, integer lvl returns nothing call unit_addAbility(InstantDummyCaster_caster, InstantDummyCaster_id) if lvl > 1 then call unit_setAbilityLevel(InstantDummyCaster_caster, InstantDummyCaster_id, lvl) endif if owner != null then call unit_setOwner(InstantDummyCaster_caster, owner, false) endif endfunction function unit_issueTargetOrderById takes unit this_69, integer id, widget target returns boolean return IssueTargetOrderById(this_69, id, target) endfunction function unit_setXY takes unit this_69, real x, real y returns nothing call SetUnitX(this_69, x) call SetUnitY(this_69, y) endfunction function InstantDummyCaster_castTarget takes player owner, integer abilityId, integer lvl, string order, widget target returns boolean local boolean b_2 set InstantDummyCaster_id = abilityId call InstantDummyCaster_prepare(owner, lvl) call unit_setXY(InstantDummyCaster_caster, GetWidgetX(target), GetWidgetY(target)) set b_2 = unit_issueTargetOrderById(InstantDummyCaster_caster, OrderId(order), target) call InstantDummyCaster_finish() return b_2 endfunction function Hero_enableAutoAttack takes integer this_69, boolean enable returns nothing if not enable then call InstantDummyCaster_castTarget(Basics_DUMMY_PLAYER, 1852793204, 1, "thunderbolt", Unit_u[this_69]) else call unit_removeAbility(Unit_u[this_69], 1937008741) endif endfunction function dispatch_Hero_enableAutoAttack takes integer this_69, boolean enable returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.enableAutoAttack") else call error("Called Hero.enableAutoAttack on invalid object.") endif endif call Hero_enableAutoAttack(this_69, enable) endfunction function HeroType_getStandAnimationIndex takes integer this_69 returns integer local integer tempIndex = this_69 local integer temp_tempTupleSelectionResult_1 = HeroType_standAnimationIndex[tempIndex] local integer tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_HeroType_getStandAnimationIndex takes integer this_69 returns integer local integer getStandAnimationIndex_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.getStandAnimationIndex") else call error("Called HeroType.getStandAnimationIndex on invalid object.") endif endif set getStandAnimationIndex_result = HeroType_getStandAnimationIndex(this_69) return getStandAnimationIndex_result endfunction function unit_setTimeScale takes unit this_69, real scale returns nothing call SetUnitTimeScale(this_69, scale) endfunction function Hero_stopAnimation takes integer this_69 returns nothing if not Hero_playsAnimation[this_69] then call error("No animation to stop") endif set Hero_playsAnimation[this_69] = false call unit_setTimeScale(Unit_u[this_69], 1.) call SetUnitAnimationByIndex(Unit_u[this_69], dispatch_HeroType_getStandAnimationIndex(Hero_htyp[this_69])) endfunction function dispatch_Hero_stopAnimation takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.stopAnimation") else call error("Called Hero.stopAnimation on invalid object.") endif endif call Hero_stopAnimation(this_69) endfunction function ControlPoint_stopCapture takes integer this_69, integer h_2 returns nothing call dispatch_Hero_enableAutoAttack(h_2, true) call dispatch_Hero_stopAnimation(h_2) endfunction function dispatch_ControlPoint_stopCapture takes integer this_69, integer h_2 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.stopCapture") else call error("Called ControlPoint.stopCapture on invalid object.") endif endif call ControlPoint_stopCapture(this_69, h_2) endfunction function group_contains takes group this_69, unit u_2 returns boolean return IsUnitInGroup(u_2, this_69) endfunction function closure_impl_47 takes integer this_69, integer cp returns nothing if cp != this_5[this_69] then set CaptureData_wantCapture[data[this_69]] = false if group_contains(ControlPoint_inRange[this_5[this_69]], Unit_u[h[this_69]]) then call dispatch_ControlPoint_stopCapture(this_5[this_69], h[this_69]) endif call dispatch_Action_destroyAction(CaptureData_captureCancel[data[this_69]]) set CaptureData_captureCancel[data[this_69]] = 0 endif endfunction function CaptureData_onDestroy takes integer this_69 returns nothing call lightning_destr(CaptureData_l1[this_69]) call lightning_destr(CaptureData_l2[this_69]) if CaptureData_onDeath[this_69] != 0 then call dispatch_Action_destroyAction(CaptureData_onDeath[this_69]) endif if CaptureData_fx[this_69] != 0 then call dispatch_Fx_destroyFx(CaptureData_fx[this_69]) endif endfunction function dealloc_CaptureData takes integer obj returns nothing if CaptureData_typeId[obj] == 0 then call error("Double free: object of type CaptureData") else set CaptureData_nextFree[CaptureData_firstFree] = obj set CaptureData_firstFree = CaptureData_firstFree + 1 set CaptureData_typeId[obj] = 0 endif endfunction function destroyCaptureData takes integer this_69 returns nothing call CaptureData_onDestroy(this_69) call dealloc_CaptureData(this_69) endfunction function dispatch_CaptureData_destroyCaptureData takes integer this_69 returns nothing if CaptureData_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CaptureData.destroyCaptureData") else call error("Called CaptureData.destroyCaptureData on invalid object.") endif endif call destroyCaptureData(this_69) endfunction function closure_impl_48 takes integer this_69, integer u_2 returns nothing call dispatch_CaptureData_destroyCaptureData(dispatch_HashMap_get(ControlPoint_captureData, u_2)) endfunction function group_removeUnit takes group this_69, unit u_2 returns nothing call GroupRemoveUnit(this_69, u_2) endfunction function ControlPoint_leave takes integer this_69, integer u_2 returns nothing local integer data_2 call group_removeUnit(ControlPoint_inRange[this_69], Unit_u[u_2]) set data_2 = dispatch_HashMap_get(ControlPoint_captureData, u_2) if Unit_team[u_2] != ControlPoint_owner[this_69] then call lightning_destr(CaptureData_l1[data_2]) set CaptureData_l1[data_2] = null call dispatch_Fx_destroyFx(CaptureData_fx[data_2]) set CaptureData_fx[data_2] = 0 if CaptureData_l2[data_2] != null then call lightning_destr(CaptureData_l2[data_2]) set CaptureData_l2[data_2] = null set CaptureData_blitzPos[data_2] = 0. endif if CaptureData_wantCapture[data_2] then call dispatch_ControlPoint_stopCapture(this_69, u_2) endif if CaptureData_captureCancel[data_2] != 0 then call dispatch_Action_destroyAction(CaptureData_captureCancel[data_2]) set CaptureData_captureCancel[data_2] = 0 endif endif call dispatch_Action_destroyAction(CaptureData_onDeath[data_2]) set CaptureData_onDeath[data_2] = 0 endfunction function dispatch_ControlPoint_leave takes integer this_69, integer u_2 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.leave") else call error("Called ControlPoint.leave on invalid object.") endif endif call ControlPoint_leave(this_69, u_2) endfunction function closure_impl_49 takes integer this_69, integer u_2 returns nothing call dispatch_ControlPoint_leave(this_4[this_69], Units_target[u_2]) endfunction function alloc_CaptureData takes nothing returns integer local integer this_69 if CaptureData_firstFree == 0 then set CaptureData_maxIndex = CaptureData_maxIndex + 1 set this_69 = CaptureData_maxIndex else set CaptureData_firstFree = CaptureData_firstFree - 1 set this_69 = CaptureData_nextFree[CaptureData_firstFree] endif set CaptureData_typeId[this_69] = 780 return this_69 endfunction function construct_CaptureData takes integer this_69, integer u_2 returns nothing set CaptureData_l1[this_69] = null set CaptureData_l2[this_69] = null set CaptureData_blitzPos[this_69] = 0. set CaptureData_wantCapture[this_69] = false set CaptureData_onDeath[this_69] = 0 set CaptureData_captureCancel[this_69] = 0 set CaptureData_fx[this_69] = 0 endfunction function new_CaptureData takes integer u_2 returns integer local integer this_69 = alloc_CaptureData() call construct_CaptureData(this_69, u_2) return this_69 endfunction function closure_impl_50 takes integer this_69, integer u_2 returns nothing call dispatch_HashMap_put(ControlPoint_captureData, u_2, new_CaptureData(u_2)) endfunction function LinkedListModule_remove takes integer this_69 returns nothing set LinkedListModule_size = LinkedListModule_size - 1 if this_69 != LinkedListModule_first then set LinkedListModule_next[LinkedListModule_prev[this_69]] = LinkedListModule_next[this_69] else set LinkedListModule_first = LinkedListModule_next[this_69] endif if this_69 != LinkedListModule_last then set LinkedListModule_prev[LinkedListModule_next[this_69]] = LinkedListModule_prev[this_69] else set LinkedListModule_last = LinkedListModule_prev[this_69] endif endfunction function dispatch_Dot_remove takes integer this_69 returns nothing if Dot_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Dot.remove") else call error("Called Dot.remove on invalid object.") endif endif call LinkedListModule_remove(this_69) endfunction function Dot_onDestroy takes integer this_69 returns nothing call dispatch_Action_destroyAction(Dot_a[this_69]) call timer_release(Dot_t[this_69]) call dispatch_LinkedList_remove(Unit_allDots[Dot_u[this_69]], this_69) call dispatch_Dot_remove(this_69) endfunction function dealloc_Dot takes integer obj returns nothing if Dot_typeId[obj] == 0 then call error("Double free: object of type Dot") else set Dot_firstFree = Dot_firstFree + 1 set Dot_typeId[obj] = 0 endif endfunction function destroyDot takes integer this_69 returns nothing call Dot_onDestroy(this_69) call dealloc_Dot(this_69) endfunction function dispatch_Dot_destroyDot takes integer this_69 returns nothing if Dot_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Dot.destroyDot") else call error("Called Dot.destroyDot on invalid object.") endif endif call destroyDot(this_69) endfunction function closure_impl_51 takes integer this_69, integer data_2 returns nothing call dispatch_Dot_destroyDot(this_2[this_69]) endfunction function Buff_onDestroy takes integer this_69 returns nothing local integer tempIndex local integer tempTupleSelectionResult_1 local integer temp_tempTupleSelectionResult_1 local integer tempIndex_2 local integer tempTupleSelectionResult_2 local integer temp_tempTupleSelectionResult_2 local unit temp local unit temp_2 call dispatch_Action_destroyAction(Buff_action[this_69]) call timer_release(Buff_t[this_69]) call dispatch_LinkedList_remove(Unit_allBuffs[Buff_u[this_69]], this_69) if Buff_fxTimer[this_69] != null then call timer_release(Buff_fxTimer[this_69]) endif set temp = Unit_u[Buff_u[this_69]] set tempIndex = this_69 set temp_tempTupleSelectionResult_1 = Buff_btyp[tempIndex] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 call UnitRemoveAbility(temp, tempTupleSelectionResult_1) set temp_2 = Unit_u[Buff_u[this_69]] set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_2 = Buff_btyp_2[tempIndex_2] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 call UnitRemoveAbility(temp_2, tempTupleSelectionResult_2) if Buff_bon[this_69] != 0 then call dispatch_Bonus_destroyBonus(Buff_bon[this_69]) endif if Buff_fx[this_69] != null then call DestroyEffect(Buff_fx[this_69]) endif set temp = null set temp_2 = null endfunction function dealloc_Buff takes integer obj returns nothing if Buff_typeId[obj] == 0 then call error("Double free: object of type Buff") else set Buff_firstFree = Buff_firstFree + 1 set Buff_typeId[obj] = 0 endif endfunction function destroyBuff takes integer this_69 returns nothing call Buff_onDestroy(this_69) call dealloc_Buff(this_69) endfunction function dispatch_Buff_destroyBuff takes integer this_69 returns nothing if Buff_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Buff.destroyBuff") else call error("Called Buff.destroyBuff on invalid object.") endif endif call destroyBuff(this_69) endfunction function closure_impl_52 takes integer this_69, integer data_2 returns nothing call dispatch_Buff_destroyBuff(this_3[this_69]) endfunction function alloc_Closure_4 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 720 return this_69 endfunction function printError takes string msg returns nothing call DisplayTimedTextToPlayer(GetLocalPlayer(), 0., 0., PrintingHelper_DEBUG_MSG_DURATION, "|cffFF0000[ERROR]|r - " + msg) endfunction function Unit_bonusMovespeedTimed takes integer this_69, real amount_51, real duration returns nothing local integer clVar local real temp if duration >= 180. then call printError("Timed Bonis has to be shorter than 180 sec") return endif set Unit_bonusMovespeed[this_69] = Unit_bonusMovespeed[this_69] + amount_51 call dispatch_Unit_updateMovespeed(this_69) set temp = duration set clVar = alloc_Closure_4() set this_42[clVar] = this_69 set amount_32[clVar] = amount_51 call doAfter(temp, clVar) endfunction function dispatch_Unit_bonusMovespeedTimed takes integer this_69, real amount_51, real duration returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.bonusMovespeedTimed") else call error("Called Unit.bonusMovespeedTimed on invalid object.") endif endif call Unit_bonusMovespeedTimed(this_69, amount_51, duration) endfunction function closure_impl_53 takes integer this_69, integer data_2 returns nothing call dispatch_Unit_bonusMovespeedTimed(OnDamageData_source[data_2], -50., 1.) call dispatch_Action_destroyAction(Unit_action[this_61[this_69]]) endfunction function dispatch_Action_fire takes integer this_69, integer d_2 returns nothing if Action_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Action.fire") else call error("Called Action.fire on invalid object.") endif endif if Action_typeId[this_69] <= 691 then if Action_typeId[this_69] <= 689 then if Action_typeId[this_69] <= 688 then call closure_impl_52(this_69, d_2) else call closure_impl_49(this_69, d_2) endif elseif Action_typeId[this_69] <= 690 then call closure_impl_50(this_69, d_2) else call closure_impl_47(this_69, d_2) endif elseif Action_typeId[this_69] <= 693 then if Action_typeId[this_69] <= 692 then call closure_impl_48(this_69, d_2) else call closure_impl_53(this_69, d_2) endif elseif Action_typeId[this_69] <= 694 then call closure_impl_51(this_69, d_2) else call closure_impl_46(this_69, d_2) endif endfunction function Event_stop takes integer this_69, integer d_2 returns boolean return false endfunction function OnDamageEvent_stop takes integer this_69, integer data_2 returns boolean return OnDamageData_stop[data_2] endfunction function SpellEvent_stop takes integer this_69, integer data_2 returns boolean return not SpellData_spellSuccess[data_2] endfunction function dispatch_Event_stop takes integer this_69, integer d_2 returns boolean local boolean stop_result if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Event.stop") else call error("Called Event.stop on invalid object.") endif endif if Event_typeId[this_69] <= 681 then if Event_typeId[this_69] <= 680 then set stop_result = Event_stop(this_69, d_2) else set stop_result = SpellEvent_stop(this_69, d_2) endif elseif Event_typeId[this_69] <= 682 then set stop_result = OnDamageEvent_stop(this_69, d_2) else set stop_result = Event_stop(this_69, d_2) endif return stop_result endfunction function Event_callActions takes integer this_69, integer d_2 returns nothing local integer buffer = Event_first[this_69] local integer temp if Event_checkData[this_69] then loop exitwhen not (buffer != 0) if dispatch_Event_stop(this_69, d_2) then return endif call dispatch_Action_fire(buffer, d_2) set buffer = Action_next[buffer] endloop else loop exitwhen not (buffer != 0) set temp = buffer set buffer = Action_next[buffer] call dispatch_Action_fire(temp, d_2) endloop endif endfunction function dispatch_Event_callActions takes integer this_69, integer d_2 returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Event.callActions") else call error("Called Event.callActions on invalid object.") endif endif call Event_callActions(this_69, d_2) endfunction function construct_Unit_CreationEvent takes integer this_69 returns nothing call dispatch_Event_callActions(CreationEvent_create, this_69) endfunction function int_toString takes integer this_69 returns string return I2S(this_69) endfunction function multiboard_getItem takes multiboard this_69, integer row, integer column returns multiboarditem return MultiboardGetItem(this_69, row, column) endfunction function multiboarditem_release takes multiboarditem this_69 returns nothing call MultiboardReleaseItem(this_69) endfunction function multiboarditem_setValue takes multiboarditem this_69, string value returns nothing call MultiboardSetItemValue(this_69, value) endfunction function construct_Unit_ShowInstances takes integer this_69 returns nothing local multiboarditem mbi local multiboarditem receiver set InstanceBoard_count[ShowInstances_classId_2] = InstanceBoard_count[ShowInstances_classId_2] + 1 set mbi = multiboard_getItem(InstanceBoard_mb, ShowInstances_classId_2, 1) set receiver = mbi call multiboarditem_setValue(receiver, int_toString(InstanceBoard_count[ShowInstances_classId_2])) call multiboarditem_release(receiver) set mbi = null set receiver = null endfunction function hashtable_saveReal takes hashtable this_69, integer parentKey, integer childKey, real value returns nothing call SaveReal(this_69, parentKey, childKey, value) endfunction function Table_saveReal takes integer this_69, integer parentKey, real value returns nothing call hashtable_saveReal(Table_ht, this_69, parentKey, value) endfunction function dispatch_Table_saveReal takes integer this_69, integer parentKey, real value returns nothing if Table_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Table.saveReal") else call error("Called Table.saveReal on invalid object.") endif endif call Table_saveReal(this_69, parentKey, value) endfunction function UnitType_getArmor takes integer this_69 returns integer local integer tempIndex = this_69 local integer temp_tempTupleSelectionResult_1 = UnitType_armor[tempIndex] local integer tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_UnitType_getArmor takes integer this_69 returns integer local integer getArmor_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.getArmor") else call error("Called UnitType.getArmor on invalid object.") endif endif set getArmor_result = UnitType_getArmor(this_69) return getArmor_result endfunction function UnitType_getBounty takes integer this_69 returns integer local integer tempIndex = this_69 local integer temp_tempTupleSelectionResult_1 = UnitType_bounty[tempIndex] local integer tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_UnitType_getBounty takes integer this_69 returns integer local integer getBounty_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.getBounty") else call error("Called UnitType.getBounty on invalid object.") endif endif set getBounty_result = UnitType_getBounty(this_69) return getBounty_result endfunction function UnitType_getHeight takes integer this_69 returns real local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_1 = UnitType_height[tempIndex] local real tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_UnitType_getHeight takes integer this_69 returns real local real getHeight_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.getHeight") else call error("Called UnitType.getHeight on invalid object.") endif endif set getHeight_result = UnitType_getHeight(this_69) return getHeight_result endfunction function UnitType_getMass takes integer this_69 returns real local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_1 = UnitType_mass[tempIndex] local real tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_UnitType_getMass takes integer this_69 returns real local real getMass_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.getMass") else call error("Called UnitType.getMass on invalid object.") endif endif set getMass_result = UnitType_getMass(this_69) return getMass_result endfunction function UnitType_getRadius takes integer this_69 returns real local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_1 = UnitType_radius[tempIndex] local real tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_UnitType_getRadius takes integer this_69 returns real local real getRadius_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.getRadius") else call error("Called UnitType.getRadius on invalid object.") endif endif set getRadius_result = UnitType_getRadius(this_69) return getRadius_result endfunction function getUnitType takes string name returns integer return dispatch_HashMap_get(UnitTypes_unitTypes, StringHash(name)) endfunction function alloc_ShieldList takes nothing returns integer local integer this_69 if ShieldList_firstFree == 0 then set ShieldList_maxIndex = ShieldList_maxIndex + 1 set this_69 = ShieldList_maxIndex else set ShieldList_firstFree = ShieldList_firstFree - 1 set this_69 = ShieldList_nextFree[ShieldList_firstFree] endif set ShieldList_typeId[this_69] = 767 return this_69 endfunction function construct_ShieldList takes integer this_69 returns nothing set ShieldList_first[this_69] = 0 set ShieldList_last[this_69] = 0 set ShieldList_shieldSum[this_69] = 0. endfunction function new_ShieldList takes nothing returns integer local integer this_69 = alloc_ShieldList() call construct_ShieldList(this_69) return this_69 endfunction function alloc_Table takes nothing returns integer local integer this_69 if Table_firstFree == 0 then set Table_maxIndex = Table_maxIndex + 1 set this_69 = Table_maxIndex else set Table_firstFree = Table_firstFree - 1 set this_69 = Table_nextFree[Table_firstFree] endif set Table_typeId[this_69] = 35 return this_69 endfunction function construct_Table takes integer this_69 returns nothing endfunction function new_Table takes nothing returns integer local integer this_69 = alloc_Table() call construct_Table(this_69) return this_69 endfunction function nullTimer takes integer cb returns nothing call doAfter(0., cb) endfunction function trigger_registerUnitEvent takes trigger this_69, unit whichUnit, unitevent whichEvent returns nothing call TriggerRegisterUnitEvent(this_69, whichUnit, whichEvent) endfunction function unit_getMoveSpeed takes unit this_69 returns real return GetUnitMoveSpeed(this_69) endfunction function construct_Unit takes integer this_69, string typName, real pos_x, real pos_y, player owner returns nothing local integer clVar local integer i set Unit_attack[this_69] = 0. set Unit_bonusAttack[this_69] = 0. set Unit_bonusAttackPer[this_69] = 0. set Unit_armor[this_69] = 0. set Unit_bonusArmor[this_69] = 0. set Unit_bonusArmorPer[this_69] = 0. set Unit_life[this_69] = 0. set Unit_bonusLife[this_69] = 0. set Unit_bonusLifePer[this_69] = 0. set Unit_mana[this_69] = 0. set Unit_bonusMana[this_69] = 0. set Unit_bonusManaPer[this_69] = 0. set Unit_lifeReg[this_69] = 0. set Unit_bonusLifeReg[this_69] = 0. set Unit_bonusLifeRegPer[this_69] = 0. set Unit_manaReg[this_69] = 0. set Unit_bonusManaReg[this_69] = 0. set Unit_bonusManaRegPer[this_69] = 0. set Unit_bonusAttackspeed[this_69] = 0. set Unit_spellpower[this_69] = 0. set Unit_spellpowerPer[this_69] = 0. set Unit_movespeed[this_69] = 0. set Unit_bonusMovespeed[this_69] = 0. set Unit_bonusMovespeedPer[this_69] = 0. set Unit_magicReduction[this_69] = 0. set Unit_normalReduction[this_69] = 0. set Unit_bonusResistance[this_69] = 0. set Unit_bonusResistancePer[this_69] = 0. set Unit_hitchance[this_69] = 97. set Unit_evade[this_69] = 3. set Unit_critchance[this_69] = 5. set Unit_critdamage[this_69] = 0. set Unit_bonusDamage[this_69] = 0. set Unit_normalDeflection[this_69] = 0. set Unit_lifesteal[this_69] = 0. set Unit_spellVamp[this_69] = 0. set Unit_vunerable[this_69] = true set Unit_lastHeroDamager[this_69] = 0 set Unit_mass[this_69] = 0. set Unit_radius[this_69] = 0. set Unit_height[this_69] = 0. set Unit_hasKnockback[this_69] = false set Unit_isHero[this_69] = false set Unit_isDead[this_69] = false set Unit_bounty[this_69] = 0 set Unit_ownerId[this_69] = 0 set Unit_owner[this_69] = null set Unit_damageTT[this_69] = 0 set Unit_healTT[this_69] = 0 set Unit_dotTT[this_69] = 0 set Unit_systemDamage[this_69] = 0. set Unit_totalDamage[this_69] = 0. set Unit_playerDamage[this_69] = new_Table() set Unit_allDots[this_69] = new_LinkedList() set Unit_allBuffs[this_69] = new_LinkedList() set Unit_takeHitPre[this_69] = 0 set Unit_takeHitOn[this_69] = 0 set Unit_causeHitPre[this_69] = 0 set Unit_causeHitOn[this_69] = 0 set Unit_takeCritHitOn[this_69] = 0 set Unit_causeCritHitOn[this_69] = 0 set Unit_onDodge[this_69] = 0 set Unit_onMiss[this_69] = 0 set Unit_onDeath[this_69] = 0 set Unit_causeDeath[this_69] = 0 call construct_Unit_ShowInstances(this_69) call construct_Unit_CreationEvent(this_69) set Unit_typ[this_69] = getUnitType(typName) if player_getId(owner) > 5 then set Unit_team[this_69] = 0 else set Unit_team[this_69] = 1 endif set Unit_u[this_69] = CreateUnit(owner, UnitType_id[Unit_typ[this_69]], pos_x, pos_y, 0.) set Unit_mass[this_69] = dispatch_UnitType_getMass(Unit_typ[this_69]) set clVar = alloc_Closure_3() set this_63[clVar] = this_69 call nullTimer(clVar) set Unit_radius[this_69] = dispatch_UnitType_getRadius(Unit_typ[this_69]) set Unit_height[this_69] = dispatch_UnitType_getHeight(Unit_typ[this_69]) set Unit_bounty[this_69] = dispatch_UnitType_getBounty(Unit_typ[this_69]) set Unit_ownerId[this_69] = player_getId(owner) set Unit_owner[this_69] = owner set Unit_life[this_69] = unit_getState(Unit_u[this_69], UNIT_STATE_MAX_LIFE) set Unit_mana[this_69] = unit_getState(Unit_u[this_69], UNIT_STATE_MAX_MANA) set Unit_movespeed[this_69] = unit_getMoveSpeed(Unit_u[this_69]) set Unit_armor[this_69] = dispatch_UnitType_getArmor(Unit_typ[this_69]) * 1. call trigger_registerUnitEvent(Unit_damageDetect, Unit_u[this_69], EVENT_UNIT_DAMAGED) call SetUnitUserData(Unit_u[this_69], this_69) set UnitClass_last = this_69 set Unit_shieldList[this_69] = new_ShieldList() set i = 0 loop exitwhen i > 11 call dispatch_Table_saveReal(Unit_playerDamage[this_69], i, 0.) set i = i + 1 endloop endfunction function new_Unit takes string typName, real pos_x, real pos_y, player owner returns integer local integer this_69 = alloc_Unit() call construct_Unit(this_69, typName, pos_x, pos_y, owner) return this_69 endfunction function closure_impl_54 takes integer this_69 returns nothing local integer i = 1 loop exitwhen i > 1 call dispatch_LinkedList_add(GameStart_uList, new_Unit("testunit", 2000., 2000., Player(0))) set i = i + 1 endloop endfunction function closure_impl_55 takes integer this_69 returns nothing set Unit_bonusAttackspeed[this_40[this_69]] = Unit_bonusAttackspeed[this_40[this_69]] - amount_30[this_69] call dispatch_Unit_updateAttackspeed(this_40[this_69]) endfunction function closure_impl_56 takes integer this_69 returns nothing set Unit_critdamage[this_28[this_69]] = Unit_critdamage[this_28[this_69]] - amount_18[this_69] endfunction function hashtable_loadDestructableHandle takes hashtable this_69, integer parentKey, integer childKey returns destructable return LoadDestructableHandle(this_69, parentKey, childKey) endfunction function Table_loadDestructable takes integer this_69, integer parentKey returns destructable return hashtable_loadDestructableHandle(Table_ht, this_69, parentKey) endfunction function dispatch_Table_loadDestructable takes integer this_69, integer parentKey returns destructable local destructable loadDestructable_result if Table_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Table.loadDestructable") else call error("Called Table.loadDestructable on invalid object.") endif endif set loadDestructable_result = Table_loadDestructable(this_69, parentKey) set dispatch_Table_loadDestructabletempReturn = loadDestructable_result set loadDestructable_result = null return dispatch_Table_loadDestructabletempReturn endfunction function hashtable_saveFogStateHandle takes hashtable this_69, integer parentKey, integer childKey, fogstate value returns nothing call SaveFogStateHandle(this_69, parentKey, childKey, value) endfunction function Table_saveFogState takes integer this_69, integer parentKey, fogstate value returns nothing call hashtable_saveFogStateHandle(Table_ht, this_69, parentKey, value) endfunction function dispatch_Table_saveFogState takes integer this_69, integer parentKey, fogstate value returns nothing if Table_typeId[this_69] == 0 then if this_69 == 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_69, parentKey, value) endfunction function destructableFromIndex takes integer index returns destructable call dispatch_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_loadDestructable(TypeCasting_typecastdata, 0) endfunction function destructable_getX takes destructable this_69 returns real return GetDestructableX(this_69) endfunction function destructable_getY takes destructable this_69 returns real return GetDestructableY(this_69) endfunction function closure_impl_57 takes integer this_69 returns nothing local real ang local integer wurst__iterator2 local destructable marker local real markerPos_x local real markerPos_y local integer tempIndex local real tempTupleSelectionResult_1 local real temp_tempTupleSelectionResult_1 local integer tempIndex_2 local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local real temp_markerPos_x local real temp_markerPos_y local integer temp local real temp_2 local integer temp_3 call RemoveDestructable(des[this_69]) set temp_3 = ControlPoint_outsideCrystals[this_6[this_69]] set temp = newCrystalId[this_69] set tempIndex = this_69 set temp_tempTupleSelectionResult_1 = desPos[tempIndex] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 set temp_2 = tempTupleSelectionResult_1 set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_2 = desPos_2[tempIndex_2] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 call dispatch_LinkedList_add(temp_3, destructableToIndex(CreateDestructableZ(temp, temp_2, tempTupleSelectionResult_2, z[this_69] + 100., 0., ControlPoint_decoCrystalOusideScale, 0))) set ang = 0. set wurst__iterator2 = dispatch_LinkedList_iterator(tempGlowMarkers[this_69]) loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator2) set marker = destructableFromIndex(dispatch_LLIterator_next(wurst__iterator2)) set temp_markerPos_x = destructable_getX(marker) set temp_markerPos_y = destructable_getY(marker) set markerPos_x = temp_markerPos_x set markerPos_y = temp_markerPos_y call RemoveDestructable(marker) call dispatch_LinkedList_add(ControlPoint_glowMarkers[this_6[this_69]], destructableToIndex(CreateDestructableZ(newDecoId[this_69], markerPos_x, markerPos_y, z[this_69], ang + 270., 7.80, 0))) set ang = ang + 60. endloop call dispatch_LLIterator_close(wurst__iterator2) set marker = null endfunction function closure_impl_58 takes integer this_69 returns nothing set Unit_critchance[this_26[this_69]] = Unit_critchance[this_26[this_69]] - amount_16[this_69] endfunction function closure_impl_59 takes integer this_69 returns nothing set Unit_bonusMana[this_54[this_69]] = Unit_bonusMana[this_54[this_69]] - amount_44[this_69] call dispatch_Unit_updateMana(this_54[this_69]) endfunction function closure_impl_60 takes integer this_69 returns nothing set Unit_bonusArmorPer[this_34[this_69]] = Unit_bonusArmorPer[this_34[this_69]] - amount_24[this_69] call dispatch_Unit_updateArmor(this_34[this_69]) endfunction function closure_impl_61 takes integer this_69 returns nothing set Unit_spellVamp[this_20[this_69]] = Unit_spellVamp[this_20[this_69]] - amount_10[this_69] endfunction function closure_impl_62 takes integer this_69 returns nothing set Unit_bonusAttackPer[this_14[this_69]] = Unit_bonusAttackPer[this_14[this_69]] - amount_4[this_69] call dispatch_Unit_updateAttack(this_14[this_69]) endfunction function closure_impl_63 takes integer this_69 returns nothing if GetLocalPlayer() == p[this_69] then endif endfunction function closure_impl_64 takes integer this_69 returns nothing set Unit_bonusManaRegPer[this_60[this_69]] = Unit_bonusManaRegPer[this_60[this_69]] - amount_50[this_69] call dispatch_Unit_updateManaReg(this_60[this_69]) endfunction function closure_impl_65 takes integer this_69 returns nothing set Unit_bonusLifeRegPer[this_52[this_69]] = Unit_bonusLifeRegPer[this_52[this_69]] - amount_42[this_69] call dispatch_Unit_updateLifeReg(this_52[this_69]) endfunction function UnitType_getAttack takes integer this_69 returns integer local integer tempIndex = this_69 local integer temp_tempTupleSelectionResult_1 = UnitType_attack[tempIndex] local integer tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_UnitType_getAttack takes integer this_69 returns integer local integer getAttack_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.getAttack") else call error("Called UnitType.getAttack on invalid object.") endif endif set getAttack_result = UnitType_getAttack(this_69) return getAttack_result endfunction function Hero_addAttack takes integer this_69, real amount_51 returns nothing set Hero_attackBuffer[this_69] = Hero_attackBuffer[this_69] + roundReal(amount_51) call print("attackbuffer is " + int_toString(Hero_attackBuffer[this_69])) call Unit_addAttack(this_69, amount_51) endfunction function dispatch_Unit_addAttack takes integer this_69, real amount_51 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.addAttack") else call error("Called Unit.addAttack on invalid object.") endif endif if Unit_typeId[this_69] <= 796 then call Unit_addAttack(this_69, amount_51) else call Hero_addAttack(this_69, amount_51) endif endfunction function closure_impl_66 takes integer this_69 returns nothing call dispatch_Unit_addAttack(this_63[this_69], dispatch_UnitType_getAttack(Unit_typ[this_63[this_69]]) * 1.) endfunction function closure_impl_67 takes integer this_69 returns nothing set Unit_bonusMana[this_56[this_69]] = Unit_bonusMana[this_56[this_69]] - amount_46[this_69] call dispatch_Unit_updateMana(this_56[this_69]) endfunction function closure_impl_68 takes integer this_69 returns nothing set Unit_bonusLife[this_46[this_69]] = Unit_bonusLife[this_46[this_69]] - amount_36[this_69] call dispatch_Unit_updateLife(this_46[this_69]) endfunction function closure_impl_69 takes integer this_69 returns nothing call RemoveDestructable(Tooltip_d[this_68[this_69]]) endfunction function closure_impl_70 takes integer this_69 returns nothing call dispatch_Fx_destroyFx(fx[this_69]) endfunction function closure_impl_71 takes integer this_69 returns nothing local timer receiver = getTimer() local timer receiver_2 local timer receiver_3 local timer receiver_4 call timer_setData(receiver, this_7[this_69]) set receiver_2 = receiver call timer_startPeriodic(receiver_2, 0.1, ref_function_closure_impl_2) set ControlPoint_rangeCheckTimer[this_7[this_69]] = receiver_2 set receiver_3 = getTimer() call timer_setData(receiver_3, this_7[this_69]) set receiver_4 = receiver_3 call timer_startPeriodic(receiver_4, 0.03, ref_function_closure_impl_3) set ControlPoint_inRangeTimer[this_7[this_69]] = receiver_4 set ControlPoint_hp[this_7[this_69]] = 0.5 if ControlPoint_owner[this_7[this_69]] == 0 then call dispatch_CrigBar_setBarColor(ControlPoint_bar[this_7[this_69]], 40, 255, 40) call dispatch_CrigBar_setBackground(ControlPoint_bar[this_7[this_69]], 255, 40, 40) else call dispatch_CrigBar_setBarColor(ControlPoint_bar[this_7[this_69]], 255, 40, 40) call dispatch_CrigBar_setBackground(ControlPoint_bar[this_7[this_69]], 40, 255, 40) endif set receiver = null set receiver_2 = null set receiver_3 = null set receiver_4 = null endfunction function closure_impl_72 takes integer this_69 returns nothing set Unit_spellpowerPer[this_30[this_69]] = Unit_spellpowerPer[this_30[this_69]] - amount_20[this_69] endfunction function HeroType_setCaptureAnimationIndex takes integer this_69, integer index returns nothing local integer tempIndex = this_69 set HeroType_captureAnimationIndex[tempIndex] = index set HeroType_captureAnimationIndex_2[tempIndex] = 5 endfunction function dispatch_HeroType_setCaptureAnimationIndex takes integer this_69, integer index returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.setCaptureAnimationIndex") else call error("Called HeroType.setCaptureAnimationIndex on invalid object.") endif endif call HeroType_setCaptureAnimationIndex(this_69, index) endfunction function HeroType_setCaptureAnimationSpeed takes integer this_69, real timescale returns nothing local integer tempIndex = this_69 set HeroType_captureAnimationSpeed[tempIndex] = timescale set HeroType_captureAnimationSpeed_2[tempIndex] = 5 endfunction function dispatch_HeroType_setCaptureAnimationSpeed takes integer this_69, real timescale returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.setCaptureAnimationSpeed") else call error("Called HeroType.setCaptureAnimationSpeed on invalid object.") endif endif call HeroType_setCaptureAnimationSpeed(this_69, timescale) endfunction function HeroType_setCaptureOffset takes integer this_69, real offset_x, real offset_y, real offset_z returns nothing local integer tempIndex = this_69 set HeroType_captureOffset_x[tempIndex] = offset_x set HeroType_captureOffset_y[tempIndex] = offset_y set HeroType_captureOffset_z[tempIndex] = offset_z set HeroType_captureOffset[tempIndex] = 5 endfunction function dispatch_HeroType_setCaptureOffset takes integer this_69, real offset_x, real offset_y, real offset_z returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.setCaptureOffset") else call error("Called HeroType.setCaptureOffset on invalid object.") endif endif call HeroType_setCaptureOffset(this_69, offset_x, offset_y, offset_z) endfunction function HeroType_setHashPeriodicAnimation takes integer this_69, boolean has returns nothing local integer tempIndex = this_69 set HeroType_hasPeriodicAnimation[tempIndex] = has set HeroType_hasPeriodicAnimation_2[tempIndex] = 5 endfunction function dispatch_HeroType_setHashPeriodicAnimation takes integer this_69, boolean has returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.setHashPeriodicAnimation") else call error("Called HeroType.setHashPeriodicAnimation on invalid object.") endif endif call HeroType_setHashPeriodicAnimation(this_69, has) endfunction function HeroType_setHeroProperName takes integer this_69, string name returns nothing local integer tempIndex = this_69 set HeroType_properName[tempIndex] = name set HeroType_properName_2[tempIndex] = 5 endfunction function dispatch_HeroType_setHeroProperName takes integer this_69, string name returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.setHeroProperName") else call error("Called HeroType.setHeroProperName on invalid object.") endif endif call HeroType_setHeroProperName(this_69, name) endfunction function UnitType_setArmor takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_armor[tempIndex] = data_2 set UnitType_armor_2[tempIndex] = 5 endfunction function dispatch_UnitType_setArmor takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setArmor") else call error("Called UnitType.setArmor on invalid object.") endif endif call UnitType_setArmor(this_69, data_2) endfunction function UnitType_setArmorSoundType takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_armorType[tempIndex] = data_2 set UnitType_armorType_2[tempIndex] = 5 endfunction function dispatch_UnitType_setArmorSoundType takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setArmorSoundType") else call error("Called UnitType.setArmorSoundType on invalid object.") endif endif call UnitType_setArmorSoundType(this_69, data_2) endfunction function UnitType_setAttack takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_attack[tempIndex] = data_2 set UnitType_attack_2[tempIndex] = 5 endfunction function dispatch_UnitType_setAttack takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setAttack") else call error("Called UnitType.setAttack on invalid object.") endif endif call UnitType_setAttack(this_69, data_2) endfunction function UnitType_setAttackBackSwingPoint takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_attackBackswingPoint[tempIndex] = data_2 set UnitType_attackBackswingPoint_2[tempIndex] = 5 endfunction function dispatch_UnitType_setAttackBackSwingPoint takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setAttackBackSwingPoint") else call error("Called UnitType.setAttackBackSwingPoint on invalid object.") endif endif call UnitType_setAttackBackSwingPoint(this_69, data_2) endfunction function UnitType_setAttackDamagePoint takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_attackDamagePoint[tempIndex] = data_2 set UnitType_attackDamagePoint_2[tempIndex] = 5 endfunction function dispatch_UnitType_setAttackDamagePoint takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setAttackDamagePoint") else call error("Called UnitType.setAttackDamagePoint on invalid object.") endif endif call UnitType_setAttackDamagePoint(this_69, data_2) endfunction function UnitType_setAttackRange takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_attackRange[tempIndex] = data_2 set UnitType_attackRange_2[tempIndex] = 5 endfunction function dispatch_UnitType_setAttackRange takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setAttackRange") else call error("Called UnitType.setAttackRange on invalid object.") endif endif call UnitType_setAttackRange(this_69, data_2) endfunction function UnitType_setAttackRangeBuffer takes integer this_69, real data_2 returns nothing endfunction function dispatch_UnitType_setAttackRangeBuffer takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setAttackRangeBuffer") else call error("Called UnitType.setAttackRangeBuffer on invalid object.") endif endif call UnitType_setAttackRangeBuffer(this_69, data_2) endfunction function UnitType_setBounty takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_bounty[tempIndex] = data_2 set UnitType_bounty_2[tempIndex] = 5 endfunction function dispatch_UnitType_setBounty takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setBounty") else call error("Called UnitType.setBounty on invalid object.") endif endif call UnitType_setBounty(this_69, data_2) endfunction function UnitType_setCollisionSize takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_collisionSize[tempIndex] = data_2 set UnitType_collisionSize_2[tempIndex] = 5 endfunction function dispatch_UnitType_setCollisionSize takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setCollisionSize") else call error("Called UnitType.setCollisionSize on invalid object.") endif endif call UnitType_setCollisionSize(this_69, data_2) endfunction function UnitType_setHeight takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_height[tempIndex] = data_2 set UnitType_height_2[tempIndex] = 5 endfunction function dispatch_UnitType_setHeight takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setHeight") else call error("Called UnitType.setHeight on invalid object.") endif endif call UnitType_setHeight(this_69, data_2) endfunction function UnitType_setIcon takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 set UnitType_icon[tempIndex] = data_2 set UnitType_icon_2[tempIndex] = 5 endfunction function dispatch_UnitType_setIcon takes integer this_69, string data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setIcon") else call error("Called UnitType.setIcon on invalid object.") endif endif call UnitType_setIcon(this_69, data_2) endfunction function UnitType_setIsRanged takes integer this_69, boolean data_2 returns nothing local integer tempIndex = this_69 set UnitType_ranged[tempIndex] = data_2 set UnitType_ranged_2[tempIndex] = 5 endfunction function dispatch_UnitType_setIsRanged takes integer this_69, boolean data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setIsRanged") else call error("Called UnitType.setIsRanged on invalid object.") endif endif call UnitType_setIsRanged(this_69, data_2) endfunction function UnitType_setLife takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_life[tempIndex] = data_2 set UnitType_life_2[tempIndex] = 5 endfunction function dispatch_UnitType_setLife takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setLife") else call error("Called UnitType.setLife on invalid object.") endif endif call UnitType_setLife(this_69, data_2) endfunction function UnitType_setMana takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_mana[tempIndex] = data_2 set UnitType_mana_2[tempIndex] = 5 endfunction function dispatch_UnitType_setMana takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setMana") else call error("Called UnitType.setMana on invalid object.") endif endif call UnitType_setMana(this_69, data_2) endfunction function UnitType_setMass takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_mass[tempIndex] = data_2 set UnitType_mass_2[tempIndex] = 5 endfunction function dispatch_UnitType_setMass takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setMass") else call error("Called UnitType.setMass on invalid object.") endif endif call UnitType_setMass(this_69, data_2) endfunction function UnitType_setModel takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 set UnitType_model[tempIndex] = data_2 set UnitType_model_2[tempIndex] = 5 endfunction function dispatch_UnitType_setModel takes integer this_69, string data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setModel") else call error("Called UnitType.setModel on invalid object.") endif endif call UnitType_setModel(this_69, data_2) endfunction function UnitType_setName takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 set UnitType_name[tempIndex] = data_2 set UnitType_name_2[tempIndex] = 5 endfunction function dispatch_UnitType_setName takes integer this_69, string data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setName") else call error("Called UnitType.setName on invalid object.") endif endif call UnitType_setName(this_69, data_2) endfunction function UnitType_setRadius takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_radius[tempIndex] = data_2 set UnitType_radius_2[tempIndex] = 5 endfunction function dispatch_UnitType_setRadius takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setRadius") else call error("Called UnitType.setRadius on invalid object.") endif endif call UnitType_setRadius(this_69, data_2) endfunction function UnitType_setRunspeed takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_runSpeed[tempIndex] = data_2 set UnitType_runSpeed_2[tempIndex] = 5 endfunction function dispatch_UnitType_setRunspeed takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setRunspeed") else call error("Called UnitType.setRunspeed on invalid object.") endif endif call UnitType_setRunspeed(this_69, data_2) endfunction function UnitType_setScale takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_scale[tempIndex] = data_2 set UnitType_scale_2[tempIndex] = 5 endfunction function dispatch_UnitType_setScale takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setScale") else call error("Called UnitType.setScale on invalid object.") endif endif call UnitType_setScale(this_69, data_2) endfunction function UnitType_setSelectionRadius takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 set UnitType_selectionRadius[tempIndex] = data_2 set UnitType_selectionRadius_2[tempIndex] = 5 endfunction function dispatch_UnitType_setSelectionRadius takes integer this_69, real data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setSelectionRadius") else call error("Called UnitType.setSelectionRadius on invalid object.") endif endif call UnitType_setSelectionRadius(this_69, data_2) endfunction function UnitType_setShaddowPos takes integer this_69, real data_x, real data_y returns nothing local integer tempIndex = this_69 set UnitType_shaddowPosFix_x[tempIndex] = data_x set UnitType_shaddowPosFix_y[tempIndex] = data_y set UnitType_shaddowPosFix[tempIndex] = 5 endfunction function dispatch_UnitType_setShaddowPos takes integer this_69, real data_x, real data_y returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setShaddowPos") else call error("Called UnitType.setShaddowPos on invalid object.") endif endif call UnitType_setShaddowPos(this_69, data_x, data_y) endfunction function UnitType_setShaddowSize takes integer this_69, real data_x, real data_y returns nothing local integer tempIndex = this_69 set UnitType_shaddowSize_x[tempIndex] = data_x set UnitType_shaddowSize_y[tempIndex] = data_y set UnitType_shaddowSize[tempIndex] = 5 endfunction function dispatch_UnitType_setShaddowSize takes integer this_69, real data_x, real data_y returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setShaddowSize") else call error("Called UnitType.setShaddowSize on invalid object.") endif endif call UnitType_setShaddowSize(this_69, data_x, data_y) endfunction function UnitType_setSoundSet takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 set UnitType_soundSet[tempIndex] = data_2 set UnitType_soundSet_2[tempIndex] = 5 endfunction function dispatch_UnitType_setSoundSet takes integer this_69, string data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setSoundSet") else call error("Called UnitType.setSoundSet on invalid object.") endif endif call UnitType_setSoundSet(this_69, data_2) endfunction function UnitType_setTier takes integer this_69, integer data_2 returns nothing endfunction function dispatch_UnitType_setTier takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setTier") else call error("Called UnitType.setTier on invalid object.") endif endif call UnitType_setTier(this_69, data_2) endfunction function UnitType_setWeaptonSound takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 set UnitType_weaponSound[tempIndex] = data_2 set UnitType_weaponSound_2[tempIndex] = 5 endfunction function dispatch_UnitType_setWeaptonSound takes integer this_69, integer data_2 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.setWeaptonSound") else call error("Called UnitType.setWeaptonSound on invalid object.") endif endif call UnitType_setWeaptonSound(this_69, data_2) endfunction function SampleHero_settings takes integer t returns nothing call dispatch_UnitType_setAttack(t, 20) call dispatch_UnitType_setArmor(t, 5) call dispatch_UnitType_setAttackBackSwingPoint(t, 0.2) call dispatch_UnitType_setAttackDamagePoint(t, 0.2) call dispatch_UnitType_setAttackRange(t, 200) call dispatch_UnitType_setAttackRangeBuffer(t, 100.) call dispatch_UnitType_setBounty(t, 100) call dispatch_UnitType_setCollisionSize(t, 100.) call dispatch_UnitType_setHeight(t, 100.) call dispatch_UnitType_setIsRanged(t, false) call dispatch_UnitType_setIcon(t, "") call dispatch_UnitType_setModel(t, "units\\human\\HeroPaladin\\HeroPaladin") call dispatch_UnitType_setScale(t, 1.3) call dispatch_UnitType_setMass(t, 1000.) call dispatch_UnitType_setLife(t, 1000) call dispatch_UnitType_setMana(t, 100) call dispatch_UnitType_setName(t, "testhero") call dispatch_UnitType_setRadius(t, 100.) call dispatch_UnitType_setRunspeed(t, 200.) call dispatch_UnitType_setSelectionRadius(t, 1.2) call dispatch_UnitType_setShaddowPos(t, 0., 0.) call dispatch_UnitType_setShaddowSize(t, 200., 200.) call dispatch_UnitType_setSoundSet(t, "none") call dispatch_UnitType_setTier(t, 1) call dispatch_HeroType_setCaptureAnimationIndex(t, 7) call dispatch_HeroType_setCaptureAnimationSpeed(t, 1.5) call dispatch_HeroType_setHashPeriodicAnimation(t, false) call dispatch_HeroType_setCaptureOffset(t, 25., 8., 85.) call dispatch_UnitType_setWeaptonSound(t, 2) call dispatch_UnitType_setArmorSoundType(t, 2) call dispatch_HeroType_setHeroProperName(t, "CriggesMasterOfDesaster") endfunction function ObjectDefinition_setInt takes integer this_key, string modification, integer value returns nothing endfunction function boolean_toInt takes boolean this_69 returns integer if this_69 then return 1 else return 0 endif endfunction function ObjectDefinition_setBoolean takes integer this_key, string modification, boolean value returns nothing call ObjectDefinition_setInt(this_key, modification, boolean_toInt(value)) endfunction function ObjectDefinition_setLvlDataString takes integer this_key, string modification, integer lvl, integer dataPointer, string value returns nothing endfunction function HashList_add takes integer this_69, integer elem returns nothing call hashtable_saveInt(HashList_ht, this_69, HashList_size[this_69], elem) set HashList_size[this_69] = HashList_size[this_69] + 1 endfunction function dispatch_HashList_add takes integer this_69, integer elem returns nothing if HashList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HashList.add") else call error("Called HashList.add on invalid object.") endif endif call HashList_add(this_69, elem) endfunction function addUnitToPreload takes integer id returns nothing call dispatch_HashList_add(PreloadSystem_unitsToPreload, id) endfunction function compileError takes string msg returns nothing endfunction function StringIteratorC_close takes integer this_69 returns nothing endfunction function dispatch_StringIteratorC_close takes integer this_69 returns nothing if StringIteratorC_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling StringIteratorC.close") else call error("Called StringIteratorC.close on invalid object.") endif endif call StringIteratorC_close(this_69) endfunction function StringIteratorC_hasNext takes integer this_69 returns boolean return StringIteratorC_pos[this_69] != 0 endfunction function dispatch_StringIteratorC_hasNext takes integer this_69 returns boolean local boolean hasNext_result if StringIteratorC_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling StringIteratorC.hasNext") else call error("Called StringIteratorC.hasNext on invalid object.") endif endif set hasNext_result = StringIteratorC_hasNext(this_69) return hasNext_result endfunction function StringIteratorC_next takes integer this_69 returns string local integer buf = StringIteratorC_pos[this_69] set StringIteratorC_pos[this_69] = String_next[StringIteratorC_pos[this_69]] return String_content[buf] endfunction function dispatch_StringIteratorC_next takes integer this_69 returns string local string next_result if StringIteratorC_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling StringIteratorC.next") else call error("Called StringIteratorC.next on invalid object.") endif endif set next_result = StringIteratorC_next(this_69) return next_result endfunction function alloc_StringIteratorC takes nothing returns integer local integer this_69 if StringIteratorC_firstFree == 0 then set StringIteratorC_maxIndex = StringIteratorC_maxIndex + 1 set this_69 = StringIteratorC_maxIndex else set StringIteratorC_firstFree = StringIteratorC_firstFree - 1 set this_69 = StringIteratorC_nextFree[StringIteratorC_firstFree] endif set StringIteratorC_typeId[this_69] = 784 return this_69 endfunction function construct_StringIteratorC takes integer this_69, integer first returns nothing set StringIteratorC_pos[this_69] = first endfunction function new_StringIteratorC takes integer first returns integer local integer this_69 = alloc_StringIteratorC() call construct_StringIteratorC(this_69, first) return this_69 endfunction function StringList_iterator takes integer this_69 returns integer return new_StringIteratorC(StringList_first[this_69]) endfunction function dispatch_StringList_iterator takes integer this_69 returns integer local integer iterator_result if StringList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling StringList.iterator") else call error("Called StringList.iterator on invalid object.") endif endif set iterator_result = StringList_iterator(this_69) return iterator_result endfunction function ObjectDefinition_setUnreal takes integer this_key, string modification, real value returns nothing endfunction function UnitOrBuildingOrHeroDefinition_setAcquisitionRange takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uacq", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAcquisitionRange takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAcquisitionRange") else call error("Called UnitOrBuildingOrHeroDefinition.setAcquisitionRange on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAcquisitionRange(this_69, data_2) endfunction function ObjectDefinition_setReal takes integer this_key, string modification, real value returns nothing endfunction function UnitOrBuildingOrHeroDefinition_setAnimationBlendTimeseconds takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "uble", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAnimationBlendTimeseconds takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAnimationBlendTimeseconds") else call error("Called UnitOrBuildingOrHeroDefinition.setAnimationBlendTimeseconds on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAnimationBlendTimeseconds(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAnimationCastBackswing takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ucbs", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAnimationCastBackswing takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAnimationCastBackswing") else call error("Called UnitOrBuildingOrHeroDefinition.setAnimationCastBackswing on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAnimationCastBackswing(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAnimationCastPoint takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ucpt", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAnimationCastPoint takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAnimationCastPoint") else call error("Called UnitOrBuildingOrHeroDefinition.setAnimationCastPoint on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAnimationCastPoint(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAnimationRunSpeed takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "urun", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAnimationRunSpeed takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAnimationRunSpeed") else call error("Called UnitOrBuildingOrHeroDefinition.setAnimationRunSpeed on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAnimationRunSpeed(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAnimationWalkSpeed takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "uwal", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAnimationWalkSpeed takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAnimationWalkSpeed") else call error("Called UnitOrBuildingOrHeroDefinition.setAnimationWalkSpeed on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAnimationWalkSpeed(this_69, data_2) endfunction function ArmorSoundType_toString takes integer this_69 returns string local integer temp = this_69 if temp == 0 then return "Ethereal" elseif temp == 2 then return "Flesh" elseif temp == 4 then return "Wood" elseif temp == 3 then return "Stone" elseif temp == 1 then return "Metal" else return null endif endfunction function ObjectDefinition_setString takes integer this_key, string modification, string value returns nothing endfunction function UnitOrBuildingOrHeroDefinition_setArmorSoundType takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "uarm", ArmorSoundType_toString(data_2)) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setArmorSoundType takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setArmorSoundType") else call error("Called UnitOrBuildingOrHeroDefinition.setArmorSoundType on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setArmorSoundType(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1AnimationBackswingPoint takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ubs1", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1AnimationBackswingPoint takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1AnimationBackswingPoint") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1AnimationBackswingPoint on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1AnimationBackswingPoint(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1AnimationDamagePoint takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "udp1", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1AnimationDamagePoint takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1AnimationDamagePoint") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1AnimationDamagePoint on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1AnimationDamagePoint(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1CooldownTime takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ua1c", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1CooldownTime takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1CooldownTime") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1CooldownTime on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1CooldownTime(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1DamageBase takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "ua1b", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageBase takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1DamageBase") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1DamageBase on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1DamageBase(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1DamageNumberofDice takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "ua1d", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageNumberofDice takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1DamageNumberofDice") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1DamageNumberofDice on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1DamageNumberofDice(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1DamageSidesperDie takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "ua1s", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageSidesperDie takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1DamageSidesperDie") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1DamageSidesperDie on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1DamageSidesperDie(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArc takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uma1", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArc takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1ProjectileArc") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1ProjectileArc on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArc(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArt takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "ua1m", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArt takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1ProjectileArt") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1ProjectileArt on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArt(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1ProjectileHomingEnabled takes integer this_69, boolean data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setBoolean(W3UDefinition_def[tempIndex], "umh1", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileHomingEnabled takes integer this_69, boolean data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1ProjectileHomingEnabled") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1ProjectileHomingEnabled on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1ProjectileHomingEnabled(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1ProjectileSpeed takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "ua1z", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileSpeed takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1ProjectileSpeed") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1ProjectileSpeed on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1ProjectileSpeed(this_69, data_2) endfunction function WeaponSound_toString takes integer this_69 returns string local integer temp = this_69 if temp == 0 then return "Nothing" elseif temp == 1 then return "AxeMediumChop" elseif temp == 2 then return "MetalHeavyBash" elseif temp == 3 then return "MetalHeavyChop" elseif temp == 4 then return "MetalHeavySlice" elseif temp == 5 then return "MetalLightChop" elseif temp == 6 then return "MetalLightSlice" elseif temp == 7 then return "MetalMediumBash" elseif temp == 8 then return "MetalMediumChop" elseif temp == 9 then return "MetalMediumSlice" elseif temp == 10 then return "RockHeavyBash" elseif temp == 11 then return "WoodHeavyBash" elseif temp == 12 then return "WoodLightBash" elseif temp == 13 then return "WoodMediumBash" else return null endif endfunction function UnitOrBuildingOrHeroDefinition_setAttack1WeaponSound takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "ucs1", WeaponSound_toString(data_2)) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1WeaponSound takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1WeaponSound") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1WeaponSound on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1WeaponSound(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1WeaponType takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "ua1w", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1WeaponType takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1WeaponType") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1WeaponType on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1WeaponType(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setCollisionSize takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ucol", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setCollisionSize takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setCollisionSize") else call error("Called UnitOrBuildingOrHeroDefinition.setCollisionSize on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setCollisionSize(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setDefenseBase takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "udef", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setDefenseBase takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setDefenseBase") else call error("Called UnitOrBuildingOrHeroDefinition.setDefenseBase on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setDefenseBase(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setFoodCost takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "ufoo", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setFoodCost takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setFoodCost") else call error("Called UnitOrBuildingOrHeroDefinition.setFoodCost on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setFoodCost(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setHitPointsMaximumBase takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "uhpm", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setHitPointsMaximumBase takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setHitPointsMaximumBase") else call error("Called UnitOrBuildingOrHeroDefinition.setHitPointsMaximumBase on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setHitPointsMaximumBase(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setHitPointsRegenerationRate takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uhpr", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setHitPointsRegenerationRate takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setHitPointsRegenerationRate") else call error("Called UnitOrBuildingOrHeroDefinition.setHitPointsRegenerationRate on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setHitPointsRegenerationRate(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setIconGameInterface takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "uico", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setIconGameInterface takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setIconGameInterface") else call error("Called UnitOrBuildingOrHeroDefinition.setIconGameInterface on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setIconGameInterface(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setManaInitialAmount takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "umpi", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setManaInitialAmount takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setManaInitialAmount") else call error("Called UnitOrBuildingOrHeroDefinition.setManaInitialAmount on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setManaInitialAmount(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setManaMaximum takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "umpm", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setManaMaximum takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setManaMaximum") else call error("Called UnitOrBuildingOrHeroDefinition.setManaMaximum on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setManaMaximum(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setManaRegeneration takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "umpr", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setManaRegeneration takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setManaRegeneration") else call error("Called UnitOrBuildingOrHeroDefinition.setManaRegeneration on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setManaRegeneration(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setModelFile takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "umdl", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setModelFile takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setModelFile") else call error("Called UnitOrBuildingOrHeroDefinition.setModelFile on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setModelFile(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setNormalAbilities takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "uabi", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setNormalAbilities takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setNormalAbilities") else call error("Called UnitOrBuildingOrHeroDefinition.setNormalAbilities on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setNormalAbilities(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setOrientationInterpolation takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "uori", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setOrientationInterpolation takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setOrientationInterpolation") else call error("Called UnitOrBuildingOrHeroDefinition.setOrientationInterpolation on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setOrientationInterpolation(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setProjectileImpactZ takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uimz", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setProjectileImpactZ takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setProjectileImpactZ") else call error("Called UnitOrBuildingOrHeroDefinition.setProjectileImpactZ on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setProjectileImpactZ(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setProjectileLaunchX takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ulpx", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setProjectileLaunchX takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setProjectileLaunchX") else call error("Called UnitOrBuildingOrHeroDefinition.setProjectileLaunchX on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setProjectileLaunchX(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setProjectileLaunchY takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ulpy", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setProjectileLaunchY takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setProjectileLaunchY") else call error("Called UnitOrBuildingOrHeroDefinition.setProjectileLaunchY on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setProjectileLaunchY(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setProjectileLaunchZ takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ulpz", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setProjectileLaunchZ takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setProjectileLaunchZ") else call error("Called UnitOrBuildingOrHeroDefinition.setProjectileLaunchZ on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setProjectileLaunchZ(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setScalingValue takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "usca", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setScalingValue takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setScalingValue") else call error("Called UnitOrBuildingOrHeroDefinition.setScalingValue on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setScalingValue(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setSelectionScale takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "ussc", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setSelectionScale takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setSelectionScale") else call error("Called UnitOrBuildingOrHeroDefinition.setSelectionScale on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setSelectionScale(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setShadowImageCenterX takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "ushx", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageCenterX takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setShadowImageCenterX") else call error("Called UnitOrBuildingOrHeroDefinition.setShadowImageCenterX on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setShadowImageCenterX(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setShadowImageCenterY takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "ushy", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageCenterY takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setShadowImageCenterY") else call error("Called UnitOrBuildingOrHeroDefinition.setShadowImageCenterY on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setShadowImageCenterY(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setShadowImageHeight takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "ushh", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageHeight takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setShadowImageHeight") else call error("Called UnitOrBuildingOrHeroDefinition.setShadowImageHeight on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setShadowImageHeight(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setShadowImageWidth takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setReal(W3UDefinition_def[tempIndex], "ushw", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageWidth takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setShadowImageWidth") else call error("Called UnitOrBuildingOrHeroDefinition.setShadowImageWidth on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setShadowImageWidth(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setSightRadiusDay takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "usid", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setSightRadiusDay takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setSightRadiusDay") else call error("Called UnitOrBuildingOrHeroDefinition.setSightRadiusDay on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setSightRadiusDay(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setSightRadiusNight takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "usin", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setSightRadiusNight takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setSightRadiusNight") else call error("Called UnitOrBuildingOrHeroDefinition.setSightRadiusNight on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setSightRadiusNight(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setSpeedBase takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "umvs", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setSpeedBase takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setSpeedBase") else call error("Called UnitOrBuildingOrHeroDefinition.setSpeedBase on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setSpeedBase(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setTurnRate takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "umvr", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setTurnRate takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setTurnRate") else call error("Called UnitOrBuildingOrHeroDefinition.setTurnRate on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setTurnRate(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setUnitSoundSet takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "usnd", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setUnitSoundSet takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setUnitSoundSet") else call error("Called UnitOrBuildingOrHeroDefinition.setUnitSoundSet on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setUnitSoundSet(this_69, data_2) endfunction function W3UDefinition_setName takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "unam", data_2) endfunction function dispatch_W3UDefinition_setName takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling W3UDefinition.setName") else call error("Called W3UDefinition.setName on invalid object.") endif endif call W3UDefinition_setName(this_69, data_2) endfunction function UnitType_finalize takes integer this_69 returns nothing local string builder local integer wurst__iterator0 local string s local integer tempIndex local integer tempTupleSelectionResult_1 local integer temp_tempTupleSelectionResult_1 local integer tempIndex_2 local integer tempTupleSelectionResult_2 local integer temp_tempTupleSelectionResult_2 local integer tempIndex_3 local real tempTupleSelectionResult_1_2 local real temp_tempTupleSelectionResult_1_2 local integer tempIndex_4 local integer tempTupleSelectionResult_2_2 local integer temp_tempTupleSelectionResult_2_2 local integer tempIndex_5 local real tempTupleSelectionResult_1_3 local real temp_tempTupleSelectionResult_1_3 local integer tempIndex_6 local integer tempTupleSelectionResult_2_3 local integer temp_tempTupleSelectionResult_2_3 local integer tempIndex_7 local real tempTupleSelectionResult_1_4 local real temp_tempTupleSelectionResult_1_4 local integer tempIndex_8 local integer tempTupleSelectionResult_2_4 local integer temp_tempTupleSelectionResult_2_4 local integer tempIndex_9 local boolean tempTupleSelectionResult_1_5 local boolean temp_tempTupleSelectionResult_1_5 local integer tempIndex_10 local integer tempTupleSelectionResult_2_5 local integer temp_tempTupleSelectionResult_2_5 local integer tempIndex_11 local integer tempTupleSelectionResult_2_6 local integer temp_tempTupleSelectionResult_2_6 local integer tempIndex_12 local real tempTupleSelectionResult_1_6 local real temp_tempTupleSelectionResult_1_6 local integer tempIndex_13 local real tempTupleSelectionResult_1_1 local real tempTupleSelectionResult_1_2_2 local real tempTupleSelectionResult_1_3_2 local real temp_tempTupleSelectionResult_1_1 local real temp_tempTupleSelectionResult_1_2_2 local real temp_tempTupleSelectionResult_1_3_2 local real tempTupleSelectionResult_1_7 local real temp_tempTupleSelectionResult_1_7 local integer tempIndex_14 local real tempTupleSelectionResult_1_1_2 local real tempTupleSelectionResult_1_2_3 local real tempTupleSelectionResult_1_3_3 local real temp_tempTupleSelectionResult_1_1_2 local real temp_tempTupleSelectionResult_1_2_3 local real temp_tempTupleSelectionResult_1_3_3 local real tempTupleSelectionResult_2_7 local real temp_tempTupleSelectionResult_2_7 local integer tempIndex_15 local real tempTupleSelectionResult_1_1_3 local real tempTupleSelectionResult_1_2_4 local real tempTupleSelectionResult_1_3_4 local real temp_tempTupleSelectionResult_1_1_3 local real temp_tempTupleSelectionResult_1_2_4 local real temp_tempTupleSelectionResult_1_3_4 local real tempTupleSelectionResult_3 local real temp_tempTupleSelectionResult_3 local integer tempIndex_16 local integer tempTupleSelectionResult_2_8 local integer temp_tempTupleSelectionResult_2_8 local integer tempIndex_17 local string tempTupleSelectionResult_1_8 local string temp_tempTupleSelectionResult_1_8 local integer tempIndex_18 local integer tempTupleSelectionResult_2_9 local integer temp_tempTupleSelectionResult_2_9 local integer tempIndex_19 local real tempTupleSelectionResult_1_1_4 local real tempTupleSelectionResult_1_2_5 local real temp_tempTupleSelectionResult_1_1_4 local real temp_tempTupleSelectionResult_1_2_5 local real tempTupleSelectionResult_1_9 local real temp_tempTupleSelectionResult_1_9 local integer tempIndex_20 local real tempTupleSelectionResult_1_1_5 local real tempTupleSelectionResult_1_2_6 local real temp_tempTupleSelectionResult_1_1_5 local real temp_tempTupleSelectionResult_1_2_6 local real tempTupleSelectionResult_2_10 local real temp_tempTupleSelectionResult_2_10 local integer tempIndex_21 local integer tempTupleSelectionResult_2_11 local integer temp_tempTupleSelectionResult_2_11 local integer tempIndex_22 local real tempTupleSelectionResult_1_1_6 local real tempTupleSelectionResult_1_2_7 local real temp_tempTupleSelectionResult_1_1_6 local real temp_tempTupleSelectionResult_1_2_7 local real tempTupleSelectionResult_1_10 local real temp_tempTupleSelectionResult_1_10 local integer tempIndex_23 local real tempTupleSelectionResult_1_1_7 local real tempTupleSelectionResult_1_2_8 local real temp_tempTupleSelectionResult_1_1_7 local real temp_tempTupleSelectionResult_1_2_8 local real tempTupleSelectionResult_2_12 local real temp_tempTupleSelectionResult_2_12 local integer tempIndex_24 local integer tempTupleSelectionResult_2_13 local integer temp_tempTupleSelectionResult_2_13 local integer tempIndex_25 local real tempTupleSelectionResult_1_11 local real temp_tempTupleSelectionResult_1_11 local integer tempIndex_26 local integer tempTupleSelectionResult_2_14 local integer temp_tempTupleSelectionResult_2_14 local integer tempIndex_27 local string tempTupleSelectionResult_1_12 local string temp_tempTupleSelectionResult_1_12 local integer tempIndex_28 local integer tempTupleSelectionResult_2_15 local integer temp_tempTupleSelectionResult_2_15 local integer tempIndex_29 local real tempTupleSelectionResult_1_13 local real temp_tempTupleSelectionResult_1_13 local integer tempIndex_30 local integer tempTupleSelectionResult_2_16 local integer temp_tempTupleSelectionResult_2_16 local integer tempIndex_31 local real tempTupleSelectionResult_1_14 local real temp_tempTupleSelectionResult_1_14 local integer tempIndex_32 local real tempTupleSelectionResult_1_15 local real temp_tempTupleSelectionResult_1_15 local integer tempIndex_33 local boolean tempTupleSelectionResult_1_16 local boolean temp_tempTupleSelectionResult_1_16 local integer tempIndex_34 local integer tempTupleSelectionResult_2_17 local integer temp_tempTupleSelectionResult_2_17 local integer tempIndex_35 local integer tempTupleSelectionResult_2_18 local integer temp_tempTupleSelectionResult_2_18 local integer tempIndex_36 local integer tempTupleSelectionResult_2_19 local integer temp_tempTupleSelectionResult_2_19 local integer tempIndex_37 local real tempTupleSelectionResult_1_17 local real temp_tempTupleSelectionResult_1_17 local integer tempIndex_38 local string tempTupleSelectionResult_1_18 local string temp_tempTupleSelectionResult_1_18 local integer tempIndex_39 local integer tempTupleSelectionResult_1_19 local integer temp_tempTupleSelectionResult_1_19 local integer tempIndex_40 local integer tempTupleSelectionResult_2_20 local integer temp_tempTupleSelectionResult_2_20 local integer tempIndex_41 local integer tempTupleSelectionResult_2_21 local integer temp_tempTupleSelectionResult_2_21 local integer tempIndex_42 local integer tempTupleSelectionResult_1_20 local integer temp_tempTupleSelectionResult_1_20 local integer tempIndex_43 local boolean tempTupleSelectionResult_1_21 local boolean temp_tempTupleSelectionResult_1_21 local integer tempIndex_44 local integer tempTupleSelectionResult_2_22 local integer temp_tempTupleSelectionResult_2_22 local integer tempIndex_45 local integer tempTupleSelectionResult_2_23 local integer temp_tempTupleSelectionResult_2_23 local integer tempIndex_46 local integer tempTupleSelectionResult_1_22 local integer temp_tempTupleSelectionResult_1_22 local integer tempIndex_47 local integer tempTupleSelectionResult_1_23 local integer temp_tempTupleSelectionResult_1_23 local integer tempIndex_48 local integer tempTupleSelectionResult_2_24 local integer temp_tempTupleSelectionResult_2_24 local integer tempIndex_49 local string tempTupleSelectionResult_1_24 local string temp_tempTupleSelectionResult_1_24 local integer tempIndex_50 local integer tempTupleSelectionResult_2_25 local integer temp_tempTupleSelectionResult_2_25 local integer tempIndex_51 local string tempTupleSelectionResult_1_25 local string temp_tempTupleSelectionResult_1_25 local integer tempIndex_52 local integer tempTupleSelectionResult_2_26 local integer temp_tempTupleSelectionResult_2_26 local integer tempIndex_53 local real tempTupleSelectionResult_1_26 local real temp_tempTupleSelectionResult_1_26 local integer tempIndex_54 local integer tempTupleSelectionResult_2_27 local integer temp_tempTupleSelectionResult_2_27 local integer tempIndex_55 local integer tempTupleSelectionResult_1_27 local integer temp_tempTupleSelectionResult_1_27 local integer tempIndex_56 local integer tempTupleSelectionResult_2_28 local integer temp_tempTupleSelectionResult_2_28 local integer tempIndex_57 local integer tempTupleSelectionResult_1_28 local integer temp_tempTupleSelectionResult_1_28 local integer tempIndex_58 local integer tempTupleSelectionResult_1_29 local integer temp_tempTupleSelectionResult_1_29 local integer tempIndex_59 local integer tempIndex_60 local integer tempIndex_61 local string tempTupleSelectionResult_1_30 local string temp_tempTupleSelectionResult_1_30 local integer temp local integer temp_2 local integer temp_3 local integer temp_4 local boolean andLeft local integer temp_5 local integer temp_6 local integer temp_7 local integer 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 local integer temp_16 local integer temp_17 local integer temp_18 local integer temp_19 local integer temp_20 local integer temp_21 local integer temp_22 local integer temp_23 local integer temp_24 local integer temp_25 local integer temp_26 local integer temp_27 local integer temp_28 local integer temp_29 local integer temp_30 if MagicFunctions_compiletime then set temp = UnitType_def[this_69] set tempIndex = this_69 set temp_tempTupleSelectionResult_1 = UnitType_moveSpeed[tempIndex] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 call dispatch_UnitOrBuildingOrHeroDefinition_setSpeedBase(temp, tempTupleSelectionResult_1) set builder = "" set wurst__iterator0 = dispatch_StringList_iterator(UnitType_abis[this_69]) loop exitwhen not dispatch_StringIteratorC_hasNext(wurst__iterator0) set s = dispatch_StringIteratorC_next(wurst__iterator0) set builder = builder + s endloop call dispatch_StringIteratorC_close(wurst__iterator0) call dispatch_UnitOrBuildingOrHeroDefinition_setNormalAbilities(UnitType_def[this_69], builder) set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_2 = UnitType_walkSpeed_2[tempIndex_2] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 if tempTupleSelectionResult_2 == 5 then set temp_2 = UnitType_def[this_69] set tempIndex_3 = this_69 set temp_tempTupleSelectionResult_1_2 = UnitType_walkSpeed[tempIndex_3] set tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 call dispatch_UnitOrBuildingOrHeroDefinition_setAnimationWalkSpeed(temp_2, tempTupleSelectionResult_1_2) endif set tempIndex_4 = this_69 set temp_tempTupleSelectionResult_2_2 = UnitType_runSpeed_2[tempIndex_4] set tempTupleSelectionResult_2_2 = temp_tempTupleSelectionResult_2_2 if tempTupleSelectionResult_2_2 == 5 then set temp_3 = UnitType_def[this_69] set tempIndex_5 = this_69 set temp_tempTupleSelectionResult_1_3 = UnitType_runSpeed[tempIndex_5] set tempTupleSelectionResult_1_3 = temp_tempTupleSelectionResult_1_3 call dispatch_UnitOrBuildingOrHeroDefinition_setAnimationRunSpeed(temp_3, tempTupleSelectionResult_1_3) endif call dispatch_UnitOrBuildingOrHeroDefinition_setTurnRate(UnitType_def[this_69], UnitType_turnRate) call dispatch_UnitOrBuildingOrHeroDefinition_setAnimationCastPoint(UnitType_def[this_69], UnitType_castPoint) call dispatch_UnitOrBuildingOrHeroDefinition_setAnimationCastBackswing(UnitType_def[this_69], UnitType_castBackPoint) call dispatch_UnitOrBuildingOrHeroDefinition_setAnimationBlendTimeseconds(UnitType_def[this_69], UnitType_animationSmoothingFactor) call dispatch_UnitOrBuildingOrHeroDefinition_setOrientationInterpolation(UnitType_def[this_69], UnitType_moveInterpolation) set tempIndex_6 = this_69 set temp_tempTupleSelectionResult_2_3 = UnitType_selectionRadius_2[tempIndex_6] set tempTupleSelectionResult_2_3 = temp_tempTupleSelectionResult_2_3 if tempTupleSelectionResult_2_3 == 5 then set temp_4 = UnitType_def[this_69] set tempIndex_7 = this_69 set temp_tempTupleSelectionResult_1_4 = UnitType_selectionRadius[tempIndex_7] set tempTupleSelectionResult_1_4 = temp_tempTupleSelectionResult_1_4 call dispatch_UnitOrBuildingOrHeroDefinition_setSelectionScale(temp_4, tempTupleSelectionResult_1_4) endif set tempIndex_8 = this_69 set temp_tempTupleSelectionResult_2_4 = UnitType_ranged_2[tempIndex_8] set tempTupleSelectionResult_2_4 = temp_tempTupleSelectionResult_2_4 if tempTupleSelectionResult_2_4 == 0 then call compileError("Missing information: Is unit ranged?") set tempIndex_9 = this_69 set temp_tempTupleSelectionResult_1_5 = UnitType_ranged[tempIndex_9] set tempTupleSelectionResult_1_5 = temp_tempTupleSelectionResult_1_5 if tempTupleSelectionResult_1_5 then set tempIndex_10 = this_69 set temp_tempTupleSelectionResult_2_5 = UnitType_missleTargetZ_2[tempIndex_10] set tempTupleSelectionResult_2_5 = temp_tempTupleSelectionResult_2_5 if tempTupleSelectionResult_2_5 == 3 then set andLeft = true else set tempIndex_11 = this_69 set temp_tempTupleSelectionResult_2_6 = UnitType_missleStart[tempIndex_11] set tempTupleSelectionResult_2_6 = temp_tempTupleSelectionResult_2_6 set andLeft = tempTupleSelectionResult_2_6 == 3 endif if andLeft then call compileError("Missing information: Missle target or start?") endif set temp_5 = UnitType_def[this_69] set tempIndex_12 = this_69 set temp_tempTupleSelectionResult_1_6 = UnitType_missleTargetZ[tempIndex_12] set tempTupleSelectionResult_1_6 = temp_tempTupleSelectionResult_1_6 call dispatch_UnitOrBuildingOrHeroDefinition_setProjectileImpactZ(temp_5, tempTupleSelectionResult_1_6) set temp_6 = UnitType_def[this_69] set tempIndex_13 = this_69 set temp_tempTupleSelectionResult_1_1 = UnitType_missleStart_x[tempIndex_13] set temp_tempTupleSelectionResult_1_2_2 = UnitType_missleStart_y[tempIndex_13] set temp_tempTupleSelectionResult_1_3_2 = UnitType_missleStart_z[tempIndex_13] set tempTupleSelectionResult_1_1 = temp_tempTupleSelectionResult_1_1 set tempTupleSelectionResult_1_2_2 = temp_tempTupleSelectionResult_1_2_2 set tempTupleSelectionResult_1_3_2 = temp_tempTupleSelectionResult_1_3_2 set temp_tempTupleSelectionResult_1_7 = tempTupleSelectionResult_1_1 set tempTupleSelectionResult_1_7 = temp_tempTupleSelectionResult_1_7 call dispatch_UnitOrBuildingOrHeroDefinition_setProjectileLaunchX(temp_6, tempTupleSelectionResult_1_7) set temp_7 = UnitType_def[this_69] set tempIndex_14 = this_69 set temp_tempTupleSelectionResult_1_1_2 = UnitType_missleStart_x[tempIndex_14] set temp_tempTupleSelectionResult_1_2_3 = UnitType_missleStart_y[tempIndex_14] set temp_tempTupleSelectionResult_1_3_3 = UnitType_missleStart_z[tempIndex_14] set tempTupleSelectionResult_1_1_2 = temp_tempTupleSelectionResult_1_1_2 set tempTupleSelectionResult_1_2_3 = temp_tempTupleSelectionResult_1_2_3 set tempTupleSelectionResult_1_3_3 = temp_tempTupleSelectionResult_1_3_3 set temp_tempTupleSelectionResult_2_7 = tempTupleSelectionResult_1_2_3 set tempTupleSelectionResult_2_7 = temp_tempTupleSelectionResult_2_7 call dispatch_UnitOrBuildingOrHeroDefinition_setProjectileLaunchY(temp_7, tempTupleSelectionResult_2_7) set temp_8 = UnitType_def[this_69] set tempIndex_15 = this_69 set temp_tempTupleSelectionResult_1_1_3 = UnitType_missleStart_x[tempIndex_15] set temp_tempTupleSelectionResult_1_2_4 = UnitType_missleStart_y[tempIndex_15] set temp_tempTupleSelectionResult_1_3_4 = UnitType_missleStart_z[tempIndex_15] set tempTupleSelectionResult_1_1_3 = temp_tempTupleSelectionResult_1_1_3 set tempTupleSelectionResult_1_2_4 = temp_tempTupleSelectionResult_1_2_4 set tempTupleSelectionResult_1_3_4 = temp_tempTupleSelectionResult_1_3_4 set temp_tempTupleSelectionResult_3 = tempTupleSelectionResult_1_3_4 set tempTupleSelectionResult_3 = temp_tempTupleSelectionResult_3 call dispatch_UnitOrBuildingOrHeroDefinition_setProjectileLaunchZ(temp_8, tempTupleSelectionResult_3) endif endif set tempIndex_16 = this_69 set temp_tempTupleSelectionResult_2_8 = UnitType_model_2[tempIndex_16] set tempTupleSelectionResult_2_8 = temp_tempTupleSelectionResult_2_8 if tempTupleSelectionResult_2_8 == 0 then call compileError("Missing information: Unit model?") endif set temp_9 = UnitType_def[this_69] set tempIndex_17 = this_69 set temp_tempTupleSelectionResult_1_8 = UnitType_model[tempIndex_17] set tempTupleSelectionResult_1_8 = temp_tempTupleSelectionResult_1_8 call dispatch_UnitOrBuildingOrHeroDefinition_setModelFile(temp_9, tempTupleSelectionResult_1_8) set tempIndex_18 = this_69 set temp_tempTupleSelectionResult_2_9 = UnitType_shaddowSize[tempIndex_18] set tempTupleSelectionResult_2_9 = temp_tempTupleSelectionResult_2_9 if tempTupleSelectionResult_2_9 == 5 then set temp_10 = UnitType_def[this_69] set tempIndex_19 = this_69 set temp_tempTupleSelectionResult_1_1_4 = UnitType_shaddowSize_x[tempIndex_19] set temp_tempTupleSelectionResult_1_2_5 = UnitType_shaddowSize_y[tempIndex_19] set tempTupleSelectionResult_1_1_4 = temp_tempTupleSelectionResult_1_1_4 set tempTupleSelectionResult_1_2_5 = temp_tempTupleSelectionResult_1_2_5 set temp_tempTupleSelectionResult_1_9 = tempTupleSelectionResult_1_1_4 set tempTupleSelectionResult_1_9 = temp_tempTupleSelectionResult_1_9 call dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageHeight(temp_10, tempTupleSelectionResult_1_9) set temp_11 = UnitType_def[this_69] set tempIndex_20 = this_69 set temp_tempTupleSelectionResult_1_1_5 = UnitType_shaddowSize_x[tempIndex_20] set temp_tempTupleSelectionResult_1_2_6 = UnitType_shaddowSize_y[tempIndex_20] set tempTupleSelectionResult_1_1_5 = temp_tempTupleSelectionResult_1_1_5 set tempTupleSelectionResult_1_2_6 = temp_tempTupleSelectionResult_1_2_6 set temp_tempTupleSelectionResult_2_10 = tempTupleSelectionResult_1_2_6 set tempTupleSelectionResult_2_10 = temp_tempTupleSelectionResult_2_10 call dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageWidth(temp_11, tempTupleSelectionResult_2_10) endif set tempIndex_21 = this_69 set temp_tempTupleSelectionResult_2_11 = UnitType_shaddowPosFix[tempIndex_21] set tempTupleSelectionResult_2_11 = temp_tempTupleSelectionResult_2_11 if tempTupleSelectionResult_2_11 == 5 then set temp_12 = UnitType_def[this_69] set tempIndex_22 = this_69 set temp_tempTupleSelectionResult_1_1_6 = UnitType_shaddowPosFix_x[tempIndex_22] set temp_tempTupleSelectionResult_1_2_7 = UnitType_shaddowPosFix_y[tempIndex_22] set tempTupleSelectionResult_1_1_6 = temp_tempTupleSelectionResult_1_1_6 set tempTupleSelectionResult_1_2_7 = temp_tempTupleSelectionResult_1_2_7 set temp_tempTupleSelectionResult_1_10 = tempTupleSelectionResult_1_1_6 set tempTupleSelectionResult_1_10 = temp_tempTupleSelectionResult_1_10 call dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageCenterX(temp_12, tempTupleSelectionResult_1_10) set temp_13 = UnitType_def[this_69] set tempIndex_23 = this_69 set temp_tempTupleSelectionResult_1_1_7 = UnitType_shaddowPosFix_x[tempIndex_23] set temp_tempTupleSelectionResult_1_2_8 = UnitType_shaddowPosFix_y[tempIndex_23] set tempTupleSelectionResult_1_1_7 = temp_tempTupleSelectionResult_1_1_7 set tempTupleSelectionResult_1_2_8 = temp_tempTupleSelectionResult_1_2_8 set temp_tempTupleSelectionResult_2_12 = tempTupleSelectionResult_1_2_8 set tempTupleSelectionResult_2_12 = temp_tempTupleSelectionResult_2_12 call dispatch_UnitOrBuildingOrHeroDefinition_setShadowImageCenterY(temp_13, tempTupleSelectionResult_2_12) endif set tempIndex_24 = this_69 set temp_tempTupleSelectionResult_2_13 = UnitType_scale_2[tempIndex_24] set tempTupleSelectionResult_2_13 = temp_tempTupleSelectionResult_2_13 if tempTupleSelectionResult_2_13 == 5 then set temp_14 = UnitType_def[this_69] set tempIndex_25 = this_69 set temp_tempTupleSelectionResult_1_11 = UnitType_scale[tempIndex_25] set tempTupleSelectionResult_1_11 = temp_tempTupleSelectionResult_1_11 call dispatch_UnitOrBuildingOrHeroDefinition_setScalingValue(temp_14, tempTupleSelectionResult_1_11) endif set tempIndex_26 = this_69 set temp_tempTupleSelectionResult_2_14 = UnitType_icon_2[tempIndex_26] set tempTupleSelectionResult_2_14 = temp_tempTupleSelectionResult_2_14 if tempTupleSelectionResult_2_14 == 0 then call compileError("Missing information: Unit icon?") endif set temp_15 = UnitType_def[this_69] set tempIndex_27 = this_69 set temp_tempTupleSelectionResult_1_12 = UnitType_icon[tempIndex_27] set tempTupleSelectionResult_1_12 = temp_tempTupleSelectionResult_1_12 call dispatch_UnitOrBuildingOrHeroDefinition_setIconGameInterface(temp_15, tempTupleSelectionResult_1_12) call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1CooldownTime(UnitType_def[this_69], UnitType_attackCooldown) set tempIndex_28 = this_69 set temp_tempTupleSelectionResult_2_15 = UnitType_attackBackswingPoint_2[tempIndex_28] set tempTupleSelectionResult_2_15 = temp_tempTupleSelectionResult_2_15 if tempTupleSelectionResult_2_15 == 0 then call compileError("Missing information: Attack backswing point?") endif set temp_16 = UnitType_def[this_69] set tempIndex_29 = this_69 set temp_tempTupleSelectionResult_1_13 = UnitType_attackBackswingPoint[tempIndex_29] set tempTupleSelectionResult_1_13 = temp_tempTupleSelectionResult_1_13 call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1AnimationBackswingPoint(temp_16, tempTupleSelectionResult_1_13) set tempIndex_30 = this_69 set temp_tempTupleSelectionResult_2_16 = UnitType_attackDamagePoint_2[tempIndex_30] set tempTupleSelectionResult_2_16 = temp_tempTupleSelectionResult_2_16 if tempTupleSelectionResult_2_16 == 0 then call compileError("Missing information: Attack damage point?") endif set tempIndex_31 = this_69 set temp_tempTupleSelectionResult_1_14 = UnitType_attackDamagePoint[tempIndex_31] set tempTupleSelectionResult_1_14 = temp_tempTupleSelectionResult_1_14 if tempTupleSelectionResult_1_14 > UnitType_attackCooldown then call compileError("Invaild information: To long attack damage point") endif set temp_17 = UnitType_def[this_69] set tempIndex_32 = this_69 set temp_tempTupleSelectionResult_1_15 = UnitType_attackBackswingPoint[tempIndex_32] set tempTupleSelectionResult_1_15 = temp_tempTupleSelectionResult_1_15 call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1AnimationDamagePoint(temp_17, tempTupleSelectionResult_1_15) call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageBase(UnitType_def[this_69], UnitType_basicAttack) set tempIndex_33 = this_69 set temp_tempTupleSelectionResult_1_16 = UnitType_ranged[tempIndex_33] set tempTupleSelectionResult_1_16 = temp_tempTupleSelectionResult_1_16 if tempTupleSelectionResult_1_16 then set tempIndex_34 = this_69 set temp_tempTupleSelectionResult_2_17 = UnitType_missleArc_2[tempIndex_34] set tempTupleSelectionResult_2_17 = temp_tempTupleSelectionResult_2_17 if tempTupleSelectionResult_2_17 == 3 then call compileError("Missing information: Missle arc?") endif set tempIndex_35 = this_69 set temp_tempTupleSelectionResult_2_18 = UnitType_missleModel_2[tempIndex_35] set tempTupleSelectionResult_2_18 = temp_tempTupleSelectionResult_2_18 if tempTupleSelectionResult_2_18 == 3 then call compileError("Missing information: Missle model?") endif set tempIndex_36 = this_69 set temp_tempTupleSelectionResult_2_19 = UnitType_missleSpeed_2[tempIndex_36] set tempTupleSelectionResult_2_19 = temp_tempTupleSelectionResult_2_19 if tempTupleSelectionResult_2_19 == 3 then call compileError("Missing information: Missle speed?") endif set temp_18 = UnitType_def[this_69] set tempIndex_37 = this_69 set temp_tempTupleSelectionResult_1_17 = UnitType_missleArc[tempIndex_37] set tempTupleSelectionResult_1_17 = temp_tempTupleSelectionResult_1_17 call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArc(temp_18, tempTupleSelectionResult_1_17) set temp_19 = UnitType_def[this_69] set tempIndex_38 = this_69 set temp_tempTupleSelectionResult_1_18 = UnitType_missleModel[tempIndex_38] set tempTupleSelectionResult_1_18 = temp_tempTupleSelectionResult_1_18 call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileArt(temp_19, tempTupleSelectionResult_1_18) set temp_20 = UnitType_def[this_69] set tempIndex_39 = this_69 set temp_tempTupleSelectionResult_1_19 = UnitType_missleSpeed[tempIndex_39] set tempTupleSelectionResult_1_19 = temp_tempTupleSelectionResult_1_19 call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileSpeed(temp_20, tempTupleSelectionResult_1_19) endif set tempIndex_40 = this_69 set temp_tempTupleSelectionResult_2_20 = UnitType_attackRange_2[tempIndex_40] set tempTupleSelectionResult_2_20 = temp_tempTupleSelectionResult_2_20 if tempTupleSelectionResult_2_20 == 0 then call compileError("Missing information: attackrange?") endif call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageSidesperDie(UnitType_def[this_69], UnitType_diceSides) call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageNumberofDice(UnitType_def[this_69], UnitType_diceCount) set tempIndex_41 = this_69 set temp_tempTupleSelectionResult_2_21 = UnitType_weaponSound_2[tempIndex_41] set tempTupleSelectionResult_2_21 = temp_tempTupleSelectionResult_2_21 if tempTupleSelectionResult_2_21 == 5 then set temp_21 = UnitType_def[this_69] set tempIndex_42 = this_69 set temp_tempTupleSelectionResult_1_20 = UnitType_weaponSound[tempIndex_42] set tempTupleSelectionResult_1_20 = temp_tempTupleSelectionResult_1_20 call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1WeaponSound(temp_21, tempTupleSelectionResult_1_20) endif set tempIndex_43 = this_69 set temp_tempTupleSelectionResult_1_21 = UnitType_ranged[tempIndex_43] set tempTupleSelectionResult_1_21 = temp_tempTupleSelectionResult_1_21 if tempTupleSelectionResult_1_21 then call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1WeaponType(UnitType_def[this_69], "missile") call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ProjectileHomingEnabled(UnitType_def[this_69], true) endif set tempIndex_44 = this_69 set temp_tempTupleSelectionResult_2_22 = UnitType_armor_2[tempIndex_44] set tempTupleSelectionResult_2_22 = temp_tempTupleSelectionResult_2_22 if tempTupleSelectionResult_2_22 == 0 then call compileError("Missing information: Basic armor?") endif set tempIndex_45 = this_69 set temp_tempTupleSelectionResult_2_23 = UnitType_armorType_2[tempIndex_45] set tempTupleSelectionResult_2_23 = temp_tempTupleSelectionResult_2_23 if tempTupleSelectionResult_2_23 == 5 then set temp_22 = UnitType_def[this_69] set tempIndex_46 = this_69 set temp_tempTupleSelectionResult_1_22 = UnitType_armorType[tempIndex_46] set tempTupleSelectionResult_1_22 = temp_tempTupleSelectionResult_1_22 call dispatch_UnitOrBuildingOrHeroDefinition_setArmorSoundType(temp_22, tempTupleSelectionResult_1_22) endif set temp_23 = UnitType_def[this_69] set tempIndex_47 = this_69 set temp_tempTupleSelectionResult_1_23 = UnitType_attackRange[tempIndex_47] set tempTupleSelectionResult_1_23 = temp_tempTupleSelectionResult_1_23 call dispatch_UnitOrBuildingOrHeroDefinition_setAcquisitionRange(temp_23, tempTupleSelectionResult_1_23 * 1.) set tempIndex_48 = this_69 set temp_tempTupleSelectionResult_2_24 = UnitType_soundSet_2[tempIndex_48] set tempTupleSelectionResult_2_24 = temp_tempTupleSelectionResult_2_24 if tempTupleSelectionResult_2_24 == 5 then set temp_24 = UnitType_def[this_69] set tempIndex_49 = this_69 set temp_tempTupleSelectionResult_1_24 = UnitType_soundSet[tempIndex_49] set tempTupleSelectionResult_1_24 = temp_tempTupleSelectionResult_1_24 call dispatch_UnitOrBuildingOrHeroDefinition_setUnitSoundSet(temp_24, tempTupleSelectionResult_1_24) endif set tempIndex_50 = this_69 set temp_tempTupleSelectionResult_2_25 = UnitType_name_2[tempIndex_50] set tempTupleSelectionResult_2_25 = temp_tempTupleSelectionResult_2_25 if tempTupleSelectionResult_2_25 == 0 then call compileError("Missing information: Unit name?") endif set temp_25 = UnitType_def[this_69] set tempIndex_51 = this_69 set temp_tempTupleSelectionResult_1_25 = UnitType_name[tempIndex_51] set tempTupleSelectionResult_1_25 = temp_tempTupleSelectionResult_1_25 call dispatch_W3UDefinition_setName(temp_25, tempTupleSelectionResult_1_25) set tempIndex_52 = this_69 set temp_tempTupleSelectionResult_2_26 = UnitType_collisionSize_2[tempIndex_52] set tempTupleSelectionResult_2_26 = temp_tempTupleSelectionResult_2_26 if tempTupleSelectionResult_2_26 == 0 then call compileError("Missing information: Collision size?") endif set temp_26 = UnitType_def[this_69] set tempIndex_53 = this_69 set temp_tempTupleSelectionResult_1_26 = UnitType_collisionSize[tempIndex_53] set tempTupleSelectionResult_1_26 = temp_tempTupleSelectionResult_1_26 call dispatch_UnitOrBuildingOrHeroDefinition_setCollisionSize(temp_26, tempTupleSelectionResult_1_26) call dispatch_UnitOrBuildingOrHeroDefinition_setFoodCost(UnitType_def[this_69], UnitType_foodCost) set tempIndex_54 = this_69 set temp_tempTupleSelectionResult_2_27 = UnitType_life_2[tempIndex_54] set tempTupleSelectionResult_2_27 = temp_tempTupleSelectionResult_2_27 if tempTupleSelectionResult_2_27 == 0 then call compileError("Missing information: unit life?") endif set temp_27 = UnitType_def[this_69] set tempIndex_55 = this_69 set temp_tempTupleSelectionResult_1_27 = UnitType_life[tempIndex_55] set tempTupleSelectionResult_1_27 = temp_tempTupleSelectionResult_1_27 call dispatch_UnitOrBuildingOrHeroDefinition_setHitPointsMaximumBase(temp_27, tempTupleSelectionResult_1_27) set tempIndex_56 = this_69 set temp_tempTupleSelectionResult_2_28 = UnitType_mana_2[tempIndex_56] set tempTupleSelectionResult_2_28 = temp_tempTupleSelectionResult_2_28 if tempTupleSelectionResult_2_28 == 5 then set temp_28 = UnitType_def[this_69] set tempIndex_57 = this_69 set temp_tempTupleSelectionResult_1_28 = UnitType_mana[tempIndex_57] set tempTupleSelectionResult_1_28 = temp_tempTupleSelectionResult_1_28 call dispatch_UnitOrBuildingOrHeroDefinition_setManaMaximum(temp_28, tempTupleSelectionResult_1_28) call dispatch_UnitOrBuildingOrHeroDefinition_setManaInitialAmount(UnitType_def[this_69], UnitType_startMana) endif call dispatch_UnitOrBuildingOrHeroDefinition_setSightRadiusDay(UnitType_def[this_69], UnitType_sightRange) call dispatch_UnitOrBuildingOrHeroDefinition_setSightRadiusNight(UnitType_def[this_69], UnitType_sightRange) call dispatch_UnitOrBuildingOrHeroDefinition_setHitPointsRegenerationRate(UnitType_def[this_69], 0.) call dispatch_UnitOrBuildingOrHeroDefinition_setManaRegeneration(UnitType_def[this_69], 0.) if not UnitType_isHero[this_69] then set temp_29 = UnitType_def[this_69] set tempIndex_58 = this_69 set temp_tempTupleSelectionResult_1_29 = UnitType_armor[tempIndex_58] set tempTupleSelectionResult_1_29 = temp_tempTupleSelectionResult_1_29 call dispatch_UnitOrBuildingOrHeroDefinition_setDefenseBase(temp_29, tempTupleSelectionResult_1_29) else call dispatch_UnitOrBuildingOrHeroDefinition_setDefenseBase(UnitType_def[this_69], 0) endif set tempIndex_59 = UnitType_def[this_69] call ObjectDefinition_setBoolean(W3UDefinition_def[tempIndex_59], "uhhb", true) set tempIndex_60 = UnitType_def[this_69] call ObjectDefinition_setBoolean(W3UDefinition_def[tempIndex_60], "uhhd", true) else set temp_30 = UnitTypes_unitTypes set tempIndex_61 = this_69 set temp_tempTupleSelectionResult_1_30 = UnitType_name[tempIndex_61] set tempTupleSelectionResult_1_30 = temp_tempTupleSelectionResult_1_30 call dispatch_HashMap_put(temp_30, StringHash(tempTupleSelectionResult_1_30), this_69) call addUnitToPreload(UnitType_id[this_69]) endif endfunction function createObjectDefinition takes string fileType, integer newId, integer deriveFrom returns integer return 0 endfunction function BuildingAndHeroDefinition_setAgilityPerLevel takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uagp", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setAgilityPerLevel takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setAgilityPerLevel") else call error("Called BuildingAndHeroDefinition.setAgilityPerLevel on invalid object.") endif endif call BuildingAndHeroDefinition_setAgilityPerLevel(this_69, data_2) endfunction function BuildingAndHeroDefinition_setHeroAbilities takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "uhab", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setHeroAbilities takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setHeroAbilities") else call error("Called BuildingAndHeroDefinition.setHeroAbilities on invalid object.") endif endif call BuildingAndHeroDefinition_setHeroAbilities(this_69, data_2) endfunction function BuildingAndHeroDefinition_setIntelligencePerLevel takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uinp", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setIntelligencePerLevel takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setIntelligencePerLevel") else call error("Called BuildingAndHeroDefinition.setIntelligencePerLevel on invalid object.") endif endif call BuildingAndHeroDefinition_setIntelligencePerLevel(this_69, data_2) endfunction function BuildingAndHeroDefinition_setPrimaryAttribute takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "upra", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setPrimaryAttribute takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setPrimaryAttribute") else call error("Called BuildingAndHeroDefinition.setPrimaryAttribute on invalid object.") endif endif call BuildingAndHeroDefinition_setPrimaryAttribute(this_69, data_2) endfunction function BuildingAndHeroDefinition_setProperNames takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "upro", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setProperNames takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setProperNames") else call error("Called BuildingAndHeroDefinition.setProperNames on invalid object.") endif endif call BuildingAndHeroDefinition_setProperNames(this_69, data_2) endfunction function BuildingAndHeroDefinition_setStartingAgility takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "uagi", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setStartingAgility takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setStartingAgility") else call error("Called BuildingAndHeroDefinition.setStartingAgility on invalid object.") endif endif call BuildingAndHeroDefinition_setStartingAgility(this_69, data_2) endfunction function BuildingAndHeroDefinition_setStartingIntelligence takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "uint", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setStartingIntelligence takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setStartingIntelligence") else call error("Called BuildingAndHeroDefinition.setStartingIntelligence on invalid object.") endif endif call BuildingAndHeroDefinition_setStartingIntelligence(this_69, data_2) endfunction function BuildingAndHeroDefinition_setStartingStrength takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "ustr", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setStartingStrength takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setStartingStrength") else call error("Called BuildingAndHeroDefinition.setStartingStrength on invalid object.") endif endif call BuildingAndHeroDefinition_setStartingStrength(this_69, data_2) endfunction function BuildingAndHeroDefinition_setStrengthPerLevel takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ustp", data_2) endfunction function dispatch_BuildingAndHeroDefinition_setStrengthPerLevel takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BuildingAndHeroDefinition.setStrengthPerLevel") else call error("Called BuildingAndHeroDefinition.setStrengthPerLevel on invalid object.") endif endif call BuildingAndHeroDefinition_setStrengthPerLevel(this_69, data_2) endfunction function HeroDefinition_setAgilityPerLevel takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uagp", data_2) endfunction function dispatch_HeroDefinition_setAgilityPerLevel takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setAgilityPerLevel") else call error("Called HeroDefinition.setAgilityPerLevel on invalid object.") endif endif call HeroDefinition_setAgilityPerLevel(this_69, data_2) endfunction function HeroDefinition_setHeroAbilities takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "uhab", data_2) endfunction function dispatch_HeroDefinition_setHeroAbilities takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setHeroAbilities") else call error("Called HeroDefinition.setHeroAbilities on invalid object.") endif endif call HeroDefinition_setHeroAbilities(this_69, data_2) endfunction function HeroDefinition_setIntelligencePerLevel takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "uinp", data_2) endfunction function dispatch_HeroDefinition_setIntelligencePerLevel takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setIntelligencePerLevel") else call error("Called HeroDefinition.setIntelligencePerLevel on invalid object.") endif endif call HeroDefinition_setIntelligencePerLevel(this_69, data_2) endfunction function HeroDefinition_setPrimaryAttribute takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "upra", data_2) endfunction function dispatch_HeroDefinition_setPrimaryAttribute takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setPrimaryAttribute") else call error("Called HeroDefinition.setPrimaryAttribute on invalid object.") endif endif call HeroDefinition_setPrimaryAttribute(this_69, data_2) endfunction function HeroDefinition_setProperNames takes integer this_69, string data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setString(W3UDefinition_def[tempIndex], "upro", data_2) endfunction function dispatch_HeroDefinition_setProperNames takes integer this_69, string data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setProperNames") else call error("Called HeroDefinition.setProperNames on invalid object.") endif endif call HeroDefinition_setProperNames(this_69, data_2) endfunction function HeroDefinition_setStartingAgility takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "uagi", data_2) endfunction function dispatch_HeroDefinition_setStartingAgility takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setStartingAgility") else call error("Called HeroDefinition.setStartingAgility on invalid object.") endif endif call HeroDefinition_setStartingAgility(this_69, data_2) endfunction function HeroDefinition_setStartingIntelligence takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "uint", data_2) endfunction function dispatch_HeroDefinition_setStartingIntelligence takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setStartingIntelligence") else call error("Called HeroDefinition.setStartingIntelligence on invalid object.") endif endif call HeroDefinition_setStartingIntelligence(this_69, data_2) endfunction function HeroDefinition_setStartingStrength takes integer this_69, integer data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setInt(W3UDefinition_def[tempIndex], "ustr", data_2) endfunction function dispatch_HeroDefinition_setStartingStrength takes integer this_69, integer data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setStartingStrength") else call error("Called HeroDefinition.setStartingStrength on invalid object.") endif endif call HeroDefinition_setStartingStrength(this_69, data_2) endfunction function HeroDefinition_setStrengthPerLevel takes integer this_69, real data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setUnreal(W3UDefinition_def[tempIndex], "ustp", data_2) endfunction function dispatch_HeroDefinition_setStrengthPerLevel takes integer this_69, real data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroDefinition.setStrengthPerLevel") else call error("Called HeroDefinition.setStrengthPerLevel on invalid object.") endif endif call HeroDefinition_setStrengthPerLevel(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setAttack1ShowUI takes integer this_69, boolean data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setBoolean(W3UDefinition_def[tempIndex], "uwu1", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ShowUI takes integer this_69, boolean data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setAttack1ShowUI") else call error("Called UnitOrBuildingOrHeroDefinition.setAttack1ShowUI on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setAttack1ShowUI(this_69, data_2) endfunction function UnitOrBuildingOrHeroDefinition_setIsaBuilding takes integer this_69, boolean data_2 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setBoolean(W3UDefinition_def[tempIndex], "ubdg", data_2) endfunction function dispatch_UnitOrBuildingOrHeroDefinition_setIsaBuilding takes integer this_69, boolean data_2 returns nothing if W3UDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitOrBuildingOrHeroDefinition.setIsaBuilding") else call error("Called UnitOrBuildingOrHeroDefinition.setIsaBuilding on invalid object.") endif endif call UnitOrBuildingOrHeroDefinition_setIsaBuilding(this_69, data_2) endfunction function int_asFourchar takes integer this_69 returns string local string charMap = ".................................!.#$%&'()*+,-./0123456789:;<=>.@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................." local string result = "" local integer remainingValue = this_69 local integer byteno = 0 local integer charValue loop exitwhen byteno > 3 set charValue = ModuloInteger(remainingValue, 256) set remainingValue = remainingValue / 256 set result = SubString(charMap, charValue, charValue + 1) + result set byteno = byteno + 1 endloop return result endfunction function HeroType_finalize takes integer this_69 returns nothing local integer u_key local integer tempIndex local integer tempTupleSelectionResult_2 local integer temp_tempTupleSelectionResult_2 local integer tempIndex_2 local string tempTupleSelectionResult_1 local string temp_tempTupleSelectionResult_1 local integer tempIndex_3 local string tempTupleSelectionResult_1_2 local string temp_tempTupleSelectionResult_1_2 local integer tempIndex_4 local string tempTupleSelectionResult_1_3 local string temp_tempTupleSelectionResult_1_3 local integer tempIndex_5 local string tempTupleSelectionResult_1_4 local string temp_tempTupleSelectionResult_1_4 local integer tempIndex_6 local string tempTupleSelectionResult_1_5 local string temp_tempTupleSelectionResult_1_5 local integer tempIndex_7 local integer tempTupleSelectionResult_1_6 local integer temp_tempTupleSelectionResult_1_6 local integer tempIndex_8 local integer tempTupleSelectionResult_1_7 local integer temp_tempTupleSelectionResult_1_7 local integer tempIndex_9 local integer tempIndex_10 local integer tempIndex_11 local string tempTupleSelectionResult_1_8 local string temp_tempTupleSelectionResult_1_8 local integer tempIndex_12 local string tempTupleSelectionResult_1_9 local string temp_tempTupleSelectionResult_1_9 local integer temp 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 integer temp_8 local integer temp_9 if MagicFunctions_compiletime then call UnitType_finalize(this_69) call dispatch_HeroDefinition_setHeroAbilities(UnitType_def[this_69], HeroType_heroAbis) call dispatch_HeroDefinition_setStartingStrength(UnitType_def[this_69], 0) call dispatch_HeroDefinition_setStrengthPerLevel(UnitType_def[this_69], 0.) call dispatch_HeroDefinition_setStartingAgility(UnitType_def[this_69], 0) call dispatch_HeroDefinition_setAgilityPerLevel(UnitType_def[this_69], 0.) call dispatch_HeroDefinition_setStartingIntelligence(UnitType_def[this_69], 0) call dispatch_HeroDefinition_setIntelligencePerLevel(UnitType_def[this_69], 0.) call dispatch_HeroDefinition_setPrimaryAttribute(UnitType_def[this_69], "strength") set tempIndex = this_69 set temp_tempTupleSelectionResult_2 = HeroType_properName_2[tempIndex] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 if tempTupleSelectionResult_2 == 0 then call compileError("Missing information: Hero proper name?") endif set temp = UnitType_def[this_69] set tempIndex_2 = this_69 set temp_tempTupleSelectionResult_1 = HeroType_properName[tempIndex_2] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 call dispatch_HeroDefinition_setProperNames(temp, tempTupleSelectionResult_1) call dispatch_BuildingAndHeroDefinition_setHeroAbilities(HeroType_dummyDef[this_69], "") call dispatch_UnitOrBuildingOrHeroDefinition_setNormalAbilities(HeroType_dummyDef[this_69], "AInv,rclk") call dispatch_UnitOrBuildingOrHeroDefinition_setIsaBuilding(HeroType_dummyDef[this_69], true) call dispatch_UnitOrBuildingOrHeroDefinition_setSpeedBase(HeroType_dummyDef[this_69], 0) call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1ShowUI(HeroType_dummyDef[this_69], false) call dispatch_BuildingAndHeroDefinition_setHeroAbilities(HeroType_dummyDef[this_69], HeroType_heroAbis) call dispatch_BuildingAndHeroDefinition_setStartingStrength(HeroType_dummyDef[this_69], 0) call dispatch_BuildingAndHeroDefinition_setStrengthPerLevel(HeroType_dummyDef[this_69], 0.) call dispatch_BuildingAndHeroDefinition_setStartingAgility(HeroType_dummyDef[this_69], 0) call dispatch_BuildingAndHeroDefinition_setAgilityPerLevel(HeroType_dummyDef[this_69], 0.) call dispatch_BuildingAndHeroDefinition_setStartingIntelligence(HeroType_dummyDef[this_69], 0) call dispatch_BuildingAndHeroDefinition_setIntelligencePerLevel(HeroType_dummyDef[this_69], 0.) call dispatch_BuildingAndHeroDefinition_setPrimaryAttribute(HeroType_dummyDef[this_69], "strength") set temp_2 = HeroType_dummyDef[this_69] set tempIndex_3 = this_69 set temp_tempTupleSelectionResult_1_2 = HeroType_properName[tempIndex_3] set tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 call dispatch_BuildingAndHeroDefinition_setProperNames(temp_2, tempTupleSelectionResult_1_2) call dispatch_UnitOrBuildingOrHeroDefinition_setAnimationCastPoint(HeroType_dummyDef[this_69], UnitType_castPoint) set temp_3 = HeroType_dummyDef[this_69] set tempIndex_4 = this_69 set temp_tempTupleSelectionResult_1_3 = UnitType_icon[tempIndex_4] set tempTupleSelectionResult_1_3 = temp_tempTupleSelectionResult_1_3 call dispatch_UnitOrBuildingOrHeroDefinition_setIconGameInterface(temp_3, tempTupleSelectionResult_1_3) call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageBase(HeroType_dummyDef[this_69], UnitType_basicAttack) call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageSidesperDie(HeroType_dummyDef[this_69], UnitType_diceSides) call dispatch_UnitOrBuildingOrHeroDefinition_setAttack1DamageNumberofDice(HeroType_dummyDef[this_69], UnitType_diceCount) set temp_4 = HeroType_dummyDef[this_69] set tempIndex_5 = this_69 set temp_tempTupleSelectionResult_1_4 = UnitType_soundSet[tempIndex_5] set tempTupleSelectionResult_1_4 = temp_tempTupleSelectionResult_1_4 call dispatch_UnitOrBuildingOrHeroDefinition_setUnitSoundSet(temp_4, tempTupleSelectionResult_1_4) set temp_5 = HeroType_dummyDef[this_69] set tempIndex_6 = this_69 set temp_tempTupleSelectionResult_1_5 = UnitType_name[tempIndex_6] set tempTupleSelectionResult_1_5 = temp_tempTupleSelectionResult_1_5 call dispatch_W3UDefinition_setName(temp_5, tempTupleSelectionResult_1_5) call dispatch_UnitOrBuildingOrHeroDefinition_setFoodCost(HeroType_dummyDef[this_69], UnitType_foodCost) set temp_6 = HeroType_dummyDef[this_69] set tempIndex_7 = this_69 set temp_tempTupleSelectionResult_1_6 = UnitType_life[tempIndex_7] set tempTupleSelectionResult_1_6 = temp_tempTupleSelectionResult_1_6 call dispatch_UnitOrBuildingOrHeroDefinition_setHitPointsMaximumBase(temp_6, tempTupleSelectionResult_1_6) set temp_7 = HeroType_dummyDef[this_69] set tempIndex_8 = this_69 set temp_tempTupleSelectionResult_1_7 = UnitType_mana[tempIndex_8] set tempTupleSelectionResult_1_7 = temp_tempTupleSelectionResult_1_7 call dispatch_UnitOrBuildingOrHeroDefinition_setManaMaximum(temp_7, tempTupleSelectionResult_1_7) call dispatch_UnitOrBuildingOrHeroDefinition_setManaInitialAmount(HeroType_dummyDef[this_69], UnitType_startMana) call dispatch_UnitOrBuildingOrHeroDefinition_setSightRadiusDay(HeroType_dummyDef[this_69], 1) call dispatch_UnitOrBuildingOrHeroDefinition_setSightRadiusNight(HeroType_dummyDef[this_69], 1) call dispatch_UnitOrBuildingOrHeroDefinition_setHitPointsRegenerationRate(HeroType_dummyDef[this_69], 0.) call dispatch_UnitOrBuildingOrHeroDefinition_setManaRegeneration(HeroType_dummyDef[this_69], 0.) set tempIndex_9 = HeroType_dummyDef[this_69] call ObjectDefinition_setBoolean(W3UDefinition_def[tempIndex_9], "uhhb", true) set tempIndex_10 = HeroType_dummyDef[this_69] call ObjectDefinition_setBoolean(W3UDefinition_def[tempIndex_10], "uhhd", true) set u_key = createObjectDefinition("w3a", HeroType_morphId[this_69], 1399021878) call ObjectDefinition_setLvlDataString(u_key, "areq", 0, 0, "") call ObjectDefinition_setLvlDataString(u_key, "Cha1", 1, 0, int_asFourchar(UnitType_id[this_69])) call ObjectDefinition_setLvlDataString(u_key, "ansf", 0, 0, "") set temp_8 = u_key set tempIndex_11 = this_69 set temp_tempTupleSelectionResult_1_8 = UnitType_name[tempIndex_11] set tempTupleSelectionResult_1_8 = temp_tempTupleSelectionResult_1_8 call ObjectDefinition_setLvlDataString(temp_8, "anam", 0, 0, "Morphability for " + tempTupleSelectionResult_1_8) else set temp_9 = HeroTypes_heros set tempIndex_12 = this_69 set temp_tempTupleSelectionResult_1_9 = UnitType_name[tempIndex_12] set tempTupleSelectionResult_1_9 = temp_tempTupleSelectionResult_1_9 call dispatch_HashMap_put(temp_9, StringHash(tempTupleSelectionResult_1_9), this_69) endif call UnitType_finalize(this_69) endfunction function dispatch_HeroType_finalize takes integer this_69 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.finalize") else call error("Called HeroType.finalize on invalid object.") endif endif call HeroType_finalize(this_69) endfunction function alloc_HeroType takes nothing returns integer local integer this_69 if UnitType_firstFree == 0 then set UnitType_maxIndex = UnitType_maxIndex + 1 set this_69 = UnitType_maxIndex else set UnitType_firstFree = UnitType_firstFree - 1 set this_69 = UnitType_nextFree[UnitType_firstFree] endif set UnitType_typeId[this_69] = 794 return this_69 endfunction function alloc_HeroDefinition takes nothing returns integer local integer this_69 if W3UDefinition_firstFree == 0 then set W3UDefinition_maxIndex = W3UDefinition_maxIndex + 1 set this_69 = W3UDefinition_maxIndex else set W3UDefinition_firstFree = W3UDefinition_firstFree - 1 set this_69 = W3UDefinition_nextFree[W3UDefinition_firstFree] endif set W3UDefinition_typeId[this_69] = 41 return this_69 endfunction function construct_W3UDefinition takes integer this_69, integer newUnitId, integer origUnitId returns nothing set W3UDefinition_def[this_69] = createObjectDefinition("w3u", newUnitId, origUnitId) endfunction function construct_UnitOrBuildingOrHeroDefinition takes integer this_69, integer newUnitId, integer origUnitId returns nothing call construct_W3UDefinition(this_69, newUnitId, origUnitId) endfunction function construct_UnitOrHeroDefinition takes integer this_69, integer newId, integer origId returns nothing call construct_UnitOrBuildingOrHeroDefinition(this_69, newId, origId) endfunction function construct_HeroDefinition takes integer this_69, integer newId, integer origId returns nothing call construct_UnitOrHeroDefinition(this_69, newId, origId) endfunction function new_HeroDefinition takes integer newId, integer origId returns integer local integer this_69 = alloc_HeroDefinition() call construct_HeroDefinition(this_69, newId, origId) return this_69 endfunction function alloc_StringList takes nothing returns integer local integer this_69 if StringList_firstFree == 0 then set StringList_maxIndex = StringList_maxIndex + 1 set this_69 = StringList_maxIndex else set StringList_firstFree = StringList_firstFree - 1 set this_69 = StringList_nextFree[StringList_firstFree] endif set StringList_typeId[this_69] = 782 return this_69 endfunction function construct_StringList takes integer this_69 returns nothing set StringList_first[this_69] = 0 set StringList_last[this_69] = 0 endfunction function new_StringList takes nothing returns integer local integer this_69 = alloc_StringList() call construct_StringList(this_69) return this_69 endfunction function construct_UnitType2 takes integer this_69, integer id returns nothing local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 local integer tempIndex_7 local integer tempIndex_8 local integer tempIndex_9 local integer tempIndex_10 local integer tempIndex_11 local integer tempIndex_12 local integer tempIndex_13 local integer tempIndex_14 local integer tempIndex_15 local integer tempIndex_16 local integer tempIndex_17 local integer tempIndex_18 local integer tempIndex_19 local integer tempIndex_20 local integer tempIndex_21 local integer tempIndex_22 local integer tempIndex_23 local integer tempIndex_24 local integer tempIndex_25 local integer tempIndex_26 local integer tempIndex_27 local integer tempIndex_28 local integer tempIndex_29 local integer tempIndex_30 local integer tempIndex_31 set UnitType_isHero[this_69] = false set tempIndex = this_69 set UnitType_moveSpeed[tempIndex] = UnitType_basicMovespeed set UnitType_moveSpeed_2[tempIndex] = 2 set UnitType_abis[this_69] = new_StringList() set tempIndex_2 = this_69 set UnitType_walkSpeed[tempIndex_2] = 0. set UnitType_walkSpeed_2[tempIndex_2] = 1 set tempIndex_3 = this_69 set UnitType_runSpeed[tempIndex_3] = 0. set UnitType_runSpeed_2[tempIndex_3] = 1 set tempIndex_4 = this_69 set UnitType_selectionRadius[tempIndex_4] = 0. set UnitType_selectionRadius_2[tempIndex_4] = 1 set tempIndex_5 = this_69 set UnitType_ranged[tempIndex_5] = false set UnitType_ranged_2[tempIndex_5] = 0 set tempIndex_6 = this_69 set UnitType_missleTargetZ[tempIndex_6] = 0. set UnitType_missleTargetZ_2[tempIndex_6] = 3 set tempIndex_7 = this_69 set UnitType_missleStart_x[tempIndex_7] = 0. set UnitType_missleStart_y[tempIndex_7] = 0. set UnitType_missleStart_z[tempIndex_7] = 0. set UnitType_missleStart[tempIndex_7] = 3 set tempIndex_8 = this_69 set UnitType_model[tempIndex_8] = "" set UnitType_model_2[tempIndex_8] = 0 set tempIndex_9 = this_69 set UnitType_shaddowSize_x[tempIndex_9] = 0. set UnitType_shaddowSize_y[tempIndex_9] = 0. set UnitType_shaddowSize[tempIndex_9] = 1 set tempIndex_10 = this_69 set UnitType_shaddowPosFix_x[tempIndex_10] = 0. set UnitType_shaddowPosFix_y[tempIndex_10] = 0. set UnitType_shaddowPosFix[tempIndex_10] = 1 set tempIndex_11 = this_69 set UnitType_scale[tempIndex_11] = 0. set UnitType_scale_2[tempIndex_11] = 1 set tempIndex_12 = this_69 set UnitType_icon[tempIndex_12] = "" set UnitType_icon_2[tempIndex_12] = 0 set tempIndex_13 = this_69 set UnitType_attackBackswingPoint[tempIndex_13] = 0. set UnitType_attackBackswingPoint_2[tempIndex_13] = 0 set tempIndex_14 = this_69 set UnitType_attackDamagePoint[tempIndex_14] = 0. set UnitType_attackDamagePoint_2[tempIndex_14] = 0 set tempIndex_15 = this_69 set UnitType_attack[tempIndex_15] = 0 set UnitType_attack_2[tempIndex_15] = 0 set tempIndex_16 = this_69 set UnitType_missleArc[tempIndex_16] = 0. set UnitType_missleArc_2[tempIndex_16] = 3 set tempIndex_17 = this_69 set UnitType_missleModel[tempIndex_17] = "" set UnitType_missleModel_2[tempIndex_17] = 3 set tempIndex_18 = this_69 set UnitType_missleSpeed[tempIndex_18] = 0 set UnitType_missleSpeed_2[tempIndex_18] = 3 set tempIndex_19 = this_69 set UnitType_attackRange[tempIndex_19] = 0 set UnitType_attackRange_2[tempIndex_19] = 0 set tempIndex_20 = this_69 set UnitType_weaponSound[tempIndex_20] = 0 set UnitType_weaponSound_2[tempIndex_20] = 1 set tempIndex_21 = this_69 set UnitType_armor[tempIndex_21] = 0 set UnitType_armor_2[tempIndex_21] = 0 set tempIndex_22 = this_69 set UnitType_armorType[tempIndex_22] = 0 set UnitType_armorType_2[tempIndex_22] = 1 set tempIndex_23 = this_69 set UnitType_soundSet[tempIndex_23] = "" set UnitType_soundSet_2[tempIndex_23] = 1 set tempIndex_24 = this_69 set UnitType_name[tempIndex_24] = "" set UnitType_name_2[tempIndex_24] = 0 set tempIndex_25 = this_69 set UnitType_collisionSize[tempIndex_25] = 0. set UnitType_collisionSize_2[tempIndex_25] = 1 set tempIndex_26 = this_69 set UnitType_mana[tempIndex_26] = 0 set UnitType_mana_2[tempIndex_26] = 1 set tempIndex_27 = this_69 set UnitType_life[tempIndex_27] = 0 set UnitType_life_2[tempIndex_27] = 0 set tempIndex_28 = this_69 set UnitType_bounty[tempIndex_28] = UnitType_baseBounty set UnitType_bounty_2[tempIndex_28] = 1 set tempIndex_29 = this_69 set UnitType_mass[tempIndex_29] = UnitType_baseMass set UnitType_mass_2[tempIndex_29] = 1 set tempIndex_30 = this_69 set UnitType_radius[tempIndex_30] = UnitType_baseRadius set UnitType_radius_2[tempIndex_30] = 1 set tempIndex_31 = this_69 set UnitType_height[tempIndex_31] = UnitType_baseHeight set UnitType_height_2[tempIndex_31] = 1 set UnitType_id[this_69] = id set UnitType_def[this_69] = new_HeroDefinition(id, UnitType_basicId) endfunction function fourChar takes integer a, integer b_2, integer c, integer d_2 returns integer return ((a * 256 + b_2) * 256 + c) * 256 + d_2 endfunction function nextValid takes integer c returns integer local integer r = c + 1 if r == 95 or r == 44 or r == 34 or r == 92 or r == 45 then set r = r + 1 if r == 95 or r == 44 or r == 34 or r == 92 or r == 45 then set r = r + 1 endif endif return r endfunction function newId takes integer prefix returns integer local integer i local integer j local integer temp if ObjectIdGenerator_helperActivator then set i = 0 loop exitwhen i > 2 if ObjectIdGenerator_id[i] < 126 then set ObjectIdGenerator_id[i] = nextValid(ObjectIdGenerator_id[i]) set j = 0 set temp = i - 1 loop exitwhen j > temp set ObjectIdGenerator_id[j] = 33 set j = j + 1 endloop return fourChar(prefix, ObjectIdGenerator_id[2], ObjectIdGenerator_id[1], ObjectIdGenerator_id[0]) endif set i = i + 1 endloop call error("No vaild id left") endif return 0 endfunction function genHeroId takes nothing returns integer return newId(ObjectIdGenerator_heroPrefix) endfunction function genId takes nothing returns integer return newId(ObjectIdGenerator_nonheroPrefix) endfunction function alloc_BuildingAndHeroDefinition takes nothing returns integer local integer this_69 if W3UDefinition_firstFree == 0 then set W3UDefinition_maxIndex = W3UDefinition_maxIndex + 1 set this_69 = W3UDefinition_maxIndex else set W3UDefinition_firstFree = W3UDefinition_firstFree - 1 set this_69 = W3UDefinition_nextFree[W3UDefinition_firstFree] endif set W3UDefinition_typeId[this_69] = 38 return this_69 endfunction function construct_BuildingAndHeroDefinition takes integer this_69, integer newId_2, integer origId returns nothing call construct_UnitOrBuildingOrHeroDefinition(this_69, newId_2, origId) endfunction function new_BuildingAndHeroDefinition takes integer newId_2, integer origId returns integer local integer this_69 = alloc_BuildingAndHeroDefinition() call construct_BuildingAndHeroDefinition(this_69, newId_2, origId) return this_69 endfunction function construct_HeroType takes integer this_69 returns nothing local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 call construct_UnitType2(this_69, genHeroId()) set tempIndex = this_69 set HeroType_properName[tempIndex] = "" set HeroType_properName_2[tempIndex] = 0 set tempIndex_2 = this_69 set HeroType_captureAnimationIndex[tempIndex_2] = 0 set HeroType_captureAnimationIndex_2[tempIndex_2] = 0 set tempIndex_3 = this_69 set HeroType_standAnimationIndex[tempIndex_3] = 0 set HeroType_standAnimationIndex_2[tempIndex_3] = 0 set tempIndex_4 = this_69 set HeroType_hasPeriodicAnimation[tempIndex_4] = false set HeroType_hasPeriodicAnimation_2[tempIndex_4] = 0 set tempIndex_5 = this_69 set HeroType_captureAnimationSpeed[tempIndex_5] = 0. set HeroType_captureAnimationSpeed_2[tempIndex_5] = 0 set tempIndex_6 = this_69 set HeroType_captureOffset_x[tempIndex_6] = 0. set HeroType_captureOffset_y[tempIndex_6] = 0. set HeroType_captureOffset_z[tempIndex_6] = 0. set HeroType_captureOffset[tempIndex_6] = 0 set HeroType_morphId[this_69] = genId() set HeroType_dummyId[this_69] = genHeroId() set HeroType_dummyDef[this_69] = new_BuildingAndHeroDefinition(HeroType_dummyId[this_69], 1215324524) set UnitType_isHero[this_69] = true endfunction function new_HeroType takes nothing returns integer local integer this_69 = alloc_HeroType() call construct_HeroType(this_69) return this_69 endfunction function HeroInit_initHelper takes nothing returns boolean set HeroInit_t = new_HeroType() call SampleHero_settings(HeroInit_t) call dispatch_HeroType_finalize(HeroInit_t) return true endfunction function SampleMeleeUnit_settings takes integer t returns nothing call dispatch_UnitType_setArmor(t, 5) call dispatch_UnitType_setAttack(t, 10) call dispatch_UnitType_setArmorSoundType(t, 2) call dispatch_UnitType_setAttackBackSwingPoint(t, 0.2) call dispatch_UnitType_setAttackDamagePoint(t, 0.2) call dispatch_UnitType_setAttackRange(t, 100) call dispatch_UnitType_setAttackRangeBuffer(t, 150.) call dispatch_UnitType_setBounty(t, 50) call dispatch_UnitType_setCollisionSize(t, 0.) call dispatch_UnitType_setHeight(t, 0.) call dispatch_UnitType_setIsRanged(t, false) call dispatch_UnitType_setLife(t, 1000) call dispatch_UnitType_setMana(t, 0) call dispatch_UnitType_setMass(t, 1000.) call dispatch_UnitType_setModel(t, "units\\orc\\Grunt\\Grunt") call dispatch_UnitType_setName(t, "testunit") call dispatch_UnitType_setRadius(t, 50.) call dispatch_UnitType_setRunspeed(t, 200.) call dispatch_UnitType_setSelectionRadius(t, 1.) call dispatch_UnitType_setIcon(t, "") call dispatch_UnitType_setWeaptonSound(t, 9) endfunction function dispatch_UnitType_finalize takes integer this_69 returns nothing if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling UnitType.finalize") else call error("Called UnitType.finalize on invalid object.") endif endif if UnitType_typeId[this_69] <= 793 then call UnitType_finalize(this_69) else call HeroType_finalize(this_69) endif endfunction function alloc_UnitType takes nothing returns integer local integer this_69 if UnitType_firstFree == 0 then set UnitType_maxIndex = UnitType_maxIndex + 1 set this_69 = UnitType_maxIndex else set UnitType_firstFree = UnitType_firstFree - 1 set this_69 = UnitType_nextFree[UnitType_firstFree] endif set UnitType_typeId[this_69] = 793 return this_69 endfunction function construct_UnitType takes integer this_69 returns nothing local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 local integer tempIndex_7 local integer tempIndex_8 local integer tempIndex_9 local integer tempIndex_10 local integer tempIndex_11 local integer tempIndex_12 local integer tempIndex_13 local integer tempIndex_14 local integer tempIndex_15 local integer tempIndex_16 local integer tempIndex_17 local integer tempIndex_18 local integer tempIndex_19 local integer tempIndex_20 local integer tempIndex_21 local integer tempIndex_22 local integer tempIndex_23 local integer tempIndex_24 local integer tempIndex_25 local integer tempIndex_26 local integer tempIndex_27 local integer tempIndex_28 local integer tempIndex_29 local integer tempIndex_30 local integer tempIndex_31 set UnitType_isHero[this_69] = false set tempIndex = this_69 set UnitType_moveSpeed[tempIndex] = UnitType_basicMovespeed set UnitType_moveSpeed_2[tempIndex] = 2 set UnitType_abis[this_69] = new_StringList() set tempIndex_2 = this_69 set UnitType_walkSpeed[tempIndex_2] = 0. set UnitType_walkSpeed_2[tempIndex_2] = 1 set tempIndex_3 = this_69 set UnitType_runSpeed[tempIndex_3] = 0. set UnitType_runSpeed_2[tempIndex_3] = 1 set tempIndex_4 = this_69 set UnitType_selectionRadius[tempIndex_4] = 0. set UnitType_selectionRadius_2[tempIndex_4] = 1 set tempIndex_5 = this_69 set UnitType_ranged[tempIndex_5] = false set UnitType_ranged_2[tempIndex_5] = 0 set tempIndex_6 = this_69 set UnitType_missleTargetZ[tempIndex_6] = 0. set UnitType_missleTargetZ_2[tempIndex_6] = 3 set tempIndex_7 = this_69 set UnitType_missleStart_x[tempIndex_7] = 0. set UnitType_missleStart_y[tempIndex_7] = 0. set UnitType_missleStart_z[tempIndex_7] = 0. set UnitType_missleStart[tempIndex_7] = 3 set tempIndex_8 = this_69 set UnitType_model[tempIndex_8] = "" set UnitType_model_2[tempIndex_8] = 0 set tempIndex_9 = this_69 set UnitType_shaddowSize_x[tempIndex_9] = 0. set UnitType_shaddowSize_y[tempIndex_9] = 0. set UnitType_shaddowSize[tempIndex_9] = 1 set tempIndex_10 = this_69 set UnitType_shaddowPosFix_x[tempIndex_10] = 0. set UnitType_shaddowPosFix_y[tempIndex_10] = 0. set UnitType_shaddowPosFix[tempIndex_10] = 1 set tempIndex_11 = this_69 set UnitType_scale[tempIndex_11] = 0. set UnitType_scale_2[tempIndex_11] = 1 set tempIndex_12 = this_69 set UnitType_icon[tempIndex_12] = "" set UnitType_icon_2[tempIndex_12] = 0 set tempIndex_13 = this_69 set UnitType_attackBackswingPoint[tempIndex_13] = 0. set UnitType_attackBackswingPoint_2[tempIndex_13] = 0 set tempIndex_14 = this_69 set UnitType_attackDamagePoint[tempIndex_14] = 0. set UnitType_attackDamagePoint_2[tempIndex_14] = 0 set tempIndex_15 = this_69 set UnitType_attack[tempIndex_15] = 0 set UnitType_attack_2[tempIndex_15] = 0 set tempIndex_16 = this_69 set UnitType_missleArc[tempIndex_16] = 0. set UnitType_missleArc_2[tempIndex_16] = 3 set tempIndex_17 = this_69 set UnitType_missleModel[tempIndex_17] = "" set UnitType_missleModel_2[tempIndex_17] = 3 set tempIndex_18 = this_69 set UnitType_missleSpeed[tempIndex_18] = 0 set UnitType_missleSpeed_2[tempIndex_18] = 3 set tempIndex_19 = this_69 set UnitType_attackRange[tempIndex_19] = 0 set UnitType_attackRange_2[tempIndex_19] = 0 set tempIndex_20 = this_69 set UnitType_weaponSound[tempIndex_20] = 0 set UnitType_weaponSound_2[tempIndex_20] = 1 set tempIndex_21 = this_69 set UnitType_armor[tempIndex_21] = 0 set UnitType_armor_2[tempIndex_21] = 0 set tempIndex_22 = this_69 set UnitType_armorType[tempIndex_22] = 0 set UnitType_armorType_2[tempIndex_22] = 1 set tempIndex_23 = this_69 set UnitType_soundSet[tempIndex_23] = "" set UnitType_soundSet_2[tempIndex_23] = 1 set tempIndex_24 = this_69 set UnitType_name[tempIndex_24] = "" set UnitType_name_2[tempIndex_24] = 0 set tempIndex_25 = this_69 set UnitType_collisionSize[tempIndex_25] = 0. set UnitType_collisionSize_2[tempIndex_25] = 1 set tempIndex_26 = this_69 set UnitType_mana[tempIndex_26] = 0 set UnitType_mana_2[tempIndex_26] = 1 set tempIndex_27 = this_69 set UnitType_life[tempIndex_27] = 0 set UnitType_life_2[tempIndex_27] = 0 set tempIndex_28 = this_69 set UnitType_bounty[tempIndex_28] = UnitType_baseBounty set UnitType_bounty_2[tempIndex_28] = 1 set tempIndex_29 = this_69 set UnitType_mass[tempIndex_29] = UnitType_baseMass set UnitType_mass_2[tempIndex_29] = 1 set tempIndex_30 = this_69 set UnitType_radius[tempIndex_30] = UnitType_baseRadius set UnitType_radius_2[tempIndex_30] = 1 set tempIndex_31 = this_69 set UnitType_height[tempIndex_31] = UnitType_baseHeight set UnitType_height_2[tempIndex_31] = 1 set UnitType_id[this_69] = genId() set UnitType_def[this_69] = new_HeroDefinition(UnitType_id[this_69], UnitType_basicId) endfunction function new_UnitType takes nothing returns integer local integer this_69 = alloc_UnitType() call construct_UnitType(this_69) return this_69 endfunction function UnitInit_initHelper takes nothing returns boolean set UnitInit_t = new_UnitType() call SampleMeleeUnit_settings(UnitInit_t) call dispatch_UnitType_finalize(UnitInit_t) return true endfunction function alloc_Ability takes nothing returns integer local integer this_69 if Ability_firstFree == 0 then set Ability_maxIndex = Ability_maxIndex + 1 set this_69 = Ability_maxIndex else set Ability_firstFree = Ability_firstFree - 1 set this_69 = Ability_nextFree[Ability_firstFree] endif return this_69 endfunction function construct_Ability takes integer this_69, integer id, integer lvl returns nothing set Ability_id[this_69] = id set Ability_lvl[this_69] = lvl endfunction function new_Ability takes integer id, integer lvl returns integer local integer this_69 = alloc_Ability() call construct_Ability(this_69, id, lvl) return this_69 endfunction function addAbilityToPreload takes integer id, integer lvl returns nothing call dispatch_HashList_add(PreloadSystem_abilitysToPreload, new_Ability(id, lvl)) endfunction function ObjectDefinition_setLvlDataInt takes integer this_key, string modification, integer lvl, integer dataPointer, integer value returns nothing endfunction function AbilityDefinitionAgilityBonusPlus1_setAgilityBonus takes integer this_69, integer level, integer value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataInt(AbilityDefinition_def[tempIndex], "Iagi", level, 1, value) endfunction function dispatch_AbilityDefinitionAgilityBonusPlus1_setAgilityBonus takes integer this_69, integer level, integer value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionAgilityBonusPlus1.setAgilityBonus") else call error("Called AbilityDefinitionAgilityBonusPlus1.setAgilityBonus on invalid object.") endif endif call AbilityDefinitionAgilityBonusPlus1_setAgilityBonus(this_69, level, value) endfunction function ObjectDefinition_setLvlDataBoolean takes integer this_key, string modification, integer lvl, integer dataPointer, boolean value returns nothing if value then call ObjectDefinition_setLvlDataInt(this_key, modification, lvl, dataPointer, 1) else call ObjectDefinition_setLvlDataInt(this_key, modification, lvl, dataPointer, 0) endif endfunction function AbilityDefinitionAgilityBonusPlus1_setHideButton takes integer this_69, integer level, boolean value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataBoolean(AbilityDefinition_def[tempIndex], "Ihid", level, 4, value) endfunction function dispatch_AbilityDefinitionAgilityBonusPlus1_setHideButton takes integer this_69, integer level, boolean value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionAgilityBonusPlus1.setHideButton") else call error("Called AbilityDefinitionAgilityBonusPlus1.setHideButton on invalid object.") endif endif call AbilityDefinitionAgilityBonusPlus1_setHideButton(this_69, level, value) endfunction function AbilityDefinition_setEditorSuffix takes integer this_69, string value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "ansf", 0, 0, value) endfunction function dispatch_AbilityDefinition_setEditorSuffix takes integer this_69, string value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setEditorSuffix") else call error("Called AbilityDefinition.setEditorSuffix on invalid object.") endif endif call AbilityDefinition_setEditorSuffix(this_69, value) endfunction function AbilityDefinition_setItemAbility takes integer this_69, boolean value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataBoolean(AbilityDefinition_def[tempIndex], "aite", 0, 0, value) endfunction function dispatch_AbilityDefinition_setItemAbility takes integer this_69, boolean value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setItemAbility") else call error("Called AbilityDefinition.setItemAbility on invalid object.") endif endif call AbilityDefinition_setItemAbility(this_69, value) endfunction function AbilityDefinition_setName takes integer this_69, string value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "anam", 0, 0, value) endfunction function dispatch_AbilityDefinition_setName takes integer this_69, string value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setName") else call error("Called AbilityDefinition.setName on invalid object.") endif endif call AbilityDefinition_setName(this_69, value) endfunction function int_pow takes integer this_69, integer x returns integer local integer result = 1 local integer i = 1 local integer temp = x loop exitwhen i > temp set result = result * this_69 set i = i + 1 endloop return result endfunction function alloc_AbilityDefinitionAgilityBonusPlus1 takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 581 return this_69 endfunction function construct_AbilityDefinition takes integer this_69, integer newAbilityId, integer origAbilityId returns nothing set AbilityDefinition_lvls[this_69] = 1 set AbilityDefinition_tooltipGen[this_69] = 0 set AbilityDefinition_def[this_69] = createObjectDefinition("w3a", newAbilityId, origAbilityId) endfunction function construct_AbilityDefinitionAgilityBonusPlus1 takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095328049) endfunction function new_AbilityDefinitionAgilityBonusPlus1 takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionAgilityBonusPlus1() call construct_AbilityDefinitionAgilityBonusPlus1(this_69, newAbilityId) return this_69 endfunction function agiAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionAgilityBonusPlus1(Setup_agiRaw + i) call dispatch_AbilityDefinitionAgilityBonusPlus1_setAgilityBonus(obj, 1, int_pow(2, i - 97)) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus Agi +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_agiRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionAgilityBonusPlus1(Setup_agiRaw + 45) call dispatch_AbilityDefinitionAgilityBonusPlus1_setHideButton(objN, 1, true) call dispatch_AbilityDefinitionAgilityBonusPlus1_setAgilityBonus(objN, 1, - int_pow(2, Setup_maxBonSize)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus Agi -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) endif call addAbilityToPreload(Setup_agiRaw + 45, 1) endfunction function AbilityDefinitionDefenseBonusPlus1_setDefenseBonus takes integer this_69, integer level, integer value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataInt(AbilityDefinition_def[tempIndex], "Idef", level, 1, value) endfunction function dispatch_AbilityDefinitionDefenseBonusPlus1_setDefenseBonus takes integer this_69, integer level, integer value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionDefenseBonusPlus1.setDefenseBonus") else call error("Called AbilityDefinitionDefenseBonusPlus1.setDefenseBonus on invalid object.") endif endif call AbilityDefinitionDefenseBonusPlus1_setDefenseBonus(this_69, level, value) endfunction function alloc_AbilityDefinitionDefenseBonusPlus1 takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 485 return this_69 endfunction function construct_AbilityDefinitionDefenseBonusPlus1 takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095328817) endfunction function new_AbilityDefinitionDefenseBonusPlus1 takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionDefenseBonusPlus1() call construct_AbilityDefinitionDefenseBonusPlus1(this_69, newAbilityId) return this_69 endfunction function armorAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionDefenseBonusPlus1(Setup_armorRaw + i) call dispatch_AbilityDefinitionDefenseBonusPlus1_setDefenseBonus(obj, 1, int_pow(2, i - 97)) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus Armor +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_armorRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionDefenseBonusPlus1(Setup_armorRaw + 45) call dispatch_AbilityDefinitionDefenseBonusPlus1_setDefenseBonus(objN, 1, - int_pow(2, Setup_maxBonSize)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus Armor -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_armorRaw + 45, 1) endif endfunction function AbilityDefinitionAttackBonusAItf_setAttackBonus takes integer this_69, integer level, integer value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataInt(AbilityDefinition_def[tempIndex], "Iatt", level, 1, value) endfunction function dispatch_AbilityDefinitionAttackBonusAItf_setAttackBonus takes integer this_69, integer level, integer value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionAttackBonusAItf.setAttackBonus") else call error("Called AbilityDefinitionAttackBonusAItf.setAttackBonus on invalid object.") endif endif call AbilityDefinitionAttackBonusAItf_setAttackBonus(this_69, level, value) endfunction function alloc_AbilityDefinitionAttackBonusAItf takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 146 return this_69 endfunction function construct_AbilityDefinitionAttackBonusAItf takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095332966) endfunction function new_AbilityDefinitionAttackBonusAItf takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionAttackBonusAItf() call construct_AbilityDefinitionAttackBonusAItf(this_69, newAbilityId) return this_69 endfunction function attackAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionAttackBonusAItf(Setup_attackRaw + i) call dispatch_AbilityDefinitionAttackBonusAItf_setAttackBonus(obj, 1, int_pow(2, i - 97)) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus Attack +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_attackRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionAttackBonusAItf(Setup_attackRaw + 45) call dispatch_AbilityDefinitionAttackBonusAItf_setAttackBonus(objN, 1, - int_pow(2, Setup_maxBonSize)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus Attack -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_attackRaw + 45, 1) endif endfunction function ObjectDefinition_setLvlDataUnreal takes integer this_key, string modification, integer lvl, integer dataPointer, real value returns nothing endfunction function AbilityDefinitionAttackSpeedIncrease_setAttackSpeedIncrease takes integer this_69, integer level, real value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataUnreal(AbilityDefinition_def[tempIndex], "Isx1", level, 1, value) endfunction function dispatch_AbilityDefinitionAttackSpeedIncrease_setAttackSpeedIncrease takes integer this_69, integer level, real value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionAttackSpeedIncrease.setAttackSpeedIncrease") else call error("Called AbilityDefinitionAttackSpeedIncrease.setAttackSpeedIncrease on invalid object.") endif endif call AbilityDefinitionAttackSpeedIncrease_setAttackSpeedIncrease(this_69, level, value) endfunction function alloc_AbilityDefinitionAttackSpeedIncrease takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 269 return this_69 endfunction function construct_AbilityDefinitionAttackSpeedIncrease takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095332728) endfunction function new_AbilityDefinitionAttackSpeedIncrease takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionAttackSpeedIncrease() call construct_AbilityDefinitionAttackSpeedIncrease(this_69, newAbilityId) return this_69 endfunction function attackSpeedAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionAttackSpeedIncrease(Setup_attackSpeedRaw + i) call dispatch_AbilityDefinitionAttackSpeedIncrease_setAttackSpeedIncrease(obj, 1, int_pow(2, i - 97) * 1. / 100) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus AttackSpeed +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_attackSpeedRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionAttackSpeedIncrease(Setup_attackSpeedRaw + 45) call dispatch_AbilityDefinitionAttackSpeedIncrease_setAttackSpeedIncrease(objN, 1, - (int_pow(2, Setup_maxBonSize) * 1. / 100)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus AttackSpeed -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_attackSpeedRaw + 45, 1) endif endfunction function AbilityDefinitionIntelligenceBonusPlus1_setIntelligenceBonus takes integer this_69, integer level, integer value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataInt(AbilityDefinition_def[tempIndex], "Iint", level, 2, value) endfunction function dispatch_AbilityDefinitionIntelligenceBonusPlus1_setIntelligenceBonus takes integer this_69, integer level, integer value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionIntelligenceBonusPlus1.setIntelligenceBonus") else call error("Called AbilityDefinitionIntelligenceBonusPlus1.setIntelligenceBonus on invalid object.") endif endif call AbilityDefinitionIntelligenceBonusPlus1_setIntelligenceBonus(this_69, level, value) endfunction function alloc_AbilityDefinitionIntelligenceBonusPlus1 takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 605 return this_69 endfunction function construct_AbilityDefinitionIntelligenceBonusPlus1 takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095330097) endfunction function new_AbilityDefinitionIntelligenceBonusPlus1 takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionIntelligenceBonusPlus1() call construct_AbilityDefinitionIntelligenceBonusPlus1(this_69, newAbilityId) return this_69 endfunction function intAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionIntelligenceBonusPlus1(Setup_intRaw + i) call dispatch_AbilityDefinitionIntelligenceBonusPlus1_setIntelligenceBonus(obj, 1, int_pow(2, i - 97)) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus Int +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_intRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionIntelligenceBonusPlus1(Setup_intRaw + 45) call dispatch_AbilityDefinitionIntelligenceBonusPlus1_setIntelligenceBonus(objN, 1, - int_pow(2, Setup_maxBonSize)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus Int -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) endif call addAbilityToPreload(Setup_intRaw + 45, 1) endfunction function AbilityDefinitionMaxLifeBonusLesser_setMaxLifeGained takes integer this_69, integer level, integer value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataInt(AbilityDefinition_def[tempIndex], "Ilif", level, 1, value) endfunction function dispatch_AbilityDefinitionMaxLifeBonusLesser_setMaxLifeGained takes integer this_69, integer level, integer value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionMaxLifeBonusLesser.setMaxLifeGained") else call error("Called AbilityDefinitionMaxLifeBonusLesser.setMaxLifeGained on invalid object.") endif endif call AbilityDefinitionMaxLifeBonusLesser_setMaxLifeGained(this_69, level, value) endfunction function alloc_AbilityDefinitionMaxLifeBonusLesser takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 391 return this_69 endfunction function construct_AbilityDefinitionMaxLifeBonusLesser takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095330865) endfunction function new_AbilityDefinitionMaxLifeBonusLesser takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionMaxLifeBonusLesser() call construct_AbilityDefinitionMaxLifeBonusLesser(this_69, newAbilityId) return this_69 endfunction function lifeAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionMaxLifeBonusLesser(Setup_lifeRaw + i) call dispatch_AbilityDefinitionMaxLifeBonusLesser_setMaxLifeGained(obj, 1, int_pow(2, i - 97)) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus Life +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_lifeRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionMaxLifeBonusLesser(Setup_lifeRaw + 45) call dispatch_AbilityDefinitionMaxLifeBonusLesser_setMaxLifeGained(objN, 1, - int_pow(2, Setup_maxBonSize)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus Life -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_lifeRaw + 45, 1) endif endfunction function AbilityDefinitionNeutralRegenhealthonly_setAmountofHitPointsRegenerated takes integer this_69, integer level, real value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataUnreal(AbilityDefinition_def[tempIndex], "Oar1", level, 1, value) endfunction function dispatch_AbilityDefinitionNeutralRegenhealthonly_setAmountofHitPointsRegenerated takes integer this_69, integer level, real value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionNeutralRegenhealthonly.setAmountofHitPointsRegenerated") else call error("Called AbilityDefinitionNeutralRegenhealthonly.setAmountofHitPointsRegenerated on invalid object.") endif endif call AbilityDefinitionNeutralRegenhealthonly_setAmountofHitPointsRegenerated(this_69, level, value) endfunction function AbilityDefinitionNeutralRegenhealthonly_setPercentage takes integer this_69, integer level, boolean value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataBoolean(AbilityDefinition_def[tempIndex], "Oar2", level, 2, value) endfunction function dispatch_AbilityDefinitionNeutralRegenhealthonly_setPercentage takes integer this_69, integer level, boolean value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionNeutralRegenhealthonly.setPercentage") else call error("Called AbilityDefinitionNeutralRegenhealthonly.setPercentage on invalid object.") endif endif call AbilityDefinitionNeutralRegenhealthonly_setPercentage(this_69, level, value) endfunction function AbilityDefinition_setAreaofEffect takes integer this_69, integer level, real value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataUnreal(AbilityDefinition_def[tempIndex], "aare", level, 0, value) endfunction function dispatch_AbilityDefinition_setAreaofEffect takes integer this_69, integer level, real value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setAreaofEffect") else call error("Called AbilityDefinition.setAreaofEffect on invalid object.") endif endif call AbilityDefinition_setAreaofEffect(this_69, level, value) endfunction function Race_toObjectString takes integer this_69 returns string local string result = "unknown" local integer temp = this_69 if temp == 0 then set result = "commoner" elseif temp == 1 then set result = "creeps" elseif temp == 2 then set result = "critters" elseif temp == 3 then set result = "demon" elseif temp == 4 then set result = "human" elseif temp == 5 then set result = "naga" elseif temp == 6 then set result = "nightelf" elseif temp == 7 then set result = "orc" elseif temp == 8 then set result = "other" elseif temp == 9 then set result = "undead" elseif temp == 10 then set result = "unknown" endif return result endfunction function AbilityDefinition_setRace takes integer this_69, integer rce returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "arac", 0, 0, Race_toObjectString(rce)) endfunction function dispatch_AbilityDefinition_setRace takes integer this_69, integer rce returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setRace") else call error("Called AbilityDefinition.setRace on invalid object.") endif endif call AbilityDefinition_setRace(this_69, rce) endfunction function AbilityDefinition_setTargetsAllowed takes integer this_69, integer level, string value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "atar", level, 0, value) endfunction function dispatch_AbilityDefinition_setTargetsAllowed takes integer this_69, integer level, string value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setTargetsAllowed") else call error("Called AbilityDefinition.setTargetsAllowed on invalid object.") endif endif call AbilityDefinition_setTargetsAllowed(this_69, level, value) endfunction function alloc_AbilityDefinitionNeutralRegenhealthonly takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 346 return this_69 endfunction function construct_AbilityDefinitionNeutralRegenhealthonly takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1094938226) endfunction function new_AbilityDefinitionNeutralRegenhealthonly takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionNeutralRegenhealthonly() call construct_AbilityDefinitionNeutralRegenhealthonly(this_69, newAbilityId) return this_69 endfunction function lifeRegAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionNeutralRegenhealthonly(Setup_lifeRegRaw + i) call dispatch_AbilityDefinition_setRace(obj, 8) call dispatch_AbilityDefinitionNeutralRegenhealthonly_setPercentage(obj, 1, false) call dispatch_AbilityDefinition_setAreaofEffect(obj, 1, 1.) call dispatch_AbilityDefinition_setTargetsAllowed(obj, 1, "self") call dispatch_AbilityDefinitionNeutralRegenhealthonly_setAmountofHitPointsRegenerated(obj, 1, int_pow(2, i - 97) * 0.05) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus LifeReg +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_lifeRegRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionNeutralRegenhealthonly(Setup_lifeRegRaw + 45) call dispatch_AbilityDefinition_setRace(objN, 8) call dispatch_AbilityDefinitionNeutralRegenhealthonly_setPercentage(objN, 1, false) call dispatch_AbilityDefinition_setAreaofEffect(objN, 1, 1.) call dispatch_AbilityDefinition_setTargetsAllowed(objN, 1, "self") call dispatch_AbilityDefinitionNeutralRegenhealthonly_setAmountofHitPointsRegenerated(objN, 1, - (int_pow(2, Setup_maxBonSize) * 0.05)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus LifeReg -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_lifeRegRaw + 45, 1) endif endfunction function AbilityDefinitionMaxManaBonusLeast_setMaxManaGained takes integer this_69, integer level, integer value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataInt(AbilityDefinition_def[tempIndex], "Iman", level, 1, value) endfunction function dispatch_AbilityDefinitionMaxManaBonusLeast_setMaxManaGained takes integer this_69, integer level, integer value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionMaxManaBonusLeast.setMaxManaGained") else call error("Called AbilityDefinitionMaxManaBonusLeast.setMaxManaGained on invalid object.") endif endif call AbilityDefinitionMaxManaBonusLeast_setMaxManaGained(this_69, level, value) endfunction function alloc_AbilityDefinitionMaxManaBonusLeast takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 589 return this_69 endfunction function construct_AbilityDefinitionMaxManaBonusLeast takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095331170) endfunction function new_AbilityDefinitionMaxManaBonusLeast takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionMaxManaBonusLeast() call construct_AbilityDefinitionMaxManaBonusLeast(this_69, newAbilityId) return this_69 endfunction function manaAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionMaxManaBonusLeast(Setup_manaRaw + i) call dispatch_AbilityDefinitionMaxManaBonusLeast_setMaxManaGained(obj, 1, int_pow(2, i - 97)) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus Mana +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_manaRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionMaxManaBonusLeast(Setup_manaRaw + 45) call dispatch_AbilityDefinitionMaxManaBonusLeast_setMaxManaGained(objN, 1, - int_pow(2, Setup_maxBonSize)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus Mana -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_manaRaw + 45, 1) endif endfunction function AbilityDefinitionNeutralRegenmanaonly_setAmountRegenerated takes integer this_69, integer level, real value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataUnreal(AbilityDefinition_def[tempIndex], "Arm1", level, 1, value) endfunction function dispatch_AbilityDefinitionNeutralRegenmanaonly_setAmountRegenerated takes integer this_69, integer level, real value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionNeutralRegenmanaonly.setAmountRegenerated") else call error("Called AbilityDefinitionNeutralRegenmanaonly.setAmountRegenerated on invalid object.") endif endif call AbilityDefinitionNeutralRegenmanaonly_setAmountRegenerated(this_69, level, value) endfunction function AbilityDefinitionNeutralRegenmanaonly_setPercentage takes integer this_69, integer level, boolean value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataBoolean(AbilityDefinition_def[tempIndex], "Arm2", level, 2, value) endfunction function dispatch_AbilityDefinitionNeutralRegenmanaonly_setPercentage takes integer this_69, integer level, boolean value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionNeutralRegenmanaonly.setPercentage") else call error("Called AbilityDefinitionNeutralRegenmanaonly.setPercentage on invalid object.") endif endif call AbilityDefinitionNeutralRegenmanaonly_setPercentage(this_69, level, value) endfunction function alloc_AbilityDefinitionNeutralRegenmanaonly takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 361 return this_69 endfunction function construct_AbilityDefinitionNeutralRegenmanaonly takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095660133) endfunction function new_AbilityDefinitionNeutralRegenmanaonly takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionNeutralRegenmanaonly() call construct_AbilityDefinitionNeutralRegenmanaonly(this_69, newAbilityId) return this_69 endfunction function manaRegAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionNeutralRegenmanaonly(Setup_manaRegRaw + i) call dispatch_AbilityDefinition_setRace(obj, 8) call dispatch_AbilityDefinitionNeutralRegenmanaonly_setPercentage(obj, 1, false) call dispatch_AbilityDefinition_setAreaofEffect(obj, 1, 1.) call dispatch_AbilityDefinition_setTargetsAllowed(obj, 1, "self") call dispatch_AbilityDefinitionNeutralRegenmanaonly_setAmountRegenerated(obj, 1, int_pow(2, i - 97) * 0.05) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus ManaReg +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_manaRegRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionNeutralRegenmanaonly(Setup_manaRegRaw + 45) call dispatch_AbilityDefinition_setRace(objN, 8) call dispatch_AbilityDefinitionNeutralRegenmanaonly_setPercentage(objN, 1, false) call dispatch_AbilityDefinition_setAreaofEffect(objN, 1, 1.) call dispatch_AbilityDefinition_setTargetsAllowed(objN, 1, "self") call dispatch_AbilityDefinitionNeutralRegenmanaonly_setAmountRegenerated(objN, 1, - (int_pow(2, Setup_maxBonSize) * 0.05)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus manaReg -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_manaRegRaw + 45, 1) endif endfunction function permAttackAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer u_key local integer un_key loop exitwhen i > temp if MagicFunctions_compiletime then set u_key = createObjectDefinition("w3a", Setup_permAttackRaw + i, 1095328097) call ObjectDefinition_setLvlDataString(u_key, "anam", 0, 0, "BonusMod - AttackPerm") call ObjectDefinition_setLvlDataString(u_key, "ansf", 0, 0, "(+" + int_toString(int_pow(2, i - 97)) + ")") call ObjectDefinition_setLvlDataString(u_key, "acat", 0, 0, "") call ObjectDefinition_setLvlDataInt(u_key, "Iaa1", 1, 1, int_pow(2, i - 97)) call ObjectDefinition_setLvlDataInt(u_key, "aite", 0, 0, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set un_key = createObjectDefinition("w3a", Setup_permAttackRaw + 67, 1095328097) call ObjectDefinition_setLvlDataString(un_key, "anam", 0, 0, "BonusMod - AttackPerm") call ObjectDefinition_setLvlDataString(un_key, "ansf", 0, 0, "(-" + int_toString(int_pow(2, Setup_maxBonSize)) + ")") call ObjectDefinition_setLvlDataString(un_key, "acat", 0, 0, "") call ObjectDefinition_setLvlDataInt(un_key, "Iaa1", 1, 1, - int_pow(2, Setup_maxBonSize)) call ObjectDefinition_setLvlDataInt(un_key, "aite", 0, 0, 1) endif endfunction function addItemToPreload takes integer id returns nothing call dispatch_HashList_add(PreloadSystem_itemsToPreload, id) endfunction function permAttackItems takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer u_key local integer un_key loop exitwhen i > temp if MagicFunctions_compiletime then set u_key = createObjectDefinition("w3t", Setup_permAttackItemRaw + i, 1953066612) call ObjectDefinition_setString(u_key, "iabi", int_asFourchar(Setup_permAttackRaw + i)) call ObjectDefinition_setString(u_key, "ifil", "none.mdl") call ObjectDefinition_setInt(u_key, "ihtp", 100) call ObjectDefinition_setString(u_key, "iico", "ReplaceableTextures\\CommandButtons\\BTNArcaniteMelee.blp") call ObjectDefinition_setString(u_key, "unam", "Attack Tome +" + int_toString(int_pow(2, i - 97))) call ObjectDefinition_setInt(u_key, "iicd", 1) else call addItemToPreload(Setup_permAttackItemRaw + i) endif set i = i + 1 endloop if MagicFunctions_compiletime then set un_key = createObjectDefinition("w3t", Setup_permAttackItemRaw + 67, 1953066612) call ObjectDefinition_setString(un_key, "iabi", int_asFourchar(Setup_permAttackRaw + 67)) call ObjectDefinition_setString(un_key, "ifil", "none.mdl") call ObjectDefinition_setInt(un_key, "ihtp", 100) call ObjectDefinition_setString(un_key, "iico", "ReplaceableTextures\\CommandButtons\\BTNArcaniteMelee.blp") call ObjectDefinition_setString(un_key, "unam", "Attack Tome -" + int_toString(int_pow(2, Setup_maxBonSize))) call ObjectDefinition_setInt(un_key, "iicd", 1) else call addItemToPreload(Setup_permAttackItemRaw + 67) endif endfunction function AbilityDefinitionStrengthBonusPlus1_setStrengthBonus takes integer this_69, integer level, integer value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataInt(AbilityDefinition_def[tempIndex], "Istr", level, 3, value) endfunction function dispatch_AbilityDefinitionStrengthBonusPlus1_setStrengthBonus takes integer this_69, integer level, integer value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionStrengthBonusPlus1.setStrengthBonus") else call error("Called AbilityDefinitionStrengthBonusPlus1.setStrengthBonus on invalid object.") endif endif call AbilityDefinitionStrengthBonusPlus1_setStrengthBonus(this_69, level, value) endfunction function alloc_AbilityDefinitionStrengthBonusPlus1 takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 639 return this_69 endfunction function construct_AbilityDefinitionStrengthBonusPlus1 takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095332657) endfunction function new_AbilityDefinitionStrengthBonusPlus1 takes integer newAbilityId returns integer local integer this_69 = alloc_AbilityDefinitionStrengthBonusPlus1() call construct_AbilityDefinitionStrengthBonusPlus1(this_69, newAbilityId) return this_69 endfunction function strAbilitys takes nothing returns nothing local integer i = 97 local integer temp = 97 + (Setup_maxBonSize - 1) local integer obj local integer objN loop exitwhen i > temp if MagicFunctions_compiletime then set obj = new_AbilityDefinitionStrengthBonusPlus1(Setup_strRaw + i) call dispatch_AbilityDefinitionStrengthBonusPlus1_setStrengthBonus(obj, 1, int_pow(2, i - 97)) call dispatch_AbilityDefinition_setItemAbility(obj, false) call dispatch_AbilityDefinition_setName(obj, "Bonus Str +") call dispatch_AbilityDefinition_setEditorSuffix(obj, int_toString(int_pow(2, i - 97))) else call addAbilityToPreload(Setup_strRaw + i, 1) endif set i = i + 1 endloop if MagicFunctions_compiletime then set objN = new_AbilityDefinitionStrengthBonusPlus1(Setup_strRaw + 45) call dispatch_AbilityDefinitionStrengthBonusPlus1_setStrengthBonus(objN, 1, - int_pow(2, Setup_maxBonSize)) call dispatch_AbilityDefinition_setItemAbility(objN, false) call dispatch_AbilityDefinition_setName(objN, "Bonus Str -") call dispatch_AbilityDefinition_setEditorSuffix(objN, int_toString(int_pow(2, Setup_maxBonSize))) else call addAbilityToPreload(Setup_strRaw + 45, 1) endif endfunction function createObjects takes nothing returns nothing call lifeAbilitys() call manaAbilitys() call agiAbilitys() call strAbilitys() call intAbilitys() call attackAbilitys() call attackSpeedAbilitys() call armorAbilitys() call lifeRegAbilitys() call manaRegAbilitys() call permAttackItems() call permAttackAbilitys() endfunction function alloc_BasicSpellDef takes nothing returns integer local integer this_69 if BasicSpellDef_firstFree == 0 then set BasicSpellDef_maxIndex = BasicSpellDef_maxIndex + 1 set this_69 = BasicSpellDef_maxIndex else set BasicSpellDef_firstFree = BasicSpellDef_firstFree - 1 set this_69 = BasicSpellDef_nextFree[BasicSpellDef_firstFree] endif return this_69 endfunction function AbilityDefinition_setHeroAbility takes integer this_69, boolean value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataBoolean(AbilityDefinition_def[tempIndex], "aher", 0, 0, value) endfunction function dispatch_AbilityDefinition_setHeroAbility takes integer this_69, boolean value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setHeroAbility") else call error("Called AbilityDefinition.setHeroAbility on invalid object.") endif endif call AbilityDefinition_setHeroAbility(this_69, value) endfunction function alloc_Closure_5 takes nothing returns integer local integer this_69 if BooleanLevelClosure_firstFree == 0 then set BooleanLevelClosure_maxIndex = BooleanLevelClosure_maxIndex + 1 set this_69 = BooleanLevelClosure_maxIndex else set BooleanLevelClosure_firstFree = BooleanLevelClosure_firstFree - 1 set this_69 = BooleanLevelClosure_nextFree[BooleanLevelClosure_firstFree] endif set BooleanLevelClosure_typeId[this_69] = 26 return this_69 endfunction function alloc_Closure_6 takes nothing returns integer local integer this_69 if RealLevelClosure_firstFree == 0 then set RealLevelClosure_maxIndex = RealLevelClosure_maxIndex + 1 set this_69 = RealLevelClosure_maxIndex else set RealLevelClosure_firstFree = RealLevelClosure_firstFree - 1 set this_69 = RealLevelClosure_nextFree[RealLevelClosure_firstFree] endif set RealLevelClosure_typeId[this_69] = 22 return this_69 endfunction function alloc_Closure_7 takes nothing returns integer local integer this_69 if RealLevelClosure_firstFree == 0 then set RealLevelClosure_maxIndex = RealLevelClosure_maxIndex + 1 set this_69 = RealLevelClosure_maxIndex else set RealLevelClosure_firstFree = RealLevelClosure_firstFree - 1 set this_69 = RealLevelClosure_nextFree[RealLevelClosure_firstFree] endif set RealLevelClosure_typeId[this_69] = 24 return this_69 endfunction function closure_impl_73 takes integer this_69, integer lvl returns real return 0. endfunction function closure_impl_74 takes integer this_69, integer lvl returns real return 0. endfunction function closure_impl_75 takes integer this_69, integer i returns integer return 0 endfunction function dispatch_RealLevelClosure_run takes integer this_69, integer lvl returns real local real run_result if RealLevelClosure_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling RealLevelClosure.run") else call error("Called RealLevelClosure.run on invalid object.") endif endif if RealLevelClosure_typeId[this_69] <= 23 then if RealLevelClosure_typeId[this_69] <= 22 then set run_result = closure_impl_73(this_69, lvl) else set run_result = closure_impl_75(this_69, lvl) endif else set run_result = closure_impl_74(this_69, lvl) endif return run_result endfunction function ObjectDefinition_setLevelsDataUnreal takes integer this_key, string modification, integer maxLevel, integer dataPointer, integer lc_4 returns nothing local integer i = 1 local integer temp = maxLevel loop exitwhen i > temp call ObjectDefinition_setLvlDataUnreal(this_key, modification, i, dataPointer, dispatch_RealLevelClosure_run(lc_4, i)) set i = i + 1 endloop endfunction function alloc_Closure_8 takes nothing returns integer local integer this_69 if StringLevelClosure_firstFree == 0 then set StringLevelClosure_maxIndex = StringLevelClosure_maxIndex + 1 set this_69 = StringLevelClosure_maxIndex else set StringLevelClosure_firstFree = StringLevelClosure_firstFree - 1 set this_69 = StringLevelClosure_nextFree[StringLevelClosure_firstFree] endif set StringLevelClosure_typeId[this_69] = 2 return this_69 endfunction function string_substring takes string this_69, integer start, integer stop returns string return SubString(this_69, start, stop) endfunction function string_endsWith takes string this_69, string s returns boolean local integer l = string_length(this_69) return string_substring(this_69, l - string_length(s), l) == s endfunction function AbilityTooltipGenerator_fixValue takes string value returns string local string s = value if string_endsWith(s, ".") then set s = string_substring(s, 0, string_length(s) - 1) elseif string_length(s) > 1 and string_endsWith(s, ".0") then set s = string_substring(s, 0, string_length(s) - 2) endif return s endfunction function AbilityTooltipGenerator_titles_set takes integer instanceId, integer arrayIndex, string value returns nothing if arrayIndex < 0 or arrayIndex >= 10 then call error("Index out of Bounds") elseif arrayIndex <= 4 then if arrayIndex <= 2 then if arrayIndex <= 1 then if arrayIndex <= 0 then endif endif elseif arrayIndex <= 3 then endif elseif arrayIndex <= 7 then if arrayIndex <= 6 then if arrayIndex <= 5 then endif endif elseif arrayIndex <= 8 then endif endfunction function AbilityTooltipGenerator_values_get takes integer index1, integer index2 returns string local string returnVal if index2 < 0 or index2 >= 10 then call error("Index out of Bounds") elseif index2 <= 4 then if index2 <= 2 then if index2 <= 1 then if index2 <= 0 then set returnVal = AbilityTooltipGenerator_values_0[index1] else set returnVal = AbilityTooltipGenerator_values_1[index1] endif else set returnVal = AbilityTooltipGenerator_values_2[index1] endif elseif index2 <= 3 then set returnVal = AbilityTooltipGenerator_values_3[index1] else set returnVal = AbilityTooltipGenerator_values_4[index1] endif elseif index2 <= 7 then if index2 <= 6 then if index2 <= 5 then set returnVal = AbilityTooltipGenerator_values_5[index1] else set returnVal = AbilityTooltipGenerator_values_6[index1] endif else set returnVal = AbilityTooltipGenerator_values_7[index1] endif elseif index2 <= 8 then set returnVal = AbilityTooltipGenerator_values_8[index1] else set returnVal = AbilityTooltipGenerator_values_9[index1] endif return returnVal endfunction function AbilityTooltipGenerator_values_set takes integer instanceId, integer arrayIndex, string value returns nothing if arrayIndex < 0 or arrayIndex >= 10 then call error("Index out of Bounds") elseif arrayIndex <= 4 then if arrayIndex <= 2 then if arrayIndex <= 1 then if arrayIndex <= 0 then set AbilityTooltipGenerator_values_0[instanceId] = value else set AbilityTooltipGenerator_values_1[instanceId] = value endif else set AbilityTooltipGenerator_values_2[instanceId] = value endif elseif arrayIndex <= 3 then set AbilityTooltipGenerator_values_3[instanceId] = value else set AbilityTooltipGenerator_values_4[instanceId] = value endif elseif arrayIndex <= 7 then if arrayIndex <= 6 then if arrayIndex <= 5 then set AbilityTooltipGenerator_values_5[instanceId] = value else set AbilityTooltipGenerator_values_6[instanceId] = value endif else set AbilityTooltipGenerator_values_7[instanceId] = value endif elseif arrayIndex <= 8 then set AbilityTooltipGenerator_values_8[instanceId] = value else set AbilityTooltipGenerator_values_9[instanceId] = value endif endfunction function boolean_toString takes boolean this_69 returns string if this_69 then return "true" endif return "false" endfunction function closure_impl_76 takes integer this_69, integer lvl returns boolean return false endfunction function dispatch_BooleanLevelClosure_run takes integer this_69, integer lvl returns boolean local boolean run_result if BooleanLevelClosure_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling BooleanLevelClosure.run") else call error("Called BooleanLevelClosure.run on invalid object.") endif endif set run_result = closure_impl_76(this_69, lvl) return run_result endfunction function closure_impl_77 takes integer this_69, integer lvl returns string return boolean_toString(dispatch_BooleanLevelClosure_run(lc_3[this_69], lvl)) endfunction function real_toString takes real this_69 returns string return R2S(this_69) endfunction function closure_impl_78 takes integer this_69, integer lvl returns string return real_toString(dispatch_RealLevelClosure_run(lc_2[this_69], lvl)) endfunction function closure_impl_79 takes integer this_69, integer lvl returns string return int_toString(Spell_fLearnId) endfunction function closure_impl_80 takes integer this_69, integer lvl returns string return int_toString(Spell_dLearnId) endfunction function closure_impl_81 takes integer this_69, integer lvl returns string return int_toString(Spell_rLearnId) endfunction function closure_impl_82 takes integer this_69, integer lvl returns string return int_toString(Spell_dSpellId) endfunction function closure_impl_83 takes integer this_69, integer lvl returns string return int_toString(Spell_wSpellId) endfunction function closure_impl_84 takes integer this_69, integer lvl returns string return int_toString(Spell_qLearnId) endfunction function closure_impl_85 takes integer this_69, integer lvl returns integer return ChannelAbilityPreset_optionval[this[this_69]] endfunction function closure_impl_86 takes integer this_69, integer lvl returns integer return ttype[this_69] + 0 endfunction function dispatch_IntLevelClosure_run takes integer this_69, integer lvl returns integer local integer run_result if IntLevelClosure_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling IntLevelClosure.run") else call error("Called IntLevelClosure.run on invalid object.") endif endif if IntLevelClosure_typeId[this_69] <= 19 then set run_result = closure_impl_86(this_69, lvl) else set run_result = closure_impl_85(this_69, lvl) endif return run_result endfunction function closure_impl_87 takes integer this_69, integer lvl returns string return int_toString(dispatch_IntLevelClosure_run(lc[this_69], lvl)) endfunction function closure_impl_88 takes integer this_69, integer lvl returns string return int_toString(Spell_qSpellId) endfunction function closure_impl_89 takes integer this_69, integer lvl returns string return int_toString(Spell_wLearnId) endfunction function OrderStringFactory_getOrderString takes integer this_69, boolean recycle returns string set OrderStringFactory_counter[this_69] = OrderStringFactory_counter[this_69] + 1 if OrderStringFactory_counter[this_69] > 347 then if recycle then set OrderStringFactory_counter[this_69] = 0 else call error("Cannot get more than 347 Orders from an OrderStringFactory") endif endif return OrderStringFactory_orderStrings[OrderStringFactory_counter[this_69]] endfunction function dispatch_OrderStringFactory_getOrderString takes integer this_69, boolean recycle returns string local string getOrderString_result if OrderStringFactory_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling OrderStringFactory.getOrderString") else call error("Called OrderStringFactory.getOrderString on invalid object.") endif endif set getOrderString_result = OrderStringFactory_getOrderString(this_69, recycle) return getOrderString_result endfunction function closure_impl_90 takes integer this_69, integer lvl returns string return dispatch_OrderStringFactory_getOrderString(ChannelAbilityPreset_odf, true) endfunction function closure_impl_91 takes integer this_69, integer lvl returns string return int_toString(Spell_eLearnId) endfunction function closure_impl_92 takes integer this_69, integer lvl returns string return int_toString(Spell_fSpellId) endfunction function closure_impl_93 takes integer this_69, integer lvl returns string return int_toString(Spell_rSpellId) endfunction function closure_impl_94 takes integer this_69, integer lvl returns string return int_toString(Spell_eSpellId) endfunction function dispatch_StringLevelClosure_run takes integer this_69, integer lvl returns string local string run_result if StringLevelClosure_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling StringLevelClosure.run") else call error("Called StringLevelClosure.run on invalid object.") endif endif if StringLevelClosure_typeId[this_69] <= 9 then if StringLevelClosure_typeId[this_69] <= 5 then if StringLevelClosure_typeId[this_69] <= 3 then if StringLevelClosure_typeId[this_69] <= 2 then set run_result = closure_impl_78(this_69, lvl) else set run_result = closure_impl_79(this_69, lvl) endif elseif StringLevelClosure_typeId[this_69] <= 4 then set run_result = closure_impl_90(this_69, lvl) else set run_result = closure_impl_94(this_69, lvl) endif elseif StringLevelClosure_typeId[this_69] <= 7 then if StringLevelClosure_typeId[this_69] <= 6 then set run_result = closure_impl_93(this_69, lvl) else set run_result = closure_impl_81(this_69, lvl) endif elseif StringLevelClosure_typeId[this_69] <= 8 then set run_result = closure_impl_83(this_69, lvl) else set run_result = closure_impl_77(this_69, lvl) endif elseif StringLevelClosure_typeId[this_69] <= 13 then if StringLevelClosure_typeId[this_69] <= 11 then if StringLevelClosure_typeId[this_69] <= 10 then set run_result = closure_impl_89(this_69, lvl) else set run_result = closure_impl_84(this_69, lvl) endif elseif StringLevelClosure_typeId[this_69] <= 12 then set run_result = closure_impl_92(this_69, lvl) else set run_result = closure_impl_87(this_69, lvl) endif elseif StringLevelClosure_typeId[this_69] <= 15 then if StringLevelClosure_typeId[this_69] <= 14 then set run_result = closure_impl_88(this_69, lvl) else set run_result = closure_impl_91(this_69, lvl) endif elseif StringLevelClosure_typeId[this_69] <= 16 then set run_result = closure_impl_82(this_69, lvl) else set run_result = closure_impl_80(this_69, lvl) endif return run_result endfunction function AbilityTooltipGenerator_addProperty takes integer this_69, string title, integer lc_4 returns nothing local integer i local integer temp if AbilityTooltipGenerator_titleCount[this_69] >= AbilityTooltipGenerator_MAX_TITLES then call error("Maximum titles reached") endif call AbilityTooltipGenerator_titles_set(this_69, AbilityTooltipGenerator_titleCount[this_69], AbilityTooltipGenerator_TITLE_COLOR + title + "|r ") call AbilityTooltipGenerator_values_set(this_69, AbilityTooltipGenerator_titleCount[this_69], "") set i = 1 set temp = AbilityTooltipGenerator_maxLevel[this_69] loop exitwhen i > temp call AbilityTooltipGenerator_values_set(this_69, AbilityTooltipGenerator_titleCount[this_69], AbilityTooltipGenerator_values_get(this_69, AbilityTooltipGenerator_titleCount[this_69]) + AbilityTooltipGenerator_fixValue(dispatch_StringLevelClosure_run(lc_4, i)) + "/") set i = i + 1 endloop call AbilityTooltipGenerator_values_set(this_69, AbilityTooltipGenerator_titleCount[this_69], string_substring(AbilityTooltipGenerator_values_get(this_69, AbilityTooltipGenerator_titleCount[this_69]), 0, string_length(AbilityTooltipGenerator_values_get(this_69, AbilityTooltipGenerator_titleCount[this_69])) - 1)) set AbilityTooltipGenerator_titleCount[this_69] = AbilityTooltipGenerator_titleCount[this_69] + 1 endfunction function dispatch_AbilityTooltipGenerator_addProperty takes integer this_69, string title, integer lc_4 returns nothing if AbilityTooltipGenerator_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityTooltipGenerator.addProperty") else call error("Called AbilityTooltipGenerator.addProperty on invalid object.") endif endif call AbilityTooltipGenerator_addProperty(this_69, title, lc_4) endfunction function AbilityDefinition_addTooltipProperty takes integer this_69, string pName, integer lc_4 returns nothing if AbilityDefinition_tooltipGen[this_69] != 0 then call dispatch_AbilityTooltipGenerator_addProperty(AbilityDefinition_tooltipGen[this_69], pName, lc_4) endif endfunction function dispatch_AbilityDefinition_addTooltipProperty takes integer this_69, string pName, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.addTooltipProperty") else call error("Called AbilityDefinition.addTooltipProperty on invalid object.") endif endif call AbilityDefinition_addTooltipProperty(this_69, pName, lc_4) endfunction function AbilityDefinition_addTooltipProperty_2 takes integer this_69, string pName, integer lc_4 returns nothing local integer temp = this_69 local string temp_2 = pName local integer clVar = alloc_Closure_8() set lc_2[clVar] = lc_4 call dispatch_AbilityDefinition_addTooltipProperty(temp, temp_2, clVar) endfunction function dispatch_AbilityDefinition_addTooltipProperty_2 takes integer this_69, string pName, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.addTooltipProperty") else call error("Called AbilityDefinition.addTooltipProperty on invalid object.") endif endif call AbilityDefinition_addTooltipProperty_2(this_69, pName, lc_4) endfunction function AbilityDefinitionIllidanChannel_presetArtDuration takes integer this_69, integer lc_4 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLevelsDataUnreal(AbilityDefinition_def[tempIndex], "Ncl4", AbilityDefinition_lvls[this_69], 4, lc_4) call dispatch_AbilityDefinition_addTooltipProperty_2(this_69, "ArtDuration", lc_4) endfunction function dispatch_AbilityDefinitionIllidanChannel_presetArtDuration takes integer this_69, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionIllidanChannel.presetArtDuration") else call error("Called AbilityDefinitionIllidanChannel.presetArtDuration on invalid object.") endif endif call AbilityDefinitionIllidanChannel_presetArtDuration(this_69, lc_4) endfunction function ObjectDefinition_setLevelsDataBoolean takes integer this_key, string modification, integer maxLevel, integer dataPointer, integer lc_4 returns nothing local integer i = 1 local integer temp = maxLevel loop exitwhen i > temp call ObjectDefinition_setLvlDataBoolean(this_key, modification, i, dataPointer, dispatch_BooleanLevelClosure_run(lc_4, i)) set i = i + 1 endloop endfunction function alloc_Closure_9 takes nothing returns integer local integer this_69 if StringLevelClosure_firstFree == 0 then set StringLevelClosure_maxIndex = StringLevelClosure_maxIndex + 1 set this_69 = StringLevelClosure_maxIndex else set StringLevelClosure_firstFree = StringLevelClosure_firstFree - 1 set this_69 = StringLevelClosure_nextFree[StringLevelClosure_firstFree] endif set StringLevelClosure_typeId[this_69] = 9 return this_69 endfunction function AbilityDefinition_addTooltipProperty_3 takes integer this_69, string pName, integer lc_4 returns nothing local integer temp = this_69 local string temp_2 = pName local integer clVar = alloc_Closure_9() set lc_3[clVar] = lc_4 call dispatch_AbilityDefinition_addTooltipProperty(temp, temp_2, clVar) endfunction function dispatch_AbilityDefinition_addTooltipProperty_3 takes integer this_69, string pName, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.addTooltipProperty") else call error("Called AbilityDefinition.addTooltipProperty on invalid object.") endif endif call AbilityDefinition_addTooltipProperty_3(this_69, pName, lc_4) endfunction function AbilityDefinitionIllidanChannel_presetDisableOtherAbilities takes integer this_69, integer lc_4 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLevelsDataBoolean(AbilityDefinition_def[tempIndex], "Ncl5", AbilityDefinition_lvls[this_69], 5, lc_4) call dispatch_AbilityDefinition_addTooltipProperty_3(this_69, "DisableOtherAbilities", lc_4) endfunction function dispatch_AbilityDefinitionIllidanChannel_presetDisableOtherAbilities takes integer this_69, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionIllidanChannel.presetDisableOtherAbilities") else call error("Called AbilityDefinitionIllidanChannel.presetDisableOtherAbilities on invalid object.") endif endif call AbilityDefinitionIllidanChannel_presetDisableOtherAbilities(this_69, lc_4) endfunction function AbilityDefinitionIllidanChannel_presetFollowThroughTime takes integer this_69, integer lc_4 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLevelsDataUnreal(AbilityDefinition_def[tempIndex], "Ncl1", AbilityDefinition_lvls[this_69], 1, lc_4) call dispatch_AbilityDefinition_addTooltipProperty_2(this_69, "FollowThroughTime", lc_4) endfunction function dispatch_AbilityDefinitionIllidanChannel_presetFollowThroughTime takes integer this_69, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionIllidanChannel.presetFollowThroughTime") else call error("Called AbilityDefinitionIllidanChannel.presetFollowThroughTime on invalid object.") endif endif call AbilityDefinitionIllidanChannel_presetFollowThroughTime(this_69, lc_4) endfunction function AbilityDefinition_setArtCaster takes integer this_69, string value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "acat", 0, 0, value) endfunction function dispatch_AbilityDefinition_setArtCaster takes integer this_69, string value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setArtCaster") else call error("Called AbilityDefinition.setArtCaster on invalid object.") endif endif call AbilityDefinition_setArtCaster(this_69, value) endfunction function AbilityDefinition_setArtEffect takes integer this_69, string value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "aeat", 0, 0, value) endfunction function dispatch_AbilityDefinition_setArtEffect takes integer this_69, string value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setArtEffect") else call error("Called AbilityDefinition.setArtEffect on invalid object.") endif endif call AbilityDefinition_setArtEffect(this_69, value) endfunction function AbilityDefinition_setArtSpecial takes integer this_69, string value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "asat", 0, 0, value) endfunction function dispatch_AbilityDefinition_setArtSpecial takes integer this_69, string value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setArtSpecial") else call error("Called AbilityDefinition.setArtSpecial on invalid object.") endif endif call AbilityDefinition_setArtSpecial(this_69, value) endfunction function AbilityDefinition_setArtTarget takes integer this_69, string value returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLvlDataString(AbilityDefinition_def[tempIndex], "atat", 0, 0, value) endfunction function dispatch_AbilityDefinition_setArtTarget takes integer this_69, string value returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.setArtTarget") else call error("Called AbilityDefinition.setArtTarget on invalid object.") endif endif call AbilityDefinition_setArtTarget(this_69, value) endfunction function alloc_Closure_10 takes nothing returns integer local integer this_69 if IntLevelClosure_firstFree == 0 then set IntLevelClosure_maxIndex = IntLevelClosure_maxIndex + 1 set this_69 = IntLevelClosure_maxIndex else set IntLevelClosure_firstFree = IntLevelClosure_firstFree - 1 set this_69 = IntLevelClosure_nextFree[IntLevelClosure_firstFree] endif set IntLevelClosure_typeId[this_69] = 20 return this_69 endfunction function ObjectDefinition_setLevelsDataInt takes integer this_key, string modification, integer maxLevel, integer dataPointer, integer lc_4 returns nothing local integer i = 1 local integer temp = maxLevel loop exitwhen i > temp call ObjectDefinition_setLvlDataInt(this_key, modification, i, dataPointer, dispatch_IntLevelClosure_run(lc_4, i)) set i = i + 1 endloop endfunction function alloc_Closure_11 takes nothing returns integer local integer this_69 if StringLevelClosure_firstFree == 0 then set StringLevelClosure_maxIndex = StringLevelClosure_maxIndex + 1 set this_69 = StringLevelClosure_maxIndex else set StringLevelClosure_firstFree = StringLevelClosure_firstFree - 1 set this_69 = StringLevelClosure_nextFree[StringLevelClosure_firstFree] endif set StringLevelClosure_typeId[this_69] = 13 return this_69 endfunction function AbilityDefinition_addTooltipProperty_4 takes integer this_69, string pName, integer lc_4 returns nothing local integer temp = this_69 local string temp_2 = pName local integer clVar = alloc_Closure_11() set lc[clVar] = lc_4 call dispatch_AbilityDefinition_addTooltipProperty(temp, temp_2, clVar) endfunction function dispatch_AbilityDefinition_addTooltipProperty_4 takes integer this_69, string pName, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinition.addTooltipProperty") else call error("Called AbilityDefinition.addTooltipProperty on invalid object.") endif endif call AbilityDefinition_addTooltipProperty_4(this_69, pName, lc_4) endfunction function AbilityDefinitionIllidanChannel_presetOptions takes integer this_69, integer lc_4 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLevelsDataInt(AbilityDefinition_def[tempIndex], "Ncl3", AbilityDefinition_lvls[this_69], 3, lc_4) call dispatch_AbilityDefinition_addTooltipProperty_4(this_69, "Options", lc_4) endfunction function dispatch_AbilityDefinitionIllidanChannel_presetOptions takes integer this_69, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionIllidanChannel.presetOptions") else call error("Called AbilityDefinitionIllidanChannel.presetOptions on invalid object.") endif endif call AbilityDefinitionIllidanChannel_presetOptions(this_69, lc_4) endfunction function ChannelAbilityPreset_presetOption takes integer this_69, integer opt, boolean flag returns nothing local integer temp = opt local integer clVar local integer temp_2 if temp == 0 then set ChannelAbilityPreset_VISIBLE[this_69] = flag if ChannelAbilityPreset_VISIBLE[this_69] then set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] + ChannelAbilityPreset_visibleval else set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] - ChannelAbilityPreset_visibleval endif elseif temp == 1 then if ChannelAbilityPreset_VISIBLE[this_69] then set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] + ChannelAbilityPreset_targetimageval else set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] - ChannelAbilityPreset_targetimageval endif elseif temp == 2 then if ChannelAbilityPreset_VISIBLE[this_69] then set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] + ChannelAbilityPreset_physicalspellval else set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] - ChannelAbilityPreset_physicalspellval endif elseif temp == 3 then if ChannelAbilityPreset_VISIBLE[this_69] then set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] + ChannelAbilityPreset_universalspellval else set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] - ChannelAbilityPreset_universalspellval endif elseif temp == 4 then if ChannelAbilityPreset_VISIBLE[this_69] then set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] + ChannelAbilityPreset_uniquecastval else set ChannelAbilityPreset_optionval[this_69] = ChannelAbilityPreset_optionval[this_69] - ChannelAbilityPreset_uniquecastval endif endif set temp_2 = this_69 set clVar = alloc_Closure_10() set this[clVar] = this_69 call dispatch_AbilityDefinitionIllidanChannel_presetOptions(temp_2, clVar) endfunction function dispatch_ChannelAbilityPreset_presetOption takes integer this_69, integer opt, boolean flag returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ChannelAbilityPreset.presetOption") else call error("Called ChannelAbilityPreset.presetOption on invalid object.") endif endif call ChannelAbilityPreset_presetOption(this_69, opt, flag) endfunction function ChannelAbilityPreset_removeChannelProperties takes integer this_69, boolean removeVisuals, boolean makeVisible returns nothing local integer temp = this_69 local integer clVar = alloc_Closure_5() local integer clVar_2 local integer clVar_3 local integer temp_2 local integer temp_3 call dispatch_AbilityDefinitionIllidanChannel_presetDisableOtherAbilities(temp, clVar) set temp_2 = this_69 set clVar_2 = alloc_Closure_7() call dispatch_AbilityDefinitionIllidanChannel_presetFollowThroughTime(temp_2, clVar_2) set temp_3 = this_69 set clVar_3 = alloc_Closure_6() call dispatch_AbilityDefinitionIllidanChannel_presetArtDuration(temp_3, clVar_3) if makeVisible then call dispatch_ChannelAbilityPreset_presetOption(this_69, 0, true) endif if removeVisuals then call dispatch_AbilityDefinition_setArtCaster(this_69, "") call dispatch_AbilityDefinition_setArtEffect(this_69, "") call dispatch_AbilityDefinition_setArtSpecial(this_69, "") call dispatch_AbilityDefinition_setArtTarget(this_69, "") endif endfunction function dispatch_ChannelAbilityPreset_removeChannelProperties takes integer this_69, boolean removeVisuals, boolean makeVisible returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ChannelAbilityPreset.removeChannelProperties") else call error("Called ChannelAbilityPreset.removeChannelProperties on invalid object.") endif endif call ChannelAbilityPreset_removeChannelProperties(this_69, removeVisuals, makeVisible) endfunction function alloc_ArrayList takes nothing returns integer local integer this_69 if ArrayList_firstFree == 0 then set ArrayList_maxIndex = ArrayList_maxIndex + 1 set this_69 = ArrayList_maxIndex else set ArrayList_firstFree = ArrayList_firstFree - 1 set this_69 = ArrayList_nextFree[ArrayList_firstFree] endif set ArrayList_typeId[this_69] = 786 return this_69 endfunction function ArrayList_alloc takes integer this_69, integer f, integer allocCapacity returns nothing set FreeNode_dataPos[f] = FreeNode_dataPos[f] + allocCapacity set FreeNode_size[f] = FreeNode_size[f] - allocCapacity endfunction function dispatch_ArrayList_alloc takes integer this_69, integer f, integer allocCapacity returns nothing if ArrayList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ArrayList.alloc") else call error("Called ArrayList.alloc on invalid object.") endif endif call ArrayList_alloc(this_69, f, allocCapacity) endfunction function ArrayList_alloc_2 takes integer this_69, integer allocCapacity returns nothing local integer f = ArrayList_freeList loop exitwhen not true if FreeNode_size[f] >= allocCapacity then call dispatch_ArrayList_alloc(this_69, f, allocCapacity) return endif set f = FreeNode_next[f] if f == ArrayList_freeList then exitwhen true endif endloop call error("Could not allocate enough space.") endfunction function dispatch_ArrayList_alloc_2 takes integer this_69, integer allocCapacity returns nothing if ArrayList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ArrayList.alloc") else call error("Called ArrayList.alloc on invalid object.") endif endif call ArrayList_alloc_2(this_69, allocCapacity) endfunction function construct_ArrayList takes integer this_69 returns nothing call dispatch_ArrayList_alloc_2(this_69, 4) endfunction function new_ArrayList takes nothing returns integer local integer this_69 = alloc_ArrayList() call construct_ArrayList(this_69) return this_69 endfunction function alloc_ChannelAbilityPreset takes nothing returns integer local integer this_69 if AbilityDefinition_firstFree == 0 then set AbilityDefinition_maxIndex = AbilityDefinition_maxIndex + 1 set this_69 = AbilityDefinition_maxIndex else set AbilityDefinition_firstFree = AbilityDefinition_firstFree - 1 set this_69 = AbilityDefinition_nextFree[AbilityDefinition_firstFree] endif set AbilityDefinition_typeId[this_69] = 477 return this_69 endfunction function alloc_Closure_12 takes nothing returns integer local integer this_69 if StringLevelClosure_firstFree == 0 then set StringLevelClosure_maxIndex = StringLevelClosure_maxIndex + 1 set this_69 = StringLevelClosure_maxIndex else set StringLevelClosure_firstFree = StringLevelClosure_firstFree - 1 set this_69 = StringLevelClosure_nextFree[StringLevelClosure_firstFree] endif set StringLevelClosure_typeId[this_69] = 4 return this_69 endfunction function construct_AbilityDefinitionIllidanChannel takes integer this_69, integer newAbilityId returns nothing call construct_AbilityDefinition(this_69, newAbilityId, 1095656300) endfunction function ObjectDefinition_setLevelsDataString takes integer this_key, string modification, integer maxLevel, integer dataPointer, integer lc_4 returns nothing local integer i = 1 local integer temp = maxLevel loop exitwhen i > temp call ObjectDefinition_setLvlDataString(this_key, modification, i, dataPointer, dispatch_StringLevelClosure_run(lc_4, i)) set i = i + 1 endloop endfunction function AbilityDefinitionIllidanChannel_presetBaseOrderID takes integer this_69, integer lc_4 returns nothing local integer tempIndex = this_69 call ObjectDefinition_setLevelsDataString(AbilityDefinition_def[tempIndex], "Ncl6", AbilityDefinition_lvls[this_69], 6, lc_4) call dispatch_AbilityDefinition_addTooltipProperty(this_69, "BaseOrderID", lc_4) endfunction function dispatch_AbilityDefinitionIllidanChannel_presetBaseOrderID takes integer this_69, integer lc_4 returns nothing if AbilityDefinition_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling AbilityDefinitionIllidanChannel.presetBaseOrderID") else call error("Called AbilityDefinitionIllidanChannel.presetBaseOrderID on invalid object.") endif endif call AbilityDefinitionIllidanChannel_presetBaseOrderID(this_69, lc_4) endfunction function construct_ChannelAbilityPreset takes integer this_69, integer newId_2, integer lvls returns nothing local integer clVar local integer temp call construct_AbilityDefinitionIllidanChannel(this_69, newId_2) set ChannelAbilityPreset_optionval[this_69] = 0 set AbilityDefinition_lvls[this_69] = lvls set temp = this_69 set clVar = alloc_Closure_12() call dispatch_AbilityDefinitionIllidanChannel_presetBaseOrderID(temp, clVar) endfunction function new_ChannelAbilityPreset takes integer newId_2, integer lvls returns integer local integer this_69 = alloc_ChannelAbilityPreset() call construct_ChannelAbilityPreset(this_69, newId_2, lvls) return this_69 endfunction function construct_BasicSpellDef takes integer this_69 returns nothing call new_ArrayList() set BasicSpellDef_spell[this_69] = new_ChannelAbilityPreset(genId(), 11) call dispatch_ChannelAbilityPreset_removeChannelProperties(BasicSpellDef_spell[this_69], true, true) call dispatch_AbilityDefinition_setHeroAbility(BasicSpellDef_spell[this_69], false) set BasicSpellDef_learn[this_69] = new_ChannelAbilityPreset(genId(), 10) call dispatch_ChannelAbilityPreset_removeChannelProperties(BasicSpellDef_learn[this_69], true, true) call dispatch_AbilityDefinition_setHeroAbility(BasicSpellDef_learn[this_69], false) endfunction function new_BasicSpellDef takes nothing returns integer local integer this_69 = alloc_BasicSpellDef() call construct_BasicSpellDef(this_69) return this_69 endfunction function test takes nothing returns nothing call new_BasicSpellDef() endfunction function addDestructableToPreload takes integer id returns nothing call dispatch_HashList_add(PreloadSystem_destructablesToPreload, id) endfunction function real_toInt takes real this_69 returns integer return R2I(this_69) endfunction function addIconType takes string name, string iconPath returns nothing local integer icon1 = genId() local integer icon2 = genId() local integer u_key if not MagicFunctions_compiletime then call dispatch_HashMap_put(IconType_iconMap1, StringHash(name), icon1) call dispatch_HashMap_put(IconType_iconMap2, StringHash(name), icon2) call addDestructableToPreload(icon1) call addDestructableToPreload(icon2) else set u_key = createObjectDefinition("w3b", icon1, 1498704994) call ObjectDefinition_setReal(u_key, "bgsc", 0.0) call ObjectDefinition_setString(u_key, "bshd", "") call ObjectDefinition_setInt(u_key, "bcpd", 0) call ObjectDefinition_setString(u_key, "bsuf", "Icon") call ObjectDefinition_setUnreal(u_key, "boch", 0.0) call ObjectDefinition_setUnreal(u_key, "bsel", 0.0) call ObjectDefinition_setString(u_key, "bfil", "war3mapImported\\ButtonC.mdl") call ObjectDefinition_setString(u_key, "bnam", name) call ObjectDefinition_setString(u_key, "barm", "Ethereal") call ObjectDefinition_setString(u_key, "btar", "") call ObjectDefinition_setInt(u_key, "bcpr", 0) call ObjectDefinition_setString(u_key, "bptx", "") call ObjectDefinition_setInt(u_key, "btxi", 31) call ObjectDefinition_setString(u_key, "btxf", iconPath) set u_key = createObjectDefinition("w3b", icon2, 1498704994) call ObjectDefinition_setReal(u_key, "bgsc", 0.0) call ObjectDefinition_setString(u_key, "bshd", "") call ObjectDefinition_setInt(u_key, "bcpd", 0) call ObjectDefinition_setString(u_key, "bsuf", "Icon") call ObjectDefinition_setUnreal(u_key, "boch", 0.0) call ObjectDefinition_setUnreal(u_key, "bsel", 0.0) call ObjectDefinition_setString(u_key, "bfil", "war3mapImported\\ButtonC.mdl") call ObjectDefinition_setString(u_key, "bnam", name) call ObjectDefinition_setString(u_key, "barm", "Ethereal") call ObjectDefinition_setString(u_key, "btar", "") call ObjectDefinition_setInt(u_key, "bcpr", 0) call ObjectDefinition_setString(u_key, "bptx", "") call ObjectDefinition_setInt(u_key, "btxi", 31) call ObjectDefinition_setString(u_key, "btxf", iconPath) call ObjectDefinition_setInt(u_key, "bvcr", real_toInt(255. * IconType_restColor)) call ObjectDefinition_setInt(u_key, "bvcg", real_toInt(255. * IconType_restColor)) call ObjectDefinition_setInt(u_key, "bvcb", real_toInt(255. * IconType_restColor)) endif endfunction function types takes nothing returns nothing call addIconType("RingDesCrigges", "ReplaceableTextures\\CommandButtons\\BTNSlow.blp") call addIconType("3M1", "ReplaceableTextures\\CommandButtons\\BTN3M1.blp") call addIconType("Bash", "ReplaceableTextures\\CommandButtons\\BTNBash.blp") call addIconType("Glove", "ReplaceableTextures\\CommandButtons\\BTNGlove.blp") call addIconType("Buy", "menuBuy.blp") endfunction function addTipType takes string name, string content returns nothing local integer tip = genId() local integer u_key if not MagicFunctions_compiletime then call dispatch_HashMap_put(ToolTipTypes_tipMap, StringHash(name), tip) call addDestructableToPreload(tip) else set u_key = createObjectDefinition("w3b", tip, 1498704994) call ObjectDefinition_setReal(u_key, "bgsc", 0.01) call ObjectDefinition_setString(u_key, "bshd", "") call ObjectDefinition_setInt(u_key, "bcpd", 0) call ObjectDefinition_setString(u_key, "bsuf", "Tip") call ObjectDefinition_setUnreal(u_key, "boch", 0.0) call ObjectDefinition_setUnreal(u_key, "bsel", 0.0) call ObjectDefinition_setString(u_key, "bfil", "war3mapImported\\ButtonC2.mdl") call ObjectDefinition_setString(u_key, "bnam", content) call ObjectDefinition_setString(u_key, "barm", "Ethereal") call ObjectDefinition_setString(u_key, "btar", "") call ObjectDefinition_setInt(u_key, "bcpr", 0) call ObjectDefinition_setString(u_key, "bptx", "") call ObjectDefinition_setInt(u_key, "btxi", 31) call ObjectDefinition_setString(u_key, "btxf", "Alphaicon.blp") call ObjectDefinition_setBoolean(u_key, "bgse", true) call ObjectDefinition_setUnreal(u_key, "bmas", 5.) call ObjectDefinition_setUnreal(u_key, "bmis", 5.) endif endfunction function types_2 takes nothing returns nothing call addTipType("test", "|cffb9d1eaHarry Potter is a series of seven epic fantasy|nnovels written by the British author J. K.|nRowling.|n|n|cff98fb98+60 Movement Speed|n+50 Traction|n+2% Critical Hit Chance|n|n|cfff0e68cActive Ability:|nThe series was originally printed in English by|ntwo major publishers, Bloomsbury in the United|nKingdom and Scholastic Press in the United States.|nThe books have since been published by many|npublishers worldwide. The books, with the seventh|nbook split into two parts.|n|cff00ffffCooldown 30sec.|nBuy it or die!") call addTipType("test2", "|cffffa500[Q]|r |cff7cfc00Poinson Shot|r |cff696969(Skillshot, Point Target)|r|n|n|cfff0f8ff[Level 1]|r|nThe Pathfinder shoots a poisonous arrow.|nIf it hits an enemy unit, this units gets|na damage over time effect and movement slow.|n") endfunction function types2 takes nothing returns nothing call addIconType("Grunt", "ReplaceableTextures\\CommandButtons\\BTNGrunt.blp") call addIconType("HealingSpray", "ReplaceableTextures\\CommandButtons\\BTNHealingSpray.blp") call addIconType("Hex", "ReplaceableTextures\\CommandButtons\\BTNHex.blp") call addIconType("Hydra", "ReplaceableTextures\\CommandButtons\\BTNHydra.blp") call addIconType("Impale", "ReplaceableTextures\\CommandButtons\\BTNImpale.blp") call addIconType("ManaStone", "ReplaceableTextures\\CommandButtons\\BTNManaStone.blp") endfunction function closure_impl_95 takes integer this_69 returns nothing call createObjects() call test() call HeroInit_initHelper() call UnitInit_initHelper() call types() call types2() call types_2() endfunction function closure_impl_96 takes integer this_69 returns nothing local integer tempIndex local real tempTupleSelectionResult_1 local real temp_tempTupleSelectionResult_1 local integer tempIndex_2 local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local integer temp local real temp_2 local integer temp_3 call RemoveDestructable(ControlPoint_mainCrystal[this_9[this_69]]) set temp_3 = this_9[this_69] set temp = newCrystalId_3[this_69] set tempIndex = this_9[this_69] set temp_tempTupleSelectionResult_1 = ControlPoint_pos2[tempIndex] set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 set temp_2 = tempTupleSelectionResult_1 - 10. set tempIndex_2 = this_9[this_69] set temp_tempTupleSelectionResult_2 = ControlPoint_pos2_2[tempIndex_2] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set ControlPoint_mainCrystal[temp_3] = CreateDestructableZ(temp, temp_2, tempTupleSelectionResult_2, z_3[this_69] + ControlPoint_height - 35., 0., ControlPoint_decoCrystalInsideScale, 0) endfunction function closure_impl_97 takes integer this_69 returns nothing set Unit_bonusMovespeed[this_42[this_69]] = Unit_bonusMovespeed[this_42[this_69]] - amount_32[this_69] call dispatch_Unit_updateMovespeed(this_42[this_69]) endfunction function alloc_Closure_13 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 742 return this_69 endfunction function alloc_Closure_14 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 737 return this_69 endfunction function alloc_Closure_15 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 711 return this_69 endfunction function getTerrainZ_2 takes real x, real y returns real call MoveLocation(Terrain_tempLoc, x, y) return GetLocationZ(Terrain_tempLoc) endfunction function createLightning takes string typ, real pos1_x, real pos1_y, real pos1_z, real pos2_x, real pos2_y, real pos2_z returns lightning return AddLightningEx(typ, true, pos1_x, pos1_y, pos1_z + getTerrainZ_2(pos1_x, pos1_y), pos2_x, pos2_y, pos2_z + getTerrainZ_2(pos2_x, pos2_y)) endfunction function alloc_Fx takes nothing returns integer local integer this_69 if Fx_firstFree == 0 then set Fx_maxIndex = Fx_maxIndex + 1 set this_69 = Fx_maxIndex else set Fx_firstFree = Fx_firstFree - 1 set this_69 = Fx_nextFree[Fx_firstFree] endif set Fx_typeId[this_69] = 778 return this_69 endfunction function createUnit takes player p_2, integer unitId, real pos_x, real pos_y, real facing_radians returns unit return CreateUnit(p_2, unitId, pos_x, pos_y, angle_degrees(facing_radians)) endfunction function unit_setXY_2 takes unit this_69, real pos_x, real pos_y returns nothing call SetUnitX(this_69, pos_x) call SetUnitY(this_69, pos_y) endfunction function createDummy takes real pos_x, real pos_y, player owner, real facing_radians returns unit local unit u_2 = createUnit(owner, Basics_DUMMY_UNIT_ID, pos_x, pos_y, facing_radians) local unit receiver = u_2 local unit receiver_2 local unit receiver_3 local unit receiver_4 call unit_setXY_2(receiver, pos_x, pos_y) set receiver_2 = receiver call unit_addAbility(receiver_2, Basics_HEIGHT_ENABLER) set receiver_3 = receiver_2 call unit_removeAbility(receiver_3, Basics_HEIGHT_ENABLER) set receiver_4 = receiver_3 call unit_addAbility(receiver_4, Basics_LOCUST_ID) set createDummytempReturn = u_2 set u_2 = null set receiver = null set receiver_2 = null set receiver_3 = null set receiver_4 = null return createDummytempReturn endfunction function ArrayQueue_units_get takes integer index1, integer index2 returns unit local unit returnVal if index2 < 0 or index2 >= 6 then call error("Index out of Bounds") elseif index2 <= 2 then if index2 <= 1 then if index2 <= 0 then set returnVal = ArrayQueue_units_0[index1] else set returnVal = ArrayQueue_units_1[index1] endif else set returnVal = ArrayQueue_units_2[index1] endif elseif index2 <= 4 then if index2 <= 3 then set returnVal = ArrayQueue_units_3[index1] else set returnVal = ArrayQueue_units_4[index1] endif else set returnVal = ArrayQueue_units_5[index1] endif set ArrayQueue_units_gettempReturn = returnVal set returnVal = null return ArrayQueue_units_gettempReturn endfunction function ArrayQueue_dequeue takes integer this_69 returns unit if ArrayQueue_size[this_69] > 0 then set ArrayQueue_size[this_69] = ArrayQueue_size[this_69] - 1 set ArrayQueue_fp[this_69] = ModuloInteger(ArrayQueue_fp[this_69] + 1, NewDummyRecycler_SAVED_UNITS_PER_ANGLE) return ArrayQueue_units_get(this_69, ArrayQueue_fp[this_69]) else call error("Queue empty") return null endif endfunction function dispatch_ArrayQueue_dequeue takes integer this_69 returns unit local unit dequeue_result if ArrayQueue_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ArrayQueue.dequeue") else call error("Called ArrayQueue.dequeue on invalid object.") endif endif set dequeue_result = ArrayQueue_dequeue(this_69) set dispatch_ArrayQueue_dequeuetempReturn = dequeue_result set dequeue_result = null return dispatch_ArrayQueue_dequeuetempReturn endfunction function unit_unpause takes unit this_69 returns nothing call PauseUnit(this_69, false) endfunction function DummyRecycler_get takes real pos_x, real pos_y, real a_radians returns unit local integer angleIndex = real_toInt(real_toInt(ModuloReal(angle_degrees(a_radians), 360.)) / NewDummyRecycler_ANGLE_DEGREE) local unit receiver local unit receiver_2 if ArrayQueue_size[DummyRecycler_angleQueues[angleIndex]] > 0 then set receiver = dispatch_ArrayQueue_dequeue(DummyRecycler_angleQueues[angleIndex]) call unit_setXY_2(receiver, pos_x, pos_y) set receiver_2 = receiver call unit_unpause(receiver_2) set DummyRecycler_gettempReturn = receiver_2 set receiver = null set receiver_2 = null return DummyRecycler_gettempReturn else set receiver = null set receiver_2 = null return createDummy(pos_x, pos_y, Basics_DUMMY_PLAYER, a_radians) endif endfunction function unit_addEffect takes unit this_69, string fx_2, string attachment returns effect return AddSpecialEffectTarget(fx_2, this_69, attachment) endfunction function Fx_setFx takes integer this_69, string newpath returns nothing if Fx_fx[this_69] != null then call effect_destr(Fx_fx[this_69]) endif if newpath == "" then set Fx_fx[this_69] = null else set Fx_fx[this_69] = unit_addEffect(Fx_dummy[this_69], newpath, "origin") endif endfunction function dispatch_Fx_setFx takes integer this_69, string newpath returns nothing if Fx_typeId[this_69] == 0 then if this_69 == 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_69, newpath) endfunction function Fx_setZ takes integer this_69, real z_4 returns nothing call unit_setFlyHeight(Fx_dummy[this_69], z_4, 0.) endfunction function dispatch_Fx_setZ takes integer this_69, real z_4 returns nothing if Fx_typeId[this_69] == 0 then if this_69 == 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_69, z_4) endfunction function construct_Fx5 takes integer this_69, real pos_x, real pos_y, real pos_z, real facing_radians, string fxpath returns nothing set Fx_dummy[this_69] = null set Fx_fx[this_69] = null set Fx_dummy[this_69] = DummyRecycler_get(vec3_toVec2(pos_x, pos_y, pos_z), vec3_toVec2_return_y, facing_radians) call dispatch_Fx_setZ(this_69, pos_z) call dispatch_Fx_setFx(this_69, fxpath) endfunction function new_Fx takes real pos_x, real pos_y, real pos_z, real facing_radians, string fxpath returns integer local integer this_69 = alloc_Fx() call construct_Fx5(this_69, pos_x, pos_y, pos_z, facing_radians, fxpath) return this_69 endfunction function closure_impl_98 takes integer this_69 returns nothing local integer wurst__iterator3 local destructable des_2 local real desPos_x local real desPos_y local real desPos_z local lightning ls_2 local integer sideCrystalFx_2 local integer clVar local integer clVar_2 local integer clVar_3 local real temp_desPos_x local real temp_desPos_y local real temp_desPos_z local integer tempIndex local integer tempIndex_2 local string temp local real temp_2 local real temp_3 local real temp_4 call dispatch_Fx_destroyFx(mainCrystalFx[this_69]) set wurst__iterator3 = dispatch_LinkedList_iterator(tempOutsideCrystals[this_69]) loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator3) set des_2 = destructableFromIndex(dispatch_LLIterator_next(wurst__iterator3)) set temp_desPos_x = destructable_getX(des_2) set temp_desPos_y = destructable_getY(des_2) set temp_desPos_z = 110. set desPos_x = temp_desPos_x set desPos_y = temp_desPos_y set desPos_z = temp_desPos_z set temp = lightningId[this_69] set temp_2 = desPos_x set temp_3 = desPos_y set temp_4 = desPos_z set tempIndex = this_8[this_69] set ls_2 = createLightning(temp, temp_2, temp_3, temp_4, ControlPoint_pos3[tempIndex], ControlPoint_pos3_2[tempIndex], ControlPoint_pos3_3[tempIndex]) set sideCrystalFx_2 = new_Fx(desPos_x, desPos_y, desPos_z, real_asAngleDegrees(0.), effectPath[this_69]) set clVar = alloc_Closure_14() set des[clVar] = des_2 set this_6[clVar] = this_8[this_69] set newCrystalId[clVar] = newCrystalId_2[this_69] set tempIndex_2 = clVar set desPos[tempIndex_2] = desPos_x set desPos_2[tempIndex_2] = desPos_y set desPos_3[tempIndex_2] = desPos_z set z[clVar] = z_2[this_69] set tempGlowMarkers[clVar] = tempGlowMarkers_2[this_69] set newDecoId[clVar] = newDecoId_2[this_69] call doAfter(0.5, clVar) set clVar_2 = alloc_Closure_13() set ls[clVar_2] = ls_2 set sideCrystalFx[clVar_2] = sideCrystalFx_2 call doAfter(1., clVar_2) endloop call dispatch_LLIterator_close(wurst__iterator3) set clVar_3 = alloc_Closure_15() set this_7[clVar_3] = this_8[this_69] call doAfter(1., clVar_3) set des_2 = null set ls_2 = null endfunction function closure_impl_99 takes integer this_69 returns nothing call dispatch_Action_destroyAction(Unit_action[this_62[this_69]]) endfunction function alloc_Closure_16 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 702 return this_69 endfunction function alloc_Closure_17 takes nothing returns integer local integer this_69 if Bonus_firstFree == 0 then set Bonus_maxIndex = Bonus_maxIndex + 1 set this_69 = Bonus_maxIndex else set Bonus_firstFree = Bonus_firstFree - 1 set this_69 = Bonus_nextFree[Bonus_firstFree] endif set Bonus_typeId[this_69] = 809 return this_69 endfunction function Unit_bonusArmor_2 takes integer this_69, real amount_51 returns integer local integer clVar set Unit_bonusArmor[this_69] = Unit_bonusArmor[this_69] + amount_51 call dispatch_Unit_updateArmor(this_69) set clVar = alloc_Closure_17() set this_31[clVar] = this_69 set amount_21[clVar] = amount_51 return clVar endfunction function dispatch_Unit_bonusArmor takes integer this_69, real amount_51 returns integer local integer bonusArmor_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.bonusArmor") else call error("Called Unit.bonusArmor on invalid object.") endif endif set bonusArmor_result = Unit_bonusArmor_2(this_69, amount_51) return bonusArmor_result endfunction function Hero_addArmor takes integer this_69, real amount_51 returns nothing local integer b_2 local integer clVar if not Hero_onAdd[this_69] then set Hero_onAdd[this_69] = true set Unit_armor[this_69] = Unit_armor[this_69] + amount_51 call Unit_addAttack(this_69, I2R( - Hero_attackBuffer[this_69])) call dispatch_Unit_updateState(this_69, 0, Setup_armorRaw) call dispatch_Unit_updateState(this_69, 0, Setup_lifeRaw) call dispatch_Unit_updateState(this_69, 0, Setup_manaRaw) set b_2 = dispatch_Unit_bonusArmor(this_69, amount_51 - Hero_armorBuffer[this_69]) call unit_addAbility(Unit_u[this_69], HeroType_morphId[Hero_htyp[this_69]]) set Hero_armorBuffer[this_69] = Hero_armorBuffer[this_69] + roundReal(amount_51) set clVar = alloc_Closure_16() set this_64[clVar] = this_69 set b[clVar] = b_2 call doAfter(0.025, clVar) else call printError("Armor was added while morphing") endif endfunction function dispatch_Hero_addArmor takes integer this_69, real amount_51 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.addArmor") else call error("Called Hero.addArmor on invalid object.") endif endif call Hero_addArmor(this_69, amount_51) endfunction function closure_impl_100 takes integer this_69 returns nothing call dispatch_Hero_addArmor(this_65[this_69], dispatch_UnitType_getArmor(Hero_htyp[this_65[this_69]]) * 1.) endfunction function dispatch_CallbackSingle_call takes integer this_69 returns nothing if CallbackSingle_typeId[this_69] == 0 then if this_69 == 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_69] <= 723 then if CallbackSingle_typeId[this_69] <= 712 then if CallbackSingle_typeId[this_69] <= 707 then if CallbackSingle_typeId[this_69] <= 704 then if CallbackSingle_typeId[this_69] <= 703 then if CallbackSingle_typeId[this_69] <= 702 then call closure_impl_38(this_69) else call closure_impl_60(this_69) endif else call closure_impl_61(this_69) endif elseif CallbackSingle_typeId[this_69] <= 706 then if CallbackSingle_typeId[this_69] <= 705 then call closure_impl_9(this_69) else call closure_impl_3(this_69) endif else call closure_impl_40(this_69) endif elseif CallbackSingle_typeId[this_69] <= 710 then if CallbackSingle_typeId[this_69] <= 709 then if CallbackSingle_typeId[this_69] <= 708 then call closure_impl_64(this_69) else call closure_impl_4(this_69) endif else call closure_impl_70(this_69) endif elseif CallbackSingle_typeId[this_69] <= 711 then call closure_impl_71(this_69) else call closure_impl_43(this_69) endif elseif CallbackSingle_typeId[this_69] <= 718 then if CallbackSingle_typeId[this_69] <= 715 then if CallbackSingle_typeId[this_69] <= 714 then if CallbackSingle_typeId[this_69] <= 713 then call closure_impl_62(this_69) else call closure_impl_100(this_69) endif else call closure_impl_42(this_69) endif elseif CallbackSingle_typeId[this_69] <= 717 then if CallbackSingle_typeId[this_69] <= 716 then call closure_impl_54(this_69) else call closure_impl_65(this_69) endif else call closure_impl_5(this_69) endif elseif CallbackSingle_typeId[this_69] <= 721 then if CallbackSingle_typeId[this_69] <= 720 then if CallbackSingle_typeId[this_69] <= 719 then call closure_impl_6(this_69) else call closure_impl_97(this_69) endif else call closure_impl_99(this_69) endif elseif CallbackSingle_typeId[this_69] <= 722 then call closure_impl_72(this_69) else call closure_impl_68(this_69) endif elseif CallbackSingle_typeId[this_69] <= 734 then if CallbackSingle_typeId[this_69] <= 729 then if CallbackSingle_typeId[this_69] <= 726 then if CallbackSingle_typeId[this_69] <= 725 then if CallbackSingle_typeId[this_69] <= 724 then call closure_impl_63(this_69) else call closure_impl_69(this_69) endif else call closure_impl_41(this_69) endif elseif CallbackSingle_typeId[this_69] <= 728 then if CallbackSingle_typeId[this_69] <= 727 then call closure_impl_39(this_69) else call closure_impl_55(this_69) endif else call closure_impl_11(this_69) endif elseif CallbackSingle_typeId[this_69] <= 732 then if CallbackSingle_typeId[this_69] <= 731 then if CallbackSingle_typeId[this_69] <= 730 then call closure_impl_67(this_69) else call closure_impl_95(this_69) endif else call closure_impl_10(this_69) endif elseif CallbackSingle_typeId[this_69] <= 733 then call closure_impl_12(this_69) else call closure_impl_56(this_69) endif elseif CallbackSingle_typeId[this_69] <= 740 then if CallbackSingle_typeId[this_69] <= 737 then if CallbackSingle_typeId[this_69] <= 736 then if CallbackSingle_typeId[this_69] <= 735 then call closure_impl_96(this_69) else call closure_impl_98(this_69) endif else call closure_impl_57(this_69) endif elseif CallbackSingle_typeId[this_69] <= 739 then if CallbackSingle_typeId[this_69] <= 738 then call closure_impl_2(this_69) else call closure_impl_58(this_69) endif else call closure_impl_44(this_69) endif elseif CallbackSingle_typeId[this_69] <= 743 then if CallbackSingle_typeId[this_69] <= 742 then if CallbackSingle_typeId[this_69] <= 741 then call closure_impl_59(this_69) else call closure_impl_7(this_69) endif else call closure_impl_45(this_69) endif elseif CallbackSingle_typeId[this_69] <= 744 then call closure_impl_66(this_69) else call closure_impl_8(this_69) endif endfunction function CallbackSingle_onDestroy takes integer this_69 returns nothing 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_69 returns nothing call CallbackSingle_onDestroy(this_69) call dealloc_CallbackSingle(this_69) endfunction function dispatch_CallbackSingle_destroyCallbackSingle takes integer this_69 returns nothing if CallbackSingle_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CallbackSingle.destroyCallbackSingle") else call error("Called CallbackSingle.destroyCallbackSingle on invalid object.") endif endif call destroyCallbackSingle(this_69) endfunction function CallbackSingle_staticCallback takes nothing returns nothing local timer t = GetExpiredTimer() local integer cb = timer_getData(t) call dispatch_CallbackSingle_call(cb) call dispatch_CallbackSingle_destroyCallbackSingle(cb) call timer_release(t) set t = null endfunction function ArrayQueue_units_set takes integer instanceId, integer arrayIndex, unit value returns nothing if arrayIndex < 0 or arrayIndex >= 6 then call error("Index out of Bounds") elseif arrayIndex <= 2 then if arrayIndex <= 1 then if arrayIndex <= 0 then set ArrayQueue_units_0[instanceId] = value else set ArrayQueue_units_1[instanceId] = value endif else set ArrayQueue_units_2[instanceId] = value endif elseif arrayIndex <= 4 then if arrayIndex <= 3 then set ArrayQueue_units_3[instanceId] = value else set ArrayQueue_units_4[instanceId] = value endif else set ArrayQueue_units_5[instanceId] = value endif endfunction function ArrayQueue_enqueue takes integer this_69, unit u_2 returns nothing if ArrayQueue_size[this_69] < NewDummyRecycler_SAVED_UNITS_PER_ANGLE then set ArrayQueue_size[this_69] = ArrayQueue_size[this_69] + 1 set ArrayQueue_rp[this_69] = ModuloInteger(ArrayQueue_rp[this_69] + 1, NewDummyRecycler_SAVED_UNITS_PER_ANGLE) call ArrayQueue_units_set(this_69, ArrayQueue_rp[this_69], u_2) else call error("Queue Overflow") endif endfunction function dispatch_ArrayQueue_enqueue takes integer this_69, unit u_2 returns nothing if ArrayQueue_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ArrayQueue.enqueue") else call error("Called ArrayQueue.enqueue on invalid object.") endif endif call ArrayQueue_enqueue(this_69, u_2) endfunction function unit_pause takes unit this_69 returns nothing call PauseUnit(this_69, true) endfunction function unit_setFacing takes unit this_69, real deg returns nothing call SetUnitFacing(this_69, deg) endfunction function DummyRecycler_recycle_2 takes unit u_2 returns nothing local integer smallestQueue = 0 local integer i = 1 local integer temp = NewDummyRecycler_DIFFERENT_ANGLES - 1 local unit receiver local unit receiver_2 local unit receiver_3 loop exitwhen i > temp if ArrayQueue_size[DummyRecycler_angleQueues[smallestQueue]] > ArrayQueue_size[DummyRecycler_angleQueues[i]] then set smallestQueue = i endif set i = i + 1 endloop if ArrayQueue_size[DummyRecycler_angleQueues[smallestQueue]] >= NewDummyRecycler_SAVED_UNITS_PER_ANGLE then call unit_remove(u_2) else call dispatch_ArrayQueue_enqueue(DummyRecycler_angleQueues[smallestQueue], u_2) set receiver = u_2 call unit_setXY_2(receiver, MapBounds_boundMax_x, MapBounds_boundMax_y) set receiver_2 = receiver call unit_pause(receiver_2) set receiver_3 = receiver_2 call unit_setFacing(receiver_3, smallestQueue * NewDummyRecycler_ANGLE_DEGREE) endif set receiver = null set receiver_2 = null set receiver_3 = null endfunction function DelayNode_onDestroy takes integer this_69 returns nothing endfunction function dealloc_DelayNode takes integer obj returns nothing if DelayNode_typeId[obj] == 0 then call error("Double free: object of type DelayNode") else set DelayNode_nextFree[DelayNode_firstFree] = obj set DelayNode_firstFree = DelayNode_firstFree + 1 set DelayNode_typeId[obj] = 0 endif endfunction function destroyDelayNode takes integer this_69 returns nothing call DelayNode_onDestroy(this_69) call dealloc_DelayNode(this_69) endfunction function dispatch_DelayNode_destroyDelayNode takes integer this_69 returns nothing if DelayNode_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling DelayNode.destroyDelayNode") else call error("Called DelayNode.destroyDelayNode on invalid object.") endif endif call destroyDelayNode(this_69) endfunction function DelayNode_recycle takes nothing returns nothing local integer tmp call DummyRecycler_recycle_2(DelayNode_u[DelayNode_first]) set tmp = DelayNode_first if DelayNode_next[DelayNode_first] == 0 then set DelayNode_first = 0 endif if DelayNode_next[DelayNode_first] != 0 then set DelayNode_first = DelayNode_next[DelayNode_first] call timer_start(DelayNode_t, DelayNode_delayTime[DelayNode_first] - getElapsedGameTime(), ref_function_DelayNode_recycle) else set DelayNode_first = 0 endif call dispatch_DelayNode_destroyDelayNode(tmp) endfunction function LinkedListModule_getFirst takes nothing returns integer return LinkedListModule_first endfunction function LinkedListModule_getNext takes integer this_69 returns integer return LinkedListModule_next[this_69] endfunction function dispatch_Dot_getNext takes integer this_69 returns integer local integer getNext_result if Dot_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Dot.getNext") else call error("Called Dot.getNext on invalid object.") endif endif set getNext_result = LinkedListModule_getNext(this_69) return getNext_result endfunction function Event_onDestroy takes integer this_69 returns nothing local integer buffer1 = Event_first[this_69] local integer buffer2 loop exitwhen not (buffer1 != 0) set buffer2 = Action_next[buffer1] call dispatch_Action_destroyAction(buffer1) set buffer1 = buffer2 endloop endfunction function Unit2Event_onDestroy takes integer this_69 returns nothing call Event_onDestroy(this_69) endfunction function dealloc_Unit2Event takes integer obj returns nothing if Event_typeId[obj] == 0 then call error("Double free: object of type Unit2Event") else set Event_nextFree[Event_firstFree] = obj set Event_firstFree = Event_firstFree + 1 set Event_typeId[obj] = 0 endif endfunction function destroyUnit2Event takes integer this_69 returns nothing call Unit2Event_onDestroy(this_69) call dealloc_Unit2Event(this_69) endfunction function dispatch_Unit2Event_destroyUnit2Event takes integer this_69 returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit2Event.destroyUnit2Event") else call error("Called Unit2Event.destroyUnit2Event on invalid object.") endif endif call destroyUnit2Event(this_69) endfunction function Shield_onDestroy takes integer this_69 returns nothing set ShieldList_shieldSum[Shield_referingList[this_69]] = ShieldList_shieldSum[Shield_referingList[this_69]] - Shield_amount[this_69] call timer_release(Shield_t[this_69]) if Shield_shieldDestroyed[this_69] != 0 then call dispatch_Unit2Event_destroyUnit2Event(Shield_shieldDestroyed[this_69]) endif if Shield_prev[this_69] != 0 then set Shield_next[Shield_prev[this_69]] = Shield_next[this_69] endif if Shield_next[this_69] != 0 then set Shield_prev[Shield_next[this_69]] = Shield_prev[this_69] endif if ShieldList_first[Shield_referingList[this_69]] == this_69 then set ShieldList_first[Shield_referingList[this_69]] = Shield_next[this_69] endif if ShieldList_last[Shield_referingList[this_69]] == this_69 then set ShieldList_last[Shield_referingList[this_69]] = Shield_prev[this_69] endif endfunction function dealloc_Shield takes integer obj returns nothing if Shield_typeId[obj] == 0 then call error("Double free: object of type Shield") else set Shield_nextFree[Shield_firstFree] = obj set Shield_firstFree = Shield_firstFree + 1 set Shield_typeId[obj] = 0 endif endfunction function destroyShield takes integer this_69 returns nothing call Shield_onDestroy(this_69) call dealloc_Shield(this_69) endfunction function dispatch_Shield_destroyShield takes integer this_69 returns nothing if Shield_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Shield.destroyShield") else call error("Called Shield.destroyShield on invalid object.") endif endif call destroyShield(this_69) endfunction function Units_onDestroy takes integer this_69 returns nothing endfunction function dealloc_Units takes integer obj returns nothing if Units_typeId[obj] == 0 then call error("Double free: object of type Units") else set Units_nextFree[Units_firstFree] = obj set Units_firstFree = Units_firstFree + 1 set Units_typeId[obj] = 0 endif endfunction function destroyUnits takes integer this_69 returns nothing call Units_onDestroy(this_69) call dealloc_Units(this_69) endfunction function dispatch_Units_destroyUnits takes integer this_69 returns nothing if Units_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Units.destroyUnits") else call error("Called Units.destroyUnits on invalid object.") endif endif call destroyUnits(this_69) endfunction function alloc_Units takes nothing returns integer local integer this_69 if Units_firstFree == 0 then set Units_maxIndex = Units_maxIndex + 1 set this_69 = Units_maxIndex else set Units_firstFree = Units_firstFree - 1 set this_69 = Units_nextFree[Units_firstFree] endif set Units_typeId[this_69] = 851 return this_69 endfunction function construct_Units takes integer this_69 returns nothing endfunction function new_Units takes nothing returns integer local integer this_69 = alloc_Units() call construct_Units(this_69) return this_69 endfunction function Unit2Event_fire takes integer this_69, integer source, integer target returns nothing local integer data_2 = new_Units() set Units_target[data_2] = target call Event_callActions(this_69, data_2) call dispatch_Units_destroyUnits(data_2) endfunction function dispatch_Unit2Event_fire takes integer this_69, integer source, integer target returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit2Event.fire") else call error("Called Unit2Event.fire on invalid object.") endif endif call Unit2Event_fire(this_69, source, target) endfunction function ShieldList_damage takes integer this_69, real amount_51, integer source returns real local real remainingDmg local integer pos local integer buffer if ShieldList_first[this_69] == 0 then return amount_51 endif if amount_51 > ShieldList_shieldSum[this_69] then set ShieldList_shieldSum[this_69] = 0. else set ShieldList_shieldSum[this_69] = ShieldList_shieldSum[this_69] - amount_51 endif set remainingDmg = amount_51 set pos = ShieldList_first[this_69] loop exitwhen not (remainingDmg > 0. and pos != 0) if Shield_amount[pos] >= remainingDmg then set Shield_amount[pos] = Shield_amount[pos] - remainingDmg return 0. else set remainingDmg = remainingDmg - Shield_amount[pos] set Shield_amount[pos] = 0. if Shield_shieldDestroyed[pos] != 0 then call dispatch_Unit2Event_fire(Shield_shieldDestroyed[pos], source, Shield_target[pos]) endif set buffer = pos set pos = Shield_next[buffer] call dispatch_Shield_destroyShield(buffer) endif endloop return remainingDmg endfunction function dispatch_ShieldList_damage takes integer this_69, real amount_51, integer source returns real local real damage_result if ShieldList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ShieldList.damage") else call error("Called ShieldList.damage on invalid object.") endif endif set damage_result = ShieldList_damage(this_69, amount_51, source) return damage_result endfunction function hashtable_loadReal takes hashtable this_69, integer parentKey, integer childKey returns real return LoadReal(this_69, parentKey, childKey) endfunction function Table_loadReal takes integer this_69, integer parentKey returns real return hashtable_loadReal(Table_ht, this_69, parentKey) endfunction function dispatch_Table_loadReal takes integer this_69, integer parentKey returns real local real loadReal_result if Table_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Table.loadReal") else call error("Called Table.loadReal on invalid object.") endif endif set loadReal_result = Table_loadReal(this_69, parentKey) return loadReal_result endfunction function Unit_invuTT takes integer this_69 returns nothing if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then endif endfunction function dispatch_Unit_invuTT takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.invuTT") else call error("Called Unit.invuTT on invalid object.") endif endif call Unit_invuTT(this_69) endfunction function alloc_TextTag takes nothing returns integer local integer this_69 if TextTag_firstFree == 0 then set TextTag_maxIndex = TextTag_maxIndex + 1 set this_69 = TextTag_maxIndex else set TextTag_firstFree = TextTag_firstFree - 1 set this_69 = TextTag_nextFree[TextTag_firstFree] endif set TextTag_typeId[this_69] = 766 return this_69 endfunction function construct_TextTag_ShowInstances takes integer this_69 returns nothing local multiboarditem mbi local multiboarditem receiver set InstanceBoard_count[ShowInstances_classId] = InstanceBoard_count[ShowInstances_classId] + 1 set mbi = multiboard_getItem(InstanceBoard_mb, ShowInstances_classId, 1) set receiver = mbi call multiboarditem_setValue(receiver, int_toString(InstanceBoard_count[ShowInstances_classId])) call multiboarditem_release(receiver) set mbi = null set receiver = null endfunction function construct_TextTag takes integer this_69, real amount_51, integer u_2, integer R, integer B, integer G, real size, integer tType returns nothing local real x local real y call construct_TextTag_ShowInstances(this_69) set TextTag_tt[this_69] = CreateTextTag() set TextTag_tType[this_69] = tType set x = unit_getX(Unit_u[u_2]) - 25. set y = unit_getY(Unit_u[u_2]) - 25. if tType == 0 then set x = x + 35. elseif tType == 1 then set x = x - 35. elseif tType == 4 or tType == 3 then set y = y + 35. elseif tType == 5 then set y = y - 35. endif call SetTextTagPos(TextTag_tt[this_69], x, y, Unit_height[u_2] + 10.) call SetTextTagColor(TextTag_tt[this_69], R, B, G, 255) call SetTextTagPermanent(TextTag_tt[this_69], false) call SetTextTagLifespan(TextTag_tt[this_69], 1.) call SetTextTagFadepoint(TextTag_tt[this_69], 0.80) call SetTextTagVelocity(TextTag_tt[this_69], 0., 0.08) call SetTextTagVisibility(TextTag_tt[this_69], IsVisibleToPlayer(x, y, GetLocalPlayer())) if tType == 4 then call SetTextTagText(TextTag_tt[this_69], "Dodge", size * 0.023 / 10.) elseif tType == 3 then call SetTextTagText(TextTag_tt[this_69], "Miss", size * 0.023 / 10.) elseif tType == 5 then call SetTextTagText(TextTag_tt[this_69], "+" + I2S(R2I(amount_51)) + "g", size * 0.023 / 10.) else call SetTextTagText(TextTag_tt[this_69], R2SW(amount_51, 0, 1), size * 0.023 / 10.) endif set TextTag_amount[this_69] = amount_51 set TextTag_u[this_69] = u_2 set TextTag_t[this_69] = getTimer() call timer_setData(TextTag_t[this_69], this_69) if tType == 2 then set Unit_dotTT[TextTag_u[this_69]] = this_69 call timer_start(TextTag_t[this_69], 0.45, ref_function_TextTag_destroyTextTag) elseif tType == 0 then set Unit_damageTT[TextTag_u[this_69]] = this_69 call timer_start(TextTag_t[this_69], 1., ref_function_TextTag_destroyTextTag_2) else set Unit_healTT[TextTag_u[this_69]] = this_69 call timer_start(TextTag_t[this_69], 1., ref_function_TextTag_destroyTextTag_3) endif endfunction function new_TextTag takes real amount_51, integer u_2, integer R, integer B, integer G, real size, integer tType returns integer local integer this_69 = alloc_TextTag() call construct_TextTag(this_69, amount_51, u_2, R, B, G, size, tType) return this_69 endfunction function Unit_goldTT takes integer this_69, real dmg, player p_2 returns nothing if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) and GetLocalPlayer() == p_2 then call new_TextTag(dmg, this_69, 255, 255, 0, 11., 5) endif endfunction function dispatch_Unit_goldTT takes integer this_69, real dmg, player p_2 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.goldTT") else call error("Called Unit.goldTT on invalid object.") endif endif call Unit_goldTT(this_69, dmg, p_2) endfunction function unit_kill takes unit this_69 returns nothing call KillUnit(this_69) endfunction function Unit_kill takes integer this_69, integer source returns nothing local integer i local integer goldAmount if not Unit_isDead[this_69] then set Unit_isDead[this_69] = true call dispatch_Unit_addAbility(this_69, 1684365668) if Unit_onDeath[this_69] != 0 then call dispatch_Unit2Event_fire(Unit_onDeath[this_69], source, this_69) endif if Unit_causeDeath[this_69] != 0 then call dispatch_Unit2Event_fire(Unit_causeDeath[this_69], source, this_69) endif set i = 0 loop exitwhen i > 11 if dispatch_Table_loadReal(Unit_playerDamage[this_69], i) != 0. then set goldAmount = roundReal(dispatch_Table_loadReal(Unit_playerDamage[this_69], i) / Unit_totalDamage[this_69] * Unit_bounty[this_69]) call SetPlayerState(Player(i), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(Player(i), PLAYER_STATE_RESOURCE_GOLD) + goldAmount) call dispatch_Unit_goldTT(this_69, goldAmount * 1., Player(i)) endif set i = i + 1 endloop call unit_kill(Unit_u[this_69]) endif endfunction function Bar_disable takes integer this_69 returns nothing call texttag_setVisibility(Bar_tt[this_69], false) set Bar_check[this_69] = false endfunction function dispatch_Bar_disable takes integer this_69 returns nothing if Bar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Bar.disable") else call error("Called Bar.disable on invalid object.") endif endif call Bar_disable(this_69) endfunction function Hero_kill takes integer this_69, integer source returns nothing call dispatch_Bar_disable(Hero_hb[this_69]) call Unit_kill(this_69, source) endfunction function dispatch_Unit_kill takes integer this_69, integer source returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.kill") else call error("Called Unit.kill on invalid object.") endif endif if Unit_typeId[this_69] <= 796 then call Unit_kill(this_69, source) else call Hero_kill(this_69, source) endif endfunction function unit_setState takes unit this_69, unitstate state, real value returns nothing call SetUnitState(this_69, state, value) endfunction function unit_setHP takes unit this_69, real hp returns nothing call unit_setState(this_69, UNIT_STATE_LIFE, hp) endfunction function Unit_dealDamage takes integer this_69, real amount_51, integer source, boolean reward returns boolean local real tHP local real currentAmount if Unit_isHero[source] then set Unit_lastHeroDamager[this_69] = source endif if Unit_vunerable[this_69] then set tHP = unit_getHP(Unit_u[this_69]) set currentAmount = dispatch_ShieldList_damage(Unit_shieldList[this_69], amount_51, source) set Unit_totalDamage[this_69] = Unit_totalDamage[this_69] + amount_51 if not reward then set Unit_systemDamage[this_69] = Unit_systemDamage[this_69] + amount_51 endif if tHP - 0.405 <= currentAmount then if reward then call dispatch_Table_saveReal(Unit_playerDamage[this_69], Unit_ownerId[this_69], dispatch_Table_loadReal(Unit_playerDamage[this_69], Unit_ownerId[this_69]) + tHP) endif call dispatch_Unit_kill(this_69, source) elseif reward then call dispatch_Table_saveReal(Unit_playerDamage[this_69], Unit_ownerId[this_69], dispatch_Table_loadReal(Unit_playerDamage[this_69], Unit_ownerId[this_69]) + amount_51) endif call unit_setHP(Unit_u[this_69], tHP - currentAmount) if Unit_isHero[this_69] or Unit_isHero[source] then return true else return false endif else if Unit_isHero[this_69] or Unit_isHero[source] then call dispatch_Unit_invuTT(this_69) endif return false endif endfunction function Hero_dealDamage takes integer this_69, real amount_51, integer source, boolean bonus returns boolean call dispatch_Bar_update(Hero_hb[this_69]) return Unit_dealDamage(this_69, amount_51, source, bonus) endfunction function dispatch_Unit_dealDamage takes integer this_69, real amount_51, integer source, boolean reward returns boolean local boolean dealDamage_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.dealDamage") else call error("Called Unit.dealDamage on invalid object.") endif endif if Unit_typeId[this_69] <= 796 then set dealDamage_result = Unit_dealDamage(this_69, amount_51, source, reward) else set dealDamage_result = Hero_dealDamage(this_69, amount_51, source, reward) endif return dealDamage_result endfunction function TextTag_onDestroy takes integer this_69 returns nothing local multiboarditem mbi local multiboarditem receiver call timer_release(TextTag_t[this_69]) call DestroyTextTag(TextTag_tt[this_69]) if TextTag_tType[this_69] == 0 then set Unit_damageTT[TextTag_u[this_69]] = 0 elseif TextTag_tType[this_69] == 1 then set Unit_healTT[TextTag_u[this_69]] = 0 elseif TextTag_tType[this_69] == 2 then set Unit_dotTT[TextTag_u[this_69]] = 0 endif set InstanceBoard_count[ShowInstances_classId] = InstanceBoard_count[ShowInstances_classId] - 1 set mbi = multiboard_getItem(InstanceBoard_mb, ShowInstances_classId, 1) set receiver = mbi call multiboarditem_setValue(receiver, int_toString(InstanceBoard_count[ShowInstances_classId])) call multiboarditem_release(receiver) set mbi = null set receiver = null endfunction function dealloc_TextTag takes integer obj returns nothing if TextTag_typeId[obj] == 0 then call error("Double free: object of type TextTag") else set TextTag_nextFree[TextTag_firstFree] = obj set TextTag_firstFree = TextTag_firstFree + 1 set TextTag_typeId[obj] = 0 endif endfunction function destroyTextTag takes integer this_69 returns nothing call TextTag_onDestroy(this_69) call dealloc_TextTag(this_69) endfunction function dispatch_TextTag_destroyTextTag takes integer this_69 returns nothing if TextTag_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextTag.destroyTextTag") else call error("Called TextTag.destroyTextTag on invalid object.") endif endif call destroyTextTag(this_69) endfunction function Unit_dotTT_2 takes integer this_69, real dmg returns nothing local real tempAmount if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then if Unit_dotTT[this_69] == 0 then call new_TextTag(dmg, this_69, 255, 0, 255, 7., 2) else set tempAmount = TextTag_amount[Unit_dotTT[this_69]] call dispatch_TextTag_destroyTextTag(Unit_dotTT[this_69]) call new_TextTag(dmg + tempAmount, this_69, 255, 0, 255, 7., 2) endif endif endfunction function dispatch_Unit_dotTT takes integer this_69, real dmg returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.dotTT") else call error("Called Unit.dotTT on invalid object.") endif endif call Unit_dotTT_2(this_69, dmg) endfunction function Unit_damageDot takes integer this_69, integer source, real amount_51 returns nothing if dispatch_Unit_dealDamage(this_69, amount_51, source, true) then call dispatch_Unit_dotTT(this_69, amount_51) endif endfunction function dispatch_Unit_damageDot takes integer this_69, integer source, real amount_51 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.damageDot") else call error("Called Unit.damageDot on invalid object.") endif endif call Unit_damageDot(this_69, source, amount_51) endfunction function Dot_loopList takes nothing returns nothing local integer d_2 = LinkedListModule_getFirst() local integer buffer loop exitwhen not (d_2 != 0) set buffer = d_2 set d_2 = dispatch_Dot_getNext(d_2) call dispatch_Unit_damageDot(Dot_u[buffer], Dot_source[buffer], Dot_damage[buffer]) endloop endfunction function Hero_isUnitEnemy takes integer this_69, unit other returns boolean return IsUnitEnemy(other, Unit_owner[this_69]) endfunction function dispatch_Hero_isUnitEnemy takes integer this_69, unit other returns boolean local boolean isUnitEnemy_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.isUnitEnemy") else call error("Called Hero.isUnitEnemy on invalid object.") endif endif set isUnitEnemy_result = Hero_isUnitEnemy(this_69, other) return isUnitEnemy_result endfunction function alloc_Closure_18 takes nothing returns integer local integer this_69 if Order_firstFree == 0 then set Order_maxIndex = Order_maxIndex + 1 set this_69 = Order_maxIndex else set Order_firstFree = Order_firstFree - 1 set this_69 = Order_nextFree[Order_firstFree] endif set Order_typeId[this_69] = 802 return this_69 endfunction function CaptureCancelEvent_fire takes integer this_69 returns nothing call dispatch_Event_callActions(this_69, 0) endfunction function dispatch_CaptureCancelEvent_fire takes integer this_69 returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CaptureCancelEvent.fire") else call error("Called CaptureCancelEvent.fire on invalid object.") endif endif call CaptureCancelEvent_fire(this_69) endfunction function Order_onDestroy takes integer this_69 returns nothing endfunction function dealloc_Order takes integer obj returns nothing if Order_typeId[obj] == 0 then call error("Double free: object of type Order") else set Order_nextFree[Order_firstFree] = obj set Order_firstFree = Order_firstFree + 1 set Order_typeId[obj] = 0 endif endfunction function destroyOrder takes integer this_69 returns nothing call Order_onDestroy(this_69) call dealloc_Order(this_69) endfunction function dispatch_Order_destroyOrder takes integer this_69 returns nothing if Order_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Order.destroyOrder") else call error("Called Order.destroyOrder on invalid object.") endif endif call destroyOrder(this_69) endfunction function Hero_setLastOrder takes integer this_69, integer o returns nothing if Hero_lastOrder[this_69] != 0 then call dispatch_Order_destroyOrder(Hero_lastOrder[this_69]) endif set Hero_lastOrder[this_69] = o endfunction function dispatch_Hero_setLastOrder takes integer this_69, integer o returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.setLastOrder") else call error("Called Hero.setLastOrder on invalid object.") endif endif call Hero_setLastOrder(this_69, o) endfunction function Hero_setNextOrder takes integer this_69, integer o returns nothing if Hero_nextOrder[this_69] != 0 then call dispatch_Order_destroyOrder(Hero_nextOrder[this_69]) endif set Hero_nextOrder[this_69] = o endfunction function dispatch_Hero_setNextOrder takes integer this_69, integer o returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.setNextOrder") else call error("Called Hero.setNextOrder on invalid object.") endif endif call Hero_setNextOrder(this_69, o) endfunction function SmartData_onDestroy takes integer this_69 returns nothing endfunction function dealloc_SmartData takes integer obj returns nothing if SmartData_typeId[obj] == 0 then call error("Double free: object of type SmartData") else set SmartData_nextFree[SmartData_firstFree] = obj set SmartData_firstFree = SmartData_firstFree + 1 set SmartData_typeId[obj] = 0 endif endfunction function destroySmartData takes integer this_69 returns nothing call SmartData_onDestroy(this_69) call dealloc_SmartData(this_69) endfunction function dispatch_SmartData_destroySmartData takes integer this_69 returns nothing if SmartData_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling SmartData.destroySmartData") else call error("Called SmartData.destroySmartData on invalid object.") endif endif call destroySmartData(this_69) endfunction function alloc_SmartData takes nothing returns integer local integer this_69 if SmartData_firstFree == 0 then set SmartData_maxIndex = SmartData_maxIndex + 1 set this_69 = SmartData_maxIndex else set SmartData_firstFree = SmartData_firstFree - 1 set this_69 = SmartData_nextFree[SmartData_firstFree] endif set SmartData_typeId[this_69] = 799 return this_69 endfunction function construct_SmartData takes integer this_69 returns nothing endfunction function new_SmartData takes nothing returns integer local integer this_69 = alloc_SmartData() call construct_SmartData(this_69) return this_69 endfunction function SmartEvent_fire takes integer this_69, integer target returns nothing local integer data_2 = new_SmartData() call dispatch_Event_callActions(this_69, data_2) call dispatch_SmartData_destroySmartData(data_2) endfunction function dispatch_SmartEvent_fire takes integer this_69, integer target returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling SmartEvent.fire") else call error("Called SmartEvent.fire on invalid object.") endif endif call SmartEvent_fire(this_69, target) endfunction function unit_issueTargetOrder takes unit this_69, string order, widget targetWidget returns boolean return IssueTargetOrder(this_69, order, targetWidget) endfunction function Hero_onAttackOrder takes integer this_69, integer target returns nothing local integer clVar = alloc_Closure_18() local integer o = clVar if Hero_isCasting[this_69] then call dispatch_Hero_setNextOrder(this_69, o) call dispatch_Hero_setLastOrder(this_69, o) else call dispatch_Hero_setLastOrder(this_69, o) call unit_issueTargetOrder(Unit_u[this_69], "attack", Unit_u[target]) endif if Hero_captureCancel[this_69] != 0 then call dispatch_CaptureCancelEvent_fire(Hero_captureCancel[this_69]) endif if Hero_smartEvent[this_69] != 0 then call dispatch_SmartEvent_fire(Hero_smartEvent[this_69], target) endif endfunction function dispatch_Hero_onAttackOrder takes integer this_69, integer target returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.onAttackOrder") else call error("Called Hero.onAttackOrder on invalid object.") endif endif call Hero_onAttackOrder(this_69, target) endfunction function alloc_Closure_19 takes nothing returns integer local integer this_69 if Order_firstFree == 0 then set Order_maxIndex = Order_maxIndex + 1 set this_69 = Order_maxIndex else set Order_firstFree = Order_firstFree - 1 set this_69 = Order_nextFree[Order_firstFree] endif set Order_typeId[this_69] = 803 return this_69 endfunction function CaptureCancelEvent_fire_2 takes integer this_69, integer t returns nothing call dispatch_Event_callActions(this_69, t) endfunction function dispatch_CaptureCancelEvent_fire_2 takes integer this_69, integer t returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CaptureCancelEvent.fire") else call error("Called CaptureCancelEvent.fire on invalid object.") endif endif call CaptureCancelEvent_fire_2(this_69, t) endfunction function alloc_Closure_20 takes nothing returns integer local integer this_69 if Action_firstFree == 0 then set Action_maxIndex = Action_maxIndex + 1 set this_69 = Action_maxIndex else set Action_firstFree = Action_firstFree - 1 set this_69 = Action_nextFree[Action_firstFree] endif set Action_typeId[this_69] = 691 return this_69 endfunction function Fx_getX takes integer this_69 returns real return unit_getX(Fx_dummy[this_69]) endfunction function dispatch_Fx_getX takes integer this_69 returns real local real getX_result if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.getX") else call error("Called Fx.getX on invalid object.") endif endif set getX_result = Fx_getX(this_69) return getX_result endfunction function Fx_getY takes integer this_69 returns real return unit_getY(Fx_dummy[this_69]) endfunction function dispatch_Fx_getY takes integer this_69 returns real local real getY_result if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.getY") else call error("Called Fx.getY on invalid object.") endif endif set getY_result = Fx_getY(this_69) return getY_result endfunction function unit_getFlyHeight takes unit this_69 returns real return GetUnitFlyHeight(this_69) endfunction function Fx_getZ takes integer this_69 returns real return unit_getFlyHeight(Fx_dummy[this_69]) endfunction function dispatch_Fx_getZ takes integer this_69 returns real local real getZ_result if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.getZ") else call error("Called Fx.getZ on invalid object.") endif endif set getZ_result = Fx_getZ(this_69) return getZ_result endfunction function Fx_getPos3d takes integer this_69 returns real set Fx_getPos3d_return_x = dispatch_Fx_getX(this_69) set Fx_getPos3d_return_y = dispatch_Fx_getY(this_69) set Fx_getPos3d_return_z = dispatch_Fx_getZ(this_69) return Fx_getPos3d_return_x endfunction function dispatch_Fx_getPos3d takes integer this_69 returns real local real getPos3d_result_x local real getPos3d_result_y local real getPos3d_result_z local real temp_getPos3d_result_x local real temp_getPos3d_result_y local real temp_getPos3d_result_z if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.getPos3d") else call error("Called Fx.getPos3d on invalid object.") endif endif set temp_getPos3d_result_x = Fx_getPos3d(this_69) set temp_getPos3d_result_y = Fx_getPos3d_return_y set temp_getPos3d_result_z = Fx_getPos3d_return_z set getPos3d_result_x = temp_getPos3d_result_x set getPos3d_result_y = temp_getPos3d_result_y set getPos3d_result_z = temp_getPos3d_result_z set dispatch_Fx_getPos3d_return_x = getPos3d_result_x set dispatch_Fx_getPos3d_return_y = getPos3d_result_y set dispatch_Fx_getPos3d_return_z = getPos3d_result_z return dispatch_Fx_getPos3d_return_x endfunction function HeroType_getCaptureAnimationIndex takes integer this_69 returns integer local integer tempIndex = this_69 local integer temp_tempTupleSelectionResult_1 = HeroType_captureAnimationIndex[tempIndex] local integer tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_HeroType_getCaptureAnimationIndex takes integer this_69 returns integer local integer getCaptureAnimationIndex_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.getCaptureAnimationIndex") else call error("Called HeroType.getCaptureAnimationIndex on invalid object.") endif endif set getCaptureAnimationIndex_result = HeroType_getCaptureAnimationIndex(this_69) return getCaptureAnimationIndex_result endfunction function HeroType_getCaptureAnimationSpeed takes integer this_69 returns real local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_1 = HeroType_captureAnimationSpeed[tempIndex] local real tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_HeroType_getCaptureAnimationSpeed takes integer this_69 returns real local real getCaptureAnimationSpeed_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.getCaptureAnimationSpeed") else call error("Called HeroType.getCaptureAnimationSpeed on invalid object.") endif endif set getCaptureAnimationSpeed_result = HeroType_getCaptureAnimationSpeed(this_69) return getCaptureAnimationSpeed_result endfunction function HeroType_hasPeriodicAnimation_3 takes integer this_69 returns boolean local integer tempIndex = this_69 local boolean temp_tempTupleSelectionResult_1 = HeroType_hasPeriodicAnimation[tempIndex] local boolean tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 return tempTupleSelectionResult_1 endfunction function dispatch_HeroType_hasPeriodicAnimation takes integer this_69 returns boolean local boolean hasPeriodicAnimation_result if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.hasPeriodicAnimation") else call error("Called HeroType.hasPeriodicAnimation on invalid object.") endif endif set hasPeriodicAnimation_result = HeroType_hasPeriodicAnimation_3(this_69) return hasPeriodicAnimation_result endfunction function Hero_playAnimation takes integer this_69, integer index, real speed returns nothing if Hero_playsAnimation[this_69] then call error("New animation was played before the old one was stopped") endif set Hero_playsAnimation[this_69] = true call unit_setTimeScale(Unit_u[this_69], speed) call SetUnitAnimationByIndex(Unit_u[this_69], index) endfunction function dispatch_Hero_playAnimation takes integer this_69, integer index, real speed returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.playAnimation") else call error("Called Hero.playAnimation on invalid object.") endif endif call Hero_playAnimation(this_69, index, speed) endfunction function Hero_playCaptureAnimation takes integer this_69 returns nothing if dispatch_HeroType_hasPeriodicAnimation(Hero_htyp[this_69]) then else call dispatch_Hero_playAnimation(this_69, dispatch_HeroType_getCaptureAnimationIndex(Hero_htyp[this_69]), dispatch_HeroType_getCaptureAnimationSpeed(Hero_htyp[this_69])) endif endfunction function dispatch_Hero_playCaptureAnimation takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.playCaptureAnimation") else call error("Called Hero.playCaptureAnimation on invalid object.") endif endif call Hero_playCaptureAnimation(this_69) endfunction function Unit_getMiddle takes integer this_69 returns real set Unit_getMiddle_return_x = unit_getX(Unit_u[this_69]) set Unit_getMiddle_return_y = unit_getY(Unit_u[this_69]) set Unit_getMiddle_return_z = Unit_height[this_69] / 2. return Unit_getMiddle_return_x endfunction function dispatch_Unit_getMiddle takes integer this_69 returns real local real getMiddle_result_x local real getMiddle_result_y local real getMiddle_result_z local real temp_getMiddle_result_x local real temp_getMiddle_result_y local real temp_getMiddle_result_z if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.getMiddle") else call error("Called Unit.getMiddle on invalid object.") endif endif set temp_getMiddle_result_x = Unit_getMiddle(this_69) set temp_getMiddle_result_y = Unit_getMiddle_return_y set temp_getMiddle_result_z = Unit_getMiddle_return_z set getMiddle_result_x = temp_getMiddle_result_x set getMiddle_result_y = temp_getMiddle_result_y set getMiddle_result_z = temp_getMiddle_result_z set dispatch_Unit_getMiddle_return_x = getMiddle_result_x set dispatch_Unit_getMiddle_return_y = getMiddle_result_y set dispatch_Unit_getMiddle_return_z = getMiddle_result_z return dispatch_Unit_getMiddle_return_x endfunction function unit_setFacing_2 takes unit this_69, real a_radians returns nothing call SetUnitFacing(this_69, angle_degrees(a_radians)) endfunction function ControlPoint_startCapture takes integer this_69, integer h_2 returns nothing local integer data_2 local string tempLightning local integer tempIndex local real temp local real temp_2 local unit temp_3 call dispatch_Hero_enableAutoAttack(h_2, false) call IssueImmediateOrder(Unit_u[h_2], "stop") set temp_3 = Unit_u[h_2] set temp = unit_getPos(Unit_u[h_2]) set temp_2 = unit_getPos_return_y set tempIndex = this_69 call unit_setFacing_2(temp_3, vec2_angleTo(temp, temp_2, ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex])) call dispatch_Hero_playCaptureAnimation(h_2) set data_2 = dispatch_HashMap_get(ControlPoint_captureData, h_2) if CaptureData_l2[data_2] == null then if ControlPoint_owner[this_69] != 0 then set tempLightning = ControlPoint_teamEverlivingLightning else set tempLightning = ControlPoint_teamWargrinLightning endif set CaptureData_l2[data_2] = createLightning(tempLightning, dispatch_Unit_getMiddle(h_2), dispatch_Unit_getMiddle_return_y, dispatch_Unit_getMiddle_return_z, dispatch_Fx_getPos3d(CaptureData_fx[data_2]), dispatch_Fx_getPos3d_return_y, dispatch_Fx_getPos3d_return_z) endif set temp_3 = null endfunction function dispatch_ControlPoint_startCapture takes integer this_69, integer h_2 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.startCapture") else call error("Called ControlPoint.startCapture on invalid object.") endif endif call ControlPoint_startCapture(this_69, h_2) endfunction function Event_addAction takes integer this_69, integer a returns integer set Action_ev[a] = this_69 if Event_first[this_69] == 0 then set Event_first[this_69] = a set Event_last[this_69] = a set Action_next[a] = 0 set Action_prev[a] = 0 else set Action_prev[Event_first[this_69]] = a set Action_next[a] = Event_first[this_69] set Event_first[this_69] = a endif return a endfunction function dispatch_Event_addAction takes integer this_69, integer a returns integer local integer addAction_result if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Event.addAction") else call error("Called Event.addAction on invalid object.") endif endif set addAction_result = Event_addAction(this_69, a) return addAction_result endfunction function alloc_CaptureCancelEvent takes nothing returns integer local integer this_69 if Event_firstFree == 0 then set Event_maxIndex = Event_maxIndex + 1 set this_69 = Event_maxIndex else set Event_firstFree = Event_firstFree - 1 set this_69 = Event_nextFree[Event_firstFree] endif set Event_typeId[this_69] = 686 return this_69 endfunction function construct_Event takes integer this_69 returns nothing set Event_first[this_69] = 0 set Event_last[this_69] = 0 set Event_checkData[this_69] = false endfunction function construct_CaptureCancelEvent takes integer this_69 returns nothing call construct_Event(this_69) endfunction function new_CaptureCancelEvent takes nothing returns integer local integer this_69 = alloc_CaptureCancelEvent() call construct_CaptureCancelEvent(this_69) return this_69 endfunction function Hero_registerCaptureCancel takes integer this_69, integer action returns integer if Hero_captureCancel[this_69] == 0 then set Hero_captureCancel[this_69] = new_CaptureCancelEvent() endif return dispatch_Event_addAction(Hero_captureCancel[this_69], action) endfunction function dispatch_Hero_registerCaptureCancel takes integer this_69, integer action returns integer local integer registerCaptureCancel_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.registerCaptureCancel") else call error("Called Hero.registerCaptureCancel on invalid object.") endif endif set registerCaptureCancel_result = Hero_registerCaptureCancel(this_69, action) return registerCaptureCancel_result endfunction function ControlPoint_wantCapture takes integer this_69, integer h_2 returns boolean local integer data_2 = dispatch_HashMap_get(ControlPoint_captureData, h_2) local integer clVar local integer temp local integer temp_2 if ( not CaptureData_wantCapture[data_2]) and Unit_team[h_2] != ControlPoint_owner[this_69] then set CaptureData_wantCapture[data_2] = true if group_contains(ControlPoint_inRange[this_69], Unit_u[h_2]) then call dispatch_ControlPoint_startCapture(this_69, h_2) endif set temp_2 = data_2 set temp = h_2 set clVar = alloc_Closure_20() set this_5[clVar] = this_69 set data[clVar] = data_2 set h[clVar] = h_2 set CaptureData_captureCancel[temp_2] = dispatch_Hero_registerCaptureCancel(temp, clVar) endif return not group_contains(ControlPoint_inRange[this_69], Unit_u[h_2]) endfunction function dispatch_ControlPoint_wantCapture takes integer this_69, integer h_2 returns boolean local boolean wantCapture_result if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.wantCapture") else call error("Called ControlPoint.wantCapture on invalid object.") endif endif set wantCapture_result = ControlPoint_wantCapture(this_69, h_2) return wantCapture_result endfunction function unit_issuePointOrder takes unit this_69, string order, real target_x, real target_y returns nothing call IssuePointOrder(this_69, order, target_x, target_y) endfunction function Hero_onCaptureOrder takes integer this_69, integer target returns nothing local integer clVar = alloc_Closure_19() local integer o = clVar local integer tempIndex local unit temp if Hero_isCasting[this_69] then call dispatch_Hero_setNextOrder(this_69, o) call dispatch_Hero_setLastOrder(this_69, o) else if dispatch_ControlPoint_wantCapture(target, this_69) then set temp = Unit_u[this_69] set tempIndex = target call unit_issuePointOrder(temp, "move", ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex]) endif if Hero_captureCancel[this_69] != 0 then call dispatch_CaptureCancelEvent_fire_2(Hero_captureCancel[this_69], target) endif call dispatch_Hero_setLastOrder(this_69, o) endif set temp = null endfunction function dispatch_Hero_onCaptureOrder takes integer this_69, integer target returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.onCaptureOrder") else call error("Called Hero.onCaptureOrder on invalid object.") endif endif call Hero_onCaptureOrder(this_69, target) endfunction function alloc_Closure_21 takes nothing returns integer local integer this_69 if Order_firstFree == 0 then set Order_maxIndex = Order_maxIndex + 1 set this_69 = Order_maxIndex else set Order_firstFree = Order_firstFree - 1 set this_69 = Order_nextFree[Order_firstFree] endif set Order_typeId[this_69] = 801 return this_69 endfunction function SmartEvent_fire_2 takes integer this_69, real target_x, real target_y returns nothing local integer data_2 = new_SmartData() call dispatch_Event_callActions(this_69, data_2) call dispatch_SmartData_destroySmartData(data_2) endfunction function dispatch_SmartEvent_fire_2 takes integer this_69, real target_x, real target_y returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling SmartEvent.fire") else call error("Called SmartEvent.fire on invalid object.") endif endif call SmartEvent_fire_2(this_69, target_x, target_y) endfunction function Hero_onMoveOrder takes integer this_69, real pos_x, real pos_y returns nothing local integer clVar = alloc_Closure_21() local integer o = clVar if Hero_isCasting[this_69] then call dispatch_Hero_setNextOrder(this_69, o) call dispatch_Hero_setLastOrder(this_69, o) else call dispatch_Hero_setLastOrder(this_69, o) call unit_issuePointOrder(Unit_u[this_69], "move", pos_x, pos_y) endif if Hero_captureCancel[this_69] != 0 then call dispatch_CaptureCancelEvent_fire(Hero_captureCancel[this_69]) endif if Hero_smartEvent[this_69] != 0 then call dispatch_SmartEvent_fire_2(Hero_smartEvent[this_69], pos_x, pos_y) endif endfunction function dispatch_Hero_onMoveOrder takes integer this_69, real pos_x, real pos_y returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.onMoveOrder") else call error("Called Hero.onMoveOrder on invalid object.") endif endif call Hero_onMoveOrder(this_69, pos_x, pos_y) endfunction function Hero_onScoreOrder takes integer this_69 returns nothing call print("Score") endfunction function dispatch_Hero_onScoreOrder takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.onScoreOrder") else call error("Called Hero.onScoreOrder on invalid object.") endif endif call Hero_onScoreOrder(this_69) endfunction function Hero_onStopOrder takes integer this_69 returns nothing if Hero_isCasting[this_69] then else call IssueImmediateOrder(Unit_u[this_69], "stop") endif call dispatch_Hero_setLastOrder(this_69, 0) call dispatch_Hero_setNextOrder(this_69, 0) if Hero_captureCancel[this_69] != 0 then call dispatch_CaptureCancelEvent_fire(Hero_captureCancel[this_69]) endif endfunction function dispatch_Hero_onStopOrder takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.onStopOrder") else call error("Called Hero.onStopOrder on invalid object.") endif endif call Hero_onStopOrder(this_69) endfunction function trigger_disable takes trigger this_69 returns nothing call DisableTrigger(this_69) endfunction function trigger_enable takes trigger this_69 returns nothing call EnableTrigger(this_69) endfunction function unit_getTypeId takes unit this_69 returns integer return GetUnitTypeId(this_69) endfunction function unit_getUserData takes unit this_69 returns integer return GetUnitUserData(this_69) endfunction function GetOrders_callOnOrder takes nothing returns nothing local integer h_2 local integer id local real pos_x local real pos_y local unit u_2 local integer temp local real temp_pos_x local real temp_pos_y call trigger_disable(GetOrders_orderDetect) set h_2 = unit_getUserData(GetTriggerUnit()) set id = GetIssuedOrderId() set temp_pos_x = GetOrderPointX() set temp_pos_y = GetOrderPointY() set pos_x = temp_pos_x set pos_y = temp_pos_y set u_2 = GetOrderTargetUnit() set temp = id if temp == OrderHandling_stopId then call dispatch_Hero_onStopOrder(h_2) elseif temp == OrderHandling_attackId then call dispatch_Hero_onAttackOrder(h_2, unit_getUserData(u_2)) elseif temp == OrderHandling_scoreboardId then call dispatch_Hero_onScoreOrder(h_2) elseif temp == OrderHandling_smartId then if u_2 == null then call dispatch_Hero_onMoveOrder(h_2, pos_x, pos_y) elseif unit_getTypeId(u_2) == ControlPoint_modelMorphed then call dispatch_Hero_onCaptureOrder(h_2, unit_getUserData(u_2)) elseif dispatch_Hero_isUnitEnemy(h_2, u_2) then call dispatch_Hero_onAttackOrder(h_2, unit_getUserData(u_2)) else call dispatch_Hero_onMoveOrder(h_2, unit_getPos(u_2), unit_getPos_return_y) endif endif call trigger_enable(GetOrders_orderDetect) set u_2 = null endfunction function Player_setCam takes nothing returns nothing local timer t = GetExpiredTimer() call timer_getData(t) set t = null endfunction function hashtable_loadString takes hashtable this_69, integer parentKey, integer childKey returns string return LoadStr(this_69, parentKey, childKey) endfunction function Table_loadString takes integer this_69, integer parentKey returns string return hashtable_loadString(Table_ht, this_69, parentKey) endfunction function dispatch_Table_loadString takes integer this_69, integer parentKey returns string local string loadString_result if Table_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Table.loadString") else call error("Called Table.loadString on invalid object.") endif endif set loadString_result = Table_loadString(this_69, parentKey) return loadString_result endfunction function DebugFile_save takes integer this_69 returns nothing local integer i local integer temp if DebugFile_lastSavedFile != this_69 and DebugFile_lastSavedFile != 0 or DebugFile_bufferWasCleared then call PreloadGenClear() set DebugFile_bufferWasCleared = false set i = 1 set temp = DebugFile_currentLine[this_69] loop exitwhen i > temp call Preload(dispatch_Table_loadString(DebugFile_content[this_69], i)) set i = i + 1 endloop endif call PreloadGenEnd(DebugFile_path + "\\" + DebugFile_filename[this_69] + DebugFile_filetype) set DebugFile_lastSavedFile = this_69 endfunction function dispatch_DebugFile_save takes integer this_69 returns nothing if DebugFile_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling DebugFile.save") else call error("Called DebugFile.save on invalid object.") endif endif call DebugFile_save(this_69) endfunction function hashtable_saveString takes hashtable this_69, integer parentKey, integer childKey, string value returns nothing call SaveStr(this_69, parentKey, childKey, value) endfunction function Table_saveString takes integer this_69, integer parentKey, string value returns nothing call hashtable_saveString(Table_ht, this_69, parentKey, value) endfunction function dispatch_Table_saveString takes integer this_69, integer parentKey, string value returns nothing if Table_typeId[this_69] == 0 then if this_69 == 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_69, parentKey, value) endfunction function DebugFile_writeln takes integer this_69, string s returns nothing set DebugFile_buffer[this_69] = DebugFile_buffer[this_69] + s set DebugFile_currentLine[this_69] = DebugFile_currentLine[this_69] + 1 call dispatch_Table_saveString(DebugFile_content[this_69], DebugFile_currentLine[this_69], "\")\r\n" + DebugFile_buffer[this_69] + "\r\n") if DebugFile_lastSavedFile == this_69 or DebugFile_lastSavedFile == 0 then call Preload("\")\r\n" + s + "\r\n") endif set DebugFile_buffer[this_69] = "" endfunction function dispatch_DebugFile_writeln takes integer this_69, string s returns nothing if DebugFile_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling DebugFile.writeln") else call error("Called DebugFile.writeln on invalid object.") endif endif call DebugFile_writeln(this_69, s) endfunction function HashList_get takes integer this_69, integer index returns integer return hashtable_loadInt(HashList_ht, this_69, index) endfunction function dispatch_HashList_get takes integer this_69, integer index returns integer local integer get_result if HashList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HashList.get") else call error("Called HashList.get on invalid object.") endif endif set get_result = HashList_get(this_69, index) return get_result endfunction function HashList_getSize takes integer this_69 returns integer return HashList_size[this_69] endfunction function dispatch_HashList_getSize takes integer this_69 returns integer local integer getSize_result if HashList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HashList.getSize") else call error("Called HashList.getSize on invalid object.") endif endif set getSize_result = HashList_getSize(this_69) return getSize_result endfunction function item_getName takes item this_69 returns string return GetItemName(this_69) endfunction function item_remove takes item this_69 returns nothing call RemoveItem(this_69) endfunction function closure_impl_101 takes integer this_69, integer i returns real local real ret = 0. local integer id local item ite if i >= dispatch_HashList_getSize(PreloadSystem_itemsToPreload) then set ret = -1. else set id = dispatch_HashList_get(PreloadSystem_itemsToPreload, i) set ite = CreateItem(id, 0., 0.) if item_getName(ite) == null or item_getName(ite) == "" then set ret = -2. else call item_remove(ite) set ret = PreloadSystem_itemLoadTime endif endif set ite = null return ret endfunction function closure_impl_102 takes integer this_69, integer i returns real local real ret = 0. local integer id if i >= dispatch_HashList_getSize(PreloadSystem_buffsToPreload) then set ret = -1. else set id = dispatch_HashList_get(PreloadSystem_buffsToPreload, i) if GetObjectName(id) == null or GetObjectName(id) == "" then set ret = -2. else set ret = PreloadSystem_buffLoadTime endif endif return ret endfunction function idInteger2IdString takes integer value returns string local string result = "" 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 = SubString(ObjectIds_charMap, charValue, charValue + 1) + result set byteno = byteno + 1 endloop return result endfunction function unit_getAbilityLevel takes unit this_69, integer id returns integer return GetUnitAbilityLevel(this_69, id) endfunction function closure_impl_103 takes integer this_69, integer i returns real local real ret = 0. local integer a if i >= dispatch_HashList_getSize(PreloadSystem_abilitysToPreload) then call unit_remove(PreloadSystem_preloadDummy) set ret = -1. else set a = dispatch_HashList_get(PreloadSystem_abilitysToPreload, i) call unit_addAbility(PreloadSystem_preloadDummy, Ability_id[a]) if unit_getAbilityLevel(PreloadSystem_preloadDummy, Ability_id[a]) == 0 then call printError("Could not load the ability " + idInteger2IdString(Ability_id[a])) set ret = -2. else set ret = PreloadSystem_abilityLoadTime + PreloadSystem_abilityLoadTimeLvlBonus * (Ability_lvl[a] - 1) endif endif return ret endfunction function alloc_Closure_22 takes nothing returns integer local integer this_69 if TrackableAction_firstFree == 0 then set TrackableAction_maxIndex = TrackableAction_maxIndex + 1 set this_69 = TrackableAction_maxIndex else set TrackableAction_firstFree = TrackableAction_firstFree - 1 set this_69 = TrackableAction_nextFree[TrackableAction_firstFree] endif set TrackableAction_typeId[this_69] = 674 return this_69 endfunction function alloc_Closure_23 takes nothing returns integer local integer this_69 if TrackableAction_firstFree == 0 then set TrackableAction_maxIndex = TrackableAction_maxIndex + 1 set this_69 = TrackableAction_maxIndex else set TrackableAction_firstFree = TrackableAction_firstFree - 1 set this_69 = TrackableAction_nextFree[TrackableAction_firstFree] endif set TrackableAction_typeId[this_69] = 676 return this_69 endfunction function alloc_Closure_24 takes nothing returns integer local integer this_69 if TrackableAction_firstFree == 0 then set TrackableAction_maxIndex = TrackableAction_maxIndex + 1 set this_69 = TrackableAction_maxIndex else set TrackableAction_firstFree = TrackableAction_firstFree - 1 set this_69 = TrackableAction_nextFree[TrackableAction_firstFree] endif set TrackableAction_typeId[this_69] = 675 return this_69 endfunction function ElementLoop_hasNext takes integer this_69 returns boolean local integer tempIndex = this_69 local integer temp_tempTupleSelectionResult_1 = ElementLoop_a[tempIndex] local integer tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 local integer temp = tempTupleSelectionResult_1 local integer tempIndex_2 = this_69 local integer temp_tempTupleSelectionResult_1_2 = ElementLoop_b[tempIndex_2] local integer tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 local integer tempIndex_3 local integer tempTupleSelectionResult_2 local integer temp_tempTupleSelectionResult_2 local integer tempIndex_4 local integer tempTupleSelectionResult_2_2 local integer temp_tempTupleSelectionResult_2_2 local integer temp_2 local boolean andLeft if temp <= tempTupleSelectionResult_1_2 then set tempIndex_3 = this_69 set temp_tempTupleSelectionResult_2 = ElementLoop_a_2[tempIndex_3] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set temp_2 = tempTupleSelectionResult_2 set tempIndex_4 = this_69 set temp_tempTupleSelectionResult_2_2 = ElementLoop_b_2[tempIndex_4] set tempTupleSelectionResult_2_2 = temp_tempTupleSelectionResult_2_2 set andLeft = temp_2 <= tempTupleSelectionResult_2_2 else set andLeft = false endif return andLeft endfunction function dispatch_ElementLoop_hasNext takes integer this_69 returns boolean local boolean hasNext_result if ElementLoop_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ElementLoop.hasNext") else call error("Called ElementLoop.hasNext on invalid object.") endif endif set hasNext_result = ElementLoop_hasNext(this_69) return hasNext_result endfunction function ElementLoop_next takes integer this_69 returns integer local integer tempIndex = this_69 local integer temp_ret_x = ElementLoop_a[tempIndex] local integer temp_ret_y = ElementLoop_a_2[tempIndex] local integer ret_x = temp_ret_x local integer ret_y = temp_ret_y local integer tempIndex_2 = this_69 local integer temp_tempTupleSelectionResult_1 = ElementLoop_a[tempIndex_2] local integer tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 local integer temp = tempTupleSelectionResult_1 local integer tempIndex_3 = this_69 local integer temp_tempTupleSelectionResult_1_2 = ElementLoop_b[tempIndex_3] local integer tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 local integer tempIndex_4 local integer tempIndex_5 local integer tempTupleSelectionResult_2 local integer temp_tempTupleSelectionResult_2 local integer tempIndex_6 local integer tempIndex_7 local integer tempIndex_8 local integer tempTupleSelectionResult_1_3 local integer temp_tempTupleSelectionResult_1_3 local integer temp_2 local integer temp_3 if temp >= tempTupleSelectionResult_1_2 then set tempIndex_4 = this_69 set temp_2 = tempIndex_4 set tempIndex_5 = this_69 set temp_tempTupleSelectionResult_2 = ElementLoop_a_2[tempIndex_5] set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set ElementLoop_a_2[temp_2] = tempTupleSelectionResult_2 + 1 set tempIndex_6 = this_69 set ElementLoop_a[tempIndex_6] = ElementLoop_start[this_69] else set tempIndex_7 = this_69 set temp_3 = tempIndex_7 set tempIndex_8 = this_69 set temp_tempTupleSelectionResult_1_3 = ElementLoop_a[tempIndex_8] set tempTupleSelectionResult_1_3 = temp_tempTupleSelectionResult_1_3 set ElementLoop_a[temp_3] = tempTupleSelectionResult_1_3 + 1 endif set ElementLoop_next_return_x = ret_x set ElementLoop_next_return_y = ret_y return ElementLoop_next_return_x endfunction function dispatch_ElementLoop_next takes integer this_69 returns integer local integer next_result_x local integer next_result_y local integer temp_next_result_x local integer temp_next_result_y if ElementLoop_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ElementLoop.next") else call error("Called ElementLoop.next on invalid object.") endif endif set temp_next_result_x = ElementLoop_next(this_69) set temp_next_result_y = ElementLoop_next_return_y set next_result_x = temp_next_result_x set next_result_y = temp_next_result_y set dispatch_ElementLoop_next_return_x = next_result_x set dispatch_ElementLoop_next_return_y = next_result_y return dispatch_ElementLoop_next_return_x endfunction function TrackableEx_onClick_2 takes integer this_69, integer action returns nothing set TrackableEx_onClick[this_69] = action endfunction function dispatch_TrackableEx_onClick takes integer this_69, integer action returns nothing if TrackableEx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TrackableEx.onClick") else call error("Called TrackableEx.onClick on invalid object.") endif endif call TrackableEx_onClick_2(this_69, action) endfunction function TrackableEx_onDoubleClick_2 takes integer this_69, integer action returns nothing local integer i local timer receiver if TrackableEx_onDoubleClick[this_69] == 0 then set i = 0 loop exitwhen i > 11 if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(i)) == MAP_CONTROL_USER then set receiver = getTimer() call timer_setData(receiver, i) set TrackableEx_playerDoubleClickTimer[i] = receiver endif set i = i + 1 endloop endif set TrackableEx_onDoubleClick[this_69] = action set receiver = null endfunction function dispatch_TrackableEx_onDoubleClick takes integer this_69, integer action returns nothing if TrackableEx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TrackableEx.onDoubleClick") else call error("Called TrackableEx.onDoubleClick on invalid object.") endif endif call TrackableEx_onDoubleClick_2(this_69, action) endfunction function TrackableEx_onTrack_2 takes integer this_69, integer action returns nothing set TrackableEx_onTrack[this_69] = action endfunction function dispatch_TrackableEx_onTrack takes integer this_69, integer action returns nothing if TrackableEx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TrackableEx.onTrack") else call error("Called TrackableEx.onTrack on invalid object.") endif endif call TrackableEx_onTrack_2(this_69, action) endfunction function alloc_TrackableEx takes nothing returns integer local integer this_69 if TrackableEx_firstFree == 0 then set TrackableEx_maxIndex = TrackableEx_maxIndex + 1 set this_69 = TrackableEx_maxIndex else set TrackableEx_firstFree = TrackableEx_firstFree - 1 set this_69 = TrackableEx_nextFree[TrackableEx_firstFree] endif set TrackableEx_typeId[this_69] = 677 return this_69 endfunction function trackableToIndex takes trackable object returns integer return handle_getHandleId(object) endfunction function trigger_registerTrackableHitEvent takes trigger this_69, trackable whichTrackable returns nothing call TriggerRegisterTrackableHitEvent(this_69, whichTrackable) endfunction function trigger_registerTrackableTrackEvent takes trigger this_69, trackable whichTrackable returns nothing call TriggerRegisterTrackableTrackEvent(this_69, whichTrackable) endfunction function construct_TrackableEx takes integer this_69, real pos_x, real pos_y, string path returns nothing local integer i local string newPath local trackable t set TrackableEx_onTrack[this_69] = 0 set TrackableEx_onClick[this_69] = 0 set TrackableEx_onDoubleClick[this_69] = 0 set i = 0 loop exitwhen i > 11 if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(i)) == MAP_CONTROL_USER then set newPath = "" if GetLocalPlayer() == Player(i) then set newPath = path endif set t = CreateTrackable(newPath, pos_x, pos_y, 0.) call dispatch_HashMap_put(TrackableEx_trackableOwner, trackableToIndex(t), playerToIndex(Player(i))) call dispatch_HashMap_put(TrackableEx_trackableObjects, trackableToIndex(t), this_69) call trigger_registerTrackableTrackEvent(TrackableEx_trackTrigger, t) call trigger_registerTrackableHitEvent(TrackableEx_clickTrigger, t) endif set i = i + 1 endloop set t = null endfunction function new_TrackableEx takes real pos_x, real pos_y, string path returns integer local integer this_69 = alloc_TrackableEx() call construct_TrackableEx(this_69, pos_x, pos_y, path) return this_69 endfunction function alloc_Window takes nothing returns integer local integer this_69 if Window_firstFree == 0 then set Window_maxIndex = Window_maxIndex + 1 set this_69 = Window_maxIndex else set Window_firstFree = Window_firstFree - 1 set this_69 = Window_nextFree[Window_firstFree] endif set Window_typeId[this_69] = 891 return this_69 endfunction function alloc_HashMap takes nothing returns integer local integer this_69 if HashMap_firstFree == 0 then set HashMap_maxIndex = HashMap_maxIndex + 1 set this_69 = HashMap_maxIndex else set HashMap_firstFree = HashMap_firstFree - 1 set this_69 = HashMap_nextFree[HashMap_firstFree] endif set HashMap_typeId[this_69] = 672 return this_69 endfunction function construct_HashMap takes integer this_69 returns nothing endfunction function new_HashMap takes nothing returns integer local integer this_69 = alloc_HashMap() call construct_HashMap(this_69) return this_69 endfunction function construct_Window takes integer this_69 returns nothing set Window_content[this_69] = new_LinkedList() set Window_trackMap[this_69] = new_HashMap() set Window_wantToClose[this_69] = new_HashMap() set Window_voidClick[this_69] = 0 endfunction function new_Window takes nothing returns integer local integer this_69 = alloc_Window() call construct_Window(this_69) return this_69 endfunction function setTrackableAt takes integer pos_x, integer pos_y, integer tr returns nothing set Setup_tracks[(Setup_menuWidth + 1) * pos_x + pos_y] = tr endfunction function closure_impl_104 takes integer this_69, integer i returns real local real ret = 0.02 local integer dum = 1 local integer e_x local integer e_y local integer win local integer i2 local integer tr local integer clVar local integer clVar_2 local integer clVar_3 local integer temp_e_x local integer temp_e_y local integer temp local integer temp_2 local integer temp_3 loop exitwhen dum > 10 if dispatch_ElementLoop_hasNext(w[this_69]) then set temp_e_x = dispatch_ElementLoop_next(w[this_69]) set temp_e_y = dispatch_ElementLoop_next_return_y set e_x = temp_e_x set e_y = temp_e_y else set win = new_Window() set i2 = 0 loop exitwhen i2 > 11 call WindowManager_openWindow(win, Player(i2)) set i2 = i2 + 1 endloop set ret = -1. exitwhen true endif set tr = new_TrackableEx(vec2_op_plus(element_toVec(e_x, e_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, "track2.mdx") call setTrackableAt(e_x, e_y, tr) set temp = tr set clVar = alloc_Closure_24() call dispatch_TrackableEx_onClick(temp, clVar) set temp_2 = tr set clVar_2 = alloc_Closure_22() call dispatch_TrackableEx_onDoubleClick(temp_2, clVar_2) set temp_3 = tr set clVar_3 = alloc_Closure_23() call dispatch_TrackableEx_onTrack(temp_3, clVar_3) set dum = dum + 1 endloop return ret endfunction function closure_impl_105 takes integer this_69, integer i returns real local real ret = -1. local integer k = 97 local integer temp = 97 + Setup_maxBonSize - 1 loop exitwhen k > temp set Setup_permAttackTome[k - 97] = CreateItem(Setup_permAttackItemRaw + k, Setup_recycleGraveyard_x, Setup_recycleGraveyard_y) set k = k + 1 endloop set Setup_permAttackNegTome = CreateItem(Setup_permAttackItemRaw + 67, Setup_recycleGraveyard_x, Setup_recycleGraveyard_y) return ret endfunction function alloc_Closure_25 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 726 return this_69 endfunction function closure_impl_106 takes integer this_69, integer i returns real local real ret = 0. local integer id local destructable d_2 local integer clVar if i >= dispatch_HashList_getSize(PreloadSystem_destructablesToPreload) then set ret = -1. else set id = dispatch_HashList_get(PreloadSystem_destructablesToPreload, i) set d_2 = CreateDestructable(id, 0., 0., 0., 0., 0) if GetDestructableName(d_2) == null or GetDestructableName(d_2) == "" then call printError("Following destructable is missing or invaild and could not be loaded: " + idInteger2IdString(id)) set ret = -2. else set clVar = alloc_Closure_25() set d[clVar] = d_2 call doAfter(1., clVar) set ret = PreloadSystem_destructableLoadTime endif endif set d_2 = null return ret endfunction function item_getX takes item this_69 returns real return GetItemX(this_69) endfunction function item_getY takes item this_69 returns real return GetItemY(this_69) endfunction function item_getPos takes item this_69 returns real set item_getPos_return_x = item_getX(this_69) set item_getPos_return_y = item_getY(this_69) return item_getPos_return_x endfunction function isTerrainWalkable takes real x, real y returns boolean local real temp_Terrain_tempPos_x local real temp_Terrain_tempPos_y call MoveRectTo(Terrain_find, x, y) call EnumItemsInRect(Terrain_find, null, ref_function_hideItem) call SetItemPosition(Terrain_dItem, x, y) set temp_Terrain_tempPos_x = item_getPos(Terrain_dItem) set temp_Terrain_tempPos_y = item_getPos_return_y set Terrain_tempPos_x = temp_Terrain_tempPos_x set Terrain_tempPos_y = temp_Terrain_tempPos_y call SetItemVisible(Terrain_dItem, false) loop exitwhen not (Terrain_hidMax > 0) set Terrain_hidMax = Terrain_hidMax - 1 call SetItemVisible(Terrain_hid[Terrain_hidMax], true) set Terrain_hid[Terrain_hidMax] = null endloop return (Terrain_tempPos_x - x) * (Terrain_tempPos_x - x) + (Terrain_tempPos_y - y) * (Terrain_tempPos_y - y) <= Terrain_MAX_RANGE * Terrain_MAX_RANGE and ( not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY)) endfunction function setpathArr takes integer index, boolean value returns nothing if index < 256000 then if index < 128000 then if index < 64000 then if index < 32000 then if index < 16000 then if index < 8000 then endif elseif index < 24000 then endif elseif index < 48000 then if index < 40000 then endif elseif index < 56000 then endif elseif index < 96000 then if index < 80000 then if index < 72000 then endif elseif index < 88000 then endif elseif index < 112000 then if index < 104000 then endif elseif index < 120000 then endif elseif index < 192000 then if index < 160000 then if index < 144000 then if index < 136000 then endif elseif index < 152000 then endif elseif index < 176000 then if index < 168000 then endif elseif index < 184000 then endif elseif index < 224000 then if index < 208000 then if index < 200000 then endif elseif index < 216000 then endif elseif index < 240000 then if index < 232000 then endif elseif index < 248000 then endif elseif index < 384000 then if index < 320000 then if index < 288000 then if index < 272000 then if index < 264000 then endif elseif index < 280000 then endif elseif index < 304000 then if index < 296000 then endif elseif index < 312000 then endif elseif index < 352000 then if index < 336000 then if index < 328000 then endif elseif index < 344000 then endif elseif index < 368000 then if index < 360000 then endif elseif index < 376000 then endif elseif index < 448000 then if index < 416000 then if index < 400000 then if index < 392000 then endif elseif index < 408000 then endif elseif index < 432000 then if index < 424000 then endif elseif index < 440000 then endif elseif index < 480000 then if index < 464000 then if index < 456000 then endif elseif index < 472000 then endif elseif index < 496000 then if index < 488000 then endif elseif index < 504000 then endif endfunction function setPathingAt takes real pos_x, real pos_y, boolean walkable returns nothing local integer x = R2I(pos_x) local integer y set x = x / 64 set y = R2I(pos_x) set y = y / 64 call setpathArr(x * 800 + y, walkable) endfunction function closure_impl_107 takes integer this_69, integer y returns integer local integer x = 1 loop exitwhen x > 768 call setPathingAt(x * 64., y * 64., isTerrainWalkable(32. + x, 32. + y)) set x = x + 1 endloop return 0 endfunction function alloc_Closure_26 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 715 return this_69 endfunction function unit_getName takes unit this_69 returns string return GetUnitName(this_69) endfunction function closure_impl_108 takes integer this_69, integer i returns real local real ret = 0. local integer id local unit u_2 local integer clVar if i >= dispatch_HashList_getSize(PreloadSystem_unitsToPreload) then call unit_remove(PreloadSystem_preloadDummy) set ret = -1. else set id = dispatch_HashList_get(PreloadSystem_unitsToPreload, i) set u_2 = CreateUnit(Basics_DUMMY_PLAYER, id, 0., 0., 0.) if unit_getName(u_2) == "" or unit_getName(u_2) == null then set ret = -2. call printError("Could not load the unit " + idInteger2IdString(id)) else set clVar = alloc_Closure_26() set u[clVar] = u_2 call doAfter(1., clVar) set ret = PreloadSystem_unitLoadTime endif endif set u_2 = null return ret endfunction function alloc_Closure_27 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 883 return this_69 endfunction function alloc_Closure_28 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 719 return this_69 endfunction function alloc_Closure_29 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 888 return this_69 endfunction function alloc_Closure_30 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 884 return this_69 endfunction function alloc_Closure_31 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 882 return this_69 endfunction function ElementLoop_onDestroy takes integer this_69 returns nothing endfunction function dealloc_ElementLoop takes integer obj returns nothing if ElementLoop_typeId[obj] == 0 then call error("Double free: object of type ElementLoop") else set ElementLoop_nextFree[ElementLoop_firstFree] = obj set ElementLoop_firstFree = ElementLoop_firstFree + 1 set ElementLoop_typeId[obj] = 0 endif endfunction function destroyElementLoop takes integer this_69 returns nothing call ElementLoop_onDestroy(this_69) call dealloc_ElementLoop(this_69) endfunction function dispatch_ElementLoop_destroyElementLoop takes integer this_69 returns nothing if ElementLoop_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ElementLoop.destroyElementLoop") else call error("Called ElementLoop.destroyElementLoop on invalid object.") endif endif call destroyElementLoop(this_69) endfunction function ElementLoop_close takes integer this_69 returns nothing call dispatch_ElementLoop_destroyElementLoop(this_69) endfunction function dispatch_ElementLoop_close takes integer this_69 returns nothing if ElementLoop_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ElementLoop.close") else call error("Called ElementLoop.close on invalid object.") endif endif call ElementLoop_close(this_69) endfunction function ElementLoop_iterator takes integer this_69 returns integer return this_69 endfunction function dispatch_ElementLoop_iterator takes integer this_69 returns integer local integer iterator_result if ElementLoop_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ElementLoop.iterator") else call error("Called ElementLoop.iterator on invalid object.") endif endif set iterator_result = ElementLoop_iterator(this_69) return iterator_result endfunction function element_op_minus takes integer this_x, integer this_y, integer other_x, integer other_y returns integer set element_op_minus_return_x = this_x - other_x set element_op_minus_return_y = this_y - other_y return element_op_minus_return_x endfunction function element_op_plus takes integer this_x, integer this_y, integer other_x, integer other_y returns integer set element_op_plus_return_x = this_x + other_x set element_op_plus_return_y = this_y + other_y return element_op_plus_return_x endfunction function getTrackableAt takes integer pos_x, integer pos_y returns integer return Setup_tracks[(Setup_menuWidth + 1) * pos_x + pos_y] endfunction function alloc_ElementLoop takes nothing returns integer local integer this_69 if ElementLoop_firstFree == 0 then set ElementLoop_maxIndex = ElementLoop_maxIndex + 1 set this_69 = ElementLoop_maxIndex else set ElementLoop_firstFree = ElementLoop_firstFree - 1 set this_69 = ElementLoop_nextFree[ElementLoop_firstFree] endif set ElementLoop_typeId[this_69] = 700 return this_69 endfunction function construct_ElementLoop takes integer this_69, integer a_x, integer a_y, integer b_x, integer b_y returns nothing local integer tempIndex = this_69 local integer tempIndex_2 set ElementLoop_a[tempIndex] = a_x set ElementLoop_a_2[tempIndex] = a_y set tempIndex_2 = this_69 set ElementLoop_b[tempIndex_2] = b_x set ElementLoop_b_2[tempIndex_2] = b_y set ElementLoop_start[this_69] = a_x endfunction function new_ElementLoop takes integer a_x, integer a_y, integer b_x, integer b_y returns integer local integer this_69 = alloc_ElementLoop() call construct_ElementLoop(this_69, a_x, a_y, b_x, b_y) return this_69 endfunction function Window_addClickDetection takes integer this_69, integer o returns nothing local integer tempIndex = o local integer temp_3 = Widget_pos[tempIndex] local integer temp_4 = Widget_pos_2[tempIndex] local integer tempIndex_2 = o local integer temp = Widget_pos[tempIndex_2] local integer temp_2 = Widget_pos_2[tempIndex_2] local integer tempIndex_3 = o local integer wurst__iterator2 = dispatch_ElementLoop_iterator(new_ElementLoop(temp_3, temp_4, element_op_minus(element_op_plus(temp, temp_2, Widget_size[tempIndex_3], Widget_size_2[tempIndex_3]), element_op_plus_return_y, 1, 1), element_op_minus_return_y)) local integer e_x local integer e_y local integer temp_e_x local integer temp_e_y loop exitwhen not dispatch_ElementLoop_hasNext(wurst__iterator2) set temp_e_x = dispatch_ElementLoop_next(wurst__iterator2) set temp_e_y = dispatch_ElementLoop_next_return_y set e_x = temp_e_x set e_y = temp_e_y call dispatch_HashMap_put(Window_trackMap[this_69], getTrackableAt(e_x, e_y), o) endloop call dispatch_ElementLoop_close(wurst__iterator2) endfunction function dispatch_Window_addClickDetection takes integer this_69, integer o returns nothing if Window_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Window.addClickDetection") else call error("Called Window.addClickDetection on invalid object.") endif endif call Window_addClickDetection(this_69, o) endfunction function Observable_onAdd takes integer this_69, integer w_2 returns nothing call dispatch_Window_addClickDetection(w_2, this_69) endfunction function Widget_onAdd takes integer this_69, integer w_2 returns nothing endfunction function cyc_dispatch_Window_add takes integer funcChoice, integer this_69, integer g returns nothing local integer wurst__iterator0 local integer wi if funcChoice == 0 then if Window_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Window.add") else call error("Called Window.add on invalid object.") endif endif call cyc_dispatch_Window_add(1, this_69, g) elseif funcChoice == 1 then call dispatch_LinkedList_add(Window_content[this_69], g) call cyc_dispatch_Window_add(2, g, this_69) elseif funcChoice == 2 then if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Widget.onAdd") else call error("Called Widget.onAdd on invalid object.") endif endif if Widget_typeId[this_69] <= 876 then if Widget_typeId[this_69] <= 873 then if Widget_typeId[this_69] <= 872 then call Widget_onAdd(this_69, g) else call cyc_dispatch_Window_add(3, this_69, g) endif else call Widget_onAdd(this_69, g) endif elseif Widget_typeId[this_69] <= 878 then call Observable_onAdd(this_69, g) else call Widget_onAdd(this_69, g) endif elseif funcChoice == 3 then set wurst__iterator0 = dispatch_LinkedList_iterator(Pane_content[this_69]) loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator0) set wi = dispatch_LLIterator_next(wurst__iterator0) call cyc_dispatch_Window_add(0, g, wi) endloop call dispatch_LLIterator_close(wurst__iterator0) endif endfunction function Observable_setClickAction takes integer this_69, integer p_2 returns nothing set Observable_click[this_69] = p_2 endfunction function dispatch_Observable_setClickAction takes integer this_69, integer p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Observable.setClickAction") else call error("Called Observable.setClickAction on invalid object.") endif endif call Observable_setClickAction(this_69, p_2) endfunction function TextBox_setColor takes integer this_69, integer c_red, integer c_green, integer c_blue returns nothing local integer tempIndex = this_69 set TextBox_col[tempIndex] = c_red set TextBox_col_2[tempIndex] = c_green set TextBox_col_3[tempIndex] = c_blue endfunction function dispatch_TextBox_setColor takes integer this_69, integer c_red, integer c_green, integer c_blue returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextBox.setColor") else call error("Called TextBox.setColor on invalid object.") endif endif call TextBox_setColor(this_69, c_red, c_green, c_blue) endfunction function TextBox_setText takes integer this_69, string s, player p_2 returns nothing if GetLocalPlayer() == p_2 then set TextBox_content[this_69] = s endif endfunction function dispatch_TextBox_setText takes integer this_69, string s, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextBox.setText") else call error("Called TextBox.setText on invalid object.") endif endif call TextBox_setText(this_69, s, p_2) endfunction function alloc_Button takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 878 return this_69 endfunction function construct_Observable takes integer this_69, integer w_2 returns nothing local integer temp = this_69 local integer tempIndex = w_2 local integer temp_2 = Widget_pos[tempIndex] local integer temp_3 = Widget_pos_2[tempIndex] local integer tempIndex_2 = w_2 call construct_Widget(temp, temp_2, temp_3, Widget_size[tempIndex_2], Widget_size_2[tempIndex_2]) set Observable_click[this_69] = 0 set Observable_dClick[this_69] = 0 set Observable_track[this_69] = 0 set Observable_unTrack[this_69] = 0 set Observable_playClickAnimation[this_69] = true set Observable_playDoubleClickAnimation[this_69] = true set Observable_playHoverAnimation[this_69] = true set Observable_content[this_69] = w_2 endfunction function TextSplat_setMaxWidth takes integer this_69, real maxWidth returns nothing local integer temp = this_69 local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_1 = TextSplat_pos[tempIndex] local real tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 set TextSplat_maxWidth[temp] = tempTupleSelectionResult_1 + maxWidth endfunction function dispatch_TextSplat_setMaxWidth takes integer this_69, real maxWidth returns nothing if TextSplat_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TextSplat.setMaxWidth") else call error("Called TextSplat.setMaxWidth on invalid object.") endif endif call TextSplat_setMaxWidth(this_69, maxWidth) endfunction function alloc_ImageEx takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 880 return this_69 endfunction function createImage_2 takes string path, real pos_x, real pos_y, real sizeX, real sizeY, integer layer returns image local image temp = CreateImage(path, sizeX, sizeY, 0., pos_x, pos_y, 0., 32., 32., 0., layer + 1) set createImagetempReturn_2 = temp set temp = null return createImagetempReturn_2 endfunction function construct_ImageEx4 takes integer this_69, integer pos_x, integer pos_y, real posOffset_x, real posOffset_y, integer size_x, integer size_y, real sizeFix_x, real sizeFix_y, string filePath, integer layer returns nothing call construct_Widget(this_69, pos_x, pos_y, size_x, size_y) set ImageEx_content[this_69] = createImage_2(filePath, vec2_op_plus(vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, posOffset_x, posOffset_y), vec2_op_plus_return_y, size_x * Setup_tileSize + sizeFix_x, size_y * Setup_tileSize + sizeFix_y, layer) endfunction function new_ImageEx takes integer pos_x, integer pos_y, real posOffset_x, real posOffset_y, integer size_x, integer size_y, real sizeFix_x, real sizeFix_y, string filePath, integer layer returns integer local integer this_69 = alloc_ImageEx() call construct_ImageEx4(this_69, pos_x, pos_y, posOffset_x, posOffset_y, size_x, size_y, sizeFix_x, sizeFix_y, filePath, layer) return this_69 endfunction function alloc_TextSplat takes nothing returns integer local integer this_69 if TextSplat_firstFree == 0 then set TextSplat_maxIndex = TextSplat_maxIndex + 1 set this_69 = TextSplat_maxIndex else set TextSplat_firstFree = TextSplat_firstFree - 1 set this_69 = TextSplat_nextFree[TextSplat_firstFree] endif set TextSplat_typeId[this_69] = 894 return this_69 endfunction function alloc_ImageList takes nothing returns integer local integer this_69 if ImageList_firstFree == 0 then set ImageList_maxIndex = ImageList_maxIndex + 1 set this_69 = ImageList_maxIndex else set ImageList_firstFree = ImageList_firstFree - 1 set this_69 = ImageList_nextFree[ImageList_firstFree] endif set ImageList_typeId[this_69] = 896 return this_69 endfunction function construct_ImageList takes integer this_69 returns nothing set ImageList_last[this_69] = 0 endfunction function new_ImageList takes nothing returns integer local integer this_69 = alloc_ImageList() call construct_ImageList(this_69) return this_69 endfunction function construct_TextSplat2 takes integer this_69, real pos_x, real pos_y, real fontSize, integer l returns nothing local integer tempIndex = this_69 local integer tempIndex_2 local integer tempIndex_3 set TextSplat_pos[tempIndex] = pos_x set TextSplat_pos_2[tempIndex] = pos_y set TextSplat_fontSize[this_69] = fontSize set TextSplat_images[this_69] = new_ImageList() set TextSplat_layer[this_69] = l set TextSplat_maxWidth[this_69] = TextSplat_DISABLE_MAX_WIDTH set tempIndex_2 = this_69 set TextSplat_cursor[tempIndex_2] = pos_x set TextSplat_cursor_2[tempIndex_2] = pos_y - fontSize set tempIndex_3 = this_69 set TextSplat_dimensions[tempIndex_3] = pos_x set TextSplat_dimensions_2[tempIndex_3] = pos_y endfunction function new_TextSplat takes real pos_x, real pos_y, real fontSize, integer l returns integer local integer this_69 = alloc_TextSplat() call construct_TextSplat2(this_69, pos_x, pos_y, fontSize, l) return this_69 endfunction function construct_Button takes integer this_69, integer pos_x, integer pos_y, integer scale, integer l, string name returns nothing local real textsize local real vecSize_x local real vecSize_y local integer receiver local integer tempIndex local real temp_vecSize_x local real temp_vecSize_y call construct_Observable(this_69, new_ImageEx(pos_x, pos_y, Button_posFix_x, Button_posFix_y, scale * 4, scale, Button_sizeFix_x, Button_sizeFix_y, Button_buttonTexture, l)) set Button_name[this_69] = name set textsize = 32. + scale * 20 set tempIndex = this_69 set temp_vecSize_x = element_toVec(Widget_size[tempIndex], Widget_size_2[tempIndex]) set temp_vecSize_y = element_toVec_return_y set vecSize_x = temp_vecSize_x set vecSize_y = temp_vecSize_y set receiver = new_TextSplat(vec2_op_plus(vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, vecSize_x / 4. - string_length(name) * (textsize / 2.), vecSize_y / 2.), vec2_op_plus_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, textsize, l) call dispatch_TextSplat_setMaxWidth(receiver, 1000.) set Button_splat[this_69] = receiver endfunction function new_Button takes integer pos_x, integer pos_y, integer scale, integer l, string name returns integer local integer this_69 = alloc_Button() call construct_Button(this_69, pos_x, pos_y, scale, l, name) return this_69 endfunction function alloc_Icon takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 876 return this_69 endfunction function getIconType takes string name returns integer local integer i = dispatch_HashMap_get(IconType_iconMap1, StringHash(name)) local integer i2 = dispatch_HashMap_get(IconType_iconMap2, StringHash(name)) set getIconType_return_normalId = i set getIconType_return_diableId = i2 return getIconType_return_normalId endfunction function construct_Icon takes integer this_69, string name, integer pos_x, integer pos_y, integer scale returns nothing local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local integer tempIndex_4 local integer temp call construct_Widget(this_69, pos_x, pos_y, scale, scale) set tempIndex = this_69 set Icon_realPos[tempIndex] = vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y) set Icon_realPos_2[tempIndex] = vec2_op_plus_return_y set tempIndex_2 = this_69 set temp = tempIndex_2 set tempIndex_3 = this_69 set Icon_realPos[temp] = vec2_op_plus(Icon_realPos[tempIndex_3], Icon_realPos_2[tempIndex_3], (scale - 1) * Setup_tileSize * 0.5, (scale - 1) * Setup_tileSize * 0.5) set Icon_realPos_2[tempIndex_2] = vec2_op_plus_return_y set tempIndex_4 = this_69 set Icon_typ[tempIndex_4] = getIconType(name) set Icon_typ_2[tempIndex_4] = getIconType_return_diableId set Icon_scale[this_69] = scale endfunction function new_Icon takes string name, integer pos_x, integer pos_y, integer scale returns integer local integer this_69 = alloc_Icon() call construct_Icon(this_69, name, pos_x, pos_y, scale) return this_69 endfunction function construct_ImageEx takes integer this_69, integer pos_x, integer pos_y, integer size_x, integer size_y, string filePath, integer layer returns nothing call construct_Widget(this_69, pos_x, pos_y, size_x, size_y) set ImageEx_content[this_69] = createImage_2(filePath, vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, size_x * Setup_tileSize * 1., size_y * Setup_tileSize * 1., layer) endfunction function new_ImageEx_2 takes integer pos_x, integer pos_y, integer size_x, integer size_y, string filePath, integer layer returns integer local integer this_69 = alloc_ImageEx() call construct_ImageEx(this_69, pos_x, pos_y, size_x, size_y, filePath, layer) return this_69 endfunction function alloc_Model takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 875 return this_69 endfunction function unit_setScale takes unit this_69, real scale returns nothing call SetUnitScale(this_69, scale, scale, scale) endfunction function construct_Model2 takes integer this_69, integer start_x, integer start_y, integer size_x, integer size_y, string modelPath, real scale returns nothing local real sizeAsVec_x local real sizeAsVec_y local integer tempIndex local real temp_sizeAsVec_x local real temp_sizeAsVec_y call construct_Widget(this_69, start_x, start_y, size_x, size_y) set tempIndex = this_69 set Model_col[tempIndex] = 255 set Model_col_2[tempIndex] = 255 set Model_col_3[tempIndex] = 255 set temp_sizeAsVec_x = size_x * 1. / 2 set temp_sizeAsVec_y = size_y * 1. / 2 set sizeAsVec_x = temp_sizeAsVec_x set sizeAsVec_y = temp_sizeAsVec_y set Model_u[this_69] = createUnit(Basics_DUMMY_PLAYER, Model_dummyID, vec2_op_plus(vec2_op_plus(Setup_menuStart_x, Setup_menuStart_y, element_toVec(start_x, start_y), element_toVec_return_y), vec2_op_plus_return_y, sizeAsVec_x, sizeAsVec_y), vec2_op_plus_return_y, real_asAngleDegrees(0.)) call unit_setVertexColor(Model_u[this_69], 255, 255, 255, 0) call unit_addEffect(Model_u[this_69], modelPath, "origin") call unit_setScale(Model_u[this_69], scale) endfunction function new_Model takes integer start_x, integer start_y, integer size_x, integer size_y, string modelPath, real scale returns integer local integer this_69 = alloc_Model() call construct_Model2(this_69, start_x, start_y, size_x, size_y, modelPath, scale) return this_69 endfunction function alloc_Observable takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 877 return this_69 endfunction function new_Observable takes integer w_2 returns integer local integer this_69 = alloc_Observable() call construct_Observable(this_69, w_2) return this_69 endfunction function alloc_Pane takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 873 return this_69 endfunction function alloc_Closure_32 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 886 return this_69 endfunction function createImage_3 takes string filePath, integer pos_x, integer pos_y, real posOffset_x, real posOffset_y, integer size_x, integer size_y, real sizeFix_x, real sizeFix_y, integer layer returns image return createImage_2(filePath, vec2_op_plus(vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, posOffset_x, posOffset_y), vec2_op_plus_return_y, size_x * Setup_tileSize + sizeFix_x, size_y * Setup_tileSize + sizeFix_y, layer) endfunction function createImage_4 takes string filePath, integer pos_x, integer pos_y, integer size_x, integer size_y, real sizeFix_x, real sizeFix_y, integer layer returns image return createImage_2(filePath, vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, size_x * Setup_tileSize + sizeFix_x, size_y * Setup_tileSize + sizeFix_y, layer) endfunction function alloc_ListImage takes nothing returns integer local integer this_69 if ListImage_firstFree == 0 then set ListImage_maxIndex = ListImage_maxIndex + 1 set this_69 = ListImage_maxIndex else set ListImage_firstFree = ListImage_firstFree - 1 set this_69 = ListImage_nextFree[ListImage_firstFree] endif return this_69 endfunction function construct_ListImage takes integer this_69, image img returns nothing set ListImage_img[this_69] = img endfunction function new_ListImage takes image img returns integer local integer this_69 = alloc_ListImage() call construct_ListImage(this_69, img) return this_69 endfunction function ImageList_add_2 takes integer this_69, image img returns nothing local integer temp if ImageList_first[this_69] == 0 then set ImageList_first[this_69] = new_ListImage(img) set ImageList_last_2[this_69] = ImageList_first[this_69] else set temp = new_ListImage(img) set ListImage_next[ImageList_last_2[this_69]] = temp set ImageList_last_2[this_69] = temp endif endfunction function dispatch_ImageList_add_2 takes integer this_69, image img returns nothing if ImageList_typeId_2[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ImageList.add") else call error("Called ImageList.add on invalid object.") endif endif call ImageList_add_2(this_69, img) endfunction function construct_ImageEx3 takes integer this_69, integer pos_x, integer pos_y, integer size_x, integer size_y, real sizeFix_x, real sizeFix_y, string filePath, integer layer returns nothing call construct_Widget(this_69, pos_x, pos_y, size_x, size_y) set ImageEx_content[this_69] = createImage_2(filePath, vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, size_x * Setup_tileSize + sizeFix_x, size_y * Setup_tileSize + sizeFix_y, layer) endfunction function new_ImageEx_3 takes integer pos_x, integer pos_y, integer size_x, integer size_y, real sizeFix_x, real sizeFix_y, string filePath, integer layer returns integer local integer this_69 = alloc_ImageEx() call construct_ImageEx3(this_69, pos_x, pos_y, size_x, size_y, sizeFix_x, sizeFix_y, filePath, layer) return this_69 endfunction function alloc_ImageList_2 takes nothing returns integer local integer this_69 if ImageList_firstFree_2 == 0 then set ImageList_maxIndex_2 = ImageList_maxIndex_2 + 1 set this_69 = ImageList_maxIndex_2 else set ImageList_firstFree_2 = ImageList_firstFree_2 - 1 set this_69 = ImageList_nextFree_2[ImageList_firstFree_2] endif set ImageList_typeId_2[this_69] = 898 return this_69 endfunction function construct_ImageList_2 takes integer this_69 returns nothing set ImageList_first[this_69] = 0 set ImageList_last_2[this_69] = 0 endfunction function new_ImageList_2 takes nothing returns integer local integer this_69 = alloc_ImageList_2() call construct_ImageList_2(this_69) return this_69 endfunction function construct_Pane takes integer this_69, integer pos_x, integer pos_y, integer size_x, integer size_y, integer l, boolean exitable returns nothing local integer i local integer temp local integer temp_2 local integer i_2 local integer temp_3 local integer temp_4 local integer clVar local integer receiver local integer temp_5 local integer temp_6 call construct_Widget(this_69, pos_x, pos_y, size_x, size_y) set Pane_onExit[this_69] = 0 set Pane_list[this_69] = new_ImageList_2() set Pane_content[this_69] = new_LinkedList() call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_leftBotCorner, pos_x, pos_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_leftTopCorner, element_op_plus(pos_x, pos_y, 0, size_y), element_op_plus_return_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_rightBotCorner, element_op_plus(pos_x, pos_y, size_x, 0), element_op_plus_return_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_rightTopCorner, element_op_plus(pos_x, pos_y, size_x, size_y), element_op_plus_return_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) set i = pos_x + Pane_tileSize set temp = pos_x + size_x - Pane_tileSize set temp_2 = Pane_tileSize loop exitwhen i > temp call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_horizontalSide, i, pos_y, Pane_posFixBot_x, Pane_posFixBot_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_horizontalSide, i, pos_y + size_y, Pane_posFixTop_x, Pane_posFixTop_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) set i = i + temp_2 endloop set i_2 = pos_y + Pane_tileSize set temp_3 = pos_y + size_y - Pane_tileSize set temp_4 = Pane_tileSize loop exitwhen i_2 > temp_3 call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_verticalSide, pos_x, i_2, Pane_posFixLeft_x, Pane_posFixLeft_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_verticalSide, pos_x + size_x, i_2, Pane_posFixRight_x, Pane_posFixRight_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) set i_2 = i_2 + temp_4 endloop if exitable then set temp_6 = Pane_content[this_69] set receiver = new_Observable(new_ImageEx_3(element_op_minus(element_op_plus(pos_x, pos_y, size_x, size_y), element_op_plus_return_y, 1, 1), element_op_minus_return_y, 1, 1, 20., 20., "menuExit.blp", l)) set temp_5 = receiver set clVar = alloc_Closure_32() set this_66[clVar] = this_69 call dispatch_Observable_setClickAction(temp_5, clVar) call dispatch_LinkedList_add(temp_6, receiver) endif endfunction function new_Pane takes integer pos_x, integer pos_y, integer size_x, integer size_y, integer l, boolean exitable returns integer local integer this_69 = alloc_Pane() call construct_Pane(this_69, pos_x, pos_y, size_x, size_y, l, exitable) return this_69 endfunction function alloc_Closure_33 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 887 return this_69 endfunction function vec2_op_mult takes real this_x, real this_y, real factor returns real set vec2_op_mult_return_x = this_x * factor set vec2_op_mult_return_y = this_y * factor return vec2_op_mult_return_x endfunction function vec2_toString takes real this_x, real this_y returns string return "Vector2 [ " + real_toString(this_x) + ", " + real_toString(this_y) + " ]" endfunction function construct_Pane2 takes integer this_69, integer pos_x, integer pos_y, integer size_x, integer size_y, integer l, integer backgroundScale, boolean exitable returns nothing local real backgroundOffset_x local real backgroundOffset_y local real backgroundSizeFix_x local real backgroundSizeFix_y local integer i local integer temp local integer temp_2 local integer i2 local integer temp_3 local integer temp_4 local integer i_2 local integer temp_5 local integer temp_6 local integer i_3 local integer temp_7 local integer temp_8 local integer clVar local integer receiver local real temp_backgroundOffset_x local real temp_backgroundOffset_y local real temp_backgroundOffset_x_2 local real temp_backgroundOffset_y_2 local real temp_backgroundSizeFix_x local real temp_backgroundSizeFix_y local integer temp_9 local integer temp_10 call construct_Widget(this_69, pos_x, pos_y, size_x, size_y) set Pane_onExit[this_69] = 0 set Pane_list[this_69] = new_ImageList_2() set Pane_content[this_69] = new_LinkedList() set temp_backgroundOffset_x = element_toVec(backgroundScale, backgroundScale) set temp_backgroundOffset_y = element_toVec_return_y set backgroundOffset_x = temp_backgroundOffset_x set backgroundOffset_y = temp_backgroundOffset_y set backgroundOffset_x = backgroundOffset_x / 2. set backgroundOffset_y = backgroundOffset_y / 2. set temp_backgroundOffset_x_2 = vec2_op_minus(backgroundOffset_x, backgroundOffset_y, 64., 64.) set temp_backgroundOffset_y_2 = vec2_op_minus_return_y set backgroundOffset_x = temp_backgroundOffset_x_2 set backgroundOffset_y = temp_backgroundOffset_y_2 set temp_backgroundSizeFix_x = vec2_op_mult(element_toVec(backgroundScale, backgroundScale), element_toVec_return_y, 0.01) set temp_backgroundSizeFix_y = vec2_op_mult_return_y set backgroundSizeFix_x = temp_backgroundSizeFix_x set backgroundSizeFix_y = temp_backgroundSizeFix_y set i = pos_x set temp = pos_x + size_x - backgroundScale set temp_2 = backgroundScale loop exitwhen i > temp set i2 = pos_y set temp_3 = pos_y + size_y - backgroundScale set temp_4 = backgroundScale loop exitwhen i2 > temp_3 call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Widget_backgroundTexture[GetRandomInt(1, 8)], i, i2, backgroundOffset_x, backgroundOffset_y, backgroundScale, backgroundScale, backgroundSizeFix_x, backgroundSizeFix_y, l)) set i2 = i2 + temp_4 endloop set i = i + temp_2 endloop call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_leftBotCorner, pos_x, pos_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_leftTopCorner, element_op_plus(pos_x, pos_y, 0, size_y), element_op_plus_return_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_rightBotCorner, element_op_plus(pos_x, pos_y, size_x, 0), element_op_plus_return_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_4(Pane_rightTopCorner, element_op_plus(pos_x, pos_y, size_x, size_y), element_op_plus_return_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) set i_2 = pos_x + Pane_tileSize set temp_5 = pos_x + size_x - Pane_tileSize set temp_6 = Pane_tileSize loop exitwhen i_2 > temp_5 call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_horizontalSide, i_2, pos_y, Pane_posFixBot_x, Pane_posFixBot_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_horizontalSide, i_2, pos_y + size_y, Pane_posFixTop_x, Pane_posFixTop_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call print(vec2_toString(element_toVec(i_2, pos_y), element_toVec_return_y)) set i_2 = i_2 + temp_6 endloop set i_3 = pos_y + Pane_tileSize set temp_7 = pos_y + size_y - Pane_tileSize set temp_8 = Pane_tileSize loop exitwhen i_3 > temp_7 call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_verticalSide, pos_x, i_3, Pane_posFixLeft_x, Pane_posFixLeft_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) call dispatch_ImageList_add_2(Pane_list[this_69], createImage_3(Pane_verticalSide, pos_x + size_x, i_3, Pane_posFixRight_x, Pane_posFixRight_y, Pane_tileDimensions_x, Pane_tileDimensions_y, Pane_sizeFix_x, Pane_sizeFix_y, l)) set i_3 = i_3 + temp_8 endloop if exitable then set temp_10 = Pane_content[this_69] set receiver = new_Observable(new_ImageEx_3(element_op_minus(element_op_plus(pos_x, pos_y, size_x, size_y), element_op_plus_return_y, 1, 1), element_op_minus_return_y, 1, 1, 20., 20., "menuExit.blp", l)) set temp_9 = receiver set clVar = alloc_Closure_33() set this_67[clVar] = this_69 call dispatch_Observable_setClickAction(temp_9, clVar) call dispatch_LinkedList_add(temp_10, receiver) endif endfunction function new_Pane_2 takes integer pos_x, integer pos_y, integer size_x, integer size_y, integer l, integer backgroundScale, boolean exitable returns integer local integer this_69 = alloc_Pane() call construct_Pane2(this_69, pos_x, pos_y, size_x, size_y, l, backgroundScale, exitable) return this_69 endfunction function alloc_TextBox takes nothing returns integer local integer this_69 if Widget_firstFree == 0 then set Widget_maxIndex = Widget_maxIndex + 1 set this_69 = Widget_maxIndex else set Widget_firstFree = Widget_firstFree - 1 set this_69 = Widget_nextFree[Widget_firstFree] endif set Widget_typeId[this_69] = 879 return this_69 endfunction function construct_TextBox takes integer this_69, integer pos_x, integer pos_y, integer size_x, integer size_y, real fontsize, integer l returns nothing local real posFix_x local real posFix_y local integer receiver local integer tempIndex local real tempTupleSelectionResult_2 local real temp_tempTupleSelectionResult_2 local real temp_posFix_x local real temp_posFix_y local real tempTupleSelectionResult_1 local real temp_tempTupleSelectionResult_1 local integer temp call construct_Widget(this_69, pos_x, pos_y, size_x, size_y) set TextBox_content[this_69] = "" set tempIndex = this_69 set TextBox_col[tempIndex] = 0 set TextBox_col_2[tempIndex] = 0 set TextBox_col_3[tempIndex] = 0 set temp_posFix_x = 30. call element_toVec(size_x, size_y) set temp_tempTupleSelectionResult_2 = element_toVec_return_y set tempTupleSelectionResult_2 = temp_tempTupleSelectionResult_2 set temp_posFix_y = tempTupleSelectionResult_2 - 30. set posFix_x = temp_posFix_x set posFix_y = temp_posFix_y set receiver = new_TextSplat(vec2_op_plus(vec2_op_plus(element_toVec(pos_x, pos_y), element_toVec_return_y, posFix_x, posFix_y), vec2_op_plus_return_y, Setup_menuStart_x, Setup_menuStart_y), vec2_op_plus_return_y, fontsize, l) set temp = receiver set temp_tempTupleSelectionResult_1 = element_toVec(size_x, size_y) set tempTupleSelectionResult_1 = temp_tempTupleSelectionResult_1 call dispatch_TextSplat_setMaxWidth(temp, tempTupleSelectionResult_1 - 60.) set TextBox_splat[this_69] = receiver endfunction function new_TextBox takes integer pos_x, integer pos_y, integer size_x, integer size_y, real fontsize, integer l returns integer local integer this_69 = alloc_TextBox() call construct_TextBox(this_69, pos_x, pos_y, size_x, size_y, fontsize, l) return this_69 endfunction function closure_impl_109 takes integer this_69, integer i returns real local real ret = 0.01 local integer temp = i local integer i2 local integer row local integer colu local integer clVar local integer row1 local integer blub local integer cc local integer pp local integer tt local integer clVar_2 local integer clVar_3 local integer clVar_4 local integer clVar_5 local integer temp_2 local integer temp_3 local integer temp_4 local integer temp_5 if temp == 0 then call dispatch_DebugFile_save(Setup_debugFile) set i2 = 11 set shopB[this_69] = new_Button(i2, 22, 1, 0, "Shop") set i2 = i2 + 5 set scoreB[this_69] = new_Button(i2, 22, 1, 0, "Score") set i2 = i2 + 5 set guideB[this_69] = new_Button(i2, 22, 1, 0, "Guide") set i2 = i2 + 5 set statsB[this_69] = new_Button(i2, 22, 1, 0, "Stats") call dispatch_DebugFile_save(Setup_debugFile) set row = 8 set colu = 18 set arrow1[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Top_Links.blp", 0) set colu = colu - 2 set arrow2[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Vertikal.blp", 0) set colu = colu - 2 set arrow3[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Vertikal.blp", 0) set colu = colu - 2 set arrow4[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Vertikal.blp", 0) set colu = colu - 2 set arrow5[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Bot_Rechts.blp", 0) set colu = colu call dispatch_DebugFile_save(Setup_debugFile) set row = row + 4 set arrow6[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Hrizontal.blp", 0) set colu = colu set row = row + 4 set arrow7[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Bot_Links.blp", 0) set colu = colu + 2 set arrow8[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Vertikal.blp", 0) set colu = colu + 2 set arrow9[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Vertikal.blp", 0) set colu = colu + 2 set arrow10[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Vertikal.blp", 0) set colu = colu + 2 set arrow11[this_69] = new_ImageEx_2(row, colu, 2, 2, "Pfeil_Kacheln\\HotN_Top_Rechts.blp", 0) set colu = colu + 2 call dispatch_DebugFile_save(Setup_debugFile) elseif temp == 1 then set shopPleft[this_69] = new_Pane_2(4, 0, 16, 20, 1, 4, false) set shopPmiddle[this_69] = new_Pane(23, 14, 4, 4, 1, false) call new_Pane_2(30, 4, 12, 4, 2, 4, false) set clVar = alloc_Closure_28() call doAfter(10., clVar) set shopPleftBot[this_69] = new_Pane(23, 8, 4, 2, 1, false) set shopPleftBot2[this_69] = new_Pane(23, 1, 4, 6, 1, false) elseif temp == 2 then set shopT1[this_69] = new_TextBox(21, 17, 16, 4, 65., 0) call dispatch_TextBox_setColor(shopT1[this_69], 255, 201, 14) call dispatch_TextBox_setText(shopT1[this_69], "Mighty Frog Sense", Player(0)) set shopT3[this_69] = new_TextBox(32, 7, 16, 1, 65., 0) call dispatch_TextBox_setColor(shopT3[this_69], 50, 255, 50) call dispatch_TextBox_setText(shopT3[this_69], "15000", Player(0)) set shopT2[this_69] = new_TextBox(5, 20, 13, 1, 70., 0) call dispatch_TextBox_setColor(shopT2[this_69], 255, 180, 220) call dispatch_TextBox_setText(shopT2[this_69], "I", Player(0)) set shopT7[this_69] = new_TextBox(9, 20, 13, 1, 70., 0) call dispatch_TextBox_setColor(shopT7[this_69], 0, 162, 232) call dispatch_TextBox_setText(shopT7[this_69], "II", Player(0)) set shopT8[this_69] = new_TextBox(13, 20, 13, 1, 70., 0) call dispatch_TextBox_setColor(shopT8[this_69], 181, 230, 29) call dispatch_TextBox_setText(shopT8[this_69], "III", Player(0)) set shopT9[this_69] = new_TextBox(17, 20, 13, 1, 70., 0) call dispatch_TextBox_setColor(shopT9[this_69], 255, 201, 14) call dispatch_TextBox_setText(shopT9[this_69], "IV", Player(0)) elseif temp == 3 then set row1 = 6 set blub = 18 set shop1[this_69] = new_Icon("Hydra", row1, blub, 2) set blub = blub - 4 set shop2[this_69] = new_Icon("3M1", row1, blub, 2) set blub = blub - 4 set shop3[this_69] = new_Icon("3M1", row1, blub, 2) set blub = blub - 4 set shop4[this_69] = new_Icon("3M1", row1, blub, 2) set blub = blub - 4 set shop5[this_69] = new_Icon("Grunt", row1, blub, 2) set blub = 18 set buttonLayerShop01[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop01[this_69]], 255, 180, 220) set blub = blub - 4 set buttonLayerShop02[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop02[this_69]], 255, 180, 220) set blub = blub - 4 set buttonLayerShop03[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop03[this_69]], 255, 180, 220) set blub = blub - 4 set buttonLayerShop04[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop04[this_69]], 255, 180, 220) set blub = blub - 4 set buttonLayerShop05[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop05[this_69]], 255, 180, 220) set row1 = row1 + 4 set blub = 18 set shop6[this_69] = new_Icon("Glove", row1, blub, 2) set blub = blub - 4 set shop7[this_69] = new_Icon("Grunt", row1, blub, 2) set blub = blub - 4 set shop8[this_69] = new_Icon("3M1", row1, blub, 2) set blub = blub - 4 set shop9[this_69] = new_Icon("3M1", row1, blub, 2) set blub = blub - 4 set shop10[this_69] = new_Icon("3M1", row1, blub, 2) set blub = 18 set buttonLayerShop06[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop06[this_69]], 0, 162, 232) set blub = blub - 4 set buttonLayerShop07[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop07[this_69]], 0, 162, 232) set blub = blub - 4 set buttonLayerShop08[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop08[this_69]], 0, 162, 232) set blub = blub - 4 set buttonLayerShop09[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop09[this_69]], 0, 162, 232) set blub = blub - 4 set buttonLayerShop10[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop10[this_69]], 0, 162, 232) set row1 = row1 + 4 set blub = 18 set shop11[this_69] = new_Icon("HealingSpray", row1, blub, 2) set blub = blub - 4 set shop12[this_69] = new_Icon("HealingSpray", row1, blub, 2) set blub = blub - 4 set shop13[this_69] = new_Icon("Impale", row1, blub, 2) set blub = blub - 4 set shop14[this_69] = new_Icon("Impale", row1, blub, 2) set blub = blub - 4 set shop15[this_69] = new_Icon("Impale", row1, blub, 2) set blub = 18 set buttonLayerShop11[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop11[this_69]], 181, 230, 29) set blub = blub - 4 set buttonLayerShop12[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop12[this_69]], 181, 230, 29) set blub = blub - 4 set buttonLayerShop13[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop13[this_69]], 181, 230, 29) set blub = blub - 4 set buttonLayerShop14[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop14[this_69]], 181, 230, 29) set blub = blub - 4 set buttonLayerShop15[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop15[this_69]], 181, 230, 29) set row1 = row1 + 4 set blub = 18 set shop16[this_69] = new_Icon("Hex", row1, blub, 2) set blub = blub - 4 set shop17[this_69] = new_Icon("Impale", row1, blub, 2) set blub = blub - 4 set shop18[this_69] = new_Icon("Impale", row1, blub, 2) set blub = blub - 4 set shop19[this_69] = new_Icon("Bash", row1, blub, 2) set blub = blub - 4 set shop20[this_69] = new_Icon("Bash", row1, blub, 2) set blub = blub - 4 set blub = 18 set buttonLayerShop16[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop16[this_69]], 255, 201, 14) set blub = blub - 4 set buttonLayerShop17[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop17[this_69]], 255, 201, 14) set blub = blub - 4 set buttonLayerShop18[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop18[this_69]], 255, 201, 14) set blub = blub - 4 set buttonLayerShop19[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop19[this_69]], 255, 201, 14) set blub = blub - 4 set buttonLayerShop20[this_69] = new_ImageEx_2(row1, blub, 2, 2, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop20[this_69]], 255, 201, 14) set blub = blub - 4 set row1 = 24 set blub = 9 set shop24[this_69] = new_Icon("Hex", row1, blub, 2) set shop25[this_69] = new_Icon("Hex", row1 + 2, blub, 2) set blub = blub - 3 set shop26[this_69] = new_Icon("Hex", row1, blub, 2) set shop27[this_69] = new_Icon("Hex", row1 + 2, blub, 2) set blub = blub - 2 set shop28[this_69] = new_Icon("Hex", row1, blub, 2) set shop29[this_69] = new_Icon("Hex", row1 + 2, blub, 2) set blub = blub - 2 set shop30[this_69] = new_Icon("Hex", row1, blub, 2) set shop31[this_69] = new_Icon("Hex", row1 + 2, blub, 2) set cc = 24 set pp = 15 set tt = 4 set shop32[this_69] = new_Icon("Hex", cc, pp, tt) set buttonLayerShop32[this_69] = new_ImageEx_2(cc, pp, tt, tt, "64x64LayerShopIcon.blp", 0) call image_setColor(ImageEx_content[buttonLayerShop32[this_69]], 255, 201, 14) set buttonLayerShopSell[this_69] = new_ImageEx_2(31, 6, 5, 3, "UI\\Widgets\\EscMenu\\Human\\alliance-gold.blp", 2) set buttonLayerShopBuy[this_69] = new_ImageEx_2(37, 6, 6, 3, "menuBuy.blp", 0) set buttonLayerCateAgr[this_69] = new_ImageEx_2(2, 15, 3, 3, "cateAgr.blp", 0) set buttonLayerCateDef[this_69] = new_ImageEx_2(2, 10, 3, 3, "cateDef.blp", 0) set buttonLayerCateUti[this_69] = new_ImageEx_2(2, 5, 3, 3, "cateUtiDis.blp", 0) elseif temp == 4 then set shopOb[this_69] = new_Observable(shopB[this_69]) set temp_2 = shopOb[this_69] set clVar_2 = alloc_Closure_31() call dispatch_Observable_setClickAction(temp_2, clVar_2) set scoreOb[this_69] = new_Observable(scoreB[this_69]) set temp_3 = scoreOb[this_69] set clVar_3 = alloc_Closure_29() call dispatch_Observable_setClickAction(temp_3, clVar_3) set guideOb[this_69] = new_Observable(guideB[this_69]) set temp_4 = guideOb[this_69] set clVar_4 = alloc_Closure_30() call dispatch_Observable_setClickAction(temp_4, clVar_4) set statsOb[this_69] = new_Observable(statsB[this_69]) set temp_5 = statsOb[this_69] set clVar_5 = alloc_Closure_27() call dispatch_Observable_setClickAction(temp_5, clVar_5) elseif temp == 5 then call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow1[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow2[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow3[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow4[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow5[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow6[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow7[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow8[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow9[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow10[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, arrow11[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, scoreOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, guideOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, statsOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopPmiddle[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopPleft[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopPleftBot[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopPleftBot2[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop1[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop2[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop3[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop4[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop5[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop6[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop7[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop8[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop9[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop10[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop11[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop12[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop13[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop14[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop15[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop16[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop17[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop18[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop19[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop20[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop24[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop25[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop26[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop27[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop28[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop29[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop30[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop31[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shop32[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopT1[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopT2[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopT3[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopT7[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopT8[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, shopT9[this_69]) call cyc_dispatch_Window_add(0, GameStart_guideWindow, shopOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_guideWindow, scoreOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_guideWindow, guideOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_guideWindow, statsOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_statsWindow, shopOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_statsWindow, scoreOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_statsWindow, guideOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_statsWindow, statsOb[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop01[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop02[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop03[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop04[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop05[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop06[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop07[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop08[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop09[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop10[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop11[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop12[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop13[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop14[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop15[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop16[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop17[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop18[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop19[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop20[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShop32[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShopBuy[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerShopSell[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerCateAgr[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerCateDef[this_69]) call cyc_dispatch_Window_add(0, GameStart_shopWindow, buttonLayerCateUti[this_69]) elseif temp == 6 then set picked1[this_69] = new_Icon("Hydra", 2, 20, 2) set picked2[this_69] = new_Icon("Hydra", 2, 17, 2) set picked3[this_69] = new_Icon("Hydra", 2, 14, 2) set picked4[this_69] = new_Icon("Hydra", 2, 11, 2) set picked5[this_69] = new_Icon("Hydra", 2, 8, 2) set picked6[this_69] = new_Icon("Hydra", 2, 5, 2) set picked7[this_69] = new_Icon("Hydra", 42, 20, 2) set picked8[this_69] = new_Icon("Hydra", 42, 17, 2) set picked9[this_69] = new_Icon("Hydra", 42, 14, 2) set picked10[this_69] = new_Icon("Hydra", 42, 11, 2) set picked11[this_69] = new_Icon("Hydra", 42, 8, 2) set picked12[this_69] = new_Icon("Hydra", 42, 5, 2) set pickable1[this_69] = new_Icon("Hex", 10, 19, 3) set pickable2[this_69] = new_Icon("Hex", 13, 19, 3) set pickable3[this_69] = new_Icon("Hex", 16, 19, 3) set pickable4[this_69] = new_Icon("Hex", 19, 19, 3) set pickable5[this_69] = new_Icon("Hex", 10, 16, 3) set pickable6[this_69] = new_Icon("Hex", 13, 16, 3) set pickable7[this_69] = new_Icon("Hex", 16, 16, 3) set pickable8[this_69] = new_Icon("Hex", 19, 16, 3) set pickable9[this_69] = new_Icon("Hex", 10, 13, 3) set pickable10[this_69] = new_Icon("Hex", 13, 13, 3) set pickable11[this_69] = new_Icon("Hex", 16, 13, 3) set pickable12[this_69] = new_Icon("Hex", 19, 13, 3) set pickability1[this_69] = new_Icon("HealingSpray", 11, 7, 2) set pickability2[this_69] = new_Icon("HealingSpray", 13, 7, 2) set pickability3[this_69] = new_Icon("HealingSpray", 15, 7, 2) set pickability4[this_69] = new_Icon("HealingSpray", 11, 5, 2) set pickability5[this_69] = new_Icon("HealingSpray", 13, 5, 2) set pickability6[this_69] = new_Icon("HealingSpray", 15, 5, 2) set abilityUpgrade1[this_69] = new_Icon("impale", 18, 9, 1) set abilityUpgrade3[this_69] = new_Icon("impale", 18, 8, 1) set abilityUpgrade6[this_69] = new_Icon("impale", 18, 7, 1) set abilityUpgrade9[this_69] = new_Icon("impale", 18, 6, 1) set abilityUpgradeU[this_69] = new_Icon("impale", 18, 4, 1) elseif temp == 7 then call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked1[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked2[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked3[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked4[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked5[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked6[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked7[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked8[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked9[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked10[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked11[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, picked12[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable1[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable2[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable3[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable4[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable5[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable6[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable7[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable8[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable9[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable10[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable11[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickable12[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickability1[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickability2[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickability3[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickability4[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickability5[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickability6[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, abilityUpgrade1[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, abilityUpgrade3[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, abilityUpgrade6[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, abilityUpgrade9[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, abilityUpgradeU[this_69]) elseif temp == 8 then set pickablesPane[this_69] = new_Pane(0, 0, 44, 22, 1, false) set pickedHeroPane[this_69] = new_Pane_2(23, 9, 8, 12, 1, 4, false) set pickedAbilityPane[this_69] = new_Pane(10, 4, 6, 4, 1, false) set model1[this_69] = new_Model(28, 12, 6, 6, "units\\human\\HeroPaladin\\HeroPaladin.mdx", 4.) elseif temp == 9 then call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickablesPane[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickedHeroPane[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, pickedAbilityPane[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, model1[this_69]) elseif temp == 10 then set playerName1[this_69] = new_TextBox(3, 19, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName1[this_69], "bhusta", Player(0)) call dispatch_TextBox_setColor(playerName1[this_69], 255, 255, 255) set playerName2[this_69] = new_TextBox(3, 16, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName2[this_69], "Criggels", Player(0)) call dispatch_TextBox_setColor(playerName2[this_69], 255, 255, 255) set playerName3[this_69] = new_TextBox(3, 13, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName3[this_69], "Jopi", Player(0)) call dispatch_TextBox_setColor(playerName3[this_69], 255, 255, 255) set playerName4[this_69] = new_TextBox(3, 10, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName4[this_69], "Timi", Player(0)) call dispatch_TextBox_setColor(playerName4[this_69], 255, 255, 255) set playerName5[this_69] = new_TextBox(3, 7, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName5[this_69], "Curryking", Player(0)) call dispatch_TextBox_setColor(playerName5[this_69], 255, 255, 255) set playerName6[this_69] = new_TextBox(3, 4, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName6[this_69], "StaticMonkey", Player(0)) call dispatch_TextBox_setColor(playerName6[this_69], 255, 255, 255) set playerName7[this_69] = new_TextBox(35, 19, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName7[this_69], "WaterKnight", Player(0)) call dispatch_TextBox_setColor(playerName7[this_69], 255, 255, 255) set playerName8[this_69] = new_TextBox(35, 16, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName8[this_69], "Frottzy", Player(0)) call dispatch_TextBox_setColor(playerName8[this_69], 255, 255, 255) set playerName9[this_69] = new_TextBox(35, 13, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName9[this_69], "Menag", Player(0)) call dispatch_TextBox_setColor(playerName9[this_69], 255, 255, 255) set playerName10[this_69] = new_TextBox(35, 10, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName10[this_69], "Pikatchu", Player(0)) call dispatch_TextBox_setColor(playerName10[this_69], 255, 255, 255) set playerName11[this_69] = new_TextBox(35, 7, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName11[this_69], "Gesundheit", Player(0)) call dispatch_TextBox_setColor(playerName11[this_69], 255, 255, 255) set playerName12[this_69] = new_TextBox(35, 4, 10, 2, 65., 0) call dispatch_TextBox_setText(playerName12[this_69], "Heiniverse", Player(0)) call dispatch_TextBox_setColor(playerName12[this_69], 255, 255, 255) elseif temp == 11 then call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName1[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName2[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName3[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName4[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName5[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName6[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName7[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName8[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName9[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName10[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName11[this_69]) call cyc_dispatch_Window_add(0, GameStart_scoreWindow, playerName12[this_69]) else set ret = - 1. endif return ret endfunction function dispatch_PreloadAction_run takes integer this_69, integer i returns real local real run_result if PreloadAction_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling PreloadAction.run") else call error("Called PreloadAction.run on invalid object.") endif endif if PreloadAction_typeId[this_69] <= 754 then if PreloadAction_typeId[this_69] <= 752 then if PreloadAction_typeId[this_69] <= 751 then if PreloadAction_typeId[this_69] <= 750 then set run_result = closure_impl_109(this_69, i) else set run_result = closure_impl_102(this_69, i) endif else set run_result = closure_impl_106(this_69, i) endif elseif PreloadAction_typeId[this_69] <= 753 then set run_result = closure_impl_103(this_69, i) else set run_result = closure_impl_105(this_69, i) endif elseif PreloadAction_typeId[this_69] <= 756 then if PreloadAction_typeId[this_69] <= 755 then set run_result = closure_impl_104(this_69, i) else set run_result = closure_impl_101(this_69, i) endif elseif PreloadAction_typeId[this_69] <= 757 then set run_result = closure_impl_107(this_69, i) else set run_result = closure_impl_108(this_69, i) endif return run_result endfunction function preloadAction takes string name, integer i returns real return dispatch_PreloadAction_run(dispatch_HashMap_get(PreloadSystem_preloadActions, StringHash(name)), i) endfunction function Preload_preload takes nothing returns nothing local real check if Preload_initOrder[Preload_preloadStatus] == null then call ClearTextMessages() call print("Preload done in " + real_toString(Preload_progress) + " sec!") call dispatch_Event_callActions(Preload_preloadEnd, 0) call timer_release(GetExpiredTimer()) return endif call dispatch_DebugFile_writeln(Setup_debugFile, Preload_initOrder[Preload_preloadStatus]) call dispatch_DebugFile_save(Setup_debugFile) set check = preloadAction(Preload_initOrder[Preload_preloadStatus], Preload_loopCounter) set Preload_loopCounter = Preload_loopCounter + 1 if check == -2. then call printError("An error while Preloading has ocurred") return elseif check == -1. then set Preload_loopCounter = 0 set Preload_preloadStatus = Preload_preloadStatus + 1 call timer_start(GetExpiredTimer(), 0.05, ref_function_Preload_preload) set Preload_progress = Preload_progress + 0.05 else call timer_start(GetExpiredTimer(), check, ref_function_Preload_preload_2) set Preload_progress = Preload_progress + check endif if Preload_showProgress then call ClearTextMessages() call print("Loading " + Preload_initOrder[Preload_preloadStatus] + ": " + real_toString(100. * (Preload_progress / Preload_maxProgress)) + "%") endif endfunction function distanceBetweenCoords takes real x1, real y1, real x2, real y2 returns real return SquareRoot((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) endfunction function Pull2_theSpell takes integer this_69 returns nothing local real dist local real x local real y local integer tempIndex local integer tempIndex_2 local integer temp set Pull2_i[this_69] = Pull2_i[this_69] - 1 call SetLightningColor(Pull2_l[this_69], Pull2_i[this_69] * 1. / Pull2_imax[this_69], Pull2_i[this_69] * 1. / Pull2_imax[this_69], Pull2_i[this_69] * 1. / Pull2_imax[this_69], 1.) call MoveLightningEx(Pull2_l[this_69], true, unit_getX(Pull2_u[this_69]), unit_getY(Pull2_u[this_69]), 50., unit_getX(Pull2_ut[this_69]), unit_getY(Pull2_ut[this_69]), 50.) set dist = distanceBetweenCoords(unit_getX(Pull2_u[this_69]), unit_getY(Pull2_u[this_69]), unit_getX(Pull2_ut[this_69]), unit_getY(Pull2_ut[this_69])) if Pull2_i[this_69] <= 0 then call timer_release(Pull2_t[this_69]) call DestroyLightning(Pull2_l[this_69]) elseif dist > 100. then set tempIndex = Pull2_uut[this_69] set temp = tempIndex set tempIndex_2 = Pull2_uut[this_69] set Unit_knockSpeed[temp] = vec2_op_mult(Unit_knockSpeed[tempIndex_2], Unit_knockSpeed_2[tempIndex_2], 0.5) set Unit_knockSpeed_2[tempIndex] = vec2_op_mult_return_y set x = 0. set y = 0. if isTerrainWalkable(unit_getX(Pull2_ut[this_69]) + x, unit_getY(Pull2_ut[this_69]) + y) == true then call print(R2S(RAbsBJ(x) + RAbsBJ(y))) call unit_getUserData(Pull2_u[this_69]) call dispatch_Unit_addKnock(Pull2_uut[this_69], x, y) else set Pull2_i[this_69] = 0 endif else set Pull2_i[this_69] = 0 endif endfunction function dispatch_Pull2_theSpell takes integer this_69 returns nothing if Pull2_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Pull2.theSpell") else call error("Called Pull2.theSpell on invalid object.") endif endif call Pull2_theSpell(this_69) endfunction function Pull2_blackHCall takes nothing returns nothing call dispatch_Pull2_theSpell(timer_getData(GetExpiredTimer())) endfunction function Shield_onExpire takes nothing returns nothing call dispatch_Shield_destroyShield(timer_getData(GetExpiredTimer())) endfunction function TextTag_destroyTextTag takes nothing returns nothing call dispatch_TextTag_destroyTextTag(timer_getData(GetExpiredTimer())) endfunction function OnDamageData_onDestroy takes integer this_69 returns nothing endfunction function dealloc_OnDamageData takes integer obj returns nothing if OnDamageData_typeId[obj] == 0 then call error("Double free: object of type OnDamageData") else set OnDamageData_nextFree[OnDamageData_firstFree] = obj set OnDamageData_firstFree = OnDamageData_firstFree + 1 set OnDamageData_typeId[obj] = 0 endif endfunction function destroyOnDamageData takes integer this_69 returns nothing call OnDamageData_onDestroy(this_69) call dealloc_OnDamageData(this_69) endfunction function dispatch_OnDamageData_destroyOnDamageData takes integer this_69 returns nothing if OnDamageData_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling OnDamageData.destroyOnDamageData") else call error("Called OnDamageData.destroyOnDamageData on invalid object.") endif endif call destroyOnDamageData(this_69) endfunction function alloc_OnDamageData takes nothing returns integer local integer this_69 if OnDamageData_firstFree == 0 then set OnDamageData_maxIndex = OnDamageData_maxIndex + 1 set this_69 = OnDamageData_maxIndex else set OnDamageData_firstFree = OnDamageData_firstFree - 1 set this_69 = OnDamageData_nextFree[OnDamageData_firstFree] endif set OnDamageData_typeId[this_69] = 849 return this_69 endfunction function construct_OnDamageData takes integer this_69 returns nothing set OnDamageData_stop[this_69] = false endfunction function new_OnDamageData takes nothing returns integer local integer this_69 = alloc_OnDamageData() call construct_OnDamageData(this_69) return this_69 endfunction function OnDamageEvent_fire takes integer this_69, integer source, real dmg returns real local integer data_2 = new_OnDamageData() local real finalDmg set OnDamageData_source[data_2] = source set OnDamageData_damage[data_2] = dmg call Event_callActions(this_69, data_2) set finalDmg = OnDamageData_damage[data_2] call dispatch_OnDamageData_destroyOnDamageData(data_2) return finalDmg endfunction function dispatch_OnDamageEvent_fire takes integer this_69, integer source, real dmg returns real local real fire_result if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling OnDamageEvent.fire") else call error("Called OnDamageEvent.fire on invalid object.") endif endif set fire_result = OnDamageEvent_fire(this_69, source, dmg) return fire_result endfunction function PreDamageData_onDestroy takes integer this_69 returns nothing endfunction function dealloc_PreDamageData takes integer obj returns nothing if PreDamageData_typeId[obj] == 0 then call error("Double free: object of type PreDamageData") else set PreDamageData_nextFree[PreDamageData_firstFree] = obj set PreDamageData_firstFree = PreDamageData_firstFree + 1 set PreDamageData_typeId[obj] = 0 endif endfunction function destroyPreDamageData takes integer this_69 returns nothing call PreDamageData_onDestroy(this_69) call dealloc_PreDamageData(this_69) endfunction function dispatch_PreDamageData_destroyPreDamageData takes integer this_69 returns nothing if PreDamageData_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling PreDamageData.destroyPreDamageData") else call error("Called PreDamageData.destroyPreDamageData on invalid object.") endif endif call destroyPreDamageData(this_69) endfunction function alloc_PreDamageData takes nothing returns integer local integer this_69 if PreDamageData_firstFree == 0 then set PreDamageData_maxIndex = PreDamageData_maxIndex + 1 set this_69 = PreDamageData_maxIndex else set PreDamageData_firstFree = PreDamageData_firstFree - 1 set this_69 = PreDamageData_nextFree[PreDamageData_firstFree] endif set PreDamageData_typeId[this_69] = 848 return this_69 endfunction function construct_PreDamageData takes integer this_69 returns nothing endfunction function new_PreDamageData takes nothing returns integer local integer this_69 = alloc_PreDamageData() call construct_PreDamageData(this_69) return this_69 endfunction function PreDamageEvent_fire takes integer this_69, integer source returns nothing local integer data_2 = new_PreDamageData() call Event_callActions(this_69, data_2) call dispatch_PreDamageData_destroyPreDamageData(data_2) endfunction function dispatch_PreDamageEvent_fire takes integer this_69, integer source returns nothing if Event_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling PreDamageEvent.fire") else call error("Called PreDamageEvent.fire on invalid object.") endif endif call PreDamageEvent_fire(this_69, source) endfunction function Unit_critTT takes integer this_69, real dmg returns nothing local real tempAmount if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then if Unit_damageTT[this_69] == 0 then call new_TextTag(dmg, this_69, 255, 20, 20, 10., 0) else set tempAmount = TextTag_amount[Unit_damageTT[this_69]] call dispatch_TextTag_destroyTextTag(Unit_damageTT[this_69]) call new_TextTag(dmg + tempAmount, this_69, 255, 20, 20, 10., 0) endif endif endfunction function dispatch_Unit_critTT takes integer this_69, real dmg returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.critTT") else call error("Called Unit.critTT on invalid object.") endif endif call Unit_critTT(this_69, dmg) endfunction function Unit_absoluteTT takes integer this_69, real dmg returns nothing local real tempAmount if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then if Unit_damageTT[this_69] == 0 then call new_TextTag(dmg, this_69, 0, 0, 0, 9., 0) else set tempAmount = TextTag_amount[Unit_damageTT[this_69]] call dispatch_TextTag_destroyTextTag(Unit_damageTT[this_69]) call new_TextTag(dmg + tempAmount, this_69, 0, 0, 0, 9., 0) endif endif endfunction function dispatch_Unit_absoluteTT takes integer this_69, real dmg returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.absoluteTT") else call error("Called Unit.absoluteTT on invalid object.") endif endif call Unit_absoluteTT(this_69, dmg) endfunction function Unit_damageAbs takes integer this_69, integer source, real amount_51 returns nothing if dispatch_Unit_dealDamage(this_69, amount_51, source, true) then call dispatch_Unit_absoluteTT(this_69, amount_51) endif endfunction function dispatch_Unit_damageAbs takes integer this_69, integer source, real amount_51 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.damageAbs") else call error("Called Unit.damageAbs on invalid object.") endif endif call Unit_damageAbs(this_69, source, amount_51) endfunction function Unit_dodgeTT takes integer this_69 returns nothing if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then call new_TextTag(0., this_69, 0, 255, 128, 8., 4) endif endfunction function dispatch_Unit_dodgeTT takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.dodgeTT") else call error("Called Unit.dodgeTT on invalid object.") endif endif call Unit_dodgeTT(this_69) endfunction function Unit_getArmor takes integer this_69, boolean withBonus returns real if withBonus then return (Unit_armor[this_69] + Unit_bonusArmor[this_69]) * (1. + Unit_bonusArmorPer[this_69] / 100.) else return Unit_armor[this_69] endif endfunction function dispatch_Unit_getArmor takes integer this_69, boolean withBonus returns real local real getArmor_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.getArmor") else call error("Called Unit.getArmor on invalid object.") endif endif set getArmor_result = Unit_getArmor(this_69, withBonus) return getArmor_result endfunction function Unit_getAttack takes integer this_69, boolean withBonus returns real if withBonus then return (Unit_attack[this_69] + Unit_bonusAttack[this_69]) * (1. + Unit_bonusAttackPer[this_69] / 100.) else return Unit_attack[this_69] endif endfunction function dispatch_Unit_getAttack takes integer this_69, boolean withBonus returns real local real getAttack_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.getAttack") else call error("Called Unit.getAttack on invalid object.") endif endif set getAttack_result = Unit_getAttack(this_69, withBonus) return getAttack_result endfunction function Unit_getMaxHP takes integer this_69, boolean withBonus returns real if withBonus then return (Unit_life[this_69] + Unit_bonusLife[this_69]) * (1. + Unit_bonusLifePer[this_69] / 100.) else return Unit_life[this_69] endif endfunction function dispatch_Unit_getMaxHP takes integer this_69, boolean withBonus returns real local real getMaxHP_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.getMaxHP") else call error("Called Unit.getMaxHP on invalid object.") endif endif set getMaxHP_result = Unit_getMaxHP(this_69, withBonus) return getMaxHP_result endfunction function Unit_causeHeal takes integer this_69, real amount_51 returns real local real tHP = unit_getHP(Unit_u[this_69]) local real currentAmount = amount_51 if dispatch_Unit_getMaxHP(this_69, true) - tHP < amount_51 then set currentAmount = dispatch_Unit_getMaxHP(this_69, true) - tHP endif call unit_setHP(Unit_u[this_69], tHP + amount_51) return currentAmount endfunction function Hero_causeHeal takes integer this_69, real amount_51 returns real call dispatch_Bar_update(Hero_hb[this_69]) return Unit_causeHeal(this_69, amount_51) endfunction function dispatch_Unit_causeHeal takes integer this_69, real amount_51 returns real local real causeHeal_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.causeHeal") else call error("Called Unit.causeHeal on invalid object.") endif endif if Unit_typeId[this_69] <= 796 then set causeHeal_result = Unit_causeHeal(this_69, amount_51) else set causeHeal_result = Hero_causeHeal(this_69, amount_51) endif return causeHeal_result endfunction function Unit_healSystem takes integer this_69, real takenAmount returns nothing call dispatch_Unit_causeHeal(this_69, takenAmount) endfunction function dispatch_Unit_healSystem takes integer this_69, real takenAmount returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.healSystem") else call error("Called Unit.healSystem on invalid object.") endif endif call Unit_healSystem(this_69, takenAmount) endfunction function Unit_missTT takes integer this_69 returns nothing if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then call new_TextTag(0., this_69, 0, 255, 255, 8., 3) endif endfunction function dispatch_Unit_missTT takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.missTT") else call error("Called Unit.missTT on invalid object.") endif endif call Unit_missTT(this_69) endfunction function Unit_normalTT takes integer this_69, real dmg returns nothing local real tempAmount if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then if Unit_damageTT[this_69] == 0 then call new_TextTag(dmg, this_69, 255, 50, 50, 10., 0) else set tempAmount = TextTag_amount[Unit_damageTT[this_69]] call dispatch_TextTag_destroyTextTag(Unit_damageTT[this_69]) call new_TextTag(dmg + tempAmount, this_69, 255, 50, 50, 9., 0) endif endif endfunction function dispatch_Unit_normalTT takes integer this_69, real dmg returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.normalTT") else call error("Called Unit.normalTT on invalid object.") endif endif call Unit_normalTT(this_69, dmg) endfunction function Unit_damageAtk takes integer this_69, integer source returns nothing local real rand = GetRandomReal(0., 100.) local real ev local real amount_51 local boolean crit local real tempArmor if Unit_takeHitPre[this_69] != 0 then call dispatch_PreDamageEvent_fire(Unit_takeHitPre[this_69], source) endif if Unit_causeHitPre[source] != 0 then call dispatch_PreDamageEvent_fire(Unit_causeHitPre[source], this_69) endif if rand <= Unit_hitchance[source] then set rand = GetRandomReal(0., 100.) set ev = Unit_evade[this_69] if Unit_hitchance[source] > 100. then set ev = ev - (Unit_hitchance[source] - 100.) endif if rand > ev then set amount_51 = dispatch_Unit_getAttack(source, true) + GetRandomReal( - (dispatch_Unit_getAttack(source, true) / 10.), dispatch_Unit_getAttack(source, true) / 10.) set crit = false set rand = GetRandomReal(0., 100.) if rand <= Unit_critchance[source] then set amount_51 = amount_51 * (2. + Unit_critdamage[source] / 100.) set crit = true endif set amount_51 = amount_51 * (1. + Unit_bonusDamage[source]) set tempArmor = dispatch_Unit_getArmor(this_69, true) if tempArmor < 0. then set amount_51 = amount_51 * (1. + (2. - Pow(0.94, - tempArmor))) else set amount_51 = amount_51 * (1. - tempArmor * 0.04 / (1. + 0.04 * tempArmor)) endif set amount_51 = amount_51 * (1. - Unit_normalReduction[this_69] / 100.) if Unit_takeHitOn[this_69] != 0 then set amount_51 = dispatch_OnDamageEvent_fire(Unit_takeHitOn[this_69], source, amount_51) endif if Unit_causeHitOn[source] != 0 then set amount_51 = dispatch_OnDamageEvent_fire(Unit_causeHitOn[source], this_69, amount_51) endif if crit then if Unit_takeCritHitOn[this_69] != 0 then set amount_51 = dispatch_OnDamageEvent_fire(Unit_takeCritHitOn[this_69], source, amount_51) endif if Unit_causeCritHitOn[source] != 0 then set amount_51 = dispatch_OnDamageEvent_fire(Unit_causeCritHitOn[source], this_69, amount_51) endif endif if dispatch_Unit_dealDamage(this_69, amount_51, source, true) then if Unit_isHero[this_69] or Unit_isHero[source] then if crit then call dispatch_Unit_critTT(this_69, amount_51) else call dispatch_Unit_normalTT(this_69, amount_51) endif endif endif if amount_51 > 0. and Unit_lifesteal[this_69] > 0. then call dispatch_Unit_healSystem(source, Unit_lifesteal[this_69] / 100. * amount_51) endif if amount_51 > 0. and Unit_normalDeflection[this_69] > 0. then call dispatch_Unit_damageAbs(source, this_69, amount_51 * (Unit_normalDeflection[this_69] / 100.)) endif else if Unit_isHero[this_69] or Unit_isHero[source] then call dispatch_Unit_dodgeTT(this_69) endif if Unit_onDodge[this_69] != 0 then call dispatch_Unit2Event_fire(Unit_onDodge[this_69], source, this_69) endif endif else if Unit_isHero[this_69] or Unit_isHero[source] then call dispatch_Unit_missTT(source) endif if Unit_onMiss[source] != 0 then call dispatch_Unit2Event_fire(Unit_onMiss[source], source, this_69) endif endif endfunction function dispatch_Unit_damageAtk takes integer this_69, integer source returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.damageAtk") else call error("Called Unit.damageAtk on invalid object.") endif endif call Unit_damageAtk(this_69, source) endfunction function Unit_tookDamage takes nothing returns nothing if GetEventDamage() == 1. then call dispatch_Unit_damageAtk(unit_getUserData(GetTriggerUnit()), unit_getUserData(GetEventDamageSource())) endif 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.0 then call error("vector.setLength error: The length of the vector is 0.0!") 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 checkForPathing takes real pos_x, real pos_y, real vel_x, real vel_y, real radius returns real local real temp_test_x = vec2_setLength(vel_x, vel_y, radius) local real temp_test_y = vec2_setLength_return_y local real test_x = temp_test_x local real test_y = temp_test_y local real temp_test_x_2 local real temp_test_y_2 if IsTerrainPathable(pos_x + test_x, pos_y + test_y, PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x + test_x set checkForPathing_return_y = pos_y + test_y return checkForPathing_return_x endif if IsTerrainPathable(pos_x - test_x, pos_y - test_y, PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x - test_x set checkForPathing_return_y = pos_y - test_y return checkForPathing_return_x endif if IsTerrainPathable(pos_x - test_y, pos_y + test_x, PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x - test_y set checkForPathing_return_y = pos_y + test_x return checkForPathing_return_x endif if IsTerrainPathable(pos_x + test_y, pos_y + test_x, PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x + test_y set checkForPathing_return_y = pos_y + test_x return checkForPathing_return_x endif set temp_test_x_2 = vec2_op_mult(test_x, test_y, Helper_rot45) set temp_test_y_2 = vec2_op_mult_return_y set test_x = temp_test_x_2 set test_y = temp_test_y_2 if IsTerrainPathable(pos_x + (test_x - test_y), pos_y + test_x + test_y, PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x + (test_x - test_y) set checkForPathing_return_y = pos_y + test_x + test_y return checkForPathing_return_x endif if IsTerrainPathable(pos_x - (test_x - test_y), pos_y - (test_x + test_y), PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x - (test_x - test_y) set checkForPathing_return_y = pos_y - (test_x + test_y) return checkForPathing_return_x endif if IsTerrainPathable(pos_x - (test_x + test_y), pos_y + (test_x - test_y), PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x - (test_x + test_y) set checkForPathing_return_y = pos_y + (test_x - test_y) return checkForPathing_return_x endif if IsTerrainPathable(pos_x + test_x + test_y, pos_y - (test_x - test_y), PATHING_TYPE_WALKABILITY) then set checkForPathing_return_x = pos_x + test_x + test_y set checkForPathing_return_y = pos_y - (test_x - test_y) return checkForPathing_return_x endif set checkForPathing_return_x = 0. set checkForPathing_return_y = 0. return checkForPathing_return_x endfunction function real_squared takes real this_69 returns real return this_69 * this_69 endfunction function vec2_distToVec takes real this_x, real this_y, real v_x, real v_y returns real return SquareRoot(real_squared(v_x - this_x) + real_squared(v_y - this_y)) 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_length takes real this_x, real this_y returns real return SquareRoot(this_x * this_x + this_y * this_y) endfunction function vec2_norm takes real this_x, real this_y returns real local real len = vec2_length(this_x, this_y) local real x = 0. local real y = 0. if len != 0.0 then set x = this_x / len set y = this_y / len endif set vec2_norm_return_x = x set vec2_norm_return_y = y return vec2_norm_return_x endfunction function Unit_collision takes integer this_69, integer other returns nothing local real temp = unit_getPos(Unit_u[this_69]) local real temp_2 = unit_getPos_return_y local integer tempIndex = this_69 local real temp_pos_x = vec2_op_plus(temp, temp_2, Unit_knockSpeed[tempIndex], Unit_knockSpeed_2[tempIndex]) local real temp_pos_y = vec2_op_plus_return_y local real pos_x = temp_pos_x local real pos_y = temp_pos_y local real delta_x local real delta_y local real distance local real mtd_x local real mtd_y local real im1 local real im2 local real v_x local real v_y local real vn local real i local real impulse_x local real impulse_y local real temp_delta_x local real temp_delta_y local real temp_mtd_x local real temp_mtd_y local integer tempIndex_2 local integer tempIndex_3 local real temp_v_x local real temp_v_y local real temp_impulse_x local real temp_impulse_y local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 local integer tempIndex_7 local real temp_3 local real temp_4 local integer temp_5 local integer temp_6 if vec2_distToVec(pos_x, pos_y, unit_getPos(Unit_u[other]), unit_getPos_return_y) < Unit_radius[this_69] + Unit_radius[other] then set temp_delta_x = vec2_op_minus(pos_x, pos_y, unit_getPos(Unit_u[other]), unit_getPos_return_y) set temp_delta_y = vec2_op_minus_return_y set delta_x = temp_delta_x set delta_y = temp_delta_y set distance = vec2_length(delta_x, delta_y) set temp_mtd_x = vec2_op_mult(delta_x, delta_y, (Unit_radius[this_69] + Unit_radius[other] - distance) / distance) set temp_mtd_y = vec2_op_mult_return_y set mtd_x = temp_mtd_x set mtd_y = temp_mtd_y set im1 = Unit_mass[this_69] / 1000. set im2 = Unit_mass[other] / 1000. call unit_setXY_2(Unit_u[this_69], vec2_op_plus(unit_getPos(Unit_u[this_69]), unit_getPos_return_y, vec2_op_mult(mtd_x, mtd_y, im1 / (im1 + im2)), vec2_op_mult_return_y), vec2_op_plus_return_y) call unit_setXY_2(Unit_u[other], vec2_op_minus(unit_getPos(Unit_u[other]), unit_getPos_return_y, vec2_op_mult(mtd_x, mtd_y, im2 / (im1 + im2)), vec2_op_mult_return_y), vec2_op_minus_return_y) set tempIndex_2 = this_69 set temp_3 = Unit_knockSpeed[tempIndex_2] set temp_4 = Unit_knockSpeed_2[tempIndex_2] set tempIndex_3 = other set temp_v_x = vec2_op_minus(temp_3, temp_4, Unit_knockSpeed[tempIndex_3], Unit_knockSpeed_2[tempIndex_3]) set temp_v_y = vec2_op_minus_return_y set v_x = temp_v_x set v_y = temp_v_y set vn = vec2_dot(vec2_norm(v_x, v_y), vec2_norm_return_y, vec2_norm(mtd_x, mtd_y), vec2_norm_return_y) if vn > 0. then return endif set i = ( - ((1.0 + 2.) * vn)) / (im1 + im2) set temp_impulse_x = vec2_op_mult(vec2_norm(mtd_x, mtd_y), vec2_norm_return_y, i) set temp_impulse_y = vec2_op_mult_return_y set impulse_x = temp_impulse_x set impulse_y = temp_impulse_y set tempIndex_4 = this_69 set temp_5 = tempIndex_4 set tempIndex_5 = this_69 set Unit_knockSpeed[temp_5] = vec2_op_plus(Unit_knockSpeed[tempIndex_5], Unit_knockSpeed_2[tempIndex_5], vec2_op_mult(impulse_x, impulse_y, im1), vec2_op_mult_return_y) set Unit_knockSpeed_2[tempIndex_4] = vec2_op_plus_return_y set tempIndex_6 = other set temp_6 = tempIndex_6 set tempIndex_7 = other set Unit_knockSpeed[temp_6] = vec2_op_minus(Unit_knockSpeed[tempIndex_7], Unit_knockSpeed_2[tempIndex_7], vec2_op_mult(impulse_x, impulse_y, im2), vec2_op_mult_return_y) set Unit_knockSpeed_2[tempIndex_6] = vec2_op_minus_return_y endif endfunction function dispatch_Unit_collision takes integer this_69, integer other returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.collision") else call error("Called Unit.collision on invalid object.") endif endif call Unit_collision(this_69, other) endfunction function real_op_mult takes real this_69, real v_x, real v_y returns real set real_op_mult_return_x = v_x * this_69 set real_op_mult_return_y = v_y * this_69 return real_op_mult_return_x endfunction function getBounceVec takes real vel_x, real vel_y, real nor_x, real nor_y returns real local real u_x local real u_y local real temp_u_x local real temp_u_y if vec2_dot(vel_x, vel_y, nor_x, nor_y) < 0. then set temp_u_x = real_op_mult(vec2_dot(vel_x, vel_y, nor_x, nor_y), nor_x, nor_y) set temp_u_y = real_op_mult_return_y set u_x = temp_u_x set u_y = temp_u_y set getBounceVec_return_x = vec2_op_minus(vec2_op_minus(vel_x, vel_y, u_x, u_y), vec2_op_minus_return_y, u_x, u_y) set getBounceVec_return_y = vec2_op_minus_return_y return getBounceVec_return_x endif set getBounceVec_return_x = vel_x set getBounceVec_return_y = vel_y return getBounceVec_return_x endfunction function getLastPathablePoint takes real pos1_x, real pos1_y, real pos2_x, real pos2_y returns real local real temp_p1_x = pos1_x local real temp_p1_y = pos1_y local real p1_x = temp_p1_x local real p1_y = temp_p1_y local real temp_p2_x = pos2_x local real temp_p2_y = pos2_y local real p2_x = temp_p2_x local real p2_y = temp_p2_y local integer i = 1 local real h_x local real h_y local real toTest_x local real toTest_y local real temp_h_x local real temp_h_y local real temp_toTest_x local real temp_toTest_y local real temp_p1_x_2 local real temp_p1_y_2 local real temp_p2_x_2 local real temp_p2_y_2 loop exitwhen i > 8 set temp_h_x = vec2_op_minus(p1_x, p1_y, p2_x, p2_y) set temp_h_y = vec2_op_minus_return_y set h_x = temp_h_x set h_y = temp_h_y set temp_toTest_x = vec2_op_plus(p2_x, p2_y, h_x / 2., h_y / 2.) set temp_toTest_y = vec2_op_plus_return_y set toTest_x = temp_toTest_x set toTest_y = temp_toTest_y if not IsTerrainPathable(toTest_x, toTest_y, PATHING_TYPE_WALKABILITY) then set temp_p1_x_2 = toTest_x set temp_p1_y_2 = toTest_y set p1_x = temp_p1_x_2 set p1_y = temp_p1_y_2 else set temp_p2_x_2 = toTest_x set temp_p2_y_2 = toTest_y set p2_x = temp_p2_x_2 set p2_y = temp_p2_y_2 endif set i = i + 1 endloop set getLastPathablePoint_return_x = p1_x set getLastPathablePoint_return_y = p1_y return getLastPathablePoint_return_x endfunction function getPathingNormal takes real pos_x, real pos_y returns real local integer numberOfTests = 15 local real radius = 64. local real temp_addedVecs_x = 0. local real temp_addedVecs_y = 0. local real addedVecs_x = temp_addedVecs_x local real addedVecs_y = temp_addedVecs_y 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 temp_direction_x local real temp_direction_y local real temp_testPoint_x local real temp_testPoint_y local real temp_addedVecs_x_2 local real temp_addedVecs_y_2 loop exitwhen i > temp set temp_direction_x = vec2_polarOffset(0., 0., real_asAngleRadians(i * 2 * bj_PI / numberOfTests), radius) set temp_direction_y = vec2_polarOffset_return_y set direction_x = temp_direction_x set direction_y = temp_direction_y set temp_testPoint_x = vec2_op_plus(pos_x, pos_y, direction_x, direction_y) set temp_testPoint_y = vec2_op_plus_return_y set testPoint_x = temp_testPoint_x set testPoint_y = temp_testPoint_y if IsTerrainPathable(testPoint_x, testPoint_y, PATHING_TYPE_WALKABILITY) then set temp_addedVecs_x_2 = vec2_op_plus(addedVecs_x, addedVecs_y, direction_x, direction_y) set temp_addedVecs_y_2 = vec2_op_plus_return_y set addedVecs_x = temp_addedVecs_x_2 set addedVecs_y = temp_addedVecs_y_2 endif set i = i + 1 endloop if vec2_length(addedVecs_x, addedVecs_y) == 0.0 then call print(vec2_toString(pos_x, pos_y)) endif 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 group_close takes group this_69 returns nothing call DestroyGroup(this_69) endfunction function group_enumUnitsInRange takes group this_69, real pos_x, real pos_y, real range, boolexpr filter returns nothing call GroupEnumUnitsInRange(this_69, pos_x, pos_y, range, filter) endfunction function group_hasNext takes group this_69 returns boolean return FirstOfGroup(this_69) != null endfunction function group_iterator takes group this_69 returns group set bj_groupAddGroupDest = CreateGroup() call ForGroup(this_69, function GroupAddGroupEnum) return bj_groupAddGroupDest endfunction function group_next takes group this_69 returns unit local unit u_2 = FirstOfGroup(this_69) call GroupRemoveUnit(this_69, u_2) set group_nexttempReturn = u_2 set u_2 = null return group_nexttempReturn endfunction function unit_getFacingAngle takes unit this_69 returns real return real_asAngleDegrees(GetUnitFacing(this_69)) endfunction function Unit_knockback takes integer this_69 returns nothing local integer tempIndex = this_69 local real pos_x local real pos_y local group g local group wurst__iterator1 local unit u_2 local integer u2 local real check_x local real check_y local real nor_x local real nor_y local integer tempIndex_2 local real temp_pos_x local real temp_pos_y local integer tempIndex_3 local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 local integer tempIndex_7 local real temp_check_x local real temp_check_y local real temp_nor_x local real temp_nor_y local integer tempIndex_8 local integer tempIndex_9 local integer tempIndex_10 local integer tempIndex_11 local integer tempIndex_12 local integer tempIndex_13 local integer temp local real temp_2 local real temp_3 local group temp_4 local real temp_5 local real temp_6 local real temp_7 local real temp_8 local integer temp_9 local real temp_10 local real temp_11 local unit temp_12 local real temp_13 local real temp_14 local integer temp_15 if vec2_length(Unit_knockSpeed[tempIndex], Unit_knockSpeed_2[tempIndex]) <= 0.1 then call dispatch_LinkedList_remove(UnitClass_knocklist, this_69) set Unit_hasKnockback[this_69] = false set tempIndex_2 = this_69 set Unit_knockSpeed[tempIndex_2] = 0. set Unit_knockSpeed_2[tempIndex_2] = 0. else set temp_pos_x = unit_getPos(Unit_u[this_69]) set temp_pos_y = unit_getPos_return_y set pos_x = temp_pos_x set pos_y = temp_pos_y set g = CreateGroup() set Filter_filterCheckUnit = Unit_u[this_69] set tempIndex_3 = this_69 set temp = tempIndex_3 set tempIndex_4 = this_69 set Unit_knockSpeed[temp] = vec2_op_plus(Unit_knockSpeed[tempIndex_4], Unit_knockSpeed_2[tempIndex_4], vec2_op_mult(angle_toVec(unit_getFacingAngle(Unit_u[this_69]), 1.), angle_toVec_return_y, 1), vec2_op_mult_return_y) set Unit_knockSpeed_2[tempIndex_3] = vec2_op_plus_return_y set temp_4 = g set temp_2 = pos_x set temp_3 = pos_y set tempIndex_5 = this_69 call group_enumUnitsInRange(temp_4, vec2_op_plus(temp_2, temp_3, Unit_knockSpeed[tempIndex_5], Unit_knockSpeed_2[tempIndex_5]), vec2_op_plus_return_y, Unit_radius[this_69] * 2., Condition(ref_function_notUnit)) if FirstOfGroup(g) != null then set wurst__iterator1 = group_iterator(g) loop exitwhen not group_hasNext(wurst__iterator1) set u_2 = group_next(wurst__iterator1) set u2 = unit_getUserData(u_2) call dispatch_Unit_collision(this_69, u2) endloop call group_close(wurst__iterator1) endif set temp_5 = pos_x set temp_6 = pos_y set tempIndex_6 = this_69 set temp_7 = vec2_op_plus(temp_5, temp_6, Unit_knockSpeed[tempIndex_6], Unit_knockSpeed_2[tempIndex_6]) set temp_8 = vec2_op_plus_return_y set tempIndex_7 = this_69 set temp_check_x = checkForPathing(temp_7, temp_8, Unit_knockSpeed[tempIndex_7], Unit_knockSpeed_2[tempIndex_7], Unit_radius[this_69]) set temp_check_y = checkForPathing_return_y set check_x = temp_check_x set check_y = temp_check_y if check_x != 0. or check_y != 0. then set temp_nor_x = getPathingNormal(check_x, check_y) set temp_nor_y = getPathingNormal_return_y set nor_x = temp_nor_x set nor_y = temp_nor_y call unit_setXY_2(Unit_u[this_69], vec2_op_minus(getLastPathablePoint(pos_x, pos_y, check_x, check_y), getLastPathablePoint_return_y, vec2_op_mult(angle_toVec(vec2_angleTo(pos_x, pos_y, check_x, check_y), 1.), angle_toVec_return_y, Unit_radius[this_69]), vec2_op_mult_return_y), vec2_op_minus_return_y) set tempIndex_8 = this_69 set temp_9 = tempIndex_8 set tempIndex_9 = this_69 set Unit_knockSpeed[temp_9] = getBounceVec(Unit_knockSpeed[tempIndex_9], Unit_knockSpeed_2[tempIndex_9], nor_x, nor_y) set Unit_knockSpeed_2[tempIndex_8] = getBounceVec_return_y endif set temp_12 = Unit_u[this_69] set temp_10 = unit_getPos(Unit_u[this_69]) set temp_11 = unit_getPos_return_y set tempIndex_10 = this_69 call unit_setXY_2(temp_12, vec2_op_plus(temp_10, temp_11, Unit_knockSpeed[tempIndex_10], Unit_knockSpeed_2[tempIndex_10]), vec2_op_plus_return_y) set tempIndex_11 = this_69 set temp_15 = tempIndex_11 set tempIndex_12 = this_69 set temp_13 = Unit_knockSpeed[tempIndex_12] set temp_14 = Unit_knockSpeed_2[tempIndex_12] set tempIndex_13 = this_69 set Unit_knockSpeed[temp_15] = vec2_op_minus(temp_13, temp_14, vec2_op_mult(Unit_knockSpeed[tempIndex_13], Unit_knockSpeed_2[tempIndex_13], Unit_mass[this_69] / Unit_knockbackFactor), vec2_op_mult_return_y) set Unit_knockSpeed_2[tempIndex_11] = vec2_op_minus_return_y call DestroyGroup(g) set g = null endif set g = null set wurst__iterator1 = null set u_2 = null set temp_4 = null set temp_12 = null endfunction function dispatch_Unit_knockback takes integer this_69 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.knockback") else call error("Called Unit.knockback on invalid object.") endif endif call Unit_knockback(this_69) endfunction function callKnockback takes nothing returns nothing local integer wurst__iterator0 = dispatch_LinkedList_iterator(UnitClass_knocklist) local integer obj loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator0) set obj = dispatch_LLIterator_next(wurst__iterator0) call dispatch_Unit_knockback(obj) endloop call dispatch_LLIterator_close(wurst__iterator0) endfunction function getHandleCount takes nothing returns integer local integer next = 0 local integer prevIndex = 0 local integer index = 0 local integer a = 0 local location array loc loop exitwhen not (next < HandleCounter_stackEndTreshold) set loc[a] = Location(0., 0.) set index = GetHandleId(loc[a]) - 1048576 set a = a + 1 if index == prevIndex + 1 then set next = next + 1 else set next = 0 endif set prevIndex = index endloop set index = index - a loop exitwhen not (a > 0) set a = a - 1 call RemoveLocation(loc[a]) set loc[a] = null endloop if index > HandleCounter_maxHandleCount then set HandleCounter_maxHandleCount = index endif return index endfunction function getTime takes nothing returns integer return HandleCounter_seconds endfunction function callback takes nothing returns nothing call LeaderboardSetItemValue(HandleCounter_board, 0, getHandleCount()) call LeaderboardSetItemValue(HandleCounter_board, 1, getTime()) endfunction function Unit_manaTT takes integer this_69, real dmg returns nothing local real tempAmount if IsVisibleToPlayer(unit_getX(Unit_u[this_69]), unit_getY(Unit_u[this_69]), GetLocalPlayer()) then if Unit_healTT[this_69] == 0 then call new_TextTag(dmg, this_69, 80, 255, 80, 9., 1) else set tempAmount = TextTag_amount[Unit_healTT[this_69]] call dispatch_TextTag_destroyTextTag(Unit_healTT[this_69]) call new_TextTag(dmg + tempAmount, this_69, 80, 255, 80, 9., 1) endif endif endfunction function dispatch_Unit_manaTT takes integer this_69, real dmg returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.manaTT") else call error("Called Unit.manaTT on invalid object.") endif endif call Unit_manaTT(this_69, dmg) endfunction function camTest takes nothing returns nothing call dispatch_Unit_manaTT(UnitClass_last, 1.) call dispatch_Unit_dodgeTT(UnitClass_last) call dispatch_Unit_goldTT(UnitClass_last, 1., Player(0)) call dispatch_Unit_normalTT(UnitClass_last, 1.) endfunction function Fx_getPos2 takes integer this_69 returns real set Fx_getPos2_return_x = dispatch_Fx_getX(this_69) set Fx_getPos2_return_y = dispatch_Fx_getY(this_69) return Fx_getPos2_return_x endfunction function dispatch_Fx_getPos2 takes integer this_69 returns real local real getPos2_result_x local real getPos2_result_y local real temp_getPos2_result_x local real temp_getPos2_result_y if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.getPos2") else call error("Called Fx.getPos2 on invalid object.") endif endif set temp_getPos2_result_x = Fx_getPos2(this_69) set temp_getPos2_result_y = Fx_getPos2_return_y set getPos2_result_x = temp_getPos2_result_x set getPos2_result_y = temp_getPos2_result_y set dispatch_Fx_getPos2_return_x = getPos2_result_x set dispatch_Fx_getPos2_return_y = getPos2_result_y return dispatch_Fx_getPos2_return_x endfunction function Fx_setXY takes integer this_69, real pos_x, real pos_y returns nothing call unit_setXY_2(Fx_dummy[this_69], pos_x, pos_y) endfunction function dispatch_Fx_setXY takes integer this_69, real pos_x, real pos_y returns nothing if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.setXY") else call error("Called Fx.setXY on invalid object.") endif endif call Fx_setXY(this_69, pos_x, pos_y) endfunction function Missle_onDestroy takes integer this_69 returns nothing call dispatch_Fx_destroyFx(Missle_missle[this_69]) call timer_release(Missle_t[this_69]) call timer_release(Missle_destroyTimer[this_69]) endfunction function dealloc_Missle takes integer obj returns nothing if Missle_typeId[obj] == 0 then call error("Double free: object of type Missle") else set Missle_nextFree[Missle_firstFree] = obj set Missle_firstFree = Missle_firstFree + 1 set Missle_typeId[obj] = 0 endif endfunction function destroyMissle takes integer this_69 returns nothing call Missle_onDestroy(this_69) call dealloc_Missle(this_69) endfunction function dispatch_Missle_destroyMissle takes integer this_69 returns nothing if Missle_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Missle.destroyMissle") else call error("Called Missle.destroyMissle on invalid object.") endif endif call destroyMissle(this_69) endfunction function group_enumUnitsInRange_2 takes group this_69, real pos_x, real pos_y, real range returns nothing call GroupEnumUnitsInRange(this_69, pos_x, pos_y, range, null) endfunction function Missle_move takes integer this_69 returns nothing local integer tempIndex = this_69 local integer temp = tempIndex local integer tempIndex_2 = this_69 local real posmissle_x local real posmissle_y local real speedtemp_x local real speedtemp_y local boolean wasHit local group wurst__iterator0 local group receiver local unit u_2 local unit u_3 local real temp_posmissle_x local real temp_posmissle_y local real temp_speedtemp_x local real temp_speedtemp_y local integer tempIndex_3 local integer tempIndex_4 local integer tempIndex_5 local integer tempIndex_6 local integer temp_2 local real temp_3 local real temp_4 local integer temp_5 local real temp_6 local real temp_7 local group temp_8 set Missle_speed[temp] = vec2_op_mult(Missle_speed[tempIndex_2], Missle_speed_2[tempIndex_2], Missle_speedLost) set Missle_speed_2[tempIndex] = vec2_op_mult_return_y set temp_posmissle_x = dispatch_Fx_getPos2(Missle_missle[this_69]) set temp_posmissle_y = dispatch_Fx_getPos2_return_y set posmissle_x = temp_posmissle_x set posmissle_y = temp_posmissle_y if ( not Missle_canHitCaster[this_69]) and vec2_distToVec(posmissle_x, posmissle_y, unit_getPos(Unit_u[Missle_owner[this_69]]), unit_getPos_return_y) > Missle_missleRadius then set Missle_canHitCaster[this_69] = true endif set temp_speedtemp_x = vec2_polarOffset(0., 0., vec2_angleTo(posmissle_x, posmissle_y, unit_getPos(Unit_u[Missle_target[this_69]]), unit_getPos_return_y), Missle_speedAccel) set temp_speedtemp_y = vec2_polarOffset_return_y set speedtemp_x = temp_speedtemp_x set speedtemp_y = temp_speedtemp_y set tempIndex_3 = this_69 set temp_2 = tempIndex_3 set tempIndex_4 = this_69 set Missle_speed[temp_2] = vec2_op_plus(Missle_speed[tempIndex_4], Missle_speed_2[tempIndex_4], speedtemp_x, speedtemp_y) set Missle_speed_2[tempIndex_3] = vec2_op_plus_return_y set temp_5 = Missle_missle[this_69] set temp_3 = posmissle_x set temp_4 = posmissle_y set tempIndex_5 = this_69 call dispatch_Fx_setXY(temp_5, vec2_op_plus(temp_3, temp_4, Missle_speed[tempIndex_5], Missle_speed_2[tempIndex_5]), vec2_op_plus_return_y) set wasHit = false set temp_8 = TempGroups_ENUM_GROUP set temp_6 = posmissle_x set temp_7 = posmissle_y set tempIndex_6 = this_69 call group_enumUnitsInRange_2(temp_8, vec2_op_plus(temp_6, temp_7, Missle_speed[tempIndex_6], Missle_speed_2[tempIndex_6]), vec2_op_plus_return_y, Missle_missleRadius) if Missle_canHitCaster[this_69] and IsUnitInGroup(Unit_u[Missle_owner[this_69]], TempGroups_ENUM_GROUP) then set receiver = TempGroups_ENUM_GROUP call group_enumUnitsInRange_2(receiver, unit_getPos(Unit_u[Missle_owner[this_69]]), unit_getPos_return_y, Missle_knockbackRange) set wurst__iterator0 = receiver loop exitwhen not group_hasNext(wurst__iterator0) set u_2 = group_next(wurst__iterator0) if u_2 != Unit_u[Missle_owner[this_69]] then call dispatch_Unit_addKnock_2(unit_getUserData(u_2), angle_toVec(vec2_angleTo(unit_getPos(Unit_u[Missle_owner[this_69]]), unit_getPos_return_y, unit_getPos(u_2), unit_getPos_return_y), (1. - vec2_distToVec(unit_getPos(Unit_u[Missle_owner[this_69]]), unit_getPos_return_y, unit_getPos(u_2), unit_getPos_return_y) / Missle_knockbackRange) * Missle_knockback), angle_toVec_return_y) endif endloop call dispatch_Missle_destroyMissle(this_69) set wurst__iterator0 = null set receiver = null set u_2 = null set u_3 = null set temp_8 = null return endif loop exitwhen not group_hasNext(TempGroups_ENUM_GROUP) set u_3 = group_next(TempGroups_ENUM_GROUP) if Unit_u[Missle_owner[this_69]] != u_3 then call dispatch_Unit_addKnock_2(unit_getUserData(u_3), angle_toVec(vec2_angleTo(posmissle_x, posmissle_y, unit_getPos(u_3), unit_getPos_return_y), Missle_knockback), angle_toVec_return_y) set wasHit = true endif endloop if wasHit then call dispatch_Missle_destroyMissle(this_69) endif set wurst__iterator0 = null set receiver = null set u_2 = null set u_3 = null set temp_8 = null endfunction function dispatch_Missle_move takes integer this_69 returns nothing if Missle_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Missle.move") else call error("Called Missle.move on invalid object.") endif endif call Missle_move(this_69) endfunction function closure_impl_110 takes nothing returns nothing call dispatch_Missle_move(timer_getData(GetExpiredTimer())) endfunction function booleanFromIndex takes integer index returns boolean return index > 0 endfunction function Stack_peek takes integer this_69 returns integer return SEntry_elem[Stack_top[this_69]] endfunction function dispatch_Stack_peek takes integer this_69 returns integer local integer peek_result if Stack_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Stack.peek") else call error("Called Stack.peek on invalid object.") endif endif set peek_result = Stack_peek(this_69) return peek_result endfunction function Stack_pop takes integer this_69 returns integer local integer val = Stack_top[this_69] set Stack_top[this_69] = SEntry_prev[Stack_top[this_69]] set Stack_size[this_69] = Stack_size[this_69] - 1 return SEntry_elem[val] endfunction function dispatch_Stack_pop takes integer this_69 returns integer local integer pop_result if Stack_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Stack.pop") else call error("Called Stack.pop on invalid object.") endif endif set pop_result = Stack_pop(this_69) return pop_result endfunction function Icon_hideDirect takes integer this_69, player p_2 returns nothing local destructable d_2 = Icon_structs_get(this_69, player_getId(p_2)) if d_2 != null then call RemoveDestructable(d_2) call Icon_structs_set(this_69, player_getId(p_2), null) endif set d_2 = null endfunction function image_hide takes image this_69, player p_2 returns nothing if GetLocalPlayer() == p_2 then call SetImageRenderAlways(this_69, false) endif endfunction function ImageEx_hideDirect takes integer this_69, player p_2 returns nothing call image_hide(ImageEx_content[this_69], p_2) endfunction function Model_hideDirect takes integer this_69, player p_2 returns nothing local unit temp = Model_u[this_69] local integer tempIndex = this_69 call unit_setVertexColor(temp, color_withAlpha(Model_col[tempIndex], Model_col_2[tempIndex], Model_col_3[tempIndex], 0), color_withAlpha_return_green, color_withAlpha_return_blue, color_withAlpha_return_alpha) set temp = null endfunction function TextBox_hideDirect takes integer this_69, player p_2 returns nothing call dispatch_TextSplat_clear(TextBox_splat[this_69], p_2) endfunction function alloc_Closure_34 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 724 return this_69 endfunction function Tooltip_hideDirect takes integer this_69, player p_2 returns nothing local integer clVar if GetLocalPlayer() == p_2 then call EnablePreSelect(false, false) endif set clVar = alloc_Closure_34() set p[clVar] = p_2 call doAfter(0.15, clVar) endfunction function image_hide_2 takes image this_69 returns nothing call SetImageRenderAlways(this_69, false) endfunction function cyc_cyc_cyc_dispatch_Widget_hideDirect takes integer funcChoice, integer funcChoice_2, integer funcChoice_3, integer this_69, player p_2 returns nothing local integer wurst__iterator3 local image img local integer wurst__iterator4 local integer w_2 if funcChoice == 0 then if funcChoice_2 == 0 then if funcChoice_3 == 0 then if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Widget.hideDirect") else call error("Called Widget.hideDirect on invalid object.") endif endif if Widget_typeId[this_69] <= 876 then if Widget_typeId[this_69] <= 874 then if Widget_typeId[this_69] <= 873 then call cyc_cyc_cyc_dispatch_Widget_hideDirect(0, 1, this_69, 0, p_2) else call Tooltip_hideDirect(this_69, p_2) endif elseif Widget_typeId[this_69] <= 875 then call Model_hideDirect(this_69, p_2) else call Icon_hideDirect(this_69, p_2) endif elseif Widget_typeId[this_69] <= 878 then if Widget_typeId[this_69] <= 877 then call cyc_cyc_cyc_dispatch_Widget_hideDirect(0, 0, 1, this_69, p_2) else call cyc_cyc_cyc_dispatch_Widget_hideDirect(1, this_69, 0, 0, p_2) endif elseif Widget_typeId[this_69] <= 879 then call TextBox_hideDirect(this_69, p_2) else call ImageEx_hideDirect(this_69, p_2) endif elseif funcChoice_3 == 1 then call cyc_cyc_cyc_dispatch_Widget_hideDirect(0, 0, 0, Observable_content[this_69], p_2) endif elseif funcChoice_2 == 1 then if GetLocalPlayer() == p_2 then set wurst__iterator3 = dispatch_ImageList_iterator(Pane_list[funcChoice_3]) loop exitwhen not dispatch_ImageIterator_hasNext(wurst__iterator3) set img = dispatch_ImageIterator_next(wurst__iterator3) call image_hide_2(img) endloop call dispatch_ImageIterator_close(wurst__iterator3) set wurst__iterator4 = dispatch_LinkedList_iterator(Pane_content[funcChoice_3]) loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator4) set w_2 = dispatch_LLIterator_next(wurst__iterator4) call cyc_cyc_cyc_dispatch_Widget_hideDirect(0, 0, 0, w_2, p_2) endloop call dispatch_LLIterator_close(wurst__iterator4) endif endif elseif funcChoice == 1 then call dispatch_TextSplat_clear(Button_splat[funcChoice_2], p_2) call cyc_cyc_cyc_dispatch_Widget_hideDirect(0, 0, 1, funcChoice_2, p_2) endif set img = null endfunction function Window_hideContent takes integer this_69, player p_2 returns nothing local integer wurst__iterator1 = dispatch_LinkedList_iterator(Window_content[this_69]) local integer g loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator1) set g = dispatch_LLIterator_next(wurst__iterator1) call cyc_cyc_cyc_dispatch_Widget_hideDirect(0, 0, 0, g, p_2) endloop call dispatch_LLIterator_close(wurst__iterator1) endfunction function dispatch_Window_hideContent takes integer this_69, player p_2 returns nothing if Window_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Window.hideContent") else call error("Called Window.hideContent on invalid object.") endif endif call Window_hideContent(this_69, p_2) endfunction function WindowManager_closeTopWindow takes player p_2 returns nothing call dispatch_Window_hideContent(dispatch_Stack_pop(WindowManager_currentWindow[GetPlayerId(p_2)]), p_2) loop exitwhen not true if booleanFromIndex(dispatch_HashMap_get(Window_wantToClose[dispatch_Stack_peek(WindowManager_currentWindow[GetPlayerId(p_2)])], playerToIndex(p_2))) then call dispatch_Window_hideContent(dispatch_Stack_pop(WindowManager_currentWindow[GetPlayerId(p_2)]), p_2) else exitwhen true endif endloop endfunction function player_getName takes player this_69 returns string return GetPlayerName(this_69) endfunction function closure_impl_111 takes integer this_69, player p_2 returns nothing call print("Spieler " + player_getName(p_2) + " geht in den Shop") call WindowManager_closeTopWindow(p_2) call WindowManager_openWindow(GameStart_shopWindow, p_2) endfunction function closure_impl_112 takes integer this_69, player p_2 returns nothing call print("Spieler " + player_getName(p_2) + " geht in die Stats") call WindowManager_closeTopWindow(p_2) call WindowManager_openWindow(GameStart_statsWindow, p_2) endfunction function closure_impl_113 takes integer this_69, player p_2 returns nothing call print("Spieler " + player_getName(p_2) + " geht in den Score") call WindowManager_closeTopWindow(p_2) call WindowManager_openWindow(GameStart_scoreWindow, p_2) endfunction function closure_impl_114 takes integer this_69, player p_2 returns nothing call WindowManager_closeTopWindow(p_2) endfunction function closure_impl_115 takes integer this_69, player p_2 returns nothing call print("Spieler " + player_getName(p_2) + " geht in den Guide") call WindowManager_closeTopWindow(p_2) call WindowManager_openWindow(GameStart_guideWindow, p_2) endfunction function closure_impl_116 takes integer this_69, player p_2 returns nothing call WindowManager_closeTopWindow(p_2) endfunction function dispatch_Pane_hideDirect takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Pane.hideDirect") else call error("Called Pane.hideDirect on invalid object.") endif endif call cyc_cyc_cyc_dispatch_Widget_hideDirect(0, 1, this_69, 0, p_2) endfunction function cyc_cyc_dispatch_PlayerAction_run takes integer funcChoice, integer funcChoice_2, integer this_69, player p_2 returns nothing if funcChoice == 0 then if funcChoice_2 == 0 then if PlayerAction_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling PlayerAction.run") else call error("Called PlayerAction.run on invalid object.") endif endif if PlayerAction_typeId[this_69] <= 885 then if PlayerAction_typeId[this_69] <= 883 then if PlayerAction_typeId[this_69] <= 882 then call closure_impl_111(this_69, p_2) else call closure_impl_112(this_69, p_2) endif elseif PlayerAction_typeId[this_69] <= 884 then call closure_impl_115(this_69, p_2) else call closure_impl_114(this_69, p_2) endif elseif PlayerAction_typeId[this_69] <= 887 then if PlayerAction_typeId[this_69] <= 886 then call cyc_cyc_dispatch_PlayerAction_run(0, 1, this_69, p_2) else call cyc_cyc_dispatch_PlayerAction_run(1, this_69, 0, p_2) endif elseif PlayerAction_typeId[this_69] <= 888 then call closure_impl_113(this_69, p_2) else call closure_impl_116(this_69, p_2) endif elseif funcChoice_2 == 1 then call dispatch_Pane_hideDirect(this_66[this_69], p_2) if Pane_onExit[this_66[this_69]] != 0 then call cyc_cyc_dispatch_PlayerAction_run(0, 0, Pane_onExit[this_66[this_69]], p_2) endif endif elseif funcChoice == 1 then call dispatch_Pane_hideDirect(this_67[funcChoice_2], p_2) if Pane_onExit[this_67[funcChoice_2]] != 0 then call cyc_cyc_dispatch_PlayerAction_run(0, 0, Pane_onExit[this_67[funcChoice_2]], p_2) endif endif endfunction function Button_trackAnimation takes integer this_69, player p_2 returns nothing endfunction function Icon_trackAnimation takes integer this_69, player p_2 returns nothing local destructable d_2 if GetLocalPlayer() == p_2 then set d_2 = Icon_structs_get(this_69, player_getId(p_2)) call SetDestructableAnimationSpeed(d_2, Icon_animationSpeedHover) call SetDestructableAnimation(d_2, "morph") endif set d_2 = null endfunction function Widget_trackAnimation takes integer this_69, player p_2 returns nothing endfunction function dispatch_Widget_trackAnimation takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Widget.trackAnimation") else call error("Called Widget.trackAnimation on invalid object.") endif endif if Widget_typeId[this_69] <= 877 then if Widget_typeId[this_69] <= 876 then if Widget_typeId[this_69] <= 875 then call Widget_trackAnimation(this_69, p_2) else call Icon_trackAnimation(this_69, p_2) endif else call Widget_trackAnimation(this_69, p_2) endif elseif Widget_typeId[this_69] <= 878 then call Button_trackAnimation(this_69, p_2) else call Widget_trackAnimation(this_69, p_2) endif endfunction function Observable_onTrack takes integer this_69, player p_2 returns nothing if Observable_track[this_69] != 0 then call cyc_cyc_dispatch_PlayerAction_run(0, 0, Observable_track[this_69], p_2) endif if Observable_playHoverAnimation[this_69] then call dispatch_Widget_trackAnimation(Observable_content[this_69], p_2) endif endfunction function dispatch_Observable_onTrack takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Observable.onTrack") else call error("Called Observable.onTrack on invalid object.") endif endif call Observable_onTrack(this_69, p_2) endfunction function Icon_untrackAnimation takes integer this_69, player p_2 returns nothing local destructable d_2 if GetLocalPlayer() == p_2 then set d_2 = Icon_structs_get(this_69, player_getId(p_2)) call SetDestructableAnimationSpeed(d_2, Icon_animationSpeedHover) call SetDestructableAnimation(d_2, "morph alternate") endif set d_2 = null endfunction function Widget_untrackAnimation takes integer this_69, player p_2 returns nothing endfunction function dispatch_Widget_untrackAnimation takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Widget.untrackAnimation") else call error("Called Widget.untrackAnimation on invalid object.") endif endif if Widget_typeId[this_69] <= 876 then if Widget_typeId[this_69] <= 875 then call Widget_untrackAnimation(this_69, p_2) else call Icon_untrackAnimation(this_69, p_2) endif else call Widget_untrackAnimation(this_69, p_2) endif endfunction function Observable_onUnTrack takes integer this_69, player p_2 returns nothing if Observable_unTrack[this_69] != 0 then call cyc_cyc_dispatch_PlayerAction_run(0, 0, Observable_unTrack[this_69], p_2) endif if Observable_playHoverAnimation[this_69] then call dispatch_Widget_untrackAnimation(Observable_content[this_69], p_2) endif endfunction function dispatch_Observable_onUnTrack takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Observable.onUnTrack") else call error("Called Observable.onUnTrack on invalid object.") endif endif call Observable_onUnTrack(this_69, p_2) endfunction function Window_getObservableAt takes integer this_69, integer tr returns integer return dispatch_HashMap_get(Window_trackMap[this_69], tr) endfunction function dispatch_Window_getObservableAt takes integer this_69, integer tr returns integer local integer getObservableAt_result if Window_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Window.getObservableAt") else call error("Called Window.getObservableAt on invalid object.") endif endif set getObservableAt_result = Window_getObservableAt(this_69, tr) return getObservableAt_result endfunction function WindowManager_trackableTrack takes integer tr, player p_2 returns nothing local integer ob = dispatch_Window_getObservableAt(dispatch_Stack_peek(WindowManager_currentWindow[GetPlayerId(p_2)]), tr) local integer curr = WindowManager_currentObservable[GetPlayerId(p_2)] if ob != curr then if ob != 0 then call dispatch_Observable_onTrack(ob, p_2) endif if curr != 0 then call dispatch_Observable_onUnTrack(curr, p_2) endif set WindowManager_currentObservable[GetPlayerId(p_2)] = ob endif endfunction function closure_impl_117 takes integer this_69, integer track, player p_2 returns nothing call WindowManager_trackableTrack(track, p_2) endfunction function Icon_clickAnimation takes integer this_69, player p_2 returns nothing local destructable d_2 if GetLocalPlayer() == p_2 then set d_2 = Icon_structs_get(this_69, player_getId(p_2)) call SetDestructableAnimationSpeed(d_2, Icon_animationSpeedHit) call SetDestructableAnimation(d_2, "morph alternate") call QueueDestructableAnimation(d_2, "morph") endif set d_2 = null endfunction function Widget_clickAnimation takes integer this_69, player p_2 returns nothing endfunction function dispatch_Widget_clickAnimation takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Widget.clickAnimation") else call error("Called Widget.clickAnimation on invalid object.") endif endif if Widget_typeId[this_69] <= 876 then if Widget_typeId[this_69] <= 875 then call Widget_clickAnimation(this_69, p_2) else call Icon_clickAnimation(this_69, p_2) endif else call Widget_clickAnimation(this_69, p_2) endif endfunction function Observable_onDoubleClick takes integer this_69, player p_2 returns nothing if Observable_dClick[this_69] != 0 then call cyc_cyc_dispatch_PlayerAction_run(0, 0, Observable_dClick[this_69], p_2) endif if ( not Observable_playClickAnimation[this_69]) and Observable_playDoubleClickAnimation[this_69] then call dispatch_Widget_clickAnimation(Observable_content[this_69], p_2) endif endfunction function dispatch_Observable_onDoubleClick takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Observable.onDoubleClick") else call error("Called Observable.onDoubleClick on invalid object.") endif endif call Observable_onDoubleClick(this_69, p_2) endfunction function WindowManager_trackableDoubleHit takes integer tr, player p_2 returns nothing local integer t = dispatch_Window_getObservableAt(dispatch_Stack_peek(WindowManager_currentWindow[GetPlayerId(p_2)]), tr) if t != 0 then call dispatch_Observable_onDoubleClick(t, p_2) endif endfunction function closure_impl_118 takes integer this_69, integer track, player p_2 returns nothing call WindowManager_trackableDoubleHit(track, p_2) endfunction function Observable_onClick takes integer this_69, player p_2 returns nothing if Observable_click[this_69] != 0 then call cyc_cyc_dispatch_PlayerAction_run(0, 0, Observable_click[this_69], p_2) endif if Observable_playClickAnimation[this_69] then call dispatch_Widget_clickAnimation(Observable_content[this_69], p_2) endif endfunction function dispatch_Observable_onClick takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Observable.onClick") else call error("Called Observable.onClick on invalid object.") endif endif call Observable_onClick(this_69, p_2) endfunction function Window_voidClick_2 takes integer this_69, player p_2 returns nothing if Window_voidClick[this_69] != 0 then call cyc_cyc_dispatch_PlayerAction_run(0, 0, Window_voidClick[this_69], p_2) endif endfunction function dispatch_Window_voidClick takes integer this_69, player p_2 returns nothing if Window_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Window.voidClick") else call error("Called Window.voidClick on invalid object.") endif endif call Window_voidClick_2(this_69, p_2) endfunction function WindowManager_trackableHit takes integer tr, player p_2 returns nothing local integer t = dispatch_Window_getObservableAt(dispatch_Stack_peek(WindowManager_currentWindow[GetPlayerId(p_2)]), tr) if t != 0 then call dispatch_Observable_onClick(t, p_2) else call dispatch_Window_voidClick(dispatch_Stack_peek(WindowManager_currentWindow[GetPlayerId(p_2)]), p_2) endif endfunction function closure_impl_119 takes integer this_69, integer track, player p_2 returns nothing call WindowManager_trackableHit(track, p_2) endfunction function dispatch_TrackableAction_run takes integer this_69, integer clickedTrackable, player clickingPlayer returns nothing if TrackableAction_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TrackableAction.run") else call error("Called TrackableAction.run on invalid object.") endif endif if TrackableAction_typeId[this_69] <= 675 then if TrackableAction_typeId[this_69] <= 674 then call closure_impl_118(this_69, clickedTrackable, clickingPlayer) else call closure_impl_119(this_69, clickedTrackable, clickingPlayer) endif else call closure_impl_117(this_69, clickedTrackable, clickingPlayer) endif endfunction function TrackableEx_trackHandler takes integer this_69, player p_2 returns nothing if TrackableEx_onTrack[this_69] != 0 then call dispatch_TrackableAction_run(TrackableEx_onTrack[this_69], this_69, p_2) endif endfunction function dispatch_TrackableEx_trackHandler takes integer this_69, player p_2 returns nothing if TrackableEx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TrackableEx.trackHandler") else call error("Called TrackableEx.trackHandler on invalid object.") endif endif call TrackableEx_trackHandler(this_69, p_2) endfunction function hashtable_loadPlayerHandle takes hashtable this_69, integer parentKey, integer childKey returns player return LoadPlayerHandle(this_69, parentKey, childKey) endfunction function Table_loadPlayer takes integer this_69, integer parentKey returns player return hashtable_loadPlayerHandle(Table_ht, this_69, parentKey) endfunction function dispatch_Table_loadPlayer takes integer this_69, integer parentKey returns player local player loadPlayer_result if Table_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Table.loadPlayer") else call error("Called Table.loadPlayer on invalid object.") endif endif set loadPlayer_result = Table_loadPlayer(this_69, parentKey) set dispatch_Table_loadPlayertempReturn = loadPlayer_result set loadPlayer_result = null return dispatch_Table_loadPlayertempReturn endfunction function playerFromIndex takes integer index returns player call dispatch_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_loadPlayer(TypeCasting_typecastdata, 0) endfunction function closure_impl_120 takes nothing returns nothing call dispatch_TrackableEx_trackHandler(dispatch_HashMap_get(TrackableEx_trackableObjects, trackableToIndex(GetTriggeringTrackable())), playerFromIndex(dispatch_HashMap_get(TrackableEx_trackableOwner, trackableToIndex(GetTriggeringTrackable())))) endfunction function angle_op_minus takes real this_radians, real other_radians returns real return this_radians - other_radians endfunction function angle_op_plus takes real this_radians, real other_radians returns real return this_radians + other_radians endfunction function alloc_Conductor takes nothing returns integer local integer this_69 if Conductor_firstFree == 0 then set Conductor_maxIndex = Conductor_maxIndex + 1 set this_69 = Conductor_maxIndex else set Conductor_firstFree = Conductor_firstFree - 1 set this_69 = Conductor_nextFree[Conductor_firstFree] endif set Conductor_typeId[this_69] = 862 return this_69 endfunction function construct_Conductor takes integer this_69, unit caster, unit source, integer typ, real ang_radians, integer lvl returns nothing local real pos_x local real pos_y local timer receiver local timer receiver_2 local real temp_pos_x local real temp_pos_y local integer tempIndex set Conductor_distance[this_69] = Conductor_range call print("created") set Conductor_owner[this_69] = caster set Conductor_lvl[this_69] = lvl set temp_pos_x = unit_getPos(source) set temp_pos_y = unit_getPos_return_y set pos_x = temp_pos_x set pos_y = temp_pos_y set Conductor_dummy[this_69] = new_Fx(vec2_withZ(vec2_polarOffset(pos_x, pos_y, ang_radians, 50. + Conductor_missleRadius + 10.), vec2_polarOffset_return_y, Conductor_missleHeight), vec2_withZ_return_y, vec2_withZ_return_z, ang_radians, "Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl") set tempIndex = this_69 set Conductor_speed[tempIndex] = vec2_polarOffset(0., 0., ang_radians, Conductor_missleSpeed) set Conductor_speed_2[tempIndex] = vec2_polarOffset_return_y set Conductor_typ[this_69] = typ set receiver = getTimer() call timer_setData(receiver, this_69) set receiver_2 = receiver call timer_startPeriodic(receiver_2, Basics_ANIMATION_PERIOD, ref_function_closure_impl_8) set Conductor_t[this_69] = receiver_2 set receiver = null set receiver_2 = null endfunction function new_Conductor takes unit caster, unit source, integer typ, real ang_radians, integer lvl returns integer local integer this_69 = alloc_Conductor() call construct_Conductor(this_69, caster, source, typ, ang_radians, lvl) return this_69 endfunction function Conductor_createNewMissles takes integer this_69, unit u_2 returns nothing local integer temp = Conductor_typ[this_69] local real alpha_radians local real alpha_radians_2 local real alpha_radians_3 local real alpha_radians_4 local integer i local real alpha_radians_5 local integer i_2 if temp == 1 then call new_Conductor(Conductor_owner[this_69], u_2, 0, vec2_angleTo(dispatch_Fx_getPos2(Conductor_dummy[this_69]), dispatch_Fx_getPos2_return_y, unit_getPos(u_2), unit_getPos_return_y), Conductor_lvl[this_69]) elseif temp == 2 then set alpha_radians = vec2_angleTo(dispatch_Fx_getPos2(Conductor_dummy[this_69]), dispatch_Fx_getPos2_return_y, unit_getPos(u_2), unit_getPos_return_y) call new_Conductor(Conductor_owner[this_69], u_2, 0, angle_op_plus(alpha_radians, real_asAngleDegrees(45.)), Conductor_lvl[this_69]) call new_Conductor(Conductor_owner[this_69], u_2, 0, angle_op_minus(alpha_radians, real_asAngleDegrees(315.)), Conductor_lvl[this_69]) elseif temp == 3 then set alpha_radians_2 = vec2_angleTo(dispatch_Fx_getPos2(Conductor_dummy[this_69]), dispatch_Fx_getPos2_return_y, unit_getPos(u_2), unit_getPos_return_y) call new_Conductor(Conductor_owner[this_69], u_2, 0, alpha_radians_2, Conductor_lvl[this_69]) call new_Conductor(Conductor_owner[this_69], u_2, 0, angle_op_plus(alpha_radians_2, real_asAngleDegrees(45.)), Conductor_lvl[this_69]) call new_Conductor(Conductor_owner[this_69], u_2, 0, angle_op_minus(alpha_radians_2, real_asAngleDegrees(315.)), Conductor_lvl[this_69]) elseif temp == 4 then set alpha_radians_3 = vec2_angleTo(dispatch_Fx_getPos2(Conductor_dummy[this_69]), dispatch_Fx_getPos2_return_y, unit_getPos(u_2), unit_getPos_return_y) call new_Conductor(Conductor_owner[this_69], u_2, 3, alpha_radians_3, Conductor_lvl[this_69]) call new_Conductor(Conductor_owner[this_69], u_2, 3, angle_op_plus(alpha_radians_3, real_asAngleDegrees(45.)), Conductor_lvl[this_69]) call new_Conductor(Conductor_owner[this_69], u_2, 3, angle_op_plus(alpha_radians_3, real_asAngleDegrees(315.)), Conductor_lvl[this_69]) elseif temp == 6 then set alpha_radians_4 = vec2_angleTo(dispatch_Fx_getPos2(Conductor_dummy[this_69]), dispatch_Fx_getPos2_return_y, unit_getPos(u_2), unit_getPos_return_y) set i = 1 loop exitwhen i > 6 call new_Conductor(Conductor_owner[this_69], u_2, 5, angle_op_plus(alpha_radians_4, real_asAngleDegrees(i * 60.)), Conductor_lvl[this_69]) set i = i + 1 endloop elseif temp == 5 then set alpha_radians_5 = vec2_angleTo(dispatch_Fx_getPos2(Conductor_dummy[this_69]), dispatch_Fx_getPos2_return_y, unit_getPos(u_2), unit_getPos_return_y) set i_2 = 1 loop exitwhen i_2 > 6 call new_Conductor(Conductor_owner[this_69], u_2, 0, angle_op_plus(alpha_radians_5, real_asAngleDegrees(i_2 * 60.)), Conductor_lvl[this_69]) set i_2 = i_2 + 1 endloop endif endfunction function dispatch_Conductor_createNewMissles takes integer this_69, unit u_2 returns nothing if Conductor_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Conductor.createNewMissles") else call error("Called Conductor.createNewMissles on invalid object.") endif endif call Conductor_createNewMissles(this_69, u_2) endfunction function Conductor_onDestroy takes integer this_69 returns nothing call dispatch_Fx_destroyFx(Conductor_dummy[this_69]) call timer_release(Conductor_t[this_69]) endfunction function dealloc_Conductor takes integer obj returns nothing if Conductor_typeId[obj] == 0 then call error("Double free: object of type Conductor") else set Conductor_nextFree[Conductor_firstFree] = obj set Conductor_firstFree = Conductor_firstFree + 1 set Conductor_typeId[obj] = 0 endif endfunction function destroyConductor takes integer this_69 returns nothing call Conductor_onDestroy(this_69) call dealloc_Conductor(this_69) endfunction function dispatch_Conductor_destroyConductor takes integer this_69 returns nothing if Conductor_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Conductor.destroyConductor") else call error("Called Conductor.destroyConductor on invalid object.") endif endif call destroyConductor(this_69) endfunction function player_isEnemyOf takes player this_69, player p_2 returns boolean return IsPlayerEnemy(this_69, p_2) endfunction function unit_damageTarget takes unit this_69, unit target, real amount_51 returns nothing call UnitDamageTarget(this_69, target, amount_51, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS) endfunction function unit_getOwner takes unit this_69 returns player return GetOwningPlayer(this_69) endfunction function Conductor_move takes integer this_69 returns nothing local integer temp_3 = Conductor_dummy[this_69] local real temp = dispatch_Fx_getPos2(Conductor_dummy[this_69]) local real temp_2 = dispatch_Fx_getPos2_return_y local integer tempIndex = this_69 local group wurst__iterator0 local unit u_2 call dispatch_Fx_setXY(temp_3, vec2_op_plus(temp, temp_2, Conductor_speed[tempIndex], Conductor_speed_2[tempIndex]), vec2_op_plus_return_y) call group_enumUnitsInRange_2(TempGroups_ENUM_GROUP, dispatch_Fx_getPos2(Conductor_dummy[this_69]), dispatch_Fx_getPos2_return_y, Conductor_missleRadius) set wurst__iterator0 = group_iterator(TempGroups_ENUM_GROUP) loop exitwhen not group_hasNext(wurst__iterator0) set u_2 = group_next(wurst__iterator0) if player_isEnemyOf(unit_getOwner(u_2), unit_getOwner(Conductor_owner[this_69])) then call unit_damageTarget(Conductor_owner[this_69], u_2, Conductor_baseDamage + Conductor_bonusDamage * Pow(Conductor_lvl[this_69] - 1., Conductor_lvlFactor)) call dispatch_Conductor_createNewMissles(this_69, u_2) call dispatch_Conductor_destroyConductor(this_69) call print("hit") call group_close(wurst__iterator0) set wurst__iterator0 = null set u_2 = null return endif endloop call group_close(wurst__iterator0) set Conductor_distance[this_69] = Conductor_distance[this_69] - Conductor_missleSpeed if Conductor_distance[this_69] <= 0. then call print("meep") call dispatch_Conductor_destroyConductor(this_69) endif set wurst__iterator0 = null set u_2 = null endfunction function dispatch_Conductor_move takes integer this_69 returns nothing if Conductor_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Conductor.move") else call error("Called Conductor.move on invalid object.") endif endif call Conductor_move(this_69) endfunction function closure_impl_121 takes nothing returns nothing call dispatch_Conductor_move(timer_getData(GetExpiredTimer())) endfunction function alloc_Closure_35 takes nothing returns integer local integer this_69 if Action_firstFree == 0 then set Action_maxIndex = Action_maxIndex + 1 set this_69 = Action_maxIndex else set Action_firstFree = Action_firstFree - 1 set this_69 = Action_nextFree[Action_firstFree] endif set Action_typeId[this_69] = 689 return this_69 endfunction function Fx_getDummy takes integer this_69 returns unit return Fx_dummy[this_69] endfunction function dispatch_Fx_getDummy takes integer this_69 returns unit local unit getDummy_result if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.getDummy") else call error("Called Fx.getDummy on invalid object.") endif endif set getDummy_result = Fx_getDummy(this_69) set dispatch_Fx_getDummytempReturn = getDummy_result set getDummy_result = null return dispatch_Fx_getDummytempReturn endfunction function Fx_setScale takes integer this_69, real value returns nothing call unit_setScale(Fx_dummy[this_69], value) endfunction function dispatch_Fx_setScale takes integer this_69, real value returns nothing if Fx_typeId[this_69] == 0 then if this_69 == 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_69, value) endfunction function alloc_Unit2Event takes nothing returns integer local integer this_69 if Event_firstFree == 0 then set Event_maxIndex = Event_maxIndex + 1 set this_69 = Event_maxIndex else set Event_firstFree = Event_firstFree - 1 set this_69 = Event_nextFree[Event_firstFree] endif set Event_typeId[this_69] = 683 return this_69 endfunction function construct_Unit2Event takes integer this_69 returns nothing call construct_Event(this_69) endfunction function new_Unit2Event takes nothing returns integer local integer this_69 = alloc_Unit2Event() call construct_Unit2Event(this_69) return this_69 endfunction function Unit_registerDeath takes integer this_69, integer action returns integer if Unit_onDeath[this_69] == 0 then set Unit_onDeath[this_69] = new_Unit2Event() endif return dispatch_Event_addAction(Unit_onDeath[this_69], action) endfunction function dispatch_Unit_registerDeath takes integer this_69, integer action returns integer local integer registerDeath_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.registerDeath") else call error("Called Unit.registerDeath on invalid object.") endif endif set registerDeath_result = Unit_registerDeath(this_69, action) return registerDeath_result endfunction function group_addUnit takes group this_69, unit u_2 returns nothing call GroupAddUnit(this_69, u_2) endfunction function ControlPoint_enter takes integer this_69, integer u_2 returns nothing local integer data_2 local string tempLightning local integer clVar local integer tempIndex local string temp local real temp_2 local real temp_3 local real temp_4 local integer temp_5 local integer temp_6 local integer temp_7 call group_addUnit(ControlPoint_inRange[this_69], Unit_u[u_2]) set data_2 = dispatch_HashMap_get(ControlPoint_captureData, u_2) if Unit_team[u_2] != ControlPoint_owner[this_69] then if ControlPoint_owner[this_69] == 0 then set tempLightning = ControlPoint_teamEverlivingLightning else set tempLightning = ControlPoint_teamWargrinLightning endif set temp_5 = data_2 set temp = tempLightning set temp_2 = dispatch_Unit_getMiddle(u_2) set temp_3 = dispatch_Unit_getMiddle_return_y set temp_4 = dispatch_Unit_getMiddle_return_z set tempIndex = this_69 set CaptureData_l1[temp_5] = createLightning(temp, temp_2, temp_3, temp_4, ControlPoint_pos3[tempIndex], ControlPoint_pos3_2[tempIndex], ControlPoint_pos3_3[tempIndex]) set CaptureData_fx[data_2] = new_Fx(dispatch_Unit_getMiddle(u_2), dispatch_Unit_getMiddle_return_y, dispatch_Unit_getMiddle_return_z, real_asAngleDegrees(0.), "Abilities\\Weapons\\WitchDoctorMissile\\WitchDoctorMissile.mdl") call dispatch_Fx_setScale(CaptureData_fx[data_2], 2.) call unit_setTimeScale(dispatch_Fx_getDummy(CaptureData_fx[data_2]), 2.) if CaptureData_wantCapture[data_2] then call dispatch_ControlPoint_startCapture(this_69, u_2) endif endif set temp_7 = data_2 set temp_6 = u_2 set clVar = alloc_Closure_35() set this_4[clVar] = this_69 set CaptureData_onDeath[temp_7] = dispatch_Unit_registerDeath(temp_6, clVar) endfunction function dispatch_ControlPoint_enter takes integer this_69, integer u_2 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.enter") else call error("Called ControlPoint.enter on invalid object.") endif endif call ControlPoint_enter(this_69, u_2) endfunction function ControlPoint_isInRange takes integer this_69, unit u_2 returns boolean local integer temp = this_69 local integer tempIndex = this_69 local real temp_4 = dispatch_ControlPoint_getRadius(temp, vec2_angleTo(ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex], unit_getPos(u_2), unit_getPos_return_y)) local real temp_2 = unit_getPos(u_2) local real temp_3 = unit_getPos_return_y local integer tempIndex_2 = this_69 return temp_4 >= vec2_distToVec(temp_2, temp_3, ControlPoint_pos2[tempIndex_2], ControlPoint_pos2_2[tempIndex_2]) endfunction function dispatch_ControlPoint_isInRange takes integer this_69, unit u_2 returns boolean local boolean isInRange_result if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.isInRange") else call error("Called ControlPoint.isInRange on invalid object.") endif endif set isInRange_result = ControlPoint_isInRange(this_69, u_2) return isInRange_result endfunction function ControlPoint_inRangeCheck takes integer this_69 returns nothing local group receiver = TempGroups_ENUM_GROUP local group temp = receiver local integer tempIndex = this_69 local group wurst__iterator0 local unit u_2 call group_enumUnitsInRange_2(temp, ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex], ControlPoint_maxDistance) set wurst__iterator0 = group_iterator(receiver) loop exitwhen not group_hasNext(wurst__iterator0) set u_2 = group_next(wurst__iterator0) if unit_getUserData(u_2) != 0 and u_2 != ControlPoint_clickDummy[this_69] and unit_getAbilityLevel(u_2, 1684365668) == 0 and ( not group_contains(ControlPoint_inRange[this_69], u_2)) and dispatch_ControlPoint_isInRange(this_69, u_2) then call dispatch_ControlPoint_enter(this_69, unit_getUserData(u_2)) endif endloop call group_close(wurst__iterator0) set wurst__iterator0 = null set receiver = null set u_2 = null set temp = null endfunction function dispatch_ControlPoint_inRangeCheck takes integer this_69 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.inRangeCheck") else call error("Called ControlPoint.inRangeCheck on invalid object.") endif endif call ControlPoint_inRangeCheck(this_69) endfunction function closure_impl_122 takes nothing returns nothing call dispatch_ControlPoint_inRangeCheck(timer_getData(GetExpiredTimer())) endfunction function closure_impl_123 takes nothing returns nothing local integer wurst__iterator0 = dispatch_LinkedList_iterator(Hero_toMove) local integer h_2 local unit own loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator0) set h_2 = dispatch_LLIterator_next(wurst__iterator0) call unit_setXY_2(Unit_u[h_2], vec2_polarOffset(unit_getPos(Unit_u[h_2]), unit_getPos_return_y, unit_getFacingAngle(Unit_u[h_2]), 0.5), vec2_polarOffset_return_y) endloop call dispatch_LLIterator_close(wurst__iterator0) set own = Unit_u[dispatch_HashMap_get(Hero_heroOfPlayer, playerToIndex(GetLocalPlayer()))] call SetCameraQuickPosition(unit_getX(own), unit_getY(own)) set own = null endfunction function closure_impl_124 takes nothing returns nothing call dispatch_Missle_destroyMissle(timer_getData(GetExpiredTimer())) endfunction function closure_impl_125 takes nothing returns nothing call dispatch_ControlPoint_inRangeCheck(timer_getData(GetExpiredTimer())) endfunction function closure_impl_126 takes nothing returns nothing call dispatch_Conductor_move(timer_getData(GetExpiredTimer())) endfunction function closure_impl_127 takes nothing returns nothing set TrackableEx_playerClickBefore[timer_getData(GetExpiredTimer())] = 0 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 ControlPoint_getBlitzPos takes integer this_69, real pos_x, real pos_y, real pos_z, real progress returns real local integer tempIndex = this_69 local real temp_dif_x = vec3_op_minus(ControlPoint_pos3[tempIndex], ControlPoint_pos3_2[tempIndex], ControlPoint_pos3_3[tempIndex], pos_x, pos_y, pos_z) local real temp_dif_y = vec3_op_minus_return_y local real temp_dif_z = vec3_op_minus_return_z local real dif_x = temp_dif_x local real dif_y = temp_dif_y local real dif_z = temp_dif_z set ControlPoint_getBlitzPos_return_x = vec3_op_plus(pos_x, pos_y, pos_z, vec3_op_mult(dif_x, dif_y, dif_z, progress), vec3_op_mult_return_y, vec3_op_mult_return_z) set ControlPoint_getBlitzPos_return_y = vec3_op_plus_return_y set ControlPoint_getBlitzPos_return_z = vec3_op_plus_return_z return ControlPoint_getBlitzPos_return_x endfunction function dispatch_ControlPoint_getBlitzPos takes integer this_69, real pos_x, real pos_y, real pos_z, real progress returns real local real getBlitzPos_result_x local real getBlitzPos_result_y local real getBlitzPos_result_z local real temp_getBlitzPos_result_x local real temp_getBlitzPos_result_y local real temp_getBlitzPos_result_z if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.getBlitzPos") else call error("Called ControlPoint.getBlitzPos on invalid object.") endif endif set temp_getBlitzPos_result_x = ControlPoint_getBlitzPos(this_69, pos_x, pos_y, pos_z, progress) set temp_getBlitzPos_result_y = ControlPoint_getBlitzPos_return_y set temp_getBlitzPos_result_z = ControlPoint_getBlitzPos_return_z set getBlitzPos_result_x = temp_getBlitzPos_result_x set getBlitzPos_result_y = temp_getBlitzPos_result_y set getBlitzPos_result_z = temp_getBlitzPos_result_z set dispatch_ControlPoint_getBlitzPos_return_x = getBlitzPos_result_x set dispatch_ControlPoint_getBlitzPos_return_y = getBlitzPos_result_y set dispatch_ControlPoint_getBlitzPos_return_z = getBlitzPos_result_z return dispatch_ControlPoint_getBlitzPos_return_x endfunction function Fx_setXYZ takes integer this_69, real pos_x, real pos_y, real pos_z, boolean ignoreTerrainHeight returns nothing call unit_setXY(Fx_dummy[this_69], pos_x, pos_y) if ignoreTerrainHeight then call dispatch_Fx_setZ(this_69, pos_z) else call dispatch_Fx_setZ(this_69, pos_z - getTerrainZ_2(pos_x, pos_y)) endif endfunction function dispatch_Fx_setXYZ takes integer this_69, real pos_x, real pos_y, real pos_z, boolean ignoreTerrainHeight returns nothing if Fx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Fx.setXYZ") else call error("Called Fx.setXYZ on invalid object.") endif endif call Fx_setXYZ(this_69, pos_x, pos_y, pos_z, ignoreTerrainHeight) endfunction function HeroType_getCaptureOffset takes integer this_69 returns real local integer tempIndex = this_69 local real temp_tempTupleSelectionResult_1_1 = HeroType_captureOffset_x[tempIndex] local real temp_tempTupleSelectionResult_1_2 = HeroType_captureOffset_y[tempIndex] local real temp_tempTupleSelectionResult_1_3 = HeroType_captureOffset_z[tempIndex] local real tempTupleSelectionResult_1_1 = temp_tempTupleSelectionResult_1_1 local real tempTupleSelectionResult_1_2 = temp_tempTupleSelectionResult_1_2 local real tempTupleSelectionResult_1_3 = temp_tempTupleSelectionResult_1_3 set HeroType_getCaptureOffset_return_x = tempTupleSelectionResult_1_1 set HeroType_getCaptureOffset_return_y = tempTupleSelectionResult_1_2 set HeroType_getCaptureOffset_return_z = tempTupleSelectionResult_1_3 return HeroType_getCaptureOffset_return_x endfunction function dispatch_HeroType_getCaptureOffset takes integer this_69 returns real local real getCaptureOffset_result_x local real getCaptureOffset_result_y local real getCaptureOffset_result_z local real temp_getCaptureOffset_result_x local real temp_getCaptureOffset_result_y local real temp_getCaptureOffset_result_z if UnitType_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling HeroType.getCaptureOffset") else call error("Called HeroType.getCaptureOffset on invalid object.") endif endif set temp_getCaptureOffset_result_x = HeroType_getCaptureOffset(this_69) set temp_getCaptureOffset_result_y = HeroType_getCaptureOffset_return_y set temp_getCaptureOffset_result_z = HeroType_getCaptureOffset_return_z set getCaptureOffset_result_x = temp_getCaptureOffset_result_x set getCaptureOffset_result_y = temp_getCaptureOffset_result_y set getCaptureOffset_result_z = temp_getCaptureOffset_result_z set dispatch_HeroType_getCaptureOffset_return_x = getCaptureOffset_result_x set dispatch_HeroType_getCaptureOffset_return_y = getCaptureOffset_result_y set dispatch_HeroType_getCaptureOffset_return_z = getCaptureOffset_result_z return dispatch_HeroType_getCaptureOffset_return_x endfunction function real_op_mult_2 takes real this_69, real ang_radians returns real return ang_radians * this_69 endfunction function vec2_rotate takes real this_x, real this_y, real radians returns real local real c = Cos(radians) local real s = Sin(radians) local real px = this_x * c - this_y * s local real py = this_x * s + this_y * c set vec2_rotate_return_x = px set vec2_rotate_return_y = py return vec2_rotate_return_x endfunction function vec2_rotate_2 takes real this_x, real this_y, real ang_radians returns real set vec2_rotate_return_x_2 = vec2_rotate(this_x, this_y, ang_radians) set vec2_rotate_return_y_2 = vec2_rotate_return_y return vec2_rotate_return_x_2 endfunction function Hero_getCaptureAttackPoint takes integer this_69, real cpPos_x, real cpPos_y returns real local real temp_pos_x = dispatch_Unit_getMiddle(this_69) local real temp_pos_y = dispatch_Unit_getMiddle_return_y local real temp_pos_z = dispatch_Unit_getMiddle_return_z local real pos_x = temp_pos_x local real pos_y = temp_pos_y local real pos_z = temp_pos_z local real temp_offset_x = dispatch_HeroType_getCaptureOffset(Hero_htyp[this_69]) local real temp_offset_y = dispatch_HeroType_getCaptureOffset_return_y local real temp_offset_z = dispatch_HeroType_getCaptureOffset_return_z local real offset_x = temp_offset_x local real offset_y = temp_offset_y local real offset_z = temp_offset_z local real temp_offset2_x = vec3_toVec2(offset_x, offset_y, offset_z) local real temp_offset2_y = vec3_toVec2_return_y local real offset2_x = temp_offset2_x local real offset2_y = temp_offset2_y local real temp_offset2_x_2 = vec2_rotate_2(offset2_x, offset2_y, real_op_mult_2(angle_degrees(vec2_angleTo(vec3_toVec2(pos_x, pos_y, pos_z), vec3_toVec2_return_y, cpPos_x, cpPos_y)), real_asAngleDegrees( - 1.))) local real temp_offset2_y_2 = vec2_rotate_return_y_2 set offset2_x = temp_offset2_x_2 set offset2_y = temp_offset2_y_2 set offset2_y = - offset2_y set Hero_getCaptureAttackPoint_return_x = vec3_op_plus(pos_x, pos_y, pos_z, vec2_withZ(offset2_x, offset2_y, offset_z), vec2_withZ_return_y, vec2_withZ_return_z) set Hero_getCaptureAttackPoint_return_y = vec3_op_plus_return_y set Hero_getCaptureAttackPoint_return_z = vec3_op_plus_return_z return Hero_getCaptureAttackPoint_return_x endfunction function dispatch_Hero_getCaptureAttackPoint takes integer this_69, real cpPos_x, real cpPos_y returns real local real getCaptureAttackPoint_result_x local real getCaptureAttackPoint_result_y local real getCaptureAttackPoint_result_z local real temp_getCaptureAttackPoint_result_x local real temp_getCaptureAttackPoint_result_y local real temp_getCaptureAttackPoint_result_z if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.getCaptureAttackPoint") else call error("Called Hero.getCaptureAttackPoint on invalid object.") endif endif set temp_getCaptureAttackPoint_result_x = Hero_getCaptureAttackPoint(this_69, cpPos_x, cpPos_y) set temp_getCaptureAttackPoint_result_y = Hero_getCaptureAttackPoint_return_y set temp_getCaptureAttackPoint_result_z = Hero_getCaptureAttackPoint_return_z set getCaptureAttackPoint_result_x = temp_getCaptureAttackPoint_result_x set getCaptureAttackPoint_result_y = temp_getCaptureAttackPoint_result_y set getCaptureAttackPoint_result_z = temp_getCaptureAttackPoint_result_z set dispatch_Hero_getCaptureAttackPoint_return_x = getCaptureAttackPoint_result_x set dispatch_Hero_getCaptureAttackPoint_return_y = getCaptureAttackPoint_result_y set dispatch_Hero_getCaptureAttackPoint_return_z = getCaptureAttackPoint_result_z return dispatch_Hero_getCaptureAttackPoint_return_x endfunction function lightning_setPos takes lightning this_69, real pos1_x, real pos1_y, real pos1_z, real pos2_x, real pos2_y, real pos2_z returns nothing call MoveLightningEx(this_69, true, pos1_x, pos1_y, pos1_z + getTerrainZ_2(pos1_x, pos1_y), pos2_x, pos2_y, pos2_z + getTerrainZ_2(pos2_x, pos2_y)) endfunction function ControlPoint_captures takes integer this_69, integer h_2, integer data_2 returns nothing local real pos_x local real pos_y local real pos_z local real pos_x_2 local real pos_y_2 local real pos_z_2 local integer tempIndex local real temp_pos_x local real temp_pos_y local real temp_pos_z local integer tempIndex_2 local real temp_pos_x_2 local real temp_pos_y_2 local real temp_pos_z_2 local integer tempIndex_3 local integer temp local lightning temp_2 local real temp_3 local real temp_4 local real temp_5 local lightning temp_6 local real temp_7 local real temp_8 local real temp_9 if CaptureData_wantCapture[data_2] then set temp = h_2 set tempIndex = this_69 set temp_pos_x = dispatch_Hero_getCaptureAttackPoint(temp, ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex]) set temp_pos_y = dispatch_Hero_getCaptureAttackPoint_return_y set temp_pos_z = dispatch_Hero_getCaptureAttackPoint_return_z set pos_x = temp_pos_x set pos_y = temp_pos_y set pos_z = temp_pos_z if CaptureData_blitzPos[data_2] < 1. then set CaptureData_blitzPos[data_2] = CaptureData_blitzPos[data_2] + ControlPoint_captureSpeed call dispatch_Fx_setXYZ(CaptureData_fx[data_2], dispatch_ControlPoint_getBlitzPos(this_69, pos_x, pos_y, pos_z, CaptureData_blitzPos[data_2]), dispatch_ControlPoint_getBlitzPos_return_y, dispatch_ControlPoint_getBlitzPos_return_z, true) else set ControlPoint_hp[this_69] = ControlPoint_hp[this_69] - ControlPoint_captureDamage endif set temp_2 = CaptureData_l1[data_2] set temp_3 = dispatch_Fx_getPos3d(CaptureData_fx[data_2]) set temp_4 = dispatch_Fx_getPos3d_return_y set temp_5 = dispatch_Fx_getPos3d_return_z set tempIndex_2 = this_69 call lightning_setPos(temp_2, temp_3, temp_4, temp_5, ControlPoint_pos3[tempIndex_2], ControlPoint_pos3_2[tempIndex_2], ControlPoint_pos3_3[tempIndex_2]) call lightning_setPos(CaptureData_l2[data_2], pos_x, pos_y, pos_z, dispatch_Fx_getPos3d(CaptureData_fx[data_2]), dispatch_Fx_getPos3d_return_y, dispatch_Fx_getPos3d_return_z) else set temp_pos_x_2 = dispatch_Unit_getMiddle(h_2) set temp_pos_y_2 = dispatch_Unit_getMiddle_return_y set temp_pos_z_2 = dispatch_Unit_getMiddle_return_z set pos_x_2 = temp_pos_x_2 set pos_y_2 = temp_pos_y_2 set pos_z_2 = temp_pos_z_2 if CaptureData_blitzPos[data_2] > 0. then set CaptureData_blitzPos[data_2] = CaptureData_blitzPos[data_2] - ControlPoint_captureSpeed call dispatch_Fx_setXYZ(CaptureData_fx[data_2], dispatch_ControlPoint_getBlitzPos(this_69, pos_x_2, pos_y_2, pos_z_2, CaptureData_blitzPos[data_2]), dispatch_ControlPoint_getBlitzPos_return_y, dispatch_ControlPoint_getBlitzPos_return_z, true) set temp_6 = CaptureData_l1[data_2] set temp_7 = dispatch_Fx_getPos3d(CaptureData_fx[data_2]) set temp_8 = dispatch_Fx_getPos3d_return_y set temp_9 = dispatch_Fx_getPos3d_return_z set tempIndex_3 = this_69 call lightning_setPos(temp_6, temp_7, temp_8, temp_9, ControlPoint_pos3[tempIndex_3], ControlPoint_pos3_2[tempIndex_3], ControlPoint_pos3_3[tempIndex_3]) call lightning_setPos(CaptureData_l2[data_2], pos_x_2, pos_y_2, pos_z_2, dispatch_Fx_getPos3d(CaptureData_fx[data_2]), dispatch_Fx_getPos3d_return_y, dispatch_Fx_getPos3d_return_z) else call lightning_destr(CaptureData_l2[data_2]) set CaptureData_l2[data_2] = null call dispatch_Fx_setXYZ(CaptureData_fx[data_2], pos_x_2, pos_y_2, pos_z_2, true) endif endif set temp_2 = null set temp_6 = null endfunction function dispatch_ControlPoint_captures takes integer this_69, integer h_2, integer data_2 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.captures") else call error("Called ControlPoint.captures on invalid object.") endif endif call ControlPoint_captures(this_69, h_2, data_2) endfunction function alloc_Closure_36 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 736 return this_69 endfunction function alloc_Closure_37 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 735 return this_69 endfunction function ControlPoint_changeOwner takes integer this_69 returns nothing local real z_4 local unit u_2 local integer ug local integer newCrystalId_4 local string lightningId_2 local string effectPath_2 local string mainEffectPath local integer newDecoId_3 local integer tempOutsideCrystals_2 local integer tempGlowMarkers_3 local integer mainCrystalFx_2 local integer clVar local integer clVar_2 local integer tempIndex local integer tempIndex_2 call print("ownerchange") set tempIndex = this_69 set z_4 = getTerrainZ(ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex]) loop exitwhen not group_hasNext(ControlPoint_inRange[this_69]) set u_2 = group_next(ControlPoint_inRange[this_69]) set ug = unit_getUserData(u_2) call dispatch_ControlPoint_leave(this_69, ug) set CaptureData_wantCapture[dispatch_HashMap_get(ControlPoint_captureData, ug)] = false endloop if ControlPoint_owner[this_69] == 0 then set ControlPoint_owner[this_69] = 1 else set ControlPoint_owner[this_69] = 0 endif call timer_release(ControlPoint_inRangeTimer[this_69]) call timer_release(ControlPoint_rangeCheckTimer[this_69]) set tempOutsideCrystals_2 = ControlPoint_outsideCrystals[this_69] set ControlPoint_outsideCrystals[this_69] = new_LinkedList() set tempGlowMarkers_3 = ControlPoint_glowMarkers[this_69] set ControlPoint_glowMarkers[this_69] = new_LinkedList() if ControlPoint_owner[this_69] == 0 then set newCrystalId_4 = ControlPoint_decoCystalRedId set lightningId_2 = ControlPoint_teamEverlivingLightning set newDecoId_3 = ControlPoint_decoLightRedId set effectPath_2 = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl" set mainEffectPath = "CaptureEffect_Coil_Red.mdl" else set newCrystalId_4 = ControlPoint_decoCystalGreenId set lightningId_2 = ControlPoint_teamWargrinLightning set newDecoId_3 = ControlPoint_decoLightGreenId set effectPath_2 = "CaptureEffect_Green.mdl" set mainEffectPath = "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl" endif set tempIndex_2 = this_69 set mainCrystalFx_2 = new_Fx(vec2_withZ(ControlPoint_pos2[tempIndex_2], ControlPoint_pos2_2[tempIndex_2], ControlPoint_height - 135.), vec2_withZ_return_y, vec2_withZ_return_z, real_asAngleDegrees(0.), mainEffectPath) call dispatch_Fx_setScale(mainCrystalFx_2, 3.2) set clVar = alloc_Closure_36() set mainCrystalFx[clVar] = mainCrystalFx_2 set tempOutsideCrystals[clVar] = tempOutsideCrystals_2 set lightningId[clVar] = lightningId_2 set this_8[clVar] = this_69 set effectPath[clVar] = effectPath_2 set newCrystalId_2[clVar] = newCrystalId_4 set z_2[clVar] = z_4 set tempGlowMarkers_2[clVar] = tempGlowMarkers_3 set newDecoId_2[clVar] = newDecoId_3 call doAfter(1., clVar) set clVar_2 = alloc_Closure_37() set this_9[clVar_2] = this_69 set newCrystalId_3[clVar_2] = newCrystalId_4 set z_3[clVar_2] = z_4 call doAfter(0.5, clVar_2) set u_2 = null endfunction function dispatch_ControlPoint_changeOwner takes integer this_69 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.changeOwner") else call error("Called ControlPoint.changeOwner on invalid object.") endif endif call ControlPoint_changeOwner(this_69) endfunction function CrigBar_setPercentage takes integer this_69, real per returns nothing local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local integer tempIndex_4 local real temp local real temp_2 local string temp_3 local integer temp_4 local image temp_5 local integer temp_6 set CrigBar_percent[this_69] = per call image_remove(CrigBar_bar[this_69]) set temp_4 = this_69 set temp_3 = CrigBar_barPath[this_69] set tempIndex = this_69 set temp = CrigBar_pos[tempIndex] set temp_2 = CrigBar_pos_2[tempIndex] set tempIndex_2 = this_69 set CrigBar_bar[temp_4] = createImage(temp_3, vec2_op_plus(temp, temp_2, vec3_toVec2(CrigBar_basicBarOffset[tempIndex_2], CrigBar_basicBarOffset_2[tempIndex_2], CrigBar_basicBarOffset_3[tempIndex_2]), vec3_toVec2_return_y), vec2_op_plus_return_y, CrigBar_percent[this_69] * CrigBar_width[this_69] * CrigBar_barScaleFactor[this_69], CrigBar_height[this_69] * CrigBar_barScaleFactor[this_69]) call image_setLevel(CrigBar_bar[this_69], 0) set temp_5 = CrigBar_bar[this_69] set tempIndex_3 = this_69 call image_setColor(temp_5, CrigBar_barColor[tempIndex_3], CrigBar_barColor_2[tempIndex_3], CrigBar_barColor_3[tempIndex_3]) call image_show(CrigBar_bar[this_69]) set temp_6 = this_69 set tempIndex_4 = this_69 call dispatch_CrigBar_setOffset(temp_6, CrigBar_offset[tempIndex_4], CrigBar_offset_2[tempIndex_4], CrigBar_offset_3[tempIndex_4]) call image_setLevel(CrigBar_border[this_69], 0) set temp_5 = null endfunction function dispatch_CrigBar_setPercentage takes integer this_69, real per returns nothing if CrigBar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling CrigBar.setPercentage") else call error("Called CrigBar.setPercentage on invalid object.") endif endif call CrigBar_setPercentage(this_69, per) endfunction function Unit_damageSystem takes integer this_69, real amount_51 returns nothing call dispatch_Unit_dealDamage(this_69, amount_51, Unit_lastHeroDamager[this_69], false) endfunction function dispatch_Unit_damageSystem takes integer this_69, real amount_51 returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.damageSystem") else call error("Called Unit.damageSystem on invalid object.") endif endif call Unit_damageSystem(this_69, amount_51) endfunction function ControlPoint_inRangeActions takes integer this_69 returns nothing local group wurst__iterator1 local unit temp local integer u_2 local integer data_2 local integer tempIndex local integer tempIndex_2 local integer tempIndex_3 local real temp_2 local real temp_3 local real temp_4 local real temp_5 local integer temp_6 local real temp_7 local lightning temp_8 local real temp_9 local real temp_10 local real temp_11 set ControlPoint_hp[this_69] = ControlPoint_hp[this_69] + ControlPoint_regenerationSpeed if ControlPoint_hp[this_69] > 1. then set ControlPoint_hp[this_69] = 1. endif if ControlPoint_hp[this_69] <= 0. then call dispatch_ControlPoint_changeOwner(this_69) endif call dispatch_CrigBar_setPercentage(ControlPoint_bar[this_69], 1. - ControlPoint_hp[this_69]) set wurst__iterator1 = group_iterator(ControlPoint_inRange[this_69]) loop exitwhen not group_hasNext(wurst__iterator1) set temp = group_next(wurst__iterator1) set u_2 = unit_getUserData(temp) set temp_2 = unit_getPos(temp) set temp_3 = unit_getPos_return_y set tempIndex = this_69 set temp_7 = vec2_distToVec(temp_2, temp_3, ControlPoint_pos2[tempIndex], ControlPoint_pos2_2[tempIndex]) set temp_6 = this_69 set temp_4 = unit_getPos(temp) set temp_5 = unit_getPos_return_y set tempIndex_2 = this_69 if temp_7 < dispatch_ControlPoint_getRadius(temp_6, vec2_angleTo(temp_4, temp_5, ControlPoint_pos2[tempIndex_2], ControlPoint_pos2_2[tempIndex_2])) then set data_2 = dispatch_HashMap_get(ControlPoint_captureData, u_2) if ControlPoint_owner[this_69] == Unit_team[u_2] then call dispatch_Unit_healSystem(u_2, 1.) elseif CaptureData_l2[data_2] == null then set temp_8 = CaptureData_l1[data_2] set temp_9 = dispatch_Unit_getMiddle(u_2) set temp_10 = dispatch_Unit_getMiddle_return_y set temp_11 = dispatch_Unit_getMiddle_return_z set tempIndex_3 = this_69 call lightning_setPos(temp_8, temp_9, temp_10, temp_11, ControlPoint_pos3[tempIndex_3], ControlPoint_pos3_2[tempIndex_3], ControlPoint_pos3_3[tempIndex_3]) call dispatch_Fx_setXY(CaptureData_fx[data_2], unit_getPos(temp), unit_getPos_return_y) call dispatch_Unit_damageSystem(u_2, 1.) else call dispatch_ControlPoint_captures(this_69, u_2, data_2) endif else call dispatch_ControlPoint_leave(this_69, u_2) endif endloop call group_close(wurst__iterator1) set wurst__iterator1 = null set temp = null set temp_8 = null endfunction function dispatch_ControlPoint_inRangeActions takes integer this_69 returns nothing if ControlPoint_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ControlPoint.inRangeActions") else call error("Called ControlPoint.inRangeActions on invalid object.") endif endif call ControlPoint_inRangeActions(this_69) endfunction function closure_impl_128 takes nothing returns nothing call dispatch_ControlPoint_inRangeActions(timer_getData(GetExpiredTimer())) endfunction function TrackableEx_clickHandler takes integer this_69, player p_2 returns nothing if TrackableEx_onDoubleClick[this_69] != 0 then if TrackableEx_playerClickBefore[player_getId(p_2)] == this_69 then call dispatch_TrackableAction_run(TrackableEx_onDoubleClick[this_69], this_69, p_2) set TrackableEx_playerClickBefore[player_getId(p_2)] = 0 call timer_pause(TrackableEx_playerDoubleClickTimer[player_getId(p_2)]) else call timer_start(TrackableEx_playerDoubleClickTimer[player_getId(p_2)], TrackableEx_doubleClickSpeed, ref_function_closure_impl) set TrackableEx_playerClickBefore[player_getId(p_2)] = this_69 call dispatch_TrackableAction_run(TrackableEx_onClick[this_69], this_69, p_2) endif elseif TrackableEx_onClick[this_69] != 0 then call dispatch_TrackableAction_run(TrackableEx_onClick[this_69], this_69, p_2) endif endfunction function dispatch_TrackableEx_clickHandler takes integer this_69, player p_2 returns nothing if TrackableEx_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling TrackableEx.clickHandler") else call error("Called TrackableEx.clickHandler on invalid object.") endif endif call TrackableEx_clickHandler(this_69, p_2) endfunction function closure_impl_129 takes nothing returns nothing call dispatch_TrackableEx_clickHandler(dispatch_HashMap_get(TrackableEx_trackableObjects, trackableToIndex(GetTriggeringTrackable())), playerFromIndex(dispatch_HashMap_get(TrackableEx_trackableOwner, trackableToIndex(GetTriggeringTrackable())))) endfunction function closure_impl_130 takes nothing returns nothing call dispatch_ControlPoint_inRangeActions(timer_getData(GetExpiredTimer())) endfunction function closure_impl_131 takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + Basics_ANIMATION_PERIOD endfunction function multiboard_display takes multiboard this_69, boolean show returns nothing call MultiboardDisplay(this_69, show) endfunction function multiboard_setColumnCount takes multiboard this_69, integer count returns nothing call MultiboardSetColumnCount(this_69, count) endfunction function multiboard_setItemsStyle takes multiboard this_69, boolean showValues, boolean showIcons returns nothing call MultiboardSetItemsStyle(this_69, showValues, showIcons) endfunction function multiboard_setItemsWidth takes multiboard this_69, real width returns nothing call MultiboardSetItemsWidth(this_69, width) endfunction function multiboard_setRowCount takes multiboard this_69, integer count returns nothing call MultiboardSetRowCount(this_69, count) endfunction function multiboard_setTitle takes multiboard this_69, string label returns nothing call MultiboardSetTitleText(this_69, label) endfunction function createMultiboard 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) set mbi = null endfunction function StringIteratorC_onDestroy takes integer this_69 returns nothing endfunction function dealloc_StringIteratorC takes integer obj returns nothing if StringIteratorC_typeId[obj] == 0 then call error("Double free: object of type StringIteratorC") else set StringIteratorC_nextFree[StringIteratorC_firstFree] = obj set StringIteratorC_firstFree = StringIteratorC_firstFree + 1 set StringIteratorC_typeId[obj] = 0 endif endfunction function destroyStringIteratorC takes integer this_69 returns nothing call StringIteratorC_onDestroy(this_69) call dealloc_StringIteratorC(this_69) endfunction function dispatch_StringIteratorC_destroyStringIteratorC takes integer this_69 returns nothing if StringIteratorC_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling StringIteratorC.destroyStringIteratorC") else call error("Called StringIteratorC.destroyStringIteratorC on invalid object.") endif endif call destroyStringIteratorC(this_69) endfunction function everlivingSpawnCallback takes nothing returns nothing local integer iter = timer_getData(GetExpiredTimer()) local string s if dispatch_StringIteratorC_hasNext(iter) then set s = dispatch_StringIteratorC_next(iter) call new_Unit(s, CreepSpawn_everlivingTopStart_x, CreepSpawn_everlivingTopStart_y, CreepSpawn_wargrinOwner) call new_Unit(s, CreepSpawn_everlivingTopStart_x, CreepSpawn_everlivingTopStart_y, CreepSpawn_wargrinOwner) else call dispatch_StringIteratorC_destroyStringIteratorC(iter) call timer_release(GetExpiredTimer()) endif endfunction function group_destr takes group this_69 returns nothing call DestroyGroup(this_69) endfunction function finishPreload takes nothing returns nothing local group wurst__iterator0 local unit u_2 call RemoveUnit(PreloadHandler_dum) set wurst__iterator0 = group_iterator(PreloadHandler_dumg) loop exitwhen not group_hasNext(wurst__iterator0) set u_2 = group_next(wurst__iterator0) call unit_remove(u_2) endloop call group_close(wurst__iterator0) call group_destr(PreloadHandler_dumg) if GetExpiredTimer() != null then call DestroyTimer(GetExpiredTimer()) endif set wurst__iterator0 = null set u_2 = null endfunction function dispatch_OnCast_run takes integer this_69, unit caster, integer lvl returns nothing endfunction function construct_Conductor2 takes integer this_69, unit caster, real target_x, real target_y, integer lvl returns nothing local real pos_x local real pos_y local real ang_radians local timer receiver local timer receiver_2 local real temp_pos_x local real temp_pos_y local integer tempIndex set Conductor_distance[this_69] = Conductor_range call print("created") set Conductor_owner[this_69] = caster set Conductor_lvl[this_69] = lvl set temp_pos_x = unit_getPos(caster) set temp_pos_y = unit_getPos_return_y set pos_x = temp_pos_x set pos_y = temp_pos_y set ang_radians = vec2_angleTo(pos_x, pos_y, target_x, target_y) set Conductor_dummy[this_69] = new_Fx(vec2_withZ(pos_x, pos_y, Conductor_missleHeight), vec2_withZ_return_y, vec2_withZ_return_z, ang_radians, "Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl") set tempIndex = this_69 set Conductor_speed[tempIndex] = vec2_polarOffset(0., 0., ang_radians, Conductor_missleSpeed) set Conductor_speed_2[tempIndex] = vec2_polarOffset_return_y if lvl < 3 then set Conductor_typ[this_69] = 1 elseif lvl < 6 then set Conductor_typ[this_69] = 2 elseif lvl < 9 then set Conductor_typ[this_69] = 3 elseif lvl < 10 then set Conductor_typ[this_69] = 4 else set Conductor_typ[this_69] = 6 endif set receiver = getTimer() call timer_setData(receiver, this_69) set receiver_2 = receiver call timer_startPeriodic(receiver_2, Basics_ANIMATION_PERIOD, ref_function_closure_impl_9) set Conductor_t[this_69] = receiver_2 set receiver = null set receiver_2 = null endfunction function new_Conductor_2 takes unit caster, real target_x, real target_y, integer lvl returns integer local integer this_69 = alloc_Conductor() call construct_Conductor2(this_69, caster, target_x, target_y, lvl) return this_69 endfunction function closure_impl_132 takes integer this_69, unit u_2, integer lvl, real pos_x, real pos_y returns integer return new_Conductor_2(u_2, pos_x, pos_y, lvl) endfunction function dispatch_OnPointCast_run takes integer this_69, unit caster, integer lvl, real pos_x, real pos_y returns nothing if Cast_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling OnPointCast.run") else call error("Called OnPointCast.run on invalid object.") endif endif call closure_impl_132(this_69, caster, lvl, pos_x, pos_y) endfunction function alloc_Missle takes nothing returns integer local integer this_69 if Missle_firstFree == 0 then set Missle_maxIndex = Missle_maxIndex + 1 set this_69 = Missle_maxIndex else set Missle_firstFree = Missle_firstFree - 1 set this_69 = Missle_nextFree[Missle_firstFree] endif set Missle_typeId[this_69] = 860 return this_69 endfunction function construct_Missle takes integer this_69, integer owner, integer target returns nothing local real pos_x local real pos_y local real posT_x local real posT_y local timer receiver local timer receiver_2 local timer receiver_3 local timer receiver_4 local real temp_pos_x local real temp_pos_y local real temp_posT_x local real temp_posT_y local integer tempIndex set Missle_canHitCaster[this_69] = false set Missle_owner[this_69] = owner set Missle_target[this_69] = target set temp_pos_x = unit_getPos(Unit_u[owner]) set temp_pos_y = unit_getPos_return_y set pos_x = temp_pos_x set pos_y = temp_pos_y set temp_posT_x = unit_getPos(Unit_u[target]) set temp_posT_y = unit_getPos_return_y set posT_x = temp_posT_x set posT_y = temp_posT_y set tempIndex = this_69 set Missle_speed[tempIndex] = vec2_polarOffset(0., 0., vec2_angleTo(pos_x, pos_y, posT_x, posT_y), Missle_missleStartSpeed) set Missle_speed_2[tempIndex] = vec2_polarOffset_return_y set Missle_missle[this_69] = new_Fx(vec2_withZ(pos_x, pos_y, 70.), vec2_withZ_return_y, vec2_withZ_return_z, vec2_angleTo(pos_x, pos_y, posT_x, posT_y), "Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl") set receiver = getTimer() call timer_setData(receiver, this_69) set receiver_2 = receiver call timer_startPeriodic(receiver_2, 0.03, ref_function_closure_impl_6) set Missle_t[this_69] = receiver_2 set receiver_3 = getTimer() call timer_setData(receiver_3, this_69) set receiver_4 = receiver_3 call timer_start(receiver_4, 10., ref_function_closure_impl_7) set Missle_destroyTimer[this_69] = receiver_4 set receiver = null set receiver_2 = null set receiver_3 = null set receiver_4 = null endfunction function new_Missle takes integer owner, integer target returns integer local integer this_69 = alloc_Missle() call construct_Missle(this_69, owner, target) return this_69 endfunction function closure_impl_133 takes integer this_69, unit caster, integer level, unit target returns integer return new_Missle(unit_getUserData(caster), unit_getUserData(target)) endfunction function dispatch_OnUnitCast_run takes integer this_69, unit caster, integer lvl, unit target returns nothing if Cast_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling OnUnitCast.run") else call error("Called OnUnitCast.run on invalid object.") endif endif call closure_impl_133(this_69, caster, lvl, target) endfunction function handleCasts takes nothing returns nothing local unit caster = GetTriggerUnit() local integer lvl = GetUnitAbilityLevel(caster, GetSpellAbilityId()) local integer c = dispatch_HashMap_get(Cast_casts, GetSpellAbilityId()) local integer instanceOfTemp local integer instanceOfTemp_2 if c != 0 then if Cast_typeId[c] == 854 then call dispatch_OnCast_run(c, caster, lvl) endif set instanceOfTemp = Cast_typeId[c] if instanceOfTemp >= 855 and instanceOfTemp <= 856 then call dispatch_OnPointCast_run(c, caster, lvl, GetSpellTargetX(), GetSpellTargetY()) endif set instanceOfTemp_2 = Cast_typeId[c] if instanceOfTemp_2 >= 857 and instanceOfTemp_2 <= 858 then call dispatch_OnUnitCast_run(c, caster, lvl, GetSpellTargetUnit()) endif endif set caster = null endfunction function hideItem takes nothing returns nothing if IsItemVisible(GetEnumItem()) then set Terrain_hid[Terrain_hidMax] = GetEnumItem() call SetItemVisible(Terrain_hid[Terrain_hidMax], false) set Terrain_hidMax = Terrain_hidMax + 1 endif endfunction function notUnit takes nothing returns boolean return ( not IsUnitType(GetFilterUnit(), UNIT_TYPE_UNDEAD)) and Filter_filterCheckUnit != GetFilterUnit() endfunction function onEsc takes nothing returns nothing call print("onEsc") call dispatch_Hero_addArmor(GameStart_testh, 1.) endfunction function alloc_Closure_38 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 889 return this_69 endfunction function alloc_Closure_39 takes nothing returns integer local integer this_69 if PlayerAction_firstFree == 0 then set PlayerAction_maxIndex = PlayerAction_maxIndex + 1 set this_69 = PlayerAction_maxIndex else set PlayerAction_firstFree = PlayerAction_firstFree - 1 set this_69 = PlayerAction_nextFree[PlayerAction_firstFree] endif set PlayerAction_typeId[this_69] = 885 return this_69 endfunction function Bar_enable takes integer this_69 returns nothing call texttag_setVisibility(Bar_tt[this_69], true) set Bar_check[this_69] = true call dispatch_Bar_update(this_69) endfunction function dispatch_Bar_enable takes integer this_69 returns nothing if Bar_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Bar.enable") else call error("Called Bar.enable on invalid object.") endif endif call Bar_enable(this_69) endfunction function Hero_revive takes integer this_69, real pos_x, real pos_y returns nothing local integer i call ReviveHero(Unit_u[this_69], pos_x, pos_y, true) call dispatch_Bar_enable(Hero_hb[this_69]) call unit_removeAbility(Unit_u[this_69], 1684365668) set Unit_isDead[this_69] = false set i = 0 loop exitwhen i > 11 call dispatch_Table_saveReal(Unit_playerDamage[this_69], i, 0.) set i = i + 1 endloop endfunction function dispatch_Hero_revive takes integer this_69, real pos_x, real pos_y returns nothing if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Hero.revive") else call error("Called Hero.revive on invalid object.") endif endif call Hero_revive(this_69, pos_x, pos_y) endfunction function dispatch_Icon_showDirect takes integer this_69, player p_2 returns nothing if Widget_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Icon.showDirect") else call error("Called Icon.showDirect on invalid object.") endif endif call Icon_showDirect(this_69, p_2) endfunction function Shield_getRemainingTime takes integer this_69 returns real return TimerGetRemaining(Shield_t[this_69]) endfunction function dispatch_Shield_getRemainingTime takes integer this_69 returns real local real getRemainingTime_result if Shield_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Shield.getRemainingTime") else call error("Called Shield.getRemainingTime on invalid object.") endif endif set getRemainingTime_result = Shield_getRemainingTime(this_69) return getRemainingTime_result endfunction function ShieldList_add takes integer this_69, integer s returns nothing local real time local integer pos local integer buffer set ShieldList_shieldSum[this_69] = ShieldList_shieldSum[this_69] + Shield_amount[s] if ShieldList_first[this_69] == 0 then set ShieldList_first[this_69] = s set ShieldList_last[this_69] = s else set time = dispatch_Shield_getRemainingTime(s) set pos = ShieldList_first[this_69] loop exitwhen not (pos != 0) if dispatch_Shield_getRemainingTime(ShieldList_first[this_69]) > time then set buffer = Shield_prev[pos] set Shield_prev[pos] = s set Shield_next[buffer] = s set Shield_prev[s] = buffer set Shield_next[s] = pos exitwhen true else set pos = Shield_next[pos] endif endloop endif endfunction function dispatch_ShieldList_add takes integer this_69, integer s returns nothing if ShieldList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling ShieldList.add") else call error("Called ShieldList.add on invalid object.") endif endif call ShieldList_add(this_69, s) endfunction function alloc_Shield takes nothing returns integer local integer this_69 if Shield_firstFree == 0 then set Shield_maxIndex = Shield_maxIndex + 1 set this_69 = Shield_maxIndex else set Shield_firstFree = Shield_firstFree - 1 set this_69 = Shield_nextFree[Shield_firstFree] endif set Shield_typeId[this_69] = 768 return this_69 endfunction function construct_Shield takes integer this_69, integer u_2, real amount_51, real time, integer referingList returns nothing set Shield_t[this_69] = getTimer() set Shield_shieldDestroyed[this_69] = 0 set Shield_target[this_69] = u_2 set Shield_amount[this_69] = amount_51 set Shield_referingList[this_69] = referingList call timer_setData(Shield_t[this_69], this_69) call timer_start(Shield_t[this_69], time, ref_function_Shield_onExpire) endfunction function new_Shield takes integer u_2, real amount_51, real time, integer referingList returns integer local integer this_69 = alloc_Shield() call construct_Shield(this_69, u_2, amount_51, time, referingList) return this_69 endfunction function Unit_addShield takes integer this_69, real amount_51, real duration returns integer local integer s = new_Shield(this_69, amount_51, duration, Unit_shieldList[this_69]) call dispatch_ShieldList_add(Unit_shieldList[this_69], s) return s endfunction function dispatch_Unit_addShield takes integer this_69, real amount_51, real duration returns integer local integer addShield_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.addShield") else call error("Called Unit.addShield on invalid object.") endif endif set addShield_result = Unit_addShield(this_69, amount_51, duration) return addShield_result endfunction function alloc_Closure_40 takes nothing returns integer local integer this_69 if Bonus_firstFree == 0 then set Bonus_maxIndex = Bonus_maxIndex + 1 set this_69 = Bonus_maxIndex else set Bonus_firstFree = Bonus_firstFree - 1 set this_69 = Bonus_nextFree[Bonus_firstFree] endif set Bonus_typeId[this_69] = 828 return this_69 endfunction function Unit_bonusLife_2 takes integer this_69, real amount_51 returns integer local integer clVar set Unit_bonusLife[this_69] = Unit_bonusLife[this_69] + amount_51 call dispatch_Unit_updateLife(this_69) set clVar = alloc_Closure_40() set this_45[clVar] = this_69 set amount_35[clVar] = amount_51 return clVar endfunction function dispatch_Unit_bonusLife takes integer this_69, real amount_51 returns integer local integer bonusLife_result if Unit_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Unit.bonusLife") else call error("Called Unit.bonusLife on invalid object.") endif endif set bonusLife_result = Unit_bonusLife_2(this_69, amount_51) return bonusLife_result endfunction function Window_onVoidClick takes integer this_69, integer a returns nothing set Window_voidClick[this_69] = a endfunction function dispatch_Window_onVoidClick takes integer this_69, integer a returns nothing if Window_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Window.onVoidClick") else call error("Called Window.onVoidClick on invalid object.") endif endif call Window_onVoidClick(this_69, a) endfunction function setCallLimit takes nothing returns nothing local string chatString = GetEventPlayerChatString() local string cuttet local string temp local integer w_2 local integer receiver local integer receiver_2 local integer clVar local integer w_3 local integer receiver_3 local integer receiver_4 local integer clVar_2 local integer temp_2 local integer temp_3 local integer temp_4 local integer temp_5 if SubString(chatString, 0, 1) == "a" then set cuttet = SubString(chatString, 1, 5) call SetUnitAnimationByIndex(Unit_u[UnitClass_last], S2I(cuttet)) endif set temp = chatString if temp == "w1" then call WindowManager_openWindow(GameStart_shopWindow, Player(0)) elseif temp == "w2" then set w_2 = new_Window() set receiver_2 = w_2 set temp_2 = receiver_2 set receiver = new_Icon("RingDesCrigges", 10, 5, 2) call dispatch_Icon_showDirect(receiver, Player(0)) call cyc_dispatch_Window_add(0, temp_2, new_Observable(receiver)) call WindowManager_openWindow(receiver_2, Player(0)) set temp_3 = w_2 set clVar = alloc_Closure_39() call dispatch_Window_onVoidClick(temp_3, clVar) elseif temp == "w3" then set w_3 = new_Window() set receiver_4 = w_3 set temp_4 = receiver_4 set receiver_3 = new_Icon("RingDesCrigges", 15, 5, 2) call dispatch_Icon_showDirect(receiver_3, Player(0)) call cyc_dispatch_Window_add(0, temp_4, new_Observable(receiver_3)) call WindowManager_openWindow(receiver_4, Player(0)) set temp_5 = w_3 set clVar_2 = alloc_Closure_38() call dispatch_Window_onVoidClick(temp_5, clVar_2) elseif temp == "hideF" then elseif temp == "dis" then elseif temp == "en" then elseif temp == "click" then elseif temp == "dclick" then elseif temp == "hoover" then elseif temp == "unhoover" then elseif temp == "size+" then elseif temp == "size-" then elseif temp == "drag t t" then call EnableDragSelect(true, true) elseif temp == "drag t f" then call EnableDragSelect(true, false) elseif temp == "drag f t" then call EnableDragSelect(false, true) elseif temp == "drag f f" then call EnableDragSelect(false, false) elseif temp == "pre t t" then call EnablePreSelect(true, true) elseif temp == "pre t f" then call EnablePreSelect(true, false) elseif temp == "pre f t" then call EnablePreSelect(false, true) elseif temp == "pre f f" then call EnablePreSelect(false, false) elseif temp == "sel t t" then call EnableSelect(true, true) elseif temp == "sel t f" then call EnableSelect(true, false) elseif temp == "sel f t" then call EnableSelect(false, true) elseif temp == "sel f f" then call EnableSelect(false, false) elseif temp == "last" then call SelectUnitForPlayerSingle(Unit_u[UnitClass_last], Player(0)) elseif temp == "hp+" then call dispatch_Unit_bonusLife(UnitClass_last, 10.) elseif temp == "hp++" then call dispatch_Unit_bonusLife(UnitClass_last, 100.) elseif temp == "hp+++" then call dispatch_Unit_bonusLife(UnitClass_last, 1000.) elseif temp == "hp-" then call dispatch_Unit_bonusLife(UnitClass_last, -10.) elseif temp == "hp--" then call dispatch_Unit_bonusLife(UnitClass_last, -100.) elseif temp == "hp---" then call dispatch_Unit_bonusLife(UnitClass_last, -1000.) elseif temp == "rev" then call dispatch_Hero_revive(UnitClass_last, 100., 100.) elseif temp == "shield1" then call dispatch_Unit_addShield(UnitClass_last, 10., 10.) elseif temp == "shield2" then call dispatch_Unit_addShield(UnitClass_last, 100., 10.) elseif temp == "shield3" then call dispatch_Unit_addShield(UnitClass_last, 1000., 10.) elseif temp == "canMove f" then elseif temp == "canMove t" then elseif temp == "swap" then call SetPlayerAbilityAvailable(Player(0), 1094269238, false) call SetPlayerAbilityAvailable(Player(0), 1094269241, true) elseif temp == "bswap" then call SetPlayerAbilityAvailable(Player(0), 1094269238, true) call SetPlayerAbilityAvailable(Player(0), 1094269241, false) elseif temp == "slot" then call SetPlayerAbilityAvailable(Player(0), 1935896434, false) elseif temp == "key" then call print(int_toString(GetLocalizedHotkey("ESC"))) elseif temp == "abi" then call print(int_toString(GetUnitAbilityLevel(Unit_u[UnitClass_last], 1935896434))) call SetUnitAbilityLevel(Unit_u[UnitClass_last], 1935896434, 2) call print(int_toString(GetUnitAbilityLevel(Unit_u[UnitClass_last], 1935896434))) elseif temp == "cast" then call IssueInstantPointOrder(Unit_u[UnitClass_last], "ancestralspirit", 0., 0., null) endif endfunction function spellCondition takes nothing returns boolean if GetSpellAbilityId() == 1096115059 then return true else return false endif endfunction function alloc_Pull2 takes nothing returns integer local integer this_69 if Pull2_firstFree == 0 then set Pull2_maxIndex = Pull2_maxIndex + 1 set this_69 = Pull2_maxIndex else set Pull2_firstFree = Pull2_firstFree - 1 set this_69 = Pull2_nextFree[Pull2_firstFree] endif set Pull2_typeId[this_69] = 863 return this_69 endfunction function construct_Pull2 takes integer this_69, unit u_2, unit ut returns nothing set Pull2_u[this_69] = u_2 set Pull2_ut[this_69] = ut set Pull2_uut[this_69] = GetUnitUserData(ut) set Pull2_i[this_69] = R2I(distanceBetweenCoords(unit_getX(u_2), unit_getY(u_2), unit_getX(ut), unit_getY(ut)) / 20.) set Pull2_imax[this_69] = Pull2_i[this_69] set Pull2_l[this_69] = AddLightningEx("LEAS", true, unit_getX(u_2), unit_getY(u_2), 50., unit_getX(ut), unit_getY(ut), 50.) set Pull2_t[this_69] = getTimer() call timer_setData(Pull2_t[this_69], this_69) call timer_startPeriodic(Pull2_t[this_69], 0.03, ref_function_Pull2_blackHCall) endfunction function new_Pull2 takes unit u_2, unit ut returns integer local integer this_69 = alloc_Pull2() call construct_Pull2(this_69, u_2, ut) return this_69 endfunction function spellStart takes nothing returns nothing call new_Pull2(GetTriggerUnit(), GetSpellTargetUnit()) endfunction function switchDebug takes nothing returns nothing local player p_2 = GetTriggerPlayer() local integer id = player_getId(p_2) if PrintingHelper_wantDebug[id] then set PrintingHelper_wantDebug[id] = false call DisplayTimedTextToPlayer(p_2, 0., 0., 20., "|cff9C9C9CDEBUG-View|r |cffB55208deactivated") else set PrintingHelper_wantDebug[id] = true call DisplayTimedTextToPlayer(p_2, 0., 0., 20., "|cff9C9C9CDEBUG-View|r |cff3AAD42activated") endif set p_2 = null endfunction function updateTime takes nothing returns nothing set HandleCounter_seconds = HandleCounter_seconds + 1 endfunction function wargrinSpawnCallback takes nothing returns nothing local integer iter = timer_getData(GetExpiredTimer()) local string s if dispatch_StringIteratorC_hasNext(iter) then set s = dispatch_StringIteratorC_next(iter) call new_Unit(s, CreepSpawn_wargrinTopStart_x, CreepSpawn_wargrinTopStart_y, CreepSpawn_wargrinOwner) call new_Unit(s, CreepSpawn_wargrinTopStart_x, CreepSpawn_wargrinTopStart_y, CreepSpawn_wargrinOwner) else call dispatch_StringIteratorC_destroyStringIteratorC(iter) call timer_release(GetExpiredTimer()) endif endfunction function initGlobals takes nothing returns nothing set StringLevelClosure_firstFree = 0 set StringLevelClosure_maxIndex = 0 set IntLevelClosure_firstFree = 0 set IntLevelClosure_maxIndex = 0 set RealLevelClosure_firstFree = 0 set RealLevelClosure_maxIndex = 0 set BooleanLevelClosure_firstFree = 0 set BooleanLevelClosure_maxIndex = 0 set LinkedList_firstFree = 0 set LinkedList_maxIndex = 0 set LLEntry_firstFree = 0 set LLEntry_maxIndex = 0 set LLIterator_firstFree = 0 set LLIterator_maxIndex = 0 set Table_firstFree = 0 set Table_maxIndex = 0 set W3UDefinition_firstFree = 0 set W3UDefinition_maxIndex = 0 set OrderStringFactory_firstFree = 0 set OrderStringFactory_maxIndex = 0 set AbilityDefinition_firstFree = 0 set AbilityDefinition_maxIndex = 0 set HashMap_firstFree = 0 set HashMap_maxIndex = 0 set TrackableAction_firstFree = 0 set TrackableAction_maxIndex = 0 set TrackableEx_firstFree = 0 set TrackableEx_maxIndex = 0 set Event_firstFree = 0 set Event_maxIndex = 0 set Action_firstFree = 0 set Action_maxIndex = 0 set DebugFile_firstFree = 0 set DebugFile_maxIndex = 0 set HashList_firstFree = 0 set HashList_maxIndex = 0 set ElementLoop_firstFree = 0 set ElementLoop_maxIndex = 0 set CallbackSingle_firstFree = 0 set CallbackSingle_maxIndex = 0 set CallbackPeriodic_firstFree = 0 set CallbackPeriodic_maxIndex = 0 set PreloadAction_firstFree = 0 set PreloadAction_maxIndex = 0 set Ability_firstFree = 0 set Ability_maxIndex = 0 set Dot_firstFree = 0 set Buff_firstFree = 0 set TextTag_firstFree = 0 set TextTag_maxIndex = 0 set ShieldList_firstFree = 0 set ShieldList_maxIndex = 0 set Shield_firstFree = 0 set Shield_maxIndex = 0 set ArrayQueue_firstFree = 0 set ArrayQueue_maxIndex = 0 set DelayNode_firstFree = 0 set DelayNode_maxIndex = 0 set Fx_firstFree = 0 set Fx_maxIndex = 0 set CrigBar_firstFree = 0 set CrigBar_maxIndex = 0 set CaptureData_firstFree = 0 set CaptureData_maxIndex = 0 set ControlPoint_firstFree = 0 set ControlPoint_maxIndex = 0 set StringList_firstFree = 0 set StringList_maxIndex = 0 set String_firstFree = 0 set String_maxIndex = 0 set StringIteratorC_firstFree = 0 set StringIteratorC_maxIndex = 0 set FreeNode_firstFree = 0 set FreeNode_maxIndex = 0 set ArrayList_firstFree = 0 set ArrayList_maxIndex = 0 set BasicSpellDef_firstFree = 0 set BasicSpellDef_maxIndex = 0 set UnitType_firstFree = 0 set UnitType_maxIndex = 0 set Unit_firstFree = 0 set Unit_maxIndex = 0 set Bonus_firstFree = 0 set Bonus_maxIndex = 0 set Order_firstFree = 0 set Order_maxIndex = 0 set SmartData_firstFree = 0 set SmartData_maxIndex = 0 set PreDamageData_firstFree = 0 set PreDamageData_maxIndex = 0 set OnDamageData_firstFree = 0 set OnDamageData_maxIndex = 0 set Units_firstFree = 0 set Units_maxIndex = 0 set Cast_firstFree = 0 set Cast_maxIndex = 0 set Missle_firstFree = 0 set Missle_maxIndex = 0 set Conductor_firstFree = 0 set Conductor_maxIndex = 0 set Pull2_firstFree = 0 set Pull2_maxIndex = 0 set Player_firstFree = 0 set Player_maxIndex = 0 set Stack_firstFree = 0 set Stack_maxIndex = 0 set SEntry_firstFree = 0 set SEntry_maxIndex = 0 set Widget_firstFree = 0 set Widget_maxIndex = 0 set PlayerAction_firstFree = 0 set PlayerAction_maxIndex = 0 set Window_firstFree = 0 set Window_maxIndex = 0 set TextSplat_firstFree = 0 set TextSplat_maxIndex = 0 set ImageListEntry_firstFree = 0 set ImageListEntry_maxIndex = 0 set ImageList_firstFree = 0 set ImageList_maxIndex = 0 set ImageList_firstFree_2 = 0 set ImageList_maxIndex_2 = 0 set ListImage_firstFree = 0 set ListImage_maxIndex = 0 set ImageIterator_firstFree = 0 set ImageIterator_maxIndex = 0 set ref_function_hideItem = function hideItem set ref_function_closure_impl = function closure_impl_127 set ref_function_CallbackPeriodic_staticCallback = function CallbackPeriodic_staticCallback set ref_function_CallbackSingle_staticCallback = function CallbackSingle_staticCallback set ref_function_TextTag_destroyTextTag = function TextTag_destroyTextTag set ref_function_TextTag_destroyTextTag_2 = function TextTag_destroyTextTag set ref_function_TextTag_destroyTextTag_3 = function TextTag_destroyTextTag set ref_function_Shield_onExpire = function Shield_onExpire set ref_function_Bar_callUpdateEx = function Bar_callUpdateEx set ref_function_DelayNode_recycle = function DelayNode_recycle set ref_function_DelayNode_recycle_2 = function DelayNode_recycle set ref_function_DelayNode_recycle_3 = function DelayNode_recycle set ref_function_closure_impl_2 = function closure_impl_125 set ref_function_closure_impl_3 = function closure_impl_130 set ref_function_closure_impl_4 = function closure_impl_122 set ref_function_closure_impl_5 = function closure_impl_128 set ref_function_notUnit = function notUnit set ref_function_closure_impl_6 = function closure_impl_110 set ref_function_closure_impl_7 = function closure_impl_124 set ref_function_closure_impl_8 = function closure_impl_126 set ref_function_closure_impl_9 = function closure_impl_121 set ref_function_Pull2_blackHCall = function Pull2_blackHCall set ref_function_Player_setCam = function Player_setCam set ref_function_Preload_preload = function Preload_preload set ref_function_Preload_preload_2 = function Preload_preload set ref_function_switchDebug = function switchDebug set ref_function_closure_impl_10 = function closure_impl_120 set ref_function_closure_impl_11 = function closure_impl_129 set ref_function_closure_impl_12 = function closure_impl_131 set ref_function_createMultiboard = function createMultiboard set ref_function_Bar_updatePos = function Bar_updatePos set ref_function_Bar_updateVision = function Bar_updateVision set ref_function_closure_impl_13 = function closure_impl_123 set ref_function_GetOrders_callOnOrder = function GetOrders_callOnOrder set ref_function_Unit_tookDamage = function Unit_tookDamage set ref_function_handleCasts = function handleCasts set ref_function_spellCondition = function spellCondition set ref_function_spellStart = function spellStart set ref_function_updateTime = function updateTime set ref_function_finishPreload = function finishPreload set ref_function_setCallLimit = function setCallLimit set ref_function_Dot_loopList = function Dot_loopList set ref_function_callKnockback = function callKnockback set ref_function_camTest = function camTest set ref_function_onEsc = function onEsc endfunction function init_AbilityTooltipGenerator takes nothing returns nothing set AbilityTooltipGenerator_TITLE_COLOR = "|cff3B97D3" set AbilityTooltipGenerator_MAX_TITLES = 10 endfunction function init_Array takes nothing returns nothing endfunction function alloc_FreeNode takes nothing returns integer local integer this_69 if FreeNode_firstFree == 0 then set FreeNode_maxIndex = FreeNode_maxIndex + 1 set this_69 = FreeNode_maxIndex else set FreeNode_firstFree = FreeNode_firstFree - 1 set this_69 = FreeNode_nextFree[FreeNode_firstFree] endif return this_69 endfunction function construct_FreeNode2 takes integer this_69, integer dataPos, integer size returns nothing set FreeNode_dataPos[this_69] = dataPos set FreeNode_size[this_69] = size set FreeNode_next[this_69] = 0 endfunction function new_FreeNode takes integer dataPos, integer size returns integer local integer this_69 = alloc_FreeNode() call construct_FreeNode2(this_69, dataPos, size) return this_69 endfunction function init_ArrayList takes nothing returns nothing set ArrayList_freeList = new_FreeNode(0, 8191) endfunction function init_Basics takes nothing returns nothing set Basics_DUMMY_UNIT_ID = 2019849581 set Basics_HEIGHT_ENABLER = 1097691750 set Basics_LOCUST_ID = 1097625443 set Basics_ANIMATION_PERIOD = 0.03 set Basics_DUMMY_PLAYER = Player(15) call Player(12) endfunction function init_BuffTypes takes nothing returns nothing call new_HashMap() endfunction function init_Button takes nothing returns nothing local real temp_Button_sizeFix_x local real temp_Button_sizeFix_y local real temp_Button_posFix_x local real temp_Button_posFix_y set Button_buttonTexture = "SorvButton.blp" set temp_Button_sizeFix_x = 20. set temp_Button_sizeFix_y = 10. set Button_sizeFix_x = temp_Button_sizeFix_x set Button_sizeFix_y = temp_Button_sizeFix_y set temp_Button_posFix_x = -10. set temp_Button_posFix_y = -5. set Button_posFix_x = temp_Button_posFix_x set Button_posFix_y = temp_Button_posFix_y endfunction function init_CaptureAnimation takes nothing returns nothing call new_Table() endfunction function alloc_OrderStringFactory takes nothing returns integer local integer this_69 if OrderStringFactory_firstFree == 0 then set OrderStringFactory_maxIndex = OrderStringFactory_maxIndex + 1 set this_69 = OrderStringFactory_maxIndex else set OrderStringFactory_firstFree = OrderStringFactory_firstFree - 1 set this_69 = OrderStringFactory_nextFree[OrderStringFactory_firstFree] endif set OrderStringFactory_typeId[this_69] = 44 return this_69 endfunction function construct_OrderStringFactory takes integer this_69 returns nothing set OrderStringFactory_counter[this_69] = -1 endfunction function new_OrderStringFactory takes nothing returns integer local integer this_69 = alloc_OrderStringFactory() call construct_OrderStringFactory(this_69) return this_69 endfunction function init_ChannelAbilityPreset takes nothing returns nothing set ChannelAbilityPreset_odf = new_OrderStringFactory() set ChannelAbilityPreset_visibleval = 1 set ChannelAbilityPreset_targetimageval = 2 set ChannelAbilityPreset_physicalspellval = 4 set ChannelAbilityPreset_universalspellval = 8 set ChannelAbilityPreset_uniquecastval = 16 endfunction function c2sInit takes nothing returns nothing set Char_c2s[0] = "" set Char_c2s[1] = "" set Char_c2s[2] = "" set Char_c2s[3] = "" set Char_c2s[4] = "" set Char_c2s[5] = "" set Char_c2s[6] = "" set Char_c2s[7] = "" set Char_c2s[8] = "" set Char_c2s[9] = "\t" set Char_c2s[10] = "\n" set Char_c2s[11] = "" set Char_c2s[12] = "" set Char_c2s[13] = "\r" set Char_c2s[14] = "" set Char_c2s[15] = "" set Char_c2s[16] = "" set Char_c2s[17] = "" set Char_c2s[18] = "" set Char_c2s[19] = "" set Char_c2s[20] = "" set Char_c2s[21] = "" set Char_c2s[22] = "" set Char_c2s[23] = "" set Char_c2s[24] = "" set Char_c2s[25] = "" set Char_c2s[26] = "" set Char_c2s[27] = "" set Char_c2s[28] = "" set Char_c2s[29] = "" set Char_c2s[30] = "" set Char_c2s[31] = "" set Char_c2s[32] = " " set Char_c2s[33] = "!" set Char_c2s[34] = "\"" set Char_c2s[35] = "#" set Char_c2s[36] = "$" set Char_c2s[37] = "%" set Char_c2s[38] = "&" set Char_c2s[39] = "'" set Char_c2s[40] = "(" set Char_c2s[41] = ")" set Char_c2s[42] = "*" set Char_c2s[43] = "+" set Char_c2s[44] = "," set Char_c2s[45] = "-" set Char_c2s[46] = "." set Char_c2s[47] = "/" set Char_c2s[48] = "0" set Char_c2s[49] = "1" set Char_c2s[50] = "2" set Char_c2s[51] = "3" set Char_c2s[52] = "4" set Char_c2s[53] = "5" set Char_c2s[54] = "6" set Char_c2s[55] = "7" set Char_c2s[56] = "8" set Char_c2s[57] = "9" set Char_c2s[58] = ":" set Char_c2s[59] = ";" set Char_c2s[60] = "<" set Char_c2s[61] = "=" set Char_c2s[62] = ">" set Char_c2s[63] = "?" set Char_c2s[64] = "@" set Char_c2s[65] = "A" set Char_c2s[66] = "B" set Char_c2s[67] = "C" set Char_c2s[68] = "D" set Char_c2s[69] = "E" set Char_c2s[70] = "F" set Char_c2s[71] = "G" set Char_c2s[72] = "H" set Char_c2s[73] = "I" set Char_c2s[74] = "J" set Char_c2s[75] = "K" set Char_c2s[76] = "L" set Char_c2s[77] = "M" set Char_c2s[78] = "N" set Char_c2s[79] = "O" set Char_c2s[80] = "P" set Char_c2s[81] = "Q" set Char_c2s[82] = "R" set Char_c2s[83] = "S" set Char_c2s[84] = "T" set Char_c2s[85] = "U" set Char_c2s[86] = "V" set Char_c2s[87] = "W" set Char_c2s[88] = "X" set Char_c2s[89] = "Y" set Char_c2s[90] = "Z" set Char_c2s[91] = "[" set Char_c2s[92] = "\\" set Char_c2s[93] = "]" set Char_c2s[94] = "^" set Char_c2s[95] = "_" set Char_c2s[96] = "`" set Char_c2s[97] = "a" set Char_c2s[98] = "b" set Char_c2s[99] = "c" set Char_c2s[100] = "d" set Char_c2s[101] = "e" set Char_c2s[102] = "f" set Char_c2s[103] = "g" set Char_c2s[104] = "h" set Char_c2s[105] = "i" set Char_c2s[106] = "j" set Char_c2s[107] = "k" set Char_c2s[108] = "l" set Char_c2s[109] = "m" set Char_c2s[110] = "n" set Char_c2s[111] = "o" set Char_c2s[112] = "p" set Char_c2s[113] = "q" set Char_c2s[114] = "r" set Char_c2s[115] = "s" set Char_c2s[116] = "t" set Char_c2s[117] = "u" set Char_c2s[118] = "v" set Char_c2s[119] = "w" set Char_c2s[120] = "x" set Char_c2s[121] = "y" set Char_c2s[122] = "z" set Char_c2s[123] = "{" set Char_c2s[124] = "|" set Char_c2s[125] = "}" set Char_c2s[126] = "~" set Char_c2s[127] = "" endfunction function string_toUpperCase takes string this_69 returns string return StringCase(this_69, true) endfunction function s2cInit takes nothing returns nothing local integer i = 0 local integer temp = Char_MAX_INDEX loop exitwhen i > temp if string_toUpperCase(Char_c2s[i]) == Char_c2s[i] then set Char_s2c[StringHash(Char_c2s[i]) / 2033480 + 1002] = i endif set i = i + 1 endloop endfunction function widthInit takes nothing returns nothing endfunction function init_Char takes nothing returns nothing set Char_MAX_INDEX = 126 + 1 call c2sInit() call s2cInit() call widthInit() endfunction function trigger_addAction takes trigger this_69, code actionFunc returns nothing call TriggerAddAction(this_69, actionFunc) endfunction function trigger_registerAnyUnitEvent takes trigger this_69, playerunitevent whichEvent returns nothing call TriggerRegisterAnyUnitEventBJ(this_69, whichEvent) endfunction function init_ClosureEvents takes nothing returns nothing local trigger receiver = CreateTrigger() local trigger receiver_2 call trigger_registerAnyUnitEvent(receiver, EVENT_PLAYER_UNIT_SPELL_CAST) set receiver_2 = receiver call trigger_addAction(receiver_2, ref_function_handleCasts) set Cast_casts = new_HashMap() call new_HashMap() set receiver = null set receiver_2 = null endfunction function init_Colors takes nothing returns nothing local integer i = 0 local integer i2 loop exitwhen i > 9 call int_toString(i) set i = i + 1 endloop set Colors_decs = new_Table() set i2 = 0 loop exitwhen i2 > 9 call dispatch_Table_saveInt(Colors_decs, StringHash(int_toString(i2)), i2) set i2 = i2 + 1 endloop call dispatch_Table_saveInt(Colors_decs, StringHash("A"), 10) call dispatch_Table_saveInt(Colors_decs, StringHash("B"), 11) call dispatch_Table_saveInt(Colors_decs, StringHash("C"), 12) call dispatch_Table_saveInt(Colors_decs, StringHash("D"), 13) call dispatch_Table_saveInt(Colors_decs, StringHash("E"), 14) call dispatch_Table_saveInt(Colors_decs, StringHash("F"), 15) endfunction function alloc_Closure_41 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 731 return this_69 endfunction function init_CompiletimeInit takes nothing returns nothing local integer clVar = alloc_Closure_41() call nullTimer(clVar) endfunction function alloc_Closure_42 takes nothing returns integer local integer this_69 if Cast_firstFree == 0 then set Cast_maxIndex = Cast_maxIndex + 1 set this_69 = Cast_maxIndex else set Cast_firstFree = Cast_firstFree - 1 set this_69 = Cast_nextFree[Cast_firstFree] endif set Cast_typeId[this_69] = 856 return this_69 endfunction function Cast_register takes integer this_69, integer abiCode returns nothing call dispatch_HashMap_put(Cast_casts, abiCode, this_69) endfunction function dispatch_Cast_register takes integer this_69, integer abiCode returns nothing if Cast_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling Cast.register") else call error("Called Cast.register on invalid object.") endif endif call Cast_register(this_69, abiCode) endfunction function onPointCast takes integer abiCode, integer action returns nothing call dispatch_Cast_register(action, abiCode) endfunction function init_Conductor takes nothing returns nothing local integer clVar = alloc_Closure_42() call onPointCast(1918987625, clVar) set Conductor_range = 900. set Conductor_missleRadius = 50. set Conductor_missleHeight = 50. set Conductor_missleSpeed = 10. set Conductor_baseDamage = 10. set Conductor_bonusDamage = 5. set Conductor_lvlFactor = 1.2 endfunction function CreationEvent_onCreation takes integer action returns integer call dispatch_Event_addAction(CreationEvent_create, action) return action endfunction function CreationEvent_onDestroy takes integer action returns integer call dispatch_Event_addAction(CreationEvent_dest, action) return action endfunction function alloc_Closure_43 takes nothing returns integer local integer this_69 if Action_firstFree == 0 then set Action_maxIndex = Action_maxIndex + 1 set this_69 = Action_maxIndex else set Action_firstFree = Action_firstFree - 1 set this_69 = Action_nextFree[Action_firstFree] endif set Action_typeId[this_69] = 690 return this_69 endfunction function alloc_Closure_44 takes nothing returns integer local integer this_69 if Action_firstFree == 0 then set Action_maxIndex = Action_maxIndex + 1 set this_69 = Action_maxIndex else set Action_firstFree = Action_firstFree - 1 set this_69 = Action_nextFree[Action_firstFree] endif set Action_typeId[this_69] = 692 return this_69 endfunction function init_ControlPoint takes nothing returns nothing local integer clVar local integer clVar_2 set ControlPoint_model = 1668314212 set ControlPoint_modelMorphed = 1668314216 set ControlPoint_decoCystalGreenId = 1110454349 set ControlPoint_decoCystalRedId = 1110454348 set ControlPoint_decoLightGreenId = 1110454347 set ControlPoint_decoLightRedId = 1110454337 set ControlPoint_teamEverlivingLightning = Lightning_FINGER_OF_DEATH set ControlPoint_teamWargrinLightning = "LEGR" set ControlPoint_decoCrystalOusideScale = 0.4 set ControlPoint_decoCrystalInsideScale = 0.8 set ControlPoint_morphAbi = 1668575341 set ControlPoint_height = 400. set ControlPoint_captureSpeed = 0.01 set ControlPoint_maxDistance = 990. set ControlPoint_captureDamage = 0.001 set ControlPoint_regenerationSpeed = 0.00005 set ControlPoint_captureData = new_HashMap() set clVar = alloc_Closure_43() call CreationEvent_onCreation(clVar) set clVar_2 = alloc_Closure_44() call CreationEvent_onDestroy(clVar_2) endfunction function alloc_String takes nothing returns integer local integer this_69 if String_firstFree == 0 then set String_maxIndex = String_maxIndex + 1 set this_69 = String_maxIndex else set String_firstFree = String_firstFree - 1 set this_69 = String_nextFree[String_firstFree] endif return this_69 endfunction function construct_String takes integer this_69, string s returns nothing set String_content[this_69] = s endfunction function new_String takes string s returns integer local integer this_69 = alloc_String() call construct_String(this_69, s) return this_69 endfunction function StringList_add takes integer this_69, string s returns nothing local integer news = new_String(s) if StringList_last[this_69] == 0 then set StringList_first[this_69] = news set StringList_last[this_69] = news set String_next[news] = 0 else set String_next[StringList_last[this_69]] = news set StringList_last[this_69] = news endif endfunction function dispatch_StringList_add takes integer this_69, string s returns nothing if StringList_typeId[this_69] == 0 then if this_69 == 0 then call error("Nullpointer exception when calling StringList.add") else call error("Called StringList.add on invalid object.") endif endif call StringList_add(this_69, s) endfunction function everlivingSpawnorder takes nothing returns integer local integer w_2 = new_StringList() call dispatch_StringList_add(w_2, "") return w_2 endfunction function wargrinSpawnorder takes nothing returns integer local integer w_2 = new_StringList() call dispatch_StringList_add(w_2, "") return w_2 endfunction function init_CreepSpawn takes nothing returns nothing local real temp_CreepSpawn_wargrinTopStart_x = 0. local real temp_CreepSpawn_wargrinTopStart_y = 0. local real temp_CreepSpawn_everlivingTopStart_x local real temp_CreepSpawn_everlivingTopStart_y set CreepSpawn_wargrinTopStart_x = temp_CreepSpawn_wargrinTopStart_x set CreepSpawn_wargrinTopStart_y = temp_CreepSpawn_wargrinTopStart_y set temp_CreepSpawn_everlivingTopStart_x = 0. set temp_CreepSpawn_everlivingTopStart_y = 0. set CreepSpawn_everlivingTopStart_x = temp_CreepSpawn_everlivingTopStart_x set CreepSpawn_everlivingTopStart_y = temp_CreepSpawn_everlivingTopStart_y set CreepSpawn_wargrinOwner = Player(1) call Player(7) call wargrinSpawnorder() call everlivingSpawnorder() endfunction function init_CustomBar takes nothing returns nothing call CreateTimer() endfunction function init_DebugFile takes nothing returns nothing set DebugFile_bufferWasCleared = false call PreloadGenClear() set DebugFile_path = "C:\\Users\\Crigges\\Desktop\\" set DebugFile_filetype = ".debug" set DebugFile_lastSavedFile = 0 endfunction function init_DelayedDestroy takes nothing returns nothing call CreateTimer() endfunction function init_Dot takes nothing returns nothing set LinkedListModule_first = 0 set LinkedListModule_last = 0 set LinkedListModule_size = 0 endfunction function TextTag_classname takes nothing returns string return "TextTag" endfunction function registerNewInstanceEntry takes string name returns integer set InstanceBoard_classes = InstanceBoard_classes + 1 set InstanceBoard_nameOfClass[InstanceBoard_classes] = name return InstanceBoard_classes endfunction function init_FloatingText takes nothing returns nothing set ShowInstances_classId = registerNewInstanceEntry(TextTag_classname()) endfunction function initFont takes string path returns nothing set FontArial_paths[33] = path + "char1.blp" set FontArial_paths[46] = path + "char2.blp" set FontArial_paths[35] = path + "char3.blp" set FontArial_paths[36] = path + "char4.blp" set FontArial_paths[37] = path + "char5.blp" set FontArial_paths[38] = path + "char6.blp" set FontArial_paths[39] = path + "char7.blp" set FontArial_paths[40] = path + "char8.blp" set FontArial_paths[41] = path + "char9.blp" set FontArial_paths[42] = path + "char10.blp" set FontArial_paths[43] = path + "char11.blp" set FontArial_paths[44] = path + "char12.blp" set FontArial_paths[45] = path + "char13.blp" set FontArial_paths[46] = path + "char14.blp" set FontArial_paths[47] = path + "char15.blp" set FontArial_paths[48] = path + "char16.blp" set FontArial_paths[49] = path + "char17.blp" set FontArial_paths[50] = path + "char18.blp" set FontArial_paths[51] = path + "char19.blp" set FontArial_paths[52] = path + "char20.blp" set FontArial_paths[53] = path + "char21.blp" set FontArial_paths[54] = path + "char22.blp" set FontArial_paths[55] = path + "char23.blp" set FontArial_paths[56] = path + "char24.blp" set FontArial_paths[57] = path + "char25.blp" set FontArial_paths[58] = path + "char26.blp" set FontArial_paths[59] = path + "char27.blp" set FontArial_paths[60] = path + "char28.blp" set FontArial_paths[61] = path + "char29.blp" set FontArial_paths[62] = path + "char30.blp" set FontArial_paths[46] = path + "char31.blp" set FontArial_paths[64] = path + "char32.blp" set FontArial_paths[65] = path + "char33.blp" set FontArial_paths[66] = path + "char34.blp" set FontArial_paths[67] = path + "char35.blp" set FontArial_paths[68] = path + "char36.blp" set FontArial_paths[69] = path + "char37.blp" set FontArial_paths[70] = path + "char38.blp" set FontArial_paths[71] = path + "char39.blp" set FontArial_paths[72] = path + "char40.blp" set FontArial_paths[73] = path + "char41.blp" set FontArial_paths[74] = path + "char42.blp" set FontArial_paths[75] = path + "char43.blp" set FontArial_paths[76] = path + "char44.blp" set FontArial_paths[77] = path + "char45.blp" set FontArial_paths[78] = path + "char46.blp" set FontArial_paths[79] = path + "char47.blp" set FontArial_paths[80] = path + "char48.blp" set FontArial_paths[81] = path + "char49.blp" set FontArial_paths[82] = path + "char50.blp" set FontArial_paths[83] = path + "char51.blp" set FontArial_paths[84] = path + "char52.blp" set FontArial_paths[85] = path + "char53.blp" set FontArial_paths[86] = path + "char54.blp" set FontArial_paths[87] = path + "char55.blp" set FontArial_paths[88] = path + "char56.blp" set FontArial_paths[89] = path + "char57.blp" set FontArial_paths[90] = path + "char58.blp" set FontArial_paths[91] = path + "char59.blp" set FontArial_paths[46] = path + "char60.blp" set FontArial_paths[93] = path + "char61.blp" set FontArial_paths[94] = path + "char62.blp" set FontArial_paths[95] = path + "char63.blp" set FontArial_paths[96] = path + "char64.blp" set FontArial_paths[97] = path + "char65.blp" set FontArial_paths[98] = path + "char66.blp" set FontArial_paths[99] = path + "char67.blp" set FontArial_paths[100] = path + "char68.blp" set FontArial_paths[101] = path + "char69.blp" set FontArial_paths[102] = path + "char70.blp" set FontArial_paths[103] = path + "char71.blp" set FontArial_paths[104] = path + "char72.blp" set FontArial_paths[105] = path + "char73.blp" set FontArial_paths[106] = path + "char74.blp" set FontArial_paths[107] = path + "char75.blp" set FontArial_paths[108] = path + "char76.blp" set FontArial_paths[109] = path + "char77.blp" set FontArial_paths[110] = path + "char78.blp" set FontArial_paths[111] = path + "char79.blp" set FontArial_paths[112] = path + "char80.blp" set FontArial_paths[113] = path + "char81.blp" set FontArial_paths[114] = path + "char82.blp" set FontArial_paths[115] = path + "char83.blp" set FontArial_paths[116] = path + "char84.blp" set FontArial_paths[117] = path + "char85.blp" set FontArial_paths[118] = path + "char86.blp" set FontArial_paths[119] = path + "char87.blp" set FontArial_paths[120] = path + "char88.blp" set FontArial_paths[121] = path + "char89.blp" set FontArial_paths[122] = path + "char90.blp" set FontArial_paths[123] = path + "char91.blp" set FontArial_paths[124] = path + "char92.blp" set FontArial_paths[125] = path + "char93.blp" set FontArial_paths[126] = path + "char94.blp" set FontArial_widths[33] = 13 set FontArial_widths[46] = 14 set FontArial_widths[35] = 29 set FontArial_widths[36] = 28 set FontArial_widths[37] = 45 set FontArial_widths[38] = 33 set FontArial_widths[39] = 9 set FontArial_widths[40] = 17 set FontArial_widths[41] = 16 set FontArial_widths[42] = 19 set FontArial_widths[43] = 30 set FontArial_widths[44] = 14 set FontArial_widths[45] = 18 set FontArial_widths[46] = 14 set FontArial_widths[47] = 13 set FontArial_widths[48] = 28 set FontArial_widths[49] = 28 set FontArial_widths[50] = 27 set FontArial_widths[51] = 27 set FontArial_widths[52] = 28 set FontArial_widths[53] = 28 set FontArial_widths[54] = 28 set FontArial_widths[55] = 27 set FontArial_widths[56] = 28 set FontArial_widths[57] = 28 set FontArial_widths[58] = 14 set FontArial_widths[59] = 13 set FontArial_widths[60] = 29 set FontArial_widths[61] = 30 set FontArial_widths[62] = 29 set FontArial_widths[46] = 14 set FontArial_widths[64] = 51 set FontArial_widths[65] = 33 set FontArial_widths[66] = 34 set FontArial_widths[67] = 35 set FontArial_widths[68] = 36 set FontArial_widths[69] = 33 set FontArial_widths[70] = 30 set FontArial_widths[71] = 39 set FontArial_widths[72] = 36 set FontArial_widths[73] = 14 set FontArial_widths[74] = 24 set FontArial_widths[75] = 33 set FontArial_widths[76] = 28 set FontArial_widths[77] = 42 set FontArial_widths[78] = 36 set FontArial_widths[79] = 38 set FontArial_widths[80] = 33 set FontArial_widths[81] = 39 set FontArial_widths[82] = 36 set FontArial_widths[83] = 34 set FontArial_widths[84] = 30 set FontArial_widths[85] = 36 set FontArial_widths[86] = 32 set FontArial_widths[87] = 46 set FontArial_widths[88] = 32 set FontArial_widths[89] = 32 set FontArial_widths[90] = 30 set FontArial_widths[91] = 13 set FontArial_widths[46] = 14 set FontArial_widths[93] = 13 set FontArial_widths[94] = 23 set FontArial_widths[95] = 27 set FontArial_widths[96] = 17 set FontArial_widths[97] = 28 set FontArial_widths[98] = 28 set FontArial_widths[99] = 25 set FontArial_widths[100] = 28 set FontArial_widths[101] = 28 set FontArial_widths[102] = 15 set FontArial_widths[103] = 28 set FontArial_widths[104] = 27 set FontArial_widths[105] = 11 set FontArial_widths[106] = 7 set FontArial_widths[107] = 25 set FontArial_widths[108] = 11 set FontArial_widths[109] = 41 set FontArial_widths[110] = 27 set FontArial_widths[111] = 28 set FontArial_widths[112] = 28 set FontArial_widths[113] = 28 set FontArial_widths[114] = 17 set FontArial_widths[115] = 25 set FontArial_widths[116] = 14 set FontArial_widths[117] = 28 set FontArial_widths[118] = 24 set FontArial_widths[119] = 35 set FontArial_widths[120] = 24 set FontArial_widths[121] = 24 set FontArial_widths[122] = 25 set FontArial_widths[123] = 16 set FontArial_widths[124] = 14 set FontArial_widths[125] = 16 set FontArial_widths[126] = 29 set FontArial_widths[32] = 20 endfunction function init_FontArial takes nothing returns nothing set FontArial_FONT_HEIGHT = 56 set FontArial_FONT_RESOLUTION = 64 call initFont("Chars\\") endfunction function Preload_classInit takes nothing returns nothing set Preload_initOrder[1] = "Abilitys" set Preload_initOrder[2] = "Units" set Preload_initOrder[3] = "Items" set Preload_initOrder[4] = "Destructables" set Preload_initOrder[5] = "Buffs" set Preload_initOrder[9] = "Trackables" set Preload_initOrder[6] = "CreateDummyItems" endfunction function ClassInit_helper takes nothing returns boolean call Preload_classInit() return true endfunction function alloc_Closure_45 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 716 return this_69 endfunction function alloc_Closure_46 takes nothing returns integer local integer this_69 if Action_firstFree == 0 then set Action_maxIndex = Action_maxIndex + 1 set this_69 = Action_maxIndex else set Action_firstFree = Action_firstFree - 1 set this_69 = Action_nextFree[Action_firstFree] endif set Action_typeId[this_69] = 695 return this_69 endfunction function alloc_Closure_47 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 750 return this_69 endfunction function alloc_Closure_48 takes nothing returns integer local integer this_69 if CallbackPeriodic_firstFree == 0 then set CallbackPeriodic_maxIndex = CallbackPeriodic_maxIndex + 1 set this_69 = CallbackPeriodic_maxIndex else set CallbackPeriodic_firstFree = CallbackPeriodic_firstFree - 1 set this_69 = CallbackPeriodic_nextFree[CallbackPeriodic_firstFree] endif set CallbackPeriodic_typeId[this_69] = 747 return this_69 endfunction function alloc_Closure_49 takes nothing returns integer local integer this_69 if CallbackSingle_firstFree == 0 then set CallbackSingle_maxIndex = CallbackSingle_maxIndex + 1 set this_69 = CallbackSingle_maxIndex else set CallbackSingle_firstFree = CallbackSingle_firstFree - 1 set this_69 = CallbackSingle_nextFree[CallbackSingle_firstFree] endif set CallbackSingle_typeId[this_69] = 718 return this_69 endfunction function CallbackPeriodic_start takes integer this_69, real time returns nothing set CallbackPeriodic_t[this_69] = getTimer() call timer_setData(CallbackPeriodic_t[this_69], this_69) call timer_startPeriodic(CallbackPeriodic_t[this_69], time, ref_function_CallbackPeriodic_staticCallback) endfunction function dispatch_CallbackPeriodic_start takes integer this_69, real time returns nothing if CallbackPeriodic_typeId[this_69] == 0 then if this_69 == 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_69, time) endfunction function doPeriodically takes real time, integer cb returns nothing call dispatch_CallbackPeriodic_start(cb, time) endfunction function alloc_HashList takes nothing returns integer local integer this_69 if HashList_firstFree == 0 then set HashList_maxIndex = HashList_maxIndex + 1 set this_69 = HashList_maxIndex else set HashList_firstFree = HashList_firstFree - 1 set this_69 = HashList_nextFree[HashList_firstFree] endif set HashList_typeId[this_69] = 698 return this_69 endfunction function construct_HashList takes integer this_69 returns nothing set HashList_size[this_69] = 0 endfunction function new_HashList takes nothing returns integer local integer this_69 = alloc_HashList() call construct_HashList(this_69) return this_69 endfunction function alloc_Player takes nothing returns integer local integer this_69 if Player_firstFree == 0 then set Player_maxIndex = Player_maxIndex + 1 set this_69 = Player_maxIndex else set Player_firstFree = Player_firstFree - 1 set this_69 = Player_nextFree[Player_firstFree] endif return this_69 endfunction function construct_Player takes integer this_69, player p_2 returns nothing set Player_camSet[this_69] = getTimer() call timer_startPeriodic(Player_camSet[this_69], 1., ref_function_Player_setCam) call timer_setData(Player_camSet[this_69], this_69) call dispatch_HashMap_put(PlayerClass_playerData, playerToIndex(p_2), this_69) endfunction function new_Player takes player p_2 returns integer local integer this_69 = alloc_Player() call construct_Player(this_69, p_2) return this_69 endfunction function alloc_SimpleEvent takes nothing returns integer local integer this_69 if Event_firstFree == 0 then set Event_maxIndex = Event_maxIndex + 1 set this_69 = Event_maxIndex else set Event_firstFree = Event_firstFree - 1 set this_69 = Event_nextFree[Event_firstFree] endif set Event_typeId[this_69] = 684 return this_69 endfunction function construct_SimpleEvent takes integer this_69 returns nothing call construct_Event(this_69) endfunction function new_SimpleEvent takes nothing returns integer local integer this_69 = alloc_SimpleEvent() call construct_SimpleEvent(this_69) return this_69 endfunction function onPreload takes string name, integer action returns nothing call dispatch_HashMap_put(PreloadSystem_preloadActions, StringHash(name), action) endfunction function trigger_registerPlayerChatEvent takes trigger this_69, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns nothing call TriggerRegisterPlayerChatEvent(this_69, whichPlayer, chatMessageToDetect, exactMatchOnly) endfunction function init_GameStart takes nothing returns nothing local trigger receiver = CreateTrigger() local playercolor red local playercolor green local integer i local trigger blub local integer clVar local integer clVar_2 local integer clVar_3 local integer wurst__iterator1 local player p_2 local trigger receiver_2 local integer clVar_4 local integer shopB_2 local integer scoreB_2 local integer guideB_2 local integer statsB_2 local integer shopT1_2 local integer shopT2_2 local integer shopT3_2 local integer shopT7_2 local integer shopT8_2 local integer shopT9_2 local integer shopOb_2 local integer scoreOb_2 local integer guideOb_2 local integer statsOb_2 local integer shopPleft_2 local integer shopPmiddle_2 local integer shopPleftBot_2 local integer shopPleftBot2_2 local integer pickablesPane_2 local integer pickedHeroPane_2 local integer pickedAbilityPane_2 local integer shop1_2 local integer buttonLayerShop01_2 local integer shop2_2 local integer buttonLayerShop02_2 local integer shop3_2 local integer buttonLayerShop03_2 local integer shop4_2 local integer buttonLayerShop04_2 local integer shop5_2 local integer buttonLayerShop05_2 local integer shop6_2 local integer buttonLayerShop06_2 local integer shop7_2 local integer buttonLayerShop07_2 local integer shop8_2 local integer buttonLayerShop08_2 local integer shop9_2 local integer buttonLayerShop09_2 local integer shop10_2 local integer buttonLayerShop10_2 local integer shop11_2 local integer buttonLayerShop11_2 local integer shop12_2 local integer buttonLayerShop12_2 local integer shop13_2 local integer buttonLayerShop13_2 local integer shop14_2 local integer buttonLayerShop14_2 local integer shop15_2 local integer buttonLayerShop15_2 local integer shop16_2 local integer buttonLayerShop16_2 local integer shop17_2 local integer buttonLayerShop17_2 local integer shop18_2 local integer buttonLayerShop18_2 local integer shop19_2 local integer buttonLayerShop19_2 local integer shop20_2 local integer buttonLayerShop20_2 local integer picked1_2 local integer picked2_2 local integer picked3_2 local integer picked4_2 local integer picked5_2 local integer picked6_2 local integer picked7_2 local integer picked8_2 local integer picked9_2 local integer picked10_2 local integer picked11_2 local integer picked12_2 local integer pickable1_2 local integer pickable2_2 local integer pickable3_2 local integer pickable4_2 local integer pickable5_2 local integer pickable6_2 local integer pickable7_2 local integer pickable8_2 local integer pickable9_2 local integer pickable10_2 local integer pickable11_2 local integer pickable12_2 local integer pickability1_2 local integer pickability2_2 local integer pickability3_2 local integer pickability4_2 local integer pickability5_2 local integer pickability6_2 local integer abilityUpgrade1_2 local integer abilityUpgrade3_2 local integer abilityUpgrade6_2 local integer abilityUpgrade9_2 local integer abilityUpgradeU_2 local integer buttonLayerShopBuy_2 local integer buttonLayerShopSell_2 local integer shop24_2 local integer shop25_2 local integer shop26_2 local integer shop27_2 local integer shop28_2 local integer shop29_2 local integer shop30_2 local integer shop31_2 local integer shop32_2 local integer buttonLayerShop32_2 local integer buttonLayerCateAgr_2 local integer buttonLayerCateDef_2 local integer buttonLayerCateUti_2 local integer arrow1_2 local integer arrow2_2 local integer arrow3_2 local integer arrow4_2 local integer arrow5_2 local integer arrow6_2 local integer arrow7_2 local integer arrow8_2 local integer arrow9_2 local integer arrow10_2 local integer arrow11_2 local integer model1_2 local integer playerName1_2 local integer playerName2_2 local integer playerName3_2 local integer playerName4_2 local integer playerName5_2 local integer playerName6_2 local integer playerName7_2 local integer playerName8_2 local integer playerName9_2 local integer playerName10_2 local integer playerName11_2 local integer playerName12_2 local integer clVar_5 local integer temp call trigger_addAction(receiver, ref_function_setCallLimit) set GameStart_testt = receiver call CreateGroup() call new_HashList() set GameStart_uList = new_LinkedList() set GameStart_shopWindow = new_Window() set GameStart_scoreWindow = new_Window() set GameStart_guideWindow = new_Window() set GameStart_statsWindow = new_Window() call new_Window() set red = GetPlayerColor(Player(0)) set green = GetPlayerColor(Player(6)) set i = 0 loop exitwhen i > 11 if i < 6 then call SetPlayerColor(Player(i), green) else call SetPlayerColor(Player(i), red) endif if GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(i)) == MAP_CONTROL_USER then call dispatch_LinkedList_add(Setup_allPlayers, playerToIndex(Player(i))) call SetPlayerAbilityAvailable(Player(i), 1514238056, false) call SetPlayerAbilityAvailable(Player(i), 1514234228, false) call SetPlayerAbilityAvailable(Player(i), 1514238836, false) call SetPlayerAbilityAvailable(Player(i), 1514238819, false) endif set i = i + 1 endloop call timer_startPeriodic(getTimer(), 0.5, ref_function_Dot_loopList) call timer_startPeriodic(getTimer(), 0.03, ref_function_callKnockback) set blub = CreateTrigger() call trigger_addAction(blub, ref_function_camTest) call EnablePreSelect(false, false) set clVar = alloc_Closure_49() call nullTimer(clVar) set clVar_2 = alloc_Closure_45() call doAfter(5., clVar_2) set clVar_3 = alloc_Closure_48() call doPeriodically(0.5, clVar_3) set wurst__iterator1 = dispatch_LinkedList_iterator(Setup_allPlayers) loop exitwhen not dispatch_LLIterator_hasNext(wurst__iterator1) set p_2 = playerFromIndex(dispatch_LLIterator_next(wurst__iterator1)) call new_Player(p_2) endloop call dispatch_LLIterator_close(wurst__iterator1) call trigger_registerPlayerChatEvent(GameStart_testt, Player(0), "", false) set receiver_2 = CreateTrigger() call trigger_addAction(receiver_2, ref_function_onEsc) call TriggerRegisterPlayerEventEndCinematic(receiver_2, Player(0)) set Preload_maxProgress = 10.015 set Preload_progress = 0. set Preload_preloadStatus = 1 set Preload_preloadEnd = new_SimpleEvent() set Preload_showProgress = true set Preload_loopCounter = 0 call ClassInit_helper() set temp = Preload_preloadEnd set clVar_4 = alloc_Closure_46() call dispatch_Event_addAction(temp, clVar_4) set shopB_2 = 0 set scoreB_2 = 0 set guideB_2 = 0 set statsB_2 = 0 set shopT1_2 = 0 set shopT2_2 = 0 set shopT3_2 = 0 set shopT7_2 = 0 set shopT8_2 = 0 set shopT9_2 = 0 set shopOb_2 = 0 set scoreOb_2 = 0 set guideOb_2 = 0 set statsOb_2 = 0 set shopPleft_2 = 0 set shopPmiddle_2 = 0 set shopPleftBot_2 = 0 set shopPleftBot2_2 = 0 set pickablesPane_2 = 0 set pickedHeroPane_2 = 0 set pickedAbilityPane_2 = 0 set shop1_2 = 0 set buttonLayerShop01_2 = 0 set shop2_2 = 0 set buttonLayerShop02_2 = 0 set shop3_2 = 0 set buttonLayerShop03_2 = 0 set shop4_2 = 0 set buttonLayerShop04_2 = 0 set shop5_2 = 0 set buttonLayerShop05_2 = 0 set shop6_2 = 0 set buttonLayerShop06_2 = 0 set shop7_2 = 0 set buttonLayerShop07_2 = 0 set shop8_2 = 0 set buttonLayerShop08_2 = 0 set shop9_2 = 0 set buttonLayerShop09_2 = 0 set shop10_2 = 0 set buttonLayerShop10_2 = 0 set shop11_2 = 0 set buttonLayerShop11_2 = 0 set shop12_2 = 0 set buttonLayerShop12_2 = 0 set shop13_2 = 0 set buttonLayerShop13_2 = 0 set shop14_2 = 0 set buttonLayerShop14_2 = 0 set shop15_2 = 0 set buttonLayerShop15_2 = 0 set shop16_2 = 0 set buttonLayerShop16_2 = 0 set shop17_2 = 0 set buttonLayerShop17_2 = 0 set shop18_2 = 0 set buttonLayerShop18_2 = 0 set shop19_2 = 0 set buttonLayerShop19_2 = 0 set shop20_2 = 0 set buttonLayerShop20_2 = 0 set picked1_2 = 0 set picked2_2 = 0 set picked3_2 = 0 set picked4_2 = 0 set picked5_2 = 0 set picked6_2 = 0 set picked7_2 = 0 set picked8_2 = 0 set picked9_2 = 0 set picked10_2 = 0 set picked11_2 = 0 set picked12_2 = 0 set pickable1_2 = 0 set pickable2_2 = 0 set pickable3_2 = 0 set pickable4_2 = 0 set pickable5_2 = 0 set pickable6_2 = 0 set pickable7_2 = 0 set pickable8_2 = 0 set pickable9_2 = 0 set pickable10_2 = 0 set pickable11_2 = 0 set pickable12_2 = 0 set pickability1_2 = 0 set pickability2_2 = 0 set pickability3_2 = 0 set pickability4_2 = 0 set pickability5_2 = 0 set pickability6_2 = 0 set abilityUpgrade1_2 = 0 set abilityUpgrade3_2 = 0 set abilityUpgrade6_2 = 0 set abilityUpgrade9_2 = 0 set abilityUpgradeU_2 = 0 set buttonLayerShopBuy_2 = 0 set buttonLayerShopSell_2 = 0 set shop24_2 = 0 set shop25_2 = 0 set shop26_2 = 0 set shop27_2 = 0 set shop28_2 = 0 set shop29_2 = 0 set shop30_2 = 0 set shop31_2 = 0 set shop32_2 = 0 set buttonLayerShop32_2 = 0 set buttonLayerCateAgr_2 = 0 set buttonLayerCateDef_2 = 0 set buttonLayerCateUti_2 = 0 set arrow1_2 = 0 set arrow2_2 = 0 set arrow3_2 = 0 set arrow4_2 = 0 set arrow5_2 = 0 set arrow6_2 = 0 set arrow7_2 = 0 set arrow8_2 = 0 set arrow9_2 = 0 set arrow10_2 = 0 set arrow11_2 = 0 set model1_2 = 0 set playerName1_2 = 0 set playerName2_2 = 0 set playerName3_2 = 0 set playerName4_2 = 0 set playerName5_2 = 0 set playerName6_2 = 0 set playerName7_2 = 0 set playerName8_2 = 0 set playerName9_2 = 0 set playerName10_2 = 0 set playerName11_2 = 0 set playerName12_2 = 0 set clVar_5 = alloc_Closure_47() set shopT1[clVar_5] = shopT1_2 set shopT3[clVar_5] = shopT3_2 set shopT2[clVar_5] = shopT2_2 set shopT7[clVar_5] = shopT7_2 set shopT8[clVar_5] = shopT8_2 set shopT9[clVar_5] = shopT9_2 set buttonLayerShop01[clVar_5] = buttonLayerShop01_2 set buttonLayerShop02[clVar_5] = buttonLayerShop02_2 set buttonLayerShop03[clVar_5] = buttonLayerShop03_2 set buttonLayerShop04[clVar_5] = buttonLayerShop04_2 set buttonLayerShop05[clVar_5] = buttonLayerShop05_2 set buttonLayerShop06[clVar_5] = buttonLayerShop06_2 set buttonLayerShop07[clVar_5] = buttonLayerShop07_2 set buttonLayerShop08[clVar_5] = buttonLayerShop08_2 set buttonLayerShop09[clVar_5] = buttonLayerShop09_2 set buttonLayerShop10[clVar_5] = buttonLayerShop10_2 set buttonLayerShop11[clVar_5] = buttonLayerShop11_2 set buttonLayerShop12[clVar_5] = buttonLayerShop12_2 set buttonLayerShop13[clVar_5] = buttonLayerShop13_2 set buttonLayerShop14[clVar_5] = buttonLayerShop14_2 set buttonLayerShop15[clVar_5] = buttonLayerShop15_2 set buttonLayerShop16[clVar_5] = buttonLayerShop16_2 set buttonLayerShop17[clVar_5] = buttonLayerShop17_2 set buttonLayerShop18[clVar_5] = buttonLayerShop18_2 set buttonLayerShop19[clVar_5] = buttonLayerShop19_2 set buttonLayerShop20[clVar_5] = buttonLayerShop20_2 set buttonLayerShop32[clVar_5] = buttonLayerShop32_2 set shopB[clVar_5] = shopB_2 set shopOb[clVar_5] = shopOb_2 set scoreB[clVar_5] = scoreB_2 set scoreOb[clVar_5] = scoreOb_2 set guideB[clVar_5] = guideB_2 set guideOb[clVar_5] = guideOb_2 set statsB[clVar_5] = statsB_2 set statsOb[clVar_5] = statsOb_2 set arrow1[clVar_5] = arrow1_2 set arrow2[clVar_5] = arrow2_2 set arrow3[clVar_5] = arrow3_2 set arrow4[clVar_5] = arrow4_2 set arrow5[clVar_5] = arrow5_2 set arrow6[clVar_5] = arrow6_2 set arrow7[clVar_5] = arrow7_2 set arrow8[clVar_5] = arrow8_2 set arrow9[clVar_5] = arrow9_2 set arrow10[clVar_5] = arrow10_2 set arrow11[clVar_5] = arrow11_2 set shopPmiddle[clVar_5] = shopPmiddle_2 set shopPleft[clVar_5] = shopPleft_2 set shopPleftBot[clVar_5] = shopPleftBot_2 set shopPleftBot2[clVar_5] = shopPleftBot2_2 set shop1[clVar_5] = shop1_2 set shop2[clVar_5] = shop2_2 set shop3[clVar_5] = shop3_2 set shop4[clVar_5] = shop4_2 set shop5[clVar_5] = shop5_2 set shop6[clVar_5] = shop6_2 set shop7[clVar_5] = shop7_2 set shop8[clVar_5] = shop8_2 set shop9[clVar_5] = shop9_2 set shop10[clVar_5] = shop10_2 set shop11[clVar_5] = shop11_2 set shop12[clVar_5] = shop12_2 set shop13[clVar_5] = shop13_2 set shop14[clVar_5] = shop14_2 set shop15[clVar_5] = shop15_2 set shop16[clVar_5] = shop16_2 set shop17[clVar_5] = shop17_2 set shop18[clVar_5] = shop18_2 set shop19[clVar_5] = shop19_2 set shop20[clVar_5] = shop20_2 set shop24[clVar_5] = shop24_2 set shop25[clVar_5] = shop25_2 set shop26[clVar_5] = shop26_2 set shop27[clVar_5] = shop27_2 set shop28[clVar_5] = shop28_2 set shop29[clVar_5] = shop29_2 set shop30[clVar_5] = shop30_2 set shop31[clVar_5] = shop31_2 set shop32[clVar_5] = shop32_2 set buttonLayerShopBuy[clVar_5] = buttonLayerShopBuy_2 set buttonLayerShopSell[clVar_5] = buttonLayerShopSell_2 set buttonLayerCateAgr[clVar_5] = buttonLayerCateAgr_2 set buttonLayerCateDef[clVar_5] = buttonLayerCateDef_2 set buttonLayerCateUti[clVar_5] = buttonLayerCateUti_2 set picked1[clVar_5] = picked1_2 set picked2[clVar_5] = picked2_2 set picked3[clVar_5] = picked3_2 set picked4[clVar_5] = picked4_2 set picked5[clVar_5] = picked5_2 set picked6[clVar_5] = picked6_2 set picked7[clVar_5] = picked7_2 set picked8[clVar_5] = picked8_2 set picked9[clVar_5] = picked9_2 set picked10[clVar_5] = picked10_2 set picked11[clVar_5] = picked11_2 set picked12[clVar_5] = picked12_2 set pickable1[clVar_5] = pickable1_2 set pickable2[clVar_5] = pickable2_2 set pickable3[clVar_5] = pickable3_2 set pickable4[clVar_5] = pickable4_2 set pickable5[clVar_5] = pickable5_2 set pickable6[clVar_5] = pickable6_2 set pickable7[clVar_5] = pickable7_2 set pickable8[clVar_5] = pickable8_2 set pickable9[clVar_5] = pickable9_2 set pickable10[clVar_5] = pickable10_2 set pickable11[clVar_5] = pickable11_2 set pickable12[clVar_5] = pickable12_2 set pickability1[clVar_5] = pickability1_2 set pickability2[clVar_5] = pickability2_2 set pickability3[clVar_5] = pickability3_2 set pickability4[clVar_5] = pickability4_2 set pickability5[clVar_5] = pickability5_2 set pickability6[clVar_5] = pickability6_2 set abilityUpgrade1[clVar_5] = abilityUpgrade1_2 set abilityUpgrade3[clVar_5] = abilityUpgrade3_2 set abilityUpgrade6[clVar_5] = abilityUpgrade6_2 set abilityUpgrade9[clVar_5] = abilityUpgrade9_2 set abilityUpgradeU[clVar_5] = abilityUpgradeU_2 set pickablesPane[clVar_5] = pickablesPane_2 set pickedHeroPane[clVar_5] = pickedHeroPane_2 set pickedAbilityPane[clVar_5] = pickedAbilityPane_2 set model1[clVar_5] = model1_2 set playerName1[clVar_5] = playerName1_2 set playerName2[clVar_5] = playerName2_2 set playerName3[clVar_5] = playerName3_2 set playerName4[clVar_5] = playerName4_2 set playerName5[clVar_5] = playerName5_2 set playerName6[clVar_5] = playerName6_2 set playerName7[clVar_5] = playerName7_2 set playerName8[clVar_5] = playerName8_2 set playerName9[clVar_5] = playerName9_2 set playerName10[clVar_5] = playerName10_2 set playerName11[clVar_5] = playerName11_2 set playerName12[clVar_5] = playerName12_2 call onPreload("Menu", clVar_5) set receiver = null set red = null set green = null set blub = null set p_2 = null set receiver_2 = null endfunction function init_GameTimer takes nothing returns nothing set GameTimer_gameTimer = CreateTimer() call timer_start(GameTimer_gameTimer, 100000., null) call timer_startPeriodic(CreateTimer(), Basics_ANIMATION_PERIOD, ref_function_closure_impl_12) endfunction function init_HandleCounter takes nothing returns nothing set HandleCounter_board = null call getTimer() call Player(0) call Player(1) call Player(2) set HandleCounter_stackEndTreshold = 15 set HandleCounter_clock = getTimer() set HandleCounter_seconds = 0 set HandleCounter_maxHandleCount = 0 call TimerStart(HandleCounter_clock, 1., true, ref_function_updateTime) endfunction function init_HashList takes nothing returns nothing set HashList_ht = InitHashtable() endfunction function init_HashMap takes nothing returns nothing set HashMap_ht = InitHashtable() endfunction function init_Helper takes nothing returns nothing local integer i set Helper_rot45 = 0.707106 set i = 0 loop exitwhen i > 31 call R2I(Pow(2., I2R(i))) set i = i + 1 endloop endfunction function init_HeroBar takes nothing returns nothing local timer receiver local timer receiver_2 set HeroBar_hpColorDead = "|c00003300" set HeroBar_shieldColor = "|c00999999" set HeroBar_mpColor = "|c000000AA" set HeroBar_mpColorDead = "|c00000022" set HeroBar_endColor = "|r" set HeroBar_marker = "|c00000000|||r" set HeroBar_bar = "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" set HeroBar_realBarCount = 125 set HeroBar_fakeBarCount = 250 set HeroBar_seperateAt = 250 set receiver = getTimer() call timer_startPeriodic(receiver, 0.01, ref_function_Bar_updatePos) set receiver_2 = getTimer() call timer_startPeriodic(receiver_2, 0.25, ref_function_Bar_updateVision) set LinkedListModule_first_2 = 0 set receiver = null set receiver_2 = null endfunction function init_HeroClass takes nothing returns nothing local timer receiver local trigger receiver_2 set Hero_toMove = new_LinkedList() set Hero_heroOfPlayer = new_HashMap() set receiver = getTimer() call timer_startPeriodic(receiver, 0.01, ref_function_closure_impl_13) set receiver_2 = CreateTrigger() call trigger_addAction(receiver_2, ref_function_GetOrders_callOnOrder) set GetOrders_orderDetect = receiver_2 set receiver = null set receiver_2 = null endfunction function init_HeroTypes takes nothing returns nothing set HeroTypes_heros = new_HashMap() set HeroType_heroAbis = "" endfunction function init_Icon takes nothing returns nothing set Icon_animationSpeedHover = 5. set Icon_animationSpeedHit = 8. set Icon_dummyIcon = 1231253358 endfunction function init_IconType takes nothing returns nothing set IconType_iconMap1 = new_HashMap() set IconType_iconMap2 = new_HashMap() set IconType_restColor = 0.3 endfunction function init_InstanceBoard takes nothing returns nothing set InstanceBoard_classes = 0 call InitHashtable() set InstanceBoard_mb = null call timer_start(getTimer(), 0.0, ref_function_createMultiboard) endfunction function unit_setPos takes unit this_69, real x, real y returns nothing call SetUnitPosition(this_69, x, y) endfunction function init_InstantDummyCaster takes nothing returns nothing set InstantDummyCaster_DUMMY_CASTER_UNIT_ID = 2019778931 set InstantDummyCaster_caster = createUnit(Basics_DUMMY_PLAYER, InstantDummyCaster_DUMMY_CASTER_UNIT_ID, 0., 0., 0.) call unit_setPos(InstantDummyCaster_caster, 32256., 32256.) endfunction function ItemType_classInit takes nothing returns boolean return true endfunction function init_ItemClass takes nothing returns nothing call new_HashMap() call ItemType_classInit() endfunction function init_Lightning takes nothing returns nothing set Lightning_FINGER_OF_DEATH = "AFOD" endfunction function init_LinkedListModule takes nothing returns nothing endfunction function init_MagicFunctions takes nothing returns nothing set MagicFunctions_compiletime = false endfunction function rect_getMaxX takes rect this_69 returns real return GetRectMaxX(this_69) endfunction function rect_getMaxY takes rect this_69 returns real return GetRectMaxY(this_69) endfunction function rect_getMinX takes rect this_69 returns real return GetRectMinX(this_69) endfunction function rect_getMinY takes rect this_69 returns real return GetRectMinY(this_69) endfunction function region_addRect takes region this_69, rect r returns nothing call RegionAddRect(this_69, r) endfunction function init_MapBounds takes nothing returns nothing local region receiver local region receiver_2 local real temp_MapBounds_playableMin_x local real temp_MapBounds_playableMin_y local real temp_MapBounds_playableMax_x local real temp_MapBounds_playableMax_y local real temp_MapBounds_boundMin_x local real temp_MapBounds_boundMin_y local real temp_MapBounds_boundMax_x local real temp_MapBounds_boundMax_y set MapBounds_playableMapRect = GetPlayableMapRect() set receiver = CreateRegion() call region_addRect(receiver, MapBounds_playableMapRect) set MapBounds_boundRect = GetWorldBounds() set receiver_2 = CreateRegion() call region_addRect(receiver_2, MapBounds_boundRect) set temp_MapBounds_playableMin_x = rect_getMinX(MapBounds_playableMapRect) set temp_MapBounds_playableMin_y = rect_getMinY(MapBounds_playableMapRect) set MapBounds_playableMin_x = temp_MapBounds_playableMin_x set MapBounds_playableMin_y = temp_MapBounds_playableMin_y set temp_MapBounds_playableMax_x = rect_getMaxX(MapBounds_playableMapRect) set temp_MapBounds_playableMax_y = rect_getMaxY(MapBounds_playableMapRect) set MapBounds_playableMax_x = temp_MapBounds_playableMax_x set MapBounds_playableMax_y = temp_MapBounds_playableMax_y set temp_MapBounds_boundMin_x = rect_getMinX(MapBounds_boundRect) set temp_MapBounds_boundMin_y = rect_getMinY(MapBounds_boundRect) set MapBounds_boundMin_x = temp_MapBounds_boundMin_x set MapBounds_boundMin_y = temp_MapBounds_boundMin_y set temp_MapBounds_boundMax_x = rect_getMaxX(MapBounds_boundRect) set temp_MapBounds_boundMax_y = rect_getMaxY(MapBounds_boundRect) set MapBounds_boundMax_x = temp_MapBounds_boundMax_x set MapBounds_boundMax_y = temp_MapBounds_boundMax_y 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) set receiver = null set receiver_2 = null endfunction function init_Maths takes nothing returns nothing set Maths_DEGTORAD = 0.017453293 set Maths_RADTODEG = 57.295779513 endfunction function Widget_classInit takes nothing returns nothing local integer i = 1 loop exitwhen i > 8 set Widget_backgroundTexture[i] = "Hintergrund" + int_toString(i) + ".blp" set i = i + 1 endloop endfunction function ClassInit_helper_2 takes nothing returns boolean call Widget_classInit() return true endfunction function alloc_Closure_50 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 755 return this_69 endfunction function alloc_Stack takes nothing returns integer local integer this_69 if Stack_firstFree == 0 then set Stack_maxIndex = Stack_maxIndex + 1 set this_69 = Stack_maxIndex else set Stack_firstFree = Stack_firstFree - 1 set this_69 = Stack_nextFree[Stack_firstFree] endif set Stack_typeId[this_69] = 869 return this_69 endfunction function construct_Stack takes integer this_69 returns nothing set Stack_size[this_69] = 0 set Stack_dummy[this_69] = new_SEntry(0, 0) set Stack_top[this_69] = Stack_dummy[this_69] endfunction function new_Stack takes nothing returns integer local integer this_69 = alloc_Stack() call construct_Stack(this_69) return this_69 endfunction function init_Menu takes nothing returns nothing local integer i local integer w_2 local integer clVar call ClassInit_helper_2() set i = 0 loop exitwhen i > 11 set WindowManager_currentWindow[i] = new_Stack() set i = i + 1 endloop set w_2 = new_ElementLoop(1, 1, Setup_menuWidth, Setup_menuHeight) set clVar = alloc_Closure_50() set w[clVar] = w_2 call onPreload("Trackables", clVar) endfunction function init_Model takes nothing returns nothing set Model_dummyID = 1969841269 endfunction function alloc_ArrayQueue takes nothing returns integer local integer this_69 if ArrayQueue_firstFree == 0 then set ArrayQueue_maxIndex = ArrayQueue_maxIndex + 1 set this_69 = ArrayQueue_maxIndex else set ArrayQueue_firstFree = ArrayQueue_firstFree - 1 set this_69 = ArrayQueue_nextFree[ArrayQueue_firstFree] endif set ArrayQueue_typeId[this_69] = 776 return this_69 endfunction function construct_ArrayQueue takes integer this_69 returns nothing set ArrayQueue_fp[this_69] = 0 set ArrayQueue_rp[this_69] = 0 set ArrayQueue_size[this_69] = 0 endfunction function new_ArrayQueue takes nothing returns integer local integer this_69 = alloc_ArrayQueue() call construct_ArrayQueue(this_69) return this_69 endfunction function init_NewDummyRecycler takes nothing returns nothing local integer i local integer temp local integer j local integer temp_2 set NewDummyRecycler_DIFFERENT_ANGLES = 8 set NewDummyRecycler_ANGLE_DEGREE = 360 * 1. / NewDummyRecycler_DIFFERENT_ANGLES set NewDummyRecycler_SAVED_UNITS_PER_ANGLE = 6 set DelayNode_t = CreateTimer() set DelayNode_first = 0 set DelayNode_last = 0 set i = 0 set temp = NewDummyRecycler_DIFFERENT_ANGLES - 1 loop exitwhen i > temp set DummyRecycler_angleQueues[i] = new_ArrayQueue() set j = 0 set temp_2 = NewDummyRecycler_SAVED_UNITS_PER_ANGLE - 1 loop exitwhen j > temp_2 call dispatch_ArrayQueue_enqueue(DummyRecycler_angleQueues[i], createDummy(MapBounds_boundMax_x, MapBounds_boundMax_y, Basics_DUMMY_PLAYER, real_asAngleDegrees(i * NewDummyRecycler_ANGLE_DEGREE))) set j = j + 1 endloop set i = i + 1 endloop endfunction function initHelper takes nothing returns boolean local integer i = 0 loop exitwhen i > 2 set ObjectIdGenerator_id[i] = 48 set i = i + 1 endloop return true endfunction function init_ObjectIdGenerator takes nothing returns nothing set ObjectIdGenerator_heroPrefix = 87 set ObjectIdGenerator_nonheroPrefix = 37 set ObjectIdGenerator_helperActivator = initHelper() endfunction function init_ObjectIds takes nothing returns nothing set ObjectIds_charMap = ".................................!.#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[.]^_`abcdefghijklmnopqrstuvwxyz{|}~................................................................................................................................." endfunction function init_OrderHandling takes nothing returns nothing set OrderHandling_smartId = 851971 set OrderHandling_stopId = 852529 set OrderHandling_attackId = 852662 set OrderHandling_scoreboardId = 852185 endfunction function init_Pane takes nothing returns nothing local integer temp_Pane_tileDimensions_x local integer temp_Pane_tileDimensions_y local real temp_Pane_sizeFix_x local real temp_Pane_sizeFix_y local real temp_Pane_posFixBot_x local real temp_Pane_posFixBot_y local real temp_Pane_posFixTop_x local real temp_Pane_posFixTop_y local real temp_Pane_posFixRight_x local real temp_Pane_posFixRight_y local real temp_Pane_posFixLeft_x local real temp_Pane_posFixLeft_y set Pane_tileSize = 2 set temp_Pane_tileDimensions_x = Pane_tileSize set temp_Pane_tileDimensions_y = Pane_tileSize set Pane_tileDimensions_x = temp_Pane_tileDimensions_x set Pane_tileDimensions_y = temp_Pane_tileDimensions_y set Pane_horizontalSide = "Seite1.blp" set Pane_verticalSide = "Seite2.blp" set Pane_leftBotCorner = "Steinecke1.blp" set Pane_rightBotCorner = "Steinecke4.blp" set Pane_rightTopCorner = "Steinecke3.blp" set Pane_leftTopCorner = "Steinecke2.blp" set temp_Pane_sizeFix_x = 2. set temp_Pane_sizeFix_y = 2. set Pane_sizeFix_x = temp_Pane_sizeFix_x set Pane_sizeFix_y = temp_Pane_sizeFix_y set temp_Pane_posFixBot_x = - (0.5 / (4 * 1. / Pane_tileSize)) set temp_Pane_posFixBot_y = - (26. / (4 * 1. / Pane_tileSize)) set Pane_posFixBot_x = temp_Pane_posFixBot_x set Pane_posFixBot_y = temp_Pane_posFixBot_y set temp_Pane_posFixTop_x = - (0.5 / (4 * 1. / Pane_tileSize)) set temp_Pane_posFixTop_y = 40. / (4 * 1. / Pane_tileSize) set Pane_posFixTop_x = temp_Pane_posFixTop_x set Pane_posFixTop_y = temp_Pane_posFixTop_y set temp_Pane_posFixRight_x = 32. / (4 * 1. / Pane_tileSize) set temp_Pane_posFixRight_y = 0. / (4 * 1. / Pane_tileSize) set Pane_posFixRight_x = temp_Pane_posFixRight_x set Pane_posFixRight_y = temp_Pane_posFixRight_y set temp_Pane_posFixLeft_x = - (32. / (4 * 1. / Pane_tileSize)) set temp_Pane_posFixLeft_y = 0. set Pane_posFixLeft_x = temp_Pane_posFixLeft_x set Pane_posFixLeft_y = temp_Pane_posFixLeft_y endfunction function alloc_Closure_51 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 757 return this_69 endfunction function init_PathArray takes nothing returns nothing local integer clVar = alloc_Closure_51() call onPreload("PathArray", clVar) endfunction function init_Player takes nothing returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call Player(i) set i = i + 1 endloop endfunction function init_PlayerClass takes nothing returns nothing set PlayerClass_playerData = new_HashMap() call SetTerrainFogEx(0, 40000., 40000., 0., 0., 0., 0.) call SetCameraField(CAMERA_FIELD_FARZ, 100000., 0.) call FogMaskEnable(false) call FogEnable(false) endfunction function init_PreloadHandler takes nothing returns nothing set PreloadHandler_autoFinish = false set PreloadHandler_dum = CreateUnit(Player(15), Basics_DUMMY_UNIT_ID, 0., 0., 0.) if PreloadHandler_dum == null then call error("PreloadHandler : DUMMY_UNITID (" + idInteger2IdString(Basics_DUMMY_UNIT_ID) + ") not added correctly to the map.") endif if PreloadHandler_autoFinish then call TimerStart(CreateTimer(), 0.0, false, ref_function_finishPreload) endif endfunction function alloc_Closure_52 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 751 return this_69 endfunction function alloc_Closure_53 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 753 return this_69 endfunction function alloc_Closure_54 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 752 return this_69 endfunction function alloc_Closure_55 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 758 return this_69 endfunction function alloc_Closure_56 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 756 return this_69 endfunction function alloc_Closure_57 takes nothing returns integer local integer this_69 if PreloadAction_firstFree == 0 then set PreloadAction_maxIndex = PreloadAction_maxIndex + 1 set this_69 = PreloadAction_maxIndex else set PreloadAction_firstFree = PreloadAction_firstFree - 1 set this_69 = PreloadAction_nextFree[PreloadAction_firstFree] endif set PreloadAction_typeId[this_69] = 754 return this_69 endfunction function init_PreloadSystem takes nothing returns nothing local integer clVar local integer clVar_2 local integer clVar_3 local integer clVar_4 local integer clVar_5 local integer clVar_6 set PreloadSystem_preloadActions = new_HashMap() set PreloadSystem_abilitysToPreload = new_HashList() set PreloadSystem_unitsToPreload = new_HashList() set PreloadSystem_buffsToPreload = new_HashList() set PreloadSystem_itemsToPreload = new_HashList() set PreloadSystem_destructablesToPreload = new_HashList() set PreloadSystem_preloadDummy = CreateUnit(Basics_DUMMY_PLAYER, Basics_DUMMY_UNIT_ID, 0., 0., 0.) set PreloadSystem_abilityLoadTime = 0.003 set PreloadSystem_abilityLoadTimeLvlBonus = 0.003 set PreloadSystem_unitLoadTime = 0.003 set PreloadSystem_buffLoadTime = 0.003 set PreloadSystem_itemLoadTime = 0.003 set PreloadSystem_destructableLoadTime = 0.003 set clVar = alloc_Closure_53() call onPreload("Abilitys", clVar) set clVar_2 = alloc_Closure_55() call onPreload("Units", clVar_2) set clVar_3 = alloc_Closure_52() call onPreload("Buffs", clVar_3) set clVar_4 = alloc_Closure_56() call onPreload("Items", clVar_4) set clVar_5 = alloc_Closure_54() call onPreload("Destructables", clVar_5) set clVar_6 = alloc_Closure_57() call onPreload("CreateDummyItems", clVar_6) endfunction function init_PrintingHelper takes nothing returns nothing local trigger t local integer i set PrintingHelper_DEBUG_MSG_DURATION = 45. set t = CreateTrigger() call trigger_addAction(t, ref_function_switchDebug) set i = 0 loop exitwhen i > 11 set PrintingHelper_wantDebug[i] = false call trigger_registerPlayerChatEvent(t, Player(i), "-d", true) set i = i + 1 endloop set t = null endfunction function init_ProgressBar takes nothing returns nothing endfunction function init_ProgressBarConfig takes nothing returns nothing call Player(PLAYER_NEUTRAL_PASSIVE) endfunction function trigger_addCondition takes trigger this_69, boolexpr condition returns nothing call TriggerAddCondition(this_69, condition) endfunction function init_Pull2 takes nothing returns nothing local trigger t = CreateTrigger() call trigger_addCondition(t, Condition(ref_function_spellCondition)) call trigger_addAction(t, ref_function_spellStart) call trigger_registerAnyUnitEvent(t, EVENT_PLAYER_UNIT_SPELL_CAST) set t = null endfunction function init_RTable takes nothing returns nothing endfunction function alloc_Closure_58 takes nothing returns integer local integer this_69 if Cast_firstFree == 0 then set Cast_maxIndex = Cast_maxIndex + 1 set this_69 = Cast_maxIndex else set Cast_firstFree = Cast_firstFree - 1 set this_69 = Cast_nextFree[Cast_firstFree] endif set Cast_typeId[this_69] = 858 return this_69 endfunction function onUnitCast takes integer abiCode, integer action returns nothing call dispatch_Cast_register(action, abiCode) endfunction function init_RamisHomingMissle takes nothing returns nothing local integer clVar set Missle_missleStartSpeed = 10. set Missle_speedLost = 0.99 set Missle_speedAccel = 10. set Missle_missleRadius = 65. set Missle_knockback = 50. set Missle_knockbackRange = 500. set clVar = alloc_Closure_58() call onUnitCast(1093677105, clVar) endfunction function init_Rect takes nothing returns nothing call new_Table() endfunction function init_Region takes nothing returns nothing call new_Table() endfunction function init_RockThrow takes nothing returns nothing endfunction function init_RunningMazeChecker takes nothing returns nothing endfunction function hashtable_saveBoolean takes hashtable this_69, integer parentKey, integer childKey, boolean value returns nothing call SaveBoolean(this_69, parentKey, childKey, value) endfunction function alloc_DebugFile takes nothing returns integer local integer this_69 if DebugFile_firstFree == 0 then set DebugFile_maxIndex = DebugFile_maxIndex + 1 set this_69 = DebugFile_maxIndex else set DebugFile_firstFree = DebugFile_firstFree - 1 set this_69 = DebugFile_nextFree[DebugFile_firstFree] endif set DebugFile_typeId[this_69] = 697 return this_69 endfunction function construct_DebugFile takes integer this_69, string filename returns nothing set DebugFile_buffer[this_69] = "" set DebugFile_content[this_69] = new_Table() set DebugFile_currentLine[this_69] = 0 set DebugFile_filename[this_69] = filename endfunction function new_DebugFile takes string filename returns integer local integer this_69 = alloc_DebugFile() call construct_DebugFile(this_69, filename) return this_69 endfunction function init_Setup takes nothing returns nothing local real temp_Setup_recycleGraveyard_x local real temp_Setup_recycleGraveyard_y local real temp_Setup_menuStart_x local real temp_Setup_menuStart_y set Setup_maxBonSize = 14 set Setup_attackRaw = 675359024 - 48 set Setup_attackSpeedRaw = 675424560 - 48 set Setup_armorRaw = 675490096 - 48 set Setup_lifeRaw = 675555632 - 48 set Setup_manaRaw = 675621168 - 48 set Setup_agiRaw = 675686704 - 48 set Setup_strRaw = 675752240 - 48 set Setup_intRaw = 675817776 - 48 set Setup_lifeRegRaw = 675883312 - 48 set Setup_manaRegRaw = 675948848 - 48 set Setup_permAttackItemRaw = 1112361264 - 48 set Setup_permAttackRaw = 1112362800 - 48 call new_HashList() call new_HashList() call new_DebugFile("Info") call new_DebugFile("Error") set Setup_debugFile = new_DebugFile("Debug") set Setup_allPlayers = new_LinkedList() set temp_Setup_recycleGraveyard_x = 0. set temp_Setup_recycleGraveyard_y = 0. set Setup_recycleGraveyard_x = temp_Setup_recycleGraveyard_x set Setup_recycleGraveyard_y = temp_Setup_recycleGraveyard_y set temp_Setup_menuStart_x = -2500. set temp_Setup_menuStart_y = -1000. set Setup_menuStart_x = temp_Setup_menuStart_x set Setup_menuStart_y = temp_Setup_menuStart_y set Setup_trackBlacklist = InitHashtable() set Setup_tileSize = 64 set Setup_menuHeight = 22 set Setup_menuWidth = 44 call hashtable_saveBoolean(Setup_trackBlacklist, 1, 1, true) endfunction function init_Spell takes nothing returns nothing set Spell_qSpellId = 852490 set Spell_wSpellId = 852491 set Spell_eSpellId = 852217 set Spell_rSpellId = 852186 set Spell_dSpellId = 852576 set Spell_fSpellId = 852215 set Spell_qLearnId = 852216 set Spell_wLearnId = 852132 set Spell_eLearnId = 852134 set Spell_rLearnId = 852133 set Spell_dLearnId = 852505 set Spell_fLearnId = 852506 endfunction function init_String takes nothing returns nothing set String_charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" set String_numberset = "0123456789" call string_length(String_numberset) call string_length(String_charset) endfunction function init_Table takes nothing returns nothing set Table_ht = InitHashtable() endfunction function init_TempGroups takes nothing returns nothing set TempGroups_ENUM_GROUP = CreateGroup() endfunction function init_Terrain takes nothing returns nothing local real temp_Terrain_tempPos_x local real temp_Terrain_tempPos_y set Terrain_MAX_RANGE = 10. set Terrain_DUMMY_ITEM_ID = 2003790951 set Terrain_tempLoc = Location(0., 0.) set Terrain_dItem = null set Terrain_find = null set Terrain_hidMax = 0 set temp_Terrain_tempPos_x = 0. set temp_Terrain_tempPos_y = 0. set Terrain_tempPos_x = temp_Terrain_tempPos_x set Terrain_tempPos_y = temp_Terrain_tempPos_y set Terrain_find = Rect(0., 0., 128., 128.) set Terrain_dItem = CreateItem(Terrain_DUMMY_ITEM_ID, 0., 0.) call SetItemVisible(Terrain_dItem, false) endfunction function init_Test takes nothing returns nothing endfunction function init_TextSplat takes nothing returns nothing set TextSplat_DISABLE_COLOR_ALPHA = -1 set TextSplat_DISABLE_MAX_WIDTH = 100000000. call getFontWidth(32) endfunction function init_TextTagEx takes nothing returns nothing endfunction function init_TimedEffect takes nothing returns nothing call new_Table() endfunction function init_TimerUtils takes nothing returns nothing set TimerUtils_freeTimersCount = 0 set TimerUtils_timerData = new_Table() set TimerUtils_HELD = 679645218 endfunction function init_ToolTip takes nothing returns nothing set Tooltip_dummyTip = 1231253358 call vec2_op_plus(Setup_menuStart_x, Setup_menuStart_y, element_toVec(20, 30), element_toVec_return_y) endfunction function init_ToolTipTypes takes nothing returns nothing set ToolTipTypes_tipMap = new_HashMap() endfunction function init_Trackable takes nothing returns nothing local trigger receiver local trigger receiver_2 set TrackableEx_doubleClickSpeed = 0.5 set TrackableEx_trackableOwner = new_HashMap() set TrackableEx_trackableObjects = new_HashMap() set receiver = CreateTrigger() call trigger_addAction(receiver, ref_function_closure_impl_10) set TrackableEx_trackTrigger = receiver set receiver_2 = CreateTrigger() call trigger_addAction(receiver_2, ref_function_closure_impl_11) set TrackableEx_clickTrigger = receiver_2 set receiver = null set receiver_2 = null endfunction function init_Trigger takes nothing returns nothing call new_Table() endfunction function init_TypeCasting takes nothing returns nothing set TypeCasting_typecastdata = new_Table() endfunction function Unit_classname takes nothing returns string return "Unit" endfunction function alloc_Event takes nothing returns integer local integer this_69 if Event_firstFree == 0 then set Event_maxIndex = Event_maxIndex + 1 set this_69 = Event_maxIndex else set Event_firstFree = Event_firstFree - 1 set this_69 = Event_nextFree[Event_firstFree] endif set Event_typeId[this_69] = 678 return this_69 endfunction function new_Event takes nothing returns integer local integer this_69 = alloc_Event() call construct_Event(this_69) return this_69 endfunction function init_UnitClass takes nothing returns nothing local trigger receiver set Unit_knockbackFactor = 200000. set receiver = CreateTrigger() call trigger_addAction(receiver, ref_function_Unit_tookDamage) set Unit_damageDetect = receiver set ShowInstances_classId_2 = registerNewInstanceEntry(Unit_classname()) set CreationEvent_create = new_Event() set CreationEvent_dest = new_Event() set UnitClass_knocklist = new_LinkedList() set receiver = null endfunction function alloc_UnitEvent takes nothing returns integer local integer this_69 if Event_firstFree == 0 then set Event_maxIndex = Event_maxIndex + 1 set this_69 = Event_maxIndex else set Event_firstFree = Event_firstFree - 1 set this_69 = Event_nextFree[Event_firstFree] endif set Event_typeId[this_69] = 685 return this_69 endfunction function construct_UnitEvent takes integer this_69 returns nothing call construct_Event(this_69) endfunction function new_UnitEvent takes nothing returns integer local integer this_69 = alloc_UnitEvent() call construct_UnitEvent(this_69) return this_69 endfunction function init_UnitEvents takes nothing returns nothing call new_UnitEvent() endfunction function init_UnitIndexer takes nothing returns nothing call new_Event() call new_Event() endfunction function init_UnitTypes takes nothing returns nothing set UnitTypes_unitTypes = new_HashMap() set UnitType_basicId = 1215324524 set UnitType_basicMovespeed = 1 set UnitType_turnRate = 1. call new_StringList() set UnitType_castPoint = 0. set UnitType_castBackPoint = 0. set UnitType_animationSmoothingFactor = 0.2 set UnitType_moveInterpolation = 0 set UnitType_attackCooldown = 1. set UnitType_basicAttack = -1 set UnitType_diceSides = 1 set UnitType_diceCount = 1 set UnitType_foodCost = 0 set UnitType_sightRange = 1200 set UnitType_startMana = 10000 set UnitType_baseBounty = 100 set UnitType_baseMass = 1000. set UnitType_baseRadius = 50. set UnitType_baseHeight = 50. endfunction function main takes nothing returns nothing call initGlobals() call init_String() call init_Table() call init_Trigger() call init_Player() call init_PrintingHelper() call init_MagicFunctions() call init_TimerUtils() call init_Maths() call init_TempGroups() call init_Colors() call init_Rect() call init_Terrain() call init_Basics() call init_TypeCasting() call init_ObjectIds() call init_ChannelAbilityPreset() call init_AbilityTooltipGenerator() call init_Array() call init_ArrayList() call init_HashMap() call init_Trackable() call init_Helper() call init_GameTimer() call init_DebugFile() call init_HashList() call init_Setup() call init_PreloadSystem() call init_CompiletimeInit() call init_InstanceBoard() call init_BuffTypes() call init_Menu() call init_Char() call init_FontArial() call init_TextSplat() call init_Button() call init_ObjectIdGenerator() call init_UnitTypes() call init_UnitClass() call init_LinkedListModule() call init_HeroTypes() call init_InstantDummyCaster() call init_HeroClass() call init_CaptureAnimation() call init_DelayedDestroy() call init_ClosureEvents() call init_Region() call init_MapBounds() call init_NewDummyRecycler() call init_Conductor() call init_Lightning() call init_ControlPoint() call init_CreepSpawn() call init_CustomBar() call init_Dot() call init_FloatingText() call init_HandleCounter() call init_HeroBar() call init_IconType() call init_Icon() call init_ToolTipTypes() call init_UnitEvents() call init_ItemClass() call init_Model() call init_OrderHandling() call init_Pane() call init_PlayerClass() call init_PreloadHandler() call init_Spell() call init_TimedEffect() call init_ToolTip() call init_GameStart() call init_PathArray() call init_ProgressBarConfig() call init_ProgressBar() call init_Pull2() call init_RTable() call init_RamisHomingMissle() call init_RockThrow() call init_RunningMazeChecker() call init_Test() call init_TextTagEx() call init_UnitIndexer() endfunction function config takes nothing returns nothing endfunction