Improve skill cooldowns and weapon handling logic

This commit is contained in:
Juzlus 2025-08-30 03:24:02 +02:00
parent 28a7d0048c
commit 1d9e70aeda
9 changed files with 38 additions and 14 deletions

View file

@ -173,7 +173,8 @@ namespace jRandomSkills
{
List<string> playerWeapons = new List<string>();
foreach (var weapon in player.PlayerPawn.Value.WeaponServices.MyWeapons)
playerWeapons.Add(weapon?.Value?.DesignerName);
if (weapon.Value != null && weapon.Value.IsValid)
playerWeapons.Add(SkillUtils.GetDesignerName(weapon.Value));
return playerWeapons.Count == 0 ? null : playerWeapons.ToArray();
}