// Token: 0x06001075 RID: 4213 RVA: 0x00014E8C File Offset: 0x0001308C
        public static void Serialize(Stream stream, PublicProfileView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                EnumProxy <MemberAccessLevel> .Serialize(memoryStream, instance.AccessLevel);

                Int32Proxy.Serialize(memoryStream, instance.Cmid);
                EnumProxy <EmailAddressStatus> .Serialize(memoryStream, instance.EmailAddressStatus);

                if (instance.FacebookId != null)
                {
                    StringProxy.Serialize(memoryStream, instance.FacebookId);
                }
                else
                {
                    num |= 1;
                }
                if (instance.GroupTag != null)
                {
                    StringProxy.Serialize(memoryStream, instance.GroupTag);
                }
                else
                {
                    num |= 2;
                }
                BooleanProxy.Serialize(memoryStream, instance.IsChatDisabled);
                DateTimeProxy.Serialize(memoryStream, instance.LastLoginDate);
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 4;
                }
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 2
0
        // Token: 0x06001114 RID: 4372 RVA: 0x0001ADB4 File Offset: 0x00018FB4
        public static UberStrikeItemGearView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            UberStrikeItemGearView uberStrikeItemGearView = new UberStrikeItemGearView();

            uberStrikeItemGearView.ArmorPoints = Int32Proxy.Deserialize(bytes);
            uberStrikeItemGearView.ArmorWeight = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                uberStrikeItemGearView.CustomProperties = DictionaryProxy <string, string> .Deserialize(bytes, new DictionaryProxy <string, string> .Deserializer <string>(StringProxy.Deserialize), new DictionaryProxy <string, string> .Deserializer <string>(StringProxy.Deserialize));
            }
            if ((num & 2) != 0)
            {
                uberStrikeItemGearView.Description = StringProxy.Deserialize(bytes);
            }
            uberStrikeItemGearView.ID           = Int32Proxy.Deserialize(bytes);
            uberStrikeItemGearView.IsConsumable = BooleanProxy.Deserialize(bytes);
            uberStrikeItemGearView.ItemClass    = EnumProxy <UberstrikeItemClass> .Deserialize(bytes);

            if ((num & 4) != 0)
            {
                uberStrikeItemGearView.ItemProperties = DictionaryProxy <ItemPropertyType, int> .Deserialize(bytes, new DictionaryProxy <ItemPropertyType, int> .Deserializer <ItemPropertyType>(EnumProxy <ItemPropertyType> .Deserialize), new DictionaryProxy <ItemPropertyType, int> .Deserializer <int>(Int32Proxy.Deserialize));
            }
            uberStrikeItemGearView.LevelLock       = Int32Proxy.Deserialize(bytes);
            uberStrikeItemGearView.MaxDurationDays = Int32Proxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                uberStrikeItemGearView.Name = StringProxy.Deserialize(bytes);
            }
            if ((num & 16) != 0)
            {
                uberStrikeItemGearView.PrefabName = StringProxy.Deserialize(bytes);
            }
            if ((num & 32) != 0)
            {
                uberStrikeItemGearView.Prices = ListProxy <ItemPrice> .Deserialize(bytes, new ListProxy <ItemPrice> .Deserializer <ItemPrice>(ItemPriceProxy.Deserialize));
            }
            uberStrikeItemGearView.ShopHighlightType = EnumProxy <ItemShopHighlightType> .Deserialize(bytes);

            return(uberStrikeItemGearView);
        }
Exemplo n.º 3
0
        // Token: 0x06001058 RID: 4184 RVA: 0x00013C9C File Offset: 0x00011E9C
        public static LuckyDrawSetUnityView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            LuckyDrawSetUnityView luckyDrawSetUnityView = new LuckyDrawSetUnityView();

            luckyDrawSetUnityView.CreditsAttributed    = Int32Proxy.Deserialize(bytes);
            luckyDrawSetUnityView.ExposeItemsToPlayers = BooleanProxy.Deserialize(bytes);
            luckyDrawSetUnityView.Id = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                luckyDrawSetUnityView.ImageUrl = StringProxy.Deserialize(bytes);
            }
            luckyDrawSetUnityView.LuckyDrawId = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                luckyDrawSetUnityView.LuckyDrawSetItems = ListProxy <BundleItemView> .Deserialize(bytes, new ListProxy <BundleItemView> .Deserializer <BundleItemView>(BundleItemViewProxy.Deserialize));
            }
            luckyDrawSetUnityView.PointsAttributed = Int32Proxy.Deserialize(bytes);
            luckyDrawSetUnityView.SetWeight        = Int32Proxy.Deserialize(bytes);
            return(luckyDrawSetUnityView);
        }
Exemplo n.º 4
0
        // Token: 0x0600104C RID: 4172 RVA: 0x000132D8 File Offset: 0x000114D8
        public static ContactRequestView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            ContactRequestView contactRequestView = new ContactRequestView();

            contactRequestView.InitiatorCmid = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                contactRequestView.InitiatorMessage = StringProxy.Deserialize(bytes);
            }
            if ((num & 2) != 0)
            {
                contactRequestView.InitiatorName = StringProxy.Deserialize(bytes);
            }
            contactRequestView.ReceiverCmid = Int32Proxy.Deserialize(bytes);
            contactRequestView.RequestId    = Int32Proxy.Deserialize(bytes);
            contactRequestView.SentDate     = DateTimeProxy.Deserialize(bytes);
            contactRequestView.Status       = EnumProxy <ContactRequestStatus> .Deserialize(bytes);

            return(contactRequestView);
        }
