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
395605e8
Commit
395605e8
authored
Dec 21, 2011
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
11cad46b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
16 deletions
+18
-16
gframe/message.cpp
gframe/message.cpp
+4
-2
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+6
-7
ocgcore/playerop.cpp
ocgcore/playerop.cpp
+4
-4
ocgcore/processor.cpp
ocgcore/processor.cpp
+2
-2
script/c69031175.lua
script/c69031175.lua
+1
-0
script/utility.lua
script/utility.lua
+1
-1
No files found.
gframe/message.cpp
View file @
395605e8
...
...
@@ -530,7 +530,7 @@ void Game::Analyze(void* pd, char* engbuf) {
case
MSG_SELECT_CHAIN
:
{
player
=
NetManager
::
ReadInt8
(
pbuf
);
count
=
NetManager
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
12
;
pbuf
+=
9
+
count
*
11
;
mainGame
->
SendGameMessage
(
player
,
offset
,
pbuf
-
offset
);
mainGame
->
WaitforResponse
(
player
);
break
;
...
...
@@ -1593,6 +1593,8 @@ bool Game::SolveMessage(void* pd, char* msg, int len) {
int
selecting_player
=
NetManager
::
ReadInt8
(
pbuf
);
int
count
=
NetManager
::
ReadInt8
(
pbuf
);
int
specount
=
NetManager
::
ReadInt8
(
pbuf
);
int
hint0
=
NetManager
::
ReadInt32
(
pbuf
);
int
hint1
=
NetManager
::
ReadInt32
(
pbuf
);
int
c
,
l
,
s
,
code
,
desc
;
ClientCard
*
pcard
;
mainGame
->
dField
.
activatable_cards
.
clear
();
...
...
@@ -3242,7 +3244,7 @@ bool Game::AnalyzeReplay(void* pd, char* engbuf) {
case
MSG_SELECT_CHAIN
:
{
player
=
NetManager
::
ReadInt8
(
pbuf
);
count
=
NetManager
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
12
;
pbuf
+=
9
+
count
*
11
;
return
rep
.
ReadNextResponse
();
}
case
MSG_SELECT_PLACE
:
...
...
ocgcore/interpreter.cpp
View file @
395605e8
...
...
@@ -939,7 +939,7 @@ int32 interpreter::call_coroutine(int32 f, uint32 param_count, uint32 * yield_va
return
COROUTINE_ERROR
;
}
}
//Convert a pointer to a lua value,
use "p"+pointer value as the name,
+1 -0
//Convert a pointer to a lua value, +1 -0
void
interpreter
::
card2value
(
lua_State
*
L
,
card
*
pcard
)
{
if
(
!
pcard
||
pcard
->
ref_handle
==
0
)
lua_pushnil
(
L
);
...
...
@@ -970,13 +970,12 @@ int32 interpreter::get_function_handle(lua_State* L, int32 index) {
return
ref
;
}
void
interpreter
::
set_duel_info
(
lua_State
*
L
,
duel
*
pduel
)
{
lua_pushinteger
(
L
,
(
ptr
)
pduel
);
int32
ref
=
luaL_ref
(
L
,
LUA_REGISTRYINDEX
);
lua_setglobal
(
L
,
"__duel"
);
lua_pushlightuserdata
(
L
,
pduel
);
luaL_ref
(
L
,
LUA_REGISTRYINDEX
);
}
duel
*
interpreter
::
get_duel_info
(
lua_State
*
L
)
{
lua_
getglobal
(
L
,
"__duel"
);
ptr
pduel
=
lua_tointeg
er
(
L
,
-
1
);
lua_
rawgeti
(
L
,
LUA_REGISTRYINDEX
,
3
);
duel
*
pduel
=
(
duel
*
)
lua_topoint
er
(
L
,
-
1
);
lua_pop
(
L
,
1
);
return
(
duel
*
)
pduel
;
return
pduel
;
}
ocgcore/playerop.cpp
View file @
395605e8
...
...
@@ -272,12 +272,12 @@ int32 field::select_chain(uint16 step, uint8 playerid, uint8 spe_count) {
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer8
(
core
.
select_chains
.
size
());
pduel
->
write_buffer8
(
spe_count
);
effect
*
peffect
;
card
*
pcard
;
pduel
->
write_buffer32
(
pduel
->
game_field
->
core
.
hint_timing
[
playerid
])
;
pduel
->
write_buffer32
(
pduel
->
game_field
->
core
.
hint_timing
[
1
-
playerid
])
;
std
::
sort
(
core
.
select_chains
.
begin
(),
core
.
select_chains
.
end
(),
chain
::
chain_operation_sort
);
for
(
uint32
i
=
0
;
i
<
core
.
select_chains
.
size
();
++
i
)
{
peffect
=
core
.
select_chains
[
i
].
triggering_effect
;
pcard
=
peffect
->
handler
;
effect
*
peffect
=
core
.
select_chains
[
i
].
triggering_effect
;
card
*
pcard
=
peffect
->
handler
;
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
pduel
->
write_buffer8
(
pcard
->
current
.
controler
);
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
...
...
ocgcore/processor.cpp
View file @
395605e8
...
...
@@ -2464,8 +2464,8 @@ int32 field::process_battle_command(uint16 step) {
return
FALSE
;
}
}
core
.
attack_target
=
0
;
core
.
units
.
begin
()
->
step
=
6
;
returns
.
ivalue
[
0
]
=
-
2
;
core
.
units
.
begin
()
->
step
=
5
;
return
FALSE
;
}
if
(
core
.
units
.
begin
()
->
arg2
)
{
...
...
script/c69031175.lua
View file @
395605e8
...
...
@@ -12,6 +12,7 @@ function c69031175.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e2
:
SetValue
(
1
)
c
:
RegisterEffect
(
e2
)
--counter
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
script/utility.lua
View file @
395605e8
...
...
@@ -241,7 +241,7 @@ function Auxiliary.FOperationCode2(code1,code2,sub,insf)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
if
gc
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
local
g1
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter21
,
1
,
1
,
nil
,
code1
,
code2
)
local
g1
=
e
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter21
,
1
,
1
,
nil
,
code1
,
code2
)
Duel
.
SetFusionMaterial
(
g1
)
return
end
...
...
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