修复没有玩家落座没法结算的问题

This commit is contained in:
DESKTOP-SAJ6RKV\Administrator 2025-05-26 18:17:17 +08:00
parent ab48217f73
commit 6014884981

View File

@ -96,48 +96,55 @@ public class DataGameModelManager : GameBase.Singleton<DataGameModelManager>
}
});
// 新接口额外包装了一层数据
UploadScoreRequest uploadScoreRequest = new UploadScoreRequest();
uploadScoreRequest.roomId = EventConts.RoomData.room_id;
uploadScoreRequest.roundId = RoundId.ToString();
uploadScoreRequest.rankVos = rankInfos;
uploadScoreRequest.anchorUid = EventConts.RoomData.anchor_open_id;
uploadScoreRequest.winSide = "blue";
RoundId++;
Log.Debug($"上传排行榜数据:{rankInfos.ToJson()}");
string m_Json = EventConts.PlatformType == PlatformType.None ? HttpSendHelper.HttpPostRequest(EventConts.UploadScoreTest, uploadScoreRequest.ToJson()) : HttpSendHelper.HttpPostRequest(EventConts.UploadScore, uploadScoreRequest.ToJson());
Log.Debug($"收到排行榜数据:{m_Json}");
PlayRankRootData playRankRootData = JsonHelper.Deserialize<PlayRankRootData>(m_Json);
if (playRankRootData != null && playRankRootData.code == 200)
if (rankInfos.Count <= 0)
{
// // 清理礼物队列
// DataGameManager.Instance.m_VipItemDatas.Clear();
// DataGameManager.Instance.m_GiftItemDatas.Clear();
// 打开结算界面
//object[] objects = new object[2];
//objects[0] = GameRankType.当局排行榜;
//objects[1] = playRankRootData.data;
GameModule.UI.ShowUI<UIGameRankForm>(playRankRootData.data);
List<PlayRankData> data = new List<PlayRankData>();
GameModule.UI.ShowUI<UIGameRankForm>(data);
GameModule.UI.CloseUI<UIGameEndForm>();
}
else
{
UITip.ShowMessageBox("排行榜结算异常,请联系管理员!!Code:" + playRankRootData.code, MessageShowType.TwoButton, () =>
{
// 新接口额外包装了一层数据
UploadScoreRequest uploadScoreRequest = new UploadScoreRequest();
uploadScoreRequest.roomId = EventConts.RoomData.room_id;
uploadScoreRequest.roundId = RoundId.ToString();
uploadScoreRequest.rankVos = rankInfos;
uploadScoreRequest.anchorUid = EventConts.RoomData.anchor_open_id;
uploadScoreRequest.winSide = "blue";
RoundId++;
}, () =>
{
});
Log.Debug($"上传排行榜数据:{rankInfos.ToJson()}");
string m_Json = EventConts.PlatformType == PlatformType.None ? HttpSendHelper.HttpPostRequest(EventConts.UploadScoreTest, uploadScoreRequest.ToJson()) : HttpSendHelper.HttpPostRequest(EventConts.UploadScore, uploadScoreRequest.ToJson());
Log.Debug($"收到排行榜数据:{m_Json}");
PlayRankRootData playRankRootData = JsonHelper.Deserialize<PlayRankRootData>(m_Json);
if (playRankRootData != null && playRankRootData.code == 200)
{
// // 清理礼物队列
// DataGameManager.Instance.m_VipItemDatas.Clear();
// DataGameManager.Instance.m_GiftItemDatas.Clear();
// 打开结算界面
//object[] objects = new object[2];
//objects[0] = GameRankType.当局排行榜;
//objects[1] = playRankRootData.data;
GameModule.UI.ShowUI<UIGameRankForm>(playRankRootData.data);
GameModule.UI.CloseUI<UIGameEndForm>();
}
else
{
UITip.ShowMessageBox("排行榜结算异常,请联系管理员!!Code:" + playRankRootData.code, MessageShowType.TwoButton, () =>
{
}, () =>
{
});
}
}
}