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
wind2009
ygopro
Commits
3c6de956
Commit
3c6de956
authored
Dec 18, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update message handler
parent
86825b0a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
12 deletions
+12
-12
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+2
-2
gframe/replay_mode.h
gframe/replay_mode.h
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+2
-2
gframe/single_duel.h
gframe/single_duel.h
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+2
-2
gframe/single_mode.h
gframe/single_mode.h
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+2
-2
gframe/tag_duel.h
gframe/tag_duel.h
+1
-1
No files found.
gframe/replay_mode.cpp
View file @
3c6de956
...
...
@@ -64,7 +64,7 @@ int ReplayMode::ReplayThread() {
mainGame
->
dInfo
.
tag_player
[
1
]
=
false
;
set_script_reader
(
DataManager
::
ScriptReaderEx
);
set_card_reader
(
DataManager
::
CardReader
);
set_message_handler
(
(
message_handler
)
MessageHandler
);
set_message_handler
(
ReplayMode
::
MessageHandler
);
if
(
!
StartDuel
())
{
EndDuel
();
return
0
;
...
...
@@ -929,7 +929,7 @@ void ReplayMode::ReplayReload() {
ReloadLocation
(
0
,
LOCATION_REMOVED
,
flag
,
queryBuffer
);
ReloadLocation
(
1
,
LOCATION_REMOVED
,
flag
,
queryBuffer
);
}
int
ReplayMode
::
MessageHandler
(
intptr_t
fduel
,
int
type
)
{
uint32
ReplayMode
::
MessageHandler
(
intptr_t
fduel
,
uint32
type
)
{
if
(
!
enable_log
)
return
0
;
char
msgbuf
[
1024
];
...
...
gframe/replay_mode.h
View file @
3c6de956
...
...
@@ -47,7 +47,7 @@ public:
static
void
ReplayRefreshSingle
(
int
player
,
int
location
,
int
sequence
,
int
flag
=
0xf81fff
);
static
void
ReplayReload
();
static
int
MessageHandler
(
intptr_t
fduel
,
int
type
);
static
uint32
MessageHandler
(
intptr_t
fduel
,
uint32
type
);
};
}
...
...
gframe/single_duel.cpp
View file @
3c6de956
...
...
@@ -430,7 +430,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
time_limit
[
1
]
=
host_info
.
time_limit
;
set_script_reader
(
DataManager
::
ScriptReaderEx
);
set_card_reader
(
DataManager
::
CardReader
);
set_message_handler
(
(
message_handler
)
SingleDuel
::
MessageHandler
);
set_message_handler
(
SingleDuel
::
MessageHandler
);
pduel
=
create_duel
(
duel_seed
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
...
...
@@ -1577,7 +1577,7 @@ void SingleDuel::RefreshSingle(int player, int location, int sequence, int flag)
NetServer
::
ReSendToPlayer
(
*
pit
);
}
}
int
SingleDuel
::
MessageHandler
(
intptr_t
fduel
,
int
type
)
{
uint32
SingleDuel
::
MessageHandler
(
intptr_t
fduel
,
uint32
type
)
{
if
(
!
enable_log
)
return
0
;
char
msgbuf
[
1024
];
...
...
gframe/single_duel.h
View file @
3c6de956
...
...
@@ -38,7 +38,7 @@ public:
void
RefreshExtra
(
int
player
,
int
flag
=
0xe81fff
,
int
use_cache
=
1
);
void
RefreshSingle
(
int
player
,
int
location
,
int
sequence
,
int
flag
=
0xf81fff
);
static
int
MessageHandler
(
intptr_t
fduel
,
int
type
);
static
uint32
MessageHandler
(
intptr_t
fduel
,
uint32
type
);
static
void
SingleTimer
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
);
private:
...
...
gframe/single_mode.cpp
View file @
3c6de956
...
...
@@ -38,7 +38,7 @@ int SingleMode::SinglePlayThread() {
mt19937
rnd
((
uint_fast32_t
)
seed
);
set_script_reader
(
DataManager
::
ScriptReaderEx
);
set_card_reader
(
DataManager
::
CardReader
);
set_message_handler
(
(
message_handler
)
MessageHandler
);
set_message_handler
(
SingleMode
::
MessageHandler
);
pduel
=
create_duel
(
rnd
.
rand
());
set_player_info
(
pduel
,
0
,
start_lp
,
start_hand
,
draw_count
);
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
...
...
@@ -830,7 +830,7 @@ void SingleMode::SinglePlayReload() {
ReloadLocation
(
0
,
LOCATION_REMOVED
,
flag
,
queryBuffer
);
ReloadLocation
(
1
,
LOCATION_REMOVED
,
flag
,
queryBuffer
);
}
int
SingleMode
::
MessageHandler
(
intptr_t
fduel
,
int
type
)
{
uint32
SingleMode
::
MessageHandler
(
intptr_t
fduel
,
uint32
type
)
{
if
(
!
enable_log
)
return
0
;
char
msgbuf
[
1024
];
...
...
gframe/single_mode.h
View file @
3c6de956
...
...
@@ -30,7 +30,7 @@ public:
static
void
SinglePlayRefreshSingle
(
int
player
,
int
location
,
int
sequence
,
int
flag
=
0xf81fff
);
static
void
SinglePlayReload
();
static
int
MessageHandler
(
intptr_t
fduel
,
int
type
);
static
uint32
MessageHandler
(
intptr_t
fduel
,
uint32
type
);
protected:
static
Replay
last_replay
;
...
...
gframe/tag_duel.cpp
View file @
3c6de956
...
...
@@ -399,7 +399,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
time_limit
[
1
]
=
host_info
.
time_limit
;
set_script_reader
(
DataManager
::
ScriptReaderEx
);
set_card_reader
(
DataManager
::
CardReader
);
set_message_handler
(
(
message_handler
)
TagDuel
::
MessageHandler
);
set_message_handler
(
TagDuel
::
MessageHandler
);
pduel
=
create_duel
(
duel_seed
);
set_player_info
(
pduel
,
0
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
set_player_info
(
pduel
,
1
,
host_info
.
start_lp
,
host_info
.
start_hand
,
host_info
.
draw_count
);
...
...
@@ -1690,7 +1690,7 @@ void TagDuel::RefreshSingle(int player, int location, int sequence, int flag) {
}
}
}
int
TagDuel
::
MessageHandler
(
intptr_t
fduel
,
int
type
)
{
uint32
TagDuel
::
MessageHandler
(
intptr_t
fduel
,
uint32
type
)
{
if
(
!
enable_log
)
return
0
;
char
msgbuf
[
1024
];
...
...
gframe/tag_duel.h
View file @
3c6de956
...
...
@@ -38,7 +38,7 @@ public:
void
RefreshExtra
(
int
player
,
int
flag
=
0xe81fff
,
int
use_cache
=
1
);
void
RefreshSingle
(
int
player
,
int
location
,
int
sequence
,
int
flag
=
0xf81fff
);
static
int
MessageHandler
(
intptr_t
fduel
,
int
type
);
static
uint32
MessageHandler
(
intptr_t
fduel
,
uint32
type
);
static
void
TagTimer
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
);
private:
...
...
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