Finish Auctions? (finally??)

This commit is contained in:
SilicaAndPina 2021-02-21 15:41:03 +13:00
parent 0f95462294
commit 69e7ef1baa
10 changed files with 235 additions and 69 deletions

View file

@ -30,6 +30,17 @@ namespace HISP.Game.Inventory
Database.LoadHorseInventory(this, baseUser.Id);
}
public void UnHide(int randomId)
{
foreach(HorseInstance inst in horsesList)
{
if (inst.RandomId == randomId)
{
inst.Hidden = false;
break;
}
}
}
public void AddHorse(HorseInstance horse, bool addToDb=true)
{
if (HorseList.Length + 1 > baseUser.MaxHorses)
@ -41,9 +52,10 @@ namespace HISP.Game.Inventory
horsesList.Add(horse);
}
public void DeleteHorse(HorseInstance horse)
public void DeleteHorse(HorseInstance horse, bool removeFromDb=true)
{
Database.RemoveHorse(horse.RandomId);
if(removeFromDb)
Database.RemoveHorse(horse.RandomId);
horsesList.Remove(horse);
}