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
d76bed25
Commit
d76bed25
authored
Nov 13, 2017
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updg
parent
71e3e294
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
14 deletions
+39
-14
gframe/client_field.cpp
gframe/client_field.cpp
+1
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+38
-14
No files found.
gframe/client_field.cpp
View file @
d76bed25
...
@@ -340,6 +340,7 @@ void ClientField::ClearCommandFlag() {
...
@@ -340,6 +340,7 @@ void ClientField::ClearCommandFlag() {
(
*
cit
)
->
cmdFlag
=
0
;
(
*
cit
)
->
cmdFlag
=
0
;
for
(
cit
=
attackable_cards
.
begin
();
cit
!=
attackable_cards
.
end
();
++
cit
)
for
(
cit
=
attackable_cards
.
begin
();
cit
!=
attackable_cards
.
end
();
++
cit
)
(
*
cit
)
->
cmdFlag
=
0
;
(
*
cit
)
->
cmdFlag
=
0
;
conti_cards
.
clear
();
deck_act
=
false
;
deck_act
=
false
;
extra_act
=
false
;
extra_act
=
false
;
grave_act
=
false
;
grave_act
=
false
;
...
...
gframe/duelclient.cpp
View file @
d76bed25
...
@@ -977,26 +977,38 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -977,26 +977,38 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
MSG_SELECT_BATTLECMD
:
{
case
MSG_SELECT_BATTLECMD
:
{
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int selecting_player = */
BufferIO
::
ReadInt8
(
pbuf
);
int
/*code, */
desc
,
count
,
con
,
loc
,
seq
/*, diratt*/
;
int
code
,
desc
,
count
,
con
,
loc
,
seq
/*, diratt*/
;
ClientCard
*
pcard
;
ClientCard
*
pcard
;
mainGame
->
dField
.
activatable_cards
.
clear
();
mainGame
->
dField
.
activatable_cards
.
clear
();
mainGame
->
dField
.
activatable_descs
.
clear
();
mainGame
->
dField
.
activatable_descs
.
clear
();
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
/*code = */
BufferIO
::
ReadInt32
(
pbuf
);
code
=
BufferIO
::
ReadInt32
(
pbuf
);
con
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
con
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
loc
=
BufferIO
::
ReadInt8
(
pbuf
);
seq
=
BufferIO
::
ReadInt8
(
pbuf
);
seq
=
BufferIO
::
ReadInt8
(
pbuf
);
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
int
flag
=
0
;
if
(
code
&
0x80000000
)
{
flag
=
EDESC_OPERATION
;
code
&=
0x7fffffff
;
}
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
0
));
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
if
(
flag
==
EDESC_OPERATION
)
{
pcard
->
chain_code
=
code
;
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_act
=
true
;
pcard
->
cmdFlag
|=
COMMAND_OPERATION
;
}
else
{
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
if
(
pcard
->
location
==
LOCATION_GRAVE
)
if
(
pcard
->
location
==
LOCATION_GRAVE
)
mainGame
->
dField
.
grave_act
=
true
;
mainGame
->
dField
.
grave_act
=
true
;
else
if
(
pcard
->
location
==
LOCATION_REMOVED
)
else
if
(
pcard
->
location
==
LOCATION_REMOVED
)
mainGame
->
dField
.
remove_act
=
true
;
mainGame
->
dField
.
remove_act
=
true
;
}
}
}
mainGame
->
dField
.
attackable_cards
.
clear
();
mainGame
->
dField
.
attackable_cards
.
clear
();
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
...
@@ -1106,14 +1118,26 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1106,14 +1118,26 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
seq
=
BufferIO
::
ReadInt8
(
pbuf
);
seq
=
BufferIO
::
ReadInt8
(
pbuf
);
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
int
flag
=
0
;
if
(
code
&
0x80000000
)
{
flag
=
EDESC_OPERATION
;
code
&=
0x7fffffff
;
}
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
0
));
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
));
if
(
flag
==
EDESC_OPERATION
)
{
pcard
->
chain_code
=
code
;
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_act
=
true
;
pcard
->
cmdFlag
|=
COMMAND_OPERATION
;
}
else
{
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
if
(
pcard
->
location
==
LOCATION_GRAVE
)
if
(
pcard
->
location
==
LOCATION_GRAVE
)
mainGame
->
dField
.
grave_act
=
true
;
mainGame
->
dField
.
grave_act
=
true
;
else
if
(
pcard
->
location
==
LOCATION_REMOVED
)
else
if
(
pcard
->
location
==
LOCATION_REMOVED
)
mainGame
->
dField
.
remove_act
=
true
;
mainGame
->
dField
.
remove_act
=
true
;
}
}
}
if
(
BufferIO
::
ReadInt8
(
pbuf
))
{
if
(
BufferIO
::
ReadInt8
(
pbuf
))
{
mainGame
->
btnBP
->
setVisible
(
true
);
mainGame
->
btnBP
->
setVisible
(
true
);
mainGame
->
btnBP
->
setEnabled
(
true
);
mainGame
->
btnBP
->
setEnabled
(
true
);
...
...
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