Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
9b37cb12
Commit
9b37cb12
authored
Aug 28, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve
parent
dbdb767c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
7 deletions
+29
-7
gframe/client_field.cpp
gframe/client_field.cpp
+28
-6
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-1
No files found.
gframe/client_field.cpp
View file @
9b37cb12
...
...
@@ -1424,16 +1424,27 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
ancard
.
push_back
(
trycode
);
return
;
}
bool
use
_cache
=
false
;
bool
try
_cache
=
false
;
if
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
{
if
(
!
enter
)
return
;
use_cache
=
(
mainGame
->
dInfo
.
announce_cache
.
size
()
!=
0
)
;
try_cache
=
true
;
}
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
if
(
try_cache
&&
mainGame
->
dInfo
.
announce_cache
.
size
())
{
for
(
int
i
=
0
;
i
<
mainGame
->
dInfo
.
announce_cache
.
size
();
++
i
)
{
unsigned
int
cache_code
=
mainGame
->
dInfo
.
announce_cache
[
i
];
if
(
dataManager
.
GetString
(
cache_code
,
&
cstr
)
&&
dataManager
.
GetData
(
cache_code
,
&
cd
)
&&
is_declarable
(
cd
,
opcode
))
{
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
());
ancard
.
push_back
(
cache_code
);
}
}
if
(
ancard
.
size
())
return
;
}
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
if
(
(
!
use_cache
&&
cit
->
second
.
name
.
find
(
pname
)
!=
std
::
wstring
::
npos
)
||
(
use_cache
&&
std
::
find
(
mainGame
->
dInfo
.
announce_cache
.
begin
(),
mainGame
->
dInfo
.
announce_cache
.
end
(),
cit
->
first
)
!=
mainGame
->
dInfo
.
announce_cache
.
end
())
)
{
if
(
cit
->
second
.
name
.
find
(
pname
)
!=
std
::
wstring
::
npos
)
{
auto
cp
=
dataManager
.
GetCodePointer
(
cit
->
first
);
//verified by _strings
//datas.alias can be double card names or alias
if
(
is_declarable
(
cp
->
second
,
declarable_type
))
{
...
...
@@ -1460,16 +1471,27 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
ancard
.
push_back
(
trycode
);
return
;
}
bool
use
_cache
=
false
;
bool
try
_cache
=
false
;
if
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
{
if
(
!
enter
)
return
;
use_cache
=
(
mainGame
->
dInfo
.
announce_cache
.
size
()
!=
0
)
;
try_cache
=
true
;
}
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
if
(
try_cache
&&
mainGame
->
dInfo
.
announce_cache
.
size
())
{
for
(
int
i
=
0
;
i
<
mainGame
->
dInfo
.
announce_cache
.
size
();
++
i
)
{
unsigned
int
cache_code
=
mainGame
->
dInfo
.
announce_cache
[
i
];
if
(
dataManager
.
GetString
(
cache_code
,
&
cstr
)
&&
dataManager
.
GetData
(
cache_code
,
&
cd
)
&&
is_declarable
(
cd
,
opcode
))
{
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
());
ancard
.
push_back
(
cache_code
);
}
}
if
(
ancard
.
size
())
return
;
}
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
if
(
(
!
use_cache
&&
cit
->
second
.
name
.
find
(
pname
)
!=
std
::
wstring
::
npos
)
||
(
use_cache
&&
std
::
find
(
mainGame
->
dInfo
.
announce_cache
.
begin
(),
mainGame
->
dInfo
.
announce_cache
.
end
(),
cit
->
first
)
!=
mainGame
->
dInfo
.
announce_cache
.
end
())
)
{
if
(
cit
->
second
.
name
.
find
(
pname
)
!=
std
::
wstring
::
npos
)
{
auto
cp
=
dataManager
.
GetCodePointer
(
cit
->
first
);
//verified by _strings
//datas.alias can be double card names or alias
if
(
is_declarable
(
cp
->
second
,
opcode
))
{
...
...
gframe/event_handler.cpp
View file @
9b37cb12
...
...
@@ -338,7 +338,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
sel
==
-
1
)
break
;
DuelClient
::
SetResponseI
(
ancard
[
sel
]);
mainGame
->
dInfo
.
announce_cache
.
push_back
(
ancard
[
sel
]);
mainGame
->
dInfo
.
announce_cache
.
insert
(
mainGame
->
dInfo
.
announce_cache
.
begin
(),
ancard
[
sel
]);
mainGame
->
HideElement
(
mainGame
->
wANCard
,
true
);
break
;
}
...
...
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