2025-01-04 23:00:19 +08:00

1648 lines
45 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 武器表
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,
}
-- 图标使用 UGCItemSystem.GetItemData(ItemId);
WeaponTypeInfo = {
[EWeaponTypeNew.EWeaponTypeNew_Melee] = {
Name = "近战武器",
ItemId = 108004,
Ammo = 0;
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_PDG.T_PDG'),
},
[EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper] = {
Name = "狙击枪",
ItemId = 103003,
Ammo = 10,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_AWM.T_AWM'),
},
[EWeaponTypeNew.EWeaponTypeNew_Rifle] = {
Name = "突击步枪",
ItemId = 101001,
Ammo = 200,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_M416.T_M416'),
},
[EWeaponTypeNew.EWeaponTypeNew_Submachine] = {
Name = "冲锋枪",
ItemId = 102002,
Ammo = 200,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_UMP45.T_UMP45'),
},
[EWeaponTypeNew.EWeaponTypeNew_MachineGun] = {
Name = "机枪",
ItemId = 105001,
Ammo = 200,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_M249.T_M249'),
},
[EWeaponTypeNew.EWeaponTypeNew_Pistol] = {
Name = "手枪",
ItemId = 106001,
Ammo = 50,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_P1911.T_P1911'),
},
[EWeaponTypeNew.EWeaponTypeNew_ShotGun] = {
Name = "霰弹枪",
ItemId = 104001,
Ammo = 50,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_S1897.T_S1897'),
},
[EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper] = {
Name = "射手步枪",
ItemId = 103004,
Ammo = 100,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_SKS.T_SKS'),
},
-- 特殊武器Icon要换
[EWeaponTypeNew.EWeaponTypeNew_Special] = {
Name = "特殊武器",
ItemId = 107002,
Ammo = 15,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_RPG.T_RPG'),
},
[EWeaponTypeNew.EWeaponTypeNew_ThrownObj] = {
Name = "投掷物",
ItemId = 602004,
},
[EWeaponTypeNew.EWeaponTypeNew_Crossbow] = {
Name = "弓箭",
ItemId = 107001,
Ammo = 80,
Icon = UGCGameSystem.GetUGCResourcesFullPath('Asset/Art/UITexture/White/T_SZN.T_SZN'),
},
};
---@type table<int32, WeaponTableItem> 武器 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,
Enable = true,
},
[101004] = {
-- ItemName = "M416突击步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle,
Enable = true
},
[101005] = {
-- ItemName = "GROZA突击步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle,
},
[101006] = {
-- ItemName = "AUG突击步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle,
Enable = true,
},
[101007] = {
-- ItemName = "QBZ突击步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle,
Enable = true,
},
[101008] = {
-- ItemName = "M762突击步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle,
Enable = true
},
[101009] = {
-- ItemName = "Mk47突击步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle,
},
[101010] = {
-- ItemName = "G36C突击步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Rifle,
},
[101012] = {
-- ItemName = "蜜獾突击步枪",
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,
--Enable = true,
},
[102105] = {
-- ItemName = "P90冲锋枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Submachine,
--Enable = true,
},
-- 狙击枪
[103001] = {
-- ItemName = "Kar98K狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
Enable = true
},
[103002] = {
-- ItemName = "M24狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
Enable = true
},
[103003] = {
-- ItemName = "AWM狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
Enable = true
},
[103012] = {
-- ItemName = "AMR狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
Enable = true
},
[103015] = {
-- ItemName = "M200狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
Enable = true
},
-- 射手步枪
[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
},
[103008] = {
-- ItemName = "Win94狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper,
},
[103009] = {
-- ItemName = "SLR射手步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper,
Enable = true
},
[103010] = {
-- ItemName = "QBU射手步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper,
},
[103014] = {
-- ItemName = "MK20-H射手步枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper,
},
-- 狙击枪
[103011] = {
-- ItemName = "莫辛纳甘狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
},
[103100] = {
-- ItemName = "Mk12狙击枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_BurstShotSniper,
},
--[103901] = {
-- ItemName = "Kar98K狙击枪",
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
--},
--[103902] = {
-- ItemName = "M24狙击枪",
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
--},
--[103903] = {
-- ItemName = "AWM狙击枪",
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_SingleShotSniper,
--},
-- 霰弹枪
[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,
Enable = true,
},
[104005] = {
-- ItemName = "AA12",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun,
Enable = true,
},
[104100] = {
-- ItemName = "SPAS",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_ShotGun,
Enable = true,
},
-- 轻机枪
[105001] = {
-- ItemName = "M249轻机枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_MachineGun,
Enable = true
},
[105002] = {
-- ItemName = "DP-28轻机枪",
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,
--Enable = true,
},
--[106007] = {
-- ItemName = "信号枪",
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol,
--},
[106008] = {
-- ItemName = "蝎式手枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol,
Enable = true,
},
[106010] = {
-- ItemName = "沙漠之鹰手枪",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Pistol,
Enable = true
},
-- 弓箭
[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,
Enable = true
},
[107098] = {
ItemName = "MGL榴弹发射器",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special,
Enable = true,
},
[107099] = {
ItemName = "M3E1-A导弹",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special,
Enable = true,
},
--[107905] = {
-- ItemName = "M202四联火箭筒",
-- ItemSubId = 105,
-- 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
},
[107010] = {
-- ItemName = "突击盾牌",
TypeNew = EWeaponTypeNew.EWeaponTypeNew_Melee,
--Enable = true
},
-- 特殊武器
--[109008] = {
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special,
--},
--[109009] = {
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special,
--},
--[109010] = {
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special,
--},
--[109011] = {
-- TypeNew = EWeaponTypeNew.EWeaponTypeNew_Special,
--}
}
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 },
["战术弩"] = { ItemId = 107006 },
["燃点复合弓"] = { ItemId = 107008 },
--["AT4"] = { ItemId = 107094 },
--["MGL"] = { ItemId = 107098 },
--["M3E1"] = { ItemId = 107099 },
--["M202"] = { ItemId = 107905 },
["砍刀"] = { ItemId = 108001 },
["撬棍"] = { ItemId = 108002, },
["镰刀"] = { ItemId = 108003 },
["平底锅"] = { ItemId = 108004 },
["突击盾牌"] = { ItemId = 107010 },
--["爆破投射器"] = { ItemId = 190008 },
--["单发蓄力能量步枪"] = { ItemId = 190009 },
--["电击枪"] = { ItemId = 190010 },
--["激光步枪"] = { ItemId = 190011 }
};
--- 射击武器 Slot
---@type table<ESurviveWeaponPropSlot>
ShootWeaponEnums = {
ESurviveWeaponPropSlot.SWPS_MainShootWeapon1,
ESurviveWeaponPropSlot.SWPS_MainShootWeapon2,
ESurviveWeaponPropSlot.SWPS_SubShootWeapon
};
---
---@type table<ESurviveWeaponPropSlot>
--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<EWeaponPartType, WeaponTypeNameItem>
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<EWeaponPartType, table<int32>>
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<int32, WeaponPartItem>
WeaponParts = {
[201001] = {
Type = EWeaponPartType.Muzzle,
-- Name = "霰弹枪收束器",
},
[201002] = {
Type = EWeaponPartType.Muzzle,
-- Name = "枪口补偿器(冲锋枪)",
},
[201003] = {
Type = EWeaponPartType.Muzzle,
-- Name = "枪口补偿器(狙击枪)",
},
[201004] = {
Type = EWeaponPartType.Muzzle,
-- Name = "消焰器(冲锋枪)",
},
[201005] = {
Type = EWeaponPartType.Muzzle,
-- Name = "消焰器(狙击枪)",
},
[201006] = {
Type = EWeaponPartType.Muzzle,
-- Name = "消音器(冲锋枪,手枪)",
},
[201007] = {
Type = EWeaponPartType.Muzzle,
-- Name = "消音器(狙击枪)",
},
[201008] = {
Type = EWeaponPartType.Muzzle,
-- Name = "消音器(手枪)",
},
[201009] = {
Type = EWeaponPartType.Muzzle,
-- Name = "枪口补偿器(步枪)",
},
[201010] = {
Type = EWeaponPartType.Muzzle,
-- Name = "消焰器(步枪)",
},
[201011] = {
Type = EWeaponPartType.Muzzle,
-- Name = "消音器(步枪)",
},
[201012] = {
Type = EWeaponPartType.Muzzle,
-- Name = "鸭嘴枪口(霰弹枪)",
},
[201050] = {
Type = EWeaponPartType.Muzzle,
-- Name = "延长枪管(冲锋枪)",
},
[201051] = {
Type = EWeaponPartType.Muzzle,
-- Name = "延长枪管(步枪,狙击枪)",
},
[202001] = {
Type = EWeaponPartType.Grip,
-- Name = "直角前握把",
},
[202002] = {
Type = EWeaponPartType.Grip,
-- Name = "垂直握把",
},
[202004] = {
Type = EWeaponPartType.Grip,
-- Name = "轻型握把",
},
[202005] = {
Type = EWeaponPartType.Grip,
-- Name = "半截式握把",
},
[202006] = {
Type = EWeaponPartType.Grip,
-- Name = "拇指握把",
},
[202007] = {
Type = EWeaponPartType.Grip,
-- Name = "激光瞄准器",
},
[203001] = {
Type = EWeaponPartType.Telescope,
-- Name = "红点瞄准镜",
},
[203002] = {
Type = EWeaponPartType.Telescope,
-- Name = "全息瞄准镜",
},
[203003] = {
Type = EWeaponPartType.Telescope,
-- Name = "2倍 瞄准镜",
},
[203004] = {
Type = EWeaponPartType.Telescope,
-- Name = "4倍 瞄准镜",
},
[203005] = {
Type = EWeaponPartType.Telescope,
-- Name = "8倍 瞄准镜",
},
[203014] = {
Type = EWeaponPartType.Telescope,
-- Name = "3倍 瞄准镜",
},
[203015] = {
Type = EWeaponPartType.Telescope,
-- Name = "6倍 瞄准镜",
},
[203018] = {
Type = EWeaponPartType.Telescope,
-- Name = "侧面瞄准镜",
},
[203023] = {
Type = EWeaponPartType.Telescope,
--Name = "红点UV瞄准镜",
},
[203024] = {
Type = EWeaponPartType.Telescope,
--Name = "全息UV瞄准镜",
},
[204001] = {
Type = EWeaponPartType.Magazine,
-- Name = "扩容弹匣(手枪)",
},
[204002] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速弹匣(手枪)",
},
[204003] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速扩容弹匣(手枪)",
},
[204004] = {
Type = EWeaponPartType.Magazine,
-- Name = "扩容弹匣(冲锋枪,手枪)",
},
[204005] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速弹匣(冲锋枪,手枪)",
},
[204006] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速扩容弹匣(冲锋枪,手枪)",
},
[204007] = {
Type = EWeaponPartType.Magazine,
-- Name = "扩容弹匣(狙击枪)",
},
[204008] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速弹匣(狙击枪)",
},
[204009] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速扩容弹匣(狙击枪)",
},
[204010] = {
Type = EWeaponPartType.Magazine,
-- Name = "子弹袋(霰弹枪)",
},
[204011] = {
Type = EWeaponPartType.Magazine,
-- Name = "扩容弹匣(步枪,机枪)",
},
[204012] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速弹匣(步枪,机枪)",
},
[204013] = {
Type = EWeaponPartType.Magazine,
-- Name = "快速扩容弹匣(步枪,机枪)",
},
[204014] = {
Type = EWeaponPartType.Magazine,
-- Name = "子弹袋(狙击枪,霰弹枪)",
},
[204015] = {
Type = EWeaponPartType.Magazine,
-- Name = "扩容弹匣(机枪)",
},
[204016] = {
Type = EWeaponPartType.Magazine,
-- Name = "并联弹匣(步枪)",
},
[204017] = {
Type = EWeaponPartType.Magazine,
-- Name = "霰弹快速弹匣",
},
[205001] = {
Type = EWeaponPartType.ButtStock,
-- Name = "枪托(Micro UZI)",
},
[205002] = {
Type = EWeaponPartType.ButtStock,
-- Name = "战术枪托(步枪,冲锋枪,机枪)",
},
[205003] = {
Type = EWeaponPartType.ButtStock,
-- Name = "托腮板(狙击枪)",
},
[205004] = {
Type = EWeaponPartType.ButtStock,
-- Name = "箭袋(十字弩)",
}
};
-- 武器套装表
---@type table<int32, table<EWeaponPartType, table<int32, int32>>>
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 }
},
[103012] = {
[EWeaponPartType.Best] = {
{ 203015 },
},
[EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 },
},
[103015] = {
[EWeaponPartType.Best] = {
{ 201007, 203015, 204009 },
},
[EWeaponPartType.Muzzle] = { 201003, 201005, 201007 },
[EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014, 203015 },
[EWeaponPartType.Magazine] = { 204007, 204008, 204009 },
},
-- 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, 203005, 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, 203005, 203014 },
[EWeaponPartType.Magazine] = { 204011, 204012, 204013 },
[EWeaponPartType.ButtStock] = { 205002 }
},
-- DP-28轻机枪
[105002] = {
[EWeaponPartType.Best] = {
{ 203002, },
},
[EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203005, 203014 }
},
[105012] = {
[EWeaponPartType.Best] = {
{ 203001, 204013, 202002, },
},
[EWeaponPartType.Telescope] = { 203001, 203002, 203003, 203004, 203014 },
[EWeaponPartType.Grip] = { 202001, 202002, },
[EWeaponPartType.Magazine] = { 204011, 204012, 204013 },
},
-- 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.Grip] = { 205004 }
},
-- 大砍刀
[108001] = {},
-- 撬棍
[108002] = {},
-- 镰刀
[108003] = {},
-- 平底锅
[108004] = {}
};
-- 武器类型名称对应表
---@type table<EWeaponTypeNew, TypeNameItem>
--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<int32, int32>
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,
[103012] = 306002,
[103014] = 302001,
[103015] = 306003,
-- [103100] ,
[104001] = 304001,
[104002] = 304001,
[104003] = 304001,
[104004] = 304001,
[104005] = 304001,
[104100] = 304001,
[105001] = 303001,
[105002] = 302001,
[105003] = 302001,
[105012] = 302001,
[106001] = 301001,
[106002] = 305001,
[106003] = 302001,
[106004] = 301001,
[106005] = 305001,
[106006] = 304001,
-- [106007] ,
[106008] = 301001,
[106010] = 305001,
-- [106107] ,
[107001] = 307001,
[107002] = 307002,
[107008] = 307001,
[107006] = 307001,
-- [107005] ,
[107094] = 307002,
-- [107098] ,
--[107099] = 307002,
[107905] = 307002,
[190008] = 307102,
[190009] = 307100,
[190010] = 307103,
[190011] = 307101
}
---@type table<int32, AmmoTableItem>
--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<int32, TableItemBase>
--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 = "山地自行车",
-- }
--};
WeaponIdTable = {};
AllWeaponCount = 0;
--- 卸载
function UnloadWeaponIconTexture()
WeaponTable = nil;
WeaponIdTable = nil;
WeaponParts = nil;
WeaponSuits = nil;
WeaponAmmunitionItem = 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<int32, EWeaponIdType>|EWeaponIdType|nil
---@return table<int32, int32>
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
---@param InType EWeaponTypeNew
function GetWeaponIdsByTypeNew(InType)
local Weapons = {};
for i, v in pairs(WeaponTable) do
if table.hasItem(InType, v.TypeNew) and v.Enable then table.insert(Weapons, i); end
end
return Weapons;
end
---@param InType EWeaponTypeNew 武器类型
---@return ItemId 物品 ItemId
function RandomGetWeaponIdByTypeNew(InType)
local Weapons = GetWeaponIdsByTypeNew(InType);
return Weapons[math.random(#Weapons)];
end
function GetWeaponTypeIconPath(InType)
if WeaponTypeInfo[InType].Icon then
return WeaponTypeInfo[InType].Icon;
elseif WeaponTypeInfo[InType].ItemId then
local ItemData = UGCItemSystem.GetItemData(WeaponTypeInfo[InType].ItemId);
return ItemData.ItemSmallIcon_n;
end
return "";
end