Commit f36b260d authored by salix5's avatar salix5

Using get_original_code method in card filtering and display

parent 7a663066
...@@ -1555,7 +1555,7 @@ void DeckBuilder::FilterCards() { ...@@ -1555,7 +1555,7 @@ void DeckBuilder::FilterCards() {
match = CardNameContains(strings.name.c_str(), elements_iterator->keyword.c_str()); match = CardNameContains(strings.name.c_str(), elements_iterator->keyword.c_str());
} else if (elements_iterator->type == element_t::type_t::setcode) { } else if (elements_iterator->type == element_t::type_t::setcode) {
match = data.is_setcodes(elements_iterator->setcodes); match = data.is_setcodes(elements_iterator->setcodes);
} else if (trycode && (data.code == trycode || data.alias == trycode && is_alternative(data.code, data.alias))){ } else if (trycode && data.get_original_code() == trycode) {
match = true; match = true;
} else { } else {
match = CardNameContains(strings.name.c_str(), elements_iterator->keyword.c_str()) match = CardNameContains(strings.name.c_str(), elements_iterator->keyword.c_str())
......
...@@ -1522,10 +1522,7 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1522,10 +1522,7 @@ void Game::ShowCardInfo(int code, bool resize) {
imgCard->setImage(imageManager.GetTexture(code, true)); imgCard->setImage(imageManager.GetTexture(code, true));
if (is_valid) { if (is_valid) {
auto& cd = cit->second; auto& cd = cit->second;
if (is_alternative(cd.code,cd.alias)) myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.get_original_code()), cd.get_original_code());
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(cd.alias), cd.alias);
else
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
} }
else { else {
myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
......
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