Aura.Channel.Network.Sending.Send.OpenBank C# (CSharp) Method

OpenBank() public static method

Sends OpenBank to creature's client.
public static OpenBank ( Creature creature, BankInventory bank, BankTabRace race, string bankId, string bankTitle ) : void
creature Creature
bank BankInventory
race BankTabRace
bankId string
bankTitle string
return void
		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);
		}
Send