Exemplo n.º 5
0
        // Token: 0x060010D0 RID: 4304 RVA: 0x000179FC File Offset: 0x00015BFC
        public static StatsSummary Deserialize(Stream bytes)
        {
            int          num          = Int32Proxy.Deserialize(bytes);
            StatsSummary statsSummary = new StatsSummary();

            if ((num & 1) != 0)
            {
                statsSummary.Achievements = DictionaryProxy <byte, ushort> .Deserialize(bytes, new DictionaryProxy <byte, ushort> .Deserializer <byte>(ByteProxy.Deserialize), new DictionaryProxy <byte, ushort> .Deserializer <ushort>(UInt16Proxy.Deserialize));
            }
            statsSummary.Cmid   = Int32Proxy.Deserialize(bytes);
            statsSummary.Deaths = Int32Proxy.Deserialize(bytes);
            statsSummary.Kills  = Int32Proxy.Deserialize(bytes);
            statsSummary.Level  = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                statsSummary.Name = StringProxy.Deserialize(bytes);
            }
            statsSummary.Team = EnumProxy <TeamID> .Deserialize(bytes);

            return(statsSummary);
        }
        // Token: 0x060010E3 RID: 4323 RVA: 0x000187E4 File Offset: 0x000169E4
        public static void Serialize(Stream stream, PlayerCardView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.Cmid);
                Int64Proxy.Serialize(memoryStream, instance.Hits);
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 1;
                }
                if (instance.Precision != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Precision);
                }
                else
                {
                    num |= 2;
                }
                Int32Proxy.Serialize(memoryStream, instance.Ranking);
                Int64Proxy.Serialize(memoryStream, instance.Shots);
                Int32Proxy.Serialize(memoryStream, instance.Splats);
                Int32Proxy.Serialize(memoryStream, instance.Splatted);
                if (instance.TagName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.TagName);
                }
                else
                {
                    num |= 4;
                }
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
        // Token: 0x06001032 RID: 4146 RVA: 0x0001205C File Offset: 0x0001025C
        public static ApplicationView Deserialize(Stream bytes)
        {
            int             num             = Int32Proxy.Deserialize(bytes);
            ApplicationView applicationView = new ApplicationView();

            applicationView.ApplicationVersionId = Int32Proxy.Deserialize(bytes);
            applicationView.Build = EnumProxy <BuildType> .Deserialize(bytes);

            applicationView.Channel = EnumProxy <ChannelType> .Deserialize(bytes);

            if ((num & 1) != 0)
            {
                applicationView.ExpirationDate = new DateTime?(DateTimeProxy.Deserialize(bytes));
            }
            if ((num & 2) != 0)
            {
                applicationView.FileName = StringProxy.Deserialize(bytes);
            }
            applicationView.IsCurrent     = BooleanProxy.Deserialize(bytes);
            applicationView.PhotonGroupId = Int32Proxy.Deserialize(bytes);
            if ((num & 4) != 0)
            {
                applicationView.PhotonGroupName = StringProxy.Deserialize(bytes);
            }
            applicationView.ReleaseDate   = DateTimeProxy.Deserialize(bytes);
            applicationView.RemainingTime = Int32Proxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                applicationView.Servers = ListProxy <PhotonView> .Deserialize(bytes, new ListProxy <PhotonView> .Deserializer <PhotonView>(PhotonViewProxy.Deserialize));
            }
            if ((num & 16) != 0)
            {
                applicationView.SupportUrl = StringProxy.Deserialize(bytes);
            }
            if ((num & 32) != 0)
            {
                applicationView.Version = StringProxy.Deserialize(bytes);
            }
            return(applicationView);
        }
Exemplo n.º 8
0
        // Token: 0x06001068 RID: 4200 RVA: 0x00014770 File Offset: 0x00012970
        public static MysteryBoxUnityView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            MysteryBoxUnityView mysteryBoxUnityView = new MysteryBoxUnityView();

            mysteryBoxUnityView.Category = EnumProxy <BundleCategoryType> .Deserialize(bytes);

            mysteryBoxUnityView.CreditsAttributed       = Int32Proxy.Deserialize(bytes);
            mysteryBoxUnityView.CreditsAttributedWeight = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                mysteryBoxUnityView.Description = StringProxy.Deserialize(bytes);
            }
            mysteryBoxUnityView.ExposeItemsToPlayers = BooleanProxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                mysteryBoxUnityView.IconUrl = StringProxy.Deserialize(bytes);
            }
            mysteryBoxUnityView.Id = Int32Proxy.Deserialize(bytes);
            if ((num & 4) != 0)
            {
                mysteryBoxUnityView.ImageUrl = StringProxy.Deserialize(bytes);
            }
            mysteryBoxUnityView.IsAvailableInShop = BooleanProxy.Deserialize(bytes);
            mysteryBoxUnityView.ItemsAttributed   = Int32Proxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                mysteryBoxUnityView.MysteryBoxItems = ListProxy <BundleItemView> .Deserialize(bytes, new ListProxy <BundleItemView> .Deserializer <BundleItemView>(BundleItemViewProxy.Deserialize));
            }
            if ((num & 16) != 0)
            {
                mysteryBoxUnityView.Name = StringProxy.Deserialize(bytes);
            }
            mysteryBoxUnityView.PointsAttributed       = Int32Proxy.Deserialize(bytes);
            mysteryBoxUnityView.PointsAttributedWeight = Int32Proxy.Deserialize(bytes);
            mysteryBoxUnityView.Price = Int32Proxy.Deserialize(bytes);
            mysteryBoxUnityView.UberStrikeCurrencyType = EnumProxy <UberStrikeCurrencyType> .Deserialize(bytes);

            return(mysteryBoxUnityView);
        }
Exemplo n.º 9
0
        // Token: 0x0600105B RID: 4187 RVA: 0x00013EF8 File Offset: 0x000120F8
        public static void Serialize(Stream stream, MemberPositionUpdateView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.AuthToken != null)
                {
                    StringProxy.Serialize(memoryStream, instance.AuthToken);
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.GroupId);
                Int32Proxy.Serialize(memoryStream, instance.MemberCmid);
                EnumProxy <GroupPosition> .Serialize(memoryStream, instance.Position);

                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 10
0
        // Token: 0x0600105D RID: 4189 RVA: 0x00013FD8 File Offset: 0x000121D8
        public static void Serialize(Stream stream, MemberReportView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.ApplicationId);
                if (instance.Context != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Context);
                }
                else
                {
                    num |= 1;
                }
                if (instance.IP != null)
                {
                    StringProxy.Serialize(memoryStream, instance.IP);
                }
                else
                {
                    num |= 2;
                }
                if (instance.Reason != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Reason);
                }
                else
                {
                    num |= 4;
                }
                EnumProxy <MemberReportType> .Serialize(memoryStream, instance.ReportType);

                Int32Proxy.Serialize(memoryStream, instance.SourceCmid);
                Int32Proxy.Serialize(memoryStream, instance.TargetCmid);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 11
