Ejemplo n.º 1
0
 // Token: 0x06004F17 RID: 20247 RVA: 0x0017E238 File Offset: 0x0017C438
 public HeroCommentEntry(HeroCommentEntry other)
 {
     this.InstanceId      = other.InstanceId;
     this.Content         = other.Content;
     this.CommenterUserId = other.CommenterUserId;
     this.CommenterName   = other.CommenterName;
     this.CommenterLevel  = other.CommenterLevel;
     this.PraiseNums      = other.PraiseNums;
     this.CommentTime     = other.CommentTime;
 }
Ejemplo n.º 2
0
        // Token: 0x06004F15 RID: 20245 RVA: 0x0017E1AC File Offset: 0x0017C3AC
        public static HeroComment PBHeroCommentToHeroComment(ProHeroComment pbComment)
        {
            HeroComment heroComment = new HeroComment();

            heroComment.LastUpdateTime = pbComment.LastUpdateTime;
            foreach (ProHeroCommentEntry pbEntry in pbComment.CommentEntries)
            {
                heroComment.CommentEntries.Add(HeroCommentEntry.PBHeroCommentEntryToHeroCommentEntry(pbEntry));
            }
            return(heroComment);
        }
Ejemplo n.º 3
0
        // Token: 0x06004F14 RID: 20244 RVA: 0x0017E130 File Offset: 0x0017C330
        public static ProHeroComment HeroCommentToPBHeroComment(HeroComment comment)
        {
            ProHeroComment proHeroComment = new ProHeroComment();

            proHeroComment.LastUpdateTime = comment.LastUpdateTime;
            foreach (HeroCommentEntry entry in comment.CommentEntries)
            {
                proHeroComment.CommentEntries.Add(HeroCommentEntry.HeroCommentEntryToPBHeroCommentEntry(entry));
            }
            return(proHeroComment);
        }
Ejemplo n.º 4
0
 // Token: 0x06004F26 RID: 20262 RVA: 0x0017E32C File Offset: 0x0017C52C
 public static ProHeroCommentEntry HeroCommentEntryToPBHeroCommentEntry(HeroCommentEntry entry)
 {
     return(new ProHeroCommentEntry
     {
         InstanceId = entry.InstanceId,
         Content = entry.Content,
         CommenterUserId = entry.CommenterUserId,
         CommenterName = entry.CommenterName,
         CommenterLevel = entry.CommenterLevel,
         PraiseNums = entry.PraiseNums,
         CommentTime = entry.CommentTime
     });
 }
Ejemplo n.º 5
0
        // Token: 0x06004AC5 RID: 19141 RVA: 0x00174C38 File Offset: 0x00172E38
        public void CommentHero(int heroId, HeroCommentEntry commentEntry)
        {
            PlayerHeroCommentEntry playerHeroCommentEntry = this.FindPlayerHeroCommentEntry(heroId);
            ulong instanceId = commentEntry.InstanceId;

            if (playerHeroCommentEntry == null)
            {
                playerHeroCommentEntry        = new PlayerHeroCommentEntry();
                playerHeroCommentEntry.HeroId = heroId;
                this.m_playerHeroCommentEntries.Add(playerHeroCommentEntry);
                playerHeroCommentEntry.CommentedEntryInstanceIds.Add(instanceId);
            }
            else if (!playerHeroCommentEntry.CommentedEntryInstanceIds.Contains(instanceId))
            {
                playerHeroCommentEntry.CommentedEntryInstanceIds.Add(instanceId);
            }
            playerHeroCommentEntry.CommentedNums++;
            base.SetDirty(true);
        }