public async Task <IActionResult> UpdateWeapon(int id, WeaponUpdateDto weaponUpdateDto) { var weapon = await _repo.GetWeapon(id); weapon.SoldierId = weaponUpdateDto.SoldierId; await _repo.UpdateWeapon(weapon); return(NoContent()); }
public override void Execute() { string name = Data[1]; Weapon weapon = weaponRepository.GetWeapon(name); Console.WriteLine(weapon.ToString()); }
public override void Execute() { string name = Data[1]; int index = int.Parse(Data[2]); Weapon weapon = weaponRepository.GetWeapon(name); weapon.RemoveGem(index); }
public override void ExecuteCommand() { var weaponName = data[1]; IWeapon weapon = weaponRepository.GetWeapon(weaponName); int socket = int.Parse(data[2]); IGem gem = gemFactory.CreateGem(data); weapon.AddGem(gem, socket); }
public void AddNewEquipmentElement(string weaponName, string elementName, int elementDamange) { WeaponDTO tempWeapon = _weaponRepo.GetWeapon(weaponName); //find element to see if exists in element table //_elementRepo //_elementService.CheckElementName(elementName); throw new NotImplementedException(); }
public override void Execute() { string weaponName = Data[1]; int index = int.Parse(Data[2]); string[] gemInfo = Data[3].Split(); Gem gem = gemFactory.CreateGem(gemInfo); Weapon weapon = weaponRepository.GetWeapon(weaponName); weapon.AddGem(index, gem); }
public WeaponDTO GetWeapon(string weaponName) { //check string return(_weaponRepo.GetWeapon(weaponName)); }