Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
Commits
a4a88216
Commit
a4a88216
authored
Mar 30, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
5ebdc826
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
Classes/ocgcore/card.cpp
Classes/ocgcore/card.cpp
+3
-2
Classes/ocgcore/interpreter.cpp
Classes/ocgcore/interpreter.cpp
+4
-0
Classes/ocgcore/libduel.cpp
Classes/ocgcore/libduel.cpp
+1
-1
Classes/ocgcore/ocgapi.cpp
Classes/ocgcore/ocgapi.cpp
+3
-1
No files found.
Classes/ocgcore/card.cpp
View file @
a4a88216
...
@@ -43,9 +43,10 @@ bool card::card_operation_sort(card* c1, card* c2) {
...
@@ -43,9 +43,10 @@ bool card::card_operation_sort(card* c1, card* c2) {
if
(
c1
->
current
.
location
!=
c2
->
current
.
location
)
if
(
c1
->
current
.
location
!=
c2
->
current
.
location
)
return
c1
->
current
.
location
<
c2
->
current
.
location
;
return
c1
->
current
.
location
<
c2
->
current
.
location
;
if
(
c1
->
current
.
location
&
LOCATION_OVERLAY
)
{
if
(
c1
->
current
.
location
&
LOCATION_OVERLAY
)
{
if
(
c1
->
overlay_target
->
current
.
sequence
!=
c2
->
overlay_target
->
current
.
sequence
)
if
(
c1
->
overlay_target
&&
c2
->
overlay_target
&&
c1
->
overlay_target
->
current
.
sequence
!=
c2
->
overlay_target
->
current
.
sequence
)
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
return
c1
->
overlay_target
->
current
.
sequence
<
c2
->
overlay_target
->
current
.
sequence
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
else
return
c1
->
current
.
sequence
<
c2
->
current
.
sequence
;
}
else
{
}
else
{
if
(
c1
->
current
.
location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
|
LOCATION_GRAVE
|
LOCATION_REMOVED
))
if
(
c1
->
current
.
location
&
(
LOCATION_DECK
|
LOCATION_EXTRA
|
LOCATION_GRAVE
|
LOCATION_REMOVED
))
return
c1
->
current
.
sequence
>
c2
->
current
.
sequence
;
return
c1
->
current
.
sequence
>
c2
->
current
.
sequence
;
...
...
Classes/ocgcore/interpreter.cpp
View file @
a4a88216
...
@@ -30,6 +30,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -30,6 +30,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal
(
lua_state
,
"package"
);
lua_setglobal
(
lua_state
,
"package"
);
lua_pushnil
(
lua_state
);
lua_pushnil
(
lua_state
);
lua_setglobal
(
lua_state
,
"debug"
);
lua_setglobal
(
lua_state
,
"debug"
);
lua_pushnil
(
lua_state
);
lua_setglobal
(
lua_state
,
"coroutine"
);
luaL_getsubtable
(
lua_state
,
LUA_REGISTRYINDEX
,
"_LOADED"
);
luaL_getsubtable
(
lua_state
,
LUA_REGISTRYINDEX
,
"_LOADED"
);
lua_pushnil
(
lua_state
);
lua_pushnil
(
lua_state
);
lua_setfield
(
lua_state
,
-
2
,
"io"
);
lua_setfield
(
lua_state
,
-
2
,
"io"
);
...
@@ -39,6 +41,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -39,6 +41,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setfield
(
lua_state
,
-
2
,
"package"
);
lua_setfield
(
lua_state
,
-
2
,
"package"
);
lua_pushnil
(
lua_state
);
lua_pushnil
(
lua_state
);
lua_setfield
(
lua_state
,
-
2
,
"debug"
);
lua_setfield
(
lua_state
,
-
2
,
"debug"
);
lua_pushnil
(
lua_state
);
lua_setfield
(
lua_state
,
-
2
,
"coroutine"
);
lua_pop
(
lua_state
,
1
);
lua_pop
(
lua_state
,
1
);
//open all libs
//open all libs
scriptlib
::
open_cardlib
(
lua_state
);
scriptlib
::
open_cardlib
(
lua_state
);
...
...
Classes/ocgcore/libduel.cpp
View file @
a4a88216
...
@@ -1804,7 +1804,7 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
...
@@ -1804,7 +1804,7 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
pduel
=
pgroup
->
pduel
;
pduel
=
pgroup
->
pduel
;
}
else
}
else
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
return
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint8
sumplayer
;
uint8
sumplayer
=
PLAYER_NONE
;
if
(
pcard
)
{
if
(
pcard
)
{
sumplayer
=
pcard
->
summon_player
;
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
...
...
Classes/ocgcore/ocgapi.cpp
View file @
a4a88216
...
@@ -265,7 +265,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
...
@@ -265,7 +265,7 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
}
}
}
}
else
{
else
{
field
::
card_vector
*
lst
=
0
;
field
::
card_vector
*
lst
=
nullptr
;
if
(
location
==
LOCATION_HAND
)
if
(
location
==
LOCATION_HAND
)
lst
=
&
player
.
list_hand
;
lst
=
&
player
.
list_hand
;
else
if
(
location
==
LOCATION_GRAVE
)
else
if
(
location
==
LOCATION_GRAVE
)
...
@@ -276,6 +276,8 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
...
@@ -276,6 +276,8 @@ extern "C" DECL_DLLEXPORT int32 query_field_card(ptr pduel, uint8 playerid, uint
lst
=
&
player
.
list_extra
;
lst
=
&
player
.
list_extra
;
else
if
(
location
==
LOCATION_DECK
)
else
if
(
location
==
LOCATION_DECK
)
lst
=
&
player
.
list_main
;
lst
=
&
player
.
list_main
;
else
return
0
;
for
(
auto
&
pcard
:
*
lst
)
{
for
(
auto
&
pcard
:
*
lst
)
{
uint32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
uint32
clen
=
pcard
->
get_infos
(
p
,
query_flag
,
use_cache
);
p
+=
clen
;
p
+=
clen
;
...
...
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