|
@@ -3,6 +3,7 @@ using FairyGUI;
|
|
|
using UI.Friend;
|
|
|
using UI.CommonGame;
|
|
|
using System.Collections;
|
|
|
+using ET;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
@@ -145,6 +146,7 @@ namespace GFGGame
|
|
|
_ui.m_btnSendAll.text = RedDotDataManager.Instance.GetFriendGiftRed() ? "一键领取并赠送" : "一键赠送";
|
|
|
_ui.m_txtPowerCount.SetVar("value", FriendDataManager.Instance.Count.ToString()).FlushVars();
|
|
|
_ui.m_txtPowerCount.SetVar("maxValue", FriendDataManager.Instance.maxGetPowerCount.ToString()).FlushVars();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -155,6 +157,15 @@ namespace GFGGame
|
|
|
|
|
|
UI_ListItem item = UI_ListItem.Proxy(obj);
|
|
|
|
|
|
+ if(friendInfo.roleInfo.offlineTimeSec > 0)
|
|
|
+ {
|
|
|
+ item.m_txtTime.visible = true;
|
|
|
+ item.m_txtTime.text = UpdateFriendOfflineTime(friendInfo.roleInfo.offlineTimeSec);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ item.m_txtTime.visible = false;
|
|
|
+ }
|
|
|
RoleInfoManager.Instance.UpdateHead(item.m_comHead, friendInfo.roleInfo.headId, friendInfo.roleInfo.headBorderId);
|
|
|
item.m_txtName.text = friendInfo.roleInfo.roleName;
|
|
|
item.m_txtLvl.text = friendInfo.roleInfo.roleLv.ToString();
|
|
@@ -201,7 +212,7 @@ namespace GFGGame
|
|
|
{
|
|
|
if (RedDotDataManager.Instance.GetFriendGiftRed() && FriendDataManager.Instance.Count < FriendDataManager.Instance.maxGetPowerCount)
|
|
|
{
|
|
|
- FriendSProxy.ReqTakeGiftFromAllFriend().Coroutine();
|
|
|
+ FriendSProxy.ReqTakeGiftFromAllFriend().Coroutine();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -332,5 +343,27 @@ namespace GFGGame
|
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnSendAll, RedDotDataManager.Instance.GetFriendGiftRed());
|
|
|
// RefreshView();
|
|
|
}
|
|
|
+
|
|
|
+ private string UpdateFriendOfflineTime(long timeMsec)
|
|
|
+ {
|
|
|
+ string timeStr = TimeUtil.FormattingTimeTo_DD_HH_mm(TimeHelper.ClientNow() - timeMsec);
|
|
|
+ string[] timeTipArr = { "天", "小时", "分钟"};
|
|
|
+ string[] timeArr = timeStr.Split(':');
|
|
|
+ for(int i = 0; i < timeArr.Length; i++)
|
|
|
+ {
|
|
|
+ int num = int.Parse(timeArr[i]);
|
|
|
+ if (i == 0 && num > 30)
|
|
|
+ {
|
|
|
+ return "超过30天";
|
|
|
+ }
|
|
|
+ else if (num > 0)
|
|
|
+ {
|
|
|
+
|
|
|
+ return num + timeTipArr[i] + "前";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return "1分钟前";
|
|
|
+ }
|
|
|
}
|
|
|
}
|