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
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
love_飞影
Neos
Commits
f8597fc0
Commit
f8597fc0
authored
Jun 19, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle shuffle_set_card
parent
5f4753b4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
0 deletions
+51
-0
src/api/ocgcore/ocgAdapter/protoDecl.ts
src/api/ocgcore/ocgAdapter/protoDecl.ts
+1
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
+6
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffle_set_card.ts
...i/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffle_set_card.ts
+32
-0
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+6
-0
src/service/duel/shuffleSetCard.ts
src/service/duel/shuffleSetCard.ts
+6
-0
No files found.
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
f8597fc0
...
...
@@ -64,3 +64,4 @@ export const MSG_ANNOUNCE_CARD = 142;
export
const
MSG_ANNOUNCE_NUMBER
=
143
;
export
const
MSG_TOSS_COIN
=
130
;
export
const
MSG_TOSS_DICE
=
131
;
export
const
MSG_SHUFFLE_SET_CARD
=
36
;
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
f8597fc0
...
...
@@ -33,6 +33,7 @@ import MsgSelectPositionAdapter from "./selectPosition";
import
MsgSelectSum
from
"
./selectSum
"
;
import
MsgSelectTributeAdapter
from
"
./selectTribute
"
;
import
MsgSelectUnselectCardAdapter
from
"
./selectUnselectCard
"
;
import
MsgShuffleSetCard
from
"
./shuffle_set_card
"
;
import
MsgSortCard
from
"
./sortCard
"
;
import
MsgStartAdapter
from
"
./start
"
;
import
MsgTossAdapter
from
"
./toss
"
;
...
...
@@ -238,6 +239,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_SHUFFLE_SET_CARD
:
{
gameMsg
.
shuffle_set_card
=
MsgShuffleSetCard
(
gameData
);
break
;
}
default
:
{
gameMsg
.
unimplemented
=
new
ygopro
.
StocGameMessage
.
MsgUnimplemented
({
command
:
func
,
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffle_set_card.ts
0 → 100644
View file @
f8597fc0
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
{
BufferReaderExt
}
from
"
../../bufferIO
"
;
import
{
numberToCardZone
}
from
"
../../util
"
;
import
MsgShuffleSetCard
=
ygopro
.
StocGameMessage
.
MsgShuffleSetCard
;
/*
* Msg Shuffle Set Card
* @param - TODO
*
* @usage - 盖卡切洗
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReaderExt
(
data
);
const
zone
=
numberToCardZone
(
reader
.
inner
.
readUint8
());
const
count
=
reader
.
inner
.
readUint8
();
const
from_locations
=
[];
const
to_locations
=
[];
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
from_locations
.
push
(
reader
.
readCardLocation
());
}
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
to_locations
.
push
(
reader
.
readCardLocation
());
}
return
new
MsgShuffleSetCard
({
zone
,
from_locations
,
to_locations
,
});
};
src/service/duel/gameMsg.ts
View file @
f8597fc0
...
...
@@ -35,6 +35,7 @@ import onMsgSelectUnselectCard from "./selectUnselectCard";
import
onMsgSelectYesNo
from
"
./selectYesNo
"
;
import
onMsgSet
from
"
./set
"
;
import
onMsgShuffleHand
from
"
./shuffleHand
"
;
import
onMsgShuffleSetCard
from
"
./shuffleSetCard
"
;
import
onMsgSortCard
from
"
./sortCard
"
;
import
onMsgSpSummoned
from
"
./spSummoned
"
;
import
onMsgSpSummoning
from
"
./spSummoning
"
;
...
...
@@ -309,6 +310,11 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
shuffle_set_card
"
:
{
onMsgShuffleSetCard
(
msg
.
shuffle_set_card
);
break
;
}
case
"
unimplemented
"
:
{
onUnimplemented
(
msg
.
unimplemented
);
...
...
src/service/duel/shuffleSetCard.ts
0 → 100644
View file @
f8597fc0
import
{
ygopro
}
from
"
@/api
"
;
import
MsgShuffleSetCard
=
ygopro
.
StocGameMessage
.
MsgShuffleSetCard
;
export
default
(
shuffleSetCard
:
MsgShuffleSetCard
)
=>
{
console
.
log
(
shuffleSetCard
);
};
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