|
@@ -415,5 +415,33 @@ namespace ET
|
|
|
|
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+ public static async ETTask<bool> ReqRandomRoleName()
|
|
|
|
+ {
|
|
|
|
+ A2C_GetLatestNotice response = null;
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ response = (A2C_GetLatestNotice)await GameGlobal.zoneScene.GetComponent<SessionComponent>().AccountSession?.Call(new C2A_GetLatestNotice());
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ Log.Error(e.ToString());
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (response.Error != ErrorCode.ERR_Success)
|
|
|
|
+ {
|
|
|
|
+ Log.Error(response.Error.ToString());
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ NoticeInfo noticeInfo = new NoticeInfo();
|
|
|
|
+ noticeInfo.noticeId = response.NoticeId;
|
|
|
|
+ noticeInfo.title = response.Title;
|
|
|
|
+ noticeInfo.time = response.TimeSec;
|
|
|
|
+ noticeInfo.content = response.Content;
|
|
|
|
+
|
|
|
|
+ NoticeDataManager.Instance.LastNoticeInfo = noticeInfo;
|
|
|
|
+
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|