Add ranches.

This commit is contained in:
SilicaAndPina 2021-02-11 02:31:16 +13:00
parent 2e713f4fd5
commit 9f592fb51b
14 changed files with 918 additions and 159 deletions

View file

@ -17,16 +17,6 @@ namespace HISP.Game.Inventory
}
}
public int MaxHorses
{
get
{
if (baseUser.Subscribed)
return 11;
return 7; // will change when ranches are implemented.
}
}
public HorseInventory(User user)
{
baseUser = user;
@ -35,7 +25,7 @@ namespace HISP.Game.Inventory
public void AddHorse(HorseInstance horse, bool addToDb=true)
{
if (HorseList.Length + 1 > MaxHorses)
if (HorseList.Length + 1 > baseUser.MaxHorses)
throw new InventoryFullException();
horse.Owner = baseUser.Id;

View file

@ -162,7 +162,7 @@ namespace HISP.Game.Inventory
throw new InventoryMaxStackException();
}
}
else if (Count >= Messages.DefaultInventoryMax)
else if (Count >= BaseUser.MaxItems)
{
throw new InventoryFullException();
}