-
Notifications
You must be signed in to change notification settings - Fork 350
/
Item.cs
49 lines (35 loc) · 959 Bytes
/
Item.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using Intersect.Enums;
using Intersect.GameObjects;
namespace Intersect.Client.Items
{
public class Item
{
public Guid? BagId;
public Guid ItemId;
public int Quantity;
public int[] StatBuffs = new int[(int) Stats.StatCount];
public ItemBase Base => ItemBase.Get(ItemId);
public void Load(Guid id, int quantity, Guid? bagId, int[] statBuffs)
{
ItemId = id;
Quantity = quantity;
BagId = bagId;
StatBuffs = statBuffs;
}
public Item Clone()
{
var newItem = new Item()
{
ItemId = ItemId,
Quantity = Quantity,
BagId = BagId
};
for (var i = 0; i < (int) Stats.StatCount; i++)
{
newItem.StatBuffs[i] = StatBuffs[i];
}
return newItem;
}
}
}