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
1
Merge Requests
1
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
nanahira
ygopro
Commits
18a801c0
Commit
18a801c0
authored
Jan 12, 2025
by
Chen Bill
Committed by
GitHub
Jan 12, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update DuelClient::ClientAnalyze (#2645)
* update ClientAnalyze * move STOC_GAME_MSG header to network.h
parent
bb6ef1e1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/duelclient.h
gframe/duelclient.h
+2
-2
gframe/game.h
gframe/game.h
+0
-13
gframe/network.h
gframe/network.h
+13
-0
No files found.
gframe/duelclient.cpp
View file @
18a801c0
...
@@ -26,7 +26,7 @@ bool DuelClient::is_swapping = false;
...
@@ -26,7 +26,7 @@ bool DuelClient::is_swapping = false;
int
DuelClient
::
select_hint
=
0
;
int
DuelClient
::
select_hint
=
0
;
int
DuelClient
::
select_unselect_hint
=
0
;
int
DuelClient
::
select_unselect_hint
=
0
;
int
DuelClient
::
last_select_hint
=
0
;
int
DuelClient
::
last_select_hint
=
0
;
unsigned
char
DuelClient
::
last_successful_msg
[
0x2000
];
unsigned
char
DuelClient
::
last_successful_msg
[
SIZE_NETWORK_BUFFER
];
size_t
DuelClient
::
last_successful_msg_length
=
0
;
size_t
DuelClient
::
last_successful_msg_length
=
0
;
wchar_t
DuelClient
::
event_string
[
256
];
wchar_t
DuelClient
::
event_string
[
256
];
mt19937
DuelClient
::
rnd
;
mt19937
DuelClient
::
rnd
;
...
@@ -936,7 +936,7 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) {
...
@@ -936,7 +936,7 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, int len) {
}
}
}
}
// Analyze STOC_GAME_MSG packet
// Analyze STOC_GAME_MSG packet
int
DuelClient
::
ClientAnalyze
(
unsigned
char
*
msg
,
unsigned
int
len
)
{
bool
DuelClient
::
ClientAnalyze
(
unsigned
char
*
msg
,
int
len
)
{
unsigned
char
*
pbuf
=
msg
;
unsigned
char
*
pbuf
=
msg
;
wchar_t
textBuffer
[
256
];
wchar_t
textBuffer
[
256
];
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
...
...
gframe/duelclient.h
View file @
18a801c0
...
@@ -23,7 +23,7 @@ private:
...
@@ -23,7 +23,7 @@ private:
static
int
select_hint
;
static
int
select_hint
;
static
int
select_unselect_hint
;
static
int
select_unselect_hint
;
static
int
last_select_hint
;
static
int
last_select_hint
;
static
unsigned
char
last_successful_msg
[
0x2000
];
static
unsigned
char
last_successful_msg
[
SIZE_NETWORK_BUFFER
];
static
size_t
last_successful_msg_length
;
static
size_t
last_successful_msg_length
;
static
wchar_t
event_string
[
256
];
static
wchar_t
event_string
[
256
];
static
mt19937
rnd
;
static
mt19937
rnd
;
...
@@ -41,7 +41,7 @@ public:
...
@@ -41,7 +41,7 @@ public:
static
void
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
);
static
void
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
);
static
int
ClientThread
();
static
int
ClientThread
();
static
void
HandleSTOCPacketLan
(
unsigned
char
*
data
,
int
len
);
static
void
HandleSTOCPacketLan
(
unsigned
char
*
data
,
int
len
);
static
int
ClientAnalyze
(
unsigned
char
*
msg
,
unsigned
int
len
);
static
bool
ClientAnalyze
(
unsigned
char
*
msg
,
int
len
);
static
void
SwapField
();
static
void
SwapField
();
static
void
SetResponseI
(
int32_t
respI
);
static
void
SetResponseI
(
int32_t
respI
);
static
void
SetResponseB
(
void
*
respB
,
size_t
len
);
static
void
SetResponseB
(
void
*
respB
,
size_t
len
);
...
...
gframe/game.h
View file @
18a801c0
...
@@ -831,19 +831,6 @@ extern Game* mainGame;
...
@@ -831,19 +831,6 @@ extern Game* mainGame;
#define BUTTON_BIG_CARD_ZOOM_OUT 382
#define BUTTON_BIG_CARD_ZOOM_OUT 382
#define BUTTON_BIG_CARD_ORIG_SIZE 383
#define BUTTON_BIG_CARD_ORIG_SIZE 383
//STOC_GAME_MSG messages
#define MSG_WAITING 3
#define MSG_START 4
#define MSG_UPDATE_DATA 6 // flag=0: clear
#define MSG_UPDATE_CARD 7 // flag=QUERY_CODE, code=0: clear
#define MSG_REQUEST_DECK 8
#define MSG_REFRESH_DECK 34
#define MSG_CARD_SELECTED 80
#define MSG_UNEQUIP 95
#define MSG_BE_CHAIN_TARGET 121
#define MSG_CREATE_RELATION 122
#define MSG_RELEASE_RELATION 123
#define AVAIL_OCG 0x1
#define AVAIL_OCG 0x1
#define AVAIL_TCG 0x2
#define AVAIL_TCG 0x2
#define AVAIL_CUSTOM 0x4
#define AVAIL_CUSTOM 0x4
...
...
gframe/network.h
View file @
18a801c0
...
@@ -301,6 +301,19 @@ public:
...
@@ -301,6 +301,19 @@ public:
#define STOC_TEAMMATE_SURRENDER 0x23 // no data
#define STOC_TEAMMATE_SURRENDER 0x23 // no data
#define STOC_FIELD_FINISH 0x30
#define STOC_FIELD_FINISH 0x30
// STOC_GAME_MSG header
#define MSG_WAITING 3
#define MSG_START 4
#define MSG_UPDATE_DATA 6 // flag=0: clear
#define MSG_UPDATE_CARD 7 // flag=QUERY_CODE, code=0: clear
#define MSG_REQUEST_DECK 8
#define MSG_REFRESH_DECK 34
#define MSG_CARD_SELECTED 80
#define MSG_UNEQUIP 95
#define MSG_BE_CHAIN_TARGET 121
#define MSG_CREATE_RELATION 122
#define MSG_RELEASE_RELATION 123
#define PLAYERCHANGE_OBSERVE 0x8
#define PLAYERCHANGE_OBSERVE 0x8
#define PLAYERCHANGE_READY 0x9
#define PLAYERCHANGE_READY 0x9
#define PLAYERCHANGE_NOTREADY 0xa
#define PLAYERCHANGE_NOTREADY 0xa
...
...
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