0
        // Token: 0x06001070 RID: 4208 RVA: 0x00014BA0 File Offset: 0x00012DA0
        public static PhotonView Deserialize(Stream bytes)
        {
            int        num        = Int32Proxy.Deserialize(bytes);
            PhotonView photonView = new PhotonView();

            if ((num & 1) != 0)
            {
                photonView.IP = StringProxy.Deserialize(bytes);
            }
            photonView.MinLatency = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                photonView.Name = StringProxy.Deserialize(bytes);
            }
            photonView.PhotonId = Int32Proxy.Deserialize(bytes);
            photonView.Port     = Int32Proxy.Deserialize(bytes);
            photonView.Region   = EnumProxy <RegionType> .Deserialize(bytes);

            photonView.UsageType = EnumProxy <PhotonUsageType> .Deserialize(bytes);

            return(photonView);
        }
        // Token: 0x06001074 RID: 4212 RVA: 0x00014DE8 File Offset: 0x00012FE8
        public static PrivateMessageView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            PrivateMessageView privateMessageView = new PrivateMessageView();

            if ((num & 1) != 0)
            {
                privateMessageView.ContentText = StringProxy.Deserialize(bytes);
            }
            privateMessageView.DateSent = DateTimeProxy.Deserialize(bytes);
            privateMessageView.FromCmid = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                privateMessageView.FromName = StringProxy.Deserialize(bytes);
            }
            privateMessageView.HasAttachment       = BooleanProxy.Deserialize(bytes);
            privateMessageView.IsDeletedByReceiver = BooleanProxy.Deserialize(bytes);
            privateMessageView.IsDeletedBySender   = BooleanProxy.Deserialize(bytes);
            privateMessageView.IsRead           = BooleanProxy.Deserialize(bytes);
            privateMessageView.PrivateMessageId = Int32Proxy.Deserialize(bytes);
            privateMessageView.ToCmid           = Int32Proxy.Deserialize(bytes);
            return(privateMessageView);
        }
        // Token: 0x06001041 RID: 4161 RVA: 0x00012BB0 File Offset: 0x00010DB0
        public static void Serialize(Stream stream, ClanMemberView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.Cmid);
                DateTimeProxy.Serialize(memoryStream, instance.JoiningDate);
                DateTimeProxy.Serialize(memoryStream, instance.Lastlogin);
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 1;
                }
                EnumProxy <GroupPosition> .Serialize(memoryStream, instance.Position);

                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
        // Token: 0x060010BB RID: 4283 RVA: 0x00016790 File Offset: 0x00014990
        public static void Serialize(Stream stream, ServerConnectionView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                EnumProxy <MemberAccessLevel> .Serialize(memoryStream, instance.AccessLevel);

                if (instance.ApiVersion != null)
                {
                    StringProxy.Serialize(memoryStream, instance.ApiVersion);
                }
                else
                {
                    num |= 1;
                }
                EnumProxy <ChannelType> .Serialize(memoryStream, instance.Channel);

                Int32Proxy.Serialize(memoryStream, instance.Cmid);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 15
0
        // Token: 0x06001050 RID: 4176 RVA: 0x00013714 File Offset: 0x00011914
        public static GroupCreationView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            GroupCreationView groupCreationView = new GroupCreationView();

            if ((num & 1) != 0)
            {
                groupCreationView.Address = StringProxy.Deserialize(bytes);
            }
            groupCreationView.ApplicationId = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                groupCreationView.AuthToken = StringProxy.Deserialize(bytes);
            }
            if ((num & 4) != 0)
            {
                groupCreationView.Description = StringProxy.Deserialize(bytes);
            }
            groupCreationView.HasPicture = BooleanProxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                groupCreationView.Locale = StringProxy.Deserialize(bytes);
            }
            if ((num & 16) != 0)
            {
                groupCreationView.Motto = StringProxy.Deserialize(bytes);
            }
            if ((num & 32) != 0)
            {
                groupCreationView.Name = StringProxy.Deserialize(bytes);
            }
            if ((num & 64) != 0)
            {
                groupCreationView.Tag = StringProxy.Deserialize(bytes);
            }
            return(groupCreationView);
        }
Exemplo n.º 16
0
        // Token: 0x0600104E RID: 4174 RVA: 0x000134D0 File Offset: 0x000116D0
        public static CurrencyDepositView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            CurrencyDepositView currencyDepositView = new CurrencyDepositView();

            currencyDepositView.ApplicationId = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                currencyDepositView.BundleId = new int?(Int32Proxy.Deserialize(bytes));
            }
            if ((num & 2) != 0)
            {
                currencyDepositView.BundleName = StringProxy.Deserialize(bytes);
            }
            currencyDepositView.Cash      = DecimalProxy.Deserialize(bytes);
            currencyDepositView.ChannelId = EnumProxy <ChannelType> .Deserialize(bytes);

            currencyDepositView.Cmid             = Int32Proxy.Deserialize(bytes);
            currencyDepositView.Credits          = Int32Proxy.Deserialize(bytes);
            currencyDepositView.CreditsDepositId = Int32Proxy.Deserialize(bytes);
            if ((num & 4) != 0)
            {
                currencyDepositView.CurrencyLabel = StringProxy.Deserialize(bytes);
            }
            currencyDepositView.DepositDate       = DateTimeProxy.Deserialize(bytes);
            currencyDepositView.IsAdminAction     = BooleanProxy.Deserialize(bytes);
            currencyDepositView.PaymentProviderId = EnumProxy <PaymentProviderType> .Deserialize(bytes);

            currencyDepositView.Points = Int32Proxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                currencyDepositView.TransactionKey = StringProxy.Deserialize(bytes);
            }
            currencyDepositView.UsdAmount = DecimalProxy.Deserialize(bytes);
            return(currencyDepositView);
        }
