Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
Neos
Commits
338628fd
Commit
338628fd
authored
Jun 30, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add MsgShuffleHandExtra
parent
e585e471
Pipeline
#22502
passed with stages
in 13 minutes and 2 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
src/api/ocgcore/ocgAdapter/protoDecl.ts
src/api/ocgcore/ocgAdapter/protoDecl.ts
+2
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
+17
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffleHandExtra.ts
...i/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffleHandExtra.ts
+29
-0
No files found.
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
338628fd
...
...
@@ -67,3 +67,5 @@ export const MSG_TOSS_DICE = 131;
export
const
MSG_SHUFFLE_SET_CARD
=
36
;
export
const
MSG_FIELD_DISABLED
=
56
;
export
const
MSG_HAND_RES
=
133
;
export
const
MSG_SHUFFLE_HAND
=
33
;
export
const
MSG_SHUFFLE_EXTRA
=
39
;
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
338628fd
...
...
@@ -35,6 +35,7 @@ import MsgSelectPositionAdapter from "./selectPosition";
import
MsgSelectSum
from
"
./selectSum
"
;
import
MsgSelectTributeAdapter
from
"
./selectTribute
"
;
import
MsgSelectUnselectCardAdapter
from
"
./selectUnselectCard
"
;
import
MsgShuffleHandExtraAdapter
from
"
./shuffleHandExtra
"
;
import
MsgShuffleSetCard
from
"
./shuffleSetCard
"
;
import
MsgSortCard
from
"
./sortCard
"
;
import
MsgStartAdapter
from
"
./start
"
;
...
...
@@ -256,6 +257,22 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_SHUFFLE_HAND
:
{
gameMsg
.
shuffle_hand_extra
=
MsgShuffleHandExtraAdapter
(
gameData
,
false
);
break
;
}
case
GAME_MSG
.
MSG_SHUFFLE_EXTRA
:
{
gameMsg
.
shuffle_hand_extra
=
MsgShuffleHandExtraAdapter
(
gameData
,
true
);
break
;
}
default
:
{
gameMsg
.
unimplemented
=
new
ygopro
.
StocGameMessage
.
MsgUnimplemented
({
command
:
func
,
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffleHandExtra.ts
0 → 100644
View file @
338628fd
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
{
BufferReader
}
from
"
../../../../../../rust-src/pkg/rust_src
"
;
import
MsgShuffleHandExtra
=
ygopro
.
StocGameMessage
.
MsgShuffleHandExtra
;
/*
* Msg Shuffle Hand or Extra
* @param - TODO
*
* @usage - 手牌/额外卡组切洗
* */
export
default
(
data
:
Uint8Array
,
isExtra
:
boolean
)
=>
{
const
reader
=
new
BufferReader
(
data
);
const
zone
=
isExtra
?
ygopro
.
CardZone
.
EXTRA
:
ygopro
.
CardZone
.
HAND
;
const
player
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
const
cards
=
[];
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
cards
.
push
(
reader
.
readUint32
());
}
return
new
MsgShuffleHandExtra
({
player
,
zone
,
cards
,
});
};
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