Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro2
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
nanahira
ygopro2
Commits
59a9bacd
Commit
59a9bacd
authored
Aug 31, 2022
by
mercury233
Committed by
nanahira
Sep 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GameMessage.SelectPlace support cancel
parent
bb9b190a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
6 deletions
+39
-6
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+39
-6
No files found.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
59a9bacd
...
...
@@ -4026,8 +4026,12 @@ public class Ocgcore : ServantWithCardDescription
binaryMaster
=
new
BinaryMaster
();
player
=
r
.
ReadByte
();
min
=
r
.
ReadByte
();
//TODO: can cancel
if
(
min
==
0
)
min
=
1
;
bool
cancelable
=
false
;
if
(
min
==
0
)
{
cancelable
=
true
;
min
=
1
;
}
uint
_field
=
~
r
.
ReadUInt32
();
if
(
Program
.
I
().
setting
.
setting
.
hand
.
value
==
true
||
Program
.
I
().
setting
.
setting
.
handm
.
value
==
true
||
currentMessage
==
GameMessage
.
SelectDisfield
)
{
...
...
@@ -4130,6 +4134,10 @@ public class Ocgcore : ServantWithCardDescription
gameField
.
setHint
(
GameStringManager
.
get_unsafe
(
570
));
}
}
if
(
cancelable
)
{
gameInfo
.
addHashedButton
(
"cancelPlace"
,
-
1
,
superButtonType
.
no
,
InterString
.
Get
(
"取消操作@ui"
));
}
}
else
{
...
...
@@ -8370,6 +8378,11 @@ public class Ocgcore : ServantWithCardDescription
GCS_swapALL
();
return
;
}
if
(
btn
.
hashString
==
"cancelPlace"
)
{
cancelSelectPlace
();
return
;
}
switch
(
currentMessage
)
{
case
GameMessage
.
SelectBattleCmd
:
...
...
@@ -8433,6 +8446,18 @@ public class Ocgcore : ServantWithCardDescription
}
}
private
void
cancelSelectPlace
()
{
clearAllSelectPlace
();
BinaryMaster
binaryMaster
=
new
BinaryMaster
();
byte
[]
resp
=
new
byte
[
3
];
resp
[
0
]
=
(
byte
)
localPlayer
(
0
);
resp
[
1
]
=
0
;
resp
[
2
]
=
0
;
binaryMaster
.
writer
.
Write
(
resp
);
sendReturn
(
binaryMaster
.
get
());
}
private
void
clearAllShowed
()
{
for
(
int
i
=
0
;
i
<
cards
.
Count
;
i
++)
if
(
cards
[
i
].
gameObject
.
activeInHierarchy
)
...
...
@@ -8990,6 +9015,10 @@ public class Ocgcore : ServantWithCardDescription
{
return
;
}
if
(
gameInfo
.
queryHashedButton
(
"cancelPlace"
)
==
true
)
{
return
;
}
rightExcited
=
true
;
//gameInfo.ignoreChain_set(true);
base
.
ES_mouseDownRight
();
...
...
@@ -9102,7 +9131,11 @@ public class Ocgcore : ServantWithCardDescription
sendReturn
(
binaryMaster
.
get
());
return
;
}
if
(
gameInfo
.
queryHashedButton
(
"cancelPlace"
)
==
true
)
{
cancelSelectPlace
();
return
;
}
}
void
animation_confirm
(
gameCard
target
)
...
...
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