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
4854ced0
Commit
4854ced0
authored
Apr 01, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle MSG_SORT_CARD
parent
2725d7aa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
0 deletions
+57
-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/sortCard.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/sortCard.ts
+37
-0
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+6
-0
src/service/duel/sortCard.ts
src/service/duel/sortCard.ts
+7
-0
No files found.
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
4854ced0
...
@@ -55,3 +55,4 @@ export const MSG_SELECT_SUM = 23;
...
@@ -55,3 +55,4 @@ export const MSG_SELECT_SUM = 23;
export
const
MSG_ADD_COUNTER
=
101
;
export
const
MSG_ADD_COUNTER
=
101
;
export
const
MSG_REMOVE_COUNTER
=
102
;
export
const
MSG_REMOVE_COUNTER
=
102
;
export
const
MSG_SELECT_COUNTER
=
22
;
export
const
MSG_SELECT_COUNTER
=
22
;
export
const
MSG_SORT_CARD
=
25
;
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
4854ced0
...
@@ -31,6 +31,7 @@ import MsgSelectSum from "./selectSum";
...
@@ -31,6 +31,7 @@ import MsgSelectSum from "./selectSum";
import
MsgAddCounter
from
"
./addCounter
"
;
import
MsgAddCounter
from
"
./addCounter
"
;
import
MsgRemoveCounter
from
"
./removeCounter
"
;
import
MsgRemoveCounter
from
"
./removeCounter
"
;
import
MsgSelectCounter
from
"
./selectCounter
"
;
import
MsgSelectCounter
from
"
./selectCounter
"
;
import
MsgSortCard
from
"
./sortCard
"
;
import
PENETRATE
from
"
./penetrate
"
;
import
PENETRATE
from
"
./penetrate
"
;
/*
/*
...
@@ -184,6 +185,11 @@ export default class GameMsgAdapter implements StocAdapter {
...
@@ -184,6 +185,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
break
;
}
}
case
GAME_MSG
.
MSG_SORT_CARD
:
{
gameMsg
.
sort_card
=
MsgSortCard
(
gameData
);
break
;
}
default
:
{
default
:
{
gameMsg
.
unimplemented
=
new
ygopro
.
StocGameMessage
.
MsgUnimplemented
({
gameMsg
.
unimplemented
=
new
ygopro
.
StocGameMessage
.
MsgUnimplemented
({
command
:
func
,
command
:
func
,
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/sortCard.ts
0 → 100644
View file @
4854ced0
import
{
ygopro
}
from
"
../../../idl/ocgcore
"
;
import
{
BufferReaderExt
}
from
"
../../bufferIO
"
;
import
MsgSortCard
=
ygopro
.
StocGameMessage
.
MsgSortCard
;
/*
*
* Msg Sort Card
*
* @param - TODO
* @usage - TODO
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReaderExt
(
data
);
const
player
=
reader
.
inner
.
readUint8
();
const
msg
=
new
MsgSortCard
({
player
,
options
:
[],
});
const
count
=
reader
.
inner
.
readUint8
();
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
const
code
=
reader
.
inner
.
readUint32
();
const
location
=
reader
.
readCardShortLocation
();
msg
.
options
.
push
(
new
MsgSortCard
.
Info
({
code
,
location
,
response
:
i
,
})
);
}
return
msg
;
};
src/service/duel/gameMsg.ts
View file @
4854ced0
...
@@ -28,6 +28,7 @@ import onMsgSelectSum from "./selectSum";
...
@@ -28,6 +28,7 @@ import onMsgSelectSum from "./selectSum";
import
onMsgSelectTribute
from
"
./selectTribute
"
;
import
onMsgSelectTribute
from
"
./selectTribute
"
;
import
onMsgUpdateCounter
from
"
./updateCounter
"
;
import
onMsgUpdateCounter
from
"
./updateCounter
"
;
import
onMsgSelectCounter
from
"
./selectCounter
"
;
import
onMsgSelectCounter
from
"
./selectCounter
"
;
import
onMsgSortCard
from
"
./sortCard
"
;
import
{
setWaiting
}
from
"
../../reducers/duel/mod
"
;
import
{
setWaiting
}
from
"
../../reducers/duel/mod
"
;
const
ActiveList
=
[
const
ActiveList
=
[
...
@@ -187,6 +188,11 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
...
@@ -187,6 +188,11 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
break
;
}
}
case
"
sort_card
"
:
{
onMsgSortCard
(
msg
.
sort_card
,
dispatch
);
break
;
}
case
"
unimplemented
"
:
{
case
"
unimplemented
"
:
{
onUnimplemented
(
msg
.
unimplemented
,
dispatch
);
onUnimplemented
(
msg
.
unimplemented
,
dispatch
);
...
...
src/service/duel/sortCard.ts
0 → 100644
View file @
4854ced0
import
{
ygopro
}
from
"
../../api/ocgcore/idl/ocgcore
"
;
import
{
AppDispatch
}
from
"
../../store
"
;
import
MsgSortCard
=
ygopro
.
StocGameMessage
.
MsgSortCard
;
export
default
(
sortCard
:
MsgSortCard
,
dispatch
:
AppDispatch
)
=>
{
console
.
log
(
sortCard
);
};
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