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
8af6db19
Commit
8af6db19
authored
Mar 25, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
e8edb598
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
41 deletions
+44
-41
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-2
gframe/gframe.cpp
gframe/gframe.cpp
+33
-33
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+6
-1
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+1
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+0
-1
script/c10000040.lua
script/c10000040.lua
+1
-1
script/c1498130.lua
script/c1498130.lua
+1
-1
system.conf
system.conf
+1
-1
No files found.
gframe/duelclient.cpp
View file @
8af6db19
...
@@ -1996,8 +1996,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -1996,8 +1996,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
code
=
BufferIO
::
ReadInt32
(
pbuf
);
int
code
=
BufferIO
::
ReadInt32
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
player
,
LOCATION_DECK
,
mainGame
->
dField
.
deck
[
player
].
size
()
-
1
-
i
);
pcard
=
mainGame
->
dField
.
GetCard
(
player
,
LOCATION_DECK
,
mainGame
->
dField
.
deck
[
player
].
size
()
-
1
-
i
);
if
(
code
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
}
}
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
...
...
gframe/gframe.cpp
View file @
8af6db19
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <event2/thread.h>
#include <event2/thread.h>
bool
enable_log
=
false
;
bool
enable_log
=
false
;
bool
exit_on_return
=
false
;
bool
exit_on_return
=
false
;
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
#ifdef _WIN32
#ifdef _WIN32
...
@@ -19,38 +19,38 @@ int main(int argc, char* argv[]) {
...
@@ -19,38 +19,38 @@ int main(int argc, char* argv[]) {
ygo
::
mainGame
=
&
_game
;
ygo
::
mainGame
=
&
_game
;
if
(
!
ygo
::
mainGame
->
Initialize
())
if
(
!
ygo
::
mainGame
->
Initialize
())
return
0
;
return
0
;
if
(
argc
>=
2
)
if
(
argc
>=
2
)
if
(
!
strcmp
(
argv
[
1
],
"-debug"
))
if
(
!
strcmp
(
argv
[
1
],
"-debug"
))
enable_log
=
true
;
enable_log
=
true
;
/*command line args:
/*command line args:
* -j: join host (host info from system.conf)
* -j: join host (host info from system.conf)
* -d: deck edit
* -d: deck edit
* -r: replay */
* -r: replay */
else
if
(
!
strcmp
(
argv
[
1
],
"-j"
)
or
!
strcmp
(
argv
[
1
],
"-d"
)
or
!
strcmp
(
argv
[
1
],
"-r"
)){
else
if
(
!
strcmp
(
argv
[
1
],
"-j"
)
or
!
strcmp
(
argv
[
1
],
"-d"
)
or
!
strcmp
(
argv
[
1
],
"-r"
))
{
exit_on_return
=
true
;
exit_on_return
=
true
;
irr
::
SEvent
event
;
irr
::
SEvent
event
;
event
.
EventType
=
irr
::
EET_GUI_EVENT
;
event
.
EventType
=
irr
::
EET_GUI_EVENT
;
event
.
GUIEvent
.
EventType
=
irr
::
gui
::
EGET_BUTTON_CLICKED
;
event
.
GUIEvent
.
EventType
=
irr
::
gui
::
EGET_BUTTON_CLICKED
;
if
(
!
strcmp
(
argv
[
1
],
"-j"
)){
if
(
!
strcmp
(
argv
[
1
],
"-j"
))
{
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnLanMode
;
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnLanMode
;
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnJoinHost
;
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnJoinHost
;
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
}
else
if
(
!
strcmp
(
argv
[
1
],
"-d"
)){
}
else
if
(
!
strcmp
(
argv
[
1
],
"-d"
))
{
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnDeckEdit
;
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnDeckEdit
;
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
}
else
if
(
!
strcmp
(
argv
[
1
],
"-r"
))
{
}
else
if
(
!
strcmp
(
argv
[
1
],
"-r"
))
{
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnReplayMode
;
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnReplayMode
;
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
ygo
::
mainGame
->
lstReplayList
->
setSelected
(
0
);
ygo
::
mainGame
->
lstReplayList
->
setSelected
(
0
);
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnLoadReplay
;
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnLoadReplay
;
}
}
}
}
ygo
::
mainGame
->
MainLoop
();
ygo
::
mainGame
->
MainLoop
();
#ifdef _WIN32
#ifdef _WIN32
WSACleanup
();
WSACleanup
();
#else
#else
#endif //_WIN32
#endif //_WIN32
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
}
gframe/replay_mode.cpp
View file @
8af6db19
...
@@ -135,7 +135,12 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -135,7 +135,12 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
mainGame
->
dInfo
.
curMsg
=
BufferIO
::
ReadUInt8
(
pbuf
);
switch
(
mainGame
->
dInfo
.
curMsg
)
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_RETRY
:
{
case
MSG_RETRY
:
{
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
stMessage
->
setText
(
L"Error occurs."
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
actionSignal
.
Reset
();
mainGame
->
actionSignal
.
Wait
();
return
false
;
return
false
;
}
}
case
MSG_HINT
:
{
case
MSG_HINT
:
{
...
...
ocgcore/libcard.cpp
View file @
8af6db19
...
@@ -897,7 +897,7 @@ int32 scriptlib::card_is_relate_to_battle(lua_State *L) {
...
@@ -897,7 +897,7 @@ int32 scriptlib::card_is_relate_to_battle(lua_State *L) {
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
check_param
(
L
,
PARAM_TYPE_CARD
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
if
(
pcard
->
fieldid_r
==
pduel
->
game_field
->
core
.
pre_field
[
0
]
||
pcard
->
fieldid
==
pduel
->
game_field
->
core
.
pre_field
[
1
])
if
(
pcard
->
fieldid_r
==
pduel
->
game_field
->
core
.
pre_field
[
0
]
||
pcard
->
fieldid
_r
==
pduel
->
game_field
->
core
.
pre_field
[
1
])
lua_pushboolean
(
L
,
1
);
lua_pushboolean
(
L
,
1
);
else
else
lua_pushboolean
(
L
,
0
);
lua_pushboolean
(
L
,
0
);
...
...
ocgcore/processor.cpp
View file @
8af6db19
...
@@ -2804,7 +2804,6 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -2804,7 +2804,6 @@ int32 field::process_battle_command(uint16 step) {
reset_phase
(
PHASE_DAMAGE
);
reset_phase
(
PHASE_DAMAGE
);
adjust_instant
();
adjust_instant
();
adjust_all
();
adjust_all
();
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
return
FALSE
;
}
}
case
20
:
{
case
20
:
{
...
...
script/c10000040.lua
View file @
8af6db19
...
@@ -29,7 +29,7 @@ end
...
@@ -29,7 +29,7 @@ end
function
c10000040
.
spcon
(
e
,
c
)
function
c10000040
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
tp
=
c
:
GetControler
()
return
true
or
Duel
.
CheckReleaseGroup
(
tp
,
c10000040
.
spfilter
,
1
,
nil
,
10000000
)
return
Duel
.
CheckReleaseGroup
(
tp
,
c10000040
.
spfilter
,
1
,
nil
,
10000000
)
and
Duel
.
CheckReleaseGroup
(
tp
,
c10000040
.
spfilter
,
1
,
nil
,
10000010
)
and
Duel
.
CheckReleaseGroup
(
tp
,
c10000040
.
spfilter
,
1
,
nil
,
10000010
)
and
Duel
.
CheckReleaseGroup
(
tp
,
c10000040
.
spfilter
,
1
,
nil
,
10000020
)
and
Duel
.
CheckReleaseGroup
(
tp
,
c10000040
.
spfilter
,
1
,
nil
,
10000020
)
end
end
...
...
script/c1498130.lua
View file @
8af6db19
...
@@ -16,7 +16,7 @@ function c1498130.tgcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -16,7 +16,7 @@ function c1498130.tgcon(e,tp,eg,ep,ev,re,r,rp)
if
not
g
or
g
:
GetCount
()
~=
1
then
return
false
end
if
not
g
or
g
:
GetCount
()
~=
1
then
return
false
end
local
tg
=
g
:
GetFirst
()
local
tg
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
tg
==
c
or
tg
:
GetControler
()
~=
tp
or
tg
:
IsFacedown
()
or
or
not
tg
:
IsLocation
(
LOCATION_MZONE
)
or
not
tg
:
IsSetCard
(
0x3d
)
then
return
false
end
if
tg
==
c
or
tg
:
GetControler
()
~=
tp
or
tg
:
IsFacedown
()
or
not
tg
:
IsLocation
(
LOCATION_MZONE
)
or
not
tg
:
IsSetCard
(
0x3d
)
then
return
false
end
local
tf
=
re
:
GetTarget
()
local
tf
=
re
:
GetTarget
()
return
tf
(
re
,
rp
,
nil
,
nil
,
nil
,
nil
,
nil
,
nil
,
0
,
c
)
return
tf
(
re
,
rp
,
nil
,
nil
,
nil
,
nil
,
nil
,
nil
,
0
,
c
)
end
end
...
...
system.conf
View file @
8af6db19
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
antialias
=
2
antialias
=
2
nickname
=
Player
nickname
=
Player
gamename
=
Game
gamename
=
Game
lastdeck
=
chaosls
lastdeck
=
sixsamurai
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
serverport
=
7911
serverport
=
7911
...
...
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