Commit f33b04ef authored by 独孤朲's avatar 独孤朲 Committed by GitHub

Merge pull request #1908 from mercury233/patch-4

fix #1677
parents 43370617 e33bc567
......@@ -1148,7 +1148,12 @@ bool ClientField::ShowSelectSum(bool panelmode) {
} else {
select_ready = true;
mainGame->wCardSelect->setVisible(false);
mainGame->dField.ShowSelectCard(true);
wchar_t wbuf[256], *pwbuf = wbuf;
BufferIO::CopyWStrRef(dataManager.GetSysString(209), pwbuf, 256);
*pwbuf++ = L'\n';
BufferIO::CopyWStrRef(dataManager.GetSysString(210), pwbuf, 256);
mainGame->stQMessage->setText(wbuf);
mainGame->PopupElement(mainGame->wQuery);
}
} else {
select_ready = false;
......
......@@ -54,6 +54,7 @@ public:
int select_sumval;
int select_cancelable;
int select_mode;
bool select_panalmode;
bool select_ready;
int announce_count;
int declarable_type;
......
......@@ -1460,7 +1460,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.selectsum_all.clear();
mainGame->dField.selected_cards.clear();
mainGame->dField.selectsum_cards.clear();
bool panelmode = false;
mainGame->dField.select_panalmode = false;
for (int i = 0; i < mainGame->dField.must_select_count; ++i) {
unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf);
int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
......@@ -1486,20 +1486,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->select_seq = i;
mainGame->dField.selectsum_all.push_back(pcard);
if ((l & 0xe) == 0)
panelmode = true;
mainGame->dField.select_panalmode = true;
}
std::sort(mainGame->dField.selectsum_all.begin(), mainGame->dField.selectsum_all.end(), ClientCard::client_card_sort);
if(select_hint)
myswprintf(textBuffer, L"%ls(%d)", dataManager.GetDesc(select_hint), mainGame->dField.select_sumval);
else myswprintf(textBuffer, L"%ls(%d)", dataManager.GetSysString(560), mainGame->dField.select_sumval);
select_hint = 0;
if (panelmode) {
if(mainGame->dField.select_panalmode) {
mainGame->wCardSelect->setText(textBuffer);
} else {
mainGame->stHintMsg->setText(textBuffer);
mainGame->stHintMsg->setVisible(true);
}
return mainGame->dField.ShowSelectSum(panelmode);
return mainGame->dField.ShowSelectSum(mainGame->dField.select_panalmode);
}
case MSG_SORT_CARD:
case MSG_SORT_CHAIN: {
......
......@@ -299,6 +299,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case MSG_SELECT_TRIBUTE:
case MSG_SELECT_SUM: {
mainGame->HideElement(mainGame->wQuery);
if(select_panalmode)
mainGame->dField.ShowSelectCard(true);
break;
}
case MSG_SELECT_CHAIN: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment