protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteFloat(SwingDirection); messageStream.Write(HitZombies); messageStream.Write(HitHumans); messageStream.Write(HitScenery); messageStream.Write(StartPoint); messageStream.WriteEntityId(EntityUser); }
private void WriteBulletEffects(IOutgoingMessageStream messageStream) { foreach (var item in BulletEffects) { messageStream.Write(item.EndPoint); messageStream.WriteFloat(item.Rotation); messageStream.WriteByte(item.Effect); } }
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.Write(Position); messageStream.WriteFloat(Rotation); messageStream.Write(MovementVector); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.Write(RemotePlayer); messageStream.WriteInt32(NewLevel); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.Write(StartPoint); }
protected override void SerializeImpl(IOutgoingMessageStream messageStream) { messageStream.WriteInt32(ItemSpec.Id); messageStream.Write(ItemSpec.GetProperties().ToList()); }