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
37fb1db6
Commit
37fb1db6
authored
Sep 19, 2018
by
DailyShana
Committed by
GitHub
Sep 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update announce card (#2137)
* update announce card * update * fix * improve
parent
314ddd85
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
6 deletions
+36
-6
gframe/client_field.cpp
gframe/client_field.cpp
+34
-4
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
No files found.
gframe/client_field.cpp
View file @
37fb1db6
...
...
@@ -1424,8 +1424,23 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
ancard
.
push_back
(
trycode
);
return
;
}
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
int
selcode
=
(
sel
==
-
1
)
?
0
:
cache
[
sel
];
mainGame
->
lstANCard
->
clear
();
for
(
const
auto
&
trycode
:
cache
)
{
if
(
dataManager
.
GetString
(
trycode
,
&
cstr
)
&&
dataManager
.
GetData
(
trycode
,
&
cd
)
&&
is_declarable
(
cd
,
declarable_type
))
{
ancard
.
push_back
(
trycode
);
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
());
if
(
trycode
==
selcode
)
mainGame
->
lstANCard
->
setSelected
(
cstr
.
name
.
c_str
());
}
}
if
(
!
ancard
.
empty
())
return
;
}
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
...
...
@@ -1456,8 +1471,23 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
ancard
.
push_back
(
trycode
);
return
;
}
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
if
((
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
int
selcode
=
(
sel
==
-
1
)
?
0
:
cache
[
sel
];
mainGame
->
lstANCard
->
clear
();
for
(
const
auto
&
trycode
:
cache
)
{
if
(
dataManager
.
GetString
(
trycode
,
&
cstr
)
&&
dataManager
.
GetData
(
trycode
,
&
cd
)
&&
is_declarable
(
cd
,
opcode
))
{
ancard
.
push_back
(
trycode
);
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
());
if
(
trycode
==
selcode
)
mainGame
->
lstANCard
->
setSelected
(
cstr
.
name
.
c_str
());
}
}
if
(
!
ancard
.
empty
())
return
;
}
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
...
...
gframe/duelclient.cpp
View file @
37fb1db6
...
...
@@ -3382,7 +3382,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
tru
e
);
mainGame
->
dField
.
UpdateDeclarableCode
(
fals
e
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
return
false
;
...
...
@@ -3421,7 +3421,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
tru
e
);
mainGame
->
dField
.
UpdateDeclarableCode
(
fals
e
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
return
false
;
...
...
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