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
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
Commits
5e3ece98
Commit
5e3ece98
authored
Nov 16, 2018
by
mercury233
Committed by
GitHub
Nov 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update (#2151)
place cards which are activating or target in first when selecting cards
parent
99c86f43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
gframe/client_card.cpp
gframe/client_card.cpp
+7
-1
gframe/event_handler.cpp
gframe/event_handler.cpp
+2
-0
No files found.
gframe/client_card.cpp
View file @
5e3ece98
...
...
@@ -212,8 +212,14 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
return
c1
->
overlayTarget
->
sequence
<
c2
->
overlayTarget
->
sequence
;
else
return
c1
->
sequence
<
c2
->
sequence
;
else
{
if
(
c1
->
location
&
0x71
)
if
(
c1
->
location
&
(
LOCATION_DECK
|
LOCATION_GRAVE
|
LOCATION_REMOVED
|
LOCATION_EXTRA
))
{
for
(
size_t
i
=
0
;
i
<
mainGame
->
dField
.
chains
.
size
();
++
i
)
{
auto
chit
=
mainGame
->
dField
.
chains
[
i
];
if
(
c1
==
chit
.
chain_card
||
chit
.
target
.
find
(
c1
)
!=
chit
.
target
.
end
())
return
true
;
}
return
c1
->
sequence
>
c2
->
sequence
;
}
else
return
c1
->
sequence
<
c2
->
sequence
;
}
...
...
gframe/event_handler.cpp
View file @
5e3ece98
...
...
@@ -424,6 +424,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
wCardSelect
->
setText
(
dataManager
.
GetSysString
(
568
));
list_command
=
COMMAND_OPERATION
;
}
std
::
sort
(
selectable_cards
.
begin
(),
selectable_cards
.
end
(),
ClientCard
::
client_card_sort
);
ShowSelectCard
(
true
,
true
);
}
break
;
...
...
@@ -580,6 +581,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
}
list_command
=
COMMAND_LIST
;
std
::
sort
(
selectable_cards
.
begin
(),
selectable_cards
.
end
(),
ClientCard
::
client_card_sort
);
ShowSelectCard
(
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