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
f680beda
Commit
f680beda
authored
Dec 22, 2011
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message adjust
parent
395605e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
66 deletions
+21
-66
gframe/message.cpp
gframe/message.cpp
+11
-52
ocgcore/card.cpp
ocgcore/card.cpp
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+5
-0
ocgcore/field.h
ocgcore/field.h
+0
-2
ocgcore/operations.cpp
ocgcore/operations.cpp
+4
-12
No files found.
gframe/message.cpp
View file @
f680beda
...
...
@@ -658,7 +658,7 @@ void Game::Analyze(void* pd, char* engbuf) {
int
cl
=
pbuf
[
9
];
int
cs
=
pbuf
[
10
];
int
cp
=
pbuf
[
11
];
pbuf
+=
1
2
;
pbuf
+=
1
6
;
if
(
cl
==
LOCATION_REMOVED
&&
(
cp
&
POS_FACEDOWN
))
{
NetManager
::
WriteInt32
(
pbufw
,
0
);
mainGame
->
SendGameMessage
(
cc
,
offset
,
pbuf
-
offset
);
...
...
@@ -673,18 +673,6 @@ void Game::Analyze(void* pd, char* engbuf) {
mainGame
->
RefreshSingle
(
cc
,
cl
,
cs
);
break
;
}
case
MSG_DESTROY
:
{
pbuf
+=
8
;
mainGame
->
SendGameMessage
(
0
,
offset
,
pbuf
-
offset
);
mainGame
->
SendGameMessage
(
1
,
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_RELEASE
:
{
pbuf
+=
8
;
mainGame
->
SendGameMessage
(
0
,
offset
,
pbuf
-
offset
);
mainGame
->
SendGameMessage
(
1
,
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_POS_CHANGE
:
{
int
cc
=
pbuf
[
4
];
int
cl
=
pbuf
[
5
];
...
...
@@ -2168,6 +2156,7 @@ bool Game::SolveMessage(void* pd, char* msg, int len) {
int
cl
=
NetManager
::
ReadUInt8
(
pbuf
);
int
cs
=
NetManager
::
ReadInt8
(
pbuf
);
int
cp
=
NetManager
::
ReadInt8
(
pbuf
);
int
reason
=
NetManager
::
ReadInt32
(
pbuf
);
if
(
pl
==
0
)
{
ClientCard
*
pcard
=
new
ClientCard
();
pcard
->
position
=
cp
;
...
...
@@ -2306,24 +2295,6 @@ bool Game::SolveMessage(void* pd, char* msg, int len) {
}
return
true
;
}
case
MSG_DESTROY
:
{
int
code
=
NetManager
::
ReadInt32
(
pbuf
);
int
cc
=
mainGame
->
LocalPlayer
(
NetManager
::
ReadInt8
(
pbuf
));
int
cl
=
NetManager
::
ReadInt8
(
pbuf
);
int
cs
=
NetManager
::
ReadInt8
(
pbuf
);
int
cp
=
NetManager
::
ReadInt8
(
pbuf
);
myswprintf
(
pdInfo
->
strEvent
,
L"卡片被破坏了"
);
return
true
;
}
case
MSG_RELEASE
:
{
int
code
=
NetManager
::
ReadInt32
(
pbuf
);
int
cc
=
mainGame
->
LocalPlayer
(
NetManager
::
ReadInt8
(
pbuf
));
int
cl
=
NetManager
::
ReadInt8
(
pbuf
);
int
cs
=
NetManager
::
ReadInt8
(
pbuf
);
int
cp
=
NetManager
::
ReadInt8
(
pbuf
);
myswprintf
(
pdInfo
->
strEvent
,
L"卡片被解放了"
);
return
true
;
}
case
MSG_POS_CHANGE
:
{
int
code
=
NetManager
::
ReadInt32
(
pbuf
);
int
cc
=
mainGame
->
LocalPlayer
(
NetManager
::
ReadInt8
(
pbuf
));
...
...
@@ -3348,32 +3319,20 @@ bool Game::AnalyzeReplay(void* pd, char* engbuf) {
break
;
}
case
MSG_MOVE
:
{
int
code
=
NetManager
::
ReadInt32
(
pbuf
)
;
int
p
c
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
p
l
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
p
s
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
pp
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
c
c
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
c
l
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
c
s
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
cp
=
NetManager
::
ReadInt8
(
pbuf
)
;
int
pc
=
pbuf
[
4
]
;
int
p
l
=
pbuf
[
5
]
;
int
p
s
=
pbuf
[
6
]
;
int
p
p
=
pbuf
[
7
]
;
int
cc
=
pbuf
[
8
]
;
int
c
l
=
pbuf
[
9
]
;
int
c
s
=
pbuf
[
10
]
;
int
c
p
=
pbuf
[
11
]
;
pbuf
+=
16
;
SolveMessage
(
pd
,
offset
,
pbuf
-
offset
);
if
(
pl
!=
cl
||
pc
!=
cc
)
mainGame
->
ReplayRefreshSingle
(
cc
,
cl
,
cs
);
break
;
}
case
MSG_DESTROY
:
{
pbuf
+=
8
;
SolveMessage
(
pd
,
offset
,
pbuf
-
offset
);
pauseable
=
false
;
break
;
}
case
MSG_RELEASE
:
{
pbuf
+=
8
;
SolveMessage
(
pd
,
offset
,
pbuf
-
offset
);
pauseable
=
false
;
break
;
}
case
MSG_POS_CHANGE
:
{
pbuf
+=
9
;
SolveMessage
(
pd
,
offset
,
pbuf
-
offset
);
...
...
ocgcore/card.cpp
View file @
f680beda
...
...
@@ -632,6 +632,7 @@ void card::xyz_add(card* mat, card_set* des) {
pduel
->
write_buffer8
(
current
.
location
|
LOCATION_OVERLAY
);
pduel
->
write_buffer8
(
current
.
sequence
);
pduel
->
write_buffer8
(
current
.
position
);
pduel
->
write_buffer32
(
REASON_XYZ
+
REASON_MATERIAL
);
xyz_materials
.
push_back
(
mat
);
for
(
auto
cit
=
mat
->
equiping_cards
.
begin
();
cit
!=
mat
->
equiping_cards
.
end
();)
{
auto
rm
=
cit
++
;
...
...
ocgcore/field.cpp
View file @
f680beda
...
...
@@ -211,6 +211,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
pcard
->
previous
.
controler
=
preplayer
;
pcard
->
current
.
controler
=
playerid
;
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
return
;
}
else
remove_card
(
pcard
);
...
...
@@ -246,6 +247,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
}
if
(
preplayer
==
playerid
)
{
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
}
return
;
}
else
if
(
location
==
LOCATION_HAND
)
{
...
...
@@ -263,6 +265,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
player
[
pcard
->
current
.
controler
].
list_grave
.
push_back
(
pcard
);
reset_sequence
(
pcard
->
current
.
controler
,
LOCATION_GRAVE
);
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
}
else
if
(
location
==
LOCATION_REMOVED
)
{
if
(
pcard
->
current
.
sequence
==
player
[
pcard
->
current
.
controler
].
list_remove
.
size
()
-
1
)
return
;
...
...
@@ -273,6 +276,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
player
[
pcard
->
current
.
controler
].
list_remove
.
push_back
(
pcard
);
reset_sequence
(
pcard
->
current
.
controler
,
LOCATION_REMOVED
);
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
}
else
{
pduel
->
write_buffer8
(
MSG_MOVE
);
pduel
->
write_buffer32
(
pcard
->
data
.
code
);
...
...
@@ -281,6 +285,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
player
[
pcard
->
current
.
controler
].
list_extra
.
push_back
(
pcard
);
reset_sequence
(
pcard
->
current
.
controler
,
LOCATION_EXTRA
);
pduel
->
write_buffer32
(
pcard
->
get_info_location
());
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
}
return
;
}
...
...
ocgcore/field.h
View file @
f680beda
...
...
@@ -650,8 +650,6 @@ public:
#define MSG_NEW_TURN 40
#define MSG_NEW_PHASE 41
#define MSG_MOVE 50
#define MSG_DESTROY 51
#define MSG_RELEASE 52
#define MSG_POS_CHANGE 53
#define MSG_SET 54
#define MSG_SWAP 55
...
...
ocgcore/operations.cpp
View file @
f680beda
...
...
@@ -1915,12 +1915,6 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
continue
;
}
(
*
cvit
)
->
current
.
reason
|=
REASON_DESTROY
;
pduel
->
write_buffer8
(
MSG_DESTROY
);
pduel
->
write_buffer32
((
*
cvit
)
->
data
.
code
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
controler
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
location
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
sequence
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
position
);
core
.
hint_timing
[(
*
cvit
)
->
current
.
controler
]
|=
TIMING_DESTROY
;
raise_single_event
(
*
cvit
,
EVENT_DESTROY
,
(
*
cvit
)
->
current
.
reason_effect
,
(
*
cvit
)
->
current
.
reason
,
(
*
cvit
)
->
current
.
reason_player
,
0
,
0
);
}
...
...
@@ -2096,12 +2090,6 @@ int32 field::release(uint16 step, group * targets, effect * reason_effect, uint3
continue
;
}
(
*
cvit
)
->
current
.
reason
|=
REASON_RELEASE
;
pduel
->
write_buffer8
(
MSG_RELEASE
);
pduel
->
write_buffer32
((
*
cvit
)
->
data
.
code
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
controler
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
location
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
sequence
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
position
);
raise_single_event
(
*
cvit
,
EVENT_RELEASE
,
(
*
cvit
)
->
current
.
reason_effect
,
(
*
cvit
)
->
current
.
reason
,
(
*
cvit
)
->
current
.
reason_player
,
0
,
0
);
}
adjust_instant
();
...
...
@@ -2261,6 +2249,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer8
(
0
);
pduel
->
write_buffer32
((
*
cvit
)
->
current
.
reason
);
(
*
cvit
)
->
previous
.
controler
=
(
*
cvit
)
->
current
.
controler
;
(
*
cvit
)
->
previous
.
location
=
(
*
cvit
)
->
current
.
location
;
(
*
cvit
)
->
previous
.
sequence
=
(
*
cvit
)
->
current
.
sequence
;
...
...
@@ -2302,6 +2291,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
location
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
sequence
);
pduel
->
write_buffer8
((
*
cvit
)
->
current
.
position
);
pduel
->
write_buffer32
((
*
cvit
)
->
current
.
reason
);
(
*
cvit
)
->
set_status
(
STATUS_LEAVE_CONFIRMED
,
FALSE
);
if
((
*
cvit
)
->
status
&
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
))
{
(
*
cvit
)
->
set_status
(
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
,
FALSE
);
...
...
@@ -2467,6 +2457,7 @@ int32 field::discard_deck(uint16 step, uint8 playerid, uint8 count, uint32 reaso
pduel
->
write_buffer8
(
pcard
->
current
.
location
);
pduel
->
write_buffer8
(
pcard
->
current
.
sequence
);
pduel
->
write_buffer8
(
pcard
->
current
.
position
);
pduel
->
write_buffer32
(
pcard
->
current
.
reason
);
if
(
dest
==
LOCATION_HAND
)
{
tohand
.
insert
(
pcard
);
raise_single_event
(
pcard
,
EVENT_TO_HAND
,
pcard
->
current
.
reason_effect
,
pcard
->
current
.
reason
,
pcard
->
current
.
reason_player
,
0
,
0
);
...
...
@@ -2586,6 +2577,7 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
pduel
->
write_buffer8
(
target
->
current
.
location
);
pduel
->
write_buffer8
(
target
->
current
.
sequence
);
pduel
->
write_buffer8
(
target
->
current
.
position
);
pduel
->
write_buffer32
(
target
->
current
.
reason
);
if
((
target
->
current
.
location
!=
LOCATION_MZONE
))
{
if
(
target
->
equiping_cards
.
size
())
{
card_set
::
iterator
csit
,
rm
;
...
...
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