Commit c7b54ccc authored by nanahira's avatar nanahira

more regex

parent 33ed40dc
...@@ -1481,7 +1481,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) { ...@@ -1481,7 +1481,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings
//datas.alias can be double card names or alias //datas.alias can be double card names or alias
if(is_declarable(cp->second, declarable_type)) { if(is_declarable(cp->second, declarable_type)) {
if(pname == cit->second.name) { //exact match if(pname == cit->second.name || mainGame->CheckRegEx(cit->second.name, pname, true)) { //exact match
mainGame->lstANCard->insertItem(0, cit->second.name.c_str(), -1); mainGame->lstANCard->insertItem(0, cit->second.name.c_str(), -1);
ancard.insert(ancard.begin(), cit->first); ancard.insert(ancard.begin(), cit->first);
} else { } else {
...@@ -1528,7 +1528,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) { ...@@ -1528,7 +1528,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings auto cp = dataManager.GetCodePointer(cit->first); //verified by _strings
//datas.alias can be double card names or alias //datas.alias can be double card names or alias
if(is_declarable(cp->second, opcode)) { if(is_declarable(cp->second, opcode)) {
if(pname == cit->second.name) { //exact match if(pname == cit->second.name || mainGame->CheckRegEx(cit->second.name, pname, true)) { //exact match
mainGame->lstANCard->insertItem(0, cit->second.name.c_str(), -1); mainGame->lstANCard->insertItem(0, cit->second.name.c_str(), -1);
ancard.insert(ancard.begin(), cit->first); ancard.insert(ancard.begin(), cit->first);
} else { } else {
......
...@@ -1012,7 +1012,7 @@ void DeckBuilder::SortList() { ...@@ -1012,7 +1012,7 @@ void DeckBuilder::SortList() {
auto left = results.begin(); auto left = results.begin();
const wchar_t* pstr = mainGame->ebCardName->getText(); const wchar_t* pstr = mainGame->ebCardName->getText();
for(auto it = results.begin(); it != results.end(); ++it) { for(auto it = results.begin(); it != results.end(); ++it) {
if(wcscmp(pstr, dataManager.GetName((*it)->first)) == 0) { if(wcscmp(pstr, dataManager.GetName((*it)->first)) == 0 || mainGame->CheckRegEx(dataManager.GetName((*it)->first), pstr, true)) {
std::iter_swap(left, it); std::iter_swap(left, it);
++left; ++left;
} }
......
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