Example #1
0
 protected void LadderDisplayProcess(CUIFormScript form, bool showLianSheng = false)
 {
     CLadderView.ShowRankDetail(this._ladderRoot.transform.FindChild("RankConNow").gameObject, (byte)this._oldGrade);
     if (showLianSheng && this.IsLianSheng())
     {
         this._ladderRoot.transform.FindChild("LianShengTxt").gameObject.CustomSetActive(true);
     }
     this.ResetAllXing(this._curDian, this._curMaxScore, false);
     this.Ladder_PlayShowIn();
 }
Example #2
0
        private static void SetListElementLadderInfo(GameObject element, COMDT_FRIEND_INFO friendInfo)
        {
            int        num;
            int        num2;
            GameObject gameObject = element.transform.Find("RankCon").gameObject;

            if (gameObject != null)
            {
                gameObject.CustomSetActive(false);
            }
            GetFriendRankGradeAndStar(friendInfo, out num, out num2);
            if (Singleton <CLadderSystem> .GetInstance().IsHaveFightRecord(false, num, num2))
            {
                gameObject.CustomSetActive(true);
                CLadderView.ShowRankDetail(gameObject, (byte)num, (byte)friendInfo.dwRankClass, friendInfo.bIsOnline != 1, true);
            }
        }
Example #3
0
 private static void SetListElementLadderInfo(GameObject element, GuildMemInfo guildMemInfo)
 {
     if (guildMemInfo != null)
     {
         int        num;
         int        num2;
         GameObject gameObject = element.transform.Find("RankCon").gameObject;
         if (gameObject != null)
         {
             gameObject.CustomSetActive(false);
         }
         GetGuildMemberGradeAndStar(guildMemInfo, out num, out num2);
         if (Singleton <CLadderSystem> .GetInstance().IsHaveFightRecord(false, num, num2))
         {
             gameObject.CustomSetActive(true);
             CLadderView.ShowRankDetail(gameObject, (byte)num, (byte)guildMemInfo.stBriefInfo.dwClassOfRank, !CGuildHelper.IsMemberOnline(guildMemInfo), true);
         }
     }
 }
Example #4
0
        public static void ShowRankDetail(GameObject go, ref COMDT_RANKDETAIL rankDetail, bool isShowSeasonHighestGrade = false)
        {
            DebugHelper.Assert(rankDetail != null, "Rank Data must not be null!!!");
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null && rankDetail != null)
            {
                if (isShowSeasonHighestGrade)
                {
                    if (!Singleton <CLadderSystem> .GetInstance().IsValidGrade((int)masterRoleInfo.m_rankSeasonHighestGrade))
                    {
                        throw new Exception("Not valid rank highest season grade: " + masterRoleInfo.m_rankSeasonHighestGrade);
                    }
                    CLadderView.ShowRankDetail(go, masterRoleInfo.m_rankSeasonHighestGrade, masterRoleInfo.m_rankSeasonHighestClass, rankDetail.dwScore, true, false, true, false, true);
                }
                else
                {
                    CLadderView.ShowRankDetail(go, masterRoleInfo.m_rankGrade, masterRoleInfo.m_rankClass, rankDetail.dwScore, true, false, false, false, true);
                }
            }
        }
