Commit 506c0076 authored by VanillaSalt's avatar VanillaSalt

fix

parent 5771b1e9
...@@ -577,9 +577,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -577,9 +577,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
command_card = selectable_cards[id - BUTTON_CARD_0 + mainGame->scrCardList->getPos() / 10]; command_card = selectable_cards[id - BUTTON_CARD_0 + mainGame->scrCardList->getPos() / 10];
selected_cards.push_back(command_card); selected_cards.push_back(command_card);
if (CheckSelectSum()) { if (CheckSelectSum()) {
SetResponseSelectedCards(); if(selectsum_cards.size() == 0 || selectable_cards.size() == 0) {
mainGame->HideElement(mainGame->wCardSelect, true); SetResponseSelectedCards();
mainGame->HideElement(mainGame->wCardSelect, true);
} else {
select_ready = true;
mainGame->wCardSelect->setVisible(false);
mainGame->dField.ShowSelectCard(true);
}
} else { } else {
select_ready = false;
mainGame->wCardSelect->setVisible(false); mainGame->wCardSelect->setVisible(false);
mainGame->dField.ShowSelectCard(); mainGame->dField.ShowSelectCard();
} }
...@@ -628,7 +635,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -628,7 +635,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->HideElement(mainGame->wCardSelect); mainGame->HideElement(mainGame->wCardSelect);
break; break;
} }
if(mainGame->dInfo.curMsg == MSG_SELECT_CARD) { if(mainGame->dInfo.curMsg == MSG_SELECT_CARD || mainGame->dInfo.curMsg == MSG_SELECT_SUM) {
if(select_ready) { if(select_ready) {
SetResponseSelectedCards(); SetResponseSelectedCards();
mainGame->HideElement(mainGame->wCardSelect, true); mainGame->HideElement(mainGame->wCardSelect, true);
......
Subproject commit 130de2f618693c34a7ebffeb9c5011c699a789c5 Subproject commit 85d2b687cdbb4a3bb925a06cf66f0a46c1f08e08
Subproject commit bb5f1dd13d95f3f666bc4f4e3b4e95557ecb2612 Subproject commit f0df5c7e608a8757ac84e521e3766347e752b252
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