Exemplo n.º 17
0
        // Token: 0x0600105E RID: 4190 RVA: 0x000140B0 File Offset: 0x000122B0
        public static MemberReportView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            MemberReportView memberReportView = new MemberReportView();

            memberReportView.ApplicationId = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                memberReportView.Context = StringProxy.Deserialize(bytes);
            }
            if ((num & 2) != 0)
            {
                memberReportView.IP = StringProxy.Deserialize(bytes);
            }
            if ((num & 4) != 0)
            {
                memberReportView.Reason = StringProxy.Deserialize(bytes);
            }
            memberReportView.ReportType = EnumProxy <MemberReportType> .Deserialize(bytes);

            memberReportView.SourceCmid = Int32Proxy.Deserialize(bytes);
            memberReportView.TargetCmid = Int32Proxy.Deserialize(bytes);
            return(memberReportView);
        }
        // Token: 0x060010C1 RID: 4289 RVA: 0x00016B78 File Offset: 0x00014D78
        public static void Serialize(Stream stream, GameActorInfo instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                EnumProxy <MemberAccessLevel> .Serialize(memoryStream, instance.AccessLevel);

                ByteProxy.Serialize(memoryStream, instance.ArmorPointCapacity);
                ByteProxy.Serialize(memoryStream, instance.ArmorPoints);
                EnumProxy <ChannelType> .Serialize(memoryStream, instance.Channel);

                if (instance.ClanTag != null)
                {
                    StringProxy.Serialize(memoryStream, instance.ClanTag);
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.Cmid);
                EnumProxy <FireMode> .Serialize(memoryStream, instance.CurrentFiringMode);

                ByteProxy.Serialize(memoryStream, instance.CurrentWeaponSlot);
                Int16Proxy.Serialize(memoryStream, instance.Deaths);
                if (instance.FunctionalItems != null)
                {
                    ListProxy <int> .Serialize(memoryStream, instance.FunctionalItems, new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 2;
                }
                if (instance.Gear != null)
                {
                    ListProxy <int> .Serialize(memoryStream, instance.Gear, new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 4;
                }
                Int16Proxy.Serialize(memoryStream, instance.Health);
                Int16Proxy.Serialize(memoryStream, instance.Kills);
                Int32Proxy.Serialize(memoryStream, instance.Level);
                UInt16Proxy.Serialize(memoryStream, instance.Ping);
                ByteProxy.Serialize(memoryStream, instance.PlayerId);
                if (instance.PlayerName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.PlayerName);
                }
                else
                {
                    num |= 8;
                }
                EnumProxy <PlayerStates> .Serialize(memoryStream, instance.PlayerState);

                if (instance.QuickItems != null)
                {
                    ListProxy <int> .Serialize(memoryStream, instance.QuickItems, new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 16;
                }
                ByteProxy.Serialize(memoryStream, instance.Rank);
                ColorProxy.Serialize(memoryStream, instance.SkinColor);
                EnumProxy <SurfaceType> .Serialize(memoryStream, instance.StepSound);

                EnumProxy <TeamID> .Serialize(memoryStream, instance.TeamID);

                if (instance.Weapons != null)
                {
                    ListProxy <int> .Serialize(memoryStream, instance.Weapons, new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 32;
                }
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 19
0
 // Token: 0x060010B5 RID: 4277 RVA: 0x00015D0C File Offset: 0x00013F0C
 public static void Serialize(Stream stream, GameActorInfoDelta instance)
 {
     if (instance != null)
     {
         Int32Proxy.Serialize(stream, instance.DeltaMask);
         ByteProxy.Serialize(stream, instance.Id);
         if ((instance.DeltaMask & 1) != 0)
         {
             EnumProxy <MemberAccessLevel> .Serialize(stream, (MemberAccessLevel)((int)instance.Changes[GameActorInfoDelta.Keys.AccessLevel]));
         }
         if ((instance.DeltaMask & 2) != 0)
         {
             ByteProxy.Serialize(stream, (byte)instance.Changes[GameActorInfoDelta.Keys.ArmorPointCapacity]);
         }
         if ((instance.DeltaMask & 4) != 0)
         {
             ByteProxy.Serialize(stream, (byte)instance.Changes[GameActorInfoDelta.Keys.ArmorPoints]);
         }
         if ((instance.DeltaMask & 8) != 0)
         {
             EnumProxy <ChannelType> .Serialize(stream, (ChannelType)((int)instance.Changes[GameActorInfoDelta.Keys.Channel]));
         }
         if ((instance.DeltaMask & 16) != 0)
         {
             StringProxy.Serialize(stream, (string)instance.Changes[GameActorInfoDelta.Keys.ClanTag]);
         }
         if ((instance.DeltaMask & 32) != 0)
         {
             Int32Proxy.Serialize(stream, (int)instance.Changes[GameActorInfoDelta.Keys.Cmid]);
         }
         if ((instance.DeltaMask & 64) != 0)
         {
             EnumProxy <FireMode> .Serialize(stream, (FireMode)((int)instance.Changes[GameActorInfoDelta.Keys.CurrentFiringMode]));
         }
         if ((instance.DeltaMask & 128) != 0)
         {
             ByteProxy.Serialize(stream, (byte)instance.Changes[GameActorInfoDelta.Keys.CurrentWeaponSlot]);
         }
         if ((instance.DeltaMask & 256) != 0)
         {
             Int16Proxy.Serialize(stream, (short)instance.Changes[GameActorInfoDelta.Keys.Deaths]);
         }
         if ((instance.DeltaMask & 512) != 0)
         {
             ListProxy <int> .Serialize(stream, (List <int>) instance.Changes[GameActorInfoDelta.Keys.FunctionalItems], new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
         }
         if ((instance.DeltaMask & 1024) != 0)
         {
             ListProxy <int> .Serialize(stream, (List <int>) instance.Changes[GameActorInfoDelta.Keys.Gear], new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
         }
         if ((instance.DeltaMask & 2048) != 0)
         {
             Int16Proxy.Serialize(stream, (short)instance.Changes[GameActorInfoDelta.Keys.Health]);
         }
         if ((instance.DeltaMask & 4096) != 0)
         {
             Int16Proxy.Serialize(stream, (short)instance.Changes[GameActorInfoDelta.Keys.Kills]);
         }
         if ((instance.DeltaMask & 8192) != 0)
         {
             Int32Proxy.Serialize(stream, (int)instance.Changes[GameActorInfoDelta.Keys.Level]);
         }
         if ((instance.DeltaMask & 16384) != 0)
         {
             UInt16Proxy.Serialize(stream, (ushort)instance.Changes[GameActorInfoDelta.Keys.Ping]);
         }
         if ((instance.DeltaMask & 32768) != 0)
         {
             ByteProxy.Serialize(stream, (byte)instance.Changes[GameActorInfoDelta.Keys.PlayerId]);
         }
         if ((instance.DeltaMask & 65536) != 0)
         {
             StringProxy.Serialize(stream, (string)instance.Changes[GameActorInfoDelta.Keys.PlayerName]);
         }
         if ((instance.DeltaMask & 131072) != 0)
         {
             EnumProxy <PlayerStates> .Serialize(stream, (PlayerStates)((byte)instance.Changes[GameActorInfoDelta.Keys.PlayerState]));
         }
         if ((instance.DeltaMask & 262144) != 0)
         {
             ListProxy <int> .Serialize(stream, (List <int>) instance.Changes[GameActorInfoDelta.Keys.QuickItems], new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
         }
         if ((instance.DeltaMask & 524288) != 0)
         {
             ByteProxy.Serialize(stream, (byte)instance.Changes[GameActorInfoDelta.Keys.Rank]);
         }
         if ((instance.DeltaMask & 1048576) != 0)
         {
             ColorProxy.Serialize(stream, (Color)instance.Changes[GameActorInfoDelta.Keys.SkinColor]);
         }
         if ((instance.DeltaMask & 2097152) != 0)
         {
             EnumProxy <SurfaceType> .Serialize(stream, (SurfaceType)((int)instance.Changes[GameActorInfoDelta.Keys.StepSound]));
         }
         if ((instance.DeltaMask & 4194304) != 0)
         {
             EnumProxy <TeamID> .Serialize(stream, (TeamID)((int)instance.Changes[GameActorInfoDelta.Keys.TeamID]));
         }
         if ((instance.DeltaMask & 8388608) != 0)
         {
             ListProxy <int> .Serialize(stream, (List <int>) instance.Changes[GameActorInfoDelta.Keys.Weapons], new ListProxy <int> .Serializer <int>(Int32Proxy.Serialize));
         }
     }
     else
     {
         Int32Proxy.Serialize(stream, 0);
     }
 }
Exemplo n.º 20
0
        // Token: 0x060010B6 RID: 4278 RVA: 0x0001612C File Offset: 0x0001432C
        public static GameActorInfoDelta Deserialize(Stream bytes)
        {
            int  num = Int32Proxy.Deserialize(bytes);
            byte id  = ByteProxy.Deserialize(bytes);
            GameActorInfoDelta gameActorInfoDelta = new GameActorInfoDelta();

            gameActorInfoDelta.Id = id;
            if (num != 0)
            {
                if ((num & 1) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.AccessLevel] = EnumProxy <MemberAccessLevel> .Deserialize(bytes);
                }
                if ((num & 2) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.ArmorPointCapacity] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 4) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.ArmorPoints] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 8) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Channel] = EnumProxy <ChannelType> .Deserialize(bytes);
                }
                if ((num & 16) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.ClanTag] = StringProxy.Deserialize(bytes);
                }
                if ((num & 32) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Cmid] = Int32Proxy.Deserialize(bytes);
                }
                if ((num & 64) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.CurrentFiringMode] = EnumProxy <FireMode> .Deserialize(bytes);
                }
                if ((num & 128) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.CurrentWeaponSlot] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 256) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Deaths] = Int16Proxy.Deserialize(bytes);
                }
                if ((num & 512) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.FunctionalItems] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
                if ((num & 1024) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Gear] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
                if ((num & 2048) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Health] = Int16Proxy.Deserialize(bytes);
                }
                if ((num & 4096) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Kills] = Int16Proxy.Deserialize(bytes);
                }
                if ((num & 8192) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Level] = Int32Proxy.Deserialize(bytes);
                }
                if ((num & 16384) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Ping] = UInt16Proxy.Deserialize(bytes);
                }
                if ((num & 32768) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.PlayerId] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 65536) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.PlayerName] = StringProxy.Deserialize(bytes);
                }
                if ((num & 131072) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.PlayerState] = EnumProxy <PlayerStates> .Deserialize(bytes);
                }
                if ((num & 262144) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.QuickItems] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
                if ((num & 524288) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Rank] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 1048576) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.SkinColor] = ColorProxy.Deserialize(bytes);
                }
                if ((num & 2097152) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.StepSound] = EnumProxy <SurfaceType> .Deserialize(bytes);
                }
                if ((num & 4194304) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.TeamID] = EnumProxy <TeamID> .Deserialize(bytes);
                }
                if ((num & 8388608) != 0)
                {
                    gameActorInfoDelta.Changes[GameActorInfoDelta.Keys.Weapons] = ListProxy <int> .Deserialize(bytes, new ListProxy <int> .Deserializer <int>(Int32Proxy.Deserialize));
                }
            }
            return(gameActorInfoDelta);
        }