Example #5
0
        public void ShowMentorSearchInfo(COMDT_FRIEND_INFO info, CFriendModel.FriendType friendType, FriendShower.ItemType type)
        {
            enMentorState mentorState = CFriendContoller.GetMentorState(0u, null);
            bool          bActive     = UT.NeedShowGenderGradeByMentor(type, friendType) && (mentorState == enMentorState.IWantMentor || mentorState == enMentorState.IHasMentor);

            if (this.m_mentorTitleObj != null)
            {
                this.m_mentorTitleObj.transform.parent.gameObject.CustomSetActive(true);
                this.m_mentorTitleObj.gameObject.CustomSetActive(bActive);
                string text = string.Empty;
                try
                {
                    text = GameDataMgr.famousMentorDatabin.GetDataByKey(info.dwMasterLvl).szTitle;
                }
                catch (Exception var_3_84)
                {
                }
                this.m_mentorTitleObj.GetComponent <Text>().text = text;
            }
            if (this.m_mentorFamousObj != null)
            {
                this.m_mentorFamousObj.gameObject.CustomSetActive(bActive);
                this.m_mentorFamousObj.text = Singleton <CTextManager> .GetInstance().GetText("Mentor_LvNApprenticeCountInfo", new string[]
                {
                    info.dwMasterLvl.ToString(),
                    info.dwStudentNum.ToString()
                });
            }
            if (this.m_RankIconObj != null)
            {
                int num = CLadderSystem.ConvertEloToRank(info.RankVal[7]);
                CLadderView.ShowRankDetail(this.m_RankIconObj.transform.parent.gameObject, (byte)num, Singleton <RankingSystem> .GetInstance().GetRankClass(info.stUin.ullUid), 1u, false, true, false, false, true);
            }
            if (UT.NeedShowGenderGradeByMentor(type, friendType))
            {
                this.ShowGenderType(info.bGender);
            }
        }
