Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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
List
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
fallenstardust
YGOMobile-Cn-Ko-En
Commits
d0880ec4
Commit
d0880ec4
authored
May 31, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
a06ab694
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
42 deletions
+34
-42
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+4
-6
Classes/ocgcore/card.h
Classes/ocgcore/card.h
+1
-0
Classes/ocgcore/common.h
Classes/ocgcore/common.h
+0
-3
Classes/ocgcore/duel.h
Classes/ocgcore/duel.h
+1
-0
Classes/ocgcore/field.h
Classes/ocgcore/field.h
+1
-0
Classes/ocgcore/group.h
Classes/ocgcore/group.h
+1
-0
Classes/ocgcore/libduel.cpp
Classes/ocgcore/libduel.cpp
+9
-11
Classes/ocgcore/playerop.cpp
Classes/ocgcore/playerop.cpp
+17
-22
No files found.
Classes/ocgcore/card.cpp
View file @
d0880ec4
...
@@ -23,9 +23,7 @@ const std::unordered_map<uint32, uint32> card::second_code = {
...
@@ -23,9 +23,7 @@ const std::unordered_map<uint32, uint32> card::second_code = {
{
CARD_HERMOS
,
10000070u
}
{
CARD_HERMOS
,
10000070u
}
};
};
bool
card_sort
::
operator
()(
void
*
const
&
p1
,
void
*
const
&
p2
)
const
{
bool
card_sort
::
operator
()(
card
*
const
&
c1
,
card
*
const
&
c2
)
const
{
card
*
c1
=
(
card
*
)
p1
;
card
*
c2
=
(
card
*
)
p2
;
return
c1
->
cardid
<
c2
->
cardid
;
return
c1
->
cardid
<
c2
->
cardid
;
}
}
bool
card_state
::
is_location
(
int32
loc
)
const
{
bool
card_state
::
is_location
(
int32
loc
)
const
{
...
@@ -97,7 +95,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
...
@@ -97,7 +95,7 @@ bool card::card_operation_sort(card* c1, card* c2) {
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
else
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
}
else
if
(
c1
->
current
.
location
&
LOCATION_DECK
&&
!
pduel
->
game_field
->
core
.
select_deck_seq_preserved
)
{
}
else
if
(
c1
->
current
.
location
&
LOCATION_DECK
&&
cp1
==
pduel
->
game_field
->
core
.
selecting_player
&&
!
pduel
->
game_field
->
core
.
select_deck_seq_preserved
)
{
// if deck reversed and the card being at the top, it should go first
// if deck reversed and the card being at the top, it should go first
if
(
pduel
->
game_field
->
core
.
deck_reversed
)
{
if
(
pduel
->
game_field
->
core
.
deck_reversed
)
{
if
(
c1
->
current
.
sequence
==
pduel
->
game_field
->
player
[
cp1
].
list_main
.
size
()
-
1
)
if
(
c1
->
current
.
sequence
==
pduel
->
game_field
->
player
[
cp1
].
list_main
.
size
()
-
1
)
...
@@ -1518,8 +1516,8 @@ int32 card::is_all_column() {
...
@@ -1518,8 +1516,8 @@ int32 card::is_all_column() {
return
FALSE
;
return
FALSE
;
}
}
uint8
card
::
get_select_sequence
(
uint8
*
deck_seq_pointer
)
{
uint8
card
::
get_select_sequence
(
uint8
*
deck_seq_pointer
)
{
if
(
current
.
location
==
LOCATION_DECK
&&
!
pduel
->
game_field
->
core
.
select_deck_seq_preserved
)
{
if
(
current
.
location
==
LOCATION_DECK
&&
current
.
controler
==
pduel
->
game_field
->
core
.
selecting_player
&&
!
pduel
->
game_field
->
core
.
select_deck_seq_preserved
)
{
return
deck_seq_pointer
[
current
.
controler
]
++
;
return
(
*
deck_seq_pointer
)
++
;
}
else
{
}
else
{
return
current
.
sequence
;
return
current
.
sequence
;
}
}
...
...
Classes/ocgcore/card.h
View file @
d0880ec4
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include "common.h"
#include "common.h"
#include "effectset.h"
#include "effectset.h"
#include "card_data.h"
#include "card_data.h"
#include "sort.h"
#include <set>
#include <set>
#include <map>
#include <map>
#include <unordered_set>
#include <unordered_set>
...
...
Classes/ocgcore/common.h
View file @
d0880ec4
...
@@ -42,9 +42,6 @@ typedef signed char int8;
...
@@ -42,9 +42,6 @@ typedef signed char int8;
#ifndef NULL
#ifndef NULL
#define NULL 0
#define NULL 0
#endif
#endif
struct
card_sort
{
bool
operator
()(
void
*
const
&
c1
,
void
*
const
&
c2
)
const
;
};
#define CURRENT_RULE 5
#define CURRENT_RULE 5
...
...
Classes/ocgcore/duel.h
View file @
d0880ec4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#define DUEL_H_
#define DUEL_H_
#include "common.h"
#include "common.h"
#include "sort.h"
#include "mtrandom.h"
#include "mtrandom.h"
#include <set>
#include <set>
#include <unordered_set>
#include <unordered_set>
...
...
Classes/ocgcore/field.h
View file @
d0880ec4
...
@@ -348,6 +348,7 @@ struct processor {
...
@@ -348,6 +348,7 @@ struct processor {
uint8
current_player
{
PLAYER_NONE
};
uint8
current_player
{
PLAYER_NONE
};
uint8
conti_player
{
PLAYER_NONE
};
uint8
conti_player
{
PLAYER_NONE
};
uint8
select_deck_seq_preserved
{
FALSE
};
uint8
select_deck_seq_preserved
{
FALSE
};
uint8
selecting_player
{
PLAYER_NONE
};
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
summon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
summon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
normalsummon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
normalsummon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
spsummon_counter
;
std
::
unordered_map
<
uint32
,
std
::
pair
<
uint32
,
uint32
>>
spsummon_counter
;
...
...
Classes/ocgcore/group.h
View file @
d0880ec4
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#define GROUP_H_
#define GROUP_H_
#include "common.h"
#include "common.h"
#include "sort.h"
#include <set>
#include <set>
#include <list>
#include <list>
...
...
Classes/ocgcore/libduel.cpp
View file @
d0880ec4
...
@@ -4358,7 +4358,7 @@ int32 scriptlib::duel_is_player_can_flipsummon(lua_State * L) {
...
@@ -4358,7 +4358,7 @@ int32 scriptlib::duel_is_player_can_flipsummon(lua_State * L) {
return
1
;
return
1
;
}
}
int32
scriptlib
::
duel_is_player_can_spsummon_monster
(
lua_State
*
L
)
{
int32
scriptlib
::
duel_is_player_can_spsummon_monster
(
lua_State
*
L
)
{
check_param_count
(
L
,
9
);
check_param_count
(
L
,
2
);
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
int32
playerid
=
(
int32
)
lua_tointeger
(
L
,
1
);
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
if
(
playerid
!=
0
&&
playerid
!=
1
)
{
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
...
@@ -4369,21 +4369,19 @@ int32 scriptlib::duel_is_player_can_spsummon_monster(lua_State * L) {
...
@@ -4369,21 +4369,19 @@ int32 scriptlib::duel_is_player_can_spsummon_monster(lua_State * L) {
::
read_card
(
code
,
&
dat
);
::
read_card
(
code
,
&
dat
);
dat
.
code
=
code
;
dat
.
code
=
code
;
dat
.
alias
=
0
;
dat
.
alias
=
0
;
if
(
!
lua_isnil
(
L
,
3
))
{
if
(
lua_gettop
(
L
)
>=
3
&&
!
lua_isnil
(
L
,
3
))
uint64
setcode_list
=
lua_tointeger
(
L
,
3
);
dat
.
set_setcode
((
uint64
)
lua_tointeger
(
L
,
3
));
dat
.
set_setcode
(
setcode_list
);
if
(
lua_gettop
(
L
)
>=
4
&&
!
lua_isnil
(
L
,
4
))
}
if
(
!
lua_isnil
(
L
,
4
))
dat
.
type
=
(
uint32
)
lua_tointeger
(
L
,
4
);
dat
.
type
=
(
uint32
)
lua_tointeger
(
L
,
4
);
if
(
!
lua_isnil
(
L
,
5
))
if
(
lua_gettop
(
L
)
>=
5
&&
!
lua_isnil
(
L
,
5
))
dat
.
attack
=
(
int32
)
lua_tointeger
(
L
,
5
);
dat
.
attack
=
(
int32
)
lua_tointeger
(
L
,
5
);
if
(
!
lua_isnil
(
L
,
6
))
if
(
lua_gettop
(
L
)
>=
6
&&
!
lua_isnil
(
L
,
6
))
dat
.
defense
=
(
int32
)
lua_tointeger
(
L
,
6
);
dat
.
defense
=
(
int32
)
lua_tointeger
(
L
,
6
);
if
(
!
lua_isnil
(
L
,
7
))
if
(
lua_gettop
(
L
)
>=
7
&&
!
lua_isnil
(
L
,
7
))
dat
.
level
=
(
uint32
)
lua_tointeger
(
L
,
7
);
dat
.
level
=
(
uint32
)
lua_tointeger
(
L
,
7
);
if
(
!
lua_isnil
(
L
,
8
))
if
(
lua_gettop
(
L
)
>=
8
&&
!
lua_isnil
(
L
,
8
))
dat
.
race
=
(
uint32
)
lua_tointeger
(
L
,
8
);
dat
.
race
=
(
uint32
)
lua_tointeger
(
L
,
8
);
if
(
!
lua_isnil
(
L
,
9
))
if
(
lua_gettop
(
L
)
>=
9
&&
!
lua_isnil
(
L
,
9
))
dat
.
attribute
=
(
uint32
)
lua_tointeger
(
L
,
9
);
dat
.
attribute
=
(
uint32
)
lua_tointeger
(
L
,
9
);
int32
pos
=
POS_FACEUP
;
int32
pos
=
POS_FACEUP
;
int32
toplayer
=
playerid
;
int32
toplayer
=
playerid
;
...
...
Classes/ocgcore/playerop.cpp
View file @
d0880ec4
...
@@ -226,6 +226,7 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
...
@@ -226,6 +226,7 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
returns
.
bvalue
[
0
]
=
0
;
returns
.
bvalue
[
0
]
=
0
;
if
(
max
==
0
||
core
.
select_cards
.
empty
())
if
(
max
==
0
||
core
.
select_cards
.
empty
())
return
TRUE
;
return
TRUE
;
core
.
selecting_player
=
playerid
;
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
core
.
select_cards
.
resize
(
UINT8_MAX
);
core
.
select_cards
.
resize
(
UINT8_MAX
);
...
@@ -248,12 +249,10 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
...
@@ -248,12 +249,10 @@ int32 field::select_card(uint16 step, uint8 playerid, uint8 cancelable, uint8 mi
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
uint8
deck_seq_pointer
[
2
];
uint8
deck_seq_pointer
=
0
;
deck_seq_pointer
[
0
]
=
0
;
deck_seq_pointer
[
1
]
=
0
;
for
(
auto
&
pcard
:
core
.
select_cards
)
{
for
(
auto
&
pcard
:
core
.
select_cards
)
{
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
get_select_info_location
(
deck_seq_pointer
));
pduel
->
write_buffer32
(
pcard
->
get_select_info_location
(
&
deck_seq_pointer
));
}
}
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
...
@@ -287,6 +286,7 @@ int32 field::select_unselect_card(uint16 step, uint8 playerid, uint8 cancelable,
...
@@ -287,6 +286,7 @@ int32 field::select_unselect_card(uint16 step, uint8 playerid, uint8 cancelable,
returns
.
bvalue
[
i
+
1
]
=
i
;
returns
.
bvalue
[
i
+
1
]
=
i
;
return
TRUE
;
return
TRUE
;
}
}
core
.
selecting_player
=
playerid
;
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
core
.
select_cards
.
resize
(
UINT8_MAX
);
core
.
select_cards
.
resize
(
UINT8_MAX
);
...
@@ -299,17 +299,15 @@ int32 field::select_unselect_card(uint16 step, uint8 playerid, uint8 cancelable,
...
@@ -299,17 +299,15 @@ int32 field::select_unselect_card(uint16 step, uint8 playerid, uint8 cancelable,
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
uint8
deck_seq_pointer
[
2
];
uint8
deck_seq_pointer
=
0
;
deck_seq_pointer
[
0
]
=
0
;
deck_seq_pointer
[
1
]
=
0
;
for
(
auto
&
pcard
:
core
.
select_cards
)
{
for
(
auto
&
pcard
:
core
.
select_cards
)
{
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
get_select_info_location
(
deck_seq_pointer
));
pduel
->
write_buffer32
(
pcard
->
get_select_info_location
(
&
deck_seq_pointer
));
}
}
pduel
->
write_buffer8
((
uint8
)
core
.
unselect_cards
.
size
());
pduel
->
write_buffer8
((
uint8
)
core
.
unselect_cards
.
size
());
for
(
auto
&
pcard
:
core
.
unselect_cards
)
{
for
(
auto
&
pcard
:
core
.
unselect_cards
)
{
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
get_select_info_location
(
deck_seq_pointer
));
pduel
->
write_buffer32
(
pcard
->
get_select_info_location
(
&
deck_seq_pointer
));
}
}
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
...
@@ -507,6 +505,7 @@ int32 field::select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8
...
@@ -507,6 +505,7 @@ int32 field::select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8
returns
.
bvalue
[
0
]
=
0
;
returns
.
bvalue
[
0
]
=
0
;
if
(
max
==
0
||
core
.
select_cards
.
empty
())
if
(
max
==
0
||
core
.
select_cards
.
empty
())
return
TRUE
;
return
TRUE
;
core
.
selecting_player
=
playerid
;
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
core
.
select_cards
.
resize
(
UINT8_MAX
);
core
.
select_cards
.
resize
(
UINT8_MAX
);
...
@@ -526,14 +525,12 @@ int32 field::select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8
...
@@ -526,14 +525,12 @@ int32 field::select_tribute(uint16 step, uint8 playerid, uint8 cancelable, uint8
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
uint8
deck_seq_pointer
[
2
];
uint8
deck_seq_pointer
=
0
;
deck_seq_pointer
[
0
]
=
0
;
deck_seq_pointer
[
1
]
=
0
;
for
(
auto
&
pcard
:
core
.
select_cards
)
{
for
(
auto
&
pcard
:
core
.
select_cards
)
{
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
deck_seq_pointer
));
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
&
deck_seq_pointer
));
pduel
->
write_buffer8
(
pcard
->
release_param
);
pduel
->
write_buffer8
(
pcard
->
release_param
);
}
}
return
FALSE
;
return
FALSE
;
...
@@ -597,15 +594,14 @@ int32 field::select_counter(uint16 step, uint8 playerid, uint16 countertype, uin
...
@@ -597,15 +594,14 @@ int32 field::select_counter(uint16 step, uint8 playerid, uint16 countertype, uin
pduel
->
write_buffer16
(
countertype
);
pduel
->
write_buffer16
(
countertype
);
pduel
->
write_buffer16
(
count
);
pduel
->
write_buffer16
(
count
);
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
core
.
selecting_player
=
playerid
;
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
uint8
deck_seq_pointer
[
2
];
uint8
deck_seq_pointer
=
0
;
deck_seq_pointer
[
0
]
=
0
;
deck_seq_pointer
[
1
]
=
0
;
for
(
auto
&
pcard
:
core
.
select_cards
)
{
for
(
auto
&
pcard
:
core
.
select_cards
)
{
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
deck_seq_pointer
));
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
&
deck_seq_pointer
));
pduel
->
write_buffer16
(
pcard
->
get_counter
(
countertype
));
pduel
->
write_buffer16
(
pcard
->
get_counter
(
countertype
));
}
}
return
FALSE
;
return
FALSE
;
...
@@ -640,6 +636,7 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
...
@@ -640,6 +636,7 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
returns
.
bvalue
[
0
]
=
0
;
returns
.
bvalue
[
0
]
=
0
;
if
(
core
.
select_cards
.
empty
())
if
(
core
.
select_cards
.
empty
())
return
TRUE
;
return
TRUE
;
core
.
selecting_player
=
playerid
;
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
std
::
sort
(
core
.
select_cards
.
begin
(),
core
.
select_cards
.
end
(),
card
::
card_operation_sort
);
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
if
(
core
.
select_cards
.
size
()
>
UINT8_MAX
)
core
.
select_cards
.
resize
(
UINT8_MAX
);
core
.
select_cards
.
resize
(
UINT8_MAX
);
...
@@ -657,14 +654,12 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
...
@@ -657,14 +654,12 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
min
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
(
max
);
pduel
->
write_buffer8
((
uint8
)
core
.
must_select_cards
.
size
());
pduel
->
write_buffer8
((
uint8
)
core
.
must_select_cards
.
size
());
uint8
deck_seq_pointer
[
2
];
uint8
deck_seq_pointer
=
0
;
deck_seq_pointer
[
0
]
=
0
;
deck_seq_pointer
[
1
]
=
0
;
for
(
auto
&
pcard
:
core
.
must_select_cards
)
{
for
(
auto
&
pcard
:
core
.
must_select_cards
)
{
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
deck_seq_pointer
));
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
&
deck_seq_pointer
));
pduel
->
write_buffer32
(
pcard
->
sum_param
);
pduel
->
write_buffer32
(
pcard
->
sum_param
);
}
}
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
pduel
->
write_buffer8
((
uint8
)
core
.
select_cards
.
size
());
...
@@ -672,7 +667,7 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
...
@@ -672,7 +667,7 @@ int32 field::select_with_sum_limit(int16 step, uint8 playerid, int32 acc, int32
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
deck_seq_pointer
));
pduel
->
write_buffer8
(
pcard
->
get_select_sequence
(
&
deck_seq_pointer
));
pduel
->
write_buffer32
(
pcard
->
sum_param
);
pduel
->
write_buffer32
(
pcard
->
sum_param
);
}
}
return
FALSE
;
return
FALSE
;
...
...
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