Exemplo n.º 21
0
        // Token: 0x060010FB RID: 4347 RVA: 0x00019844 File Offset: 0x00017A44
        public static void Serialize(Stream stream, UberStrikeItemQuickView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                EnumProxy <QuickItemLogic> .Serialize(memoryStream, instance.BehaviourType);

                Int32Proxy.Serialize(memoryStream, instance.CoolDownTime);
                if (instance.CustomProperties != null)
                {
                    DictionaryProxy <string, string> .Serialize(memoryStream, instance.CustomProperties, new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize), new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize));
                }
                else
                {
                    num |= 1;
                }
                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 2;
                }
                Int32Proxy.Serialize(memoryStream, instance.ID);
                BooleanProxy.Serialize(memoryStream, instance.IsConsumable);
                EnumProxy <UberstrikeItemClass> .Serialize(memoryStream, instance.ItemClass);

                if (instance.ItemProperties != null)
                {
                    DictionaryProxy <ItemPropertyType, int> .Serialize(memoryStream, instance.ItemProperties, new DictionaryProxy <ItemPropertyType, int> .Serializer <ItemPropertyType>(EnumProxy <ItemPropertyType> .Serialize), new DictionaryProxy <ItemPropertyType, int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 4;
                }
                Int32Proxy.Serialize(memoryStream, instance.LevelLock);
                Int32Proxy.Serialize(memoryStream, instance.MaxDurationDays);
                Int32Proxy.Serialize(memoryStream, instance.MaxOwnableAmount);
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 8;
                }
                if (instance.PrefabName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.PrefabName);
                }
                else
                {
                    num |= 16;
                }
                if (instance.Prices != null)
                {
                    ListProxy <ItemPrice> .Serialize(memoryStream, instance.Prices, new ListProxy <ItemPrice> .Serializer <ItemPrice>(ItemPriceProxy.Serialize));
                }
                else
                {
                    num |= 32;
                }
                EnumProxy <ItemShopHighlightType> .Serialize(memoryStream, instance.ShopHighlightType);

                Int32Proxy.Serialize(memoryStream, instance.UsesPerGame);
                Int32Proxy.Serialize(memoryStream, instance.UsesPerLife);
                Int32Proxy.Serialize(memoryStream, instance.UsesPerRound);
                Int32Proxy.Serialize(memoryStream, instance.WarmUpTime);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 22
