SES-148 Endpointy dla Armor i Weapon #71
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "SES-148"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP: SES-148 Endpointy dla Armor i Weaponto SES-148 Endpointy dla Armor i Weapon@ -26,0 +41,4 @@
}
if (armorToUse is null)
return new ErrorResponse() { StatusCode = 204, Message = "No weapon to change to" };
weapon ? xd
@ -26,0 +50,4 @@
{
await Repository.Update(armorToUse);
await Repository.Save();
return new SuccessResponse("Character weapon updated") { SuccessCode = 200 };
weapon ? xd
@ -26,0 +65,4 @@
await Repository.Update(armorInUse);
await Repository.Update(armorToUse);
await Repository.Save();
return new SuccessResponse("Character weapon updated") { SuccessCode = 204 };
weapon ? xd
@ -33,0 +36,4 @@
public async Task<Either<SuccessResponse,ErrorResponse>> ChangeCharacterWeapon(CharacterWeaponViewModel model)
{
// Dodaj optional rozbro postac
var allWeapons = await Repository.Get(c => c.CharacterId.Equals(model.CharacterId)).AsNoTracking().ToListAsync();
można to wszystko skrócić dodając lub, czyli c.CharacterId.Equals(model.CharacterId) && ( jestWLewej || jestWPrawej || jest równa weapon id z modelu )
Neh, tego potrzeba tak jak jest, musze miec wszystkie bronie jakie są, aby mieć dostęp do Id
@ -33,0 +37,4 @@
{
// Dodaj optional rozbro postac
var allWeapons = await Repository.Get(c => c.CharacterId.Equals(model.CharacterId)).AsNoTracking().ToListAsync();
//var weaponsInUse = await Repository.Get(c => c.CharacterId.Equals(model.CharacterId)).Where(w => w.InUse.Equals(true)).ToListAsync();
to chyba juz można wywalić :P
@ -68,0 +68,4 @@
/// <summary>
/// Metoda zmienia uzywany armor danej postaci
/// </summary>
/// <param name="characterId"></param>
opisy :D
@ -68,0 +82,4 @@
/// Metoda dodaje Armor do danej postaci
/// </summary>
/// <param name="characterArmorViewModel"></param>
/// <returns></returns>
brak returna
@ -68,0 +101,4 @@
}
/// <summary>
/// Metoda dodaje Weapon do danej postaci
prosze nie mieszać języka xd
@ -68,0 +104,4 @@
/// Metoda dodaje Weapon do danej postaci
/// </summary>
/// <param name="characterWeaponViewModel"></param>
/// <returns></returns>
brak return
@ -68,0 +125,4 @@
/// Metoda zmienia Weapon do danej postaci
/// </summary>
/// <param name="CharacterWeaponViewModel"></param>
/// <returns></returns>
brak return