public virtual void SetupFollowButton()
    {
        bool isNPC = record.isNPC;

        QuestResultUserCollection.ResultUserInfo userInfo = MonoBehaviourSingleton <QuestManager> .I.resultUserCollection.GetUserInfo(detailUserID);

        if (record.isSelf || isNPC || userInfo == null)
        {
            SetActive(transRoot, UI.BTN_FOLLOW, false);
            SetActive(transRoot, UI.BTN_UNFOLLOW, false);
            SetActive(transRoot, UI.OBJ_FOLLOW_ARROW_ROOT, false);
            SetActive(transRoot, UI.OBJ_BLACKLIST_ROOT, false);
        }
        else
        {
            bool flag       = !userInfo.CanSendFollow;
            bool isFollower = userInfo.IsFollower;
            SetEvent(transRoot, UI.BTN_FOLLOW, "FOLLOW", 0);
            if (MonoBehaviourSingleton <FriendManager> .I.followNum == MonoBehaviourSingleton <UserInfoManager> .I.userStatus.maxFollow && !flag)
            {
                SetActive(transRoot, UI.BTN_FOLLOW, true);
                SetActive(transRoot, UI.BTN_UNFOLLOW, false);
                SetEvent(transRoot, UI.BTN_FOLLOW, "INVALID_FOLLOW", 0);
            }
            else
            {
                bool flag2 = !record.isNPC;
                SetActive(transRoot, UI.BTN_FOLLOW, flag2 && !flag);
                SetActive(transRoot, UI.BTN_UNFOLLOW, flag2 && flag);
            }
            bool flag3 = MonoBehaviourSingleton <BlackListManager> .I.CheckBlackList(record.charaInfo.userId);

            SetActive(transRoot, UI.OBJ_BLACKLIST_ROOT, true);
            SetActive(transRoot, UI.BTN_BLACKLIST_IN, !flag3);
            SetActive(transRoot, UI.BTN_BLACKLIST_OUT, flag3);
            SetActive(transRoot, UI.SPR_FOLLOW_ARROW, !flag3 && flag);
            SetActive(transRoot, UI.SPR_FOLLOWER_ARROW, !flag3 && isFollower);
            SetActive(transRoot, UI.SPR_BLACKLIST_ICON, flag3);
        }
    }
    public override void UpdateUI()
    {
        //IL_0490: Unknown result type (might be due to invalid IL or missing references)
        //IL_0515: Unknown result type (might be due to invalid IL or missing references)
        //IL_0529: Unknown result type (might be due to invalid IL or missing references)
        if (MonoBehaviourSingleton <InGameRecorder> .IsValid())
        {
            float num = (float)MonoBehaviourSingleton <InGameRecorder> .I.GetTotalEnemyHP();

            int   num2 = 0;
            float num3 = 0f;
            score_list.Clear();
            score_truncation_list.Clear();
            for (int i = 0; i < 4; i++)
            {
                int   num4 = 0;
                float num5 = 0f;
                if (playerRecords != null && i < playerRecords.Count && playerRecords[i] != null)
                {
                    InGameRecorder.PlayerRecord playerRecord = playerRecords[i];
                    float num6 = (float)playerRecord.givenTotalDamage / num * 100f;
                    num4 = (int)num6;
                    num5 = num6 - (float)num4;
                    if (num2 + num4 > 100)
                    {
                        num4 = 100 - num2;
                    }
                    num2 += num4;
                }
                score_list.Add(num4);
                score_truncation_list.Add(num5);
                num3 += num5;
            }
            int num7 = (int)(num3 + 0.1f);
            if (num7 > 0 && num2 < 100)
            {
                for (int j = 0; j < 4; j++)
                {
                    int        num8 = Mathf.CeilToInt(score_truncation_list[j]);
                    List <int> list;
                    List <int> list2 = list = score_list;
                    int        index;
                    int        index2 = index = j;
                    index         = list[index];
                    list2[index2] = index + num8;
                    num7         -= num8;
                    num2         += num8;
                    if (num7 <= 0 || num2 >= 100)
                    {
                        break;
                    }
                }
            }
            InGameRecorder.CheckAndRepairIsSelf(ref playerRecords);
            for (int k = 0; k < 4; k++)
            {
                if (playerRecords != null && k < playerRecords.Count && playerRecords[k] != null)
                {
                    InGameRecorder.PlayerRecord playerRecord2 = playerRecords[k];
                    if (playerRecord2 != null && playerRecord2.charaInfo != null)
                    {
                        bool flag = false;
                        if (playerRecord2.id != 0 && playerRecord2.charaInfo.userId != 0)
                        {
                            QuestResultUserCollection.ResultUserInfo userInfo = MonoBehaviourSingleton <QuestManager> .I.resultUserCollection.GetUserInfo(playerRecord2.charaInfo.userId);

                            if (userInfo != null && !userInfo.CanSendFollow)
                            {
                                flag = true;
                            }
                            if (userInfo != null)
                            {
                                playerRecord2.charaInfo.selectedDegrees = userInfo.selectDegrees;
                            }
                        }
                        Transform root = SetPrefab(itemsL[k], "QuestResultFriendItemL", true);
                        if (playerRecord2.isSelf)
                        {
                            playerRecord2.charaInfo.selectedDegrees = MonoBehaviourSingleton <UserInfoManager> .I.selectedDegreeIds;
                        }
                        CharaInfo.ClanInfo clanInfo = playerRecord2.charaInfo.clanInfo;
                        if (clanInfo == null)
                        {
                            clanInfo        = new CharaInfo.ClanInfo();
                            clanInfo.clanId = -1;
                            clanInfo.tag    = string.Empty;
                        }
                        bool isSameTeam = clanInfo.clanId > -1 && MonoBehaviourSingleton <GuildManager> .I.guildData != null && clanInfo.clanId == MonoBehaviourSingleton <GuildManager> .I.guildData.clanId;
                        if (playerRecord2.isSelf)
                        {
                            SetSupportEncoding(root, UI.LBL_NAME_OWN, true);
                            SetLabelText(root, UI.LBL_NAME_OWN, Utility.GetNameWithColoredClanTag(clanInfo.tag, playerRecord2.charaInfo.name, playerRecord2.id == MonoBehaviourSingleton <UserInfoManager> .I.userInfo.id, isSameTeam));
                            SetActive(root, UI.LBL_NAME, false);
                        }
                        else
                        {
                            SetSupportEncoding(root, UI.LBL_NAME, true);
                            SetLabelText(root, UI.LBL_NAME, Utility.GetNameWithColoredClanTag(clanInfo.tag, playerRecord2.charaInfo.name, playerRecord2.id == MonoBehaviourSingleton <UserInfoManager> .I.userInfo.id, isSameTeam));
                            SetActive(root, UI.LBL_NAME_OWN, false);
                        }
                        if (!playerRecord2.isNPC)
                        {
                            int num9 = playerRecord2.charaInfo.level;
                            if (playerRecord2.isSelf)
                            {
                                num9 = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.level;
                            }
                            SetLabelText(root, UI.LBL_LEVEL, string.Format(base.sectionData.GetText("LEVEL"), num9));
                        }
                        else
                        {
                            SetActive(root, UI.LBL_LEVEL, false);
                            if (FindCtrl(root, UI.BTN_DETAIL) != null && base.GetComponent <UINoAuto>(root, (Enum)UI.BTN_DETAIL) == null)
                            {
                                FindCtrl(root, UI.BTN_DETAIL).get_gameObject().AddComponent <UINoAuto>();
                            }
                        }
                        SetEvent(root, UI.BTN_DETAIL, "DETAIL", k);
                        if (playerRecord2.isSelf)
                        {
                            SetButtonSprite(root, UI.BTN_DETAIL, "ResultPlatemine", true);
                        }
                        PlayerLoadInfo playerLoadInfo = playerRecord2.playerLoadInfo.Clone();
                        playerLoadInfo.armModelID    = -1;
                        playerLoadInfo.weaponModelID = -1;
                        playerLoadInfo.legModelID    = -1;
                        SetRenderPlayerModel(root, UI.TEX_MODEL, playerLoadInfo, 98, new Vector3(0f, -1.613f, 2.342f), new Vector3(0f, 154f, 0f), true, null);
                        if (playerRecord2.charaInfo.selectedDegrees != null && playerRecord2.charaInfo.selectedDegrees.Count == GameDefine.DEGREE_PART_COUNT)
                        {
                            DegreePlate component = FindCtrl(root, UI.OBJ_DEGREE_PLATE).GetComponent <DegreePlate>();
                            component.Initialize(playerRecord2.charaInfo.selectedDegrees, false, delegate
                            {
                            });
                        }
                        root = SetPrefab(itemsR[k], "QuestResultFriendItemR", true);
                        int num10 = score_list[k] % 10;
                        int num11 = score_list[k] / 10 % 10;
                        int num12 = score_list[k] / 100;
                        SetSprite(root, UI.SPR_NUM_0, num10.ToString("D2"));
                        if (num12 != 0 || num11 != 0)
                        {
                            SetSprite(root, UI.SPR_NUM_1, num11.ToString("D2"));
                        }
                        else
                        {
                            SetActive(root, UI.SPR_NUM_1, false);
                        }
                        if (num12 != 0)
                        {
                            SetSprite(root, UI.SPR_NUM_2, num12.ToString("D2"));
                        }
                        else
                        {
                            SetActive(root, UI.SPR_NUM_2, false);
                        }
                        if (!playerRecord2.isSelf && !playerRecord2.isNPC)
                        {
                            SetEvent(root, UI.BTN_FOLLOW, "FOLLOW", k);
                            if (!flag)
                            {
                                SetButtonSprite(root, UI.BTN_FOLLOW, "ResultfollowBtn", true);
                                SetButtonEnabled(root, UI.BTN_FOLLOW, true);
                            }
                            else
                            {
                                SetButtonSprite(root, UI.BTN_FOLLOW, "ResultfollowBtnOff", true);
                                SetButtonEnabled(root, UI.BTN_FOLLOW, false);
                            }
                        }
                        else
                        {
                            SetActive(root, UI.BTN_FOLLOW, false);
                        }
                    }
                }
                else
                {
                    Transform root2 = SetPrefab(itemsL[k], "QuestResultFriendItemL", true);
                    SetActive(root2, UI.LBL_NAME, false);
                    SetActive(root2, UI.LBL_NAME_OWN, false);
                    SetActive(root2, UI.LBL_LEVEL, false);
                    SetButtonSprite(root2, UI.BTN_DETAIL, "ResultPlateGrey", true);
                    SetButtonEnabled(root2, UI.BTN_DETAIL, false);
                    SetEvent(root2, UI.BTN_DETAIL, "DETAIL", k);
                    SetActive(root2, UI.TEX_MODEL, false);
                    root2 = SetPrefab(itemsR[k], "QuestResultFriendItemR", true);
                    SetActive(root2, UI.SPR_NUM_0, false);
                    SetActive(root2, UI.SPR_NUM_1, false);
                    SetActive(root2, UI.SPR_NUM_2, false);
                    SetActive(root2, UI.SPR_PER, false);
                    SetActive(root2, UI.BTN_FOLLOW, false);
                }
            }
            PlayTween((Enum)UI.OBJ_ITEMS, true, (EventDelegate.Callback)null, true, 0);
        }
    }