示例#1
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, EquipCode);
            writer.Write(2, Type);
            writer.Write(3, HealthAdd);
            writer.Write(4, AttackAdd);
            writer.Write(5, CriticalStrikeRate);
            writer.Write(6, DodgeRate);
            return(writer.GetProtoBufferBytes());
        }
示例#2
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, Type);
            foreach (LeaderboardItem v in ItemList)
            {
                writer.Write(2, v);
            }
            writer.Write(3, MyItem);
            return(writer.GetProtoBufferBytes());
        }
示例#3
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, Result);
            writer.Write(2, MailId);
            foreach (int v in SnList)
            {
                writer.Write(3, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#4
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, ChallengeId);
            foreach (TeamAdd v in FriendDataList)
            {
                writer.Write(2, v);
            }
            writer.Write(3, RoundTimeout);
            return(writer.GetProtoBufferBytes());
        }
示例#5
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, CharacterCode);
            writer.Write(2, InitEnergy);
            if (HasUnlockCost)
            {
                writer.Write(3, UnlockCost);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#6
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, MyInfo);
            writer.Write(2, RivalInfo);
            writer.Write(3, Win);
            foreach (Currency v in RoundRewardList)
            {
                writer.Write(4, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#7
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, SkillCode);
            writer.Write(2, PhysicalDamage);
            writer.Write(3, SyncData);
            if (HasKo)
            {
                writer.Write(4, Ko);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#8
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, RechargeName);
            writer.Write(2, Count);
            writer.Write(3, OutTradeNo);
            if (HasExtra)
            {
                writer.Write(4, Extra);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#9
0
        public byte[] GetProtoBufferBytes()
        {
            CheckRequiredFields();
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, (int)RequiredEnum);
            writer.Write(2, (int)OptionalEnum);
            foreach (FooEnum v in RepeatedEnumList)
            {
                writer.Write(3, (int)v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#10
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, VegetableCode);
            writer.Write(2, CurrentUpgradeLimit);
            writer.Write(3, CurrentLevel);
            if (HasMatureTime)
            {
                writer.Write(4, MatureTime);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#11
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, Type);
            writer.Write(2, AuthorizeCode);
            writer.Write(3, DeviceId);
            if (HasUid)
            {
                writer.Write(4, Uid);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#12
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, OutTradeNo);
            writer.Write(2, PayState);
            writer.Write(3, PostState);
            foreach (Currency v in PostedList)
            {
                writer.Write(4, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#13
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, SubLevelId);
            writer.Write(2, Title);
            if (HasDescription)
            {
                writer.Write(3, Description);
            }
            writer.Write(4, CanTeam);
            writer.Write(5, Width);
            writer.Write(6, Height);
            foreach (int v in GridConfigList)
            {
                writer.Write(7, v);
            }
            if (HasCoinBagProbability)
            {
                writer.Write(10, CoinBagProbability);
            }
            if (HasCoinBagCapacity)
            {
                writer.Write(11, CoinBagCapacity);
            }
            if (HasDiamondBagProbability)
            {
                writer.Write(12, DiamondBagProbability);
            }
            if (HasDiamondBagCapacity)
            {
                writer.Write(13, DiamondBagCapacity);
            }
            if (HasHealthBottleProbability)
            {
                writer.Write(14, HealthBottleProbability);
            }
            if (HasHealthBottleCapacity)
            {
                writer.Write(15, HealthBottleCapacity);
            }
            if (HasEnergyBottleProbability)
            {
                writer.Write(16, EnergyBottleProbability);
            }
            if (HasEnergyBottleCapacity)
            {
                writer.Write(17, EnergyBottleCapacity);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#14
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            if (HasNewNickname)
            {
                writer.Write(1, NewNickname);
            }
            if (HasNewCharacter)
            {
                writer.Write(2, NewCharacter);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#15
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            foreach (float v in DurationList)
            {
                writer.Write(1, v);
            }
            foreach (float v in Num0List)
            {
                writer.Write(2, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#16
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            if (HasType)
            {
                writer.Write(1, Type);
            }
            if (HasName)
            {
                writer.Write(2, Name);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#17
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            if (HasApnsDeviceToken)
            {
                writer.Write(1, ApnsDeviceToken);
            }
            if (HasBaiduPushInfo)
            {
                writer.Write(2, BaiduPushInfo);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#18
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, MajorLevelId);
            writer.Write(2, SubLevelId);
            writer.Write(3, ChallengeId);
            writer.Write(4, BossData);
            foreach (TeamAdd v in FellowDataList)
            {
                writer.Write(5, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#19
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, Name);
            writer.Write(2, Price);
            writer.Write(4, TargetType);
            writer.Write(5, TargetAmount);
            if (HasExtra)
            {
                writer.Write(6, Extra);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#20
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            if (HasApnsOk)
            {
                writer.Write(1, ApnsOk);
            }
            if (HasBaiduOk)
            {
                writer.Write(2, BaiduOk);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#21
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, Uid);
            writer.Write(2, UserId);
            writer.Write(3, Sex);
            writer.Write(4, Nickname);
            if (HasHeadIconUrl)
            {
                writer.Write(5, HeadIconUrl);
            }
            writer.Write(6, LeftTeamCount);
            return(writer.GetProtoBufferBytes());
        }
示例#22
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            foreach (float v in NonLevelNumList)
            {
                writer.Write(1, v);
            }
            writer.Write(2, LevelCount);
            foreach (float v in LevelNum0List)
            {
                writer.Write(3, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#23
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, OutTradeNo);
            if (HasTradeNo)
            {
                writer.Write(2, TradeNo);
            }
            if (HasExtra)
            {
                writer.Write(3, Extra);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#24
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, Type);
            if (HasContent)
            {
                writer.Write(2, Content);
            }
            if (HasEncryption)
            {
                writer.Write(3, Encryption);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#25
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            if (HasApnsFail)
            {
                writer.Write(1, ApnsFail);
            }
            if (HasBaiduFail)
            {
                writer.Write(2, BaiduFail);
            }
            writer.Write(3, Result);
            return(writer.GetProtoBufferBytes());
        }
示例#26
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, ChallengeId);
            writer.Write(2, StarCount);
            foreach (Currency v in RoundRewardList)
            {
                writer.Write(3, v);
            }
            if (HasUnlockElement)
            {
                writer.Write(4, UnlockElement);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#27
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, MajorLevelId);
            writer.Write(2, Title);
            if (HasDescription)
            {
                writer.Write(3, Description);
            }
            foreach (SubLevelData v in SubLevelList)
            {
                writer.Write(4, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#28
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, Type);
            writer.Write(2, Uid);
            writer.Write(3, UserId);
            writer.Write(4, Nickname);
            if (HasHeadIconUrl)
            {
                writer.Write(5, HeadIconUrl);
            }
            writer.Write(6, UnlockedMajorLevelId);
            writer.Write(7, UnlockedSubLevelId);
            return(writer.GetProtoBufferBytes());
        }
示例#29
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, VegetableCode);
            writer.Write(2, UpgradeLimit);
            foreach (int v in LevelEnergyList)
            {
                writer.Write(3, v);
            }
            foreach (Currency v in UpgradeCostList)
            {
                writer.Write(4, v);
            }
            return(writer.GetProtoBufferBytes());
        }
示例#30
0
        public byte[] GetProtoBufferBytes()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1, RechargeName);
            writer.Write(2, Count);
            if (HasReceiverUserId)
            {
                writer.Write(3, ReceiverUserId);
            }
            writer.Write(4, PayChannel);
            if (HasClientVersion)
            {
                writer.Write(5, ClientVersion);
            }
            return(writer.GetProtoBufferBytes());
        }
        public void Test()
        {
            ProtoBufferWriter writer = new ProtoBufferWriter();

            writer.Write(1,1);

            writer.Write(2,1);

            writer.Write(2,2);

            writer.Write(3,"sunaijing");

            byte[] data = writer.GetProtoBufferBytes();

            ProtoBufferReader reader = new ProtoBufferReader(data);

            Assert.AreEqual(4,reader.ProtoBufferObjs.Count);
        }