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
57c079a5
Commit
57c079a5
authored
Jan 06, 2017
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refine #1875
parent
f03ab6c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
gframe/duelclient.cpp
gframe/duelclient.cpp
+6
-14
No files found.
gframe/duelclient.cpp
View file @
57c079a5
...
...
@@ -1760,24 +1760,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case MSG_SWAP_GRAVE_DECK: {
int player = mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
int
m
=
0
;
int
e
=
mainGame
->
dField
.
extra
[
player
].
size
();
if(mainGame->dInfo.isReplay && mainGame->dInfo.isReplaySkiping) {
mainGame->dField.grave[player].swap(mainGame->dField.deck[player]);
for (auto cit = mainGame->dField.grave[player].begin(); cit != mainGame->dField.grave[player].end(); ++cit)
(*cit)->location = LOCATION_GRAVE;
int m = 0;
for (auto cit = mainGame->dField.deck[player].begin(); cit != mainGame->dField.deck[player].end(); ) {
if ((*cit)->type & 0x802040) {
(
*
cit
)
->
location
=
LOCATION_EXTRA
;
(*cit)->position = POS_FACEDOWN;
(
*
cit
)
->
sequence
=
e
;
mainGame
->
dField
.
extra
[
player
].
push_back
(
*
cit
);
mainGame->dField.AddCard(*cit, player, LOCATION_EXTRA, 0);
cit = mainGame->dField.deck[player].erase(cit);
e
++
;
} else {
(*cit)->location = LOCATION_DECK;
(
*
cit
)
->
sequence
=
m
;
m
++
;
(*cit)->sequence = m++;
++cit;
}
}
...
...
@@ -1788,19 +1783,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
(*cit)->location = LOCATION_GRAVE;
mainGame->dField.MoveCard(*cit, 10);
}
int m = 0;
for (auto cit = mainGame->dField.deck[player].begin(); cit != mainGame->dField.deck[player].end(); ) {
ClientCard* pcard = *cit;
if (pcard->type & 0x802040) {
pcard
->
location
=
LOCATION_EXTRA
;
pcard->position = POS_FACEDOWN;
pcard
->
sequence
=
e
;
mainGame
->
dField
.
extra
[
player
].
push_back
(
pcard
);
mainGame->dField.AddCard(pcard, player, LOCATION_EXTRA, 0);
cit = mainGame->dField.deck[player].erase(cit);
e
++
;
} else {
pcard->location = LOCATION_DECK;
pcard
->
sequence
=
m
;
m
++
;
pcard->sequence = m++;
++cit;
}
mainGame->dField.MoveCard(pcard, 10);
...
...
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