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
dd22c41c
Commit
dd22c41c
authored
Jun 20, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-select-chain-forced' of
https://github.com/mercury233/ygopro
into pre-20250620
parents
37915065
89e31c6a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
17 deletions
+27
-17
gframe/duelclient.cpp
gframe/duelclient.cpp
+20
-10
gframe/event_handler.cpp
gframe/event_handler.cpp
+3
-3
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
No files found.
gframe/duelclient.cpp
View file @
dd22c41c
...
@@ -1334,7 +1334,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1334,7 +1334,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
}
}
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
if
(
flag
==
EDESC_OPERATION
)
{
if
(
flag
&
EDESC_OPERATION
)
{
pcard
->
chain_code
=
code
;
pcard
->
chain_code
=
code
;
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_act
=
true
;
mainGame
->
dField
.
conti_act
=
true
;
...
@@ -1466,7 +1466,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1466,7 +1466,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
}
}
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
if
(
flag
==
EDESC_OPERATION
)
{
if
(
flag
&
EDESC_OPERATION
)
{
pcard
->
chain_code
=
code
;
pcard
->
chain_code
=
code
;
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_act
=
true
;
mainGame
->
dField
.
conti_act
=
true
;
...
@@ -1714,7 +1714,6 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1714,7 +1714,6 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
/*int selecting_player = */
BufferIO
::
ReadUInt8
(
pbuf
);
/*int selecting_player = */
BufferIO
::
ReadUInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
int
specount
=
BufferIO
::
ReadUInt8
(
pbuf
);
int
specount
=
BufferIO
::
ReadUInt8
(
pbuf
);
int
forced
=
BufferIO
::
ReadUInt8
(
pbuf
);
/*int hint0 = */
BufferIO
::
ReadInt32
(
pbuf
);
/*int hint0 = */
BufferIO
::
ReadInt32
(
pbuf
);
/*int hint1 = */
BufferIO
::
ReadInt32
(
pbuf
);
/*int hint1 = */
BufferIO
::
ReadInt32
(
pbuf
);
int
c
,
s
,
ss
,
desc
;
int
c
,
s
,
ss
,
desc
;
...
@@ -1723,12 +1722,14 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1723,12 +1722,14 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
bool
panelmode
=
false
;
bool
panelmode
=
false
;
bool
conti_exist
=
false
;
bool
conti_exist
=
false
;
bool
select_trigger
=
(
specount
==
0x7f
);
bool
select_trigger
=
(
specount
==
0x7f
);
mainGame
->
dField
.
chain_forced
=
(
forced
!=
0
)
;
mainGame
->
dField
.
chain_forced
=
false
;
mainGame
->
dField
.
activatable_cards
.
clear
();
mainGame
->
dField
.
activatable_cards
.
clear
();
mainGame
->
dField
.
activatable_descs
.
clear
();
mainGame
->
dField
.
activatable_descs
.
clear
();
mainGame
->
dField
.
conti_cards
.
clear
();
mainGame
->
dField
.
conti_cards
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
flag
=
BufferIO
::
ReadUInt8
(
pbuf
);
int
flag
=
BufferIO
::
ReadUInt8
(
pbuf
);
int
forced
=
BufferIO
::
ReadUInt8
(
pbuf
);
flag
|=
forced
<<
8
;
code
=
BufferIO
::
ReadInt32
(
pbuf
);
code
=
BufferIO
::
ReadInt32
(
pbuf
);
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadUInt8
(
pbuf
));
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadUInt8
(
pbuf
));
l
=
BufferIO
::
ReadUInt8
(
pbuf
);
l
=
BufferIO
::
ReadUInt8
(
pbuf
);
...
@@ -1739,14 +1740,17 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1739,14 +1740,17 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
pcard
->
is_selected
=
false
;
pcard
->
is_selected
=
false
;
if
(
flag
==
EDESC_OPERATION
)
{
if
(
forced
)
{
mainGame
->
dField
.
chain_forced
=
true
;
}
if
(
flag
&
EDESC_OPERATION
)
{
pcard
->
chain_code
=
code
;
pcard
->
chain_code
=
code
;
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_act
=
true
;
mainGame
->
dField
.
conti_act
=
true
;
conti_exist
=
true
;
conti_exist
=
true
;
}
else
{
}
else
{
pcard
->
is_selectable
=
true
;
pcard
->
is_selectable
=
true
;
if
(
flag
==
EDESC_RESET
)
if
(
flag
&
EDESC_RESET
)
pcard
->
cmdFlag
|=
COMMAND_RESET
;
pcard
->
cmdFlag
|=
COMMAND_RESET
;
else
else
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
...
@@ -1763,7 +1767,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1763,7 +1767,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
panelmode
=
true
;
panelmode
=
true
;
}
}
}
}
if
(
!
select_trigger
&&
!
forced
&&
(
mainGame
->
ignore_chain
||
((
count
==
0
||
specount
==
0
)
&&
!
mainGame
->
always_chain
))
&&
(
count
==
0
||
!
mainGame
->
chain_when_avail
))
{
if
(
!
select_trigger
&&
!
mainGame
->
dField
.
chain_
forced
&&
(
mainGame
->
ignore_chain
||
((
count
==
0
||
specount
==
0
)
&&
!
mainGame
->
always_chain
))
&&
(
count
==
0
||
!
mainGame
->
chain_when_avail
))
{
SetResponseI
(
-
1
);
SetResponseI
(
-
1
);
mainGame
->
dField
.
ClearChainSelect
();
mainGame
->
dField
.
ClearChainSelect
();
if
(
mainGame
->
chkWaitChain
->
isChecked
()
&&
!
mainGame
->
ignore_chain
)
{
if
(
mainGame
->
chkWaitChain
->
isChecked
()
&&
!
mainGame
->
ignore_chain
)
{
...
@@ -1772,8 +1776,14 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1772,8 +1776,14 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
return
true
;
return
true
;
}
}
if
(
mainGame
->
chkAutoChain
->
isChecked
()
&&
forced
&&
!
(
mainGame
->
always_chain
||
mainGame
->
chain_when_avail
))
{
if
(
mainGame
->
chkAutoChain
->
isChecked
()
&&
mainGame
->
dField
.
chain_forced
&&
!
(
mainGame
->
always_chain
||
mainGame
->
chain_when_avail
))
{
SetResponseI
(
0
);
for
(
size_t
i
=
0
;
i
<
mainGame
->
dField
.
activatable_descs
.
size
();
++
i
)
{
auto
it
=
mainGame
->
dField
.
activatable_descs
[
i
];
if
(
it
.
second
>>
8
)
{
SetResponseI
((
int
)
i
);
break
;
}
}
mainGame
->
dField
.
ClearChainSelect
();
mainGame
->
dField
.
ClearChainSelect
();
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
return
true
;
return
true
;
...
@@ -1792,7 +1802,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
...
@@ -1792,7 +1802,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
mainGame
->
dField
.
selectable_cards
.
erase
(
eit
,
mainGame
->
dField
.
selectable_cards
.
end
());
mainGame
->
dField
.
selectable_cards
.
erase
(
eit
,
mainGame
->
dField
.
selectable_cards
.
end
());
mainGame
->
dField
.
ShowChainCard
();
mainGame
->
dField
.
ShowChainCard
();
}
else
{
}
else
{
if
(
!
forced
)
{
if
(
!
mainGame
->
dField
.
chain_
forced
)
{
if
(
count
==
0
)
if
(
count
==
0
)
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
dataManager
.
GetSysString
(
201
),
dataManager
.
GetSysString
(
202
));
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
dataManager
.
GetSysString
(
201
),
dataManager
.
GetSysString
(
202
));
else
if
(
select_trigger
)
else
if
(
select_trigger
)
...
...
gframe/event_handler.cpp
View file @
dd22c41c
...
@@ -375,9 +375,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -375,9 +375,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
select_options_index
.
clear
();
select_options_index
.
clear
();
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
if
(
activatable_cards
[
i
]
==
menu_card
)
{
if
(
activatable_cards
[
i
]
==
menu_card
)
{
if
(
activatable_descs
[
i
].
second
==
EDESC_OPERATION
)
if
(
activatable_descs
[
i
].
second
&
EDESC_OPERATION
)
continue
;
continue
;
else
if
(
activatable_descs
[
i
].
second
==
EDESC_RESET
)
{
else
if
(
activatable_descs
[
i
].
second
&
EDESC_RESET
)
{
if
(
id
==
BUTTON_CMD_ACTIVATE
)
continue
;
if
(
id
==
BUTTON_CMD_ACTIVATE
)
continue
;
}
else
{
}
else
{
if
(
id
==
BUTTON_CMD_RESET
)
continue
;
if
(
id
==
BUTTON_CMD_RESET
)
continue
;
...
@@ -658,7 +658,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -658,7 +658,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
select_options_index
.
clear
();
select_options_index
.
clear
();
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
if
(
activatable_cards
[
i
]
==
command_card
)
{
if
(
activatable_cards
[
i
]
==
command_card
)
{
if
(
activatable_descs
[
i
].
second
==
EDESC_OPERATION
)
{
if
(
activatable_descs
[
i
].
second
&
EDESC_OPERATION
)
{
if
(
list_command
==
COMMAND_ACTIVATE
)
continue
;
if
(
list_command
==
COMMAND_ACTIVATE
)
continue
;
}
else
{
}
else
{
if
(
list_command
==
COMMAND_OPERATION
)
continue
;
if
(
list_command
==
COMMAND_OPERATION
)
continue
;
...
...
gframe/replay_mode.cpp
View file @
dd22c41c
...
@@ -393,7 +393,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -393,7 +393,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
pbuf
+=
10
+
count
*
13
;
pbuf
+=
9
+
count
*
14
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_PLACE
:
...
...
gframe/single_duel.cpp
View file @
dd22c41c
...
@@ -750,7 +750,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
...
@@ -750,7 +750,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
pbuf
+=
10
+
count
*
13
;
pbuf
+=
9
+
count
*
14
;
WaitforResponse
(
player
);
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
return
1
;
return
1
;
...
...
gframe/single_mode.cpp
View file @
dd22c41c
...
@@ -301,7 +301,7 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -301,7 +301,7 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
pbuf
+=
10
+
count
*
13
;
pbuf
+=
9
+
count
*
14
;
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
mainGame
->
singleSignal
.
Reset
();
mainGame
->
singleSignal
.
Reset
();
mainGame
->
singleSignal
.
Wait
();
mainGame
->
singleSignal
.
Wait
();
...
...
gframe/tag_duel.cpp
View file @
dd22c41c
...
@@ -706,7 +706,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
...
@@ -706,7 +706,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
player
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
pbuf
+=
10
+
count
*
13
;
pbuf
+=
9
+
count
*
14
;
WaitforResponse
(
player
);
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
return
1
;
return
1
;
...
...
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