Esempio n. 1
0
        private void On_Guild_Recruit_Apply_Join(CUIEvent uiEvent)
        {
            ulong            commonUInt64Param = uiEvent.m_eventParams.commonUInt64Param1;
            stGuildBriefInfo stBriefInfo       = this.m_Model.GetAppliedGuildInfoByUid(commonUInt64Param).stBriefInfo;

            if (stBriefInfo.uulUid != 0uL)
            {
                Singleton <CUIManager> .GetInstance().OpenTips("Guild_Current_Guild_Has_Invited_Tip", true, 1.5f, null, new object[0]);

                return;
            }
            if (CGuildHelper.IsInLastQuitGuildCd())
            {
                return;
            }
            if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_extGuildInfo.bApplyJoinGuildNum > 0)
            {
                uint dwConfValue = GameDataMgr.guildMiscDatabin.GetDataByKey(8u).dwConfValue;
                if ((long)(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_extGuildInfo.bApplyJoinGuildNum + 1) > (long)((ulong)dwConfValue))
                {
                    Singleton <CUIManager> .GetInstance().OpenTips("Guild_Today_Apply_Reach_Limit_Tip", true, 1.5f, null, new object[0]);

                    return;
                }
            }
            Singleton <CGuildListController> .GetInstance().RequestApplyJoinGuild(commonUInt64Param, true);
        }
Esempio n. 2
0
        private void SetGuildListItem(CUIListElementScript listElementScript, GuildInfo info)
        {
            Transform  transform  = listElementScript.transform;
            Image      component  = transform.Find("imgIcon").GetComponent <Image>();
            Text       component2 = transform.Find("txtName").GetComponent <Text>();
            Text       component3 = transform.Find("txtMemCnt").GetComponent <Text>();
            GameObject gameObject = transform.Find("imgApplied").gameObject;
            Text       component4 = transform.Find("txtChairmanName").GetComponent <Text>();
            Text       component5 = transform.Find("txtSeasonRankpoint").GetComponent <Text>();
            Text       component6 = transform.Find("txtJoinLimit").GetComponent <Text>();
            string     prefabPath = CUIUtility.s_Sprite_Dynamic_GuildHead_Dir + info.briefInfo.dwHeadId;

            component.SetSprite(prefabPath, this.m_form, true, false, false, false);
            component2.text = info.briefInfo.sName;
            component3.text = info.briefInfo.bMemberNum + "/" + CGuildHelper.GetMaxGuildMemberCountByLevel((int)info.briefInfo.bLevel);
            component4.text = info.chairman.stBriefInfo.sName;
            component5.text = info.chairman.RankInfo.totalRankPoint.ToString();
            component6.text = CGuildHelper.GetGuildJoinLimitText((int)info.briefInfo.LevelLimit, (int)info.briefInfo.GradeLimit, info.briefInfo.dwSettingMask);
            stGuildBriefInfo stBriefInfo = this.m_Model.GetAppliedGuildInfoByUid(info.briefInfo.uulUid).stBriefInfo;

            if (stBriefInfo.uulUid != 0uL)
            {
                gameObject.CustomSetActive(true);
            }
            else
            {
                gameObject.CustomSetActive(false);
            }
        }
 public GuildInfo()
 {
     this.chairman          = new GuildMemInfo();
     this.briefInfo         = default(stGuildBriefInfo);
     this.listMemInfo       = new ListView <GuildMemInfo>();
     this.RankInfo          = new GuildRankInfo();
     this.GuildMatchInfo    = new COMDT_GUILD_MATCH_INFO();
     this.GuildMatchObInfos = new ListView <COMDT_GUILD_MATCH_OB_INFO>();
 }
Esempio n. 4
0
        private void On_Guild_Guild_Join(CUIEvent uiEvent)
        {
            int       selectedIndex    = this.m_form.GetWidget(30).GetComponent <CUIListScript>().GetSelectedIndex();
            GuildInfo guildInfoByIndex = this.m_Model.GetGuildInfoByIndex(selectedIndex);

            if (guildInfoByIndex == null)
            {
                return;
            }
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            stGuildBriefInfo stBriefInfo = this.m_Model.GetAppliedGuildInfoByUid(guildInfoByIndex.briefInfo.uulUid).stBriefInfo;

            if (stBriefInfo.uulUid != 0uL)
            {
                Singleton <CUIManager> .GetInstance().OpenTips("Guild_Current_Guild_Has_Invited_Tip", true, 1.5f, null, new object[0]);

                return;
            }
            if (CGuildHelper.IsInLastQuitGuildCd())
            {
                return;
            }
            if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_extGuildInfo.bApplyJoinGuildNum > 0)
            {
                uint dwConfValue = GameDataMgr.guildMiscDatabin.GetDataByKey(8u).dwConfValue;
                if ((long)(Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().m_extGuildInfo.bApplyJoinGuildNum + 1) > (long)((ulong)dwConfValue))
                {
                    Singleton <CUIManager> .GetInstance().OpenTips("Guild_Today_Apply_Reach_Limit_Tip", true, 1.5f, null, new object[0]);

                    return;
                }
            }
            if (this.m_Model.IsInGuildStep())
            {
                Singleton <CUIManager> .GetInstance().OpenTips("Guild_In_Guild_Step_Tip", true, 1.5f, null, new object[0]);

                return;
            }
            Singleton <EventRouter> .GetInstance().BroadCastEvent <GuildInfo>("Request_Apply_Guild_Join", guildInfoByIndex);
        }