Exemple #1
0
        // Token: 0x06003B3E RID: 15166 RVA: 0x0010EFB0 File Offset: 0x0010D1B0
        public static ProBusinessCard ToProtocol(BusinessCard businessCard)
        {
            ProBusinessCard proBusinessCard = new ProBusinessCard();

            proBusinessCard.UserId          = businessCard.UserId;
            proBusinessCard.HeadIcon        = businessCard.HeadIcon;
            proBusinessCard.Name            = businessCard.Name;
            proBusinessCard.Level           = businessCard.Level;
            proBusinessCard.ArenaPoints     = businessCard.ArenaPoints;
            proBusinessCard.Likes           = businessCard.Likes;
            proBusinessCard.IsOnLine        = businessCard.IsOnLine;
            proBusinessCard.SetInfo         = BusinessCardInfoSet.ToProtocol(businessCard.SetInfo);
            proBusinessCard.StatisticalData = BusinessCardStatisticalData.ToProtocol(businessCard.StatisticalData);
            foreach (BattleHero battleHero in businessCard.Heroes)
            {
                proBusinessCard.Heroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero));
            }
            foreach (BattleHero battleHero2 in businessCard.MostSkilledHeroes)
            {
                proBusinessCard.MostSkilledHeroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero2));
            }
            foreach (TrainingTech trainingTech in businessCard.Techs)
            {
                proBusinessCard.Techs.Add(trainingTech.ToPro());
            }
            return(proBusinessCard);
        }
        // Token: 0x06004AFC RID: 19196 RVA: 0x001755F8 File Offset: 0x001737F8
        public override object SerializeToClient()
        {
            DSFriendNtf dsfriendNtf = new DSFriendNtf();

            dsfriendNtf.FriendshipPointsFromFightWithFriendsToday = this.FriendshipPointsFromFightWithFriendsToday;
            dsfriendNtf.FriendshipPointsClaimedToday = this.FriendshipPointsClaimedToday;
            dsfriendNtf.Likes = this.Likes;
            dsfriendNtf.LikedUsers.AddRange(this.LikedUsers);
            dsfriendNtf.FriendshipPointsSent.AddRange(this.FriendshipPointsSent);
            dsfriendNtf.FriendshipPointsReceived.AddRange(this.FriendshipPointsReceived);
            dsfriendNtf.SetInfo    = BusinessCardInfoSet.ToProtocol(this.BusinessCardSetInfo);
            dsfriendNtf.Version    = (uint)base.Version;
            dsfriendNtf.BannedTime = this.BannedTime.Ticks;
            return(dsfriendNtf);
        }