private WeaponConfiguration GetDefaultConfiguration(WeaponId weapon, WeaponSkillLevel skill) { if (!WeaponConfigurationConstants.Defaults.ContainsKey(weapon)) { return new() { WeaponType = weapon } } ; if (!WeaponConfigurationConstants.Defaults[weapon].ContainsKey(skill)) { if (WeaponConfigurationConstants.Defaults[weapon].ContainsKey(WeaponSkillLevel.Std)) { return(WeaponConfigurationConstants.Defaults[weapon][WeaponSkillLevel.Std]); } return(new() { WeaponType = weapon }); } return(WeaponConfigurationConstants.Defaults[weapon][skill]); } }
public WeaponConfiguration GetWeaponConfiguration(WeaponId weapon, WeaponSkillLevel skill = WeaponSkillLevel.Poor) { return(this.weaponConfigurations[weapon][skill]); }
private Packet CreateSetStatPacket(WeaponId weapon, WeaponConfiguration weaponConfiguration, WeaponSkillLevel skill) { throw new NotImplementedException(); }
public void SetWeaponConfigurationFor(WeaponId weapon, WeaponConfiguration weaponConfiguration, Player player, WeaponSkillLevel skill = WeaponSkillLevel.Poor) { SetWeaponConfigurationFor(weapon, weaponConfiguration, new Player[] { player }, skill); }
public void SetWeaponConfigurationFor(WeaponId weapon, WeaponConfiguration weaponConfiguration, IEnumerable <Player> players, WeaponSkillLevel skill = WeaponSkillLevel.Poor) { CreateSetStatPacket(weapon, weaponConfiguration, skill).SendTo(players); }
public void SetWeaponConfiguration(WeaponId weapon, WeaponConfiguration weaponConfiguration, WeaponSkillLevel skill = WeaponSkillLevel.Poor) { this.weaponConfigurations[weapon][skill] = weaponConfiguration; var packet = CreateSetStatPacket(weapon, weaponConfiguration, skill); this.server.BroadcastPacket(packet); }