-- 武器表 EWeaponTypeNew.EWeaponTypeNew_Special = EWeaponTypeNew.EWeaponTypeNew_ThrownObj + 1 require('Script.Global.Tool.TableTool') --EWeaponTypes = { -- Melee = 1, -- Sniper = 2, -- Rifle = 3, -- SubmachineGun = 4, -- MachineGun = 5, -- Pistol = 6, -- ShotGun = 7, -- SniperRifle = 8, -- Special = 9, -- AntitankGrenade = 10 --} ---@type EWeaponIdType EWeaponIdType = { Rifle = 101, Submachine = 102, Sniper = 103, ShotGun = 104, MachineGun = 105, Pistol = 106, RPG = 107, Melee = 108, Special = 109, } --WeaponTypeInfo = { -- [EWeaponTypeNew.EWeaponTypeNew_Melee] = { -- Name = "近战武器", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_jinzhan_png.ZD_CarlaGold_Icon_jinzhan_png' -- }, -- [EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper] = { -- Name = "狙击枪", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_danfaju_png.ZD_CarlaGold_Icon_danfaju_png' -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Rifle] = { -- Name = "突击步枪", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_buqiang_png.ZD_CarlaGold_Icon_buqiang_png' -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Submachine] = { -- Name = "冲锋枪", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_chongfengqiang_png.ZD_CarlaGold_Icon_chongfengqiang_png' -- }, -- [EWeaponTypeNew.EWeaponTypeNew_MachineGun] = { -- Name = "机枪", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_jiqiang_png.ZD_CarlaGold_Icon_jiqiang_png' -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Pistol] = { -- Name = "手枪", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_shouqiang_png.ZD_CarlaGold_Icon_shouqiang_png' -- }, -- [EWeaponTypeNew.EWeaponTypeNew_ShotGun] = { -- Name = "霰弹枪", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_xiandan_png.ZD_CarlaGold_Icon_xiandan_png' -- }, -- [EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper] = { -- Name = "射手步枪", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_lianfaju_png.ZD_CarlaGold_Icon_lianfaju_png' -- }, -- -- 特殊武器Icon要换 -- [EWeaponTypeNew.EWeaponTypeNew_Special] = { -- Name = "特殊武器", -- Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/WeaponTexture/WhiteWeapon/T_RPG1.T_RPG1') -- }, -- [EWeaponTypeNew.EWeaponTypeNew_ThrownObj] = { -- Name = "手雷", -- Icon = '/Game/UGC/UMGTemplate/KLJ_Atlas/Frames/ZD_CarlaGold_Icon_touzhiwu_png.ZD_CarlaGold_Icon_touzhiwu_png' -- } --} ---@type table 武器 Item WeaponTable = { -- 突击步枪 [101001] = { -- ItemName = "AKM突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, Enable = true }, [101002] = { -- ItemName = "M16A4突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101003] = { -- ItemName = "SCAR-L突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101004] = { -- ItemName = "M416突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, Enable = true }, [101005] = { -- ItemName = "GROZA突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101006] = { -- ItemName = "AUG突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101007] = { -- ItemName = "QBZ突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101008] = { -- ItemName = "M762突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, Enable = true }, [101009] = { -- ItemName = "Mk47突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101010] = { -- ItemName = "G36C突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101012] = { -- ItemName = "蜜獾突击步枪", -- ItemSubId = 101, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, -- 冲锋枪 [102001] = { -- ItemName = "UZI冲锋枪", -- ItemSubId = 102, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102002] = { -- ItemName = "UMP45冲锋枪", -- ItemSubId = 102, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102003] = { -- ItemName = "Vector冲锋枪", -- ItemSubId = 102, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102004] = { -- ItemName = "汤姆逊冲锋枪", -- ItemSubId = 102, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, }, [102005] = { -- ItemName = "野牛冲锋枪", -- ItemSubId = 102, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102007] = { -- ItemName = "MP5K冲锋枪", -- ItemSubId = 102, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, }, [102105] = { -- ItemName = "P90冲锋枪", -- ItemSubId = 102, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, }, -- 狙击枪 [103001] = { -- ItemName = "Kar98K狙击枪", -- ItemSubId = 103, TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, Enable = true }, [103002] = { -- ItemName = "M24狙击枪", -- ItemSubId = 103, TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, Enable = true }, [103003] = { -- ItemName = "AWM狙击枪", -- ItemSubId = 103, TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, Enable = true }, -- 射手步枪 [103004] = { -- ItemName = "SKS射手步枪", -- ItemSubId = 109, TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, Enable = true }, [103005] = { -- ItemName = "VSS射手步枪", -- ItemSubId = 109, TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, }, [103006] = { -- ItemName = "Mini14射手步枪", -- ItemSubId = 109, TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, Enable = true }, [103007] = { -- ItemName = "Mk14射手步枪", -- ItemSubId = 109, TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, Enable = true }, [103008] = { -- ItemName = "Win94狙击枪", -- ItemSubId = 103, TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, [103009] = { -- ItemName = "SLR射手步枪", -- ItemSubId = 109, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, Enable = true }, [103010] = { -- ItemName = "QBU射手步枪", -- ItemSubId = 109, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, -- 狙击枪 [103011] = { -- ItemName = "莫辛纳甘狙击枪", -- ItemSubId = 103, TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, [103100] = { -- ItemName = "Mk12狙击枪", -- ItemSubId = 109, TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, }, --[103901] = { -- ItemName = "Kar98K狙击枪", -- ItemSubId = 103, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, --}, --[103902] = { -- ItemName = "M24狙击枪", -- ItemSubId = 103, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, --}, --[103903] = { -- ItemName = "AWM狙击枪", -- ItemSubId = 103, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, --}, -- 霰弹枪 [104001] = { -- ItemName = "S686霰弹枪", -- ItemSubId = 104, TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, Enable = true }, [104002] = { -- ItemName = "S1897霰弹枪", -- ItemSubId = 104, TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, Enable = true }, [104003] = { -- ItemName = "S12K霰弹枪", -- ItemSubId = 104, TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, Enable = true }, [104004] = { -- ItemName = "DBS霰弹枪", -- ItemSubId = 104, TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, }, -- 轻机枪 [105001] = { -- ItemName = "M249轻机枪", -- ItemSubId = 105, TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun, Enable = true }, [105002] = { -- ItemName = "DP-28轻机枪", -- ItemSubId = 105, TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun, Enable = true }, -- 手枪 [106001] = { -- ItemName = "P92手枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106002] = { -- ItemName = "P1911手枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106003] = { -- ItemName = "R1895手枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106004] = { -- ItemName = "P18C手枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106005] = { -- ItemName = "R45手枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106006] = { -- ItemName = "短管霰弹枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, }, --[106007] = { -- ItemName = "信号枪", -- ItemSubId = 106, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, --}, [106008] = { -- ItemName = "蝎式手枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, }, [106010] = { -- ItemName = "沙漠之鹰手枪", -- ItemSubId = 106, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, -- 弓箭 [107001] = { -- ItemName = "十字弩", -- ItemSubId = 107, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Crossbow, }, [107002] = { -- ItemName = "RPG-7火箭筒", -- ItemSubId = 105, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, Enable = true }, [107005] = { -- ItemName = "铁拳火箭筒", -- ItemSubId = 107, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, Enable = true }, --[107094] = { -- ItemName = "AT4-A激光导弹", -- ItemSubId = 111, -- Enable = true --}, --[107098] = { -- ItemName = "MGL榴弹发射器", -- ItemSubId = 110, -- Enable = true --}, --[107099] = { -- ItemName = "M3E1-A导弹", -- ItemSubId = 111, -- Enable = true --}, --[107905] = { -- ItemName = "M202四联火箭筒", -- ItemSubId = 105, -- Enable = true --}, -- 近战武器 [108001] = { -- ItemName = "大砍刀", -- ItemSubId = 108, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, [108002] = { -- ItemName = "撬棍", -- ItemSubId = 108, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, [108003] = { -- ItemName = "镰刀", -- ItemSubId = 108, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, [108004] = { -- ItemName = "平底锅", -- ItemSubId = 108, TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, -- 特殊武器 --[109008] = { -- ItemName = "爆破投射器", -- Desc = "能量投射器,能投射威力巨大的能量炮弹", -- ItemSubId = 110, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, -- WrapperClass = '/Game/UGC/Weapon/Weapon_Blueprint/MGL/BP_UGC_MGL_Wrapper.BP_UGC_MGL_Wrapper_C', -- IconPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/WeaponTexture/T_PDG.T_PDG'), -- SmallIcon = "/Game/UGC/Weapon/WeaponArt/MGL/Icon/Icon_UGC_MGL.Icon_UGC_MGL", -- BigIcon = "/Game/UGC/Weapon/WeaponArt/MGL/Icon/Icon_UGC_MGL_B.Icon_UGC_MGL_B" --}, --[109009] = { -- ItemName = "单发蓄力能量步枪", -- Desc = "强力蓄力步枪", -- ItemSubId = 105, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, -- WrapperClass = '/Game/UGC/Weapon/Weapon_Blueprint/RPG/BP_UGC_RPG7_Wrapper.BP_UGC_RPG7_Wrapper_C', -- SmallIcon = "/Game/UGC/Weapon/WeaponArt/RPG/Icon/Icon_UGC_RPG.Icon_UGC_RPG", -- BigIcon = "/Game/UGC/Weapon/WeaponArt/RPG/Icon/Icon_UGC_RPG_B.Icon_UGC_RPG_B" --}, --[109010] = { -- ItemName = "电击枪", -- Desc = "能发射高压电流持续命中敌人", -- ItemSubId = 110, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, -- WrapperClass = '/Game/UGC/Weapon/Weapon_Blueprint/ElectricGun/BP_UGC_ElectricGun_Wrapper.BP_UGC_ElectricGun_Wrapper_C', -- SmallIcon = "/Game/UGC/Weapon/WeaponArt/ElectricGun/Icon/Icon_UGC_ElectricGun.Icon_UGC_ElectricGun", -- BigIcon = "/Game/UGC/Weapon/WeaponArt/ElectricGun/Icon/Icon_UGC_ElectricGun_B.Icon_UGC_ElectricGun_B" --}, --[109011] = { -- ItemName = "激光步枪", -- Desc = "超远射程激光,极具威慑力", -- ItemSubId = 110, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, -- WrapperClass = '/Game/UGC/Weapon/Weapon_Blueprint/LaserGun/BP_UGC_LaserGun_Wrapper.BP_UGC_LaserGun_Wrapper_C', -- SmallIcon = "/Game/UGC/Weapon/WeaponArt/LaserGun/Icon/Icon_UGC_LaserGun.Icon_UGC_LaserGun", -- BigIcon = "/Game/UGC/Weapon/WeaponArt/LaserGun/Icon/Icon_UGC_LaserGun_B.Icon_UGC_LaserGun_B" --} } EnglishNamedWeapon = { ["AKM"] = { ItemId = 101001 }, ["M16A4"] = { ItemId = 101002, }, ["SCAR"] = { ItemId = 101003 }, ["M416"] = { ItemId = 101004 }, ["GROZA"] = { ItemId = 101005 }, ["AUG"] = { ItemId = 101006, }, ["QBZ"] = { ItemId = 101007 }, ["M762"] = { ItemId = 101008 }, ["Mk47"] = { ItemId = 101009 }, ["G36C"] = { ItemId = 101010 }, ["蜜獾"] = { ItemId = 101012, }, ["UZI"] = { ItemId = 102001 }, ["UMP45"] = { ItemId = 102002, }, ["Vector"] = { ItemId = 102003 }, ["汤姆逊"] = { ItemId = 102004 }, ["野牛"] = { ItemId = 102005 }, ["MP5K"] = { ItemId = 102007 }, ["P90"] = { ItemId = 102105 }, ["Kar98K"] = { ItemId = 103001 }, ["98K"] = { ItemId = 103001 }, ["M24"] = { ItemId = 103002, }, ["AWM"] = { ItemId = 103003 }, ["SKS"] = { ItemId = 103004 }, ["VSS"] = { ItemId = 103005 }, ["Mini14"] = { ItemId = 103006, }, ["Mk14"] = { ItemId = 103007 }, ["Win94"] = { ItemId = 103008 }, ["SLR"] = { ItemId = 103009 }, ["QBU"] = { ItemId = 103010 }, -- ["莫辛纳甘狙击枪"] = { ItemId = 103011, }, ["Mk12"] = { ItemId = 103100 }, ["Kar98K"] = { ItemId = 103901 }, --["98K"] = { ItemId = 103901 }, -- ["M24"] = { ItemId = 103902, }, -- ["AWM狙击枪"] = { ItemId = 103903, }, ["S686"] = { ItemId = 104001 }, ["S1897"] = { ItemId = 104002, }, ["S12K"] = { ItemId = 104003 }, ["DBS"] = { ItemId = 104004 }, ["SPAS-12"] = { ItemId = 104100 }, ["M249"] = { ItemId = 105001 }, ["DP-28"] = { ItemId = 105002, }, ["M134"] = { ItemId = 105003 }, ["P92"] = { ItemId = 106001 }, ["P1911"] = { ItemId = 106002, }, ["R1895"] = { ItemId = 106003 }, ["P18C"] = { ItemId = 106004 }, ["R45"] = { ItemId = 106005 }, ["短管霰弹枪"] = { ItemId = 106006, }, ["信号枪"] = { ItemId = 106007 }, ["蝎式手枪"] = { ItemId = 106008 }, ["沙漠之鹰"] = { ItemId = 106010 }, ["乱斗"] = { ItemId = 106107 }, ["十字弩"] = { ItemId = 107001 }, ["RPG"] = { ItemId = 107002, }, ["铁拳火箭筒"] = { ItemId = 107005 }, --["AT4"] = { ItemId = 107094 }, --["MGL"] = { ItemId = 107098 }, --["M3E1"] = { ItemId = 107099 }, --["M202"] = { ItemId = 107905 }, ["砍刀"] = { ItemId = 108001 }, ["撬棍"] = { ItemId = 108002, }, ["镰刀"] = { ItemId = 108003 }, ["平底锅"] = { ItemId = 108004 }, --["爆破投射器"] = { ItemId = 190008 }, --["单发蓄力能量步枪"] = { ItemId = 190009 }, --["电击枪"] = { ItemId = 190010 }, --["激光步枪"] = { ItemId = 190011 } }; --- 射击武器 Slot ---@type table ShootWeaponEnums = { ESurviveWeaponPropSlot.SWPS_MainShootWeapon1, ESurviveWeaponPropSlot.SWPS_MainShootWeapon2, ESurviveWeaponPropSlot.SWPS_SubShootWeapon }; --- ---@type table --ThrownObjWeaponEnums = {ESurviveWeaponPropSlot.SWPS_MeleeWeapon} EFillBulletType = { None = 0, -- 无子弹 ClipInfinite = 1, -- 需要换弹夹的无限子弹 Infinite = 2, -- 不需要换弹夹的无限子弹 Fill = 3 -- 填充满当前弹匣 } ---@type EWeaponPartType EWeaponPartType = { Best = 0, -- 最好匹配 Muzzle = 1, -- 枪口 Grip = 2, -- 握把 Telescope = 3, -- 瞄准镜 Magazine = 4, -- 弹匣 ButtStock = 5 -- 枪托 }; -- 配件类型名称对应表 ---@type table WeaponTypeName = { [EWeaponPartType.Muzzle] = { Chinese = "枪口", English = "Muzzle", SubId = 201, WeaponAttachmentSocketType = EWeaponAttachmentSocketType.GunPoint, }, [EWeaponPartType.Grip] = { Chinese = "握把", English = "Grip", SubId = 202, WeaponAttachmentSocketType = EWeaponAttachmentSocketType.Grip, }, [EWeaponPartType.Telescope] = { Chinese = "倍镜", English = "Telescope", SubId = 203, WeaponAttachmentSocketType = EWeaponAttachmentSocketType.OpticalSight, }, [EWeaponPartType.Magazine] = { Chinese = "弹匣", English = "Magazine", SubId = 204, WeaponAttachmentSocketType = EWeaponAttachmentSocketType.Magazine, }, [EWeaponPartType.ButtStock] = { Chinese = "枪托", English = "ButtStock", SubId = 205, WeaponAttachmentSocketType = EWeaponAttachmentSocketType.Gunstock, } }; -- 武器配件类型表 ---@type table> WeaponTypeParts = { [EWeaponPartType.Muzzle] = {201001, 201002, 201003, 201004, 201005, 201006, 201007, 201008, 201009, 201010, 201011, 201012, 201050, 201051}, [EWeaponPartType.Grip] = {202001, 202002, 202004, 202005, 202006, 202007}, [EWeaponPartType.Telescope] = {203001, 203002, 203003, 203004, 203005, 203014, 203015, 203018, 203023, 203024, 203104}, [EWeaponPartType.Magazine] = {204001, 204002, 204003, 204004, 204005, 204006, 204007, 204008, 204009, 204010, 204011, 204012, 204013, 204014, 204015, 204016, 204017}, [EWeaponPartType.ButtStock] = {205001, 205002, 205003, 205004} }; -- 武器配件 ---@type table WeaponParts = { [201001] = { ID = 201001, Type = EWeaponPartType.Muzzle, -- Name = "霰弹枪收束器", -- Alias = "霰弹枪收束器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Choke_Pickup.BP_QK_Choke_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Choke.Icon_QK_Choke", }, [201002] = { ID = 201002, Type = EWeaponPartType.Muzzle, -- Name = "枪口补偿器(冲锋枪)", -- Alias = "冲锋枪补偿器", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Mid_Compensator.Icon_QK_Mid_Compensator" }, [201003] = { ID = 201003, Type = EWeaponPartType.Muzzle, -- Name = "枪口补偿器(狙击枪)", -- Alias = "狙击枪补偿器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Sniper_Compensator_Pickup.BP_QK_Sniper_Compensator_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Sniper_Compensator.Icon_QK_Sniper_Compensator" }, [201004] = { ID = 201004, Type = EWeaponPartType.Muzzle, -- Name = "消焰器(冲锋枪)", -- Alias = "冲锋枪消焰器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Mid_Compensator_Pickup.BP_QK_Mid_Compensator_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Mid_FlashHider.Icon_QK_Mid_FlashHider" }, [201005] = { ID = 201005, Type = EWeaponPartType.Muzzle, -- Name = "消焰器(狙击枪)", -- Alias = "狙击枪消焰器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Sniper_FlashHider_Pickup.BP_QK_Sniper_FlashHider_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Sniper_FlashHider.Icon_QK_Sniper_FlashHider" }, [201006] = { ID = 201006, Type = EWeaponPartType.Muzzle, -- Name = "消音器(冲锋枪,手枪)", -- Alias = "冲锋枪消音器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Mid_Suppressor_Pickup.BP_QK_Mid_Suppressor_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Mid_Suppressor.Icon_QK_Mid_Suppressor" }, [201007] = { ID = 201007, Type = EWeaponPartType.Muzzle, -- Name = "消音器(狙击枪)", -- Alias = "狙击枪消音器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Sniper_Suppressor_Pickup.BP_QK_Sniper_Suppressor_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Sniper_Suppressor.Icon_QK_Sniper_Suppressor" }, [201008] = { ID = 201008, Type = EWeaponPartType.Muzzle, -- Name = "消音器(手枪)", -- Alias = "手枪消音器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Mid_Suppressor_Pickup.BP_QK_Mid_Suppressor_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Small_Suppressor.Icon_QK_Small_Suppressor" }, [201009] = { ID = 201009, Type = EWeaponPartType.Muzzle, -- Name = "枪口补偿器(步枪)", -- Alias = "步枪补偿器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Large_Compensator_Pickup.BP_QK_Large_Compensator_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Large_Compensator.Icon_QK_Large_Compensator" }, [201010] = { ID = 201010, Type = EWeaponPartType.Muzzle, -- Name = "消焰器(步枪)", -- Alias = "步枪消焰器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Large_FlashHider_Pickup.BP_QK_Large_FlashHider_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Large_FlashHider.Icon_QK_Large_FlashHider" }, [201011] = { ID = 201011, Type = EWeaponPartType.Muzzle, -- Name = "消音器(步枪)", -- Alias = "步枪消音器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_Large_Suppressor_Pickup.BP_QK_Large_Suppressor_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Large_Suppressor.Icon_QK_Large_Suppressor" }, [201012] = { ID = 201012, Type = EWeaponPartType.Muzzle, -- Name = "鸭嘴枪口(霰弹枪)", -- Alias = "霰弹枪鸭嘴枪口", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QK/BP_QK_DuckBill_Pickup.BP_QK_DuckBill_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_DuckBill.Icon_QK_DuckBill" }, [201050] = { ID = 201050, Type = EWeaponPartType.Muzzle, -- Name = "延长枪管(冲锋枪)", -- Alias = "冲锋枪延长枪管", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Small_ExtendedBarrel.Icon_QK_Small_ExtendedBarrel" }, [201051] = { ID = 201051, Type = EWeaponPartType.Muzzle, -- Name = "延长枪管(步枪,狙击枪)", -- Alias = "步枪延长枪管", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QK_Large_ExtendedBarrel.Icon_QK_Large_ExtendedBarrel" }, [202001] = { ID = 202001, Type = EWeaponPartType.Grip, -- Name = "直角前握把", -- Alias = "直角前握把", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/WB/BP_WB_Angled_Pickup.BP_WB_Angled_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_WB_Angled.Icon_WB_Angled" }, [202002] = { ID = 202002, Type = EWeaponPartType.Grip, -- Name = "垂直握把", -- Alias = "垂直握把", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/WB/BP_WB_Vertical_Pickup.BP_WB_Vertical_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_WB_Vertical.Icon_WB_Vertical" }, [202004] = { ID = 202004, Type = EWeaponPartType.Grip, -- Name = "轻型握把", -- Alias = "轻型握把", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/WB/BP_WB_LightGrip_Pickup.BP_WB_LightGrip_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_WB_LightGrip.Icon_WB_LightGrip" }, [202005] = { ID = 202005, Type = EWeaponPartType.Grip, -- Name = "半截式握把", -- Alias = "半截式握把", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/WB/BP_WB_HalfGrip_Pickup.BP_WB_HalfGrip_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_WB_HalfGrip.Icon_WB_HalfGrip" }, [202006] = { ID = 202006, Type = EWeaponPartType.Grip, -- Name = "拇指握把", -- Alias = "拇指握把", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/WB/BP_WB_ThumbGrip_Pickup.BP_WB_ThumbGrip_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_WB_ThumbGrip.Icon_WB_ThumbGrip" }, [202007] = { ID = 202007, Type = EWeaponPartType.Grip, -- Name = "激光瞄准器", -- Alias = "激光瞄准器", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/WB/BP_WB_Lasersight_Pickup.BP_WB_Lasersight_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/icon_attach_Lower_LaserPointer.icon_attach_Lower_LaserPointer" }, [203001] = { ID = 203001, Type = EWeaponPartType.Telescope, -- Name = "红点瞄准镜", -- Alias = "红点瞄准镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_HD_Pickup.BP_MZJ_HD_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_HD.Icon_MZJ_HD" }, [203002] = { ID = 203002, Type = EWeaponPartType.Telescope, -- Name = "全息瞄准镜", -- Alias = "全息瞄准镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_QX_Pickup.BP_MZJ_QX_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_QX.Icon_MZJ_QX" }, [203003] = { ID = 203003, Type = EWeaponPartType.Telescope, -- Name = "2倍 瞄准镜", -- Alias = "2倍镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_2X_Pickup.BP_MZJ_2X_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_2X.Icon_MZJ_2X" }, [203004] = { ID = 203004, Type = EWeaponPartType.Telescope, -- Name = "4倍 瞄准镜", -- Alias = "4倍镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_4X_Pickup.BP_MZJ_4X_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_4X.Icon_MZJ_4X" }, [203005] = { ID = 203005, Type = EWeaponPartType.Telescope, -- Name = "8倍 瞄准镜", -- Alias = "8倍镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_8X_Pickup.BP_MZJ_8X_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_8X.Icon_MZJ_8X" }, [203014] = { ID = 203014, Type = EWeaponPartType.Telescope, -- Name = "3倍 瞄准镜", -- Alias = "3倍镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_3X_Pickup.BP_MZJ_3X_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_3X.Icon_MZJ_3X" }, [203015] = { ID = 203015, Type = EWeaponPartType.Telescope, -- Name = "6倍 瞄准镜", -- Alias = "6倍镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_6X_Pickup.BP_MZJ_6X_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_6X.Icon_MZJ_6X" }, [203018] = { ID = 203018, Type = EWeaponPartType.Telescope, -- Name = "侧面瞄准镜", -- Alias = "侧面瞄准镜", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/MZJ/BP_MZJ_SideRMR_Pickup.BP_MZJ_SideRMR_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/icon_MZJ_CantedRMR.icon_MZJ_CantedRMR" }, -- [203023] = { ID = 203023, Type = EWeaponPartType.Telescope, Name = "红点UV瞄准镜", WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_HD.Icon_MZJ_HD", }, -- [203024] = { ID = 203024, Type = EWeaponPartType.Telescope, Name = "全息UV瞄准镜", WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_QX.Icon_MZJ_QX", }, -- [203104] = { ID = 203104, Type = EWeaponPartType.Telescope, Name = "4倍 瞄准镜测试皮肤", WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_4X.Icon_MZJ_4X", }, [204001] = { ID = 204001, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(手枪)", -- Alias = "手枪扩容弹匣", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Small_E.Icon_DJ_Small_E" }, [204002] = { ID = 204002, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(手枪)", -- Alias = "手枪快速弹匣", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Small_Q.Icon_DJ_Small_Q" }, [204003] = { ID = 204003, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(手枪)", -- Alias = "手枪快扩弹匣", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Small_EQ.Icon_DJ_Small_EQ" }, [204004] = { ID = 204004, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(冲锋枪,手枪)", -- Alias = "冲锋枪扩容弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Mid_E_Pickup.BP_DJ_Mid_E_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Mid_E.Icon_DJ_Mid_E" }, [204005] = { ID = 204005, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(冲锋枪,手枪)", -- Alias = "冲锋枪快速弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Mid_Q_Pickup.BP_DJ_Mid_Q_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Mid_Q.Icon_DJ_Mid_Q" }, [204006] = { ID = 204006, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(冲锋枪,手枪)", -- Alias = "冲锋枪快扩弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Mid_EQ_Pickup.BP_DJ_Mid_EQ_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Mid_EQ.Icon_DJ_Mid_EQ" }, [204007] = { ID = 204007, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(狙击枪)", -- Alias = "狙击枪扩容弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Sniper_E_Pickup.BP_DJ_Sniper_E_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Sniper_E.Icon_DJ_Sniper_E" }, [204008] = { ID = 204008, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(狙击枪)", -- Alias = "狙击枪快速弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Sniper_Q_Pickup.BP_DJ_Sniper_Q_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Sniper_Q.Icon_DJ_Sniper_Q" }, [204009] = { ID = 204009, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(狙击枪)", -- Alias = "狙击枪快扩弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Sniper_EQ_Pickup.BP_DJ_Sniper_EQ_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Sniper_EQ.Icon_DJ_Sniper_EQ" }, [204010] = { ID = 204010, Type = EWeaponPartType.Magazine, -- Name = "子弹袋(霰弹枪)", -- Alias = "霰弹枪子弹袋", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_ZDD_Shotgun.Icon_ZDD_Shotgun" }, [204011] = { ID = 204011, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(步枪,机枪)", -- Alias = "步枪扩容弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Large_E_Pickup.BP_DJ_Large_E_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Large_E.Icon_DJ_Large_E" }, [204012] = { ID = 204012, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(步枪,机枪)", -- Alias = "步枪快速弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Large_Q_Pickup.BP_DJ_Large_Q_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Large_Q.Icon_DJ_Large_Q" }, [204013] = { ID = 204013, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(步枪,机枪)", -- Alias = "步枪快扩弹匣", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/DJ/BP_DJ_Large_EQ_Pickup.BP_DJ_Large_EQ_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Large_EQ.Icon_DJ_Large_EQ" }, [204014] = { ID = 204014, Type = EWeaponPartType.Magazine, -- Name = "子弹袋(狙击枪,霰弹枪)", -- Alias = "狙击枪子弹袋", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/ZDD/BP_ZDD_Sniper_Pickup.BP_ZDD_Sniper_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_ZDD_Sniper.Icon_ZDD_Sniper" }, [204015] = { ID = 204015, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(机枪)", -- Alias = "机枪扩容弹匣", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_M134_EQ_Mag.Icon_DJ_M134_EQ_Mag" }, [204016] = { ID = 204016, Type = EWeaponPartType.Magazine, -- Name = "并联弹匣(步枪)", -- Alias = "步枪并联弹匣", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Large_Dou.Icon_DJ_Large_Dou" }, [204017] = { ID = 204017, Type = EWeaponPartType.Magazine, -- Name = "霰弹快速弹匣", --Alias = "步枪并联弹匣", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Large_Dou.Icon_DJ_Large_Dou" }, [205001] = { ID = 205001, Type = EWeaponPartType.ButtStock, -- Name = "枪托(Micro UZI)", -- Alias = "UZI枪托", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QT/BP_QT_UZI_Pickup.BP_QT_UZI_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QT_UZI.Icon_QT_UZI" }, [205002] = { ID = 205002, Type = EWeaponPartType.ButtStock, -- Name = "战术枪托(步枪,冲锋枪,机枪)", -- Alias = "步枪战术枪托", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QT_A.Icon_QT_A" }, [205003] = { ID = 205003, Type = EWeaponPartType.ButtStock, -- Name = "托腮板(狙击枪)", -- Alias = "托腮板", -- WrapperClass = '/Game/Arts_PlayerBluePrints/Weapon/Attachments/QT/BP_QT_Sniper_Pickup.BP_QT_Sniper_Pickup_C', -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_QT_Sniper.Icon_QT_Sniper" }, [205004] = { ID = 205004, Type = EWeaponPartType.ButtStock, -- Name = "箭袋(十字弩)", -- Alias = "箭袋", --WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_DJ_Crossbow_Q.Icon_DJ_Crossbow_Q" } }; ---@type table --NamedWeaponParts = { -- -- 瞄准镜 -- ["红点瞄准镜"] = { ItemId = 203001 }, -- ["全息瞄准镜"] = { ItemId = 203002, }, -- ["2倍 瞄准镜"] = { ItemId = 203003 }, -- ["4倍 瞄准镜"] = { ItemId = 203004 }, -- ["8倍 瞄准镜"] = { ItemId = 203005 }, -- -- -- 扩容弹匣 -- ["快速扩容弹匣(手枪)"] = { ItemId = 204003 }, -- ["快速扩容弹匣(冲锋枪,手枪)"] = { ItemId = 204006, }, -- ["快速扩容弹匣(狙击枪)"] = { ItemId = 204009 }, -- ["子弹袋(霰弹枪)"] = { ItemId = 204010 }, -- ["快速扩容弹匣(步枪,机枪)"] = { ItemId = 204013 }, -- ["箭袋(十字弩)"] = { ItemId = 205004 }, --}; -- 武器套装表 ---@type table>> WeaponSuits = { -- AKM突击步枪 [101001] = { [EWeaponPartType.Best] = { { 201009, 203002, 204013, }, { 201011, 203001, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- M16A4突击步枪 [101002] = { [EWeaponPartType.Best] = { { 201009, 203002, 204013, 205002, }, { 201011, 203001, 204013, 205002, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 }, [EWeaponPartType.ButtStock] = { 205002 } }, -- SCAR-L突击步枪 [101003] = { [EWeaponPartType.Best] = { { 201009, 203002, 204013, 202002, }, { 201011, 203001, 204013, 202002, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- M416突击步枪 [101004] = { [EWeaponPartType.Best] = { { 201009, 202002, 203002, 204013, 205002, }, { 201011, 202004, 203001, 204013, 205002, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 }, [EWeaponPartType.ButtStock] = { 205002 } }, -- GROZA突击步枪 [101005] = { [EWeaponPartType.Best] = { { 201011, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- AUG突击步枪 [101006] = { [EWeaponPartType.Best] = { { 201009, 202002, 203002, 204013 }, { 201011, 202002, 203002, 204013 }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- QBZ突击步枪 [101007] = { [EWeaponPartType.Best] = { { 201009, 202002, 203001, 204013, }, { 201011, 202004, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- M762突击步枪 [101008] = { [EWeaponPartType.Best] = { { 201009, 202002, 203001, 204013, }, { 201011, 202004, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- Mk47突击步枪 [101009] = { [EWeaponPartType.Best] = { { 201009, 202002, 203001, 204013, 205002, }, { 201011, 202004, 203002, 204013, 205002, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 }, [EWeaponPartType.ButtStock] = { 205002 } }, -- G36C突击步枪 [101010] = { [EWeaponPartType.Best] = { { 201009, 202002, 203001, 204013, }, { 201011, 202004, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- 蜜獾突击步枪 [101012] = { [EWeaponPartType.Best] = { { 201009, 203001, 204013, }, { 201011, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 } }, -- UZI冲锋枪 [102001] = { [EWeaponPartType.Best] = { { 201002, 203001, 204006, 205001 }, { 201006, 203002, 204006, 205001 }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Magazine] = { 204004, 204005, 204006, }, [EWeaponPartType.ButtStock] = { 205001 } }, -- UMP45冲锋枪 [102002] = { [EWeaponPartType.Best] = { { 201002, 202002, 203001, 204006, }, { 201006, 202004, 203002, 204006, }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204004, 204005, 204006 } }, -- Vector冲锋枪 [102003] = { [EWeaponPartType.Best] = { { 201002, 202002, 203001, 204006, 205002, }, { 201006, 202004, 203002, 204006, 205002, }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Grip] = { 202002, 202004, 202007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204004, 204005, 204006, }, [EWeaponPartType.ButtStock] = { 205002 } }, -- 汤姆逊冲锋枪 [102004] = { [EWeaponPartType.Best] = { { 201006, 202002, 203001, 204006, }, { 201006, 202002, 203002, 204006, }, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202002, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Magazine] = { 204004, 204005, 204006, } }, -- 野牛冲锋枪 [102005] = { [EWeaponPartType.Best] = { { 201002, 203001, }, { 201006, 203002, }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 } }, -- MP5K冲锋枪 [102007] = { [EWeaponPartType.Best] = { { 201002, 202002, 203001, 204006, 205002, }, { 201006, 202004, 203002, 204006, 205002, }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204004, 204005, 204006, }, [EWeaponPartType.ButtStock] = { 205002 } }, -- P90冲锋枪 [102105] = { }, -- Kar98K狙击枪 [103001] = { [EWeaponPartType.Best] = { { 201007, 203005, 204014 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.ButtStock] = { 205003, 204014 } }, -- M24狙击枪 [103002] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 }, [EWeaponPartType.ButtStock] = { 205003 } }, -- AWM狙击枪 [103003] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 }, [EWeaponPartType.ButtStock] = { 205003 } }, -- SKS射手步枪 [103004] = { [EWeaponPartType.Best] = { { 201007, 202002, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 }, [EWeaponPartType.ButtStock] = { 205003, 204014 } }, -- VSS射手步枪 [103005] = { [EWeaponPartType.Best] = { { 204009, 205003, }, }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 }, [EWeaponPartType.ButtStock] = { 205003 } }, -- Mini14射手步枪 [103006] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 } }, -- Mk14射手步枪 [103007] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 }, [EWeaponPartType.ButtStock] = { 205003 } }, -- Win94狙击枪 [103008] = { [EWeaponPartType.Best] = { { 204014, }, }, [EWeaponPartType.ButtStock] = { 204014 } }, -- SLR射手步枪 [103009] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, 205003, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 }, [EWeaponPartType.ButtStock] = { 205003 } }, -- QBU射手步枪 [103010] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 } }, -- 莫辛纳甘狙击枪 [103011] = { [EWeaponPartType.Best] = { { 203015, 201007, 204014, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.ButtStock] = { 205003, 204014 } }, -- Mk12狙击枪 [103100] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, 202002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Magazine] = { 204007, 204008, 204009 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006 } }, -- S686霰弹枪 [104001] = { [EWeaponPartType.Best] = { { 201001, 204014, }, }, [EWeaponPartType.Muzzle] = { 201001, }, [EWeaponPartType.ButtStock] = { 204014 } }, -- S1897霰弹枪 [104002] = { [EWeaponPartType.Best] = { { 201001, 204017, 204014, }, }, [EWeaponPartType.Muzzle] = { 201001, 201012, }, [EWeaponPartType.Magazine] = { 204017, }, [EWeaponPartType.ButtStock] = { 204014, } }, -- S12K霰弹枪 [104003] = { [EWeaponPartType.Best] = { { 201009, 203002, 204013, }, { 201012, 203001, 204013, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011, 201012, }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013, } }, -- DBS霰弹枪 [104004] = { [EWeaponPartType.Best] = { { 203002, 204017, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Magazine] = { 204017, }, }, -- M249轻机枪 [105001] = { [EWeaponPartType.Best] = { { 203001, 204013, 205002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204011, 204012, 204013 }, [EWeaponPartType.ButtStock] = { 205002 } }, -- DP-28轻机枪 [105002] = { [EWeaponPartType.Best] = { { 203002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 } }, -- P92手枪 [106001] = { [EWeaponPartType.Best] = { { 203001, 201006, 204006, 202007, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202007, }, [EWeaponPartType.Magazine] = { 204001, 204002, 204006, }, }, -- P1911手枪 [106002] = { [EWeaponPartType.Best] = { { 203001, 201006, 204006, 202007, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202007, }, [EWeaponPartType.Magazine] = { 204001, 204002, 204006, }, }, -- R1895手枪 [106003] = { [EWeaponPartType.Best] = { { 201006, }, }, [EWeaponPartType.Muzzle] = { 201006, } }, -- P18C手枪 [106004] = { [EWeaponPartType.Best] = { { 203001, 201006, 204005, 202007, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202007, }, [EWeaponPartType.Magazine] = { 204005, } }, -- R45手枪 [106005] = { [EWeaponPartType.Best] = { { 203001, 202007, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Grip] = { 202007, }, }, -- 短管霰弹枪 [106006] = { [EWeaponPartType.Best] = { { 201001, }, }, [EWeaponPartType.Muzzle] = { 201001 } }, -- 蝎式手枪 [106008] = { [EWeaponPartType.Best] = { { 203001, 201006, 202002, 205001, 204004, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202002, 202004, 202005, 202007 }, [EWeaponPartType.Magazine] = { 204004, }, -- 只有这个 [EWeaponPartType.ButtStock] = { 205001 } }, -- 沙漠之鹰手枪 [106010] = { [EWeaponPartType.Best] = { { 203002, 204006, 202007 }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Magazine] = { 204004, 204005, 204006, }, [EWeaponPartType.Grip] = { 202007 } }, -- 十字弩 [107001] = { [EWeaponPartType.Best] = { { 203004, 205004 }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.ButtStock] = { 205004 } }, -- 大砍刀 [108001] = {}, -- 撬棍 [108002] = {}, -- 镰刀 [108003] = {}, -- 平底锅 [108004] = {} }; -- 武器类型名称对应表 ---@type table --WeaponNameTable = { -- [EWeaponTypeNew.EWeaponTypeNew_Other] = { -- Chinese = "其他", -- English = "Other" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Rifle] = { -- Chinese = "步枪", -- English = "Rifle" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper] = { -- Chinese = "单发狙", -- English = "SingleShotSniper" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper] = { -- Chinese = "连发狙", -- English = "BurstShotSniper" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Submachine] = { -- Chinese = "冲锋枪", -- English = "Submachine" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_ShotGun] = { -- Chinese = "霰弹枪", -- English = "ShotGun" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_MachineGun] = { -- Chinese = "机枪", -- English = "MachineGun" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Pistol] = { -- Chinese = "手枪", -- English = "Pistol" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Melee] = { -- Chinese = "近战武器", -- English = "Melee" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_Crossbow] = { -- Chinese = "弓箭", -- English = "Crossbow" -- }, -- [EWeaponTypeNew.EWeaponTypeNew_ThrownObj] = { -- Chinese = "投掷物", -- English = "ThrownObj" -- } --}; --- 武器对应的子弹ID ---@type table WeaponAmmunitionItem = { [101001] = 302001, [101002] = 303001, [101003] = 303001, [101004] = 303001, [101005] = 302001, [101006] = 303001, [101007] = 303001, [101008] = 302001, [101009] = 302001, [101010] = 302001, [101012] = 302001, [102001] = 301001, [102002] = 305001, [102003] = 301001, [102004] = 305001, [102005] = 301001, [102007] = 301001, [102105] = 301002, [103001] = 302001, [103002] = 302001, [103003] = 306001, [103004] = 302001, [103005] = 301001, [103006] = 303001, [103007] = 302001, [103008] = 305001, [103009] = 302001, [103010] = 303001, [103011] = 302001, -- [103100] , [104001] = 304001, [104002] = 304001, [104003] = 304001, [104004] = 304001, [104100] = 304001, [105001] = 303001, [105002] = 302001, [105003] = 302001, [106001] = 301001, [106002] = 305001, [106003] = 302001, [106004] = 301001, [106005] = 305001, [106006] = 304001, -- [106007] , [106008] = 301001, [106010] = 305001, -- [106107] , [107001] = 307001, [107002] = 307002, -- [107005] , [107094] = 307002, -- [107098] , --[107099] = 307002, [107905] = 307002, [190008] = 307102, [190009] = 307100, [190010] = 307103, [190011] = 307101 } ---@type table --AmmoTable = { -- [301001] = { -- -- ItemName = "9毫米子弹", -- }, -- [301002] = { -- -- ItemName = "5.7毫米子弹", -- }, -- [302001] = { -- -- ItemName = "7.62毫米子弹", -- }, -- [303001] = { -- -- ItemName = "5.56毫米子弹", -- }, -- [304001] = { -- -- ItemName = "12口径霰弹", -- }, -- [305001] = { -- -- ItemName = ".45口径子弹", -- }, -- [306001] = { -- -- ItemName = ".300马格南子弹", -- }, -- [307001] = { -- -- ItemName = "弩箭", -- }, -- [307002] = { -- -- ItemName = "火箭弹", -- }, -- [307100] = { -- -- ItemName = "蓄力步枪能量弹药", -- }, -- [307101] = { -- -- ItemName = "激光弹药", -- }, -- [307102] = { -- -- ItemName = "爆破投射弹药", -- }, -- [307103] = { -- -- ItemName = "充能电池", -- }, -- [308001] = { -- -- ItemName = "信号弹", -- } --}; --- 其他物品 ---@type table --OtherItems = { -- -- Bag -- [501001] = { -- -- ItemName = "背包(1级)", -- }, -- [501002] = { -- -- ItemName = "背包(2级)", -- }, -- [501003] = { -- -- ItemName = "背包(3级)", -- }, -- [501004] = { -- -- ItemName = "背包(1级)", -- }, -- [501005] = { -- -- ItemName = "背包(2级)", -- }, -- [501006] = { -- -- ItemName = "背包(3级)", -- }, -- -- -- Helmet -- [502001] = { -- -- ItemName = "摩托车头盔(1级)", -- }, -- [502002] = { -- -- ItemName = "军用头盔(2级)", -- }, -- [502003] = { -- -- ItemName = "特种部队头盔(3级)", -- }, -- [502004] = { -- -- ItemName = "摩托车头盔(1级)", -- }, -- [502005] = { -- -- ItemName = "军用头盔(2级)", -- }, -- -- -- Armor -- [503001] = { -- -- ItemName = "警用防弹衣(1级)", -- }, -- [503002] = { -- -- ItemName = "警用防弹衣(2级)", -- }, -- [503003] = { -- -- ItemName = "军用防弹衣(3级)", -- }, -- -- [507001] = { -- -- ItemName = "滑雪板", -- -- Desc = "雪地移动工具", -- }, -- -- [601001] = { -- -- ItemName = "能量饮料", -- -- Desc = "回复能量40,立即回复30信号值;能量可持续恢复健康值,60以上增加移速", -- }, -- [601002] = { -- -- ItemName = "肾上腺素", -- -- Desc = "回复能量100,立即回复100信号值;能量可持续恢复健康值,60以上增加移速", -- }, -- [601003] = { -- -- ItemName = "止痛药", -- -- Desc = "回复能量60,立即回复75信号值;能量可持续恢复健康值,60以上增加移速", -- }, -- [601004] = { -- -- ItemName = "绷带", -- -- Desc = "缓慢回复健康10", -- }, -- [601005] = { -- -- ItemName = "急救包", -- -- Desc = "回复健康至75", -- }, -- [601006] = { -- -- ItemName = "全能医疗箱", -- -- Desc = "回满健康值和信号值", -- }, -- -- -- Bomb -- [602001] = { -- -- ItemName = "震爆弹", -- }, -- [602002] = { -- -- ItemName = "烟雾弹", -- }, -- [602003] = { -- -- ItemName = "燃烧瓶", -- }, -- [602004] = { -- -- ItemName = "破片手榴弹", -- }, -- -- [603001] = { -- -- ItemName = "燃料", -- }, -- [604020] = { -- -- ItemName = "山地自行车", -- -- Desc = "快速连点前进键可以提速,长按起跳键可以跳跃", -- } --} WeaponIdTable = {}; AllWeaponCount = 0; --- 卸载 function UnloadWeaponIconTexture() WeaponTable = nil; WeaponIdTable = nil; WeaponParts = nil; --AmmoTable = nil; --OtherItems = nil; WeaponSuits = nil; --WeaponNameTable = nil; WeaponAmmunitionItem = nil; --WeaponTypeInfo = nil; end function GetWeaponIdTable() --- 判断是否需要加到 WeaponIdTable 的函数 local WeaponIdTypeFunc = function(InId) local SubId = GetWeaponIdType(InId); local RemoveIds = { EWeaponIdType.Pistol, EWeaponIdType.Special, EWeaponIdType.RPG, EWeaponIdType.Melee } -- 移除火箭筒这些武器 for i, v in pairs(RemoveIds) do if SubId == v then return false; end end if InId == 106007 then return false; end -- 移除信号枪 return true; end -- 加载所有的武器 WeaponIdTable = {}; for i, v in pairs(WeaponTable) do if type(i) == 'number' and i > 100000 and i < 999999 and WeaponIdTypeFunc(i) then table.insert(WeaponIdTable, i); end end AllWeaponCount = table.getCount(WeaponIdTable); table.Shuffle(WeaponIdTable); end --- 武器表初始化 function WeaponTableInit() GetWeaponIdTable(); end ---@param InWeaponId int32 ---@return EWeaponIdType function GetWeaponIdType(InWeaponId) return InWeaponId // 1000 end --- 通过 EWeaponIdType 来获取 Weapon,如果传入 nil 那么会获取所有的武器并且这些武器通过 Id 进行区分 ---@param InTypes table|EWeaponIdType|nil ---@return table function GetWeaponIdsByType(InTypes) local Ret = {}; if type(InTypes) == 'nil' then for i, v in pairs(WeaponTable) do if v.ItemName ~= nil then local WeaponId = GetWeaponIdType(i) if Ret[WeaponId] == nil then Ret[WeaponId] = {}; end Ret[WeaponId][#(Ret[WeaponId]) + 1] = i; end end elseif type(InTypes) == 'table' then for i, v in pairs(WeaponTable) do if v.ItemName ~= nil and table.hasValue(InTypes, GetWeaponIdType(i)) then Ret[#Ret + 1] = i; end end else for i, v in pairs(WeaponTable) do if v.ItemName ~= nil and GetWeaponIdType(i) == InTypes then Ret[#Ret + 1] = i; end end end return Ret; end