Skip to content

Commit f4db575

Browse files
authored
update MSG_CONFIRM_CARDS, add skip_panel (#2470)
1 parent db1633b commit f4db575

5 files changed

Lines changed: 6 additions & 1 deletion

File tree

gframe/duelclient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2145,6 +2145,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
21452145
}
21462146
case MSG_CONFIRM_CARDS: {
21472147
/*int player = */mainGame->LocalPlayer(BufferIO::ReadUInt8(pbuf));
2148+
int skip_panel = BufferIO::ReadUInt8(pbuf);
21482149
int count = BufferIO::ReadUInt8(pbuf);
21492150
int c, s;
21502151
unsigned int code, l;
@@ -2231,7 +2232,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
22312232
}
22322233
mainGame->WaitFrameSignal(5);
22332234
}
2234-
if (panel_confirm.size() && mainGame->dInfo.player_type != 7) {
2235+
if (!skip_panel && panel_confirm.size() && mainGame->dInfo.player_type != 7) {
22352236
std::sort(panel_confirm.begin(), panel_confirm.end(), ClientCard::client_card_sort);
22362237
mainGame->gMutex.lock();
22372238
mainGame->dField.selectable_cards = panel_confirm;

gframe/replay_mode.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
446446
}
447447
case MSG_CONFIRM_CARDS: {
448448
player = BufferIO::ReadUInt8(pbuf);
449+
pbuf += 1;
449450
count = BufferIO::ReadUInt8(pbuf);
450451
pbuf += count * 7;
451452
DuelClient::ClientAnalyze(offset, pbuf - offset);

gframe/single_duel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,7 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
821821
}
822822
case MSG_CONFIRM_CARDS: {
823823
player = BufferIO::ReadUInt8(pbuf);
824+
pbuf += 1;
824825
count = BufferIO::ReadUInt8(pbuf);
825826
if(pbuf[5] != LOCATION_DECK) {
826827
pbuf += count * 7;

gframe/single_mode.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
378378
}
379379
case MSG_CONFIRM_CARDS: {
380380
player = BufferIO::ReadUInt8(pbuf);
381+
pbuf += 1;
381382
count = BufferIO::ReadUInt8(pbuf);
382383
pbuf += count * 7;
383384
DuelClient::ClientAnalyze(offset, pbuf - offset);

gframe/tag_duel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
781781
}
782782
case MSG_CONFIRM_CARDS: {
783783
player = BufferIO::ReadUInt8(pbuf);
784+
pbuf += 1;
784785
count = BufferIO::ReadUInt8(pbuf);
785786
if(pbuf[5] != LOCATION_DECK) {
786787
pbuf += count * 7;

0 commit comments

Comments
 (0)