private void SetData(Vector3 position) { transform.localPosition = position; _TitleLabel.text = string.Empty; for (int i = 0; i < _GuildGoddnessBuffLabelList.Count; ++i) { _GuildGoddnessBuffLabelList[i].text = string.Empty; } DATA_GUILD_TRIBUTE._enTributeEnum GuildBuffKind = UserInfo.Instance.GuildBuffKind; DATA_GUILD_TRIBUTE GuildTributeData = CDATA_GUILD_TRIBUTE.Get(GuildBuffKind); if (GuildTributeData == null) { return; // error } int iGuildLevel = 0; int iCount = CDATA_GUILD_MAIN.GetCount(); for (int i = 0; i < iCount; ++i) { DATA_GUILD_MAIN GuildMainData = CDATA_GUILD_MAIN.GetByIndex(i); if (GuildMainData == null) { continue; } if (GuildMainData.enTributeFree == GuildBuffKind) { iGuildLevel = GuildMainData.iGuildLv; break; } else if (GuildMainData.enTributeGood == GuildBuffKind) { iGuildLevel = GuildMainData.iGuildLv; break; } else if (GuildMainData.enTributeExtra == GuildBuffKind) { iGuildLevel = GuildMainData.iGuildLv; break; } } _TitleLabel.text = string.Format(StringTableManager.GetData(GuildTributeData.iBuffTitle), iGuildLevel); float Percent = 0.0f; if (GuildTributeData.fbuff_Gold > 0) { Percent = (GuildTributeData.fbuff_Gold * 100); _GuildGoddnessBuffLabelList[_LabelCount].text = string.Format(StringTableManager.GetData(6890), Percent.ToString("F2")); _LabelCount++; } if (GuildTributeData.fbuff_Pexp > 0) { Percent = (GuildTributeData.fbuff_Pexp * 100); _GuildGoddnessBuffLabelList[_LabelCount].text = string.Format(StringTableManager.GetData(6891), Percent.ToString("F2")); _LabelCount++; } if (GuildTributeData.fbuff_Cexp > 0) { Percent = (GuildTributeData.fbuff_Cexp * 100); _GuildGoddnessBuffLabelList[_LabelCount].text = string.Format(StringTableManager.GetData(6892), Percent.ToString("F2")); _LabelCount++; } _BuffDurationLabel = _GuildGoddnessBuffLabelList[_LabelCount]; _BuffDurationLabel.color = new Color(107 / 255, 255 / 255, 218 / 255, 255 / 255); }
//=================================================================================== // // Method // //=================================================================================== public void Init(enGuildInfo_WindowType type, ulong kGuildKey, CGuildMember member) { m_DelegationButtonLabel.text = StringTableManager.GetData(6294); // 6294 길드장 위임 m_AppointButtonLabel.text = StringTableManager.GetData(6298); // 6298 부길드장 임명 m_BgMeSprite.gameObject.SetActive(false); m_CaptainCrown.gameObject.SetActive(false); m_SubCaptainCrown.gameObject.SetActive(false); m_kGuildKey = kGuildKey; m_MemberInfo = member; m_NameLabel.text = m_MemberInfo.kCharName; m_LevelLabel.text = string.Format("{0} {1}", StringTableManager.GetData(12), m_MemberInfo.kCharLevel); // 12번 텍스트 LV DATA_VIP VipData = CDATA_VIP.Get(m_MemberInfo.kCharVIPLevel); if (VipData != null) { m_VipRankSprite.spriteName = VipData.szGradeImg; } m_VipRankLabel.text = string.Format(StringTableManager.GetData(4984), (int)m_MemberInfo.kCharVIPLevel); DATA_CREATURE_NEWVER CreatureData = CDATA_CREATURE_NEWVER.Get(m_MemberInfo.kLeaderCreatureID); if (CreatureData != null) { int iCreatureTID = CDATA_CREATURE_NEWVER.Get(m_MemberInfo.kLeaderCreatureID).m_iCreatureTID; DATA_CREATURE_NEWVER pCreatureData = UtilFunc.GetCreatureDataByTID(iCreatureTID); m_CreatureSprite.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, pCreatureData.m_szIcon); } // 공물형태가 무엇인지? { // 6856 무료 공물 _GoddnessTributeFreeLabel.text = StringTableManager.GetData(6856); _GoddnessTributeFreeObj.SetActive(false); _GoddnessTributeGoodObj.SetActive(false); _GoddnessTributeExtraObj.SetActive(false); _attendanceReward.state = ButtonState.Off; DateTime MemberAttendanceTime = m_MemberInfo.kGuildAttendanceTime.GetDateTime(); if (MemberAttendanceTime.Date >= TimeManager.Instance.GetServerTime().Date&& (m_MemberInfo.kBuffKind != DATA_GUILD_TRIBUTE._enTributeEnum.None && m_MemberInfo.kBuffKind != DATA_GUILD_TRIBUTE._enTributeEnum._enTributeEnum_Max)) { _attendanceReward.state = ButtonState.On; DATA_GUILD_TRIBUTE._enTributeEnum GuildBuffKind = m_MemberInfo.kBuffKind; DATA_GUILD_TRIBUTE GuildTributeData = CDATA_GUILD_TRIBUTE.Get(GuildBuffKind); if (GuildTributeData == null) { return; // error } _attendanceReward.SetOnLabel(string.Format(StringTableManager.GetData(8679), GuildTributeData.iKeyAmount)); int iCount = CDATA_GUILD_MAIN.GetCount(); for (int i = 0; i < iCount; ++i) { DATA_GUILD_MAIN GuildMainData = CDATA_GUILD_MAIN.GetByIndex(i); if (GuildMainData == null) { continue; } if (GuildMainData.enTributeFree == GuildBuffKind) { _GoddnessTributeFreeObj.SetActive(true); break; } else if (GuildMainData.enTributeGood == GuildBuffKind) { _GoddnessTributeGoodObj.SetActive(true); break; } else if (GuildMainData.enTributeExtra == GuildBuffKind) { _GoddnessTributeExtraObj.SetActive(true); break; } } } } if (type == enGuildInfo_WindowType.MyGuild) { _ContributionTitleLabel.gameObject.SetActive(true); _ContributionPointLabel.gameObject.SetActive(true); _attendanceReward.gameObject.SetActive(true); // 6905 기여도 _ContributionTitleLabel.text = StringTableManager.GetData(6905); _ContributionPointLabel.text = m_MemberInfo.kUserTributeExp.ToString(); // 기여도 점수. } else { _ContributionTitleLabel.gameObject.SetActive(false); _ContributionPointLabel.gameObject.SetActive(false); _attendanceReward.gameObject.SetActive(false); } if (m_MemberInfo.kAccessState == _enGuildMemberAccessState.eAccess_Yes) { _MemberLogOffObj.SetActive(false); // 3473 접속중 m_LastConnectLabel.text = string.Format(StringTableManager.GetData(3473)); } else { if (UserInfo.Instance.CharNo == m_MemberInfo.kCharNo) { _MemberLogOffObj.SetActive(false); // 3473 접속중 m_LastConnectLabel.text = string.Format(StringTableManager.GetData(3473)); } else { if (m_kGuildKey == UserInfo.Instance.GuildKey) { // 내가 속한 길드일때만 길드원의 접속여부를 확인한다. _MemberLogOffObj.SetActive(true); } else { _MemberLogOffObj.SetActive(false); } System.TimeSpan timeresult = TimeManager.Instance.GetServerTime() - m_MemberInfo.kLastLogonTime.GetDateTime(); if (timeresult.Days > 0) { // 6589 {0} 일 전. m_LastConnectLabel.text = string.Format(StringTableManager.GetData(6589), timeresult.Days); } else if (timeresult.Hours > 0) { // 6590 {0} 시간 전. m_LastConnectLabel.text = string.Format(StringTableManager.GetData(6590), timeresult.Hours); } else { // 6591 {0} 시간 미만. m_LastConnectLabel.text = string.Format(StringTableManager.GetData(6591), "1"); } } } if (m_MemberInfo.kMemberState == _enGuildMemberState.eGuildMemberState_Captain) { m_CaptainCrown.gameObject.SetActive(true); } else if (m_MemberInfo.kMemberState == _enGuildMemberState.eGuildMemberState_SubCaptain || m_MemberInfo.kMemberState == _enGuildMemberState.eGuildMemberState_AbleSubCaptain) { m_SubCaptainCrown.gameObject.SetActive(true); } bool IsMine = false; // 내 캐릭인지 if (m_MemberInfo.kCharNo == UserInfo.Instance.CharNo) { m_BgMeSprite.gameObject.SetActive(true); IsMine = true; } SetButton(type, m_MemberInfo.kMemberState, IsMine); }