public void AddCreatureItem(Item Item) { if (Item.SlotId < Items.Length && Item.SlotId >= 0) { if (Item.SlotId == 0) { BuyBack.Add(Item); return; } Items[Item.SlotId] = Item; } if (IsEquipedSlot(Item.SlotId)) { SendEquiped(null); } }
public void Load(List <Character_items> NItems) { if (IsLoad) { return; } foreach (Character_items Item in NItems) { if (Item.SlotId < Items.Length && Item.SlotId >= 0) { Item Itm = new Item(Obj); if (!Itm.Load(Item)) { continue; } if (Itm.SlotId == 0) { BuyBack.Add(Itm); continue; } if (Items[Itm.SlotId] == null) { Items[Itm.SlotId] = Itm; if (IsEquipedSlot(Itm.SlotId)) { EquipItem(Itm); } } else { DuplicatedSlot.Add(Itm); } } } CheckDuplicated(); base.Load(); }
public void Load(List <Creature_item> CItems) { if (IsLoad) { return; } foreach (Creature_item Item in CItems) { if (Item.SlotId < Items.Length && Item.SlotId >= 0) { Item Itm = new Item(Item); if (Itm.SlotId == 0) { BuyBack.Add(Itm); continue; } Items[Itm.SlotId] = Itm; } } }
public void Load(Item[] NItems) { if (IsLoad) { return; } foreach (Item Itm in NItems) { if (Itm != null && Itm.SlotId >= 0 && Itm.SlotId < Items.Length) { if (Itm.SlotId == 0) { BuyBack.Add(Itm); continue; } if (Items[Itm.SlotId] == null) { Items[Itm.SlotId] = Itm; if (IsEquipedSlot(Itm.SlotId)) { EquipItem(Itm); } } else { DuplicatedSlot.Add(Itm); } } } CheckDuplicated(); base.Load(); }