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
b3d6aa61
Commit
b3d6aa61
authored
May 25, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add announceNumber adapter
parent
2be93920
Pipeline
#21824
passed with stages
in 12 minutes and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceNumber.ts
...api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceNumber.ts
+35
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
+6
-0
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceNumber.ts
0 → 100644
View file @
b3d6aa61
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
MsgAnnounce
=
ygopro
.
StocGameMessage
.
MsgAnnounce
;
/*
* Announce Number
*
* @param - TODO
* @usage - 声明数字
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
count
=
reader
.
readUint8
();
const
options
=
[];
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
const
num
=
reader
.
readUint32
();
options
.
push
(
new
MsgAnnounce
.
Option
({
code
:
num
,
response
:
i
,
})
);
}
return
new
MsgAnnounce
({
player
,
announce_type
:
MsgAnnounce
.
AnnounceType
.
Number
,
options
,
});
};
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
b3d6aa61
...
...
@@ -9,6 +9,7 @@ import * as GAME_MSG from "../../protoDecl";
import
MsgAddCounter
from
"
./addCounter
"
;
import
MsgAnnounceAttribute
from
"
./announceAttrib
"
;
import
MsgAnnounceCard
from
"
./announceCard
"
;
import
MsgAnnounceNumber
from
"
./announceNumber
"
;
import
MsgAnnounceRace
from
"
./announceRace
"
;
import
MsgAttack
from
"
./attack
"
;
import
MsgDamage
from
"
./damage
"
;
...
...
@@ -214,6 +215,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_ANNOUNCE_NUMBER
:
{
gameMsg
.
announceNumber
=
MsgAnnounceNumber
(
gameData
);
break
;
}
default
:
{
gameMsg
.
unimplemented
=
new
ygopro
.
StocGameMessage
.
MsgUnimplemented
({
command
:
func
,
...
...
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