mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 13:15:53 +12:00
Add ranches.
This commit is contained in:
parent
2e713f4fd5
commit
9f592fb51b
14 changed files with 918 additions and 159 deletions
|
@ -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;
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace HISP.Game.Inventory
|
|||
throw new InventoryMaxStackException();
|
||||
}
|
||||
}
|
||||
else if (Count >= Messages.DefaultInventoryMax)
|
||||
else if (Count >= BaseUser.MaxItems)
|
||||
{
|
||||
throw new InventoryFullException();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue