Example #1
0
        private void SetPrepareGuildMemListItem(CUIListElementScript listElementScript, GuildMemInfo info)
        {
            Transform          transform = listElementScript.transform;
            CUIHttpImageScript component = transform.Find("imgHead").GetComponent <CUIHttpImageScript>();
            Image component2             = component.transform.Find("NobeIcon").GetComponent <Image>();
            Image component3             = component.transform.Find("NobeImag").GetComponent <Image>();
            Text  component4             = transform.Find("txtName").GetComponent <Text>();
            Text  component5             = transform.Find("txtLevel").GetComponent <Text>();
            Text  component6             = transform.Find("txtBattle").GetComponent <Text>();

            component.SetImageUrl(CGuildHelper.GetHeadUrl(info.stBriefInfo.szHeadUrl));
            MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component2, CGuildHelper.GetNobeLevel(info.stBriefInfo.uulUid, info.stBriefInfo.stVip.level), false);

            MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component3, CGuildHelper.GetNobeHeadIconId(info.stBriefInfo.uulUid, info.stBriefInfo.stVip.headIconId));

            component4.text = info.stBriefInfo.sName;
            component5.text = info.stBriefInfo.dwLevel.ToString();
            component6.text = info.stBriefInfo.dwAbility.ToString();
        }
Example #2
0
        private void On_Guild_Prepare_Guild_Select(CUIEvent uiEvent)
        {
            int selectedIndex = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetSelectedIndex();
            PrepareGuildInfo prepareGuildInfoByIndex = this.m_Model.GetPrepareGuildInfoByIndex(selectedIndex);

            DebugHelper.Assert(prepareGuildInfoByIndex != null);
            if (prepareGuildInfoByIndex == null)
            {
                return;
            }
            CUIHttpImageScript component = this.m_form.GetWidget(35).GetComponent <CUIHttpImageScript>();

            component.SetImageUrl(CGuildHelper.GetHeadUrl(prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.szHeadUrl));
            Image component2 = this.m_form.GetWidget(45).GetComponent <Image>();

            MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component2, CGuildHelper.GetNobeLevel(prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.uulUid, prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.stVip.level), false);

            Image component3 = this.m_form.GetWidget(44).GetComponent <Image>();

            MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component3, CGuildHelper.GetNobeHeadIconId(prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.uulUid, prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.stVip.headIconId));

            Text component4 = this.m_form.GetWidget(14).GetComponent <Text>();

            component4.text = prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.sName;
            Text component5 = this.m_form.GetWidget(15).GetComponent <Text>();

            component5.text = Singleton <CTextManager> .GetInstance().GetText("Common_Level_Format", new string[]
            {
                prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.dwLevel.ToString()
            });

            Text component6 = this.m_form.GetWidget(16).GetComponent <Text>();

            component6.text = prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.dwGameEntity.ToString();
            Text component7 = this.m_form.GetWidget(21).GetComponent <Text>();

            component7.text = prepareGuildInfoByIndex.stBriefInfo.sBulletin;
        }
Example #3
0
        private void On_Guild_Prepare_Guild_Select(CUIEvent uiEvent)
        {
            int selectedIndex = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetSelectedIndex();
            PrepareGuildInfo prepareGuildInfoByIndex = this.m_Model.GetPrepareGuildInfoByIndex(selectedIndex);

            DebugHelper.Assert(prepareGuildInfoByIndex != null);
            if (prepareGuildInfoByIndex != null)
            {
                this.m_form.GetWidget(0x23).GetComponent <CUIHttpImageScript>().SetImageUrl(CGuildHelper.GetHeadUrl(prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.szHeadUrl));
                Image component = this.m_form.GetWidget(0x2d).GetComponent <Image>();
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component, CGuildHelper.GetNobeLevel(prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.uulUid, prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.stVip.level), false);

                Image image = this.m_form.GetWidget(0x2c).GetComponent <Image>();
                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(image, CGuildHelper.GetNobeHeadIconId(prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.uulUid, prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.stVip.headIconId));

                this.m_form.GetWidget(14).GetComponent <Text>().text = prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.sName;
                string[] args = new string[] { prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.dwLevel.ToString() };
                this.m_form.GetWidget(15).GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Common_Level_Format", args);

                this.m_form.GetWidget(0x10).GetComponent <Text>().text = prepareGuildInfoByIndex.stBriefInfo.stCreatePlayer.dwGameEntity.ToString();
                this.m_form.GetWidget(0x15).GetComponent <Text>().text = prepareGuildInfoByIndex.stBriefInfo.sBulletin;
            }
        }
Example #4
0
        private void On_Guild_Guild_Select(CUIEvent uiEvent)
        {
            int       selectedIndex    = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetSelectedIndex();
            GuildInfo guildInfoByIndex = this.m_Model.GetGuildInfoByIndex(selectedIndex);

            if (guildInfoByIndex != null)
            {
                this.m_form.GetWidget(0x22).GetComponent <CUIHttpImageScript>().SetImageUrl(CGuildHelper.GetHeadUrl(guildInfoByIndex.stChairman.stBriefInfo.szHeadUrl));
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(this.m_form.GetWidget(0x29).GetComponent <Image>(), CGuildHelper.GetNobeLevel(guildInfoByIndex.stChairman.stBriefInfo.uulUid, guildInfoByIndex.stChairman.stBriefInfo.stVip.level), false);

                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(this.m_form.GetWidget(40).GetComponent <Image>(), CGuildHelper.GetNobeHeadIconId(guildInfoByIndex.stChairman.stBriefInfo.uulUid, guildInfoByIndex.stChairman.stBriefInfo.stVip.headIconId));

                this.m_form.GetWidget(10).GetComponent <Text>().text = guildInfoByIndex.stBriefInfo.sBulletin;
                this.m_form.GetWidget(11).GetComponent <Text>().text = guildInfoByIndex.stChairman.stBriefInfo.sName;
                string[] args = new string[] { guildInfoByIndex.stChairman.stBriefInfo.dwLevel.ToString() };
                this.m_form.GetWidget(0x27).GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Common_Level_Format", args);
            }
        }
Example #5
0
        private void RefreshPrepareGuildPanelMemberList()
        {
            GameObject widget  = this.m_form.GetWidget(12);
            GameObject widget2 = this.m_form.GetWidget(13);
            GameObject widget3 = this.m_form.GetWidget(23);
            GameObject widget4 = this.m_form.GetWidget(25);
            GameObject widget5 = this.m_form.GetWidget(26);
            GameObject widget6 = this.m_form.GetWidget(24);

            widget2.CustomSetActive(true);
            widget3.CustomSetActive(true);
            widget6.CustomSetActive(true);
            widget.CustomSetActive(false);
            widget4.CustomSetActive(false);
            widget5.CustomSetActive(false);
            CUIListScript           component = this.m_form.GetWidget(28).GetComponent <CUIListScript>();
            ListView <GuildMemInfo> memList   = this.m_Model.CurrentPrepareGuildInfo.m_MemList;
            int num = (int)(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.bMemCnt - 1);

            component.SetElementAmount(num);
            if (num > 0)
            {
                component.SelectElement(0, true);
            }
            int num2 = 0;

            for (int i = 0; i < (int)this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.bMemCnt; i++)
            {
                if (memList.get_Item(i).stBriefInfo.uulUid != this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.uulUid)
                {
                    CUIListElementScript elemenet = component.GetElemenet(num2);
                    if (elemenet != null)
                    {
                        this.SetPrepareGuildMemListItem(elemenet, memList.get_Item(i));
                    }
                    num2++;
                }
            }
            CUIHttpImageScript component2 = this.m_form.GetWidget(35).GetComponent <CUIHttpImageScript>();
            Image component3 = this.m_form.GetWidget(45).GetComponent <Image>();
            Image component4 = this.m_form.GetWidget(44).GetComponent <Image>();
            Text  component5 = this.m_form.GetWidget(14).GetComponent <Text>();
            Text  component6 = this.m_form.GetWidget(15).GetComponent <Text>();
            Text  component7 = this.m_form.GetWidget(16).GetComponent <Text>();

            component2.SetImageUrl(CGuildHelper.GetHeadUrl(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.szHeadUrl));
            component5.text = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.sName;
            component6.text = Singleton <CTextManager> .GetInstance().GetText("Common_Level_Format", new string[]
            {
                this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.dwLevel.ToString()
            });

            component7.text = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.dwAbility.ToString();
            MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component3, CGuildHelper.GetNobeLevel(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.uulUid, this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.stVip.level), false);

            MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component4, CGuildHelper.GetNobeHeadIconId(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.uulUid, this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.stVip.headIconId));

            Text  component8  = this.m_form.GetWidget(18).GetComponent <Text>();
            Text  component9  = this.m_form.GetWidget(19).GetComponent <Text>();
            Image component10 = this.m_form.GetWidget(17).GetComponent <Image>();
            uint  num3        = GameDataMgr.guildMiscDatabin.GetDataByKey(1u).dwConfValue;

            num3 = ((num3 >= 0u) ? num3 : 0u);
            CUITimerScript component11 = this.m_form.GetWidget(20).GetComponent <CUITimerScript>();
            uint           num4        = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.dwRequestTime + GameDataMgr.guildMiscDatabin.GetDataByKey(2u).dwConfValue;
            int            num5        = (int)((ulong)num4 - (ulong)((long)CRoleInfo.GetCurrentUTCTime()));

            if (num5 < 0)
            {
                num5 = 0;
            }
            TimeSpan timeSpan = new TimeSpan(0, 0, 0, num5);

            component11.SetTotalTime((float)timeSpan.get_TotalSeconds());
            component11.StartTimer();
            component8.text = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.sName;
            string prefabPath = CUIUtility.s_Sprite_Dynamic_GuildHead_Dir + this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.dwHeadId;

            component10.SetSprite(prefabPath, this.m_form, true, false, false, false);
            component9.text = num.ToString() + "/" + num3.ToString();
        }
