コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 protected override void DeserializeImpl(IIncomingMessageStream messageStream)
 {
     EntityId  = messageStream.ReadEntityId();
     SpecId    = messageStream.ReadInt32();
     UsageTime = messageStream.ReadInt32();
 }
コード例 #4
0
 protected override void DeserializeImpl(IIncomingMessageStream messageStream)
 {
     Amount = messageStream.ReadInt32();
 }
コード例 #5
0
 protected override void DeserializeImpl(IIncomingMessageStream messageStream)
 {
     ItemSpecId = messageStream.ReadInt32();
 }
コード例 #6
0
 protected override void DeserializeImpl(IIncomingMessageStream messageStream)
 {
     RemotePlayer = messageStream.ReadRemotePlayer();
     NewLevel     = messageStream.ReadInt32();
 }
コード例 #7
0
 protected override void DeserializeImpl(IIncomingMessageStream messageStream)
 {
     ContainerEntityId = messageStream.ReadInt32();
 }
コード例 #8
0
 protected override void DeserializeImpl(IIncomingMessageStream messageStream)
 {
     LoadedAmmoTotal = messageStream.ReadInt32();
 }