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
6ea90f89
Commit
6ea90f89
authored
May 25, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add announceAttribute adapter
parent
b616e231
Pipeline
#21822
passed with stages
in 14 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceAttrib.ts
...api/ocgcore/ocgAdapter/stoc/stocGameMsg/announceAttrib.ts
+38
-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
0 → 100644
View file @
6ea90f89
import
{
BufferReader
}
from
"
rust-src
"
;
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
MsgAnnounce
=
ygopro
.
StocGameMessage
.
MsgAnnounce
;
/*
* Announce Race
*
* @param - TODO
* @usage - 声明属性
* */
export
default
(
data
:
Uint8Array
)
=>
{
const
reader
=
new
BufferReader
(
data
);
const
player
=
reader
.
readUint8
();
const
min
=
reader
.
readUint8
();
const
avaiable
=
reader
.
readUint32
();
const
options
=
[];
for
(
let
i
=
0
;
i
<
7
;
i
++
)
{
if
((
avaiable
&
(
1
<<
i
))
>
0
)
{
options
.
push
(
new
MsgAnnounce
.
Option
({
code
:
i
,
response
:
1
<<
i
,
})
);
}
}
return
new
MsgAnnounce
({
player
,
announce_type
:
MsgAnnounce
.
AnnounceType
.
Attribute
,
min
,
options
,
});
};
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/mod.ts
View file @
6ea90f89
...
...
@@ -7,6 +7,7 @@ import { ygopro } from "../../../idl/ocgcore";
import
{
StocAdapter
,
YgoProPacket
}
from
"
../../packet
"
;
import
*
as
GAME_MSG
from
"
../../protoDecl
"
;
import
MsgAddCounter
from
"
./addCounter
"
;
import
MsgAnnounceAttribute
from
"
./announceAttrib
"
;
import
MsgAnnounceRace
from
"
./announceRace
"
;
import
MsgAttack
from
"
./attack
"
;
import
MsgDamage
from
"
./damage
"
;
...
...
@@ -202,6 +203,11 @@ export default class GameMsgAdapter implements StocAdapter {
break
;
}
case
GAME_MSG
.
MSG_ANNOUNCE_ATTRIB
:
{
gameMsg
.
announceAttrib
=
MsgAnnounceAttribute
(
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