Example #6
0
        public void ShowNormal(SCPKG_INVITE_JOIN_GAME_REQ info)
        {
            string          text            = CUIUtility.RemoveEmoji(StringHelper.UTF8BytesToString(ref info.stInviterInfo.szName));
            stUIEventParams stUIEventParams = default(stUIEventParams);

            stUIEventParams.tag = (int)info.bIndex;
            int num = 15;

            int.TryParse(Singleton <CTextManager> .get_instance().GetText("MessageBox_Close_Time"), ref num);
            this.form = Singleton <CUIManager> .GetInstance().OpenForm(string.Format("{0}{1}", "UGUI/Form/Common/", "Form_BeInvited.prefab"), false, false);

            GameObject gameObject = this.form.transform.Find("Panel/Panel/normal").gameObject;

            if (gameObject != null)
            {
                gameObject.CustomSetActive(true);
            }
            GameObject gameObject2 = this.form.transform.Find("Panel/Panel/refuse").gameObject;

            if (gameObject2 != null)
            {
                gameObject2.CustomSetActive(false);
            }
            this.listNode     = this.form.transform.Find("Panel/Panel/refuse/reasonPanel/DropList").gameObject;
            this.listScript   = this.listNode.transform.Find("List").GetComponent <CUIListScript>();
            this.m_inputFiled = this.form.transform.Find("Panel/Panel/refuse/reasonPanel/InputField").GetComponent <InputField>();
            this.m_sendBtn    = this.form.transform.Find("Panel/Panel/refuse/btnGroup/Button_Send").gameObject;
            this.form.transform.Find("Panel/Panel/refuse/MatchInfo").GetComponent <Text>().text = Singleton <CTextManager> .get_instance().GetText("Invite_Refuse_Title");

            if (this.form != null)
            {
                string text2 = null;
                string text3 = null;
                if (info.bInviteType == 1)
                {
                    ResDT_LevelCommonInfo pvpMapCommonInfo = CLevelCfgLogicManager.GetPvpMapCommonInfo(info.stInviteDetail.get_stRoomDetail().bMapType, info.stInviteDetail.get_stRoomDetail().dwMapId);
                    stUIEventParams.heroId      = (uint)info.stInviteDetail.get_stRoomDetail().bMapType;
                    stUIEventParams.weakGuideId = info.stInviteDetail.get_stRoomDetail().dwMapId;
                    if (pvpMapCommonInfo != null)
                    {
                        text2 = Singleton <CTextManager> .get_instance().GetText("Invite_Map_Desc", new string[]
                        {
                            ((int)(pvpMapCommonInfo.bMaxAcntNum / 2)).ToString(),
                            ((int)(pvpMapCommonInfo.bMaxAcntNum / 2)).ToString(),
                            Utility.UTF8Convert(pvpMapCommonInfo.szName)
                        });
                    }
                    text3 = Singleton <CTextManager> .GetInstance().GetText("Invite_Match_Type_4");
                }
                else if (info.bInviteType == 2)
                {
                    ResDT_LevelCommonInfo pvpMapCommonInfo2 = CLevelCfgLogicManager.GetPvpMapCommonInfo(info.stInviteDetail.get_stTeamDetail().bMapType, info.stInviteDetail.get_stTeamDetail().dwMapId);
                    stUIEventParams.heroId      = (uint)info.stInviteDetail.get_stTeamDetail().bMapType;
                    stUIEventParams.weakGuideId = info.stInviteDetail.get_stTeamDetail().dwMapId;
                    if (pvpMapCommonInfo2 != null)
                    {
                        text2 = Singleton <CTextManager> .get_instance().GetText("Invite_Map_Desc", new string[]
                        {
                            ((int)(pvpMapCommonInfo2.bMaxAcntNum / 2)).ToString(),
                            ((int)(pvpMapCommonInfo2.bMaxAcntNum / 2)).ToString(),
                            Utility.UTF8Convert(pvpMapCommonInfo2.szName)
                        });
                    }
                    if (info.stInviteDetail.get_stTeamDetail().bMapType == 3)
                    {
                        text3 = Singleton <CTextManager> .GetInstance().GetText("Invite_Match_Type_1");
                    }
                    else
                    {
                        text3 = Singleton <CTextManager> .GetInstance().GetText((info.stInviteDetail.get_stTeamDetail().bPkAI != 1) ? "Invite_Match_Type_3" : "Invite_Match_Type_2");
                    }
                }
                string text4 = Singleton <CTextManager> .get_instance().GetText("Be_Invited_Tips", new string[]
                {
                    text3,
                    text2
                });

                this.form.m_formWidgets[8].GetComponent <Text>().text = text4;
                uint   dwRelationMask = info.stInviterInfo.dwRelationMask;
                string text5;
                if ((dwRelationMask & 1u) > 0u)
                {
                    text5 = Singleton <CTextManager> .get_instance().GetText("Invite_Src_Type_1");

                    stUIEventParams.tag2 = 0;
                }
                else if ((dwRelationMask & 2u) > 0u)
                {
                    text5 = Singleton <CTextManager> .get_instance().GetText("Invite_Src_Type_4");

                    stUIEventParams.tag2 = 1;
                }
                else if ((dwRelationMask & 4u) > 0u)
                {
                    text5 = Singleton <CTextManager> .get_instance().GetText("Invite_Src_Type_5");

                    stUIEventParams.tag2 = 2;
                    CSDT_LBS_USER_INFO lBSUserInfo = Singleton <CFriendContoller> .get_instance().model.GetLBSUserInfo(info.stInviterInfo.ullUid, info.stInviterInfo.dwLogicWorldID, CFriendModel.LBSGenderType.Both);

                    if (lBSUserInfo != null)
                    {
                        stUIEventParams.tagUInt = lBSUserInfo.dwGameSvrEntity;
                    }
                }
                else
                {
                    text5 = Singleton <CTextManager> .get_instance().GetText("Invite_Src_Type_1");

                    stUIEventParams.tag2 = 3;
                }
                string text6 = string.Format(Singleton <CTextManager> .get_instance().GetText("Be_Invited_FromType"), text5);
                this.form.m_formWidgets[6].GetComponent <Text>().text = text6;
                stUIEventParams.tagStr             = string.Format("<color=#FFFFFF>{0}</color> {1} {2}", text, text4, text6);
                stUIEventParams.commonUInt64Param1 = info.stInviterInfo.ullUid;
                stUIEventParams.taskId             = info.stInviterInfo.dwLogicWorldID;
                stUIEventParams.tag3 = (int)info.bInviteType;
                if (num != 0)
                {
                    Transform transform = this.form.transform.Find("closeTimer");
                    if (transform != null)
                    {
                        this.timerScript = transform.GetComponent <CUITimerScript>();
                        if (this.timerScript != null)
                        {
                            this.timerScript.enabled = true;
                            this.timerScript.SetTotalTime((float)num);
                            this.timerScript.StartTimer();
                            this.timerScript.m_eventIDs[1]    = enUIEventID.Invite_TimeOut;
                            this.timerScript.m_eventParams[1] = stUIEventParams;
                        }
                    }
                }
                this.form.m_formWidgets[0].GetComponent <CUIEventScript>().SetUIEvent(enUIEventType.Click, enUIEventID.Invite_RefuseReason_Send, stUIEventParams);
                this.form.m_formWidgets[1].GetComponent <CUIEventScript>().SetUIEvent(enUIEventType.Click, enUIEventID.Invite_AcceptInvite, stUIEventParams);
                this.form.m_formWidgets[5].GetComponent <Text>().text = text;
                COM_SNSGENDER bGender   = info.stInviterInfo.bGender;
                Image         component = this.form.m_formWidgets[4].GetComponent <Image>();
                component.gameObject.CustomSetActive(bGender != 0);
                if (bGender == 1)
                {
                    CUIUtility.SetImageSprite(component, string.Format("{0}icon/Ico_boy.prefab", "UGUI/Sprite/Dynamic/"), null, true, false, false, false);
                }
                else if (bGender == 2)
                {
                    CUIUtility.SetImageSprite(component, string.Format("{0}icon/Ico_girl.prefab", "UGUI/Sprite/Dynamic/"), null, true, false, false, false);
                }
                CUIHttpImageScript component2 = this.form.m_formWidgets[3].GetComponent <CUIHttpImageScript>();
                component2.SetImageUrl(Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(StringHelper.UTF8BytesToString(ref info.stInviterInfo.szHeadUrl)));
                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(this.form.m_formWidgets[2].GetComponent <Image>(), (int)info.stInviterInfo.dwHeadImgId);

                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBkEffect(this.form.m_formWidgets[2].GetComponent <Image>(), (int)info.stInviterInfo.dwHeadImgId, this.form, 1f);

                this.form.m_formWidgets[7].CustomSetActive(info.stInviterInfo.bGradeOfRank > 0);
                if (info.stInviterInfo.bGradeOfRank > 0)
                {
                    CLadderView.ShowRankDetail(this.form.m_formWidgets[7], info.stInviterInfo.bGradeOfRank, 0u, 1u, false, true, false, true, true);
                }
            }
        }