Example #6
0
        private void On_Guild_Guild_Select(CUIEvent uiEvent)
        {
            int       selectedIndex    = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetSelectedIndex();
            GuildInfo guildInfoByIndex = this.m_Model.GetGuildInfoByIndex(selectedIndex);

            if (guildInfoByIndex != null)
            {
                CUIHttpImageScript component = this.m_form.GetWidget(34).GetComponent <CUIHttpImageScript>();
                component.SetImageUrl(CGuildHelper.GetHeadUrl(guildInfoByIndex.chairman.stBriefInfo.szHeadUrl));
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(this.m_form.GetWidget(41).GetComponent <Image>(), CGuildHelper.GetNobeLevel(guildInfoByIndex.chairman.stBriefInfo.uulUid, guildInfoByIndex.chairman.stBriefInfo.stVip.level), false);

                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(this.m_form.GetWidget(40).GetComponent <Image>(), CGuildHelper.GetNobeHeadIconId(guildInfoByIndex.chairman.stBriefInfo.uulUid, guildInfoByIndex.chairman.stBriefInfo.stVip.headIconId));

                this.m_form.GetWidget(10).GetComponent <Text>().text = guildInfoByIndex.briefInfo.sBulletin;
                this.m_form.GetWidget(11).GetComponent <Text>().text = guildInfoByIndex.chairman.stBriefInfo.sName;
                this.m_form.GetWidget(39).GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Common_Level_Format", new string[]
                {
                    guildInfoByIndex.chairman.stBriefInfo.dwLevel.ToString()
                });

                Image component2 = this.m_form.GetWidget(46).GetComponent <Image>();
                Text  component3 = this.m_form.GetWidget(47).GetComponent <Text>();
                Text  component4 = this.m_form.GetWidget(48).GetComponent <Text>();
                component2.SetSprite(CGuildHelper.GetGradeIconPathByRankpointScore(guildInfoByIndex.RankInfo.totalRankPoint), this.m_form, true, false, false, false);
                component3.text = CGuildHelper.GetGradeName(guildInfoByIndex.RankInfo.totalRankPoint);
                component4.text = Singleton <CTextManager> .GetInstance().GetText("Guild_Profit_Desc", new string[]
                {
                    CGuildHelper.GetCoinProfitPercentage((int)guildInfoByIndex.briefInfo.bLevel).ToString()
                });
            }
        }