Cac = Cac or {} if Engine.InFrontend() then Cac.Layout = { ChooseDialog = { left = 445, right = 695, top = 100, bottom = 640 }, CacEditPanel = { left = 445, right = 778, top = 100, bottom = 616, shift_delta = -500 }, InfoPane = { height = 280, header_height = GenericTitleBarDims.TitleBarHeight }, KillstreakSelectionPanel = { left = 760, right = 1300, top = 100, bottom = 355 }, SelectionInfo = { textTop = 250, height = 355 }, ChooseWeaponIcon = { left = -64, right = 64, top = -32, bottom = 32 }, ChooseGrenadeIcon = { left = -32, right = 32, top = -32, bottom = 32 }, ChooseReticleIcon = { left = -24, right = 24, top = -24, bottom = 24 }, ChooseCamoIcon = { left = -24, right = 24, top = -24, bottom = 24 }, CacWeaponMeter = { top = 2.6, bottom = -3.5, left = 0, offset_max = 155 }, AttachmentChooseDims = { SelectButton = { width = 70, height = 70 }, Grid = { menu_top = 100, menu_left = 445, row_height = 80, horizontal_spacing = 18, text_space = 142 } }, SpecialistStreak = { row_offset = 68, PreviewButton = { width = 54, height = 54 } }, AbilitiesBar = { slot_width = 40, slot_height = 48, slot_spacing = 1 } } Cac.Selection = { background_up = { a = 0.05, attach = 0.08 }, background_over = { a = 0.4, attach = 0.4 }, outline_up = { a = 0.05, attach = 0.05 }, outline_over = { a = 0.2, attach = 0.4 } } Cac.TypeDescriptions = { weapon_assault = Engine.Localize( "@LUA_MENU_WEAPTYPE_AR_DESC" ), weapon_smg = Engine.Localize( "@LUA_MENU_WEAPTYPE_SMG_DESC" ), weapon_lmg = Engine.Localize( "@LUA_MENU_WEAPTYPE_LMG_DESC" ), weapon_dmr = Engine.Localize( "@LUA_MENU_WEAPTYPE_DMR_DESC" ), weapon_sniper = Engine.Localize( "@LUA_MENU_WEAPTYPE_SNIPER_DESC" ), weapon_shotgun = Engine.Localize( "@LUA_MENU_WEAPTYPE_SHOTGUN_DESC" ), weapon_riot = Engine.Localize( "@LUA_MENU_WEAPTYPE_RIOT_DESC" ), weapon_pistol = Engine.Localize( "@LUA_MENU_WEAPTYPE_HANDGUNS_DESC" ), weapon_projectile = Engine.Localize( "@LUA_MENU_WEAPTYPE_LAUNCHERS_DESC" ), streaktype_assault = Engine.Localize( "@LUA_MENU_WEAPTYPE_ASSAULT_DESC" ), streaktype_support = Engine.Localize( "@LUA_MENU_WEAPTYPE_SUPPORT_DESC" ), streaktype_specialist = Engine.Localize( "@LUA_MENU_STREAKTYPE_SPECIALIST_DESC" ), weapon_knifefast = Engine.Localize( "@LUA_MENU_MP_WEAPTYPE_KNIFE_FAST_DESC" ) } Cac.WeaponStatTypes = { Accuracy = { Title = Engine.Localize( "LUA_MENU_WEAPSTATS_ACCURACY" ) }, Damage = { Title = Engine.Localize( "LUA_MENU_WEAPSTATS_DAMAGE" ) }, Range = { Title = Engine.Localize( "LUA_MENU_WEAPSTATS_RANGE" ) }, FireRate = { Title = Engine.Localize( "LUA_MENU_WEAPSTATS_ROF" ) }, Mobility = { Title = Engine.Localize( "LUA_MENU_WEAPSTATS_MOBILITY" ) } } Cac.WeaponPerformanceTypes = { KDR = { Title = Engine.Localize( "LUA_MENU_WEAPPERF_KDR" ) }, Kills = { Title = Engine.Localize( "LUA_MENU_WEAPPERF_KILLS" ) }, Deaths = { Title = Engine.Localize( "LUA_MENU_WEAPPERF_DEATHS" ) }, Headshots = { Title = Engine.Localize( "LUA_MENU_WEAPPERF_HEADSHOTS" ) }, Accuracy = { Title = Engine.Localize( "LUA_MENU_WEAPPERF_ACCURACY" ) }, Usage = { Title = Engine.Localize( "LUA_MENU_WEAPPERF_USAGE" ) }, Hits = { Title = Engine.Localize( "LUA_MENU_WEAPPERF_HITS" ) } } Cac.Weapons = { weapon_assault = { "iw6_dlcweap01", "iw6_sc2010", "iw6_bren", "iw6_ak12", "iw6_fads", "iw6_r5rgp", "iw6_msbs", "iw6_honeybadger", "iw6_arx160" }, weapon_smg = { "iw6_dlcweap02", "iw6_pp19", "iw6_cbjms", "iw6_kriss", "iw6_vepr", "iw6_k7", "iw6_microtar" }, weapon_lmg = { "iw6_ameli", "iw6_m27", "iw6_lsat", "iw6_kac" }, weapon_dmr = { "iw6_g28", "iw6_mk14", "iw6_imbel", "iw6_svu" }, weapon_sniper = { "iw6_dlcweap03", "iw6_usr", "iw6_l115a3", "iw6_gm6", "iw6_vks" }, weapon_shotgun = { "iw6_maul", "iw6_fp6", "iw6_mts255", "iw6_uts15" }, weapon_riot = { "iw6_riotshield" }, weapon_pistol = { "iw6_m9a1", "iw6_mp443", "iw6_p226", "iw6_magnum", "iw6_pdw", "laser_designator" }, weapon_projectile = { "iw6_rgm", "iw6_panzerfaust3", "iw6_mk32" }, weapon_knifefast = { "uav" } } Cac.Reticles = { NumCustom = 5, None = "none", ClanReward = "retclan01", Generics = { "ret01", "ret02", "ret03", "ret04", "ret05" } } Cac.PrimaryGrenades = { "specialty_null", "frag_grenade_mp", "semtex_mp", "throwingknife_mp", "proximity_explosive_mp", "c4_mp", "mortar_shell_mp" } Cac.SecondaryGrenades = { "specialty_null", "flash_grenade_mp", "concussion_grenade_mp", "smoke_grenade_mp", "trophy_mp", "motion_sensor_mp", "thermobaric_grenade_mp" } Cac.Perks = { ability_speed = { "specialty_fastsprintrecovery", "specialty_fastreload", "specialty_lightweight", "specialty_marathon", "specialty_stalker" }, ability_handling = { "specialty_pitcher", "specialty_sprintreload", "specialty_quickswap", "specialty_bulletaccuracy", "specialty_quickdraw" }, ability_stealth = { "specialty_silentkill", "specialty_blindeye", "specialty_quieter", "specialty_incog", "specialty_gpsjammer" }, ability_awareness = { "specialty_paint", "specialty_scavenger", "specialty_detectexplosive", "specialty_selectivehearing", "specialty_comexp" }, ability_resistance = { "specialty_falldamage", "specialty_regenfaster", "specialty_sharp_focus", "specialty_stun_resistance", "_specialty_blastshield" }, ability_equipment = { "specialty_extra_equipment", "specialty_extra_deadly", "specialty_extraammo", "specialty_extra_attachment", "specialty_explosivedamage" }, ability_elite = { "specialty_gambler", "specialty_hardline", "specialty_boom", "specialty_twoprimaries", "specialty_deadeye" } } Cac.StreakTypes = { "streaktype_assault", "streaktype_support", "streaktype_specialist" } Cac.Streaks = { streaktype_assault = { Streaks = { "uplink", "ims", "guard_dog", "sentry", "drone_hive", "helicopter", "ball_drone_backup", "vanguard", "airdrop_juggernaut_maniac", "airdrop_juggernaut", "heli_pilot", "odin_assault" }, Caps = "LUA_MENU_ASSAULT" }, streaktype_support = { Streaks = { "uplink_support", "deployable_ammo", "deployable_vest", "aa_launcher", "ball_drone_radar", "recon_agent", "jammer", "air_superiority", "heli_sniper", "uav_3dping", "airdrop_juggernaut_recon", "odin_support" }, Caps = "PATCH_MENU_SUPPORT_CAPS" }, streaktype_specialist = { Streaks = { Cac.Perks }, Caps = "PATCH_MENU_SPECIALIST_CAPS" } } Cac.StreakTypePopupMenus = { streaktype_assault = "killstreak_selections", streaktype_support = "killstreak_selections", streaktype_specialist = "cac_ability_alt_main" } Cac.KillstreakRefArray = {} AttachmentGunTable = { Cols = { Ref = 0, UIRef = 1, Name = 2, Desc = 3, Image = 4, Group = 5 } } AttachmentComboTable = { File = "mp/attachmentCombos.csv", Cols = { Ref = 0 } } UnlockTable = { File = "mp/unlockTable.csv", Cols = { ItemId = 0, Type = 1, Rank = 2, Challenge = 3, ExtRank = 8, Entitlement = 9, ExtinctionPrestige = 10, ExtinctionEscapes = 11, HighestRelicEscape = 12, ExtinctionKills = 13, ExtinctionRevives = 14, Prestige = 15, PlayedMW3 = 16, MW3Prestive = 17, PlayedBO2 = 18, BO2Prestige = 19, UCD = 20, DLCOffer = 21 } } else Cac.Layout = { CacEditPanel = { left = 600, right = 933, top = 105, bottom = 616, horizontal_outset = 7, vertical_outset = 5, shift_delta = -500 }, InfoPane = { width = 355, height = 280, header_height = 26 }, ChooseWeaponIcon = { left = -64, right = 64, top = -32, bottom = 32 }, ChooseGrenadeIcon = { left = -32, right = 32, top = -32, bottom = 32 }, ChooseReticleIcon = { left = -24, right = 24, top = -24, bottom = 24 }, ChooseCamoIcon = { left = -24, right = 24, top = -24, bottom = 24 }, SpecialistStreak = { row_offset = 68, PreviewButton = { width = 54, height = 54 } }, AbilitiesBar = { slot_width = 40, slot_height = 48, slot_spacing = 1 } } HuntedWeaponsTable = { File = "mp/sotfWeapons.csv", Cols = { Index = 0, Group = 1, Ref = 2 } } end Cac.Abilities = { Types = { Speed = 0, Handling = 1, Stealth = 2, Awareness = 3, Resistance = 4, Equipment = 5, Elite = 6 }, Refs = { None = "ability_null", Speed = "ability_speed", Handling = "ability_handling", Stealth = "ability_stealth", Awareness = "ability_awareness", Resistance = "ability_resistance", Equipment = "ability_equipment", Elite = "ability_elite" }, Settings = { minSlotsUnlocked = 2, maxSlotsUnlocked = 5, defaultSlotDistribution = 0, GrabBagCapacity = 8, SpecialistCapacity = 8, AbilitiesNumCategories = 7, AbilitiesPerCategory = 5, SpecialistAbilityCount = 3 }, BlockedSpecialist = { "specialty_twoprimaries", "specialty_extra_attachment", "specialty_extra_equipment", "specialty_extra_deadly", "specialty_extraammo" } } Cac.PerkTypes = { Refs = { "ability_speed", "ability_handling", "ability_stealth", "ability_awareness", "ability_resistance", "ability_equipment", "ability_elite" }, Strings = { ability_speed = "PATCH_MENU_PERK_SPEED", ability_handling = "PATCH_MENU_PERK_HANDLING", ability_stealth = "PATCH_MENU_PERK_STEALTH", ability_awareness = "PATCH_MENU_PERK_AWARENESS", ability_resistance = "PATCH_MENU_PERK_RESISTANCE", ability_equipment = "PATCH_MENU_PERK_EQUIPMENT", ability_elite = "PATCH_MENU_PERK_ELITE" }, Descriptions = { ability_speed = "PATCH_MENU_PERK_SPEED_DESC", ability_handling = "PATCH_MENU_PERK_HANDLING_DESC", ability_stealth = "PATCH_MENU_PERK_STEALTH_DESC", ability_awareness = "PATCH_MENU_PERK_AWARENESS_DESC", ability_resistance = "PATCH_MENU_PERK_RESISTANCE_DESC", ability_equipment = "PATCH_MENU_PERK_EQUIPMENT_DESC", ability_elite = "PATCH_MENU_PERK_ELITE_DESC" } } Cac.Indices = { Weapons = { Primary = 0, Secondary = 1 }, Attachments = { PrimaryAttachment1 = 0, PrimaryAttachment2 = 1, PrimaryAttachment3 = 2, SecondaryAttachment1 = 0, SecondaryAttachment2 = 1 }, Grenade = { Primary = 0, Secondary = 1 }, Killstreaks = { Streak1 = 0, Streak2 = 1, Streak3 = 2 }, Perk1 = 2, Perk2 = 3, Perk3 = 4, StreakType = 5 } Cac.Swatches = { selection = Colors.white, highlight = Colors.frontend_hilite, slot = Colors.light_grey, slot_over = Colors.very_dark_cyan, overlay = Colors.very_dark_cyan, warning_text = Colors.frontend_hilite, new_icon_text = Colors.new_icon_green, Alphas = { cac_panel_background_shadow = 0.3 } } StatsTable = { File = "mp/StatsTable.csv", Cols = { WeaponRef = 4, WeaponClass = 2, WeaponName = 3, WeaponCount = 5, WeaponImage = 6, WeaponDesc = 7, WeaponAttachFirst = 10, WeaponAttachLast = 29, WeaponAcc = 30, WeaponDam = 31, WeaponRng = 32, WeaponRof = 33, WeaponMob = 34, WeaponFullImage = 35, WeaponBWImage = 36, WeaponProfileImage = 39 } } AttachmentTable = { File = "mp/attachmentTable.csv", Cols = { Group = 2, Ref = 4, BaseRef = 5, Name = 3, Image = 6, Desc = 7, Reticles = 11, Perk = 12, Slot = 13, Acc = 14, Dam = 15, Rng = 16, Rof = 17, Mob = 18, BotDifficulty = 19, ImageFull = 20 } } AttachmentMap = { File = "mp/attachmentmap.csv", Rows = { AttachRef = 0 }, Cols = { WeapOrClass = 0 } } PerkTable = { File = "mp/perkTable.csv", Cols = { Index = 0, Ref = 1, Name = 2, Image = 3, Desc = 4, Slot = 5, Count = 6, Type = 7, Upgrade = 8, UpgradeName = 9, Cost = 10 } } CamoTable = { File = "mp/camoTable.csv", ColIndexNone = 0, Cols = { Index = 0, Ref = 1, Name = 2, Image = 3, WeapIndex = 4, DLC = 5 }, GoldRef = "gold", GlobalList = { clan01 = 1, clan02 = 2 } } ReticleTable = { File = "mp/reticleTable.csv", Cols = { Index = 0, Ref = 1, Name = 2, Desc = 3, Image = 4, WeapIndex = 5 } } CamoReticleUnlockTable = { File = "mp/camo_reticle_unlockTable.csv", MaxRows = 500, Cols = { CamoReticleRef = 0, ChallengeRef = 1, Tier = 2, IsEntitlement = 3, HideIfLocked = 4, Title = 5, Desc = 6, DLCPack = 7, ReleaseKillswitch = 8 }, ChallengeIDList = { crouch = 1, assists = 1, defender = 1, noattach = 1, hipfire = 1, consecutive = 1, pointblank = 1, reload = 1, sliding = 1, leaning = 1, allcamo = 1, longshot = 1 } } KillstreakTable = { File = "mp/killstreakTable.csv", Cols = { Index = 0, Ref = 1, Name = 2, Desc = 3, Kills = 4, EarnedHint = 5, Sound = 6, EarnedDialog = 7, AlliesDialog = 8, EnemyDialog = 9, EnemyUseDialog = 10, Weapon = 11, Score = 12, Icon = 13, OverheadIcon = 14, DPadIcon = 15, UnearnedIcon = 16, AllTeamStreak = 17 } } AbilityTable = { File = "mp/cacAbilityTable.csv", Cols = { Index = 0, Ref = 1, Name = 2, Slot0 = 3, Effect1Name = 14, Effect1Val0 = 15, Effect2Name = 26, Effect2Val0 = 27 } } GameTypesTable = { File = "mp/gametypesTable.csv", Cols = { Ref = 0, Name = 1, Desc = 2, Image = 3, TeamChoice = 4, ClassChoice = 5, Category = 6, Squads = 7, WargameName = 8, ObjectiveHintAttackers = 9, ObjectiveHintDefenders = 10, MLG = 11 } } BackgroundsTable = { File = "mp/cac/backgrounds.csv", Cols = { Ref = 0, Image = 1, Name = 2, CardImage = 3, Category = 4, CategoryName = 5, Entitlement = 6, HideUnlessUnlocked = 7, CustomUnlockString = 8, DLCPack = 9 } } PatchesTable = { File = "mp/cac/patches.csv", Cols = { Ref = 0, Image = 1, Name = 2, Quip = 3, CardImage = 4, Category = 5, CategoryName = 6, Entitlement = 7, HideUnlessUnlocked = 8, CustomUnlockString = 9, DLCPack = 10 } } PatchBackingsTable = { File = "mp/cac/patchbackings.csv", Cols = { Ref = 0, Name = 1, CardImage = 2, Category = 3, CategoryName = 4 } } FactionTable = { File = "mp/factionTable.csv", Cols = { Ref = 0, Name = 1, ShortName = 2, Eliminated = 3, Forfeited = 4, FactionIcon = 5, FactionHudIcon = 6 } } Cac.WeaponUnlockTable = { File = "mp/squadUnlockTable.csv", Cols = { WeaponRef = 0, Type = 1, IsEntitlement = 6, HideIfLocked = 7, DLCPack = 8, ReleaseKillswitch = 9 } } Cac.WeaponTypes = { Primary = { "weapon_assault", "weapon_smg", "weapon_lmg", "weapon_dmr", "weapon_sniper", "weapon_shotgun", "weapon_riot", "weapon_knifefast" }, Secondary = { "weapon_pistol", "weapon_projectile" }, WeaponTypeStrings = { Cap = { weapon_assault = Engine.Localize( "@LUA_MENU_ASSAULT_RIFLES_CAPS" ), weapon_smg = Engine.Localize( "@LUA_MENU_SMGS_CAPS" ), weapon_lmg = Engine.Localize( "@LUA_MENU_LMGS_CAPS" ), weapon_dmr = Engine.Localize( "@LUA_MENU_DMRS_CAPS" ), weapon_sniper = Engine.Localize( "@LUA_MENU_SNIPER_RIFLES_CAPS" ), weapon_shotgun = Engine.Localize( "@LUA_MENU_SHOTGUNS_CAPS" ), weapon_riot = Engine.Localize( "@LUA_MENU_RIOT_SHIELD_CAPS" ), weapon_pistol = Engine.Localize( "@LUA_MENU_HANDGUNS_CAPS" ), weapon_projectile = Engine.Localize( "@LUA_MENU_ROCKETS_CAPS" ), weapon_knifefast = Engine.Localize( "@LUA_MENU_MP_KNIFE_FAST_CAPS" ) }, Single = { weapon_assault = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_AR" ), weapon_smg = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_SMG" ), weapon_lmg = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_LMG" ), weapon_dmr = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_DMR" ), weapon_sniper = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_SNIPER" ), weapon_shotgun = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_SHOTGUN" ), weapon_riot = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_RIOT" ), weapon_pistol = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_HANDGUN" ), weapon_projectile = Engine.Localize( "@LUA_MENU_WEAPTYPE_SINGLE_LAUNCHER" ), weapon_knifefast = Engine.Localize( "@LUA_MENU_MP_WEAPTYPE_KNIFE_FAST" ) }, weapon_assault = Engine.Localize( "@LUA_MENU_WEAPTYPE_AR" ), weapon_smg = Engine.Localize( "@LUA_MENU_WEAPTYPE_SMG" ), weapon_lmg = Engine.Localize( "@LUA_MENU_WEAPTYPE_LMG" ), weapon_dmr = Engine.Localize( "@LUA_MENU_WEAPTYPE_DMR" ), weapon_sniper = Engine.Localize( "@LUA_MENU_WEAPTYPE_SNIPER" ), weapon_shotgun = Engine.Localize( "@LUA_MENU_WEAPTYPE_SHOTGUN" ), weapon_riot = Engine.Localize( "@LUA_MENU_WEAPTYPE_RIOT" ), weapon_pistol = Engine.Localize( "@LUA_MENU_WEAPTYPE_HANDGUNS" ), weapon_projectile = Engine.Localize( "@LUA_MENU_WEAPTYPE_LAUNCHERS" ), weapon_knifefast = Engine.Localize( "@LUA_MENU_MP_WEAPTYPE_KNIFE_FAST" ) } } Cac.AttachmentTypes = { Types = { "rail", "barrel", "undermount", "unique" }, Strings = { rail = Engine.Localize( "@LUA_MENU_ATTACHMENT_SIGHTS" ), barrel = Engine.Localize( "@LUA_MENU_ATTACHMENT_BARREL" ), undermount = Engine.Localize( "@LUA_MENU_ATTACHMENT_UNDER_BARREL" ), unique = Engine.Localize( "@LUA_MENU_ATTACHMENT_MOD" ) }, Caps = { rail = Engine.Localize( "@PATCH_MENU_ATTACHMENT_SIGHTS_CAPS" ), barrel = Engine.Localize( "@PATCH_MENU_ATTACHMENT_BARREL_CAPS" ), undermount = Engine.Localize( "@PATCH_MENU_ATTACHMENT_UNDER_BARREL_CAPS" ), unique = Engine.Localize( "@PATCH_MENU_ATTACHMENT_MOD_CAPS" ) }, Descriptions = { rail = Engine.Localize( "@PATCH_MENU_ATTACHMENT_SIGHTS_DESC" ), barrel = Engine.Localize( "@PATCH_MENU_ATTACHMENT_BARREL_DESC" ), undermount = Engine.Localize( "@PATCH_MENU_ATTACHMENT_UNDER_BARREL_DESC" ), unique = Engine.Localize( "@PATCH_MENU_ATTACHMENT_MOD_DESC" ) } } local f0_local0 = { "defaultClassesTeam0", "defaultClassesTeam1", "defaultClassesTeam2", "defaultClassesTeam3" } if Engine.InFrontend() then function getProperUnlockTable( f1_arg0 ) local f1_local0 = nil return "mp/squadUnlockTable.csv" end Cac.GetSimpleAttachmentList = function ( f2_arg0 ) local f2_local0 = {} local f2_local1 = "" local f2_local2 = "" local f2_local3 = 0 local f2_local4 = false local f2_local5 = false repeat f2_local1 = Engine.TableLookupByRow( AttachmentTable.File, f2_local3, 0 ) f2_local2 = Engine.TableLookupByRow( AttachmentTable.File, f2_local3, AttachmentTable.Cols.BaseRef ) if f2_local2 == "none" then f2_local4 = true elseif f2_local4 and f2_local1 ~= "" and f2_local2 ~= "" then if f2_local2 == "done" then f2_local5 = true elseif f2_local0[#f2_local0] ~= f2_local2 and (not f2_arg0 or f2_arg0 == Cac.GetAttachmentType( f2_local2 )) then f2_local0[#f2_local0 + 1] = f2_local2 end elseif f2_local1 == "" and f2_local2 == "" then f2_local5 = true end f2_local3 = f2_local3 + 1 until f2_local5 return f2_local0 end Cac.getAttachmentCost = function ( f3_arg0, f3_arg1 ) return tonumber( Engine.TableLookup( "mp/squadUnlockTable.csv", 0, Engine.TableLookup( "mp/squadUnlockTable.csv", 0, Cac.GetAttachmentUnlockName( f3_arg0, f3_arg1 ), 3 ), 4 ) ) end Cac.GetAttachmentUnlockName = function ( f4_arg0, f4_arg1 ) if string.match( f4_arg1, "iw5_" ) or string.match( f4_arg1, "iw6_" ) then f4_arg1 = string.sub( f4_arg1, 5 ) end return f4_arg1 .. "_" .. f4_arg0 end Cac.IsAttachmentUnlocked = function ( f5_arg0, f5_arg1, f5_arg2, f5_arg3, f5_arg4, f5_arg5, f5_arg6 ) if f5_arg6 == "none" then return true elseif f5_arg6 == nil then return true elseif f5_arg1 == "privateMatchSquadMembers" then return true end local f5_local0 = Cac.GetWeapon( f5_arg0, f5_arg1, f5_arg2, f5_arg3, f5_arg4, f5_arg5 ) if string.match( f5_local0, "iw5_" ) or string.match( f5_local0, "iw6_" ) then f5_local0 = string.sub( f5_local0, 5 ) end local f5_local1 = f5_local0 .. "_" .. f5_arg6 local f5_local2 = Engine.TableLookup( "mp/squadUnlockTable.csv", 0, f5_local1, 3 ) if f5_local2 == "" then return true elseif Engine.TableLookup( "mp/squadUnlockTable.csv", 0, f5_local1, 2 ) == "none" then return true elseif Engine.GetPlayerDataEx( f5_arg0, CoD.StatsGroup.Ranked, "squadMembers", f5_arg2, "challengeState", f5_local2 ) >= 1 then return true end return false end Cac.ValidateReticle = function ( f6_arg0, f6_arg1, f6_arg2, f6_arg3, f6_arg4, f6_arg5 ) if not Cac.WeaponHasReticles( f6_arg0, f6_arg1, f6_arg2, f6_arg3, f6_arg4, f6_arg5 ) then Cac.SetWeaponReticle( f6_arg0, f6_arg1, f6_arg2, f6_arg3, f6_arg4, f6_arg5, Cac.Reticles.None ) else local f6_local0 = Cac.GetAttachmentWithReticles( f6_arg0, f6_arg1, f6_arg2, f6_arg3, f6_arg4, f6_arg5 ) local f6_local1 = Cac.GetReticle( f6_arg0, f6_arg1, f6_arg2, f6_arg3, f6_arg4, f6_arg5 ) if not Cac.IsReticleValid( f6_arg0, f6_local0, f6_local1 ) or Cac.GetReticleChallengeRef( f6_local0, f6_local1 ) and not Cac.IsReticleChallengeComplete( f6_arg0, f6_local0, f6_local1 ) then Cac.SetWeaponReticle( f6_arg0, f6_arg1, f6_arg2, f6_arg3, f6_arg4, f6_arg5, Cac.GetReticleDefault( f6_local0 ) ) end end end Cac.IsPerkUnlocked = function ( f7_arg0, f7_arg1, f7_arg2, f7_arg3 ) if f7_arg3 == "none" then return true elseif f7_arg1 == "privateMatchSquadMembers" then return true end local f7_local0 = getProperUnlockTable( f7_arg3 ) local f7_local1 = Engine.TableLookup( f7_local0, 0, f7_arg3, 3 ) local f7_local2 = tonumber( Engine.TableLookup( f7_local0, 0, f7_arg3, 2 ) ) if f7_local2 == nil then f7_local2 = 0 end if (f7_local1 == "" or f7_local1 == "none") and (f7_local2 == "" or f7_local2 == "0") then return true end local f7_local3 = Rank.GetRankDisplay( Lobby.GetRankForXP( Engine.GetPlayerDataEx( f7_arg0, CoD.StatsGroup.Ranked, "squadMembers", f7_arg2, "squadMemXP" ) ) ) + 0 local f7_local4 = nil if f7_local1 ~= nil and f7_local1 ~= "" and f7_local1 ~= "none" then f7_local4 = tonumber( Engine.GetPlayerDataEx( f7_arg0, CoD.StatsGroup.Ranked, "squadMembers", f7_arg2, "challengeState", f7_local1 ) ) else f7_local4 = 99 end if f7_local4 >= 1 then return true elseif f7_local2 <= f7_local3 then return true end return false end Cac.IsItemUnlocked = function ( f8_arg0, f8_arg1, f8_arg2, f8_arg3, f8_arg4, f8_arg5 ) if f8_arg3 == "none" then return true elseif f8_arg1 == "privateMatchSquadMembers" then return true elseif f8_arg3 == "uav" then return Cac.GetPrestigeLevel( f8_arg0, f8_arg1 ) >= 5 elseif f8_arg3 == "laser_designator" then return Cac.GetPrestigeLevel( f8_arg0, f8_arg1 ) >= 10 end local f8_local0 = getProperUnlockTable( f8_arg3 ) local f8_local1 = Engine.TableLookup( f8_local0, 0, f8_arg3, 3 ) if f8_arg4 then f8_local1 = f8_arg4 end local f8_local2 = tonumber( Engine.TableLookup( f8_local0, 0, f8_arg3, 2 ) ) if f8_arg5 then f8_local2 = tonumber( f8_arg5 ) end if f8_local2 == nil then f8_local2 = 0 end if (f8_local1 == "" or f8_local1 == "none") and (f8_local2 == "" or f8_local2 == "0") then return true end local f8_local3 = Lobby.GetRankForXP( Engine.GetPlayerDataEx( f8_arg0, CoD.StatsGroup.Ranked, "squadMembers", f8_arg2, "squadMemXP" ) ) local f8_local4 = nil if f8_local1 ~= nil and f8_local1 ~= "" and f8_local1 ~= "none" then if not f8_arg4 then f8_local4 = tonumber( Engine.GetPlayerDataEx( f8_arg0, CoD.StatsGroup.Ranked, "squadMembers", f8_arg2, "challengeState", f8_local1 ) ) else f8_local4 = tonumber( Engine.GetPlayerDataEx( f8_arg0, CoD.StatsGroup.Ranked, "challengeState", f8_local1 ) ) end else f8_local4 = 99 end if f8_local4 >= 1 and f8_local2 == 0 then return true elseif f8_arg4 then if tonumber( f8_local2 ) + 1 <= f8_local4 then return true end elseif f8_local4 >= 1 and f8_local2 <= f8_local3 then return true elseif (f8_local1 == "none" or "" == unlockReqs) and f8_local2 <= f8_local3 then return true end return false end function syncXP( f9_arg0, f9_arg1 ) if not Engine.IsAliensMode() then if not f9_arg0 or not f9_arg1 then return end Engine.SetPlayerDataEx( f9_arg0, CoD.StatsGroup.Ranked, "experience", Engine.GetPlayerDataEx( f9_arg0, CoD.StatsGroup.Ranked, "squadMembers", f9_arg1, "squadMemXP" ) ) end end function unlockItem( f10_arg0, f10_arg1 ) local f10_local0 = getProperUnlockTable( f10_arg1 ) local f10_local1 = Engine.TableLookup( f10_local0, 0, f10_arg1, 3 ) local f10_local2 = Engine.TableLookup( f10_local0, 0, f10_local1, 4 ) local f10_local3 = Engine.GetPlayerDataEx( f10_arg0, CoD.StatsGroup.Ranked, "unlockPoints" ) local f10_local4 = Cac.GetEditSquadMember() Cac.SetCurrency( f10_arg0, f10_local3 - f10_local2 ) Engine.SetPlayerDataEx( f10_arg0, CoD.StatsGroup.Ranked, "squadMembers", f10_local4, "challengeState", f10_local1, 2 ) return 1 end Cac.GetEditCurrency = function ( f11_arg0 ) if IsOnlineMatch() and not Engine.GetDvarBool( "xblive_privatematch" ) and not Engine.IsAliensMode() then return { type = "cac_edit_currency", id = f11_arg0 } else return { type = "UIElement" } end end Cac.GetItemClassDescriptions = function ( f12_arg0 ) return Cac.TypeDescriptions[f12_arg0] end Cac.GetItemCost = function ( f13_arg0 ) local f13_local0 = getProperUnlockTable( f13_arg0 ) return Engine.TableLookup( f13_local0, 0, Engine.TableLookup( f13_local0, 0, f13_arg0, 3 ), 4 ) end Cac.GetItemLevel = function ( f14_arg0 ) local f14_local0 = tonumber( Engine.TableLookup( getProperUnlockTable( f14_arg0 ), 0, f14_arg0, 2 ) ) if f14_local0 == nil or f14_local0 == "" then f14_local0 = 0 end return f14_local0 end Cac.BuildPrimaryWeaponName = function ( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4 ) local f15_local0 = Cac.GetWeapon( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4, 0 ) local f15_local1 = Cac.GetAttachment( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4, 0, 0 ) local f15_local2 = Cac.GetAttachment( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4, 0, 1 ) local f15_local3 = Cac.IsAbilityPickedBySlotName( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4, "Equipment", "specialty_extra_attachment", "abilitiesPicked" ) if f15_local3 then f15_local3 = Cac.GetAttachment( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4, 0, 2 ) end local f15_local4 = Cac.GetCamo( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4, 0 ) if f15_local4 then f15_local4 = tonumber( Cac.GetCamoWeaponIndex( f15_local4 ) ) end local f15_local5 = Cac.GetReticle( f15_arg0, f15_arg1, f15_arg2, f15_arg3, f15_arg4, 0 ) if f15_local5 then f15_local5 = tonumber( Cac.GetReticleWeaponIndex( f15_local5 ) ) end return Cac.BuildWeaponName( f15_local0, f15_local1, f15_local2, f15_local4, f15_local5, f15_local3 ) end Cac.BuildSecondaryWeaponName = function ( f16_arg0, f16_arg1, f16_arg2, f16_arg3, f16_arg4 ) local f16_local0 = Cac.GetWeapon( f16_arg0, f16_arg1, f16_arg2, f16_arg3, f16_arg4, 1 ) local f16_local1 = Cac.GetAttachment( f16_arg0, f16_arg1, f16_arg2, f16_arg3, f16_arg4, 1, 0 ) local f16_local2 = Cac.IsAbilityPickedBySlotName( f16_arg0, f16_arg1, f16_arg2, f16_arg3, f16_arg4, "Equipment", "specialty_extra_attachment", "abilitiesPicked" ) if f16_local2 then f16_local2 = Cac.GetAttachment( f16_arg0, f16_arg1, f16_arg2, f16_arg3, f16_arg4, 1, 1 ) end return Cac.BuildWeaponName( f16_local0, f16_local1, f16_local2 ) end Cac.BuildWeaponNameCamo = function ( f17_arg0, f17_arg1 ) if not f17_arg1 or f17_arg1 <= 0 then return f17_arg0 else return string.format( "%s_camo%02d", f17_arg0, f17_arg1 ) end end Cac.BuildWeaponNameReticle = function ( f18_arg0, f18_arg1 ) if not f18_arg1 or f18_arg1 == "" or f18_arg1 == 0 then return f18_arg0 else return string.format( "%s_scope%s", f18_arg0, f18_arg1 ) end end Cac.BuildWeaponName = function ( f19_arg0, f19_arg1, f19_arg2, f19_arg3, f19_arg4, f19_arg5 ) if not f19_arg0 or f19_arg0 == "none" then return "none" elseif f19_arg0 == "uav" then f19_arg0 = "iw6_knifeonlyfast" end if f19_arg0 == "laser_designator" then f19_arg0 = "iw6_pdwauto" end if not f19_arg1 then f19_arg1 = "none" end if not f19_arg2 then f19_arg2 = "none" end if not f19_arg5 then f19_arg5 = "none" end local f19_local0 = "" local f19_local1 = "" if f19_arg0:match( "iw5" ) or f19_arg0:match( "iw6" ) then f19_local1 = f19_arg0 .. "_mp" f19_local0 = f19_arg0:sub( 4, f19_arg0:len() ) else f19_local1 = f19_arg0 end local f19_local2 = Cac.GetWeaponClass( f19_arg0 ) local f19_local3 if f19_local2 ~= "weapon_sniper" and f19_local2 ~= "weapon_dmr" and f19_arg0 ~= "iw6_dlcweap02" then f19_local3 = false else f19_local3 = true end local f19_local4 = {} if f19_arg1 ~= "none" then f19_local4[#f19_local4 + 1] = Cac.GetAttachmentUniqueRef( f19_arg1, f19_arg0 ) end if f19_arg2 ~= "none" then f19_local4[#f19_local4 + 1] = Cac.GetAttachmentUniqueRef( f19_arg2, f19_arg0 ) end if f19_arg5 ~= "none" then f19_local4[#f19_local4 + 1] = Cac.GetAttachmentUniqueRef( f19_arg5, f19_arg0 ) end if f19_local3 then local f19_local5 = false for f19_local9, f19_local10 in ipairs( f19_local4 ) do if Cac.GetAttachmentType( f19_local10 ) == "rail" then f19_local5 = true break end end if not f19_local5 then f19_local4[#f19_local4 + 1] = f19_local0 .. "scope" end end local f19_local5 = function ( f20_arg0, f20_arg1 ) return f20_arg0 < f20_arg1 end if f19_local4[#f19_local4] then table.sort( f19_local4, f19_local5 ) end for f19_local9, f19_local10 in ipairs( f19_local4 ) do f19_local1 = f19_local1 .. "_" .. f19_local10 end if f19_local1:match( "iw5" ) or f19_local1:match( "iw6" ) then f19_local1 = Cac.BuildWeaponNameReticle( Cac.BuildWeaponNameCamo( f19_local1, f19_arg3 ), f19_arg4 ) else f19_local1 = Cac.BuildWeaponNameReticle( Cac.BuildWeaponNameCamo( f19_local1, f19_arg3 ), f19_arg4 ) .. "_mp" end return f19_local1 end Cac.GetWeaponFullImage = function ( f21_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f21_arg0, StatsTable.Cols.WeaponFullImage ) end Cac.GetWeaponBWImage = function ( f22_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f22_arg0, StatsTable.Cols.WeaponBWImage ) end Cac.GetWeaponProfileImage = function ( f23_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f23_arg0, StatsTable.Cols.WeaponProfileImage ) end Cac.GetGrenadeDesc = function ( f24_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, Cac.StripSuffix( f24_arg0, "_mp" ), StatsTable.Cols.WeaponDesc ) ) end Cac.GetWeaponDesc = function ( f25_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f25_arg0, StatsTable.Cols.WeaponDesc ) ) end Cac.GetWeaponAccuracy = function ( f26_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f26_arg0, StatsTable.Cols.WeaponAcc ) end Cac.GetWeaponDamage = function ( f27_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f27_arg0, StatsTable.Cols.WeaponDam ) end Cac.GetWeaponRange = function ( f28_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f28_arg0, StatsTable.Cols.WeaponRng ) end Cac.GetWeaponFireRate = function ( f29_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f29_arg0, StatsTable.Cols.WeaponRof ) end Cac.GetWeaponMobility = function ( f30_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f30_arg0, StatsTable.Cols.WeaponMob ) end Cac.GetWeaponCategoryName = function ( f31_arg0 ) return Cac.WeaponTypes.WeaponTypeStrings[f31_arg0] end Cac.GetWeaponCategoryNameCaps = function ( f32_arg0 ) return Cac.WeaponTypes.WeaponTypeStrings.Cap[f32_arg0] end Cac.GetWeaponCategoryNameSingle = function ( f33_arg0 ) return Cac.WeaponTypes.WeaponTypeStrings.Single[f33_arg0] end Cac.GetAttachmentAccuracy = function ( f34_arg0, f34_arg1 ) if f34_arg1 and f34_arg1 ~= "none" then f34_arg0 = Cac.GetAttachmentUniqueRef( f34_arg0, f34_arg1 ) end return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f34_arg0, AttachmentTable.Cols.Acc ) end Cac.GetAttachmentDamage = function ( f35_arg0, f35_arg1 ) if f35_arg1 and f35_arg1 ~= "none" then f35_arg0 = Cac.GetAttachmentUniqueRef( f35_arg0, f35_arg1 ) end return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f35_arg0, AttachmentTable.Cols.Dam ) end Cac.GetAttachmentRange = function ( f36_arg0, f36_arg1 ) if f36_arg1 and f36_arg1 ~= "none" then f36_arg0 = Cac.GetAttachmentUniqueRef( f36_arg0, f36_arg1 ) end return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f36_arg0, AttachmentTable.Cols.Rng ) end Cac.GetAttachmentFireRate = function ( f37_arg0, f37_arg1 ) if f37_arg1 and f37_arg1 ~= "none" then f37_arg0 = Cac.GetAttachmentUniqueRef( f37_arg0, f37_arg1 ) end return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f37_arg0, AttachmentTable.Cols.Rof ) end Cac.GetAttachmentMobility = function ( f38_arg0, f38_arg1 ) if f38_arg1 and f38_arg1 ~= "none" then f38_arg0 = Cac.GetAttachmentUniqueRef( f38_arg0, f38_arg1 ) end return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f38_arg0, AttachmentTable.Cols.Mob ) end Cac.GetFirstOpenAttachment = function ( f39_arg0, f39_arg1, f39_arg2, f39_arg3, f39_arg4, f39_arg5 ) local f39_local0 = Cac.GetAttachmentNumber( f39_arg0, f39_arg1, f39_arg2, f39_arg3, f39_arg4, f39_arg5 ) - 1 for f39_local1 = 0, f39_local0, 1 do if Cac.GetAttachment( f39_arg0, f39_arg1, f39_arg2, f39_arg3, f39_arg4, f39_arg5, f39_local1 ) == "none" then return f39_local1 end end end Cac.GetAttachmentName = function ( f40_arg0, f40_arg1 ) if f40_arg1 and f40_arg1 ~= "none" then f40_arg0 = Cac.GetAttachmentUniqueRef( f40_arg0, f40_arg1 ) end return Engine.Localize( "@" .. Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f40_arg0, AttachmentTable.Cols.Name ) ) end Cac.GetAttachmentTypeName = function ( f41_arg0 ) return Cac.AttachmentTypes.Strings[f41_arg0] end Cac.GetAttachmentTypeNameCaps = function ( f42_arg0 ) return Cac.AttachmentTypes.Caps[f42_arg0] end Cac.GetAttachmentTypeDesc = function ( f43_arg0 ) return Cac.AttachmentTypes.Descriptions[f43_arg0] end Cac.GetAttachmentDesc = function ( f44_arg0, f44_arg1 ) if f44_arg1 and f44_arg1 ~= "none" then f44_arg0 = Cac.GetAttachmentUniqueRef( f44_arg0, f44_arg1 ) end return Engine.Localize( "@" .. Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f44_arg0, AttachmentTable.Cols.Desc ) ) end Cac.GetAttachmentNumber = function ( f45_arg0, f45_arg1, f45_arg2, f45_arg3, f45_arg4, f45_arg5 ) local f45_local0 = Cac.IsAbilityPickedBySlotName( f45_arg0, f45_arg1, f45_arg2, f45_arg3, f45_arg4, "Equipment", "specialty_extra_attachment", "abilitiesPicked" ) local f45_local1 = 0 if f45_arg5 == Cac.Indices.Weapons.Primary then if f45_local0 then local f45_local2 = 3 end f45_local1 = f45_local2 or 2 else if f45_local0 then local f45_local3 = 2 end f45_local1 = f45_local3 or 1 end return f45_local1 end Cac.GetPerk1 = function ( f46_arg0, f46_arg1, f46_arg2, f46_arg3, f46_arg4 ) return Cac.GetCacConfig( f46_arg0, f46_arg1, f46_arg2, f46_arg3, f46_arg4, "perks", Cac.Indices.Perk1 ) end Cac.GetPerk2 = function ( f47_arg0, f47_arg1, f47_arg2, f47_arg3, f47_arg4 ) return Cac.GetCacConfig( f47_arg0, f47_arg1, f47_arg2, f47_arg3, f47_arg4, "perks", Cac.Indices.Perk2 ) end Cac.GetPerk3 = function ( f48_arg0, f48_arg1, f48_arg2, f48_arg3, f48_arg4 ) return Cac.GetCacConfig( f48_arg0, f48_arg1, f48_arg2, f48_arg3, f48_arg4, "perks", Cac.Indices.Perk3 ) end Cac.GetPerkDesc = function ( f49_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( PerkTable.File, PerkTable.Cols.Ref, f49_arg0, PerkTable.Cols.Desc ) ) end Cac.GetPerkUnlockReq = function ( f50_arg0 ) return Cac.GetItemLevel( f50_arg0 ) end Cac.GetPerkUnlockReq = function ( f51_arg0 ) return Cac.GetItemLevel( f51_arg0 ) end Cac.GetCurrency = function ( f52_arg0 ) return Engine.GetPlayerDataEx( f52_arg0, CoD.StatsGroup.Ranked, "unlockPoints" ) end Cac.SetCurrency = function ( f53_arg0, f53_arg1 ) return Engine.SetPlayerDataEx( f53_arg0, CoD.StatsGroup.Ranked, "unlockPoints", f53_arg1 ) end Cac.GetCamoName = function ( f54_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( CamoTable.File, CamoTable.Cols.Ref, f54_arg0, CamoTable.Cols.Name ) ) end Cac.GetCamoIndex = function ( f55_arg0 ) return Engine.TableLookup( CamoTable.File, CamoTable.Cols.Ref, f55_arg0, CamoTable.Cols.Index ) end Cac.GetCamoWeaponIndex = function ( f56_arg0 ) return Engine.TableLookup( CamoTable.File, CamoTable.Cols.Ref, f56_arg0, CamoTable.Cols.WeapIndex ) end Cac.GetReticleName = function ( f57_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( ReticleTable.File, ReticleTable.Cols.Ref, f57_arg0, ReticleTable.Cols.Name ) ) end Cac.GetReticleIndex = function ( f58_arg0 ) return Engine.TableLookup( ReticleTable.File, ReticleTable.Cols.Ref, f58_arg0, ReticleTable.Cols.Index ) end Cac.GetReticleWeaponIndex = function ( f59_arg0 ) return Engine.TableLookup( ReticleTable.File, ReticleTable.Cols.Ref, f59_arg0, ReticleTable.Cols.WeapIndex ) end Cac.GetAbilityName = function ( f60_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( AbilityTable.File, AbilityTable.Cols.Ref, f60_arg0, AbilityTable.Cols.Name ) ) end Cac.GetAbilityEffectName = function ( f61_arg0, f61_arg1 ) local f61_local0 = 0 if f61_arg1 == 1 then f61_local0 = AbilityTable.Cols.Effect1Name elseif f61_arg1 == 2 then f61_local0 = AbilityTable.Cols.Effect2Name else f61_local0 = AbilityTable.Cols.Effect1Name end return Engine.Localize( "@" .. Engine.TableLookup( AbilityTable.File, AbilityTable.Cols.Ref, f61_arg0, f61_local0 ) ) end Cac.GetAbilityEffectValue = function ( f62_arg0, f62_arg1, f62_arg2 ) local f62_local0 = 0 if f62_arg1 == 1 then f62_local0 = AbilityTable.Cols.Effect1Val0 elseif f62_arg1 == 2 then f62_local0 = AbilityTable.Cols.Effect2Val0 else f62_local0 = AbilityTable.Cols.Effect1Val0 end return Engine.TableLookup( AbilityTable.File, AbilityTable.Cols.Ref, f62_arg0, f62_local0 + f62_arg2 ) end Cac.WeaponHasAttachments = function ( f63_arg0 ) local f63_local0 = false if Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f63_arg0, StatsTable.Cols.WeaponAttachFirst ) ~= "" then f63_local0 = true end return f63_local0 end Cac.AreAttachmentsCompatible = function ( f64_arg0, f64_arg1 ) local f64_local0 = Engine.TableLookupGetRowNum( AttachmentComboTable.File, AttachmentComboTable.Cols.Ref, f64_arg1 ) local f64_local1 = true if f64_arg1 ~= "none" and f64_arg0 ~= "none" and Engine.TableLookup( AttachmentComboTable.File, AttachmentComboTable.Cols.Ref, f64_arg0, f64_local0 ) == "no" then f64_local1 = false end return f64_local1 end Cac.DefaultEditChooseStreakTypeAction = function ( f65_arg0, f65_arg1 ) local f65_local0 = f65_arg0.properties local f65_local1 = LUI.FlowManager.GetMenuScopedDataFromElement( f65_arg0 ) local f65_local2 = LUI.FlowManager.GetMenuScopedDataByMenuName( "cac_edit_main" ) if f65_local2.defaultFocus and type( f65_local2.defaultFocus ) == "table" then f65_local2.defaultFocus[#f65_local2.defaultFocus + 1] = f65_local0.itemType end Cac.SetPerk( f65_local0.exclusiveController, f65_local1.squadLocation, f65_local1.squadMemberIndex, f65_local1.classLocation, f65_local1.slot, f65_local1.itemIndex, f65_local0.itemType ) f65_arg0:dispatchEventToRoot( { name = "update_cac_info_panel", controller = f65_arg1.controller, dispatchChildren = true } ) local f65_local3 = { controller = f65_arg1.controller, slot = f65_local1.slot, squadLocation = f65_local1.squadLocation, squadMemberIndex = f65_local1.squadMemberIndex, classLocation = f65_local1.classLocation, streakType = f65_local0.itemType, openMenuOnClose = f65_local1.openMenuOnClose } local f65_local4 = false if f65_local0.itemType == "streaktype_specialist" then f65_local3.strikePackage = true f65_local4 = true else InitKillstreakArrays( f65_local0.itemType ) end f65_arg0:processEvent( { name = "button_lock" } ) f65_arg0:dispatchEventToRoot( { name = "refresh_specialist_abilities_recap", controller = f65_arg1.controller, specialistType = f65_local3.strikePackage, selected = true } ) f65_arg0:dispatchEventToRoot( { name = "hide_character_image", immediate = true } ) LUI.FlowManager.RequestPopupMenu( f65_arg0, Cac.StreakTypePopupMenus[f65_local0.itemType], true, f65_local0.exclusiveController, f65_local4, f65_local3 ) end Cac.EditChooseSecondPrimary = function ( f66_arg0, f66_arg1 ) local f66_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f66_arg0 ) local f66_local1 = LUI.FlowManager.GetMenuScopedDataByMenuName( "cac_edit_main" ) if f66_local1.defaultFocus and type( f66_local1.defaultFocus ) == "table" then f66_local1.defaultFocus[#f66_local1.defaultFocus + 1] = "twoPrimaries" end local f66_local2 = { squadLocation = f66_local0.squadLocation, squadMemberIndex = f66_local0.squadMemberIndex, classLocation = f66_local0.classLocation, slot = f66_local0.slot, itemIndex = f66_local0.itemIndex, titleBarText = Engine.Localize( "MENU_PRIMARY_CAPS" ), buttonFeeder = Cac.EditPopupButtonsFactory( Cac.GetWeaponCategoryNameCaps, Cac.EditChooseWeaponTypeAction, Cac.GetWeaponTypes( true ), Cac.GetWeaponClass( Cac.GetWeapon( f66_arg1.controller, f66_local2.squadLocation, f66_local2.squadMemberIndex, f66_local2.classLocation, f66_local2.slot, f66_local2.itemIndex ) ), Cac.GetItemClassDescriptions, nil, Cac.GetWeapon( f66_arg1.controller, f66_local2.squadLocation, f66_local2.squadMemberIndex, f66_local2.classLocation, f66_local2.slot, f66_local2.itemIndex ), nil, Cac.GetWeapon( f66_arg1.controller, f66_local2.squadLocation, f66_local2.squadMemberIndex, f66_local2.classLocation, f66_local2.slot, 1 - f66_local2.itemIndex ), "cac_edit_main" ), checkRestriction = function ( f67_arg0 ) local f67_local0, f67_local1 = Cac.SafeGetMatchRule( "commonOption", "weaponClassRestricted", f67_arg0 ) if f67_local0 then local f67_local2 = f67_local1 end return f67_local2 or Cac.CheckWeaponTypeRestrictions( f67_arg0, f66_arg1.controller ) end, restrictType = "weaponRestricted", editPopupOpenMenuOnClose = f66_local0.openMenuOnClose, openMenuOnClose = f66_local2, openMenuOnClose = "cac_edit_popup_main_second" } LUI.FlowManager.RequestPopupMenu( f66_arg0, "cac_edit_popup_main_second", true, f66_arg1.controller, true, f66_local2 ) end Cac.EditChooseWeaponTypeAction = function ( f68_arg0, f68_arg1 ) local f68_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f68_arg0 ) local f68_local1 = LUI.FlowManager.GetMenuScopedDataByMenuName( "cac_edit_main" ) if f68_local1.defaultFocus and type( f68_local1.defaultFocus ) == "table" then f68_local1.defaultFocus[#f68_local1.defaultFocus + 1] = f68_arg0.properties.itemType end local f68_local2 = "edit_weapon_primary" if f68_local0.itemIndex == 1 then f68_local2 = "edit_weapon_secondary" end LUI.FlowManager.RequestPopupMenu( f68_arg0, "cac_edit_choose_image_popup", true, f68_arg0.properties.exclusiveController, true, { squadMemberIndex = f68_local0.squadMemberIndex, squadLocation = f68_local0.squadLocation, slot = f68_local0.slot, classLocation = f68_local0.classLocation, itemIndex = f68_local0.itemIndex, itemTypeString = Cac.WeaponTypes.WeaponTypeStrings.Cap[f68_arg0.properties.itemType], disableSetDefaultFocus = f68_local0.disableSetDefaultFocus, selection_id = f68_local2, ImageFunction = Cac.GetWeaponBWImage, ItemGetFunction = Cac.GetWeapon, ItemSetFunction = Cac.SetWeapon, itemList = Cac.GetWeaponList( f68_arg0.properties.itemType, f68_arg0.properties.exclusiveController ), ItemGetNameFunction = Cac.GetWeaponName, ImageDimensions = Cac.Layout.ChooseWeaponIcon, overrideChooseAction = f68_local0.overrideChooseAction, overrideChooseDisableCheck = f68_local0.overrideChooseDisableCheck, openMenuOnClose = f68_local0.openMenuOnClose, restrictType = f68_local0.restrictType, noNewIcons = f68_local0.noNewIcons, customTop = f68_local0.customTop, customLeft = f68_local0.customLeft, customRight = f68_local0.customRight, customBottom = f68_local0.customBottom } ) end Cac.EditPopupButtonsFactory = function ( f69_arg0, f69_arg1, f69_arg2, f69_arg3, f69_arg4, f69_arg5, f69_arg6, f69_arg7, f69_arg8, f69_arg9, f69_arg10, f69_arg11 ) return function () local f70_local0 = function ( f71_arg0, f71_arg1 ) local f71_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f71_arg0 ) if f71_local0 then f71_local0.currentHighlightedType = f71_arg0.properties.itemType end if f69_arg1 == Cac.EditChooseWeaponTypeAction then local f71_local1 = { controller = f71_local0.exclusiveController, squadLocation = f71_local0.squadLocation, squadMemberIndex = f71_local0.squadMemberIndex, classLocation = f71_local0.classLocation, slot = f71_local0.slot, selection_id = f71_local0.itemIndex and "edit_weapon_primary" or "edit_weapon_secondary", weaponIndex = f71_local0.itemIndex, immediate = true, dispatchChildren = true, name = "update_selection_info" } f71_arg0:dispatchEventToRoot( f71_local1 ) f71_local1.name = "refresh_info_pane" f71_arg0:dispatchEventToRoot( f71_local1 ) end if MatchRules.AllowCustomClasses( f71_local0.classLocation ) then if f71_arg0.restricted then f71_arg0:dispatchEventToRoot( { name = "show_class_restrictions_warning", immediate = true } ) else f71_arg0:dispatchEventToRoot( { name = "hide_class_restrictions_warning", immediate = true } ) end end local f71_local1 = f71_arg0:getParent() f71_local1:processEvent( { name = "update_loadout_description_text", description_text = f71_arg0.properties.desc_text } ) end local f70_local1 = {} local f70_local2 = true if disableSetDefaultFocus then f70_local2 = false end local f70_local3 = nil if f69_arg9 then f70_local3 = LUI.FlowManager.GetMenuScopedDataByMenuName( f69_arg9 ) if not f70_local3.defaultFocus or not type( f70_local3.defaultFocus ) == "table" then f70_local3.defaultFocus = {} end end if f69_arg1 == Cac.EditChooseWeaponTypeAction then local f70_local4 = false if f70_local2 and (f69_arg3 == "" or f69_arg6 and f69_arg6 == "iw6_knifeonly") and f70_local3 and not f70_local3.defaultFocus then f70_local4 = true end f70_local1[#f70_local1 + 1] = { type = "UIGenericButton", id = "cac_edit_type_none", listDefaultFocus = f70_local4, properties = { button_text = Engine.Localize( "LUA_MENU_NONE_CAPS" ), style = GenericButtonSettings.Styles.GlassButton, substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.Popup, text_align_without_content = LUI.Alignment.Left, desc_text = "", additional_handlers = { button_action = function ( f72_arg0, f72_arg1 ) local f72_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f72_arg0 ) local f72_local1 = f72_local0.itemIndex and "iw6_knifeonly" or "none" local f72_local2 = Cac.GetWeapon( f72_arg1.controller, f72_local0.squadLocation, f72_local0.squadMemberIndex, f72_local0.classLocation, f72_local0.slot, f72_local0.itemIndex ) Cac.SetWeapon( f72_arg1.controller, f72_local0.squadLocation, f72_local0.squadMemberIndex, f72_local0.classLocation, f72_local0.slot, f72_local0.itemIndex, f72_local1 ) LUI.FlowManager.RequestLeaveMenu( f72_arg0 ) if f72_local1 ~= f72_local2 then f72_arg0:dispatchEventToRoot( { name = "refresh_abilities_recap", controller = f72_arg1.controller, specialistType = false, item = f72_local1 } ) end f72_arg0:dispatchEventToRoot( { name = "update_cac_info_panel", controller = f72_arg1.controller, dispatchChildren = true } ) end, button_over = function ( f73_arg0, f73_arg1 ) local f73_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f73_arg0 ) f73_arg0:dispatchEventToRoot( { name = "hide_class_restrictions_warning", immediate = true } ) local f73_local1 = f73_arg0:getParent() f73_local1:processEvent( { name = "update_loadout_description_text", description_text = f73_local0.itemIndex and Engine.Localize( "@LUA_MENU_WEAPTYPE_KNIFE_ONLY_DESC" ) or Engine.Localize( "LUA_MENU_SECONDARY_NONE" ) } ) end, button_over_disable = nil, menu_create = function ( f74_arg0, f74_arg1 ) local f74_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f74_arg0 ) f74_arg0:setText( f74_local0.itemIndex and Engine.Localize( "@LUA_MENU_KNIFE_ONLY_CAPS" ) or Engine.Localize( "LUA_MENU_NONE_CAPS" ) ) end } } } end assert( f70_local3 and f70_local3.exclusiveController ) for f70_local9, f70_local10 in ipairs( f69_arg2 ) do if f70_local10 == "weapon_riot" then local f70_local7 = f69_arg8 local f70_local8 = Cac.GetWeaponList( f70_local10, f70_local3.exclusiveController ) if f70_local7 ~= f70_local8[1] then else end end local f70_local7 = false if not (not f70_local2 or f69_arg3 ~= f70_local10 or f69_arg9) or f70_local2 and f70_local3 and f70_local3.defaultFocus[#f70_local3.defaultFocus] == f70_local10 then f70_local7 = true if f69_arg9 then table.remove( f70_local3.defaultFocus ) end end assert( f69_arg0( f70_local10 ) ) f70_local1[#f70_local1 + 1] = { type = "UIGenericButton", id = "cac_edit_type_" .. f70_local10, listDefaultFocus = f70_local7, disabled = f69_arg10 and f69_arg10() or false, audio = { button_over = CoD.SFX.SubMenuMouseOver }, properties = { button_text = f69_arg0( f70_local10 ), variant = f69_arg5 and GenericButtonSettings.Variants.Checkbox or GenericButtonSettings.Variants.Plain, itemType = f70_local10, style = GenericButtonSettings.Styles.GlassButton, substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.Popup, text_align_without_content = LUI.Alignment.Left, disable_padlock = true, desc_text = f69_arg4( f70_local10 ), disableSound = CoD.SFX.DenySelect, additional_handlers = { button_action = function ( f75_arg0, f75_arg1 ) local f75_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f75_arg0 ) if f70_local10 == "weapon_riot" and Cac.IsItemUnlocked( f75_arg1.controller, f75_local0.squadLocation, f75_local0.squadMemberIndex, "iw6_riotshield" ) and not f69_arg5 and not f69_arg11 then local f75_local1 = Cac.SetWeapon local f75_local2 = f75_arg1.controller local f75_local3 = f75_local0.squadLocation local f75_local4 = f75_local0.squadMemberIndex local f75_local5 = f75_local0.classLocation local f75_local6 = f75_local0.slot local f75_local7 = f75_local0.itemIndex local f75_local8 = Cac.GetWeaponList( f70_local10, f75_arg1.controller ) f75_local1( f75_local2, f75_local3, f75_local4, f75_local5, f75_local6, f75_local7, f75_local8[1] ) f75_arg0:dispatchEventToRoot( { name = "update_squad_member_window_stowed_weapon", weapon = Cac.BuildSecondaryWeaponName( f75_arg1.controller, f75_local0.squadLocation, f75_local0.squadMemberIndex, f75_local0.classLocation, f75_local0.slot ) } ) LUI.FlowManager.RequestLeaveMenu( f75_arg0 ) f75_arg0:dispatchEventToRoot( { name = "update_cac_info_panel", controller = f75_arg1.controller, dispatchChildren = true } ) f75_arg0:dispatchEventToRoot( { name = "refresh_abilities_recap", controller = f75_arg1.controller, specialistType = false, item = "iw6_riotshield" } ) else f69_arg1( f75_arg0, f75_arg1 ) end end, button_over = f70_local0, button_over_disable = f70_local0, unlock_edit_popup = function ( f76_arg0, f76_arg1 ) f76_arg0:processEvent( { name = "button_unlock" } ) if f69_arg9 then table.remove( f70_local3.defaultFocus ) end end, menu_create = function ( f77_arg0, f77_arg1 ) local f77_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f77_arg0 ) if f77_local0.checkRestriction and f77_local0.checkRestriction( f77_arg0.properties.itemType, f77_arg0.properties.exclusiveController ) and MatchRules.AllowCustomClasses( f77_local0.classLocation ) then local f77_local1 = Cac.GetRestrictIcon( 0, 2, 28 ) f77_local1.id = "new_icon" .. f70_local10 f77_arg0.restricted = true f77_arg0:addElement( f77_local1 ) else f77_arg0.restricted = false end if f77_arg0.restricted == false and not f77_local0.noNewIcons and Cac.AnyNewIconsForWeaponsOfClass( f77_local0.exclusiveController, f77_arg0.properties.itemType ) then local f77_local1 = Cac.GetRestrictIcon( 0, 2, 28 ) f77_local1.id = "new_icon_2" f77_local1:setImage( RegisterMaterial( "icon_new_2" ) ) f77_arg0:addElement( f77_local1 ) f77_arg0:registerEventHandler( "refresh_new_icons", function ( element, event ) local f78_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( element ) if not Cac.AnyNewIconsForWeaponsOfClass( f78_local0.exclusiveController, element.properties.itemType ) then local f78_local1 = element:getChildById( "new_icon_2" ) if f78_local1 then f78_local1:close() end end end ) end if f69_arg5 then f69_arg5( f77_arg0 ) end end, allow = function ( f79_arg0, f79_arg1 ) f79_arg0.restricted = false end, restrict = function ( f80_arg0, f80_arg1 ) f80_arg0.restricted = true end } } } end if f69_arg7 then f70_local4 = false if not (not f70_local2 or not Cac.IsWeaponClassPrimary( f69_arg3 ) or f69_arg9) or not (not f70_local2 or not f70_local3 or f70_local3.defaultFocus[#f70_local3.defaultFocus] ~= "twoPrimaries") or f70_local2 and f70_local3 and Cac.IsWeaponClassPrimary( f70_local3.defaultFocus[#f70_local3.defaultFocus] ) then f70_local4 = true if f69_arg9 then table.remove( f70_local3.defaultFocus ) end end f70_local1[#f70_local1 + 1] = { type = "UIGenericButton", id = "cac_edit_secondary_primary", listDefaultFocus = f70_local4, properties = { itemType = "weapon_pistol", button_text = Engine.Localize( "MENU_PRIMARY_CAPS" ), style = GenericButtonSettings.Styles.GlassButton, substyle = GenericButtonSettings.Styles.GlassButton.SubStyles.Popup, text_align_without_content = LUI.Alignment.Left, desc_text = Engine.Localize( "@LUA_MENU_SELECT_SECOND_PRIMARY" ), additional_handlers = { button_action = function ( f81_arg0, f81_arg1 ) Cac.EditChooseSecondPrimary( f81_arg0, f81_arg1 ) end, button_over = f70_local0, button_over_disable = f70_local0, unlock_edit_popup = MBh.EmitEvent( { name = "button_unlock" } ) } }, children = { { type = "UIImage", id = "cac_edit_secondary_primary_new_icon", states = { default = { leftAnchor = false, rightAnchor = true, topAnchor = false, bottomAnchor = true, left = -32, right = 0, top = -28, bottom = 4, material = RegisterMaterial( "icon_perks_overkill" ), red = Colors.yellow.r, green = Colors.yellow.g, blue = Colors.yellow.b, alpha = 0 }, visible = { alpha = 1 } }, handlers = { menu_create = function ( f82_arg0, f82_arg1 ) if Engine.InFrontend() then local f82_local0 = LUI.FlowManager.GetMenuScopedDataFromElement( f82_arg0 ) if Cac.IsAbilityPickedBySlotName( f82_local0.controller, f82_local0.squadLocation, f82_local0.squadMemberIndex, f82_local0.classLocation, f82_local0.slot, "Elite", "specialty_twoprimaries", "abilitiesPicked" ) and Cac.IsWeaponClassSecondary( Cac.GetWeaponClass( Cac.GetWeapon( f82_local0.controller, f82_local0.squadLocation, f82_local0.squadMemberIndex, f82_local0.classLocation, f82_local0.slot, 1 ) ), true ) then f82_arg0:animateToState( "visible" ) else f82_arg0:animateToState( "default" ) end end end } } } } end f70_local1[#f70_local1 + 1] = { type = "UIElement", id = "cac_choose_type_button_spacer", states = { default = { topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = 0, left = 0, right = 0, height = GenericButtonDims.button_height } } } f70_local1[#f70_local1 + 1] = { type = "UIText", id = "cac_choose_type_button_description_id", properties = { text = "" }, handlers = { update_loadout_description_text = function ( f83_arg0, f83_arg1 ) f83_arg0:setText( f83_arg1.description_text ) end }, states = { default = { font = CoD.TextSettings.NormalFont.Font, topAnchor = true, bottomAnchor = false, leftAnchor = true, rightAnchor = true, top = 0, left = 4, right = 0, height = CoD.TextSettings.NormalFont.Height, alignment = LUI.Alignment.Left, alpha = 0.5 } } } return f70_local1 end end Cac.GetWeaponTypes = function ( f84_arg0 ) if f84_arg0 then return Cac.WeaponTypes.Primary else return Cac.WeaponTypes.Secondary end end Cac.GetWeaponList = function ( f85_arg0, f85_arg1 ) assert( Cac.Weapons[f85_arg0] ) local f85_local0 = {} for f85_local5, f85_local6 in ipairs( Cac.Weapons[f85_arg0] ) do local f85_local4 = Cac.IsWeaponEntitlement( f85_local6 ) if f85_local4 then f85_local4 = Cac.ShouldHideWeaponEntitlement( f85_arg1, f85_local6 ) end if not f85_local4 then f85_local0[#f85_local0 + 1] = f85_local6 end end return f85_local0 end Cac.GetWeaponListReleased = function ( f86_arg0 ) assert( Cac.Weapons[f86_arg0] ) local f86_local0 = {} for f86_local5, f86_local6 in ipairs( Cac.Weapons[f86_arg0] ) do local f86_local7 = Engine.TableLookup( Cac.WeaponUnlockTable.File, Cac.WeaponUnlockTable.Cols.WeaponRef, f86_local6, Cac.WeaponUnlockTable.Cols.ReleaseKillswitch ) local f86_local4 if f86_local7 ~= "" and Engine.GetDvarInt( f86_local7 ) ~= 1 then f86_local4 = false else f86_local4 = true end if f86_local4 then f86_local0[#f86_local0 + 1] = f86_local6 end end return f86_local0 end Cac.IsWeaponEntitlement = function ( f87_arg0 ) local f87_local0 = Engine.TableLookup( Cac.WeaponUnlockTable.File, Cac.WeaponUnlockTable.Cols.WeaponRef, f87_arg0, Cac.WeaponUnlockTable.Cols.IsEntitlement ) local f87_local1 if f87_local0 ~= "1" and f87_local0 ~= "2" and f87_local0 ~= "3" then f87_local1 = false else f87_local1 = true end return f87_local1 end Cac.IsWeaponEntitlementUnlocked = function ( f88_arg0, f88_arg1, f88_arg2 ) return Cac.IsWeaponItemUnlocked( f88_arg0, { UnlockType = "Weapon" }, f88_arg1, f88_arg2 ) end Cac.ShouldHideWeaponEntitlement = function ( f89_arg0, f89_arg1 ) return Cac.ShouldConcealCacItem( f89_arg0, { UnlockType = "Weapon", csv = Cac.WeaponUnlockTable.File, IsEntitlementColumn = Cac.WeaponUnlockTable.Cols.IsEntitlement, HideUnlessUnlockedColumn = Cac.WeaponUnlockTable.Cols.HideIfLocked, ReleaseKillswitch = Cac.WeaponUnlockTable.Cols.ReleaseKillswitch }, f89_arg1 ) end Cac.GetGameModeList = function ( f90_arg0 ) local f90_local0 = {} local f90_local1 = 0 local f90_local2 = 1000 for f90_local3 = f90_local1, f90_local2, 1 do local f90_local6 = Engine.TableLookupByRow( GameTypesTable.File, f90_local3, GameTypesTable.Cols.Category ) if f90_local6 == "" then break elseif f90_local6 == f90_arg0 then table.insert( f90_local0, Engine.TableLookupByRow( GameTypesTable.File, f90_local3, GameTypesTable.Cols.Ref ) ) end end return f90_local0 end Cac.GetGameModeTypeString = function ( f91_arg0 ) local f91_local0 = assert local f91_local1 if f91_arg0 ~= "Standard" and f91_arg0 ~= "Alternate" then f91_local1 = false else f91_local1 = true end f91_local0( f91_local1 ) if f91_arg0 == "Alternate" then return Engine.Localize( "@LUA_MENU_ALTERNATE_MODES" ) else return Engine.Localize( "@LUA_MENU_STANDARD_MODES" ) end end Cac.WeaponHasAttachmentsOfType = function ( f92_arg0, f92_arg1 ) local f92_local0 = Cac.GetAttachmentTypeList( f92_arg0 ) local f92_local1 = false for f92_local5, f92_local6 in ipairs( f92_local0 ) do if f92_local6 == f92_arg1 then f92_local1 = true break end end return f92_local1 end Cac.GetAttachmentListByType = function ( f93_arg0, f93_arg1 ) local f93_local0 = {} for f93_local1 = StatsTable.Cols.WeaponAttachFirst, StatsTable.Cols.WeaponAttachLast, 1 do local f93_local4 = Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f93_arg0, f93_local1 ) if f93_local4 ~= "" then if Cac.GetAttachmentType( f93_local4 ) == f93_arg1 then f93_local0[#f93_local0 + 1] = f93_local4 end end end return f93_local0 end Cac.GetGrenadeList = function ( f94_arg0 ) if f94_arg0 == 0 then return Cac.PrimaryGrenades elseif f94_arg0 == 1 then return Cac.SecondaryGrenades else end end Cac.GetGrenadeListNoNone = function ( f95_arg0 ) local f95_local0 = {} if f95_arg0 == 0 then f95_local0 = Cac.PrimaryGrenades elseif f95_arg0 == 1 then f95_local0 = Cac.SecondaryGrenades end local f95_local1 = {} for f95_local2 = 2, #f95_local0, 1 do f95_local1[f95_local2 - 1] = f95_local0[f95_local2] end return f95_local1 end Cac.GetPerkList = function ( f96_arg0 ) return Cac.Perks[f96_arg0] end Cac.GetPerkTypeDescription = function ( f97_arg0 ) return Engine.Localize( Cac.PerkTypes.Descriptions[f97_arg0] ) end Cac.GetPerkTypeNames = function ( f98_arg0 ) return Engine.Localize( Cac.PerkTypes.Strings[f98_arg0] ) end Cac.UpdateCamoGoldChallenge = function ( f99_arg0, f99_arg1, f99_arg2 ) if f99_arg1 == "iw6_knifeonly" or f99_arg1 == "uav" then return false elseif Cac.IsCamoChallengeComplete( f99_arg0, f99_arg1, CamoTable.GoldRef ) then return false else local f99_local0, f99_local1 = Cac.CountCamosForGold( f99_arg0, f99_arg1 ) if f99_local1 <= f99_local0 then if f99_arg2 then local f99_local2 = Cac.GetCamoChallengeRef( f99_arg1, CamoTable.GoldRef ) local f99_local3 = Cac.GetCamoChallengeTier( f99_arg1, CamoTable.GoldRef ) Engine.SetPlayerDataEx( f99_arg0, CoD.StatsGroup.Ranked, "challengeState", f99_local2, 2 ) end return true else return false end end end Cac.CountCamosForGold = function ( f100_arg0, f100_arg1 ) local f100_local0 = 0 local f100_local1 = 0 for f100_local5, f100_local6 in ipairs( Cac.GetCamoList( f100_arg0, f100_arg1 ) ) do if f100_local6 ~= "none" and f100_local6 ~= CamoTable.GoldRef and CamoTable.GlobalList[f100_local6] == nil and Cac.IsCamoOrReticleEntitlement( f100_local6 ) == false then f100_local0 = f100_local0 + 1 if Cac.IsCamoChallengeComplete( f100_arg0, f100_arg1, f100_local6 ) then f100_local1 = f100_local1 + 1 end end end return f100_local1, f100_local0 end Cac.GetCamoList = function ( f101_arg0, f101_arg1 ) if f101_arg1 == "iw6_knifeonly" or f101_arg1 == "uav" then local f101_local0 = {} return Engine.TableLookup( CamoTable.File, CamoTable.Cols.Index, CamoTable.ColIndexNone, CamoTable.Cols.Ref ) end local f101_local0 = 0 local f101_local1 = "" local f101_local2 = {} repeat f101_local1 = Engine.TableLookup( CamoTable.File, CamoTable.Cols.Index, tostring( f101_local0 ), CamoTable.Cols.Ref ) local f101_local3 if f101_local1 ~= "none" then f101_local3 = Cac.IsCamoOrReticleEntitlement( f101_local1 ) if f101_local3 then f101_local3 = Cac.ShouldHideCamoOrReticleEntitlement( f101_arg0, f101_local1 ) end else f101_local3 = false end if f101_local1 ~= "" and not f101_local3 then f101_local2[#f101_local2 + 1] = f101_local1 end f101_local0 = f101_local0 + 1 until f101_local1 == "" return f101_local2 end Cac.GetCamoChallengeRef = function ( f102_arg0, f102_arg1 ) local f102_local0 = nil local f102_local1 = Cac.GetCamoRefUnique( f102_arg0, f102_arg1 ) if CamoTable.GlobalList[f102_local1] then f102_local0 = Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f102_local1, CamoReticleUnlockTable.Cols.ChallengeRef ) else f102_local0 = string.format( "ch_%s%s", f102_arg0, Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f102_local1, CamoReticleUnlockTable.Cols.ChallengeRef ) ) end return f102_local0 end Cac.GetCamoOrReticleChallengeTier = function ( f103_arg0 ) return Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f103_arg0, CamoReticleUnlockTable.Cols.Tier ) end Cac.GetCamoOrReticleChallengeTitle = function ( f104_arg0 ) return Engine.TableLookup( AllChallengesTable.File, AllChallengesTable.Cols.Ref, f104_arg0, AllChallengesTable.Cols.Label ) end Cac.GetCamoOrReticleChallengeDesc = function ( f105_arg0 ) return Engine.TableLookup( AllChallengesTable.File, AllChallengesTable.Cols.Ref, f105_arg0, AllChallengesTable.Cols.Desc ) end Cac.GetCamoChallengeTier = function ( f106_arg0, f106_arg1 ) return Cac.GetCamoOrReticleChallengeTier( Cac.GetCamoRefUnique( f106_arg0, f106_arg1 ) ) end Cac.GetCamoChallengeProgress = function ( f107_arg0, f107_arg1, f107_arg2 ) return Cac.GetCamoOrReticleChallengeProgress( f107_arg0, Cac.GetCamoChallengeRef( f107_arg1, f107_arg2 ) ) end Cac.GetCamoChallengeSuffix = function ( f108_arg0 ) return Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f108_arg0, CamoReticleUnlockTable.Cols.ChallengeRef ) end Cac.GetCamoRefUnique = function ( f109_arg0, f109_arg1 ) local f109_local0 = nil if CamoTable.GlobalList[f109_arg1] then f109_local0 = f109_arg1 else f109_local0 = string.format( "%s_%s", Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f109_arg0, StatsTable.Cols.WeaponClass ), f109_arg1 ) end return f109_local0 end Cac.GetCamoChallengeTotal = function ( f110_arg0, f110_arg1, f110_arg2 ) local f110_local0 = Cac.GetCamoChallengeRef( f110_arg1, f110_arg2 ) local f110_local1 = Cac.GetCamoRefUnique( f110_arg1, f110_arg2 ) if string.find( f110_local0, "_allcamo" ) then local f110_local2, f110_local3 = Cac.CountCamosForGold( f110_arg0, f110_arg1 ) return f110_local3 else return Cac.GetCamoOrReticleChallengeTotal( f110_local0, f110_local1 ) end end Cac.IsCamoChallengeComplete = function ( f111_arg0, f111_arg1, f111_arg2 ) return Cac.IsCamoOrReticleChallengeComplete( f111_arg0, Cac.GetCamoChallengeRef( f111_arg1, f111_arg2 ), Cac.GetCamoRefUnique( f111_arg1, f111_arg2 ) ) end Cac.IsCamoOrReticleEntitlement = function ( f112_arg0 ) local f112_local0 = Cac.GetCamoOrReticleEntitlementType( f112_arg0 ) local f112_local1 if f112_local0 ~= "1" and f112_local0 ~= "2" and f112_local0 ~= "3" then f112_local1 = false else f112_local1 = true end return f112_local1 end Cac.GetCamoOrReticleEntitlementType = function ( f113_arg0 ) return Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f113_arg0, CamoReticleUnlockTable.Cols.IsEntitlement ) end Cac.IsCamoOrReticleHideIfLocked = function ( f114_arg0 ) return "1" == Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f114_arg0, CamoReticleUnlockTable.Cols.HideIfLocked ) end Cac.IsCamoOrReticleUnlockedInPrivate = function ( f115_arg0 ) local f115_local0 if Cac.IsCamoOrReticleEntitlement( f115_arg0 ) and (Cac.GetCamoOrReticleEntitlementType( f115_arg0 ) ~= "1" or Cac.IsCamoOrReticleHideIfLocked( f115_arg0 ) ~= false) then f115_local0 = false else f115_local0 = true end return f115_local0 end Cac.IsCamoOrReticleDLC = function ( f116_arg0 ) return "2" == Cac.GetCamoOrReticleEntitlementType( f116_arg0 ) end Cac.IsCamoOrReticleEntitlementUnlocked = function ( f117_arg0, f117_arg1, f117_arg2 ) return Cac.IsCamoReticleItemUnlocked( f117_arg0, { UnlockType = "CamoReticle" }, f117_arg1, f117_arg2 ) end Cac.ShouldHideCamoOrReticleEntitlement = function ( f118_arg0, f118_arg1 ) return Cac.ShouldConcealCacItem( f118_arg0, { UnlockType = "CamoReticle", csv = CamoReticleUnlockTable.File, IsEntitlementColumn = CamoReticleUnlockTable.Cols.IsEntitlement, HideUnlessUnlockedColumn = CamoReticleUnlockTable.Cols.HideIfLocked, ReleaseKillswitch = CamoReticleUnlockTable.Cols.ReleaseKillswitch }, f118_arg1 ) end Cac.GetCamoOrReticleEntitlementTitle = function ( f119_arg0 ) return Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f119_arg0, CamoReticleUnlockTable.Cols.Title ) end Cac.GetCamoOrReticleEntitlementDesc = function ( f120_arg0 ) return Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f120_arg0, CamoReticleUnlockTable.Cols.Desc ) end Cac.GetReticleDefault = function ( f121_arg0 ) return f121_arg0 .. "def" end Cac.GetReticleList = function ( f122_arg0, f122_arg1 ) local f122_local0 = {} if f122_arg1 then f122_local0[#f122_local0 + 1] = Cac.GetReticleDefault( f122_arg1 ) for f122_local4, f122_local5 in ipairs( Cac.Reticles.Generics ) do f122_local0[#f122_local0 + 1] = f122_local5 end for f122_local1 = 1, Cac.Reticles.NumCustom, 1 do f122_local0[#f122_local0 + 1] = string.format( "%s%02d", f122_arg1, f122_local1 ) end f122_local0[#f122_local0 + 1] = Cac.Reticles.ClanReward f122_local1 = 0 f122_local2 = "" repeat f122_local2 = Engine.TableLookupByRow( ReticleTable.File, f122_local1, ReticleTable.Cols.Ref ) if f122_local2 and f122_local2 ~= "" and Cac.IsCamoOrReticleEntitlement( f122_local2 ) and not Cac.ShouldHideCamoOrReticleEntitlement( f122_arg0, f122_local2 ) then f122_local0[#f122_local0 + 1] = f122_local2 end f122_local1 = f122_local1 + 1 if f122_local2 then end until f122_local2 == "" else f122_local0 = { Cac.Reticles.None } end return f122_local0 end Cac.GetReticleRefUnique = function ( f123_arg0, f123_arg1 ) return string.format( "%s_%s", f123_arg0, f123_arg1 ) end Cac.GetReticleChallengeRef = function ( f124_arg0, f124_arg1 ) local f124_local0 = Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, string.format( "%s_%s", f124_arg0, f124_arg1 ), CamoReticleUnlockTable.Cols.ChallengeRef ) if f124_local0 == "" then f124_local0 = nil end return f124_local0 end Cac.GetReticleChallenge = function ( f125_arg0 ) return Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f125_arg0, CamoReticleUnlockTable.Cols.ChallengeRef ) end Cac.GetReticleChallengeTotal = function ( f126_arg0, f126_arg1 ) return Cac.GetCamoOrReticleChallengeTotal( Cac.GetReticleChallengeRef( f126_arg0, f126_arg1 ), Cac.GetReticleRefUnique( f126_arg0, f126_arg1 ) ) end Cac.IsReticleChallengeComplete = function ( f127_arg0, f127_arg1, f127_arg2 ) return Cac.IsCamoOrReticleChallengeComplete( f127_arg0, Cac.GetReticleChallengeRef( f127_arg1, f127_arg2 ), Cac.GetReticleRefUnique( f127_arg1, f127_arg2 ) ) end Cac.IsReticleValid = function ( f128_arg0, f128_arg1, f128_arg2 ) if not f128_arg1 or not f128_arg2 then return false elseif f128_arg2 == Cac.Reticles.None then return false end for f128_local3, f128_local4 in ipairs( Cac.GetReticleList( f128_arg0, f128_arg1 ) ) do if f128_local4 == f128_arg2 then return true end end return false end Cac.GetCamoOrReticleChallengeProgress = function ( f129_arg0, f129_arg1 ) if string.find( f129_arg1, "_allcamo" ) then local f129_local0, f129_local1 = Cac.CountCamosForGold( f129_arg0, getWeaponOperationWeaponName( f129_arg1 ) ) return f129_local0 else return Engine.GetPlayerDataEx( f129_arg0, CoD.StatsGroup.Ranked, "challengeProgress", f129_arg1 ) end end Cac.GetCamoOrReticleChallengeTotal = function ( f130_arg0, f130_arg1 ) return tonumber( Engine.TableLookup( AllChallengesTable.File, AllChallengesTable.Cols.Ref, f130_arg0, AllChallengesTable.Cols["Target" .. Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f130_arg1, CamoReticleUnlockTable.Cols.Tier )] ) ) end Cac.IsCamoOrReticleChallengeComplete = function ( f131_arg0, f131_arg1, f131_arg2 ) if not IsPublicMatch() then return true else return tonumber( Engine.TableLookup( CamoReticleUnlockTable.File, CamoReticleUnlockTable.Cols.CamoReticleRef, f131_arg2, CamoReticleUnlockTable.Cols.Tier ) ) < Engine.GetPlayerDataEx( f131_arg0, CoD.StatsGroup.Ranked, "challengeState", f131_arg1 ) end end Cac.SetAttachment = function ( f132_arg0, f132_arg1, f132_arg2, f132_arg3, f132_arg4, f132_arg5, f132_arg6, f132_arg7 ) Cac.SetCacConfig( f132_arg0, f132_arg1, f132_arg2, f132_arg3, f132_arg4, "weaponSetups", f132_arg5, "attachment", f132_arg6, f132_arg7 ) end Cac.SetLoadoutItem = function ( f133_arg0, f133_arg1, f133_arg2, f133_arg3, f133_arg4, f133_arg5, f133_arg6, f133_arg7, f133_arg8, f133_arg9, f133_arg10 ) for f133_local8, f133_local9 in pairs( f133_arg9 ) do if f133_arg10 then for f133_local6, f133_local7 in pairs( f133_arg10 ) do f133_arg7( f133_arg0, f133_arg1, f133_arg2, f133_arg3, f133_arg4, f133_local9, f133_local7, f133_arg8( f133_arg0, f133_arg1, f133_arg2, f133_arg5, f133_arg6, f133_local9, f133_local7 ) ) end end f133_arg7( f133_arg0, f133_arg1, f133_arg2, f133_arg3, f133_arg4, f133_local9, f133_arg8( f133_arg0, f133_arg1, f133_arg2, f133_arg5, f133_arg6, f133_local9 ) ) end end Cac.SetAbilities = function ( f134_arg0, f134_arg1, f134_arg2, f134_arg3, f134_arg4, f134_arg5, f134_arg6, f134_arg7 ) Cac.ResetAbilities( f134_arg0, f134_arg1, f134_arg2, f134_arg3, f134_arg4, f134_arg7, false, true ) for f134_local4, f134_local5 in pairs( Cac.Abilities.Types ) do for f134_local3 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.IsAbilityPicked( f134_arg0, f134_arg1, f134_arg2, f134_arg5, f134_arg6, f134_local5, f134_local3 - 1, f134_arg7 ) then Cac.ToggleAbility( f134_arg0, f134_arg1, f134_arg2, f134_arg3, f134_arg4, f134_local5, f134_local3 - 1, f134_arg7, false, false, true ) end end end end Cac.SetLoadout = function ( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6 ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetWeapon, Cac.GetWeapon, { Cac.Indices.Weapons.Primary } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetAttachment, Cac.GetAttachment, { Cac.Indices.Weapons.Primary }, { Cac.Indices.Attachments.PrimaryAttachment1, Cac.Indices.Attachments.PrimaryAttachment2, Cac.Indices.Attachments.PrimaryAttachment3 } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetWeaponCamo, Cac.GetCamo, { Cac.Indices.Weapons.Primary } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetWeaponReticle, Cac.GetReticle, { Cac.Indices.Weapons.Primary } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetWeapon, Cac.GetWeapon, { Cac.Indices.Weapons.Secondary } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetAttachment, Cac.GetAttachment, { Cac.Indices.Weapons.Secondary }, { Cac.Indices.Attachments.SecondaryAttachment1, Cac.Indices.Attachments.SecondaryAttachment2 } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetWeaponReticle, Cac.GetReticle, { Cac.Indices.Weapons.Secondary } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetPerk, Cac.GetPerk, { Cac.Indices.Grenade.Primary } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetPerk, Cac.GetPerk, { Cac.Indices.Grenade.Secondary } ) Cac.SetAbilities( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, "abilitiesPicked" ) local f135_local0 = Cac.GetStreakType( f135_arg0, f135_arg1, f135_arg2, f135_arg5, f135_arg6 ) local f135_local1 = "specialistBonusStreaks" if f135_local0 == "specialty_null" then f135_local0 = "streaktype_assault" end f135_local0 = Cac.GetStreakTypeReference( f135_local0 ) Cac.ResetKillstreak( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_local0 ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetPerk, Cac.GetPerk, { Cac.Indices.StreakType } ) Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetKillstreak, Cac.GetStreak, { f135_local0 }, { Cac.Indices.Killstreaks.Streak1, Cac.Indices.Killstreaks.Streak2, Cac.Indices.Killstreaks.Streak3 } ) if f135_local0 == "specialistStreaks" then Cac.SetLoadoutItem( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, Cac.SetSpecialistKills, Cac.GetSpecialistKills, { Cac.Indices.Killstreaks.Streak1, Cac.Indices.Killstreaks.Streak2, Cac.Indices.Killstreaks.Streak3 } ) Cac.SetAbilities( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, f135_arg5, f135_arg6, f135_local1 ) end local f135_local2 = Cac.GetLoadoutName( f135_arg0, f135_arg1, f135_arg2, f135_arg5, f135_arg6 ) if Cac.IsDefaultClass( f135_arg3 ) then MatchRules.SetData( "defaultClasses", Cac.Settings.DataLoc[f135_arg3].teamName, f135_arg4, "class", "name", f135_local2 ) else Cac.SetCacConfig( f135_arg0, f135_arg1, f135_arg2, f135_arg3, f135_arg4, "name", f135_local2 ) end end Cac.SetWeaponCamo = function ( f136_arg0, f136_arg1, f136_arg2, f136_arg3, f136_arg4, f136_arg5, f136_arg6 ) Cac.SetCacConfig( f136_arg0, f136_arg1, f136_arg2, f136_arg3, f136_arg4, "weaponSetups", f136_arg5, "camo", f136_arg6 ) end Cac.SetWeaponBuff = function ( f137_arg0, f137_arg1, f137_arg2, f137_arg3, f137_arg4, f137_arg5, f137_arg6 ) Cac.SetCacConfig( f137_arg0, f137_arg1, f137_arg2, f137_arg3, f137_arg4, "weaponSetups", f137_arg5, "buff", f137_arg6 ) end Cac.SetWeaponReticle = function ( f138_arg0, f138_arg1, f138_arg2, f138_arg3, f138_arg4, f138_arg5, f138_arg6 ) Cac.SetCacConfig( f138_arg0, f138_arg1, f138_arg2, f138_arg3, f138_arg4, "weaponSetups", f138_arg5, "reticle", f138_arg6 ) end Cac.SetWeaponToDefaultUnlock = function ( f139_arg0, f139_arg1, f139_arg2, f139_arg3, f139_arg4 ) local f139_local0 if f139_arg4 == Cac.Indices.Weapons.Primary then f139_local0 = "iw6_sc2010" if not f139_local0 then else Cac.SetCacConfig( f139_arg0, f139_arg1, f139_arg2, "loadouts", f139_arg3, "weaponSetups", f139_arg4, "weapon", f139_local0 ) Cac.SetCacConfig( f139_arg0, f139_arg1, f139_arg2, "loadouts", f139_arg3, "weaponSetups", f139_arg4, "attachment", 0, "none" ) Cac.SetCacConfig( f139_arg0, f139_arg1, f139_arg2, "loadouts", f139_arg3, "weaponSetups", f139_arg4, "attachment", 1, "none" ) if f139_arg4 == Cac.Indices.Weapons.Primary then Cac.SetCacConfig( f139_arg0, f139_arg1, f139_arg2, "loadouts", f139_arg3, "weaponSetups", f139_arg4, "attachment", 2, "none" ) Cac.SetCacConfig( f139_arg0, f139_arg1, f139_arg2, "loadouts", f139_arg3, "weaponSetups", f139_arg4, "camo", "none" ) Cac.SetCacConfig( f139_arg0, f139_arg1, f139_arg2, "loadouts", f139_arg3, "weaponSetups", f139_arg4, "reticle", "none" ) end end end f139_local0 = "none" end Cac.SetWeapon = function ( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, f140_arg6 ) local f140_local0 = Cac.GetWeapon( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5 ) if f140_local0 ~= f140_arg6 then Cac.SetAttachment( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, 0, "none" ) Cac.SetAttachment( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, 1, "none" ) Cac.SetAttachment( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, 2, "none" ) Cac.SetWeaponBuff( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, "none" ) Cac.SetWeaponCamo( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, "none" ) if Cac.WeaponHasReticles( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5 ) then Cac.SetWeaponReticle( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, "default" ) else Cac.SetWeaponReticle( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, f140_arg5, "none" ) end Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "weaponSetups", f140_arg5, "weapon", f140_arg6 ) if f140_arg5 == 0 then local f140_local1 = Cac.BuildPrimaryWeaponName( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4 ) local f140_local2 = Engine.GetLuiRoot() f140_local2:processEvent( { name = "weapon_change_start", new_weapon = f140_local1, prev_weapon = f140_local0 } ) else local f140_local1 = Engine.GetLuiRoot() f140_local1:processEvent( { name = "weapon_changed_stowed", weapon = f140_arg6 } ) end end local f140_local1 = Cac.GetWeaponClass( Cac.GetWeapon( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, Cac.Indices.Weapons.Primary ) ) if f140_local1 == "weapon_assault" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_assault" ) elseif f140_local1 == "weapon_smg" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_smg" ) elseif f140_local1 == "weapon_lmg" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_lmg" ) elseif f140_local1 == "weapon_dmr" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_dmr" ) elseif f140_local1 == "weapon_sniper" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_sniper" ) elseif f140_local1 == "weapon_shotgun" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_shotgun" ) elseif f140_local1 == "weapon_riot" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_assault" ) elseif f140_local1 == "weapon_knifefast" then Cac.SetCacConfig( f140_arg0, f140_arg1, f140_arg2, f140_arg3, f140_arg4, "type", "charactertype_smg" ) end end Cac.GetWeaponUnlockRank = function ( f141_arg0 ) return Engine.TableLookup( getProperUnlockTable( f141_arg0 ), UnlockTable.Cols.ItemId, f141_arg0, UnlockTable.Cols.Rank ) end Cac.SetPerk = function ( f142_arg0, f142_arg1, f142_arg2, f142_arg3, f142_arg4, f142_arg5, f142_arg6 ) return Cac.SetCacConfig( f142_arg0, f142_arg1, f142_arg2, f142_arg3, f142_arg4, "perks", f142_arg5, f142_arg6 ) end Cac.SetFirstUnlockedGrenade = function ( f143_arg0, f143_arg1, f143_arg2, f143_arg3, f143_arg4, f143_arg5 ) local f143_local0 = Cac.GetGrenadeList( f143_arg5 ) for f143_local1 = 1, #f143_local0, 1 do if Cac.IsItemUnlocked( f143_arg0, f143_arg1, f143_arg2, f143_local0[f143_local1] ) then Cac.SetPerk( f143_arg0, f143_arg1, f143_arg2, f143_arg3, f143_arg4, f143_arg5, f143_local0[f143_local1] ) break end end end Cac.SetFirstUnlockedPistol = function ( f144_arg0, f144_arg1, f144_arg2, f144_arg3, f144_arg4 ) local f144_local0 = Cac.GetWeaponList( "weapon_pistol", f144_arg0 ) for f144_local1 = 1, #f144_local0, 1 do if Cac.IsItemUnlocked( f144_arg0, f144_arg1, f144_arg2, f144_local0[f144_local1] ) then Cac.SetWeapon( f144_arg0, f144_arg1, f144_arg2, f144_arg3, f144_arg4, 1, f144_local0[f144_local1] ) local f144_local4 = Engine.GetLuiRoot() f144_local4:processEvent( { name = "weapon_changed_stowed", weapon = f144_local0[f144_local1] } ) return end end Cac.SetWeapon( f144_arg0, f144_arg1, f144_arg2, f144_arg3, f144_arg4, 1, "none" ) end Cac.SetKillstreak = function ( f145_arg0, f145_arg1, f145_arg2, f145_arg3, f145_arg4, f145_arg5, f145_arg6, f145_arg7 ) return Cac.SetCacConfig( f145_arg0, f145_arg1, f145_arg2, f145_arg3, f145_arg4, f145_arg5, f145_arg6, f145_arg7 ) end Cac.GetKillstreak = function ( f146_arg0, f146_arg1, f146_arg2, f146_arg3, f146_arg4, f146_arg5, f146_arg6 ) return Cac.GetCacConfig( f146_arg0, f146_arg1, f146_arg2, f146_arg3, f146_arg4, f146_arg5, f146_arg6 ) end Cac.SetSpecialistKills = function ( f147_arg0, f147_arg1, f147_arg2, f147_arg3, f147_arg4, f147_arg5, f147_arg6 ) return Cac.SetCacConfig( f147_arg0, f147_arg1, f147_arg2, f147_arg3, f147_arg4, "specialistStreakKills", f147_arg5, f147_arg6 ) end Cac.GetSpecialistKills = function ( f148_arg0, f148_arg1, f148_arg2, f148_arg3, f148_arg4, f148_arg5 ) return Cac.GetCacConfig( f148_arg0, f148_arg1, f148_arg2, f148_arg3, f148_arg4, "specialistStreakKills", f148_arg5 ) end Cac.AttachmentHasReticles = function ( f149_arg0 ) return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f149_arg0, AttachmentTable.Cols.Reticles ) == "TRUE" end Cac.GetAttachments = function ( f150_arg0, f150_arg1, f150_arg2, f150_arg3, f150_arg4, f150_arg5 ) local f150_local0 = {} local f150_local1 = Cac.GetAttachment( f150_arg0, f150_arg1, f150_arg2, f150_arg3, f150_arg4, f150_arg5, 0 ) local f150_local2 = Cac.GetAttachment( f150_arg0, f150_arg1, f150_arg2, f150_arg3, f150_arg4, f150_arg5, 1 ) local f150_local3 = Cac.GetAttachment( f150_arg0, f150_arg1, f150_arg2, f150_arg3, f150_arg4, f150_arg5, 2 ) return f150_local1 end Cac.GetAttachmentClassInUse = function ( f151_arg0, f151_arg1, f151_arg2, f151_arg3, f151_arg4, f151_arg5, f151_arg6 ) local f151_local0 = Cac.GetAttachments( f151_arg0, f151_arg1, f151_arg2, f151_arg3, f151_arg4, f151_arg5 ) for f151_local1 = 1, #f151_local0, 1 do if Cac.GetAttachmentType( f151_local0[f151_local1] ) == f151_arg6 then return f151_local1 - 1 end end end Cac.EquippedAttachmentsHaveReticles = function ( f152_arg0, f152_arg1, f152_arg2, f152_arg3, f152_arg4, f152_arg5 ) for f152_local0 = 0, 2, 1 do if Cac.AttachmentHasReticles( Cac.GetAttachment( f152_arg0, f152_arg1, f152_arg2, f152_arg3, f152_arg4, f152_arg5, f152_local0 ) ) then return true end end return false end Cac.WeaponHasReticles = function ( f153_arg0, f153_arg1, f153_arg2, f153_arg3, f153_arg4, f153_arg5 ) local f153_local0 = false for f153_local1 = 0, 2, 1 do if Cac.AttachmentHasReticles( Cac.GetAttachment( f153_arg0, f153_arg1, f153_arg2, f153_arg3, f153_arg4, f153_arg5, f153_local1 ) ) then f153_local0 = true break end end return f153_local0 end Cac.GetAttachmentWithReticles = function ( f154_arg0, f154_arg1, f154_arg2, f154_arg3, f154_arg4, f154_arg5 ) local f154_local0, f154_local1 = nil for f154_local2 = 0, 2, 1 do local f154_local5 = Cac.GetAttachment( f154_arg0, f154_arg1, f154_arg2, f154_arg3, f154_arg4, f154_arg5, f154_local2 ) if Cac.AttachmentHasReticles( f154_local5 ) then f154_local0 = f154_local5 f154_local1 = f154_local2 break end end return f154_local0, f154_local1 end Cac.GetMaxAbilityLevel = function ( f155_arg0, f155_arg1, f155_arg2, f155_arg3 ) return Engine.GetPlayerDataEx( f155_arg0, CoD.GetStatsGroupForGameMode(), f155_arg1 .. "AbilitySlotsUnlocked", f155_arg3 ) end Cac.CountSpentPoints = function ( f156_arg0, f156_arg1, f156_arg2, f156_arg3, f156_arg4, f156_arg5 ) local f156_local0 = 0 for f156_local5, f156_local6 in pairs( Cac.Abilities.Types ) do for f156_local4 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.IsAbilityPicked( f156_arg0, f156_arg1, f156_arg2, f156_arg3, f156_arg4, f156_local6, f156_local4 - 1, f156_arg5 ) then f156_local0 = f156_local0 + Cac.GetPerkCost( Cac.GetAbilitySlotRef( Cac.GetAbilityRef( f156_local6 ), f156_local4 ) ) end end end return f156_local0 end Cac.ToggleAbility = function ( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, f157_arg5, f157_arg6, f157_arg7, f157_arg8, f157_arg9, f157_arg10 ) local f157_local0 = Cac.IsAbilityPicked( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, f157_arg5, f157_arg6, f157_arg7 ) local f157_local1 if f157_arg9 then f157_local1 = Cac.Abilities.Settings.SpecialistCapacity if not f157_local1 then else local f157_local2 = f157_local1 - Cac.CountSpentPoints( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, f157_arg7 ) local f157_local3 = Cac.GetAbilitySlotRef( Cac.GetAbilityRef( f157_arg5 ), f157_arg6 + 1 ) local f157_local4 = tonumber( Cac.GetPerkCost( f157_local3 ) ) if not f157_local4 then DebugPrint( "The cost is not defined for the ability being toggled. This is alright as long as the ability you're toggling is placeholder." ) elseif f157_local0 or f157_local4 <= f157_local2 then Cac.SetCacConfig( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, f157_arg7, f157_arg5, f157_arg6, not f157_local0 ) if f157_local3 == "specialty_extra_attachment" and not f157_arg10 then Cac.SetAttachment( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, 0, 2, "none" ) Cac.SetAttachment( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, 1, 1, "none" ) Cac.ValidateReticle( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, 0 ) elseif f157_local3 == "specialty_twoprimaries" and not f157_arg10 and Cac.IsWeaponClassPrimary( Cac.GetWeaponClass( Cac.GetWeapon( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, 1 ) ) ) then Cac.SetFirstUnlockedPistol( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4 ) Cac.SetAttachment( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, 1, 0, "none" ) Cac.SetAttachment( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4, 1, 1, "none" ) end elseif f157_arg8 then Engine.PlaySound( CoD.SFX.DenySelect ) end end end f157_local1 = Cac.CalculateAbilityCapacity( f157_arg0, f157_arg1, f157_arg2, f157_arg3, f157_arg4 ) end Cac.RemoveLastPerk = function ( f158_arg0, f158_arg1, f158_arg2, f158_arg3, f158_arg4, f158_arg5, f158_arg6 ) local f158_local0, f158_local1 = nil for f158_local7, f158_local8 in ipairs( Cac.GetAbilityTypes() ) do for f158_local6 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.IsAbilityPicked( f158_arg0, f158_arg1, f158_arg2, f158_arg3, f158_arg4, f158_local8, f158_local6 - 1, f158_arg5 ) then local f158_local5 = Cac.GetAbilitySlotRef( Cac.GetAbilityRef( f158_local8 ), f158_local6 ) if (not f158_arg6 or f158_local5 ~= "specialty_extra_attachment") and (not f158_arg6 or f158_local5 ~= "specialty_twoprimaries") then f158_local0 = f158_local8 f158_local1 = f158_local6 end end end end Cac.ToggleAbility( f158_arg0, f158_arg1, f158_arg2, f158_arg3, f158_arg4, f158_local0, f158_local1 - 1, f158_arg5, nil, true ) end Cac.ResetAbilities = function ( f159_arg0, f159_arg1, f159_arg2, f159_arg3, f159_arg4, f159_arg5, f159_arg6, f159_arg7 ) for f159_local4, f159_local5 in pairs( Cac.Abilities.Types ) do for f159_local3 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.IsAbilityPicked( f159_arg0, f159_arg1, f159_arg2, f159_arg3, f159_arg4, f159_local5, f159_local3 - 1, f159_arg5 ) then Cac.ToggleAbility( f159_arg0, f159_arg1, f159_arg2, f159_arg3, f159_arg4, f159_local5, f159_local3 - 1, f159_arg5, nil, f159_arg6, f159_arg7 ) end end end end Cac.ResetKillstreak = function ( f160_arg0, f160_arg1, f160_arg2, f160_arg3, f160_arg4, f160_arg5 ) for f160_local0 = 1, 3, 1 do Cac.SetKillstreak( f160_arg0, f160_arg1, f160_arg2, f160_arg3, f160_arg4, f160_arg5, f160_local0 - 1, "none" ) if f160_arg5 == "specialistStreaks" then Cac.SetSpecialistKills( f160_arg0, f160_arg1, f160_arg2, f160_arg3, f160_arg4, f160_local0 - 1, 0 ) end end end Cac.GetPerformanceKills = function ( f161_arg0, f161_arg1 ) return Engine.GetPlayerDataEx( f161_arg0, CoD.StatsGroup.Ranked, "weaponStats", f161_arg1, "kills" ) end Cac.GetPerformanceDeaths = function ( f162_arg0, f162_arg1 ) return Engine.GetPlayerDataEx( f162_arg0, CoD.StatsGroup.Ranked, "weaponStats", f162_arg1, "deaths" ) end Cac.GetPerformanceHeadshots = function ( f163_arg0, f163_arg1 ) return Engine.GetPlayerDataEx( f163_arg0, CoD.StatsGroup.Ranked, "weaponStats", f163_arg1, "headShots" ) end Cac.GetPerformanceHits = function ( f164_arg0, f164_arg1 ) return Engine.GetPlayerDataEx( f164_arg0, CoD.StatsGroup.Ranked, "weaponStats", f164_arg1, "hits" ) end Cac.GetPerformanceShots = function ( f165_arg0, f165_arg1 ) return Engine.GetPlayerDataEx( f165_arg0, CoD.StatsGroup.Ranked, "weaponStats", f165_arg1, "shots" ) end Cac.GetPerformanceKDR = function ( f166_arg0, f166_arg1 ) local f166_local0 = Cac.GetPerformanceKills( f166_arg0, f166_arg1 ) local f166_local1 = Cac.GetPerformanceDeaths( f166_arg0, f166_arg1 ) if f166_local1 == 0 then return f166_local0 else return f166_local0 / f166_local1 end end Cac.GetPerformanceAccuracy = function ( f167_arg0, f167_arg1 ) local f167_local0 = Cac.GetPerformanceHits( f167_arg0, f167_arg1 ) local f167_local1 = Cac.GetPerformanceShots( f167_arg0, f167_arg1 ) if f167_local1 == 0 then return 0 else return 100 * f167_local0 / f167_local1 end end function InitKillstreakRefArray( f168_arg0 ) local f168_local0 = 0 local f168_local1 = {} if f168_arg0 == "streaktype_assault" then f168_local0 = 12 f168_local1 = { ks_1 = "uplink", ks_2 = "ims", ks_3 = "guard_dog", ks_4 = "sentry", ks_5 = "drone_hive", ks_6 = "helicopter", ks_7 = "ball_drone_backup", ks_8 = "vanguard", ks_9 = "airdrop_juggernaut_maniac", ks_10 = "airdrop_juggernaut", ks_11 = "heli_pilot", ks_12 = "odin_assault" } elseif f168_arg0 == "streaktype_support" then f168_local0 = 12 f168_local1 = { ks_1 = "uplink_support", ks_2 = "deployable_ammo", ks_3 = "deployable_vest", ks_4 = "aa_launcher", ks_5 = "ball_drone_radar", ks_6 = "recon_agent", ks_7 = "jammer", ks_8 = "air_superiority", ks_9 = "heli_sniper", ks_10 = "uav_3dping", ks_11 = "airdrop_juggernaut_recon", ks_12 = "odin_support" } end return f168_local1, f168_local0 end function InitKillstreakArrays( f169_arg0 ) local f169_local0 = f169_arg0 local f169_local1 = Cac local f169_local2 = Cac f169_local1.KillstreakRefArray, f169_local2.KillstreakRefArraySize = InitKillstreakRefArray( f169_local0 ) end Cac.GetStrippedWeaponName = function ( f170_arg0, f170_arg1 ) local f170_local0 = nil local f170_local1, f170_local2 = string.find( f170_arg0, "edit_grenade_" ) if f170_local1 ~= nil and f170_local2 ~= nil then f170_local0 = "grenade" else if f170_arg1 then f170_local1, f170_local2 = string.find( f170_arg0, "iw6_" ) if f170_local1 == nil then f170_local1, f170_local2 = string.find( f170_arg0, "iw5_" ) end end if f170_local1 == nil then f170_local1, f170_local2 = string.find( f170_arg0, "edit_weapon_" ) end if f170_local1 ~= nil and f170_local2 ~= nil then f170_local0 = "weapon" end end local f170_local3 = nil if f170_local1 ~= nil and f170_local2 ~= nil then f170_local3 = string.sub( f170_arg0, f170_local2 + 1, string.len( f170_arg0 ) ) end if f170_arg1 and f170_local3 ~= nil then f170_local1, f170_local2 = string.find( f170_local3, "_mp" ) if f170_local1 ~= nil and f170_local2 ~= nil then f170_local3 = string.sub( f170_local3, 0, f170_local1 - 1 ) end end if f170_local3 ~= nil and string.len( f170_local3 ) then return f170_local3, f170_local0 else return nil, nil end end Cac.GetChallengeIndexName = function ( f171_arg0 ) local f171_local0 = Cac.GetStrippedWeaponName( f171_arg0, true ) if f171_local0 ~= nil and string.len( f171_local0 ) > 0 then return "ch_" .. f171_local0 .. "_purchase" else return nil end end Cac.PerformPermanentUnlock = function ( f172_arg0, f172_arg1, f172_arg2 ) local f172_local0 = nil if f172_arg2 ~= nil and string.len( f172_arg2 ) > 0 then f172_local0 = "ch_" .. f172_arg2 .. "_purchase" Engine.SetPlayerDataEx( f172_arg1.controller, CoD.StatsGroup.Ranked, "challengeState", f172_local0, 2 ) Engine.SetPlayerDataEx( f172_arg1.controller, CoD.StatsGroup.Ranked, "challengeProgress", f172_local0, 2 ) Cac.DecrementPrestigeToken( f172_arg0, f172_arg1 ) end end Cac.IsItemPermanentlyUnlocked = function ( f173_arg0 ) local f173_local0, f173_local1 = false local f173_local2 = Cac.GetChallengeIndexName( f173_arg0 ) if f173_local2 == nil then f173_local0 = false f173_local1 = " N:ERR" elseif Engine.CheckPlayerData( CoD.StatsGroup.Ranked, "challengeProgress", f173_local2 ) then if Engine.GetPlayerData( CoD.StatsGroup.Ranked, "challengeProgress", f173_local2 ) >= 2 then f173_local0 = true f173_local1 = nil end else f173_local0 = true f173_local1 = " ERR" end return f173_local0, f173_local1 end Cac.AddTeamName = function ( f174_arg0, f174_arg1, f174_arg2 ) if Cac.IsDefaultClass( f174_arg0 ) then return { type = "UIText", id = "team_name_text_" .. f174_arg1, states = { default = { height = CoD.TextSettings.NormalFont.Height + 2, font = CoD.TextSettings.NormalFont.Font, left = f174_arg2 or 0, right = GenericMenuDims.menu_right, alignment = LUI.Alignment.Left } }, properties = { text = Cac.GetTeamName( f174_arg0 ) } } else return nil end end Cac.GetTeamName = function ( f175_arg0 ) return GetCurrentGameType() and Cac.Settings.DataLoc[f175_arg0].infectedString or Cac.Settings.DataLoc[f175_arg0].string end Cac.HasPrestigeTokens = function ( f176_arg0, f176_arg1 ) return Engine.GetPlayerData( CoD.StatsGroup.Ranked, "prestigeShopTokens" ) > 0 end Cac.DecrementPrestigeToken = function ( f177_arg0, f177_arg1 ) local f177_local0 = Engine.GetPlayerData( CoD.StatsGroup.Ranked, "prestigeShopTokens" ) if f177_local0 >= 1 then Engine.SetPlayerDataEx( f177_arg1.controller, CoD.StatsGroup.Ranked, "prestigeShopTokens", f177_local0 - 1 ) end end Cac.GetActiveCharacterImageStates = function () return { default = CoD.ColorizeState( Colors.frontend_hilite, { material = RegisterMaterial( "icon_party_leader" ), leftAnchor = false, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = 16, top = 0, bottom = 16, alpha = 0 } ), button_up = { leftAnchor = false, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = 16, top = 0, bottom = 16, alpha = 1 }, button_over = { leftAnchor = false, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 40, right = 56, top = 0, bottom = 16, alpha = 1 }, popped = { leftAnchor = false, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 32, right = 64, top = -8, bottom = 24, alpha = 1 }, popped_unfocused = { leftAnchor = false, rightAnchor = true, topAnchor = true, bottomAnchor = false, left = 0, right = 32, top = -8, bottom = 24, alpha = 1 } } end Cac.ShuffleAttachmentsDown = function ( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5 ) local f179_local0 = Cac.GetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 0 ) local f179_local1 = Cac.GetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 1 ) local f179_local2 = Cac.GetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 2 ) if f179_local0 == "none" and f179_local1 == "none" and f179_local2 ~= "none" then Cac.SetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 0, f179_local2 ) Cac.SetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 2, "none" ) f179_local0 = f179_local2 f179_local2 = "none" elseif f179_local0 == "none" and f179_local1 ~= "none" then Cac.SetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 0, f179_local1 ) Cac.SetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 1, "none" ) f179_local0 = f179_local1 f179_local1 = "none" end if f179_local1 == "none" and f179_local2 ~= "none" then Cac.SetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 1, f179_local2 ) Cac.SetAttachment( f179_arg0, f179_arg1, f179_arg2, f179_arg3, f179_arg4, f179_arg5, 2, "none" ) f179_local1 = f179_local2 f179_local2 = "none" end end Cac.IsCamoOrReticleUnlocked = function ( f180_arg0, f180_arg1, f180_arg2, f180_arg3, f180_arg4, f180_arg5, f180_arg6, f180_arg7 ) local f180_local0, f180_local1, f180_local2 = false if Cac.IsCamoOrReticleEntitlement( f180_arg6 ) then f180_local0 = true else local f180_local3 = "" if f180_arg7 == "camo" then local f180_local4 = Cac.GetWeapon( f180_arg0, f180_arg1, f180_arg2, f180_arg3, f180_arg4, f180_arg5 ) if (f180_local4 == "none" or f180_local4 == "iw6_knifeonly") and f180_arg6 ~= "none" then return false, false end f180_local3 = Cac.GetCamoRefUnique( f180_local4, f180_arg6 ) f180_local2 = Cac.GetCamoChallengeRef( f180_local4, f180_arg6 ) elseif f180_arg7 == "reticle" then local f180_local4 = Cac.GetAttachmentWithReticles( f180_arg0, f180_arg1, f180_arg2, f180_arg3, f180_arg4, f180_arg5 ) if f180_local4 then f180_local3 = Cac.GetReticleRefUnique( f180_local4, f180_arg6 ) f180_local2 = Cac.GetReticleChallengeRef( f180_local4, f180_arg6 ) end end f180_local1 = Cac.GetCamoOrReticleChallengeTier( f180_local3 ) end local f180_local3 = nil if f180_local0 then if f180_arg1 == "privateMatchSquadMembers" and Cac.IsCamoOrReticleUnlockedInPrivate( f180_arg6 ) then f180_local3 = true else f180_local3 = Cac.IsCamoOrReticleEntitlementUnlocked( f180_arg0, f180_arg6, f180_arg1 == "privateMatchSquadMembers" ) end else f180_local3 = Cac.IsItemUnlocked( f180_arg0, f180_arg1, f180_arg2, f180_arg6, f180_local2, f180_local1 ) end return f180_local3, f180_local0 end Cac.ValidateAbilities = function ( f181_arg0, f181_arg1, f181_arg2, f181_arg3, f181_arg4, f181_arg5 ) for f181_local4, f181_local5 in pairs( Cac.Abilities.Types ) do for f181_local3 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.IsAbilityPicked( f181_arg0, f181_arg1, f181_arg2, f181_arg3, f181_arg4, f181_local5, f181_local3 - 1, f181_arg5 ) and not Cac.IsPerkUnlocked( f181_arg0, f181_arg1, f181_arg2, Cac.GetAbilitySlotRef( Cac.GetAbilityRef( f181_local5 ), f181_local3 ) ) then DebugPrint( "Illegitimate equipped perk detected. Removing perk at category " .. f181_local5 .. " ability " .. f181_local3 - 1 .. " at loadout slot " .. f181_arg4 ) Cac.ToggleAbility( f181_arg0, f181_arg1, f181_arg2, f181_arg3, f181_arg4, f181_local5, f181_local3 - 1, f181_arg5, false, f181_arg5 == "specialistBonusStreaks", false ) end end end end Cac.ValidateWeapon = function ( f182_arg0, f182_arg1, f182_arg2, f182_arg3, f182_arg4, f182_arg5, f182_arg6 ) local f182_local0 = Cac.GetWeapon( f182_arg0, f182_arg1, f182_arg2, f182_arg3, f182_arg4, f182_arg5 ) local f182_local1 = nil if Cac.IsWeaponDLC( f182_local0 ) then f182_local1 = Cac.IsWeaponEntitlementUnlocked( f182_arg0, f182_local0, true ) else f182_local1 = Cac.IsItemUnlocked( f182_arg0, f182_arg1, f182_arg2, f182_local0 ) end if not f182_local1 then DebugPrint( "Illegitimate equipped weapon detected. Removing weapon number " .. f182_arg5 .. " at loadout slot " .. f182_arg4 ) Cac.SetWeapon( f182_arg0, f182_arg1, f182_arg2, f182_arg3, f182_arg4, f182_arg5, f182_arg6 ) end end Cac.ValidateAttachments = function ( f183_arg0, f183_arg1, f183_arg2, f183_arg3, f183_arg4, f183_arg5 ) for f183_local0 = 0, Cac.Indices.Attachments.PrimaryAttachment3, 1 do local f183_local3 = Cac.GetAttachment( f183_arg0, f183_arg1, f183_arg2, f183_arg3, f183_arg4, f183_arg5, f183_local0 ) if not Cac.IsAttachmentUnlocked( f183_arg0, f183_arg1, f183_arg2, f183_arg3, f183_arg4, f183_arg5, f183_local3 ) then if Cac.AttachmentHasReticles( f183_local3 ) then Cac.SetWeaponReticle( f183_arg0, f183_arg1, f183_arg2, f183_arg3, f183_arg4, f183_arg5, "none" ) end DebugPrint( "Illegitimate equipped attachment detected. Removing attachment number " .. f183_local0 .. " on weapon number " .. f183_arg5 .. " at loadout slot " .. f183_arg4 ) Cac.SetAttachment( f183_arg0, f183_arg1, f183_arg2, f183_arg3, f183_arg4, f183_arg5, f183_local0, "none" ) end end Cac.ShuffleAttachmentsDown( f183_arg0, f183_arg1, f183_arg2, f183_arg3, f183_arg4, f183_arg5 ) end Cac.ValidateGrenades = function ( f184_arg0, f184_arg1, f184_arg2, f184_arg3, f184_arg4 ) for f184_local0 = 0, Cac.Indices.Grenade.Secondary, 1 do if not Cac.IsItemUnlocked( f184_arg0, f184_arg1, f184_arg2, Cac.GetPerk( f184_arg0, f184_arg1, f184_arg2, f184_arg3, f184_arg4, f184_local0 ) ) then DebugPrint( "Illegitimate equipped grenade detected. Removing grenade number " .. f184_local0 .. " at loadout slot " .. f184_arg4 ) Cac.SetPerk( f184_arg0, f184_arg1, f184_arg2, f184_arg3, f184_arg4, f184_local0, "specialty_null" ) end end end Cac.ShuffleStreaks = function ( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5 ) local f185_local0 = Cac.GetStreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak1 ) local f185_local1 = Cac.GetStreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak2 ) local f185_local2 = Cac.GetStreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak3 ) if f185_local0 == "none" and f185_local1 == "none" and f185_local2 ~= "none" then Cac.SetKillstreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak1, f185_local2 ) Cac.SetKillstreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak3, "none" ) f185_local0 = f185_local2 f185_local2 = "none" elseif f185_local0 == "none" and f185_local1 ~= "none" then Cac.SetKillstreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak1, f185_local1 ) Cac.SetKillstreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak2, "none" ) f185_local0 = f185_local1 f185_local1 = "none" end if f185_local1 == "none" and f185_local2 ~= "none" then Cac.SetKillstreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak2, f185_local2 ) Cac.SetKillstreak( f185_arg0, f185_arg1, f185_arg2, f185_arg3, f185_arg4, f185_arg5, Cac.Indices.Killstreaks.Streak3, "none" ) f185_local1 = f185_local2 f185_local2 = "none" end end Cac.ValidateStrikePackage = function ( f186_arg0, f186_arg1, f186_arg2, f186_arg3, f186_arg4 ) local f186_local0 = Cac.GetStreakType( f186_arg0, f186_arg1, f186_arg2, f186_arg3, f186_arg4 ) if f186_local0 == "streaktype_specialist" then Cac.ValidateAbilities( f186_arg0, f186_arg1, f186_arg2, f186_arg3, f186_arg4, "specialistBonusStreaks" ) end f186_local0 = Cac.GetStreakTypeReference( f186_local0 ) for f186_local1 = 0, Cac.Indices.Killstreaks.Streak3, 1 do local f186_local4 = Cac.GetStreak( f186_arg0, f186_arg1, f186_arg2, f186_arg3, f186_arg4, f186_local0, f186_local1 ) local f186_local5 = Cac.IsItemUnlocked( f186_arg0, f186_arg1, f186_arg2, f186_local4 ) if f186_local0 == "specialistStreaks" then f186_local5 = Cac.IsPerkUnlocked( f186_arg0, f186_arg1, f186_arg2, Cac.StripSuffix( f186_local4, "_ks" ) ) end if not f186_local5 then DebugPrint( "Illegitimate equipped killstreak detected. Removing streak number " .. f186_local1 .. " at loadout slot " .. f186_arg4 ) Cac.SetKillstreak( f186_arg0, f186_arg1, f186_arg2, f186_arg3, f186_arg4, f186_local0, f186_local1, "none" ) local f186_local6 = f186_local1 - 1 end end Cac.ShuffleStreaks( f186_arg0, f186_arg1, f186_arg2, f186_arg3, f186_arg4, f186_local0 ) end function ValidateExtendedLoadouts( f187_arg0, f187_arg1, f187_arg2, f187_arg3 ) for f187_local0 = Cac.Settings.DataLoc[f187_arg3].baseClassSlots, Cac.Settings.DataLoc[f187_arg3].maxClassSlots - 1, 1 do if Cac.IsClassInUse( f187_arg0, f187_arg1, f187_arg2, f187_arg3, f187_local0 ) and not Engine.HasExtendedLoadouts( f187_arg0 ) then DebugPrint( "Illegitimate use of extended loadout number " .. f187_local0 .. " without purchase of the DLC. Setting to not in use." ) Cac.SetClassInUse( f187_arg0, f187_arg1, f187_arg2, f187_arg3, f187_local0, false ) end end end Cac.ValidateLoadoutItems = function ( f188_arg0, f188_arg1, f188_arg2, f188_arg3 ) if not Cac.IsSquadMemberInUse( f188_arg0, f188_arg1, f188_arg2 ) then if Cac.GetWeapon( f188_arg0, f188_arg1, f188_arg2, f188_arg3, 0, Cac.Indices.Weapons.Primary ) == "iw6_knifeonly" then Cac.SetWeaponToDefaultUnlock( f188_arg0, f188_arg1, f188_arg2, 0, Cac.Indices.Weapons.Primary ) Cac.SetWeaponToDefaultUnlock( f188_arg0, f188_arg1, f188_arg2, 0, Cac.Indices.Weapons.Secondary ) end return end for f188_local0 = 0, Cac.GetNumCustomSlots( f188_arg0, f188_arg3 ) - 1, 1 do Cac.ValidateWeapon( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, Cac.Indices.Weapons.Primary, "iw6_knifeonly" ) Cac.ValidateWeapon( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, Cac.Indices.Weapons.Secondary, "none" ) for f188_local3 = 0, Cac.Indices.Weapons.Secondary, 1 do Cac.ValidateAttachments( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3 ) if not Cac.IsCamoOrReticleUnlocked( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3, Cac.GetCamo( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3 ), "camo" ) then DebugPrint( "Illegitimate equipped camo detected. Removing camo at loadout slot " .. f188_local0 ) Cac.SetWeaponCamo( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3, "none" ) end if not Cac.IsCamoOrReticleUnlocked( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3, Cac.GetReticle( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3 ), "reticle" ) then DebugPrint( "Illegitimate equipped reticle detected. Removing reticle at loadout slot " .. f188_local0 ) Cac.SetWeaponReticle( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3, "none" ) local f188_local6, f188_local7 = Cac.GetAttachmentWithReticles( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3 ) if f188_local6 then Cac.SetAttachment( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3, f188_local7, "none" ) Cac.ShuffleAttachmentsDown( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, f188_local3 ) end end end Cac.ValidateGrenades( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0 ) local f188_local3 = Cac.CountSpentPoints( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, "abilitiesPicked" ) local f188_local4 = Cac.CalculateAbilityCapacity( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0 ) if f188_local4 < f188_local3 then DebugPrint( "Illegitimate abilities selected in loadout slot " .. f188_local0 .. ". " .. f188_local3 .. " points used, but only has space for " .. f188_local4 .. " points" ) Cac.ResetAbilities( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, "abilitiesPicked", false ) end Cac.ValidateAbilities( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0, "abilitiesPicked" ) Cac.ValidateStrikePackage( f188_arg0, f188_arg1, f188_arg2, f188_arg3, f188_local0 ) ValidateExtendedLoadouts( f188_arg0, f188_arg1, f188_arg2, f188_arg3 ) end end Cac.GetKillstreakType = function ( f189_arg0 ) for f189_local6, f189_local7 in pairs( Cac.Streaks ) do for f189_local3, f189_local4 in ipairs( f189_local7.Streaks ) do if f189_local4 == f189_arg0 then return f189_local6 end end end end Cac.IsPrimaryGrenade = function ( f190_arg0 ) for f190_local3, f190_local4 in ipairs( Cac.PrimaryGrenades ) do if f190_local4 == f190_arg0 then return true end end return false end Cac.IsSecondaryGrenade = function ( f191_arg0 ) for f191_local3, f191_local4 in ipairs( Cac.SecondaryGrenades ) do if f191_local4 == f191_arg0 then return true end end return false end Cac.UpdateSpecialistKillCounts = function ( f192_arg0, f192_arg1, f192_arg2, f192_arg3, f192_arg4 ) local f192_local0 = 0 for f192_local1 = 1, Cac.Abilities.Settings.SpecialistAbilityCount, 1 do local f192_local4 = false local f192_local5 = Cac.StripSuffix( Cac.GetCacConfig( f192_arg0, f192_arg1, f192_arg2, f192_arg3, f192_arg4, "specialistStreaks", f192_local1 - 1 ), "_ks" ) if not f192_local5 or f192_local5 == "" or f192_local5 == "specialty_null" or f192_local5 == "none" then Cac.SetSpecialistKills( f192_arg0, f192_arg1, f192_arg2, f192_arg3, f192_arg4, f192_local1 - 1, 0 ) f192_local4 = true else assert( not f192_local4, "Attempting to update Specialist Kill Counts, but there is a blank ability in the middle of valid abilities" ) Cac.SetSpecialistKills( f192_arg0, f192_arg1, f192_arg2, f192_arg3, f192_arg4, f192_local1 - 1, f192_local0 + Cac.GetPerkCost( f192_local5 ) + 1 ) end end end Cac.GetBaseAttachRefFromUnlockRef = function ( f193_arg0 ) return string.sub( f193_arg0, string.find( f193_arg0, "_" ) + 1 ) end end Cac.HasAttachments = function ( f194_arg0, f194_arg1, f194_arg2, f194_arg3, f194_arg4, f194_arg5, f194_arg6 ) local f194_local0 = {} local f194_local1 = Cac.GetAttachment( f194_arg0, f194_arg1, f194_arg2, f194_arg3, f194_arg4, f194_arg5, 0 ) local f194_local2 = Cac.GetAttachment( f194_arg0, f194_arg1, f194_arg2, f194_arg3, f194_arg4, f194_arg5, 1 ) local f194_local3 = Cac.GetAttachment( f194_arg0, f194_arg1, f194_arg2, f194_arg3, f194_arg4, f194_arg5, 2 ) f194_local0 = f194_local1 for f194_local1 = 1, #f194_local0, 1 do for f194_local4 = 1, #f194_arg6, 1 do if f194_local0[f194_local1] == f194_arg6[f194_local4] then return f194_local1 end end end return false end Cac.CalculateAbilityCapacity = function ( f195_arg0, f195_arg1, f195_arg2, f195_arg3, f195_arg4 ) local f195_local0 = Cac.Abilities.Settings.GrabBagCapacity local f195_local1 = {} local f195_local2 = Cac.GetWeapon( f195_arg0, f195_arg1, f195_arg2, f195_arg3, f195_arg4, 0 ) local f195_local3 = Cac.GetWeapon( f195_arg0, f195_arg1, f195_arg2, f195_arg3, f195_arg4, 1 ) local f195_local4 = Cac.GetSecondaryGrenade( f195_arg0, f195_arg1, f195_arg2, f195_arg3, f195_arg4 ) f195_local1 = f195_local2 for f195_local2 = 1, #f195_local1, 1 do if f195_local1[f195_local2] == "none" or f195_local1[f195_local2] == "specialty_null" or f195_local1[f195_local2] == "iw6_knifeonly" or f195_local1[f195_local2] == "uav" then f195_local0 = f195_local0 + 1 end end if Cac.GetPrimaryGrenade( f195_arg0, f195_arg1, f195_arg2, f195_arg3, f195_arg4 ) == "specialty_null" and not Cac.HasAttachments( f195_arg0, f195_arg1, f195_arg2, f195_arg3, f195_arg4, 0, { "gl", "shotgun" } ) and not Cac.HasAttachments( f195_arg0, f195_arg1, f195_arg2, f195_arg3, f195_arg4, 1, { "gl", "shotgun" } ) then f195_local0 = f195_local0 + 1 end return f195_local0 end Cac.StripSuffix = function ( f196_arg0, f196_arg1 ) local f196_local0 = f196_arg0 local f196_local1 = string.len( f196_arg0 ) if string.sub( f196_arg0, f196_local1 - 2 ) == f196_arg1 then f196_local0 = string.sub( f196_arg0, 0, f196_local1 - 3 ) end return f196_local0 end Cac.GetWeapon = function ( f197_arg0, f197_arg1, f197_arg2, f197_arg3, f197_arg4, f197_arg5 ) return Cac.GetCacConfig( f197_arg0, f197_arg1, f197_arg2, f197_arg3, f197_arg4, "weaponSetups", f197_arg5, "weapon" ) end Cac.GetWeaponClass = function ( f198_arg0 ) return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f198_arg0, StatsTable.Cols.WeaponClass ) end Cac.IsWeaponClassPrimary = function ( f199_arg0 ) for f199_local0 = 1, #Cac.WeaponTypes.Primary, 1 do if f199_arg0 == Cac.WeaponTypes.Primary[f199_local0] then return true end end return false end Cac.IsWeaponClassSecondary = function ( f200_arg0, f200_arg1 ) for f200_local0 = 1, #Cac.WeaponTypes.Secondary, 1 do if f200_arg0 == Cac.WeaponTypes.Secondary[f200_local0] then return true elseif f200_arg1 and (not f200_arg0 or f200_arg0 == "") then return true end end return false end Cac.GetWeaponName = function ( f201_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f201_arg0, StatsTable.Cols.WeaponName ) ) end Cac.GetKillstreakName = function ( f202_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( KillstreakTable.File, KillstreakTable.Cols.Ref, f202_arg0, KillstreakTable.Cols.Name ) ) end Cac.GetKillstreakDesc = function ( f203_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( KillstreakTable.File, KillstreakTable.Cols.Ref, f203_arg0, KillstreakTable.Cols.Desc ) ) end Cac.GetWeaponImage = function ( f204_arg0, f204_arg1 ) if not f204_arg1 or f204_arg0 and f204_arg0 ~= "none" and f204_arg0 ~= "specialty_null" and f204_arg0 ~= "" then return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f204_arg0, StatsTable.Cols.WeaponImage ) else local f204_local0 if f204_arg1 == Cac.Indices.Weapons.Secondary then f204_local0 = "secondary" if not f204_local0 then else return "icon_weapon_ph_" .. f204_local0 end end end f204_local0 = "primary" end Cac.GetAttachment = function ( f205_arg0, f205_arg1, f205_arg2, f205_arg3, f205_arg4, f205_arg5, f205_arg6 ) return Cac.GetCacConfig( f205_arg0, f205_arg1, f205_arg2, f205_arg3, f205_arg4, "weaponSetups", f205_arg5, "attachment", f205_arg6 ) end Cac.GetAttachmentUniqueRef = function ( f206_arg0, f206_arg1 ) local f206_local0 = f206_arg0 local f206_local1 = "" local f206_local2 = 0 repeat f206_local2 = f206_local2 + 1 f206_local1 = Engine.TableLookupByRow( AttachmentMap.File, AttachmentMap.Rows.AttachRef, f206_local2 ) until f206_local1 == f206_arg0 or f206_local1 == "" if f206_local1 == f206_arg0 then local f206_local3 = Engine.TableLookup( AttachmentMap.File, AttachmentMap.Cols.WeapOrClass, f206_arg1, f206_local2 ) if f206_local3 == "" then f206_local3 = Engine.TableLookup( AttachmentMap.File, AttachmentMap.Cols.WeapOrClass, Cac.GetWeaponClass( f206_arg1 ), f206_local2 ) end if f206_local3 ~= "" then f206_local0 = f206_local3 end end return f206_local0 end Cac.GetAttachmentImage = function ( f207_arg0, f207_arg1, f207_arg2, f207_arg3 ) if not (not f207_arg0 or f207_arg0 == "none" or f207_arg0 == "") or not f207_arg2 or not f207_arg3 then if f207_arg1 and f207_arg1 ~= "none" then f207_arg0 = Cac.GetAttachmentUniqueRef( f207_arg0, f207_arg1 ) end return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f207_arg0, AttachmentTable.Cols.Image ) elseif f207_arg2 ~= Cac.Indices.Weapons.Secondary or not "secondary" then local f207_local0 = "primary" end return "icon_weapon_ph_sp_diamond_64" end Cac.GetAttachmentImageFull = function ( f208_arg0, f208_arg1 ) if f208_arg1 and f208_arg1 ~= "none" then f208_arg0 = Cac.GetAttachmentUniqueRef( f208_arg0, f208_arg1 ) end return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f208_arg0, AttachmentTable.Cols.ImageFull ) end Cac.IsAbilityPickedBySlotName = function ( f209_arg0, f209_arg1, f209_arg2, f209_arg3, f209_arg4, f209_arg5, f209_arg6, f209_arg7 ) local f209_local0 = nil for f209_local1 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.GetAbilitySlotRef( Cac.Abilities.Refs[f209_arg5], f209_local1 ) == f209_arg6 then f209_local0 = f209_local1 end end if f209_local0 and Cac.IsAbilityPicked( f209_arg0, f209_arg1, f209_arg2, f209_arg3, f209_arg4, Cac.Abilities.Types[f209_arg5], f209_local0 - 1, f209_arg7 ) then return true else return false end end Cac.GetNumberAbilitiesPicked = function ( f210_arg0, f210_arg1, f210_arg2, f210_arg3, f210_arg4, f210_arg5 ) local f210_local0 = 0 for f210_local5, f210_local6 in ipairs( Cac.GetAbilityTypes() ) do for f210_local4 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.IsAbilityPicked( f210_arg0, f210_arg1, f210_arg2, f210_arg3, f210_arg4, f210_local6, f210_local4 - 1, f210_arg5 ) then f210_local0 = f210_local0 + 1 end end end return f210_local0 end Cac.GetCamo = function ( f211_arg0, f211_arg1, f211_arg2, f211_arg3, f211_arg4, f211_arg5 ) return Cac.GetCacConfig( f211_arg0, f211_arg1, f211_arg2, f211_arg3, f211_arg4, "weaponSetups", f211_arg5, "camo" ) end Cac.GetReticle = function ( f212_arg0, f212_arg1, f212_arg2, f212_arg3, f212_arg4, f212_arg5 ) return Cac.GetCacConfig( f212_arg0, f212_arg1, f212_arg2, f212_arg3, f212_arg4, "weaponSetups", f212_arg5, "reticle" ) end Cac.GetGrenade = function ( f213_arg0, f213_arg1, f213_arg2, f213_arg3, f213_arg4, f213_arg5 ) local f213_local0 = assert local f213_local1 if f213_arg5 ~= Cac.Indices.Grenade.Primary and f213_arg5 ~= Cac.Indices.Grenade.Secondary then f213_local1 = false else f213_local1 = true end f213_local0( f213_local1 ) return Cac.GetCacConfig( f213_arg0, f213_arg1, f213_arg2, f213_arg3, f213_arg4, "perks", f213_arg5 ) end Cac.GetGrenadeImage = function ( f214_arg0, f214_arg1 ) if not f214_arg1 or f214_arg0 and f214_arg0 ~= "none" and f214_arg0 ~= "specialty_null" and f214_arg0 ~= "" then return Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, Cac.StripSuffix( f214_arg0, "_mp" ), StatsTable.Cols.WeaponBWImage ) else local f214_local0 if f214_arg1 == Cac.Indices.Grenade.Secondary then f214_local0 = "tactical" if not f214_local0 then else return "icon_weapon_ph_" .. f214_local0 end end end f214_local0 = "lethal" end Cac.GetPrimaryGrenade = function ( f215_arg0, f215_arg1, f215_arg2, f215_arg3, f215_arg4 ) return Cac.GetCacConfig( f215_arg0, f215_arg1, f215_arg2, f215_arg3, f215_arg4, "perks", Cac.Indices.Grenade.Primary ) end Cac.GetSecondaryGrenade = function ( f216_arg0, f216_arg1, f216_arg2, f216_arg3, f216_arg4 ) return Cac.GetCacConfig( f216_arg0, f216_arg1, f216_arg2, f216_arg3, f216_arg4, "perks", Cac.Indices.Grenade.Secondary ) end Cac.GetPerk = function ( f217_arg0, f217_arg1, f217_arg2, f217_arg3, f217_arg4, f217_arg5 ) return Cac.GetCacConfig( f217_arg0, f217_arg1, f217_arg2, f217_arg3, f217_arg4, "perks", f217_arg5 ) end Cac.GetPerkGroup = function ( f218_arg0 ) local f218_local0 = nil for f218_local5, f218_local6 in pairs( Cac.PerkTypes.Refs ) do for f218_local4 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Engine.TableLookup( AbilityTable.File, AbilityTable.Cols.Ref, f218_local6, f218_local4 + AbilityTable.Cols.Slot0 ) == f218_arg0 then f218_local0 = f218_local6 end end end return f218_local0 end Cac.GetPerkIndices = function ( f219_arg0 ) for f219_local4, f219_local5 in pairs( Cac.PerkTypes.Refs ) do for f219_local3 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Engine.TableLookup( AbilityTable.File, AbilityTable.Cols.Ref, f219_local5, f219_local3 + AbilityTable.Cols.Slot0 ) == f219_arg0 then return f219_local4, f219_local3 end end end end Cac.GetPerkName = function ( f220_arg0 ) return Engine.Localize( "@" .. Engine.TableLookup( PerkTable.File, PerkTable.Cols.Ref, f220_arg0, PerkTable.Cols.Name ) ) end Cac.GetStreak = function ( f221_arg0, f221_arg1, f221_arg2, f221_arg3, f221_arg4, f221_arg5, f221_arg6 ) return Cac.GetCacConfig( f221_arg0, f221_arg1, f221_arg2, f221_arg3, f221_arg4, f221_arg5, f221_arg6 ) end Cac.GetStreak1 = function ( f222_arg0, f222_arg1, f222_arg2, f222_arg3, f222_arg4 ) return Cac.GetStreak( f222_arg0, f222_arg1, f222_arg2, f222_arg3, f222_arg4, Cac.GetStreakTypeReference( Cac.GetStreakType( f222_arg0, f222_arg1, f222_arg2, f222_arg3, f222_arg4 ) ), Cac.Indices.Killstreaks.Streak1 ) end Cac.GetStreak2 = function ( f223_arg0, f223_arg1, f223_arg2, f223_arg3, f223_arg4 ) return Cac.GetStreak( f223_arg0, f223_arg1, f223_arg2, f223_arg3, f223_arg4, Cac.GetStreakTypeReference( Cac.GetStreakType( f223_arg0, f223_arg1, f223_arg2, f223_arg3, f223_arg4 ) ), Cac.Indices.Killstreaks.Streak2 ) end Cac.GetStreak3 = function ( f224_arg0, f224_arg1, f224_arg2, f224_arg3, f224_arg4 ) return Cac.GetStreak( f224_arg0, f224_arg1, f224_arg2, f224_arg3, f224_arg4, Cac.GetStreakTypeReference( Cac.GetStreakType( f224_arg0, f224_arg1, f224_arg2, f224_arg3, f224_arg4 ) ), Cac.Indices.Killstreaks.Streak3 ) end Cac.GetStreakType = function ( f225_arg0, f225_arg1, f225_arg2, f225_arg3, f225_arg4 ) return Cac.GetCacConfig( f225_arg0, f225_arg1, f225_arg2, f225_arg3, f225_arg4, "perks", Cac.Indices.StreakType ) end Cac.GetStreakName = function ( f226_arg0 ) return Engine.Localize( Engine.TableLookup( KillstreakTable.File, KillstreakTable.Cols.Ref, f226_arg0, KillstreakTable.Cols.Name ) ) end Cac.GetStreakDesc = function ( f227_arg0 ) return Engine.Localize( Engine.TableLookup( KillstreakTable.File, KillstreakTable.Cols.Ref, f227_arg0, KillstreakTable.Cols.Desc ) ) end Cac.GetStreakTypeReference = function ( f228_arg0 ) local f228_local0 = "" if f228_arg0 == "streaktype_support" then f228_local0 = "supportStreaks" elseif f228_arg0 == "streaktype_assault" then f228_local0 = "assaultStreaks" elseif f228_arg0 == "streaktype_specialist" then f228_local0 = "specialistStreaks" else assert( f228_arg0 == "specialty_null" ) f228_local0 = "assaultStreaks" end return f228_local0 end Cac.GetStreakIcon = function ( f229_arg0, f229_arg1 ) if f229_arg0 == "guard_dog" then local f229_local0 = Cac.Customization.Fields[Cac.Customization.FieldIndexes.GuardDog] local f229_local1 = f229_local0.GetUIMaterial( f229_local0.GetSavedRef( f229_arg1 ) ) if f229_local1 and #f229_local1 > 0 then return f229_local1 end end if f229_arg0 and f229_arg0 ~= "none" and f229_arg0 ~= "specialty_null" and f229_arg0 ~= "" then return Engine.TableLookup( KillstreakTable.File, KillstreakTable.Cols.Ref, f229_arg0, KillstreakTable.Cols.Icon ) end return "icon_weapon_ph_sp_diamond_64" end Cac.GetStreakList = function ( f230_arg0 ) return Cac.Streaks[f230_arg0].Streaks end Cac.GetStreakTypeCaps = function ( f231_arg0 ) return Engine.Localize( Cac.Streaks[f231_arg0].Caps ) end Cac.GetPerkImage = function ( f232_arg0 ) return Engine.TableLookup( PerkTable.File, PerkTable.Cols.Ref, f232_arg0, PerkTable.Cols.Image ) end Cac.GetPerkCost = function ( f233_arg0 ) return Engine.TableLookup( PerkTable.File, PerkTable.Cols.Ref, f233_arg0, PerkTable.Cols.Cost ) end Cac.GetStreakCost = function ( f234_arg0 ) return Engine.TableLookup( KillstreakTable.File, KillstreakTable.Cols.Ref, f234_arg0, KillstreakTable.Cols.Kills ) end Cac.GetCamoImage = function ( f235_arg0 ) return Engine.TableLookup( CamoTable.File, CamoTable.Cols.Ref, f235_arg0, CamoTable.Cols.Image ) end Cac.GetReticleImage = function ( f236_arg0 ) return Engine.TableLookup( ReticleTable.File, ReticleTable.Cols.Ref, f236_arg0, ReticleTable.Cols.Image ) end Cac.GetAbilityRef = function ( f237_arg0 ) return Engine.TableLookup( AbilityTable.File, AbilityTable.Cols.Index, f237_arg0 + 1, AbilityTable.Cols.Ref ) end Cac.GetAbilitySlotRef = function ( f238_arg0, f238_arg1 ) return Engine.TableLookup( AbilityTable.File, AbilityTable.Cols.Ref, f238_arg0, AbilityTable.Cols.Slot0 + f238_arg1 ) end Cac.GetAbilityTypes = function () return { Cac.Abilities.Types.Speed, Cac.Abilities.Types.Handling, Cac.Abilities.Types.Stealth, Cac.Abilities.Types.Awareness, Cac.Abilities.Types.Resistance, Cac.Abilities.Types.Equipment, Cac.Abilities.Types.Elite } end Cac.IsAbilityPicked = function ( f240_arg0, f240_arg1, f240_arg2, f240_arg3, f240_arg4, f240_arg5, f240_arg6, f240_arg7 ) return Cac.GetCacConfig( f240_arg0, f240_arg1, f240_arg2, f240_arg3, f240_arg4, f240_arg7, f240_arg5, f240_arg6 ) end Cac.IsAbilityPickedByName = function ( f241_arg0, f241_arg1, f241_arg2, f241_arg3, f241_arg4, f241_arg5, f241_arg6 ) local f241_local0, f241_local1 = Cac.GetPerkIndices( f241_arg5 ) return Cac.IsAbilityPicked( f241_arg0, f241_arg1, f241_arg2, f241_arg3, f241_arg4, f241_arg6, f241_local0 - 1, f241_local1 - 1 ) end Cac.IsAbilityInUseForLoadout = function ( f242_arg0, f242_arg1, f242_arg2, f242_arg3, f242_arg4, f242_arg5 ) local f242_local0, f242_local1 = Cac.GetPerkIndices( f242_arg5 ) if Cac.IsAbilityPicked( f242_arg0, f242_arg1, f242_arg2, f242_arg3, f242_arg4, f242_local0 - 1, f242_local1 - 1, "abilitiesPicked" ) then return true elseif Cac.GetStreakType( f242_arg0, f242_arg1, f242_arg2, f242_arg3, f242_arg4 ) == "streaktype_specialist" then if Cac.IsAbilityPicked( f242_arg0, f242_arg1, f242_arg2, f242_arg3, f242_arg4, f242_local0 - 1, f242_local1 - 1, "specialistBonusStreaks" ) then return true end local f242_local2 = f242_arg5 .. "_ks" for f242_local3 = 1, Cac.Abilities.Settings.SpecialistAbilityCount, 1 do if Cac.GetKillstreak( f242_arg0, f242_arg1, f242_arg2, f242_arg3, f242_arg4, "specialistStreaks", f242_local3 - 1 ) == f242_local2 then return true end end end return false end Cac.GetAttachmentType = function ( f243_arg0 ) return Engine.TableLookup( AttachmentTable.File, AttachmentTable.Cols.Ref, f243_arg0, AttachmentTable.Cols.Group ) end Cac.GetAttachmentList = function ( f244_arg0 ) local f244_local0 = {} for f244_local1 = StatsTable.Cols.WeaponAttachFirst, StatsTable.Cols.WeaponAttachLast, 1 do local f244_local4 = Engine.TableLookup( StatsTable.File, StatsTable.Cols.WeaponRef, f244_arg0, f244_local1 ) if f244_local4 ~= "" then f244_local0[#f244_local0 + 1] = f244_local4 end end return f244_local0 end Cac.GetAttachmentTypeList = function ( f245_arg0 ) local f245_local0 = {} for f245_local4, f245_local5 in ipairs( Cac.GetAttachmentList( f245_arg0 ) ) do local f245_local6 = Cac.GetAttachmentType( f245_local5 ) if f245_local0[f245_local6] == nil then f245_local0[f245_local6] = 1 end end f245_local1 = {} for f245_local5, f245_local6 in ipairs( Cac.AttachmentTypes.Types ) do if f245_local0[f245_local6] ~= nil then f245_local1[#f245_local1 + 1] = f245_local6 end end return f245_local1 end Cac.IsWeaponDLC = function ( f246_arg0 ) return "2" == Engine.TableLookup( Cac.WeaponUnlockTable.File, Cac.WeaponUnlockTable.Cols.WeaponRef, f246_arg0, Cac.WeaponUnlockTable.Cols.IsEntitlement ) end Cac.CheckMLGRestriction = function ( f247_arg0 ) return Engine.GetDvarBool( "xblive_competitionmatch" ) and Cac.IsWeaponDLC( f247_arg0 ) end Cac.SafeGetMatchRule = function ( f248_arg0, f248_arg1, f248_arg2 ) local f248_local0, f248_local1 = false local f248_local2 = false if f248_arg2 ~= nil and f248_arg2 ~= "" then f248_local2 = MatchRules.CheckData( f248_arg0, f248_arg1, f248_arg2 ) end if f248_local2 then if Cac.CheckMLGRestriction( f248_arg2 ) then f248_local0 = true else f248_local0 = MatchRules.GetData( f248_arg0, f248_arg1, f248_arg2 ) end else f248_local1 = " ERR" end return f248_local2, f248_local0, f248_local1 end Cac.PerformMatchRuleToggle = function ( f249_arg0, f249_arg1, f249_arg2 ) local f249_local0 = false local f249_local1 = false if f249_arg2 ~= nil and f249_arg2 ~= "" then f249_local1 = MatchRules.CheckData( f249_arg0, f249_arg1, f249_arg2 ) end if f249_local1 then MatchRules.SetData( f249_arg0, f249_arg1, f249_arg2, not MatchRules.GetData( f249_arg0, f249_arg1, f249_arg2 ) ) f249_local0 = true end return f249_local0 end Cac.CheckWeaponRestrictions = function ( f250_arg0, f250_arg1 ) local f250_local0, f250_local1, f250_local2 = nil local f250_local3 = false local f250_local4 = false for f250_local11, f250_local12 in pairs( Cac.WeaponTypes[f250_arg0] ) do local f250_local8, f250_local9, f250_local10 = Cac.SafeGetMatchRule( "commonOption", "weaponClassRestricted", f250_local12 ) f250_local1 = f250_local10 if f250_local8 and f250_local9 then f250_local3 = true break end f250_local4 = Cac.CheckWeaponTypeRestrictions( f250_local12, f250_arg1 ) f250_local8, f250_local9, f250_local10 = Cac.SafeGetMatchRule( "commonOption", "weaponRestricted", "iw6_knifeonly" ) f250_local1 = f250_local10 if f250_local8 and f250_local9 then f250_local4 = true break elseif f250_local4 then break end end return f250_local3 or f250_local4 end Cac.CheckWeaponTypeRestrictions = function ( f251_arg0, f251_arg1 ) local f251_local0, f251_local1, f251_local2 = nil local f251_local3 = false for f251_local7, f251_local8 in pairs( Cac.GetWeaponList( f251_arg0, f251_arg1 ) ) do local f251_local9, f251_local10, f251_local11 = Cac.SafeGetMatchRule( "commonOption", "weaponRestricted", f251_local8 ) f251_local1 = f251_local11 if f251_local9 and f251_local10 then f251_local3 = true break end end return f251_local3 end Cac.CheckGrenadeRestrictions = function ( f252_arg0 ) local f252_local0, f252_local1, f252_local2 = nil local f252_local3 = false for f252_local7, f252_local8 in pairs( Cac.GetGrenadeList( f252_arg0 ) ) do local f252_local9, f252_local10, f252_local11 = Cac.SafeGetMatchRule( "commonOption", "perkRestricted", f252_local8 ) f252_local1 = f252_local11 if f252_local9 and f252_local10 then f252_local3 = true break end end return f252_local3 end Cac.CheckAttachmentRestrictionsHelper = function () local f253_local0, f253_local1, f253_local2 = nil local f253_local3 = false local f253_local4 = false for f253_local8, f253_local9 in pairs( Cac.AttachmentTypes.Types ) do local f253_local10, f253_local11, f253_local12 = Cac.SafeGetMatchRule( "commonOption", "attachmentClassRestricted", f253_local9 ) f253_local1 = f253_local12 if f253_local10 and f253_local11 then f253_local3 = true break end f253_local4 = Cac.CheckAttachmentTypeRestrictions( f253_local9 ) if f253_local4 then break end end return f253_local3 or f253_local4 end Cac.CheckAttachmentTypeRestrictions = function ( f254_arg0 ) local f254_local0, f254_local1, f254_local2 = nil local f254_local3 = false for f254_local7, f254_local8 in pairs( Cac.GetSimpleAttachmentList( f254_arg0 ) ) do local f254_local9, f254_local10, f254_local11 = Cac.SafeGetMatchRule( "commonOption", "attachmentRestricted", f254_local8 ) f254_local1 = f254_local11 if f254_local9 and f254_local10 then f254_local3 = true break end end return f254_local3 end Cac.CheckKillstreakRestrictions = function () local f255_local0, f255_local1, f255_local2 = nil local f255_local3 = false local f255_local4 = false for f255_local8, f255_local9 in pairs( Cac.StreakTypes ) do local f255_local10, f255_local11, f255_local12 = Cac.SafeGetMatchRule( "commonOption", "killstreakClassRestricted", f255_local9 ) f255_local1 = f255_local12 if f255_local10 and f255_local11 then f255_local3 = true break end f255_local4 = Cac.CheckKillstreakTypeRestrictions( f255_local9 ) if f255_local4 then break end end return f255_local3 or f255_local4 end Cac.CheckKillstreakTypeRestrictions = function ( f256_arg0 ) local f256_local0, f256_local1, f256_local2 = nil local f256_local3 = false local f256_local4, f256_local5 = InitKillstreakRefArray( f256_arg0 ) for f256_local6 = 1, f256_local5, 1 do local f256_local9 = f256_local4["ks_" .. f256_local6] if f256_local9 then local f256_local10, f256_local11, f256_local12 = Cac.SafeGetMatchRule( "commonOption", "killstreakRestricted", f256_local9 ) f256_local1 = f256_local12 if f256_local10 and f256_local11 then f256_local3 = true break end end end local f256_local13 = f256_local3 if f256_arg0 == "streaktype_specialist" then f256_local6 = Cac.CheckPerkRestrictions() else local f256_local6 = false end return f256_local6 end Cac.CheckPerkRestrictions = function () local f257_local0, f257_local1, f257_local2 = nil local f257_local3 = false local f257_local4 = false for f257_local8, f257_local9 in pairs( Cac.PerkTypes.Refs ) do local f257_local10, f257_local11, f257_local12 = Cac.SafeGetMatchRule( "commonOption", "perkClassRestricted", f257_local9 ) f257_local1 = f257_local12 if f257_local10 and f257_local11 then f257_local3 = true break end f257_local4 = Cac.CheckPerkTypeRestrictions( f257_local9 ) if f257_local4 then break end end return f257_local3 or f257_local4 end Cac.CheckPerkTypeRestrictions = function ( f258_arg0 ) local f258_local0, f258_local1, f258_local2 = nil local f258_local3 = false local f258_local4 = Cac.GetPerkList( f258_arg0 ) for f258_local5 = 1, #f258_local4, 1 do local f258_local8 = f258_local4[f258_local5] if f258_local8 then local f258_local9, f258_local10, f258_local11 = Cac.SafeGetMatchRule( "commonOption", "perkRestricted", f258_local8 ) f258_local1 = f258_local11 if f258_local9 and f258_local10 then f258_local3 = true break end end end return f258_local3 end Cac.ArePerksRestricted = function ( f259_arg0, f259_arg1, f259_arg2, f259_arg3, f259_arg4, f259_arg5 ) local f259_local0, f259_local1 = nil local f259_local2 = false local f259_local3 = true for f259_local9, f259_local10 in pairs( Cac.Abilities.Types ) do for f259_local8 = 1, Cac.Abilities.Settings.AbilitiesPerCategory, 1 do if Cac.IsAbilityPicked( f259_arg0, f259_arg1, f259_arg2, f259_arg3, f259_arg4, f259_local10, f259_local8 - 1, f259_arg5 ) then f259_local3 = false local f259_local7 = Cac.GetAbilityRef( f259_local10 ) f259_local0, f259_local1 = Cac.SafeGetMatchRule( "commonOption", "perkRestricted", Cac.GetAbilitySlotRef( f259_local7, f259_local8 ) ) if not f259_local2 then f259_local2 = f259_local0 and f259_local1 end f259_local0, f259_local1 = Cac.SafeGetMatchRule( "commonOption", "perkClassRestricted", f259_local7 ) if not f259_local2 then f259_local2 = f259_local0 and f259_local1 end end end end return f259_local2, f259_local3 end Cac.GetLocalRankedPlayercardInfo = function ( f260_arg0 ) local f260_local0 = Engine.GetPlayerDataEx( f260_arg0, CoD.StatsGroup.Ranked, "activeSquadMember" ) return { gamertag = Engine.GetUsernameByController( f260_arg0 ), patch = Engine.GetPlayerDataEx( f260_arg0, CoD.StatsGroup.Ranked, "squadMembers", f260_local0, "patch" ) or 0, background = Engine.GetPlayerDataEx( f260_arg0, CoD.StatsGroup.Ranked, "squadMembers", f260_local0, "background" ) or 0, clantag = Engine.GetProfileDataUseEliteClanTag( f260_arg0 ) and Clan.GetTag( f260_arg0 ) or Engine.GetCustomClanTag( f260_arg0 ) or "", rank = Lobby.GetRankForXP( Engine.GetPlayerDataEx( f260_arg0, CoD.StatsGroup.Ranked, "squadMembers", f260_local0, "squadMemXP" ) ), prestige = Cac.GetPrestigeLevel( f260_arg0, "squadMembers" ) } end Cac.GetRestrictIcon = function ( f261_arg0, f261_arg1, f261_arg2 ) local self = LUI.UIImage.new() self:registerAnimationState( "default", { leftAnchor = false, rightAnchor = true, topAnchor = false, bottomAnchor = true, right = f261_arg0, bottom = f261_arg1, width = f261_arg2, height = f261_arg2, material = RegisterMaterial( "icon_new_3" ), alpha = 1 } ) self:animateToState( "default" ) return self end Cac.IsDefaultClass = function ( f262_arg0 ) for f262_local3, f262_local4 in ipairs( f0_local0 ) do if f262_arg0 == f262_local4 then return true end end return false end