Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FF
YGOProUnity_V2
Commits
5165fc04
Commit
5165fc04
authored
Apr 05, 2019
by
nanahira
Committed by
mercury233
Apr 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve reconnecting (#1)
parent
a1cebbd1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+6
-4
Assets/SibylSystem/Room/Room.cs
Assets/SibylSystem/Room/Room.cs
+6
-1
No files found.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
5165fc04
...
@@ -1302,6 +1302,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1302,6 +1302,7 @@ public class Ocgcore : ServantWithCardDescription
logicalClearChain();
logicalClearChain();
surrended = false;
surrended = false;
Program.I().room.duelEnded = false;
Program.I().room.duelEnded = false;
Program.I().room.joinWithReconnect = false;
turns = 0;
turns = 0;
deckReserved = false;
deckReserved = false;
keys.Insert(0, currentMessageIndex);
keys.Insert(0, currentMessageIndex);
...
@@ -1366,7 +1367,7 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -1366,7 +1367,7 @@ public class Ocgcore : ServantWithCardDescription
gameField.currentPhase = GameField.ph.dp;
gameField.currentPhase = GameField.ph.dp;
result = duelResult.disLink;
result = duelResult.disLink;
deckReserved = false;
deckReserved = false;
isFirst
=
true
;
//
isFirst = true;
gameInfo.swaped = false;
gameInfo.swaped = false;
logicalClearChain();
logicalClearChain();
surrended = false;
surrended = false;
...
@@ -8816,8 +8817,9 @@ public class Ocgcore : ServantWithCardDescription
...
@@ -8816,8 +8817,9 @@ public class Ocgcore : ServantWithCardDescription
public Dictionary<int, int> sideReference = new Dictionary<int, int>();
public Dictionary<int, int> sideReference = new Dictionary<int, int>();
void
onDuelResultConfirmed
()
public
void onDuelResultConfirmed()
{
{
Program.I().room.joinWithReconnect = false;
if (Program.I().room.duelEnded == true || surrended || TcpHelper.tcpClient == null || TcpHelper.tcpClient.Connected == false)
if (Program.I().room.duelEnded == true || surrended || TcpHelper.tcpClient == null || TcpHelper.tcpClient.Connected == false)
{
{
...
...
Assets/SibylSystem/Room/Room.cs
View file @
5165fc04
...
@@ -308,6 +308,7 @@ public class Room : WindowServantSP
...
@@ -308,6 +308,7 @@ public class Room : WindowServantSP
Program
.
I
().
ocgcore
.
returnServant
=
Program
.
I
().
selectServer
;
Program
.
I
().
ocgcore
.
returnServant
=
Program
.
I
().
selectServer
;
needSide
=
false
;
needSide
=
false
;
joinWithReconnect
=
true
;
if
(
Program
.
I
().
deckManager
.
isShowed
)
if
(
Program
.
I
().
deckManager
.
isShowed
)
{
{
Program
.
I
().
deckManager
.
hide
();
Program
.
I
().
deckManager
.
hide
();
...
@@ -384,12 +385,16 @@ public class Room : WindowServantSP
...
@@ -384,12 +385,16 @@ public class Room : WindowServantSP
public
bool
needSide
=
false
;
public
bool
needSide
=
false
;
public
bool
joinWithReconnect
=
false
;
public
void
StocMessage_ChangeSide
(
BinaryReader
r
)
public
void
StocMessage_ChangeSide
(
BinaryReader
r
)
{
{
Program
.
I
().
ocgcore
.
surrended
=
false
;
Program
.
I
().
ocgcore
.
surrended
=
false
;
Program
.
I
().
ocgcore
.
returnServant
=
Program
.
I
().
deckManager
;
Program
.
I
().
ocgcore
.
returnServant
=
Program
.
I
().
deckManager
;
needSide
=
true
;
needSide
=
true
;
if
(
Program
.
I
().
ocgcore
.
condition
!=
Ocgcore
.
Condition
.
duel
||
joinWithReconnect
)
{
//Change side when reconnect
Program
.
I
().
ocgcore
.
onDuelResultConfirmed
();
}
}
}
GameObject
handres
=
null
;
GameObject
handres
=
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment