Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
REIKAI
ygopro
Commits
234a80bb
Commit
234a80bb
authored
Mar 10, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
57e9db08
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
17 deletions
+31
-17
gframe/client_field.cpp
gframe/client_field.cpp
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+22
-12
ocgcore/effect.cpp
ocgcore/effect.cpp
+1
-2
ocgcore/processor.cpp
ocgcore/processor.cpp
+6
-2
script/c87624166.lua
script/c87624166.lua
+1
-0
No files found.
gframe/client_field.cpp
View file @
234a80bb
...
@@ -124,7 +124,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
...
@@ -124,7 +124,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
pcard
->
sequence
=
sequence
;
pcard
->
sequence
=
sequence
;
switch
(
location
)
{
switch
(
location
)
{
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
if
(
sequence
!=
1
||
deck
[
controler
].
size
()
==
0
)
{
if
(
sequence
!=
0
||
deck
[
controler
].
size
()
==
0
)
{
deck
[
controler
].
push_back
(
pcard
);
deck
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
deck
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
deck
[
controler
].
size
()
-
1
;
}
else
{
}
else
{
...
...
gframe/duelclient.cpp
View file @
234a80bb
...
@@ -441,14 +441,16 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -441,14 +441,16 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Wait
();
mainGame
->
replaySignal
.
Wait
();
if
(
mainGame
->
actionParam
)
{
if
(
mainGame
->
actionParam
||
!
is_host
)
{
char
*
prep
=
pdata
;
char
*
prep
=
pdata
;
Replay
new_replay
;
Replay
new_replay
;
memcpy
(
&
new_replay
.
pheader
,
prep
,
sizeof
(
ReplayHeader
));
memcpy
(
&
new_replay
.
pheader
,
prep
,
sizeof
(
ReplayHeader
));
prep
+=
sizeof
(
ReplayHeader
);
prep
+=
sizeof
(
ReplayHeader
);
memcpy
(
new_replay
.
comp_data
,
prep
,
len
-
sizeof
(
ReplayHeader
)
-
1
);
memcpy
(
new_replay
.
comp_data
,
prep
,
len
-
sizeof
(
ReplayHeader
)
-
1
);
new_replay
.
comp_size
=
len
-
sizeof
(
ReplayHeader
)
-
1
;
new_replay
.
comp_size
=
len
-
sizeof
(
ReplayHeader
)
-
1
;
new_replay
.
SaveReplay
(
mainGame
->
ebRSName
->
getText
());
if
(
mainGame
->
actionParam
)
new_replay
.
SaveReplay
(
mainGame
->
ebRSName
->
getText
());
else
new_replay
.
SaveReplay
(
L"_LastReplay"
);
}
}
break
;
break
;
}
}
...
@@ -1232,19 +1234,22 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -1232,19 +1234,22 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
mainGame
->
dField
.
selectable_cards
.
clear
();
mainGame
->
dField
.
selectable_cards
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
code
=
BufferIO
::
ReadInt32
(
pbuf
);
code
=
BufferIO
::
ReadInt32
(
pbuf
);
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
pbuf
+=
3
;
l
=
BufferIO
::
ReadInt8
(
pbuf
);
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
s
=
BufferIO
::
ReadInt8
(
pbuf
);
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
code
!=
0
)
if
(
code
!=
0
)
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
}
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
code
);
mainGame
->
logParam
.
push_back
(
code
);
float
shift
=
-
0.15
f
;
float
shift
=
-
0.15
f
;
if
(
player
==
1
)
shift
=
0.15
f
;
if
(
player
==
1
)
shift
=
0.15
f
;
pcard
->
dPos
=
irr
::
core
::
vector3df
(
shift
,
0
,
0
);
pcard
->
dPos
=
irr
::
core
::
vector3df
(
shift
,
0
,
0
);
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
if
(
!
mainGame
->
dField
.
deck_reversed
)
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
pcard
->
aniFrame
=
5
;
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
WaitFrameSignal
(
45
);
...
@@ -1279,7 +1284,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -1279,7 +1284,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
float
shift
=
-
0.15
f
;
float
shift
=
-
0.15
f
;
if
(
c
==
0
&&
l
==
0x40
)
shift
=
0.15
f
;
if
(
c
==
0
&&
l
==
0x40
)
shift
=
0.15
f
;
pcard
->
dPos
=
irr
::
core
::
vector3df
(
shift
,
0
,
0
);
pcard
->
dPos
=
irr
::
core
::
vector3df
(
shift
,
0
,
0
);
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
if
((
l
==
LOCATION_DECK
)
&&
mainGame
->
dField
.
deck_reversed
)
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
else
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
3.14159
f
/
5.0
f
,
0
);
pcard
->
is_moving
=
true
;
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
pcard
->
aniFrame
=
5
;
mainGame
->
WaitFrameSignal
(
45
);
mainGame
->
WaitFrameSignal
(
45
);
...
@@ -1596,9 +1603,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -1596,9 +1603,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
mainGame
->
dField
.
AddCard
(
pcard
,
cc
,
cl
,
cs
);
mainGame
->
dField
.
AddCard
(
pcard
,
cc
,
cl
,
cs
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
if
(
pl
==
cl
&&
pc
==
cc
&&
(
cl
&
0x71
))
{
if
(
pl
==
cl
&&
pc
==
cc
&&
(
cl
&
0x71
))
{
pcard
->
dPos
=
irr
::
core
::
vector3df
(
-
0.
2
f
,
0
,
0
);
pcard
->
dPos
=
irr
::
core
::
vector3df
(
-
0.
3
f
,
0
,
0
);
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
pcard
->
dRot
=
irr
::
core
::
vector3df
(
0
,
0
,
0
);
if
(
pc
==
1
)
pcard
->
dPos
.
X
=
0.
2
f
;
if
(
pc
==
1
)
pcard
->
dPos
.
X
=
0.
3
f
;
pcard
->
is_moving
=
true
;
pcard
->
is_moving
=
true
;
pcard
->
aniFrame
=
5
;
pcard
->
aniFrame
=
5
;
mainGame
->
WaitFrameSignal
(
5
);
mainGame
->
WaitFrameSignal
(
5
);
...
@@ -1963,10 +1970,13 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -1963,10 +1970,13 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
ClientCard
*
pcard
;
ClientCard
*
pcard
;
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
);
if
(
code
)
pcard
->
SetCode
(
code
);
}
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
pcard
=
mainGame
->
dField
.
GetCard
(
player
,
LOCATION_DECK
,
mainGame
->
dField
.
deck
[
player
].
size
()
-
1
);
pcard
=
mainGame
->
dField
.
GetCard
(
player
,
LOCATION_DECK
,
mainGame
->
dField
.
deck
[
player
].
size
()
-
1
);
if
(
code
||
!
mainGame
->
dField
.
deck_reversed
)
pcard
->
SetCode
(
code
);
mainGame
->
dField
.
deck
[
player
].
erase
(
mainGame
->
dField
.
deck
[
player
].
end
()
-
1
);
mainGame
->
dField
.
deck
[
player
].
erase
(
mainGame
->
dField
.
deck
[
player
].
end
()
-
1
);
mainGame
->
dField
.
AddCard
(
pcard
,
player
,
LOCATION_HAND
,
0
);
mainGame
->
dField
.
AddCard
(
pcard
,
player
,
LOCATION_HAND
,
0
);
for
(
int
i
=
0
;
i
<
mainGame
->
dField
.
hand
[
player
].
size
();
++
i
)
for
(
int
i
=
0
;
i
<
mainGame
->
dField
.
hand
[
player
].
size
();
++
i
)
...
...
ocgcore/effect.cpp
View file @
234a80bb
...
@@ -258,8 +258,7 @@ int32 effect::is_activate_ready(uint8 playerid, tevent& e, int32 neglect_cond, i
...
@@ -258,8 +258,7 @@ int32 effect::is_activate_ready(uint8 playerid, tevent& e, int32 neglect_cond, i
return
TRUE
;
return
TRUE
;
}
}
int32
effect
::
is_condition_check
(
uint8
playerid
,
tevent
&
e
)
{
int32
effect
::
is_condition_check
(
uint8
playerid
,
tevent
&
e
)
{
if
((
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
if
((
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
&&
(
!
handler
->
is_position
(
POS_FACEUP
)))
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
return
FALSE
;
if
(
!
condition
)
if
(
!
condition
)
return
TRUE
;
return
TRUE
;
...
...
ocgcore/processor.cpp
View file @
234a80bb
...
@@ -947,8 +947,12 @@ int32 field::process() {
...
@@ -947,8 +947,12 @@ int32 field::process() {
tc
[
count
-
i
-
1
]
->
current
.
sequence
=
player
[
target_player
].
list_main
.
size
()
-
1
;
tc
[
count
-
i
-
1
]
->
current
.
sequence
=
player
[
target_player
].
list_main
.
size
()
-
1
;
}
}
}
}
pduel
->
write_buffer8
(
MSG_REFRESH_DECK
);
if
(
core
.
deck_reversed
)
{
pduel
->
write_buffer8
(
target_player
);
pduel
->
write_buffer8
(
MSG_DECK_TOP
);
pduel
->
write_buffer8
(
target_player
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
((
*
player
[
target_player
].
list_main
.
rbegin
())
->
data
.
code
);
}
core
.
units
.
pop_front
();
core
.
units
.
pop_front
();
}
}
return
pduel
->
bufferlen
;
return
pduel
->
bufferlen
;
...
...
script/c87624166.lua
View file @
234a80bb
...
@@ -41,6 +41,7 @@ function c87624166.destg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -41,6 +41,7 @@ function c87624166.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c87624166
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c87624166
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
c87624166
.
desfilter
,
Duel
.
GetTurnPlayer
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c87624166
.
desfilter
,
Duel
.
GetTurnPlayer
(),
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
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