Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update MSG_CONFIRM_CARDS, add skip_panel #2470

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gframe/duelclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2091,6 +2091,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
}
case MSG_CONFIRM_CARDS: {
/*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int skip_panel = BufferIO::ReadInt8(pbuf);
int count = BufferIO::ReadInt8(pbuf);
int code, c, l, s;
std::vector<ClientCard*> field_confirm;
Expand Down Expand Up @@ -2176,7 +2177,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
}
mainGame->WaitFrameSignal(5);
}
if (panel_confirm.size() && mainGame->dInfo.player_type != 7) {
if (!skip_panel && panel_confirm.size() && mainGame->dInfo.player_type != 7) {
std::sort(panel_confirm.begin(), panel_confirm.end(), ClientCard::client_card_sort);
mainGame->gMutex.lock();
mainGame->dField.selectable_cards = panel_confirm;
Expand Down
1 change: 1 addition & 0 deletions gframe/replay_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
}
case MSG_CONFIRM_CARDS: {
player = BufferIO::ReadInt8(pbuf);
pbuf += 1;
count = BufferIO::ReadInt8(pbuf);
pbuf += count * 7;
DuelClient::ClientAnalyze(offset, pbuf - offset);
Expand Down
1 change: 1 addition & 0 deletions gframe/single_duel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
}
case MSG_CONFIRM_CARDS: {
player = BufferIO::ReadInt8(pbuf);
pbuf += 1;
count = BufferIO::ReadInt8(pbuf);
if(pbuf[5] != LOCATION_DECK) {
pbuf += count * 7;
Expand Down
1 change: 1 addition & 0 deletions gframe/single_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
}
case MSG_CONFIRM_CARDS: {
player = BufferIO::ReadInt8(pbuf);
pbuf += 1;
count = BufferIO::ReadInt8(pbuf);
pbuf += count * 7;
DuelClient::ClientAnalyze(offset, pbuf - offset);
Expand Down
1 change: 1 addition & 0 deletions gframe/tag_duel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
}
case MSG_CONFIRM_CARDS: {
player = BufferIO::ReadInt8(pbuf);
pbuf += 1;
count = BufferIO::ReadInt8(pbuf);
if(pbuf[5] != LOCATION_DECK) {
pbuf += count * 7;
Expand Down