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
f03ab6c2
Commit
f03ab6c2
authored
Jan 06, 2017
by
edo9300
Committed by
DailyShana
Jan 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed Duel.SwapDeckandGrave (#1875)
parent
8555829e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+12
-0
No files found.
gframe/duelclient.cpp
View file @
f03ab6c2
...
...
@@ -1760,6 +1760,8 @@ 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)
...
...
@@ -1767,10 +1769,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
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);
cit = mainGame->dField.deck[player].erase(cit);
e++;
} else {
(*cit)->location = LOCATION_DECK;
(*cit)->sequence = m;
m++;
++cit;
}
}
...
...
@@ -1785,10 +1792,15 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
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);
cit = mainGame->dField.deck[player].erase(cit);
e++;
} else {
pcard->location = LOCATION_DECK;
pcard->sequence = m;
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