mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45:42 +12:00
fix birthday tokens
This commit is contained in:
parent
94cf84b384
commit
362f8a1490
2 changed files with 9 additions and 0 deletions
|
@ -146,6 +146,10 @@ namespace HISP.Game.Inventory
|
|||
}
|
||||
throw new KeyNotFoundException("random id: " + randomId + " not found in inventory");
|
||||
}
|
||||
public void AddWithoutDatabase(ItemInstance item)
|
||||
{
|
||||
addItem(item, false);
|
||||
}
|
||||
|
||||
public void AddIgnoringFull(ItemInstance item)
|
||||
{
|
||||
|
|
|
@ -97,9 +97,14 @@ namespace HISP.Server
|
|||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
ItemInstance itm = new ItemInstance(Item.BirthdayToken);
|
||||
|
||||
if(IsUserOnline(userid))
|
||||
GetUserById(userid).Inventory.AddWithoutDatabase(itm);
|
||||
|
||||
Database.AddItemToInventory(userid, itm);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue