Commit 92f049a1 authored by mercury233's avatar mercury233

fix possible deck out of sync

parent 7bbc87a9
...@@ -19,24 +19,18 @@ public class Room : WindowServantSP ...@@ -19,24 +19,18 @@ public class Room : WindowServantSP
void onSelected() void onSelected()
{ {
Config.Set("deckInUse", superScrollView.selectedString); if (selftype < realPlayers.Length && realPlayers[selftype] != null && realPlayers[selftype].getIfPreped())
if (selftype < realPlayers.Length)
{
if (realPlayers[selftype] != null)
{
if (realPlayers[selftype].getIfPreped() == true)
{ {
TcpHelper.CtosMessage_HsNotReady(); TcpHelper.CtosMessage_HsNotReady();
TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck("deck/" + Config.Get("deckInUse","wizard") + ".ydk")); TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck("deck/" + superScrollView.selectedString + ".ydk"));
TcpHelper.CtosMessage_HsReady(); TcpHelper.CtosMessage_HsReady();
} }
else
{
Config.Set("deckInUse", superScrollView.selectedString);
} }
} }
}
void printFile() void printFile()
{ {
string deckInUse = Config.Get("deckInUse","wizard"); string deckInUse = Config.Get("deckInUse","wizard");
...@@ -688,6 +682,7 @@ public class Room : WindowServantSP ...@@ -688,6 +682,7 @@ public class Room : WindowServantSP
void realize() void realize()
{ {
Config.Set("deckInUse", superScrollView.selectedString);
string description = ""; string description = "";
if (mode == 0) if (mode == 0)
{ {
......
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