Refactor namespaces to follow new naming convention and add item model classes

This commit is contained in:
2025-02-02 12:39:59 -03:00
parent 4e5addd1d5
commit 0a257199f7
27 changed files with 463 additions and 94 deletions
+16 -1
View File
@@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Pet.Companion.Models.Enums;
namespace pet_companion_api.Models
namespace Pet.Companion.Models
{
public class Pet
{
@@ -10,7 +11,11 @@ namespace pet_companion_api.Models
public PetClass Class { get; set; }
public PetStats Stats { get; set; }
public Resources Resources { get; set; }
public Inventory Inventory { get; set; }
public int Level { get; set; }
public int Experience { get; set; }
public int Health { get; set; }
public int MaxHealth { get; set; }
public string UserId { get; set; }
public bool IsDead { get; set; }
@@ -20,6 +25,16 @@ namespace pet_companion_api.Models
public PetBasicAction PetBasicAction { get; set; }
public DateTime BasicActionCooldown { get; set; }
public Dictionary<EquipmentSlot, EquipableItem> Equipment { get; set; } = new();
public Pet()
{
foreach (EquipmentSlot slot in Enum.GetValues(typeof(EquipmentSlot)))
{
Equipment[slot] = null;
}
}
public void IncrementIntelligence(int amount)
{
var newValue = Stats.Intelligence + amount;