本文整理汇总了C#中Aura.Shared.Network.Packet.AddItemInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.AddItemInfo方法的具体用法?C# Packet.AddItemInfo怎么用?C# Packet.AddItemInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aura.Shared.Network.Packet
的用法示例。
在下文中一共展示了Packet.AddItemInfo方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ItemUpdate
/// <summary>
/// Sends ItemUpdate to creature's client.
/// </summary>
///
/// <param name="creature"></param>
/// <param name="item"></param>
public static void ItemUpdate(Creature creature, Item item)
{
var packet = new Packet(Op.ItemUpdate, creature.EntityId);
packet.AddItemInfo(item, ItemPacketType.Private);
creature.Client.Send(packet);
}
示例2: BankAddItem
/// <summary>
/// Sends BankAddItem to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="item"></param>
/// <param name="bankId"></param>
/// <param name="tabName"></param>
public static void BankAddItem(Creature creature, Item item, string bankId, string tabName)
{
var packet = new Packet(Op.BankAddItem, creature.EntityId);
packet.PutString(tabName);
packet.PutString(bankId);
packet.PutLong(0);
packet.PutLong(0);
packet.AddItemInfo(item, ItemPacketType.Private);
creature.Client.Send(packet);
}
示例3: OpenNpcShop
/// <summary>
/// Sends OpenNpcShop to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="shop"></param>
public static void OpenNpcShop(Creature creature, NpcShop shop)
{
var packet = new Packet(Op.OpenNpcShop, creature.EntityId);
packet.PutString("shopname");
packet.PutByte(0);
packet.PutByte(0);
packet.PutInt(0);
packet.PutByte((byte)shop.Tabs.Count);
foreach (var tab in shop.Tabs)
{
packet.PutString("[{0}]{1}", tab.Order, tab.Title);
// [160200] ?
{
packet.PutByte(0);
}
packet.PutShort((short)tab.Items.Count);
foreach (var item in tab.Items)
packet.AddItemInfo(item, ItemPacketType.Private);
}
creature.Client.Send(packet);
}
示例4: DressingRoomAddItemListing
/// <summary>
/// Sends DressingRoomAddItemListing to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="result"></param>
public static void DressingRoomAddItemListing(Creature creature, Item item)
{
var packet = new Packet(Op.DressingRoomAddItemListing, creature.EntityId);
packet.AddItemInfo(item, ItemPacketType.Private);
creature.Client.Send(packet);
}
示例5: OpenDressingRoomR
/// <summary>
/// Sends OpenDressingRoomR to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="result"></param>
public static void OpenDressingRoomR(PlayerCreature creature)
{
var gp = new Packet(Op.OpenDressingRoomR, creature.EntityId);
gp.PutByte(1);
gp.PutString(creature.Client.Account.Id);
gp.PutInt(creature.DressingRoomItems.Count);
foreach (Item item in creature.DressingRoomItems)
{
gp.PutLong(0);
gp.AddItemInfo(item, ItemPacketType.Private);
}
// 039 [........000008AF] Int : 2223 (Count & pon charge for hair, face, etc?)
gp.PutInt(0);
// 040 [........00000003] Int : 3
// 041 [........00000001] Int : 1
// 042 [..............04] Byte : 4
creature.Client.Send(gp);
}
示例6: ViewEquipmentR
/// <summary>
/// Sends ViewEquipmentR to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="targetEntityId"></param>
/// <param name="items"></param>
public static void ViewEquipmentR(Creature creature, Creature target)
{
var packet = new Packet(Op.ViewEquipmentR, creature.EntityId);
packet.PutByte(target != null);
if (target != null)
{
packet.PutLong(target.EntityId);
var items = target.Inventory.GetEquipment();
packet.PutInt(items.Length);
foreach (var item in items)
packet.AddItemInfo(item, ItemPacketType.Private);
}
creature.Client.Send(packet);
}
示例7: EntrustmentAddItem
/// <summary>
/// Sends EntrustmentAddItem to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="pocket"></param>
/// <param name="item"></param>
public static void EntrustmentAddItem(Creature creature, Pocket pocket, Item item)
{
var packet = new Packet(Op.EntrustmentAddItem, creature.EntityId);
packet.PutByte((byte)pocket);
packet.AddItemInfo(item, ItemPacketType.Private);
creature.Client.Send(packet);
}
示例8: OpenNpcShop
/// <summary>
/// Sends OpenNpcShop to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="shop"></param>
public static void OpenNpcShop(Creature creature, IList<NpcShopTab> tabs)
{
var packet = new Packet(Op.OpenNpcShop, creature.EntityId);
packet.PutString("shopname"); // e.g. TirchonaillShop_Dilys
packet.PutByte(0); // 1 in remote shops?
packet.PutByte(0);
packet.PutInt(0);
packet.PutByte((byte)tabs.Count);
foreach (var tab in tabs)
{
packet.PutString("[{0}]{1}", tab.Order, tab.Title);
// [160200] ?
{
packet.PutByte(0);
}
var items = tab.GetItems();
packet.PutShort((short)items.Count);
foreach (var item in items)
packet.AddItemInfo(item, ItemPacketType.Private);
}
creature.Client.Send(packet);
}
示例9: OpenBank
/// <summary>
/// Sends OpenBank to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="bank"></param>
/// <param name="race"></param>
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);
}
示例10: PersonalShopAddItem
/// <summary>
/// Sends PersonalShopAddItem to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="item"></param>
public static void PersonalShopAddItem(Creature creature, Item item)
{
var packet = new Packet(Op.PersonalShopAddItem, creature.EntityId);
packet.AddItemInfo(item, ItemPacketType.Private);
packet.PutInt(item.PersonalShopPrice);
creature.Client.Send(packet);
}
示例11: PersonalShopOpenR
/// <summary>
/// Sends PersonalShopOpenR to creature's client.
/// </summary>
/// <param name="creature"></param>
/// <param name="shop">Null for negative response</param>
public static void PersonalShopOpenR(Creature creature, PersonalShop shop)
{
var items = shop.GetPricedItems();
var packet = new Packet(Op.PersonalShopOpenR, creature.EntityId);
packet.PutByte(shop != null);
if (shop != null)
{
packet.PutLong(shop.Owner.EntityId);
packet.PutString(shop.Owner.Name);
packet.PutString(shop.Description);
packet.PutString(shop.GetBagLayout());
packet.PutByte(0);
foreach (var item in items)
{
packet.AddItemInfo(item, ItemPacketType.Private);
packet.PutInt(item.PersonalShopPrice);
}
}
creature.Client.Send(packet);
}