// Token: 0x06004AC4 RID: 19140 RVA: 0x00174BF0 File Offset: 0x00172DF0 public void PraiseHeroComment(int heroId, ulong commentInstanceId) { PlayerHeroCommentEntry playerHeroCommentEntry = this.FindPlayerHeroCommentEntry(heroId); if (playerHeroCommentEntry == null) { playerHeroCommentEntry = new PlayerHeroCommentEntry(); playerHeroCommentEntry.HeroId = heroId; this.m_playerHeroCommentEntries.Add(playerHeroCommentEntry); } playerHeroCommentEntry.PraisedEntryInstanceIds.Add(commentInstanceId); base.SetDirty(true); }
// Token: 0x06004F2E RID: 20270 RVA: 0x0017E49C File Offset: 0x0017C69C public static PlayerHeroCommentEntry PBPlayerHeroCommentEntryToPlayerHeroCommentEntry(ProPlayerHeroCommentEntry pbEntry) { PlayerHeroCommentEntry playerHeroCommentEntry = new PlayerHeroCommentEntry(); playerHeroCommentEntry.HeroId = pbEntry.HeroId; playerHeroCommentEntry.CommentedEntryInstanceIds.AddRange(pbEntry.CommentedEntryInstanceIds); foreach (ulong item in pbEntry.PraisedEntryInstanceIds) { playerHeroCommentEntry.PraisedEntryInstanceIds.Add(item); } playerHeroCommentEntry.CommentedNums = pbEntry.CommentedNums; return(playerHeroCommentEntry); }
// 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); }
// Token: 0x06003FA0 RID: 16288 RVA: 0x00127498 File Offset: 0x00125698 public int CanCommentHero(int heroId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanCommentHeroInt32_hotfix != null) { return(Convert.ToInt32(this.m_CanCommentHeroInt32_hotfix.call(new object[] { this, heroId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; if (!this.m_hero.HasGainHero(heroId)) { return(-1701); } PlayerHeroCommentEntry playerHeroCommentEntry = this.m_commentDS.FindPlayerHeroCommentEntry(heroId); if (playerHeroCommentEntry == null) { return(0); } return((playerHeroCommentEntry.CommentedNums >= this.m_configDataLoader.ConfigableConstId_PlayerSingleHeroCommentMaxNums) ? -1700 : 0); }
// Token: 0x06003FA1 RID: 16289 RVA: 0x00127564 File Offset: 0x00125764 public int CanPraiseHeroCommentEntry(int heroId, ulong entryInstanceId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanPraiseHeroCommentEntryInt32UInt64_hotfix != null) { return(Convert.ToInt32(this.m_CanPraiseHeroCommentEntryInt32UInt64_hotfix.call(new object[] { this, heroId, entryInstanceId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; if (!this.m_hero.HasGainHero(heroId)) { return(-1701); } PlayerHeroCommentEntry playerHeroCommentEntry = this.m_commentDS.FindPlayerHeroCommentEntry(heroId); if (playerHeroCommentEntry == null) { return(0); } return((!playerHeroCommentEntry.PraisedEntryInstanceIds.Contains(entryInstanceId)) ? 0 : -1702); }
// Token: 0x06004F2D RID: 20269 RVA: 0x0017E44C File Offset: 0x0017C64C public static ProPlayerHeroCommentEntry PlayerHeroCommentEntryToPBPlayerHeroCommentEntry(PlayerHeroCommentEntry entry) { ProPlayerHeroCommentEntry proPlayerHeroCommentEntry = new ProPlayerHeroCommentEntry(); proPlayerHeroCommentEntry.HeroId = entry.HeroId; proPlayerHeroCommentEntry.CommentedEntryInstanceIds.AddRange(entry.CommentedEntryInstanceIds); proPlayerHeroCommentEntry.PraisedEntryInstanceIds.AddRange(entry.PraisedEntryInstanceIds); proPlayerHeroCommentEntry.CommentedNums = entry.CommentedNums; return(proPlayerHeroCommentEntry); }
// Token: 0x06004AC2 RID: 19138 RVA: 0x00174BAC File Offset: 0x00172DAC public void InitPlayerHeroCommentEntry(PlayerHeroCommentEntry playerCommentEntry) { this.m_playerHeroCommentEntries.Add(playerCommentEntry); }