Commit bcede354 authored by SherryChaos's avatar SherryChaos

bug fix

parent 16f4a4be
......@@ -6,9 +6,10 @@ MDPro3 v1.3.1更新:
4.*修复非Windows端无法导入、导出文件的错误。
5.修复安卓端和Linux端中,外观设置中CrossDuel的宠物选项不显示的错误。
6.修复游戏启动后不同步在线卡组的错误。
7.修复观战时,若服务器已经断连,保存或放弃当前局录像后会直接退出,无法继续观战下一局的错误。
MDPro3 v1.3.0更新:
0.本次更新跳过了v1.2.9版本,仅提供完整包安装。
0.本次更新跳过了v1.2.8版本,仅提供完整包安装。
1.新增对Linux、macOS的支持。
2.更新先行卡时,自动更新对应系统语言的先行卡。
3.渲染先行卡卡图时,原以卡图设置语言为准,现改为先行卡语言(更新先行卡时的系统语言)为准。
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -24,6 +24,7 @@ using UnityEngine.InputSystem;
using MDPro3.Duel.BG;
using MDPro3.Utility;
using MDPro3.UI.ServantUI;
using System.Net.Sockets;
namespace MDPro3.Servant
{
......@@ -1181,22 +1182,25 @@ namespace MDPro3.Servant
{
RoomServant.JoinWithReconnect = false;
if (Program.instance.room.duelEnded
|| surrendered
|| TcpHelper.tcpClient == null
|| !TcpHelper.tcpClient.Connected)
if(condition != Condition.Watch)
{
surrendered = false;
Program.instance.room.duelEnded = false;
RoomServant.NeedSide = false;
RoomServant.SideWaitingObserver = false;
if (Program.instance.currentSubServant != null)
if (Program.instance.room.duelEnded
|| surrendered
|| TcpHelper.tcpClient == null
|| !TcpHelper.tcpClient.Connected)
{
Program.instance.currentSubServant.Hide(-1);
Program.instance.currentSubServant = null;
surrendered = false;
Program.instance.room.duelEnded = false;
RoomServant.NeedSide = false;
RoomServant.SideWaitingObserver = false;
if (Program.instance.currentSubServant != null)
{
Program.instance.currentSubServant.Hide(-1);
Program.instance.currentSubServant = null;
}
OnExit();
return;
}
OnExit();
return;
}
if (RoomServant.NeedSide)
......@@ -1230,7 +1234,13 @@ namespace MDPro3.Servant
else
{
if (duelEnded)
Hide(0);
{
if (TcpHelper.tcpClient == null
|| !TcpHelper.tcpClient.Connected)
OnExit();
else
Hide(0);
}
else
{
field0.SetActive(false);
......@@ -1249,22 +1259,22 @@ namespace MDPro3.Servant
InterString.Get("是"),
InterString.Get("否")
};
Action yes = () =>
{
surrendered = true;
if (TcpHelper.tcpClient != null && TcpHelper.tcpClient.Connected)
{
TcpHelper.CtosMessage_Surrender();
Program.instance.ExitCurrentServant();
if (RoomServant.Mode == 2 && !tagSurrendered)
MessageManager.Cast(InterString.Get("您发起了投降。"));
}
else
OnExit();
};
UIManager.ShowPopupYesOrNo(selections, yes, null);
UIManager.ShowPopupYesOrNo(selections, ActionSurrender, null);
}
private void ActionSurrender()
{
surrendered = true;
if (TcpHelper.tcpClient != null && TcpHelper.tcpClient.Connected)
{
TcpHelper.CtosMessage_Surrender();
Program.instance.ExitCurrentServant();
if (RoomServant.Mode == 2 && !tagSurrendered)
MessageManager.Cast(InterString.Get("您发起了投降。"));
}
else
OnExit();
}
#endregion
......@@ -1354,11 +1364,11 @@ namespace MDPro3.Servant
[HideInInspector] public int Es_selectMSGHintData;
[HideInInspector] public int Es_selectMSGHintPlayer;
[HideInInspector] public int Es_selectMSGHintType;
[HideInInspector] public List<int> ES_searchCodes = new List<int>();
[HideInInspector] public string ES_selectUnselectHint = "";
[HideInInspector] public List<int> ES_searchCodes = new();
[HideInInspector] public string ES_selectUnselectHint = string.Empty;
[HideInInspector] public bool ES_selectCardFromFieldFirstFlag = false;
[HideInInspector] public int ES_sortSum;
[HideInInspector] public string ES_turnString = "";
[HideInInspector] public string ES_turnString = string.Empty;
[HideInInspector] public bool duelEnded;
//For single duel end
......
......@@ -697,3 +697,5 @@ YDK 内容不合法,主卡组必须满 40 张->YDK 内容不合法,主卡组
通常陷阱->通常陷阱
永续陷阱->永续陷阱
反击陷阱->反击陷阱
下载自定义卡包->下载自定义卡包
输入自定义卡包下载地址即可自动下载并部署->输入自定义卡包下载地址即可自动下载并部署
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment