Commit 378ec399 authored by nanahira's avatar nanahira

update side detect

parent 27edbc11
......@@ -1302,6 +1302,7 @@ public class Ocgcore : ServantWithCardDescription
logicalClearChain();
surrended = false;
Program.I().room.duelEnded = false;
Program.I().room.joinWithReconnect = false;
turns = 0;
deckReserved = false;
keys.Insert(0, currentMessageIndex);
......@@ -3441,10 +3442,10 @@ public class Ocgcore : ServantWithCardDescription
if (finishable)
{
gameInfo.addHashedButton("sendSelected", 0, superButtonType.yes, InterString.Get("完成选择@ui"));
}
}
realizeCardsForSelect();
cardsSelected.Clear();
if (ES_selectHint != "")
if (ES_selectHint != "")
ES_selectUnselectHint = ES_selectHint;
if (ES_selectUnselectHint != "")
{
......@@ -8818,6 +8819,7 @@ public class Ocgcore : ServantWithCardDescription
public void onDuelResultConfirmed()
{
Program.I().room.joinWithReconnect = false;
if (Program.I().room.duelEnded == true || surrended || TcpHelper.tcpClient == null || TcpHelper.tcpClient.Connected == false)
{
......
......@@ -308,6 +308,7 @@ public class Room : WindowServantSP
Program.I().ocgcore.returnServant = Program.I().selectServer;
needSide = false;
joinWithReconnect = true;
if (Program.I().deckManager.isShowed)
{
Program.I().deckManager.hide();
......@@ -381,12 +382,14 @@ public class Room : WindowServantSP
public bool needSide = false;
public bool joinWithReconnect = false;
public void StocMessage_ChangeSide(BinaryReader r)
{
Program.I().ocgcore.surrended = false;
Program.I().ocgcore.returnServant = Program.I().deckManager;
needSide = true;
if(Program.I().ocgcore.condition != Ocgcore.Condition.duel) { //Change side when reconnect
if(joinWithReconnect) { //Change side when reconnect
Program.I().ocgcore.onDuelResultConfirmed();
}
}
......
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