Commit 33c5e902 authored by DailyShana's avatar DailyShana

fix

for announcing "海"
parent 9964e4cd
...@@ -1296,7 +1296,7 @@ static bool is_declarable(T const& cd, int declarable_type) { ...@@ -1296,7 +1296,7 @@ static bool is_declarable(T const& cd, int declarable_type) {
return cd.code == CARD_MARINE_DOLPHIN || cd.code == CARD_TWINKLE_MOSS return cd.code == CARD_MARINE_DOLPHIN || cd.code == CARD_TWINKLE_MOSS
|| (!cd.alias && (cd.type & (TYPE_MONSTER + TYPE_TOKEN)) != (TYPE_MONSTER + TYPE_TOKEN)); || (!cd.alias && (cd.type & (TYPE_MONSTER + TYPE_TOKEN)) != (TYPE_MONSTER + TYPE_TOKEN));
} }
void ClientField::UpdateDeclarableCode() { void ClientField::UpdateDeclarableCode(bool enter) {
const wchar_t* pname = mainGame->ebANCard->getText(); const wchar_t* pname = mainGame->ebANCard->getText();
int trycode = BufferIO::GetVal(pname); int trycode = BufferIO::GetVal(pname);
CardString cstr; CardString cstr;
...@@ -1308,7 +1308,7 @@ void ClientField::UpdateDeclarableCode() { ...@@ -1308,7 +1308,7 @@ void ClientField::UpdateDeclarableCode() {
ancard.push_back(trycode); ancard.push_back(trycode);
return; return;
} }
if(pname[0] == 0 || pname[1] == 0) if(pname[0] == 0 || (pname[1] == 0 && !enter))
return; return;
mainGame->lstANCard->clear(); mainGame->lstANCard->clear();
ancard.clear(); ancard.clear();
......
...@@ -103,7 +103,7 @@ public: ...@@ -103,7 +103,7 @@ public:
void check_sel_sum_t(const std::set<ClientCard*>& left, int acc); void check_sel_sum_t(const std::set<ClientCard*>& left, int acc);
bool check_sum(std::set<ClientCard*>::const_iterator index, std::set<ClientCard*>::const_iterator end, int acc, int count); bool check_sum(std::set<ClientCard*>::const_iterator index, std::set<ClientCard*>::const_iterator end, int acc, int count);
void UpdateDeclarableCode(); void UpdateDeclarableCode(bool enter);
irr::gui::IGUIElement* panel; irr::gui::IGUIElement* panel;
std::vector<int> ancard; std::vector<int> ancard;
......
...@@ -793,7 +793,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -793,7 +793,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case irr::gui::EGET_EDITBOX_CHANGED: { case irr::gui::EGET_EDITBOX_CHANGED: {
switch(id) { switch(id) {
case EDITBOX_ANCARD: { case EDITBOX_ANCARD: {
UpdateDeclarableCode(); UpdateDeclarableCode(false);
break; break;
} }
} }
...@@ -802,7 +802,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -802,7 +802,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case irr::gui::EGET_EDITBOX_ENTER: { case irr::gui::EGET_EDITBOX_ENTER: {
switch(id) { switch(id) {
case EDITBOX_ANCARD: { case EDITBOX_ANCARD: {
UpdateDeclarableCode(); UpdateDeclarableCode(true);
break; break;
} }
case EDITBOX_CHAT: { case EDITBOX_CHAT: {
......
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