0
        // Token: 0x0600104F RID: 4175 RVA: 0x000135C4 File Offset: 0x000117C4
        public static void Serialize(Stream stream, GroupCreationView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.Address != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Address);
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.ApplicationId);
                if (instance.AuthToken != null)
                {
                    StringProxy.Serialize(memoryStream, instance.AuthToken);
                }
                else
                {
                    num |= 2;
                }
                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 4;
                }
                BooleanProxy.Serialize(memoryStream, instance.HasPicture);
                if (instance.Locale != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Locale);
                }
                else
                {
                    num |= 8;
                }
                if (instance.Motto != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Motto);
                }
                else
                {
                    num |= 16;
                }
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 32;
                }
                if (instance.Tag != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Tag);
                }
                else
                {
                    num |= 64;
                }
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 23
0
        // Token: 0x060010AE RID: 4270 RVA: 0x000158F4 File Offset: 0x00013AF4
        public static CommActorInfoDelta Deserialize(Stream bytes)
        {
            int  num = Int32Proxy.Deserialize(bytes);
            byte id  = ByteProxy.Deserialize(bytes);
            CommActorInfoDelta commActorInfoDelta = new CommActorInfoDelta();

            commActorInfoDelta.Id = id;
            if (num != 0)
            {
                if ((num & 1) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.AccessLevel] = EnumProxy <MemberAccessLevel> .Deserialize(bytes);
                }
                if ((num & 2) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.Channel] = EnumProxy <ChannelType> .Deserialize(bytes);
                }
                if ((num & 4) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.ClanTag] = StringProxy.Deserialize(bytes);
                }
                if ((num & 8) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.Cmid] = Int32Proxy.Deserialize(bytes);
                }
                if ((num & 16) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.CurrentRoom] = GameRoomProxy.Deserialize(bytes);
                }
                if ((num & 32) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.ModerationFlag] = ByteProxy.Deserialize(bytes);
                }
                if ((num & 64) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.ModInformation] = StringProxy.Deserialize(bytes);
                }
                if ((num & 128) != 0)
                {
                    commActorInfoDelta.Changes[CommActorInfoDelta.Keys.PlayerName] = StringProxy.Deserialize(bytes);
                }
            }
            return(commActorInfoDelta);
        }
Exemplo n.º 24
0
        // Token: 0x06001047 RID: 4167 RVA: 0x00012DF0 File Offset: 0x00010FF0
        public static void Serialize(Stream stream, ClanView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.Address != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Address);
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.ApplicationId);
                EnumProxy <GroupColor> .Serialize(memoryStream, instance.ColorStyle);

                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 2;
                }
                EnumProxy <GroupFontStyle> .Serialize(memoryStream, instance.FontStyle);

                DateTimeProxy.Serialize(memoryStream, instance.FoundingDate);
                Int32Proxy.Serialize(memoryStream, instance.GroupId);
                DateTimeProxy.Serialize(memoryStream, instance.LastUpdated);
                if (instance.Members != null)
                {
                    ListProxy <ClanMemberView> .Serialize(memoryStream, instance.Members, new ListProxy <ClanMemberView> .Serializer <ClanMemberView>(ClanMemberViewProxy.Serialize));
                }
                else
                {
                    num |= 4;
                }
                Int32Proxy.Serialize(memoryStream, instance.MembersCount);
                Int32Proxy.Serialize(memoryStream, instance.MembersLimit);
                if (instance.Motto != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Motto);
                }
                else
                {
                    num |= 8;
                }
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 16;
                }
                Int32Proxy.Serialize(memoryStream, instance.OwnerCmid);
                if (instance.OwnerName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.OwnerName);
                }
                else
                {
                    num |= 32;
                }
                if (instance.Picture != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Picture);
                }
                else
                {
                    num |= 64;
                }
                if (instance.Tag != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Tag);
                }
                else
                {
                    num |= 128;
                }
                EnumProxy <GroupType> .Serialize(memoryStream, instance.Type);

                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 25
0
        // Token: 0x060010FF RID: 4351 RVA: 0x00019D34 File Offset: 0x00017F34
        public static void Serialize(Stream stream, UberStrikeItemWeaponView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.AccuracySpread);
                //Int32Proxy.Serialize(memoryStream, instance.ArmorPierced);
                Int32Proxy.Serialize(memoryStream, instance.CombatRange);
                Int32Proxy.Serialize(memoryStream, instance.CriticalStrikeBonus);
                if (instance.CustomProperties != null)
                {
                    DictionaryProxy <string, string> .Serialize(memoryStream, instance.CustomProperties, new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize), new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize));
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.DamageKnockback);
                Int32Proxy.Serialize(memoryStream, instance.DamagePerProjectile);
                Int32Proxy.Serialize(memoryStream, instance.DefaultZoomMultiplier);
                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 2;
                }
                BooleanProxy.Serialize(memoryStream, instance.HasAutomaticFire);
                Int32Proxy.Serialize(memoryStream, instance.ID);
                BooleanProxy.Serialize(memoryStream, instance.IsConsumable);
                EnumProxy <UberstrikeItemClass> .Serialize(memoryStream, instance.ItemClass);

                if (instance.ItemProperties != null)
                {
                    DictionaryProxy <ItemPropertyType, int> .Serialize(memoryStream, instance.ItemProperties, new DictionaryProxy <ItemPropertyType, int> .Serializer <ItemPropertyType>(EnumProxy <ItemPropertyType> .Serialize), new DictionaryProxy <ItemPropertyType, int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 4;
                }
                Int32Proxy.Serialize(memoryStream, instance.LevelLock);
                Int32Proxy.Serialize(memoryStream, instance.MaxAmmo);
                Int32Proxy.Serialize(memoryStream, instance.MaxDurationDays);
                Int32Proxy.Serialize(memoryStream, instance.MaxZoomMultiplier);
                Int32Proxy.Serialize(memoryStream, instance.MinZoomMultiplier);
                Int32Proxy.Serialize(memoryStream, instance.MissileBounciness);
                Int32Proxy.Serialize(memoryStream, instance.MissileForceImpulse);
                Int32Proxy.Serialize(memoryStream, instance.MissileTimeToDetonate);
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 8;
                }
                if (instance.PrefabName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.PrefabName);
                }
                else
                {
                    num |= 16;
                }
                if (instance.Prices != null)
                {
                    ListProxy <ItemPrice> .Serialize(memoryStream, instance.Prices, new ListProxy <ItemPrice> .Serializer <ItemPrice>(ItemPriceProxy.Serialize));
                }
                else
                {
                    num |= 32;
                }
                Int32Proxy.Serialize(memoryStream, instance.ProjectileSpeed);
                Int32Proxy.Serialize(memoryStream, instance.ProjectilesPerShot);
                Int32Proxy.Serialize(memoryStream, instance.RateOfFire);
                Int32Proxy.Serialize(memoryStream, instance.RecoilKickback);
                Int32Proxy.Serialize(memoryStream, instance.RecoilMovement);
                Int32Proxy.Serialize(memoryStream, instance.SecondaryActionReticle);
                EnumProxy <ItemShopHighlightType> .Serialize(memoryStream, instance.ShopHighlightType);

                Int32Proxy.Serialize(memoryStream, instance.SplashRadius);
                Int32Proxy.Serialize(memoryStream, instance.StartAmmo);
                Int32Proxy.Serialize(memoryStream, instance.Tier);
                Int32Proxy.Serialize(memoryStream, instance.WeaponSecondaryAction);

                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 26
