Commit e33bc567 authored by mercury233's avatar mercury233

fix #1677

parent 6063e83d
...@@ -1148,7 +1148,12 @@ bool ClientField::ShowSelectSum(bool panelmode) { ...@@ -1148,7 +1148,12 @@ bool ClientField::ShowSelectSum(bool panelmode) {
} else { } else {
select_ready = true; select_ready = true;
mainGame->wCardSelect->setVisible(false); 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 { } else {
select_ready = false; select_ready = false;
......
...@@ -54,6 +54,7 @@ public: ...@@ -54,6 +54,7 @@ public:
int select_sumval; int select_sumval;
int select_cancelable; int select_cancelable;
int select_mode; int select_mode;
bool select_panalmode;
bool select_ready; bool select_ready;
int announce_count; int announce_count;
int declarable_type; int declarable_type;
......
...@@ -1458,7 +1458,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1458,7 +1458,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.selectsum_all.clear(); mainGame->dField.selectsum_all.clear();
mainGame->dField.selected_cards.clear(); mainGame->dField.selected_cards.clear();
mainGame->dField.selectsum_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) { for (int i = 0; i < mainGame->dField.must_select_count; ++i) {
unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf); unsigned int code = (unsigned int)BufferIO::ReadInt32(pbuf);
int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); int c = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
...@@ -1484,20 +1484,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1484,20 +1484,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->select_seq = i; pcard->select_seq = i;
mainGame->dField.selectsum_all.push_back(pcard); mainGame->dField.selectsum_all.push_back(pcard);
if ((l & 0xe) == 0) 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); std::sort(mainGame->dField.selectsum_all.begin(), mainGame->dField.selectsum_all.end(), ClientCard::client_card_sort);
if(select_hint) if(select_hint)
myswprintf(textBuffer, L"%ls(%d)", dataManager.GetDesc(select_hint), mainGame->dField.select_sumval); 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); else myswprintf(textBuffer, L"%ls(%d)", dataManager.GetSysString(560), mainGame->dField.select_sumval);
select_hint = 0; select_hint = 0;
if (panelmode) { if(mainGame->dField.select_panalmode) {
mainGame->wCardSelect->setText(textBuffer); mainGame->wCardSelect->setText(textBuffer);
} else { } else {
mainGame->stHintMsg->setText(textBuffer); mainGame->stHintMsg->setText(textBuffer);
mainGame->stHintMsg->setVisible(true); mainGame->stHintMsg->setVisible(true);
} }
return mainGame->dField.ShowSelectSum(panelmode); return mainGame->dField.ShowSelectSum(mainGame->dField.select_panalmode);
} }
case MSG_SORT_CARD: case MSG_SORT_CARD:
case MSG_SORT_CHAIN: { case MSG_SORT_CHAIN: {
......
...@@ -299,6 +299,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -299,6 +299,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case MSG_SELECT_TRIBUTE: case MSG_SELECT_TRIBUTE:
case MSG_SELECT_SUM: { case MSG_SELECT_SUM: {
mainGame->HideElement(mainGame->wQuery); mainGame->HideElement(mainGame->wQuery);
if(select_panalmode)
mainGame->dField.ShowSelectCard(true);
break; break;
} }
case MSG_SELECT_CHAIN: { 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