[SerializeField] private UISprite _MeSprite; // 내 케릭터다. //=================================================================================== // // Variable // //=================================================================================== //=================================================================================== // // Default Method // //=================================================================================== //=================================================================================== // // Method // //=================================================================================== public void Init(CGuildRaidUserRankInfo info) { if (CDATA_CREATURE_NEWVER.GetCount() < 1) { CDATA_CREATURE_NEWVER.Load(); } if (CDATA_VIP.GetCount() < 1) { CDATA_VIP.Load(); } _RankLabel.text = string.Format(StringTableManager.GetData(3412), info.kUserRank); DATA_CREATURE_NEWVER CreatureTable = CDATA_CREATURE_NEWVER.Get(info.kCreatureID); _LeaderCreatureSprite.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, CreatureTable.m_szIcon); _VipRankSprite.spriteName = CDATA_VIP.Get(info.kCharVIPLevel).szGradeImg; _VipRankLabel.text = string.Format(StringTableManager.GetData(4984), (int)info.kCharVIPLevel); _LevelLabel.text = string.Format("{0}{1}", StringTableManager.GetData(12), (int)info.kCharLevel); _NameLabel.text = info.kCharName; _EnterCountLabel.text = info.kGuildRaidPlayCount.ToString(); _guildRaidScore.text = info.kGuildRaidScore.ToString(); _MeSprite.gameObject.SetActive(string.Equals(info.kCharName, UserInfo.Instance.NickName)); }
/// <summary> /// 유저정보 셋팅. /// </summary> private void SetOtherUserInfo(_stCharSimpleInfo kCharSimpleInfo) { m_UserNameLbl.text = kCharSimpleInfo.kDestCharName; m_LevLbl.text = string.Format("{0} {1}", StringTableManager.GetData(12), kCharSimpleInfo.kDestCharLevel); float fResult = UtilFunc.GetUserExpPercent(kCharSimpleInfo.kDestCharExp, kCharSimpleInfo.kDestCharExp); m_ExpImg.fillAmount = fResult; m_ExpPercentLbl.text = string.Format("{0:F2} {1}", (fResult * 100), "%"); // 대표 크리쳐 셋팅. string cretureName = CDATA_CREATURE_NEWVER.Get(kCharSimpleInfo.kDestCharLearderCreatureID).m_szIcon; m_MainCharImg.sprite2D = UIResourceMgr.CreateSprite(BUNDLELIST.TEXTURE_ICON_CREATUREHEAD, cretureName); #if VIP_SYSTEM DATA_VIP datavip = CDATA_VIP.Get(kCharSimpleInfo.kDestCharVIPLevel); if (datavip != null) { m_SprVipGrade.spriteName = datavip.szGradeImg; m_LabelVipGrade.text = string.Format(StringTableManager.GetData(4984), (int)kCharSimpleInfo.kDestCharVIPLevel); } #endif }
//=================================================================================== // // 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); }
//=================================================================================== // // Default Method // //=================================================================================== //=================================================================================== // // Method // //=================================================================================== public void Init(CFriend friendInfo, DATA_CREATURE_NEWVER pCreatureData) { m_FriendInfo = friendInfo; _vCharNo UsedFriendKeyList = UserInfo.Instance.DispatchInfoAck.vUsedFriendKey; bDispatching = false; m_CoolTimeObj.SetActive(false); for (int i = 0; i < UsedFriendKeyList.Count; ++i) { if (friendInfo.kFriendCharNo == UsedFriendKeyList[i]) { // 쿨타임 표시. bDispatching = true; m_CoolTimeObj.SetActive(true); break; } } m_CreatureIcon.SetIcon(friendInfo.kCreatureID, enCreatureIcon_Type.Dispatch); //m_CreatureIcon.m_OnClickEvent += evt; m_CreatureIcon.m_IsNew = false; //icon.m_kCreatureKey = kCreatureKey; m_CreatureIcon.m_iGrade = pCreatureData.m_iGrade; m_CreatureIcon.m_szName = StringTableManager.GetData(pCreatureData.iCreatureName); //icon.m_Reinforce = pMy.GetForceCount(); m_CreatureIcon.m_iCreatureTID = pCreatureData.m_iCreatureTID; m_CreatureIcon.m_szIcon = pCreatureData.m_szIcon; //icon.m_iLevel = pMy.GetItemLV(); m_CreatureIcon.m_enCreatureArmy = pCreatureData.m_enCreatureArmy; //병과 m_CreatureIcon.m_SellCheck = false; m_CreatureIcon.m_iSellCost = pCreatureData.m_iSellCost; m_CreatureIcon.m_kLock = 0; // vip정보 셋팅. { if (CDATA_VIP.GetCount() < 1) { CDATA_VIP.Load(); } DATA_VIP vipData = CDATA_VIP.Get(friendInfo.kVIPLevel); if (vipData == null) { return; } m_VipSprite.spriteName = vipData.szGradeImg; m_VipLabel.text = string.Format(StringTableManager.GetData(4984), (int)friendInfo.kVIPLevel); } // 친구 레벨, 아이디 셋팅. { m_UserLevelLabel.text = string.Format("{0}{1}", StringTableManager.GetData(12), friendInfo.kCharLevel); m_UserNameLabel.text = friendInfo.kCharName; } // 접속시간 셋팅. { if (friendInfo.kFriendState == _enFriendState.eFriendState_OnLine) { m_LastLoginTimeLabel.text = StringTableManager.GetData(3473); } else if (friendInfo.kFriendState == _enFriendState.eFriendState_OffLine) { TimeSpan ts = TimeManager.Instance.GetServerTime() - friendInfo.kGameLastLogonTime.GetDateTime(); int iDay = ts.Days; int iHour = ts.Hours; int iMin = ts.Minutes; if (iDay > 0) { m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iDay, StringTableManager.GetData(3472), StringTableManager.GetData(3483)); } else if (iHour > 0) { m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iHour, StringTableManager.GetData(3471), StringTableManager.GetData(3483)); } else if (iMin > 0) { m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iMin, StringTableManager.GetData(3482), StringTableManager.GetData(3483)); } else { // 1분전접속. m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), 1, StringTableManager.GetData(3482), StringTableManager.GetData(3483)); } } //TimeSpan ts = TimeManager.Instance.GetServerTime() - friendInfo.kGameLastLogonTime.GetDateTime(); //int iDay = ts.Days; //int iHour = ts.Hours; //int iMin = ts.Minutes; //if (iDay > 0) // m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iDay, StringTableManager.GetData(3472), StringTableManager.GetData(3483)); //else if (iHour > 0) // m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iHour, StringTableManager.GetData(3471), StringTableManager.GetData(3483)); //else if (iMin > 0) // m_LastLoginTimeLabel.text = string.Format(StringTableManager.GetData(3470), iMin, StringTableManager.GetData(3482), StringTableManager.GetData(3483)); //else //{ // m_LastLoginTimeLabel.text = StringTableManager.GetData(3473); //} } SetActiveSelect(false); }