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
f54dcd0a
Commit
f54dcd0a
authored
Sep 21, 2016
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix MSG_SELECT_CHAIN
parent
64f6ff07
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
23 deletions
+16
-23
gframe/client_field.h
gframe/client_field.h
+1
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+5
-10
gframe/event_handler.cpp
gframe/event_handler.cpp
+8
-8
ocgcore
ocgcore
+1
-1
script
script
+1
-1
No files found.
gframe/client_field.h
View file @
f54dcd0a
...
@@ -37,9 +37,7 @@ public:
...
@@ -37,9 +37,7 @@ public:
std
::
vector
<
ClientCard
*>
activatable_cards
;
std
::
vector
<
ClientCard
*>
activatable_cards
;
std
::
vector
<
ClientCard
*>
attackable_cards
;
std
::
vector
<
ClientCard
*>
attackable_cards
;
std
::
vector
<
ClientCard
*>
conti_cards
;
std
::
vector
<
ClientCard
*>
conti_cards
;
std
::
vector
<
int
>
activatable_descs
;
std
::
vector
<
std
::
pair
<
int
,
int
>>
activatable_descs
;
std
::
set
<
int
>
reset_descs
;
std
::
set
<
int
>
conti_descs
;
std
::
vector
<
int
>
select_options
;
std
::
vector
<
int
>
select_options
;
std
::
vector
<
ChainInfo
>
chains
;
std
::
vector
<
ChainInfo
>
chains
;
int
extra_p_count
[
2
];
int
extra_p_count
[
2
];
...
...
gframe/duelclient.cpp
View file @
f54dcd0a
...
@@ -943,7 +943,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -943,7 +943,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
desc
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
0
)
);
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
;
...
@@ -1057,7 +1057,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1057,7 +1057,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
pcard
=
mainGame
->
dField
.
GetCard
(
con
,
loc
,
seq
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
desc
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
0
)
);
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
;
...
@@ -1204,8 +1204,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1204,8 +1204,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
activatable_cards
.
clear
();
mainGame
->
dField
.
activatable_cards
.
clear
();
mainGame
->
dField
.
activatable_descs
.
clear
();
mainGame
->
dField
.
activatable_descs
.
clear
();
mainGame
->
dField
.
conti_cards
.
clear
();
mainGame
->
dField
.
conti_cards
.
clear
();
mainGame
->
dField
.
reset_descs
.
clear
();
mainGame
->
dField
.
conti_descs
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
flag
=
BufferIO
::
ReadInt8
(
pbuf
);
int
flag
=
BufferIO
::
ReadInt8
(
pbuf
);
code
=
BufferIO
::
ReadInt32
(
pbuf
);
code
=
BufferIO
::
ReadInt32
(
pbuf
);
...
@@ -1216,22 +1214,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1216,22 +1214,19 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
desc
=
BufferIO
::
ReadInt32
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
,
ss
);
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
,
ss
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
desc
);
mainGame
->
dField
.
activatable_descs
.
push_back
(
std
::
make_pair
(
desc
,
flag
)
);
pcard
->
is_selected
=
false
;
pcard
->
is_selected
=
false
;
if
(
flag
==
0x1
)
{
if
(
flag
==
EDESC_OPERATION
)
{
pcard
->
is_conti
=
true
;
pcard
->
is_conti
=
true
;
pcard
->
chain_code
=
code
;
pcard
->
chain_code
=
code
;
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_cards
.
push_back
(
pcard
);
mainGame
->
dField
.
conti_act
=
true
;
mainGame
->
dField
.
conti_act
=
true
;
mainGame
->
dField
.
conti_descs
.
insert
(
desc
);
conti_exist
=
true
;
conti_exist
=
true
;
}
else
{
}
else
{
pcard
->
chain_code
=
code
;
pcard
->
chain_code
=
code
;
pcard
->
is_selectable
=
true
;
pcard
->
is_selectable
=
true
;
if
(
flag
==
0x2
)
{
if
(
flag
==
EDESC_RESET
)
pcard
->
cmdFlag
|=
COMMAND_RESET
;
pcard
->
cmdFlag
|=
COMMAND_RESET
;
mainGame
->
dField
.
reset_descs
.
insert
(
desc
);
}
else
else
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
pcard
->
cmdFlag
|=
COMMAND_ACTIVATE
;
if
(
l
==
LOCATION_GRAVE
)
if
(
l
==
LOCATION_GRAVE
)
...
...
gframe/event_handler.cpp
View file @
f54dcd0a
...
@@ -388,15 +388,15 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -388,15 +388,15 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
DuelClient
::
SetResponseI
(
selected_option
);
DuelClient
::
SetResponseI
(
selected_option
);
}
else
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_IDLECMD
)
{
}
else
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_IDLECMD
)
{
int
index
=
0
;
int
index
=
0
;
while
(
activatable_cards
[
index
]
!=
command_card
||
activatable_descs
[
index
]
!=
select_options
[
selected_option
])
index
++
;
while
(
activatable_cards
[
index
]
!=
command_card
||
activatable_descs
[
index
]
.
first
!=
select_options
[
selected_option
])
index
++
;
DuelClient
::
SetResponseI
((
index
<<
16
)
+
5
);
DuelClient
::
SetResponseI
((
index
<<
16
)
+
5
);
}
else
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_BATTLECMD
)
{
}
else
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_BATTLECMD
)
{
int
index
=
0
;
int
index
=
0
;
while
(
activatable_cards
[
index
]
!=
command_card
||
activatable_descs
[
index
]
!=
select_options
[
selected_option
])
index
++
;
while
(
activatable_cards
[
index
]
!=
command_card
||
activatable_descs
[
index
]
.
first
!=
select_options
[
selected_option
])
index
++
;
DuelClient
::
SetResponseI
(
index
<<
16
);
DuelClient
::
SetResponseI
(
index
<<
16
);
}
else
{
}
else
{
int
index
=
0
;
int
index
=
0
;
while
(
activatable_cards
[
index
]
!=
command_card
||
activatable_descs
[
index
]
!=
select_options
[
selected_option
])
index
++
;
while
(
activatable_cards
[
index
]
!=
command_card
||
activatable_descs
[
index
]
.
first
!=
select_options
[
selected_option
])
index
++
;
DuelClient
::
SetResponseI
(
index
);
DuelClient
::
SetResponseI
(
index
);
}
}
mainGame
->
HideElement
(
mainGame
->
wOptions
,
true
);
mainGame
->
HideElement
(
mainGame
->
wOptions
,
true
);
...
@@ -430,14 +430,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -430,14 +430,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
select_options
.
clear
();
select_options
.
clear
();
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
if
(
activatable_cards
[
i
]
==
clicked_card
)
{
if
(
activatable_cards
[
i
]
==
clicked_card
)
{
if
(
conti_descs
.
find
(
activatable_descs
[
i
])
!=
conti_descs
.
end
()
)
if
(
activatable_descs
[
i
].
second
==
EDESC_OPERATION
)
continue
;
continue
;
if
(
reset_descs
.
find
(
activatable_descs
[
i
])
!=
reset_descs
.
end
()
)
{
if
(
activatable_descs
[
i
].
second
==
EDESC_RESET
)
{
if
(
id
==
BUTTON_CMD_ACTIVATE
)
continue
;
if
(
id
==
BUTTON_CMD_ACTIVATE
)
continue
;
}
else
{
}
else
{
if
(
id
==
BUTTON_CMD_RESET
)
continue
;
if
(
id
==
BUTTON_CMD_RESET
)
continue
;
}
}
select_options
.
push_back
(
activatable_descs
[
i
]);
select_options
.
push_back
(
activatable_descs
[
i
]
.
first
);
if
(
index
==
-
1
)
index
=
i
;
if
(
index
==
-
1
)
index
=
i
;
}
}
}
}
...
@@ -708,12 +708,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -708,12 +708,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
select_options
.
clear
();
select_options
.
clear
();
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
activatable_cards
.
size
();
++
i
)
{
if
(
activatable_cards
[
i
]
==
command_card
)
{
if
(
activatable_cards
[
i
]
==
command_card
)
{
if
(
conti_descs
.
find
(
activatable_descs
[
i
])
!=
conti_descs
.
end
()
)
{
if
(
activatable_descs
[
i
].
second
==
EDESC_OPERATION
)
{
if
(
list_command
==
COMMAND_ACTIVATE
)
continue
;
if
(
list_command
==
COMMAND_ACTIVATE
)
continue
;
}
else
{
}
else
{
if
(
list_command
==
COMMAND_OPERATION
)
continue
;
if
(
list_command
==
COMMAND_OPERATION
)
continue
;
}
}
select_options
.
push_back
(
activatable_descs
[
i
]);
select_options
.
push_back
(
activatable_descs
[
i
]
.
first
);
if
(
index
==
-
1
)
index
=
i
;
if
(
index
==
-
1
)
index
=
i
;
}
}
}
}
...
...
ocgcore
@
9b3dbc2c
Subproject commit
886141f3960660a10d1ecd99ccbc745b61a16b51
Subproject commit
9b3dbc2c28d1e4f37d24cd1779cac93f59674e45
script
@
caba7e1f
Subproject commit
69d9a3241eb9841fb3433e45d2c43cf13d5f9412
Subproject commit
caba7e1f82e5286e5ed165f9aea46cb798e019df
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