-- 武器表 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, }; EFillBulletType = { None = 0, -- 无子弹 ClipInfinite = 1, -- 需要换弹夹的无限子弹 Infinite = 2, -- 不需要换弹夹的无限子弹 Fill = 3 -- 填充满当前弹匣 } ---@type EWeaponPartType EWeaponPartType = { Best = 0, -- 最好匹配 Muzzle = 1, -- 枪口 Grip = 2, -- 握把 Telescope = 3, -- 瞄准镜 Magazine = 4, -- 弹匣 ButtStock = 5, -- 枪托 SubTelescope = 6, -- 侧边瞄准镜 }; -- 配件展示顺序 PartTypeDisplayOrder = { EWeaponPartType.Telescope, EWeaponPartType.Muzzle, EWeaponPartType.Magazine, EWeaponPartType.Grip, EWeaponPartType.ButtStock, EWeaponPartType.SubTelescope, } -- 配件类型名称对应表 ---@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, }, [EWeaponPartType.SubTelescope] = { Chinese = "侧边瞄准镜", English = "SubTelescope", SubId = 205, WeaponAttachmentSocketType = EWeaponAttachmentSocketType.AngledOpticalSight, }, }; 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_Crossbow] = { 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' } }; --- 射击武器 Slot ---@type table ShootWeaponEnums = { ESurviveWeaponPropSlot.SWPS_MainShootWeapon1, ESurviveWeaponPropSlot.SWPS_MainShootWeapon2, ESurviveWeaponPropSlot.SWPS_SubShootWeapon }; ---@type ESurviveWeaponPropSlot[] AllWeaponEnums = { ESurviveWeaponPropSlot.SWPS_MainShootWeapon1, ESurviveWeaponPropSlot.SWPS_MainShootWeapon2, ESurviveWeaponPropSlot.SWPS_SubShootWeapon, ESurviveWeaponPropSlot.SWPS_MeleeWeapon, }; 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 }, ["VAL"] = { ItemId = 101011 }, ["蜜獾"] = { ItemId = 101012, }, ["FAMAS"] = { ItemId = 101013, }, ["UZI"] = { ItemId = 102001 }, ["UMP45"] = { ItemId = 102002, }, ["Vector"] = { ItemId = 102003 }, ["汤姆逊"] = { ItemId = 102004 }, ["野牛"] = { ItemId = 102005 }, ["MP5K"] = { ItemId = 102007 }, ["AKS"] = { ItemId = 102008 }, ["P90"] = { ItemId = 102105 }, ["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 }, ["M417"] = { ItemId = 103013 }, ["MK20"] = { ItemId = 103014 }, -- ["莫辛纳甘狙击枪"] = { 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 }, ["MG3"] = { ItemId = 105010 }, ["PKM"] = { ItemId = 105012 }, ["P92"] = { ItemId = 106001 }, ["P1911"] = { ItemId = 106002, }, ["R1895"] = { ItemId = 106003 }, ["P18C"] = { ItemId = 106004 }, ["R45"] = { ItemId = 106005 }, ["短管霰弹枪"] = { ItemId = 106006, }, ["信号枪"] = { ItemId = 106007 }, ["蝎式手枪"] = { ItemId = 106008 }, ["沙漠之鹰"] = { ItemId = 106010 }, ["TMP9"] = { ItemId = 106011 }, --["乱斗手枪"] = { 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 } }; -- 武器配件类型表 ---@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, 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, }, [EWeaponPartType.SubTelescope] = { 203018, }, }; -- 武器配件 ---@type table WeaponParts = { [201001] = { ID = 201001, Type = EWeaponPartType.Muzzle, -- Name = "霰弹枪收束器", }, [201002] = { ID = 201002, Type = EWeaponPartType.Muzzle, -- Name = "枪口补偿器(冲锋枪)", }, [201003] = { ID = 201003, Type = EWeaponPartType.Muzzle, -- Name = "枪口补偿器(狙击枪)", }, [201004] = { ID = 201004, Type = EWeaponPartType.Muzzle, -- Name = "消焰器(冲锋枪)", }, [201005] = { ID = 201005, Type = EWeaponPartType.Muzzle, -- Name = "消焰器(狙击枪)", }, [201006] = { ID = 201006, Type = EWeaponPartType.Muzzle, -- Name = "消音器(冲锋枪,手枪)", }, [201007] = { ID = 201007, Type = EWeaponPartType.Muzzle, -- Name = "消音器(狙击枪)", }, [201008] = { ID = 201008, Type = EWeaponPartType.Muzzle, -- Name = "消音器(手枪)", }, [201009] = { ID = 201009, Type = EWeaponPartType.Muzzle, -- Name = "枪口补偿器(步枪)", }, [201010] = { ID = 201010, Type = EWeaponPartType.Muzzle, -- Name = "消焰器(步枪)", }, [201011] = { ID = 201011, Type = EWeaponPartType.Muzzle, -- Name = "消音器(步枪)", }, [201012] = { ID = 201012, Type = EWeaponPartType.Muzzle, -- Name = "鸭嘴枪口(霰弹枪)", }, [201050] = { ID = 201050, Type = EWeaponPartType.Muzzle, -- Name = "延长枪管(冲锋枪)", }, [201051] = { ID = 201051, Type = EWeaponPartType.Muzzle, -- Name = "延长枪管(步枪,狙击枪)", }, [202001] = { ID = 202001, Type = EWeaponPartType.Grip, -- Name = "直角前握把", }, [202002] = { ID = 202002, Type = EWeaponPartType.Grip, -- Name = "垂直握把", }, [202004] = { ID = 202004, Type = EWeaponPartType.Grip, -- Name = "轻型握把", }, [202005] = { ID = 202005, Type = EWeaponPartType.Grip, -- Name = "半截式握把", }, [202006] = { ID = 202006, Type = EWeaponPartType.Grip, -- Name = "拇指握把", }, [202007] = { ID = 202007, Type = EWeaponPartType.Grip, -- Name = "激光瞄准器", }, [203001] = { ID = 203001, Type = EWeaponPartType.Telescope, -- Name = "红点瞄准镜", }, [203002] = { ID = 203002, Type = EWeaponPartType.Telescope, -- Name = "全息瞄准镜", }, [203003] = { ID = 203003, Type = EWeaponPartType.Telescope, -- Name = "2倍 瞄准镜", }, [203004] = { ID = 203004, Type = EWeaponPartType.Telescope, -- Name = "4倍 瞄准镜", }, [203005] = { ID = 203005, Type = EWeaponPartType.Telescope, -- Name = "8倍 瞄准镜", }, [203014] = { ID = 203014, Type = EWeaponPartType.Telescope, -- Name = "3倍 瞄准镜", }, [203015] = { ID = 203015, Type = EWeaponPartType.Telescope, -- Name = "6倍 瞄准镜", }, [203018] = { ID = 203018, Type = EWeaponPartType.SubTelescope, -- Name = "侧面瞄准镜", }, -- [203023] = { ID = 203023, Type = EWeaponPartType.Telescope, Name = "红点UV瞄准镜", WrapperClass = , -- }, -- [203024] = { ID = 203024, Type = EWeaponPartType.Telescope, Name = "全息UV瞄准镜", WrapperClass = , -- Icon = "/Game/Arts/UI/TableIcons/ItemIcon/Attach/Icon_MZJ_QX.Icon_MZJ_QX", }, [204001] = { ID = 204001, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(手枪)", }, [204002] = { ID = 204002, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(手枪)", }, [204003] = { ID = 204003, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(手枪)", }, [204004] = { ID = 204004, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(冲锋枪,手枪)", }, [204005] = { ID = 204005, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(冲锋枪,手枪)", }, [204006] = { ID = 204006, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(冲锋枪,手枪)", }, [204007] = { ID = 204007, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(狙击枪)", }, [204008] = { ID = 204008, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(狙击枪)", }, [204009] = { ID = 204009, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(狙击枪)", }, [204010] = { ID = 204010, Type = EWeaponPartType.Magazine, -- Name = "子弹袋(霰弹枪)", }, [204011] = { ID = 204011, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(步枪,机枪)", }, [204012] = { ID = 204012, Type = EWeaponPartType.Magazine, -- Name = "快速弹匣(步枪,机枪)", }, [204013] = { ID = 204013, Type = EWeaponPartType.Magazine, -- Name = "快速扩容弹匣(步枪,机枪)", }, [204014] = { ID = 204014, Type = EWeaponPartType.Magazine, -- Name = "子弹袋(狙击枪,霰弹枪)", }, [204015] = { ID = 204015, Type = EWeaponPartType.Magazine, -- Name = "扩容弹匣(机枪)", }, [204016] = { ID = 204016, Type = EWeaponPartType.Magazine, -- Name = "并联弹匣(步枪)", }, [204017] = { ID = 204017, Type = EWeaponPartType.Magazine, -- Name = "霰弹快速弹匣", }, [205001] = { ID = 205001, Type = EWeaponPartType.ButtStock, -- Name = "枪托(Micro UZI)", }, [205002] = { ID = 205002, Type = EWeaponPartType.ButtStock, -- Name = "战术枪托(步枪,冲锋枪,机枪)", }, [205003] = { ID = 205003, Type = EWeaponPartType.ButtStock, -- Name = "托腮板(狙击枪)", }, [205004] = { ID = 205004, Type = EWeaponPartType.ButtStock, -- Name = "箭袋(十字弩)", } }; WeaponTypePost = { [EWeaponTypeNew.EWeaponTypeNew_Rifle] = "突击步枪", [EWeaponTypeNew.EWeaponTypeNew_Submachine] = "冲锋枪", [EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper] = "狙击枪", [EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper] = "射手步枪", [EWeaponTypeNew.EWeaponTypeNew_ShotGun] = "霰弹枪", [EWeaponTypeNew.EWeaponTypeNew_MachineGun] = { "轻机枪", "重机枪" }, [EWeaponTypeNew.EWeaponTypeNew_Pistol] = "手枪", [EWeaponTypeNew.EWeaponTypeNew_Special] = "火箭筒", [EWeaponTypeNew.EWeaponTypeNew_Melee] = "", } ---@type table 武器 Item WeaponTable = { -- 突击步枪 [101001] = { -- ItemName = "AKM突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, Enable = true }, --[101002] = { -- -- ItemName = "M16A4突击步枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, --}, [101003] = { -- ItemName = "SCAR-L突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101004] = { -- ItemName = "M416突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, Enable = true }, [101005] = { -- ItemName = "GROZA突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101006] = { -- ItemName = "AUG突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101007] = { -- ItemName = "QBZ突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101008] = { -- ItemName = "M762突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, Enable = true }, [101009] = { -- ItemName = "Mk47突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101010] = { -- ItemName = "G36C突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101011] = { -- ItemName = "AC-VAL突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101012] = { -- ItemName = "蜜獾突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, [101013] = { -- ItemName = "FAMAS突击步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle, }, -- 冲锋枪 [102001] = { -- ItemName = "UZI冲锋枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102002] = { -- ItemName = "UMP45冲锋枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102003] = { -- ItemName = "Vector冲锋枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102004] = { -- ItemName = "汤姆逊冲锋枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, }, [102005] = { -- ItemName = "野牛冲锋枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, Enable = true }, [102007] = { -- ItemName = "MP5K冲锋枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, }, [102008] = { -- ItemName = "AKS-74U", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, }, [102105] = { -- ItemName = "P90冲锋枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine, }, -- 栓动狙击 [103001] = { -- ItemName = "Kar98K狙击枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, [103002] = { -- ItemName = "M24狙击枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, [103003] = { -- ItemName = "AWM狙击枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, --[103901] = { -- --ItemName = "Kar98K狙击枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, --}, --[103902] = { -- --ItemName = "M24狙击枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, --}, --[103903] = { -- --ItemName = "AWM狙击枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, --}, [103008] = { -- ItemName = "Win94狙击枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, [103011] = { -- ItemName = "莫辛纳甘狙击枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, [103012] = { -- ItemName = "AMR狙击枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, [103015] = { -- ItemName = "M200狙击枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper, }, -- 连发狙击 [103004] = { -- ItemName = "SKS射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, Enable = true }, [103005] = { -- ItemName = "VSS射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, }, [103006] = { -- ItemName = "Mini14射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, Enable = true }, [103007] = { -- ItemName = "Mk14射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, Enable = true }, [103009] = { -- ItemName = "SLR射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, Enable = true }, [103010] = { -- ItemName = "QBU射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, }, [103013] = { -- ItemName = "M417射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, }, [103014] = { -- ItemName = "MK20-H射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, }, [103100] = { -- ItemName = "MK12射手步枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper, }, -- 霰弹枪 [104001] = { -- ItemName = "S686霰弹枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, Enable = true }, [104002] = { -- ItemName = "S1897霰弹枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, Enable = true }, [104003] = { -- ItemName = "S12K霰弹枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, Enable = true }, [104004] = { -- ItemName = "DBS霰弹枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, }, [104005] = { -- ItemName = "AA12-G霰弹枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, }, [104100] = { -- ItemName = "SPAS-12霰弹枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun, }, -- 轻机枪 [105001] = { -- ItemName = "M249轻机枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun, Enable = true }, [105002] = { -- ItemName = "DP-28轻机枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun, Enable = true }, [105003] = { -- ItemName = "M134重机枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun, Enable = true }, [105010] = { -- ItemName = "MG3轻机枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun, Enable = true }, [105012] = { -- ItemName = "PKM轻机枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun, Enable = true }, -- 手枪 [106001] = { -- ItemName = "P92手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106002] = { -- ItemName = "P1911手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106003] = { -- ItemName = "R1895手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106004] = { -- ItemName = "P18C手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106005] = { -- ItemName = "R45手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, Enable = true }, [106006] = { -- ItemName = "短管霰弹枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, }, --[106007] = { -- ItemName = "信号枪", -- ItemSubId = 106, -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, --}, [106008] = { -- ItemName = "蝎式手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, }, [106010] = { -- ItemName = "沙漠之鹰手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, }, [106011] = { -- ItemName = "TMP-9手枪", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, }, --[106107] = { -- -- ItemName = "乱斗手枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol, --}, -- 弓箭 [107001] = { -- ItemName = "十字弩", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Crossbow, Enable = true, }, [107006] = { -- ItemName = '战术弩', TypeNew = EWeaponTypeNew.EWeaponTypeNew_Crossbow, Enable = true, }, [107008] = { -- ItemName = '燃点复合弓', TypeNew = EWeaponTypeNew.EWeaponTypeNew_Crossbow, Enable = true, }, [107002] = { -- ItemName = "RPG-7火箭筒", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, Enable = true }, --[107005] = { -- -- ItemName = "铁拳火箭筒", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[107094] = { -- ItemName = "AT4-A激光导弹", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[107096] = { -- ItemName = "短管榴弹发射器", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[107098] = { -- ItemName = "MGL榴弹发射器", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[107099] = { -- ItemName = "M3E1-A导弹", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[107905] = { -- ItemName = "M202四联火箭筒", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, -- Enable = true --}, -- 近战武器 [108001] = { -- ItemName = "大砍刀", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, [108002] = { -- ItemName = "撬棍", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, [108003] = { -- ItemName = "镰刀", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, [108004] = { -- ItemName = "平底锅", TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee, Enable = true }, -- 特殊武器 --[109008] = { -- ItemName = "爆破投射器", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[109009] = { -- ItemName = "单发蓄力能量步枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[109010] = { -- ItemName = "电击枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --}, --[109011] = { -- ItemName = "激光步枪", -- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special, --} } -- 武器套装表 ---@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, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- M16A4突击步枪 [101002] = { [EWeaponPartType.Best] = { { 201009, 203002, 204013, 205002, }, { 201011, 203001, 204013, 205002, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.ButtStock] = { 205002 }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- 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, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- 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, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.ButtStock] = { 205002, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- GROZA突击步枪 [101005] = { [EWeaponPartType.Best] = { { 201011, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, }, -- AUG突击步枪 [101006] = { [EWeaponPartType.Best] = { { 201009, 202002, 203002, 204013, }, { 201011, 202002, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- QBZ突击步枪 [101007] = { [EWeaponPartType.Best] = { { 201009, 202002, 203001, 204013, }, { 201011, 202004, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- M762突击步枪 [101008] = { [EWeaponPartType.Best] = { { 201009, 202002, 203001, 204013, }, { 201011, 202004, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204012, 204011 }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- 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, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204012, 204011 }, [EWeaponPartType.ButtStock] = { 205002, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- G36C突击步枪 [101010] = { [EWeaponPartType.Best] = { { 201009, 202002, 203001, 204013, }, { 201011, 202004, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204012, 204011 }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- AC-VAL突击步枪 [101011] = { [EWeaponPartType.Best] = { { 202002, 203002, 204013, }, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, }, [EWeaponPartType.Magazine] = { 204013, 204012, 204011 }, }, -- 蜜獾突击步枪 [101012] = { [EWeaponPartType.Best] = { { 201009, 203001, 204013, }, { 201011, 203002, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204012, 204011 }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- FAMAS突击步枪 [101013] = { [EWeaponPartType.Best] = { { 201009, 203002, 204013, }, { 201009, 203001, 204013, }, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204012, 204011 }, }, -- UZI冲锋枪 [102001] = { [EWeaponPartType.Best] = { { 201002, 203001, 204006, 205001 }, { 201006, 203002, 204006, 205001 }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Magazine] = { 204006, 204004, 204005, }, [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, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204006, 204004, 204005, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- Vector冲锋枪 [102003] = { [EWeaponPartType.Best] = { { 201002, 202002, 203001, 204006, 205002, }, { 201006, 202004, 203002, 204006, 205002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Magazine] = { 204006, 204004, 204005, }, [EWeaponPartType.Grip] = { 202002, 202004, 202005, 202007, }, [EWeaponPartType.ButtStock] = { 205002, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- 汤姆逊冲锋枪 [102004] = { [EWeaponPartType.Best] = { { 201006, 202002, 203001, 204006, }, { 201006, 202002, 203002, 204006, }, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202002, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Magazine] = { 204006, 204004, 204005, }, }, -- 野牛冲锋枪 [102005] = { [EWeaponPartType.Best] = { { 201002, 203001, }, { 201006, 203002, }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- 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, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204006, 204004, 204005, }, [EWeaponPartType.ButtStock] = { 205002, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- AKS-74U冲锋枪 [102008] = { [EWeaponPartType.Best] = { { 201002, 203001, 204006, }, { 201006, 203002, 204006, }, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 }, [EWeaponPartType.Magazine] = { 204006, 204004, 204005, }, }, -- P90冲锋枪 [102105] = { }, -- Kar98K狙击枪 [103001] = { [EWeaponPartType.Best] = { { 201007, 203015, 204014 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.ButtStock] = { 205003, 204014, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, [103901] = { [EWeaponPartType.Best] = { { 201007, 203015, 204014 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.ButtStock] = { 204014, 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- M24狙击枪 [103002] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, [103902] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- AWM狙击枪 [103003] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, [103903] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- AMR狙击枪 [103012] = { [EWeaponPartType.Best] = { { 203015, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, }, -- M200狙击枪 [103015] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- SKS射手步枪 [103004] = { [EWeaponPartType.Best] = { { 201007, 202002, 203015, 204009, 205003 }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, 204014, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- VSS射手步枪 [103005] = { [EWeaponPartType.Best] = { { 204009, 205003, }, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, }, }, -- Mini14射手步枪 [103006] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- Mk14射手步枪 [103007] = { [EWeaponPartType.Best] = { { 201007, 203015, 204009, 205003, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- Win94狙击枪 [103008] = { [EWeaponPartType.Best] = { { 204014, }, }, [EWeaponPartType.ButtStock] = { 204014 }, }, -- SLR射手步枪 [103009] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, 205003, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.ButtStock] = { 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- QBU射手步枪 [103010] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- 莫辛纳甘狙击枪 [103011] = { [EWeaponPartType.Best] = { { 203015, 201007, 204014, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007 }, [EWeaponPartType.ButtStock] = { 205003, 204014, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- Mk12射手步枪 [103100] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, 202002, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- Mk417射手步枪 [103013] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, 202002, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- MK20-H射手步枪 [103014] = { [EWeaponPartType.Best] = { { 203015, 201007, 204009, 202002, }, }, [EWeaponPartType.Muzzle] = { 201003, 201005, 201007, 201009, 201010, 201011, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204009, 204007, 204008, }, [EWeaponPartType.Grip] = { 202001, 202002, 202004, 202005, 202006, 202007, }, [EWeaponPartType.ButtStock] = { 205003, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- 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, 203015, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011, 201012, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- DBS霰弹枪 [104004] = { [EWeaponPartType.Best] = { { 203002, 204017, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204017, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- AA12-G霰弹枪 [104005] = { [EWeaponPartType.Best] = { { 204013, 203001, 201009, }, { 204013, 203002, 201009, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Muzzle] = { 201009, 201010, 201011, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, }, -- SPAS-12霰弹枪 [104100] = { [EWeaponPartType.Best] = { { 204017, }, }, [EWeaponPartType.Magazine] = { 204017, }, }, -- M249轻机枪 [105001] = { [EWeaponPartType.Best] = { { 203001, 204013, 205002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.ButtStock] = { 205002 }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- DP-28轻机枪 [105002] = { [EWeaponPartType.Best] = { { 203002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, }, -- M134重机枪 [105003] = {}, -- MG3轻机枪 [105010] = { [EWeaponPartType.Best] = { { 203002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, }, -- PKM轻机枪 [105012] = { [EWeaponPartType.Best] = { { 203001, 204013, 202002, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, 203015, }, [EWeaponPartType.Magazine] = { 204013, 204011, 204012, }, [EWeaponPartType.Grip] = { 202001, 202002, }, [EWeaponPartType.SubTelescope] = { 203018, }, }, -- P92手枪 [106001] = { [EWeaponPartType.Best] = { { 203001, 201006, 204006, 202007, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202007, }, [EWeaponPartType.Magazine] = { 204006, 204001, 204002, }, }, -- P1911手枪 [106002] = { [EWeaponPartType.Best] = { { 203001, 201006, 204006, 202007, }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Muzzle] = { 201006, }, [EWeaponPartType.Grip] = { 202007, }, [EWeaponPartType.Magazine] = { 204006, 204001, 204002, }, }, -- 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] = { 204006, 204004, 204005, }, [EWeaponPartType.Grip] = { 202007 } }, -- TMP-9手枪 [106011] = { [EWeaponPartType.Best] = { { 203002, 204006, 201002 }, }, [EWeaponPartType.Telescope] = { 203001, 203002, }, [EWeaponPartType.Magazine] = { 204006, 204004, 204005, }, [EWeaponPartType.Muzzle] = { 201002, 201004, 201006, }, }, -- 乱斗手枪 [106107] = {}, -- 十字弩 [107001] = { [EWeaponPartType.Best] = { { 203004, 205004 }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, }, [EWeaponPartType.ButtStock] = { 205004, }, }, -- 战术弩 [107006] = { [EWeaponPartType.Best] = { { 203004, 205004 }, }, [EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014, }, [EWeaponPartType.ButtStock] = { 205004, }, }, -- 燃点复合弓 [107008] = { [EWeaponPartType.Best] = { { 203014, }, }, [EWeaponPartType.Telescope] = { 203001, 203003, 203014, }, }, -- RPG-7火箭弹 [107002] = {}, -- 铁拳火箭筒 [107005] = {}, -- 大砍刀 [108001] = {}, -- 撬棍 [108002] = {}, -- 镰刀 [108003] = {}, -- 平底锅 [108004] = {} }; function GetBestWeaponPart(ItemId, PartType) if table.isEmpty(WeaponSuits[ItemId]) then return nil; end if table.isEmpty(WeaponSuits[ItemId][PartType]) then return nil; end --- 获取 Best 列表 local BestList = {}; if WeaponSuits[ItemId][EWeaponPartType.Best] then BestList = WeaponSuits[ItemId][EWeaponPartType.Best][1]; end end --- 武器子弹ID 映射表,可以直接通过 Weapon:GetAmmoId() 获取 ---@type table WeaponAmmoIdMap = { [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, [102008] = 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, [103012] = 302001, [103015] = 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 = "滑雪板", -- }, -- -- [601001] = { -- -- ItemName = "能量饮料", -- }, -- [601002] = { -- -- ItemName = "肾上腺素", -- }, -- [601003] = { -- -- ItemName = "止痛药", -- }, -- [601004] = { -- -- ItemName = "绷带", -- }, -- [601005] = { -- -- ItemName = "急救包", -- }, -- [601006] = { -- -- ItemName = "全能医疗箱", -- }, -- -- -- Bomb -- [602001] = { -- -- ItemName = "震爆弹", -- }, -- [602002] = { -- -- ItemName = "烟雾弹", -- }, -- [602003] = { -- -- ItemName = "燃烧瓶", -- }, -- [602004] = { -- -- ItemName = "破片手榴弹", -- }, -- -- [603001] = { -- -- ItemName = "燃料", -- }, -- [604020] = { -- -- ItemName = "山地自行车", -- } --} -- New ------------------------------------------ -- 武器类型名 WeaponTypeSuffixName = { [101] = "突击步枪", [102] = "冲锋枪", [103] = "狙击枪", [104] = "霰弹枪", [105] = "机枪", [106] = "手枪", [107] = "特殊武器", [108] = "近战武器", [190] = "其他", } -- 武器名反映射武器类型ID WeaponTypeNameMappingSubTypeID = { ["突击步枪"] = 101, ["冲锋枪"] = 102, ["狙击枪"] = 103, ["霰弹枪"] = 104, ["机枪"] = 105, ["手枪"] = 106, ["特殊武器"] = 107, ["近战武器"] = 108, ["其他"] = 190, } -- 玩家可自定义搭配的武器 PlayerCustomWeapon = { { TypeName = "自动枪"; WeaponIDs = { 101001, 101003, 101004, 101005, 101006, 101007, 101008, 101009, 101010, 101011, 101012, 101013, 102001, 102002, 102003, 102004, 102005, 102105, 102007, 102008, 105001, 105002, 105003, 105010, 105012, }; }, { TypeName = "狙击"; WeaponIDs = { 103001, 103002, 103003, 103008, 103011, 103012, 103015, 103004, 103005, 103006, 103007, 103009, 103010, 103013, 103014, 103100, }; }, { TypeName = "霰弹枪"; WeaponIDs = { 104001, 104002, 104003, 104004, 104005, 104100, }; }, { TypeName = "手枪"; WeaponIDs = { 106001, 106002, 106003, 106004, 106005, 106006, 106008, 106010, 106011, }; }, { TypeName = "其他"; WeaponIDs = { 107001, 107006, 107008, 108001, 108002, 108003, 108004, 107002, }; }, } -- 熟练度类型 EWeaponProficiencyType = { Proficiency = 1, -- 熟练度 MatchNumber = 2, -- 使用数 WinRate = 3, -- 胜率 CriticalStrikeCount = 4, -- 暴击数 CriticalHitRate = 5, -- 暴击率 AllDamage = 6, -- 总伤害 } -- 熟练度名称 WeaponProficiencyName = { [EWeaponProficiencyType.Proficiency] = "熟练度", [EWeaponProficiencyType.MatchNumber] = "对局数", [EWeaponProficiencyType.WinRate] = "胜率", [EWeaponProficiencyType.CriticalStrikeCount] = "暴击数", [EWeaponProficiencyType.CriticalHitRate] = "暴击率", [EWeaponProficiencyType.AllDamage] = "总伤害", } -- 各类型对熟练度的影响占比,总和可超过1 WeaponProficiencyRateFromType = { [EWeaponProficiencyType.MatchNumber] = 0.6, [EWeaponProficiencyType.WinRate] = 0.2, [EWeaponProficiencyType.CriticalStrikeCount] = 0.1, [EWeaponProficiencyType.CriticalHitRate] = 0.2, [EWeaponProficiencyType.AllDamage] = 0.3, } -- 各类型对熟练度计算的数值上限,用于数值除的分母 WeaponProficiencyUpperLimitFromType = { [EWeaponProficiencyType.MatchNumber] = 30, [EWeaponProficiencyType.WinRate] = 1.0, [EWeaponProficiencyType.CriticalStrikeCount] = 150, [EWeaponProficiencyType.CriticalHitRate] = 0.5, [EWeaponProficiencyType.AllDamage] = 10000, } --- 计算熟练度的函数 ---@param WeaponProficiencyInfo "table {MatchNumber, WinRate, CriticalStrikeCount, CriticalHitRate, AllDamage} Key值为EWeaponProficiencyType" ---@return "熟练度:int[0, 100], 熟练度是否已满:bool" function WeaponProficiencyCalculation(WeaponProficiencyInfo) -- 返回的熟练度范围 [0, 1] local WeaponProficiency = 0; for i, v in pairs(WeaponProficiencyInfo) do if WeaponProficiencyRateFromType[i] then WeaponProficiency = WeaponProficiency + math.clamp(v / WeaponProficiencyUpperLimitFromType[i], 0, 1) * WeaponProficiencyRateFromType[i] end end return math.clamp(math.floor(WeaponProficiency * 100 + 0.5), 0, 100), WeaponProficiency > 1 end -- 校验熟练度信息表 以防客户端出错 function WeaponProficiencyDataCheck(WeaponProficiencyInfo) if WeaponProficiencyInfo then for i, v in pairs(EWeaponProficiencyType) do if WeaponProficiencyInfo[v] == nil or type(WeaponProficiencyInfo[v]) ~= "number" then WeaponProficiencyInfo[v] = 0 end end return WeaponProficiencyInfo else UGCLogSystem.LogError("[WeaponProficiencyDataCheck_Func] Is Nil") return { [EWeaponProficiencyType.Proficiency] = 0, [EWeaponProficiencyType.MatchNumber] = 0, [EWeaponProficiencyType.WinRate] = 0, [EWeaponProficiencyType.CriticalStrikeCount] = 0, [EWeaponProficiencyType.CriticalHitRate] = 0, [EWeaponProficiencyType.AllDamage] = 0, } end end -- 武器类型名后缀长度 WeaponTypeSuffixLength = { [101] = 4, [102] = 3, [103] = 3, [104] = 3, [105] = 3, [106] = 2, [107] = 0, [108] = 0, [190] = 0, } -- New End -------------------------------------- WeaponIdTable = {}; AllWeaponCount = 0; function GetWeaponIdTable() WeaponIdTable = {}; --- 判断是否需要加到 WeaponIdTable 的函数 local WeaponIdTypeFunc = function(InId) local TypeNew = WeaponTable[InId].TypeNew; local RemoveTypes = { EWeaponTypeNew.EWeaponTypeNew_ThrownObj, } -- 移除火箭筒这些武器 for i, v in pairs(RemoveTypes) do if TypeNew == v then return false; end end if InId == 106007 then return false; end -- 移除信号枪 return true; end -- 加载所有的武器 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 ---@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 GetWeaponIdTable();