mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +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
|
@ -1,21 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using HISP.Game.Items;
|
||||
|
||||
using HISP.Game.Items;
|
||||
using HISP.Server;
|
||||
|
||||
namespace HISP.Game.Inventory
|
||||
{
|
||||
public class InventoryItem
|
||||
{
|
||||
public InventoryItem()
|
||||
{
|
||||
itemInstances = new List<ItemInstance>();
|
||||
itemInstances = new ThreadSafeList<ItemInstance>();
|
||||
Infinite = false;
|
||||
ItemId = 0;
|
||||
}
|
||||
|
||||
public int ItemId;
|
||||
public bool Infinite;
|
||||
private List<ItemInstance> itemInstances;
|
||||
private ThreadSafeList<ItemInstance> itemInstances;
|
||||
public void RemoveItem(ItemInstance itm)
|
||||
{
|
||||
itemInstances.Remove(itm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue