Commit 30e53067 authored by DailyShana's avatar DailyShana

replace '#' by '@' when searching setname

parent 19f08651
...@@ -26,7 +26,7 @@ A script engine for "yu-gi-oh!" and sample gui ...@@ -26,7 +26,7 @@ A script engine for "yu-gi-oh!" and sample gui
###Deck edit page: ###Deck edit page:
* All numeric textboxs: They support >, =, <, >=, <= signs. * All numeric textboxs: They support >, =, <, >=, <= signs.
* Card name: Search card names and texts by default, $foo will only search foo in card names, and #foo will search cards of "foo" archetype(due to translation, card name contains "foo" does not mean that card is "foo" card). * Card name: Search card names and texts by default, $foo will only search foo in card names, and @foo will search cards of "foo" archetype(due to translation, card name contains "foo" does not mean that card is "foo" card).
### Command-line options: ### Command-line options:
* -j: Join the host in system.conf file. * -j: Join the host in system.conf file.
......
...@@ -658,9 +658,9 @@ void DeckBuilder::FilterCards() { ...@@ -658,9 +658,9 @@ void DeckBuilder::FilterCards() {
return; return;
} }
unsigned int set_code = 0; unsigned int set_code = 0;
if(pstr[0] == L'#') if(pstr[0] == L'@')
set_code = dataManager.GetSetCode(&pstr[1]); set_code = dataManager.GetSetCode(&pstr[1]);
if(pstr[0] == 0 || (pstr[0] == L'$' && pstr[1] == 0) || (pstr[0] == L'#' && pstr[1] == 0)) if(pstr[0] == 0 || (pstr[0] == L'$' && pstr[1] == 0) || (pstr[0] == L'@' && pstr[1] == 0))
pstr = 0; pstr = 0;
auto strpointer = dataManager._strings.begin(); auto strpointer = dataManager._strings.begin();
for(code_pointer ptr = dataManager._datas.begin(); ptr != dataManager._datas.end(); ++ptr, ++strpointer) { for(code_pointer ptr = dataManager._datas.begin(); ptr != dataManager._datas.end(); ++ptr, ++strpointer) {
...@@ -726,7 +726,7 @@ void DeckBuilder::FilterCards() { ...@@ -726,7 +726,7 @@ void DeckBuilder::FilterCards() {
if(pstr[0] == L'$') { if(pstr[0] == L'$') {
if(wcsstr(text.name, &pstr[1]) == 0) if(wcsstr(text.name, &pstr[1]) == 0)
continue; continue;
} else if(pstr[0] == L'#' && set_code) { } else if(pstr[0] == L'@' && set_code) {
unsigned long long sc = data.setcode; unsigned long long sc = data.setcode;
if(data.alias) { if(data.alias) {
auto aptr = dataManager._datas.find(data.alias); auto aptr = dataManager._datas.find(data.alias);
......
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