|
@@ -96,7 +96,7 @@ namespace GFGGame
|
|
|
{
|
|
|
protected override async ETTask Run(Session session, L2C_NoticeJoinLeague message)
|
|
|
{
|
|
|
- if (LeagueDataManager.Instance.Type == 2)
|
|
|
+ if (LeagueDataManager.Instance.Type == LeagueJoinType.UnJoin)
|
|
|
{
|
|
|
bool result = await LeagueSproxy.ReqGetLeagueInfo();
|
|
|
if (result && ViewManager.isViewOpen(typeof(LeagueJoinView).FullName))
|
|
@@ -292,7 +292,8 @@ namespace GFGGame
|
|
|
if (response.Error == ErrorCode.ERR_Success)
|
|
|
{
|
|
|
LeagueDataManager.Instance.Type = response.Type;
|
|
|
- if (response.Type == 1)//1:已经加入军团
|
|
|
+
|
|
|
+ if (LeagueDataManager.Instance.Type == LeagueJoinType.Join)//1:已经加入军团
|
|
|
{
|
|
|
LeagueDataManager.Instance.LeagueData = GetLeagueData(response.LeagueDetailInfo);
|
|
|
int myPos = LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[RoleDataManager.roleId].Pos;
|
|
@@ -302,7 +303,7 @@ namespace GFGGame
|
|
|
ReqLeagueJoinQuitLog().Coroutine();
|
|
|
}
|
|
|
}
|
|
|
- else if (response.Type == 2)//2:未加入军团
|
|
|
+ else if (LeagueDataManager.Instance.Type == LeagueJoinType.UnJoin)//2:未加入军团
|
|
|
{
|
|
|
LeagueDataManager.Instance.ListDatas.Clear();
|
|
|
for (int i = 0; i < response.list.Count; i++)
|
|
@@ -348,6 +349,7 @@ namespace GFGGame
|
|
|
if (response.Error == ErrorCode.ERR_Success)
|
|
|
{
|
|
|
LeagueDataManager.Instance.LeagueData = GetLeagueData(response.LeagueDetailInfo);
|
|
|
+ LeagueDataManager.Instance.Type = LeagueJoinType.Join;
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -584,15 +586,16 @@ namespace GFGGame
|
|
|
return false;
|
|
|
}
|
|
|
//领取联盟福利//LeagueWelfareType
|
|
|
- public static async ETTask<bool> ReqGetLeagueWelfare()
|
|
|
+ public static async ETTask<bool> ReqGetLeagueWelfare(int type)
|
|
|
{
|
|
|
S2C_GetLeagueWelfare response = null;
|
|
|
- response = (S2C_GetLeagueWelfare)await MessageHelper.SendToServer(new C2S_GetLeagueWelfare());
|
|
|
+ response = (S2C_GetLeagueWelfare)await MessageHelper.SendToServer(new C2S_GetLeagueWelfare() { LeagueWelfareType = type });
|
|
|
if (response != null)
|
|
|
{
|
|
|
if (response.Error == ErrorCode.ERR_Success)
|
|
|
{
|
|
|
- // PromptController.Instance.ShowFloatTextPrompt("购买成功");
|
|
|
+ List<ItemData> itemDatas = ItemUtil.CreateItemDataList(response.Bonus);
|
|
|
+ BonusController.TryShowBonusList(itemDatas);
|
|
|
return true;
|
|
|
}
|
|
|
}
|