Пример #1
0
 protected override void SerializeImpl(IOutgoingMessageStream messageStream)
 {
     messageStream.WriteFloat(SwingDirection);
     messageStream.Write(HitZombies);
     messageStream.Write(HitHumans);
     messageStream.Write(HitScenery);
     messageStream.Write(StartPoint);
     messageStream.WriteEntityId(EntityUser);
 }
Пример #2
0
 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());
        }
Пример #4
0
 protected override void SerializeImpl(IOutgoingMessageStream messageStream)
 {
     messageStream.Write(Position);
     messageStream.WriteFloat(Rotation);
     messageStream.Write(MovementVector);
 }
Пример #5
0
 protected override void SerializeImpl(IOutgoingMessageStream messageStream)
 {
     messageStream.Write(RemotePlayer);
     messageStream.WriteInt32(NewLevel);
 }
Пример #6
0
 protected override void SerializeImpl(IOutgoingMessageStream messageStream)
 {
     messageStream.Write(StartPoint);
 }
Пример #7
0
 protected override void SerializeImpl(IOutgoingMessageStream messageStream)
 {
     messageStream.WriteInt32(ItemSpec.Id);
     messageStream.Write(ItemSpec.GetProperties().ToList());
 }