0
        // Token: 0x06001100 RID: 4352 RVA: 0x00019FE0 File Offset: 0x000181E0
        public static UberStrikeItemWeaponView Deserialize(Stream bytes)
        {
            int num = Int32Proxy.Deserialize(bytes);
            UberStrikeItemWeaponView uberStrikeItemWeaponView = new UberStrikeItemWeaponView();

            uberStrikeItemWeaponView.AccuracySpread = Int32Proxy.Deserialize(bytes);
            //uberStrikeItemWeaponView.ArmorPierced = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.CombatRange         = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.CriticalStrikeBonus = Int32Proxy.Deserialize(bytes);
            if ((num & 1) != 0)
            {
                uberStrikeItemWeaponView.CustomProperties = DictionaryProxy <string, string> .Deserialize(bytes, new DictionaryProxy <string, string> .Deserializer <string>(StringProxy.Deserialize), new DictionaryProxy <string, string> .Deserializer <string>(StringProxy.Deserialize));
            }
            uberStrikeItemWeaponView.DamageKnockback       = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.DamagePerProjectile   = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.DefaultZoomMultiplier = Int32Proxy.Deserialize(bytes);
            if ((num & 2) != 0)
            {
                uberStrikeItemWeaponView.Description = StringProxy.Deserialize(bytes);
            }
            uberStrikeItemWeaponView.HasAutomaticFire = BooleanProxy.Deserialize(bytes);
            uberStrikeItemWeaponView.ID           = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.IsConsumable = BooleanProxy.Deserialize(bytes);
            uberStrikeItemWeaponView.ItemClass    = EnumProxy <UberstrikeItemClass> .Deserialize(bytes);

            if ((num & 4) != 0)
            {
                uberStrikeItemWeaponView.ItemProperties = DictionaryProxy <ItemPropertyType, int> .Deserialize(bytes, new DictionaryProxy <ItemPropertyType, int> .Deserializer <ItemPropertyType>(EnumProxy <ItemPropertyType> .Deserialize), new DictionaryProxy <ItemPropertyType, int> .Deserializer <int>(Int32Proxy.Deserialize));
            }
            uberStrikeItemWeaponView.LevelLock             = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.MaxAmmo               = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.MaxDurationDays       = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.MaxZoomMultiplier     = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.MinZoomMultiplier     = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.MissileBounciness     = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.MissileForceImpulse   = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.MissileTimeToDetonate = Int32Proxy.Deserialize(bytes);
            if ((num & 8) != 0)
            {
                uberStrikeItemWeaponView.Name = StringProxy.Deserialize(bytes);
            }
            if ((num & 16) != 0)
            {
                uberStrikeItemWeaponView.PrefabName = StringProxy.Deserialize(bytes);
            }
            if ((num & 32) != 0)
            {
                uberStrikeItemWeaponView.Prices = ListProxy <ItemPrice> .Deserialize(bytes, new ListProxy <ItemPrice> .Deserializer <ItemPrice>(ItemPriceProxy.Deserialize));
            }
            uberStrikeItemWeaponView.ProjectileSpeed        = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.ProjectilesPerShot     = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.RateOfFire             = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.RecoilKickback         = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.RecoilMovement         = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.SecondaryActionReticle = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.ShopHighlightType      = EnumProxy <ItemShopHighlightType> .Deserialize(bytes);

            uberStrikeItemWeaponView.SplashRadius          = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.StartAmmo             = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.Tier                  = Int32Proxy.Deserialize(bytes);
            uberStrikeItemWeaponView.WeaponSecondaryAction = Int32Proxy.Deserialize(bytes);

            return(uberStrikeItemWeaponView);
        }
