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
2be93920
Commit
2be93920
authored
May 25, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add announceCard adapter
parent
6ea90f89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceAttrib.ts
...api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceAttrib.ts
+1
-1
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceCard.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceCard.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/announceAttrib.ts
View file @
2be93920
...
...
@@ -4,7 +4,7 @@ import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import
MsgAnnounce
=
ygopro
.
StocGameMessage
.
MsgAnnounce
;
/*
* Announce
Rac
e
* Announce
Attribut
e
*
* @param - TODO
* @usage - 声明属性
...
...
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceCard.ts
0 → 100644
View file @
2be93920
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
MsgAnnounce
=
ygopro
.
StocGameMessage
.
MsgAnnounce
;
/*
* Announce Card
*
* @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
code
=
reader
.
readUint32
();
options
.
push
(
new
MsgAnnounce
.
Option
({
code
,
response
:
code
,
})
);
}
return
new
MsgAnnounce
({
player
,
announce_type
:
MsgAnnounce
.
AnnounceType
.
Card
,
options
,
});
};
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
2be93920
...
...
@@ -8,6 +8,7 @@ import { StocAdapter, YgoProPacket } from "../../packet";
import
*
as
GAME_MSG
from
"
../../protoDecl
"
;
import
MsgAddCounter
from
"
./addCounter
"
;
import
MsgAnnounceAttribute
from
"
./announceAttrib
"
;
import
MsgAnnounceCard
from
"
./announceCard
"
;
import
MsgAnnounceRace
from
"
./announceRace
"
;
import
MsgAttack
from
"
./attack
"
;
import
MsgDamage
from
"
./damage
"
;
...
...
@@ -208,6 +209,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_ANNOUNCE_CARD
:
{
gameMsg
.
announceCard
=
MsgAnnounceCard
(
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