Example #7
0
 public void OnLadderLevelUpStartOver()
 {
     this.ResetAllXing(0, this._curMaxScore, false);
     CLadderView.ShowRankDetail(this._ladderRoot.transform.FindChild("RankConNow").gameObject, (byte)this._curGrade);
     this.Ladder_PlayLevelUpEnd();
 }
Example #8
0
        public static void InitRewardForm(CUIFormScript form, ref COMDT_RANKDETAIL data)
        {
            GameObject gameObject = form.transform.Find("RankCon").gameObject;

            CLadderView.ShowRankDetail(gameObject, ref data, true);
        }
Example #9
0
        public static void InitLadderEntry(CUIFormScript form, ref COMDT_RANKDETAIL data, bool isQualified)
        {
            Transform transform  = form.transform.Find("MainPanel/BtnGroup/SingleStart");
            Transform transform2 = form.transform.Find("MainPanel/BtnGroup/DoubleStart");
            Transform transform3 = form.transform.Find("MainPanel/BtnGroup/FiveStart");
            Button    button     = null;
            Button    button2    = null;
            Button    button3    = null;

            if (transform)
            {
                button = transform.GetComponent <Button>();
            }
            if (transform2)
            {
                button2 = transform2.GetComponent <Button>();
            }
            if (transform3)
            {
                button3 = transform3.GetComponent <Button>();
            }
            GameObject widget = form.GetWidget(11);

            widget.CustomSetActive(isQualified);
            if (isQualified)
            {
                form.transform.Find("ReqPanel").gameObject.CustomSetActive(false);
                form.transform.Find("MainPanel/ImgLock").gameObject.CustomSetActive(false);
                form.transform.Find("MainPanel/RankCon").gameObject.CustomSetActive(true);
                GameObject gameObject = form.transform.Find("MainPanel/RankCon").gameObject;
                if (data != null)
                {
                    if (button)
                    {
                        CUICommonSystem.SetButtonEnableWithShader(button, data.bState == 1, true);
                    }
                    if (button2)
                    {
                        CUICommonSystem.SetButtonEnableWithShader(button2, data.bState == 1, true);
                        if (CLadderSystem.MultiLadderMaxTeamerNum() == 2)
                        {
                            CUICommonSystem.SetTextContent(transform2.FindChild("Text"), Singleton <CTextManager> .GetInstance().GetText("Ladder_EntryBtn_Text1"));
                        }
                        else
                        {
                            CUICommonSystem.SetTextContent(transform2.FindChild("Text"), Singleton <CTextManager> .GetInstance().GetText("Ladder_EntryBtn_Text2"));
                        }
                    }
                    if (button3)
                    {
                        CUICommonSystem.SetButtonEnableWithShader(button3, data.bState == 1, true);
                    }
                    CLadderView.ShowRankDetail(gameObject, ref data, false);
                    CUIParticleScript component = form.GetWidget(16).GetComponent <CUIParticleScript>();
                    component.LoadRes(CLadderView.GetGradeParticleBgResName());
                }
                else
                {
                    if (button)
                    {
                        CUICommonSystem.SetButtonEnableWithShader(button, false, true);
                    }
                    if (button2)
                    {
                        CUICommonSystem.SetButtonEnableWithShader(button2, false, true);
                    }
                    if (button3)
                    {
                        CUICommonSystem.SetButtonEnableWithShader(button3, false, true);
                    }
                }
            }
            else
            {
                if (button)
                {
                    CUICommonSystem.SetButtonEnableWithShader(button, false, true);
                }
                if (button2)
                {
                    CUICommonSystem.SetButtonEnableWithShader(button2, false, true);
                }
                if (button3)
                {
                    CUICommonSystem.SetButtonEnableWithShader(button3, false, true);
                }
                form.transform.Find("ReqPanel").gameObject.CustomSetActive(true);
                form.transform.Find("MainPanel/ImgLock").gameObject.CustomSetActive(true);
                form.transform.Find("MainPanel/RankCon").gameObject.CustomSetActive(false);
                Text      component2     = form.transform.Find("ReqPanel/txtHeroNum").GetComponent <Text>();
                Text      component3     = form.transform.Find("ReqPanel/txtReqHeroNum").GetComponent <Text>();
                int       num            = 0;
                CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                if (masterRoleInfo != null)
                {
                    num = masterRoleInfo.GetHaveHeroCount(false);
                }
                component2.set_text(string.Format("{0}/{1}", num, CLadderSystem.REQ_HERO_NUM));
                component3.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Ladder_Req_Hero_Num"), CLadderSystem.REQ_HERO_NUM.ToString()));
            }
            CLadderView.ShowBraveScorePanel(form, data, isQualified);
            CLadderView.ShowRewardPanel(form, data);
            CLadderView.ShowBpModePanel(form);
            CLadderView.ShowSuperKingRankPanel(form);
            if (CSysDynamicBlock.bLobbyEntryBlocked)
            {
                form.transform.FindChild("MainPanel/pnlRankingBtn").gameObject.CustomSetActive(false);
            }
        }