16 lines
399 B
C#
16 lines
399 B
C#
namespace Fantasy;
|
|
|
|
public static class BagComponentSystem
|
|
{
|
|
public static uint AddItem(this BagComponent self, Item item)
|
|
{
|
|
self.Items.Add(item.Id, item);
|
|
Log.Debug($"add item:{item.Id}");
|
|
return 0;
|
|
}
|
|
|
|
public static bool TryGetItem(this BagComponent self, long itemId, out Item item)
|
|
{
|
|
return self.Items.TryGetValue(itemId, out item);
|
|
}
|
|
} |