public static void OpenBank(Creature creature, BankInventory bank, BankTabRace race, string bankId, string bankTitle)
{
var packet = new Packet(Op.OpenBank, creature.EntityId);
packet.PutByte(1);
packet.PutByte((byte)race);
packet.PutLong(DateTime.Now);
packet.PutByte(0);
packet.PutString(creature.Client.Account.Id);
packet.PutString(bankId);
packet.PutString(bankTitle);
packet.PutInt(bank.Gold);
var tabList = bank.GetTabList(race);
packet.PutInt(tabList.Count);
foreach (var tab in tabList)
{
packet.PutString(tab.Name);
packet.PutByte((byte)tab.Race);
// [190200, NA204 (2015-05-19)] ?
// Haven't opened a bank in a while, could've been
// added earlier. -- exec
{
packet.PutInt(0);
}
packet.PutInt(tab.Width);
packet.PutInt(tab.Height);
var itemList = tab.GetItemList();
packet.PutInt(itemList.Count);
foreach (var item in itemList)
{
packet.PutString(item.Bank);
packet.PutLong(item.BankTransferRemaining);
packet.PutLong(item.BankTransferStart);
packet.AddItemInfo(item, ItemPacketType.Private);
}
}
creature.Client.Send(packet);
}