Exemplo n.º 27
0
        // Token: 0x06001039 RID: 4153 RVA: 0x000125A8 File Offset: 0x000107A8
        public static void Serialize(Stream stream, BundleView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                if (instance.AndroidStoreUniqueId != null)
                {
                    StringProxy.Serialize(memoryStream, instance.AndroidStoreUniqueId);
                }
                else
                {
                    num |= 1;
                }
                Int32Proxy.Serialize(memoryStream, instance.ApplicationId);
                if (instance.Availability != null)
                {
                    ListProxy <ChannelType> .Serialize(memoryStream, instance.Availability, new ListProxy <ChannelType> .Serializer <ChannelType>(EnumProxy <ChannelType> .Serialize));
                }
                else
                {
                    num |= 2;
                }
                if (instance.BundleItemViews != null)
                {
                    ListProxy <BundleItemView> .Serialize(memoryStream, instance.BundleItemViews, new ListProxy <BundleItemView> .Serializer <BundleItemView>(BundleItemViewProxy.Serialize));
                }
                else
                {
                    num |= 4;
                }
                EnumProxy <BundleCategoryType> .Serialize(memoryStream, instance.Category);

                Int32Proxy.Serialize(memoryStream, instance.Credits);
                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 8;
                }
                if (instance.IconUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.IconUrl);
                }
                else
                {
                    num |= 16;
                }
                Int32Proxy.Serialize(memoryStream, instance.Id);
                if (instance.ImageUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.ImageUrl);
                }
                else
                {
                    num |= 32;
                }
                if (instance.IosAppStoreUniqueId != null)
                {
                    StringProxy.Serialize(memoryStream, instance.IosAppStoreUniqueId);
                }
                else
                {
                    num |= 64;
                }
                BooleanProxy.Serialize(memoryStream, instance.IsDefault);
                BooleanProxy.Serialize(memoryStream, instance.IsOnSale);
                BooleanProxy.Serialize(memoryStream, instance.IsPromoted);
                if (instance.MacAppStoreUniqueId != null)
                {
                    StringProxy.Serialize(memoryStream, instance.MacAppStoreUniqueId);
                }
                else
                {
                    num |= 128;
                }
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 256;
                }
                Int32Proxy.Serialize(memoryStream, instance.Points);
                if (instance.PromotionTag != null)
                {
                    StringProxy.Serialize(memoryStream, instance.PromotionTag);
                }
                else
                {
                    num |= 512;
                }
                DecimalProxy.Serialize(memoryStream, instance.USDPrice);
                DecimalProxy.Serialize(memoryStream, instance.USDPromoPrice);
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 28
0
        // Token: 0x06001113 RID: 4371 RVA: 0x0001AC04 File Offset: 0x00018E04
        public static void Serialize(Stream stream, UberStrikeItemGearView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.ArmorPoints);
                Int32Proxy.Serialize(memoryStream, instance.ArmorWeight);
                if (instance.CustomProperties != null)
                {
                    DictionaryProxy <string, string> .Serialize(memoryStream, instance.CustomProperties, new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize), new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize));
                }
                else
                {
                    num |= 1;
                }
                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 2;
                }
                Int32Proxy.Serialize(memoryStream, instance.ID);
                BooleanProxy.Serialize(memoryStream, instance.IsConsumable);
                EnumProxy <UberstrikeItemClass> .Serialize(memoryStream, instance.ItemClass);

                if (instance.ItemProperties != null)
                {
                    DictionaryProxy <ItemPropertyType, int> .Serialize(memoryStream, instance.ItemProperties, new DictionaryProxy <ItemPropertyType, int> .Serializer <ItemPropertyType>(EnumProxy <ItemPropertyType> .Serialize), new DictionaryProxy <ItemPropertyType, int> .Serializer <int>(Int32Proxy.Serialize));
                }
                else
                {
                    num |= 4;
                }
                Int32Proxy.Serialize(memoryStream, instance.LevelLock);
                Int32Proxy.Serialize(memoryStream, instance.MaxDurationDays);
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 8;
                }
                if (instance.PrefabName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.PrefabName);
                }
                else
                {
                    num |= 16;
                }
                if (instance.Prices != null)
                {
                    ListProxy <ItemPrice> .Serialize(memoryStream, instance.Prices, new ListProxy <ItemPrice> .Serializer <ItemPrice>(ItemPriceProxy.Serialize));
                }
                else
                {
                    num |= 32;
                }
                EnumProxy <ItemShopHighlightType> .Serialize(memoryStream, instance.ShopHighlightType);

                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
        // Token: 0x06001031 RID: 4145 RVA: 0x00011EBC File Offset: 0x000100BC
        public static void Serialize(Stream stream, ApplicationView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                Int32Proxy.Serialize(memoryStream, instance.ApplicationVersionId);
                EnumProxy <BuildType> .Serialize(memoryStream, instance.Build);

                EnumProxy <ChannelType> .Serialize(memoryStream, instance.Channel);

                if (instance.ExpirationDate != null)
                {
                    Stream   bytes          = memoryStream;
                    DateTime?expirationDate = instance.ExpirationDate;
                    DateTimeProxy.Serialize(bytes, (expirationDate == null) ? default(DateTime) : expirationDate.Value);
                }
                else
                {
                    num |= 1;
                }
                if (instance.FileName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.FileName);
                }
                else
                {
                    num |= 2;
                }
                BooleanProxy.Serialize(memoryStream, instance.IsCurrent);
                Int32Proxy.Serialize(memoryStream, instance.PhotonGroupId);
                if (instance.PhotonGroupName != null)
                {
                    StringProxy.Serialize(memoryStream, instance.PhotonGroupName);
                }
                else
                {
                    num |= 4;
                }
                DateTimeProxy.Serialize(memoryStream, instance.ReleaseDate);
                Int32Proxy.Serialize(memoryStream, instance.RemainingTime);
                if (instance.Servers != null)
                {
                    ListProxy <PhotonView> .Serialize(memoryStream, instance.Servers, new ListProxy <PhotonView> .Serializer <PhotonView>(PhotonViewProxy.Serialize));
                }
                else
                {
                    num |= 8;
                }
                if (instance.SupportUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.SupportUrl);
                }
                else
                {
                    num |= 16;
                }
                if (instance.Version != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Version);
                }
                else
                {
                    num |= 32;
                }
                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }
Exemplo n.º 30
0
        // Token: 0x06001067 RID: 4199 RVA: 0x000145EC File Offset: 0x000127EC
        public static void Serialize(Stream stream, MysteryBoxUnityView instance)
        {
            int num = 0;

            using (MemoryStream memoryStream = new MemoryStream())
            {
                EnumProxy <BundleCategoryType> .Serialize(memoryStream, instance.Category);

                Int32Proxy.Serialize(memoryStream, instance.CreditsAttributed);
                Int32Proxy.Serialize(memoryStream, instance.CreditsAttributedWeight);
                if (instance.Description != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Description);
                }
                else
                {
                    num |= 1;
                }
                BooleanProxy.Serialize(memoryStream, instance.ExposeItemsToPlayers);
                if (instance.IconUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.IconUrl);
                }
                else
                {
                    num |= 2;
                }
                Int32Proxy.Serialize(memoryStream, instance.Id);
                if (instance.ImageUrl != null)
                {
                    StringProxy.Serialize(memoryStream, instance.ImageUrl);
                }
                else
                {
                    num |= 4;
                }
                BooleanProxy.Serialize(memoryStream, instance.IsAvailableInShop);
                Int32Proxy.Serialize(memoryStream, instance.ItemsAttributed);
                if (instance.MysteryBoxItems != null)
                {
                    ListProxy <BundleItemView> .Serialize(memoryStream, instance.MysteryBoxItems, new ListProxy <BundleItemView> .Serializer <BundleItemView>(BundleItemViewProxy.Serialize));
                }
                else
                {
                    num |= 8;
                }
                if (instance.Name != null)
                {
                    StringProxy.Serialize(memoryStream, instance.Name);
                }
                else
                {
                    num |= 16;
                }
                Int32Proxy.Serialize(memoryStream, instance.PointsAttributed);
                Int32Proxy.Serialize(memoryStream, instance.PointsAttributedWeight);
                Int32Proxy.Serialize(memoryStream, instance.Price);
                EnumProxy <UberStrikeCurrencyType> .Serialize(memoryStream, instance.UberStrikeCurrencyType);

                Int32Proxy.Serialize(stream, ~num);
                memoryStream.WriteTo(stream);
            }
        }