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
ece99eb0
Commit
ece99eb0
authored
Aug 07, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CtosHsToObserver and CtosHsToDuelList support
parent
9f7c37a8
Pipeline
#22939
failed with stages
in 9 minutes and 48 seconds
Changes
7
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
243 additions
and
7 deletions
+243
-7
neos-protobuf
neos-protobuf
+1
-1
src/api/ocgcore/idl/ocgcore.ts
src/api/ocgcore/idl/ocgcore.ts
+190
-4
src/api/ocgcore/ocgAdapter/ctos/ctosHsNotReady.ts
src/api/ocgcore/ocgAdapter/ctos/ctosHsNotReady.ts
+2
-2
src/api/ocgcore/ocgAdapter/ctos/ctosHsToDuelList.ts
src/api/ocgcore/ocgAdapter/ctos/ctosHsToDuelList.ts
+14
-0
src/api/ocgcore/ocgAdapter/ctos/ctosHsToObserver.ts
src/api/ocgcore/ocgAdapter/ctos/ctosHsToObserver.ts
+14
-0
src/api/ocgcore/ocgAdapter/protoDecl.ts
src/api/ocgcore/ocgAdapter/protoDecl.ts
+2
-0
src/api/ocgcore/ocgHelper.ts
src/api/ocgcore/ocgHelper.ts
+20
-0
No files found.
neos-protobuf
@
d6c01dd8
Subproject commit
30f4ea7acd79b9cb18a358548520ca939e22dc5f
Subproject commit
d6c01dd88fd72f22c432a52ba74eee9ece267499
src/api/ocgcore/idl/ocgcore.ts
View file @
ece99eb0
This diff is collapsed.
Click to expand it.
src/api/ocgcore/ocgAdapter/ctos/ctosHsNotReady.ts
View file @
ece99eb0
...
...
@@ -5,9 +5,9 @@ import { CTOS_HS_NOT_READY } from "../protoDecl";
/*
* CTOS HsReady
*
* @usage - 告诉ygopro服务端当前玩家
准备完毕
* @usage - 告诉ygopro服务端当前玩家
取消准备
* */
export
default
class
CtosHsReady
extends
YgoProPacket
{
export
default
class
CtosHs
Not
Ready
extends
YgoProPacket
{
constructor
(
_
:
ygopro
.
YgoCtosMsg
)
{
super
(
1
,
CTOS_HS_NOT_READY
,
new
Uint8Array
(
0
));
}
...
...
src/api/ocgcore/ocgAdapter/ctos/ctosHsToDuelList.ts
0 → 100644
View file @
ece99eb0
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
YgoProPacket
}
from
"
../packet
"
;
import
{
CTOS_HS_TO_DUEL_LIST
}
from
"
../protoDecl
"
;
/*
* CTOS HsReady
*
* @usage - 告诉ygopro服务端当前玩家进入决斗者行列
* */
export
default
class
CtosHsToDuelList
extends
YgoProPacket
{
constructor
(
_
:
ygopro
.
YgoCtosMsg
)
{
super
(
1
,
CTOS_HS_TO_DUEL_LIST
,
new
Uint8Array
(
0
));
}
}
src/api/ocgcore/ocgAdapter/ctos/ctosHsToObserver.ts
0 → 100644
View file @
ece99eb0
import
{
ygopro
}
from
"
../../idl/ocgcore
"
;
import
{
YgoProPacket
}
from
"
../packet
"
;
import
{
CTOS_HS_TO_OBSERVER
}
from
"
../protoDecl
"
;
/*
* CTOS HsReady
*
* @usage - 告诉ygopro服务端当前玩家进入观战者行列
* */
export
default
class
CtosHsToObserver
extends
YgoProPacket
{
constructor
(
_
:
ygopro
.
YgoCtosMsg
)
{
super
(
1
,
CTOS_HS_TO_OBSERVER
,
new
Uint8Array
(
0
));
}
}
src/api/ocgcore/ocgAdapter/protoDecl.ts
View file @
ece99eb0
...
...
@@ -5,6 +5,8 @@
export
const
CTOS_PLAYER_INFO
=
16
;
export
const
CTOS_JOIN_GAME
=
18
;
export
const
CTOS_UPDATE_DECK
=
2
;
export
const
CTOS_HS_TO_DUEL_LIST
=
32
;
export
const
CTOS_HS_TO_OBSERVER
=
33
;
export
const
CTOS_HS_READY
=
34
;
export
const
CTOS_HS_NOT_READY
=
35
;
export
const
CTOS_HS_START
=
37
;
...
...
src/api/ocgcore/ocgHelper.ts
View file @
ece99eb0
...
...
@@ -12,6 +12,8 @@ import HandResult from "./ocgAdapter/ctos/ctosHandResult";
import
HsNotReadyAdapter
from
"
./ocgAdapter/ctos/ctosHsNotReady
"
;
import
HsReadyAdapter
from
"
./ocgAdapter/ctos/ctosHsReady
"
;
import
HsStartAdapter
from
"
./ocgAdapter/ctos/ctosHsStart
"
;
import
HsToDuelListAdapter
from
"
./ocgAdapter/ctos/ctosHsToDuelList
"
;
import
HsToObserverAdapter
from
"
./ocgAdapter/ctos/ctosHsToObserver
"
;
import
JoinGameAdapter
from
"
./ocgAdapter/ctos/ctosJoinGame
"
;
import
PlayerInfoAdapter
from
"
./ocgAdapter/ctos/ctosPlayerInfo
"
;
import
Surrender
from
"
./ocgAdapter/ctos/ctosSurrender
"
;
...
...
@@ -52,6 +54,24 @@ export function sendHsNotReady() {
socketMiddleWare
({
cmd
:
socketCmd
.
SEND
,
payload
});
}
export
function
sendHsToObserver
()
{
const
hasToObserver
=
new
ygopro
.
YgoCtosMsg
({
ctos_hs_to_observer
:
new
ygopro
.
CtosHsToObserver
({}),
});
const
payload
=
new
HsToObserverAdapter
(
hasToObserver
).
serialize
();
socketMiddleWare
({
cmd
:
socketCmd
.
SEND
,
payload
});
}
export
function
sendHsToDuelList
()
{
const
hasToDuelList
=
new
ygopro
.
YgoCtosMsg
({
ctos_hs_to_duel_list
:
new
ygopro
.
CtosHsToDuelList
({}),
});
const
payload
=
new
HsToDuelListAdapter
(
hasToDuelList
).
serialize
();
socketMiddleWare
({
cmd
:
socketCmd
.
SEND
,
payload
});
}
export
function
sendHsStart
()
{
const
hasStart
=
new
ygopro
.
YgoCtosMsg
({
ctos_hs_start
:
new
ygopro
.
CtosHsStart
({}),
...
...
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