Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
427d77f0
Commit
427d77f0
authored
Mar 24, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:purerosefallen/ygopro
parents
e60a7271
8049c367
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
gframe/duelclient.cpp
gframe/duelclient.cpp
+22
-5
No files found.
gframe/duelclient.cpp
View file @
427d77f0
...
@@ -77,6 +77,9 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
...
@@ -77,6 +77,9 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
return
true
;
return
true
;
}
}
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
if
(
auto_watch_mode
)
{
mainGame
->
device
->
closeDevice
();
}
if
(
connect_state
==
0x7
)
if
(
connect_state
==
0x7
)
return
;
return
;
if
(
!
is_closing
)
{
if
(
!
is_closing
)
{
...
@@ -2143,6 +2146,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2143,6 +2146,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
if
(
code
!=
0
)
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
}
}
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
return
true
;
...
@@ -2181,6 +2190,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2181,6 +2190,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
if
(
code
!=
0
)
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
}
}
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
return
true
;
...
@@ -2232,6 +2247,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2232,6 +2247,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
code
!=
0
)
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
mainGame
->
AddLog
(
textBuffer
,
code
);
mainGame
->
AddLog
(
textBuffer
,
code
);
...
@@ -3454,14 +3475,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3454,14 +3475,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
auto_watch_mode
&&
pc
->
code
>
0
)
{
if
(
auto_watch_mode
&&
pc
->
code
>
0
)
{
myswprintf(event_string, dataManager.GetSysString(1610), dataManager.GetName(pc->code));
mainGame
->
showcardcode
=
pc
->
code
;
mainGame
->
showcardcode
=
pc
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcardp
=
0
;
mainGame->showcard = 5;
mainGame
->
showcard
=
2
;
mainGame->WaitFrameSignal(30);
mainGame->showcard = 0;
mainGame->WaitFrameSignal(11);
}
}
if
(
pc
->
counters
.
count
(
type
))
if
(
pc
->
counters
.
count
(
type
))
pc
->
counters
[
type
]
+=
count
;
pc
->
counters
[
type
]
+=
count
;
...
...
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