protected override void DeserializeImpl(IIncomingMessageStream messageStream) { SourceInventoryId = messageStream.ReadInt64(); SourceSlot = messageStream.ReadByte(); TargetInventoryId = messageStream.ReadInt64(); TargetSlot = messageStream.ReadByte(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { SwingDirection = messageStream.ReadFloat(); HitZombies = messageStream.ReadEntityIds(); HitHumans = messageStream.ReadEntityIds(); HitScenery = messageStream.ReadEntityIds(); StartPoint = messageStream.ReadVector(); EntityUser = messageStream.ReadEntityId(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { var id = messageStream.ReadInt32(); var properties = messageStream.ReadEntityProperties <ItemSpecProperty>(); ItemSpec = new ItemSpec(id); foreach (var prop in properties) { ItemSpec.SetProperty(prop); } }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { PartialUpdate = messageStream.ReadBoolean(); if (!PartialUpdate) { InventorySize = messageStream.ReadByte(); } InventoryId = messageStream.ReadInt64(); InventoryType = (InventoryType)messageStream.ReadInt16(); InventoryContent = ReadInventoryContent(messageStream, InventoryId); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { base.DeserializeImpl(messageStream); byte count = 1; if (_minBulletCount != 1 || _maxBulletCount != 1) { count = messageStream.ReadByte(); } BulletEffects = ReadBulletEffects(messageStream, count); }
private static List <BulletEffectData> ReadBulletEffects(IIncomingMessageStream messageStream, short count) { var ret = new List <BulletEffectData>(count); for (var i = 0; i < count; ++i) { var item = new BulletEffectData(); item.EndPoint = messageStream.ReadVector(); item.Rotation = messageStream.ReadFloat(); item.Effect = messageStream.ReadByte(); ret.Add(item); } return(ret); }
static Dictionary <byte, InventoryItem> ReadInventoryContent(IIncomingMessageStream stream, long inventoryId) { var count = stream.ReadInt16(); var ret = new Dictionary <byte, InventoryItem>(count); Logger.Write(string.Format("Reading {0} inventory slots", count)); for (var i = 0; i < count; ++i) { var key = stream.ReadByte(); Logger.Write(string.Format("Reading inventory slot {0}", key)); var value = ReadInventoryItem(stream, inventoryId); Logger.Write(string.Format("Finished inventory slot {0}.", key)); ret[key] = value; } return(ret); }
static InventoryItem ReadInventoryItem(IIncomingMessageStream stream, long inventoryId) { var specId = stream.ReadInt32(); if (specId == EmptyInventorySlotSpecId) { Logger.Write("Reading empty inventory item"); return(null); } Logger.Write(string.Format("Reading inventory item with item spec id {0}", specId)); var properties = stream.ReadEntityProperties <InventoryItemProperty>(); var ret = new InventoryItem(null, specId); foreach (var item in properties) { ret.SetProperty(item); } return(ret); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { ItemSpecId = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { StartPoint = messageStream.ReadVector(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { EntityId = messageStream.ReadEntityId(); SpecId = messageStream.ReadInt32(); UsageTime = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { base.DeserializeImpl(messageStream); EntityUser = messageStream.ReadEntityId(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { ContainerEntityId = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { LoadedAmmoTotal = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { InventoryId = messageStream.ReadInt64(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { EntityId = messageStream.ReadEntityId(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { Position = messageStream.ReadVector(); Rotation = messageStream.ReadFloat(); MovementVector = messageStream.ReadVector(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { Rotation = messageStream.ReadRotation(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { RemotePlayer = messageStream.ReadRemotePlayer(); NewLevel = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { ClientId = messageStream.ReadUint16(); GameTimeHour = messageStream.ReadByte(); GameTimeMinute = messageStream.ReadByte(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { Amount = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { Name = messageStream.ReadString(); }