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
635db301
Commit
635db301
authored
Dec 29, 2013
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
fixed SwapDeckAndGrave
parent
a7da0e4c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
8 deletions
+40
-8
gframe/duelclient.cpp
gframe/duelclient.cpp
+21
-5
ocgcore/field.cpp
ocgcore/field.cpp
+19
-3
No files found.
gframe/duelclient.cpp
View file @
635db301
...
...
@@ -1641,8 +1641,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
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
;
for
(
auto
cit
=
mainGame
->
dField
.
deck
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
deck
[
player
].
end
();
++
cit
)
for
(
auto
cit
=
mainGame
->
dField
.
deck
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
deck
[
player
].
end
();
)
{
if
((
*
cit
)
->
type
&
0x802040
)
{
(
*
cit
)
->
location
=
LOCATION_EXTRA
;
mainGame
->
dField
.
extra
[
player
].
push_back
(
*
cit
);
cit
=
mainGame
->
dField
.
deck
[
player
].
erase
(
cit
);
}
else
{
(
*
cit
)
->
location
=
LOCATION_DECK
;
++
cit
;
}
}
}
else
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
dField
.
grave
[
player
].
swap
(
mainGame
->
dField
.
deck
[
player
]);
...
...
@@ -1650,9 +1658,17 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
(
*
cit
)
->
location
=
LOCATION_GRAVE
;
mainGame
->
dField
.
MoveCard
(
*
cit
,
10
);
}
for
(
auto
cit
=
mainGame
->
dField
.
deck
[
player
].
begin
();
cit
!=
mainGame
->
dField
.
deck
[
player
].
end
();
++
cit
)
{
(
*
cit
)
->
location
=
LOCATION_DECK
;
mainGame
->
dField
.
MoveCard
(
*
cit
,
10
);
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
;
mainGame
->
dField
.
extra
[
player
].
push_back
(
pcard
);
cit
=
mainGame
->
dField
.
deck
[
player
].
erase
(
cit
);
}
else
{
pcard
->
location
=
LOCATION_DECK
;
++
cit
;
}
mainGame
->
dField
.
MoveCard
(
pcard
,
10
);
}
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
11
);
...
...
ocgcore/field.cpp
View file @
635db301
...
...
@@ -568,9 +568,15 @@ void field::swap_deck_and_grave(uint8 playerid) {
(
*
clit
)
->
enable_field_effect
(
false
);
(
*
clit
)
->
cancel_field_effect
();
}
card_vector
cl
=
player
[
playerid
].
list_grave
;
player
[
playerid
].
list_grave
=
player
[
playerid
].
list_main
;
player
[
playerid
].
list_main
=
cl
;
player
[
playerid
].
list_grave
.
swap
(
player
[
playerid
].
list_main
);
card_vector
ex
;
for
(
clit
=
player
[
playerid
].
list_main
.
begin
();
clit
!=
player
[
playerid
].
list_main
.
end
();
)
{
if
((
*
clit
)
->
data
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
))
{
ex
.
push_back
(
*
clit
);
clit
=
player
[
playerid
].
list_main
.
erase
(
clit
);
}
else
++
clit
;
}
for
(
clit
=
player
[
playerid
].
list_grave
.
begin
();
clit
!=
player
[
playerid
].
list_grave
.
end
();
++
clit
)
{
(
*
clit
)
->
current
.
location
=
LOCATION_GRAVE
;
(
*
clit
)
->
current
.
reason
=
REASON_EFFECT
;
...
...
@@ -587,7 +593,17 @@ void field::swap_deck_and_grave(uint8 playerid) {
(
*
clit
)
->
apply_field_effect
();
(
*
clit
)
->
enable_field_effect
(
true
);
}
for
(
clit
=
ex
.
begin
();
clit
!=
ex
.
end
();
++
clit
)
{
(
*
clit
)
->
current
.
location
=
LOCATION_EXTRA
;
(
*
clit
)
->
current
.
reason
=
REASON_EFFECT
;
(
*
clit
)
->
current
.
reason_effect
=
core
.
reason_effect
;
(
*
clit
)
->
current
.
reason_player
=
core
.
reason_player
;
(
*
clit
)
->
apply_field_effect
();
(
*
clit
)
->
enable_field_effect
(
true
);
}
player
[
playerid
].
list_extra
.
insert
(
player
[
playerid
].
list_extra
.
end
(),
ex
.
begin
(),
ex
.
end
());
reset_sequence
(
playerid
,
LOCATION_GRAVE
);
reset_sequence
(
playerid
,
LOCATION_EXTRA
);
pduel
->
write_buffer8
(
MSG_SWAP_GRAVE_DECK
);
pduel
->
write_buffer8
(
playerid
);
shuffle
(
playerid
,
LOCATION_DECK
);
...
...
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