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
d26cac3a
Commit
d26cac3a
authored
Oct 23, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CtosHsReady adapt
parent
0e6be757
Pipeline
#17407
passed with stages
in 1 minute and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
src/api/ocgcore/ocgAdapter/ctos/ctosHsReady.ts
src/api/ocgcore/ocgAdapter/ctos/ctosHsReady.ts
+9
-0
src/api/ocgcore/ocgAdapter/protoDecl.ts
src/api/ocgcore/ocgAdapter/protoDecl.ts
+1
-0
src/api/ocgcore/ocgHelper.ts
src/api/ocgcore/ocgHelper.ts
+3
-2
No files found.
src/api/ocgcore/ocgAdapter/ctos/ctosHsReady.ts
0 → 100644
View file @
d26cac3a
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
ygoProPacket
}
from
"
../packet
"
;
import
{
CTOS_HS_READY
}
from
"
../protoDecl
"
;
export
default
class
CtosHsReady
extends
ygoProPacket
{
constructor
(
_
:
ygopro
.
YgoCtosMsg
)
{
super
(
1
,
CTOS_HS_READY
,
new
Uint8Array
(
0
));
}
}
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
d26cac3a
export
const
CTOS_PLAYER_INFO
=
16
;
export
const
CTOS_PLAYER_INFO
=
16
;
export
const
CTOS_JOIN_GAME
=
18
;
export
const
CTOS_JOIN_GAME
=
18
;
export
const
CTOS_UPDATE_DECK
=
2
;
export
const
CTOS_UPDATE_DECK
=
2
;
export
const
CTOS_HS_READY
=
34
;
export
const
STOC_JOIN_GAME
=
18
;
export
const
STOC_JOIN_GAME
=
18
;
export
const
STOC_CHAT
=
25
;
export
const
STOC_CHAT
=
25
;
src/api/ocgcore/ocgHelper.ts
View file @
d26cac3a
...
@@ -4,6 +4,7 @@ import { IDeck } from "../Card";
...
@@ -4,6 +4,7 @@ import { IDeck } from "../Card";
import
playerInfoPacket
from
"
./ocgAdapter/ctos/ctosPlayerInfo
"
;
import
playerInfoPacket
from
"
./ocgAdapter/ctos/ctosPlayerInfo
"
;
import
joinGamePacket
from
"
./ocgAdapter/ctos/ctosJoinGame
"
;
import
joinGamePacket
from
"
./ocgAdapter/ctos/ctosJoinGame
"
;
import
CtosUpdateDeck
from
"
./ocgAdapter/ctos/ctosUpdateDeck
"
;
import
CtosUpdateDeck
from
"
./ocgAdapter/ctos/ctosUpdateDeck
"
;
import
CtosHsReady
from
"
./ocgAdapter/ctos/ctosHsReady
"
;
export
function
sendUpdateDeck
(
deck
:
IDeck
)
{
export
function
sendUpdateDeck
(
deck
:
IDeck
)
{
const
updateDeck
=
new
ygopro
.
YgoCtosMsg
({
const
updateDeck
=
new
ygopro
.
YgoCtosMsg
({
...
@@ -14,7 +15,6 @@ export function sendUpdateDeck(deck: IDeck) {
...
@@ -14,7 +15,6 @@ export function sendUpdateDeck(deck: IDeck) {
}),
}),
});
});
const
payload
=
new
CtosUpdateDeck
(
updateDeck
).
serialize
();
const
payload
=
new
CtosUpdateDeck
(
updateDeck
).
serialize
();
console
.
log
(
payload
);
socketMiddleWare
({
cmd
:
socketCmd
.
SEND
,
payload
});
socketMiddleWare
({
cmd
:
socketCmd
.
SEND
,
payload
});
}
}
...
@@ -23,8 +23,9 @@ export function sendHsReady() {
...
@@ -23,8 +23,9 @@ export function sendHsReady() {
const
hasReady
=
new
ygopro
.
YgoCtosMsg
({
const
hasReady
=
new
ygopro
.
YgoCtosMsg
({
ctos_hs_ready
:
new
ygopro
.
CtosHsReady
({}),
ctos_hs_ready
:
new
ygopro
.
CtosHsReady
({}),
});
});
const
payload
=
new
CtosHsReady
(
hasReady
).
serialize
();
socketMiddleWare
({
cmd
:
socketCmd
.
SEND
,
payload
:
hasReady
.
serialize
()
});
socketMiddleWare
({
cmd
:
socketCmd
.
SEND
,
payload
});
}
}
export
function
sendHsStart
()
{
export
function
sendHsStart
()
{
...
...
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