static void WriteInventoryItem(IOutgoingMessageStream stream, InventoryItem inventoryItem) { if (inventoryItem == null) { Logger.Write("Writing empty inventory item"); stream.WriteInt32(EmptyInventorySlotSpecId); return; } Logger.Write(string.Format("Writing inventory item with item spec id {0}", inventoryItem.ItemSpecId)); if (inventoryItem.ItemSpecId == 0) { throw new Exception("ItemSpec has id of 0. Make sure you use correct StaticItemSpecCache ritual."); } stream.WriteInt32(inventoryItem.ItemSpecId); stream.Write(inventoryItem.GetProperties().ToList()); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteEntityId(EntityId); messageStream.WriteInt32(SpecId); messageStream.WriteInt32(UsageTime); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteInt32(Amount); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteInt32(ItemSpecId); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.Write(RemotePlayer); messageStream.WriteInt32(NewLevel); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteInt32(ContainerEntityId); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteInt32(ItemSpec.Id); messageStream.Write(ItemSpec.GetProperties().ToList()); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteInt32(LoadedAmmoTotal); }