public ItemRecord this[int slot] { get { if (slot > GuildMgr.MAX_BANK_TAB_SLOTS) return null; return slot < ItemRecords.Count - 1 ? ItemRecords[slot] : null; } set { if (slot > GuildMgr.MAX_BANK_TAB_SLOTS) return; if(value == null) { Items[slot] = null; ItemRecords[slot] = null; return; } value.Slot = slot; Items[slot] = new GuildBankTabItem{ Guid = value.Guid, TabSlot = (byte)slot }; ItemRecords[slot] = value; } }
public GuildBankTab() { Items = new GuildBankTabItem[GuildMgr.MAX_BANK_TAB_SLOTS]; ItemRecords = new ItemRecord[GuildMgr.MAX_BANK_TAB_SLOTS]; }