Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
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
fallenstardust
YGOProUnity_V2
Commits
8266c93c
Commit
8266c93c
authored
Aug 31, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GameMessage.SelectPlace support cancel
parent
f3cfdd59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
Assets/SibylSystem/Ocgcore/Ocgcore.cs
Assets/SibylSystem/Ocgcore/Ocgcore.cs
+36
-2
No files found.
Assets/SibylSystem/Ocgcore/Ocgcore.cs
View file @
8266c93c
...
...
@@ -3484,8 +3484,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
;
}
var
_field
=
~
r
.
ReadUInt32
();
if
(
Program
.
I
().
setting
.
setting
.
hand
.
value
||
Program
.
I
().
setting
.
setting
.
handm
.
value
||
currentMessage
==
GameMessage
.
SelectDisfield
)
...
...
@@ -3581,6 +3585,10 @@ public class Ocgcore : ServantWithCardDescription
else
gameField
.
setHint
(
GameStringManager
.
get_unsafe
(
570
));
}
if
(
cancelable
)
{
gameInfo
.
addHashedButton
(
"cancelPlace"
,
-
1
,
superButtonType
.
no
,
InterString
.
Get
(
"取消操作@ui"
));
}
}
else
{
...
...
@@ -7054,6 +7062,12 @@ public class Ocgcore : ServantWithCardDescription
return
;
}
if
(
btn
.
hashString
==
"cancelPlace"
)
{
cancelSelectPlace
();
return
;
}
switch
(
currentMessage
)
{
case
GameMessage
.
SelectBattleCmd
:
...
...
@@ -7115,6 +7129,18 @@ public class Ocgcore : ServantWithCardDescription
if
(
realized
)
realize
(
true
);
}
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
(
var
i
=
0
;
i
<
cards
.
Count
;
i
++)
...
...
@@ -7561,6 +7587,7 @@ public class Ocgcore : ServantWithCardDescription
if
(
flagForTimeConfirm
)
return
;
if
(
gameInfo
.
queryHashedButton
(
"cancleSelected"
))
return
;
if
(
gameInfo
.
queryHashedButton
(
"cancelPlace"
))
return
;
rightExcited
=
true
;
//gameInfo.ignoreChain_set(true);
base
.
ES_mouseDownRight
();
...
...
@@ -7659,6 +7686,13 @@ public class Ocgcore : ServantWithCardDescription
var
binaryMaster
=
new
BinaryMaster
();
binaryMaster
.
writer
.
Write
(-
1
);
sendReturn
(
binaryMaster
.
get
());
return
;
}
if
(
gameInfo
.
queryHashedButton
(
"cancelPlace"
))
{
cancelSelectPlace
();
return
;
}
}
...
...
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