mirror of
https://github.com/islehorse/HISP.git
synced 2025-06-09 04:21:27 +12:00
Add Thread-Safe Lists, and make all list access thread-safe
This commit is contained in:
parent
900fe0d48a
commit
40c34ac030
24 changed files with 111 additions and 44 deletions
|
@ -13,10 +13,10 @@ namespace HISP.Game.Inventory
|
|||
|
||||
|
||||
public User BaseUser;
|
||||
private List<InventoryItem> inventoryItems;
|
||||
private ThreadSafeList<InventoryItem> inventoryItems;
|
||||
public PlayerInventory(User forUser)
|
||||
{
|
||||
inventoryItems = new List<InventoryItem>();
|
||||
inventoryItems = new ThreadSafeList<InventoryItem>();
|
||||
|
||||
BaseUser = forUser;
|
||||
ItemInstance[] instances = Database.GetPlayerInventory(BaseUser.Id).ToArray();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue