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); } }
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) { EntityId = messageStream.ReadEntityId(); SpecId = messageStream.ReadInt32(); UsageTime = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { Amount = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { ItemSpecId = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { RemotePlayer = messageStream.ReadRemotePlayer(); NewLevel = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { ContainerEntityId = messageStream.ReadInt32(); }
protected override void DeserializeImpl(IIncomingMessageStream messageStream) { LoadedAmmoTotal = messageStream.ReadInt32(); }