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
YGOPRO-520DIY
ygopro
Commits
bc2323fa
Commit
bc2323fa
authored
Apr 13, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:purerosefallen/ygopro
parents
afca6cd2
9ada2875
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
27 deletions
+36
-27
gframe/duelclient.cpp
gframe/duelclient.cpp
+36
-27
No files found.
gframe/duelclient.cpp
View file @
bc2323fa
...
...
@@ -77,9 +77,6 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
return
true
;
}
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
if
(
auto_watch_mode
)
{
mainGame
->
device
->
closeDevice
();
}
if
(
connect_state
==
0x7
)
return
;
if
(
!
is_closing
)
{
...
...
@@ -2146,12 +2143,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
if
(
code
!=
0
)
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
)
return
true
;
...
...
@@ -2172,8 +2163,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
mainGame
->
WaitFrameSignal
(
5
);
}
return
true
;
...
...
@@ -2190,12 +2190,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
if
(
code
!=
0
)
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
)
return
true
;
...
...
@@ -2215,8 +2209,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
mainGame
->
WaitFrameSignal
(
5
);
}
return
true
;
...
...
@@ -2247,12 +2250,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
if
(
auto_watch_mode
&&
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
gMutex
.
lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
mainGame
->
AddLog
(
textBuffer
,
code
);
...
...
@@ -2267,7 +2264,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
mainGame
->
WaitFrameSignal
(
45
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
mainGame
->
WaitFrameSignal
(
5
);
}
else
{
...
...
@@ -2307,10 +2313,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
aniFrame
=
5
;
}
}
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
if
(
mainGame
->
dInfo
.
isReplay
)
mainGame
->
WaitFrameSignal
(
30
);
else
mainGame
->
WaitFrameSignal
(
90
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
for
(
size_t
i
=
0
;
i
<
field_confirm
.
size
();
++
i
)
{
pcard
=
field_confirm
[
i
];
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
...
...
@@ -3474,12 +3489,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
auto_watch_mode
&&
pc
->
code
>
0
)
{
mainGame
->
showcardcode
=
pc
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
2
;
}
if
(
pc
->
counters
.
count
(
type
))
pc
->
counters
[
type
]
+=
count
;
else
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