Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MobiusMei
ygopro
Commits
37225e04
Commit
37225e04
authored
Sep 09, 2016
by
mercury233
Committed by
DailyShana
Sep 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search setname as default (#1838)
parent
e0d8cda7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
gframe/deck_con.cpp
gframe/deck_con.cpp
+25
-17
No files found.
gframe/deck_con.cpp
View file @
37225e04
...
...
@@ -39,6 +39,25 @@ static int parse_filter(const wchar_t* pstr, unsigned int* type) {
*
type
=
0
;
return
0
;
}
static
bool
check_set_code
(
const
CardDataC
&
data
,
int
set_code
)
{
unsigned
long
long
sc
=
data
.
setcode
;
if
(
data
.
alias
)
{
auto
aptr
=
dataManager
.
_datas
.
find
(
data
.
alias
);
if
(
aptr
!=
dataManager
.
_datas
.
end
())
sc
=
aptr
->
second
.
setcode
;
}
bool
res
=
false
;
int
settype
=
set_code
&
0xfff
;
int
setsubtype
=
set_code
&
0xf000
;
while
(
sc
)
{
if
((
sc
&
0xfff
)
==
settype
&&
(
sc
&
0xf000
&
setsubtype
)
==
setsubtype
)
res
=
true
;
sc
=
sc
>>
16
;
}
return
res
;
}
bool
DeckBuilder
::
OnEvent
(
const
irr
::
SEvent
&
event
)
{
switch
(
event
.
EventType
)
{
case
irr
:
:
EET_GUI_EVENT
:
{
...
...
@@ -833,24 +852,13 @@ void DeckBuilder::FilterCards() {
if
(
wcsstr
(
text
.
name
,
&
pstr
[
1
])
==
0
)
continue
;
}
else
if
(
pstr
[
0
]
==
L'@'
&&
set_code
)
{
unsigned
long
long
sc
=
data
.
setcode
;
if
(
data
.
alias
)
{
auto
aptr
=
dataManager
.
_datas
.
find
(
data
.
alias
);
if
(
aptr
!=
dataManager
.
_datas
.
end
())
sc
=
aptr
->
second
.
setcode
;
}
bool
res
=
false
;
int
settype
=
set_code
&
0xfff
;
int
setsubtype
=
set_code
&
0xf000
;
while
(
sc
)
{
if
((
sc
&
0xfff
)
==
settype
&&
(
sc
&
0xf000
&
setsubtype
)
==
setsubtype
)
res
=
true
;
sc
=
sc
>>
16
;
}
if
(
!
res
)
continue
;
if
(
!
check_set_code
(
data
,
set_code
))
continue
;
}
else
{
if
(
wcsstr
(
text
.
name
,
pstr
)
==
0
&&
wcsstr
(
text
.
text
,
pstr
)
==
0
)
continue
;
if
(
wcsstr
(
text
.
name
,
pstr
)
==
0
&&
wcsstr
(
text
.
text
,
pstr
)
==
0
)
{
set_code
=
dataManager
.
GetSetCode
(
&
pstr
[
0
]);
if
(
!
set_code
||
!
check_set_code
(
data
,
set_code
))
continue
;
}
}
}
results
.
push_back
(
ptr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment