ygopro-msg-encode 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ENUM_FIX_SUMMARY.md +84 -0
- package/ENUM_UPDATE.md +219 -0
- package/README.md +28 -0
- package/STOC_CHAT_FIX.md +156 -0
- package/UTF16_STRING_FIX.md +190 -0
- package/dist/index.cjs +99 -6
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +90 -6
- package/dist/index.mjs.map +4 -4
- package/dist/src/protos/common/host-info.d.ts +2 -1
- package/dist/src/protos/ctos/proto/create-game.d.ts +2 -2
- package/dist/src/protos/ctos/proto/hand-result.d.ts +2 -1
- package/dist/src/protos/ctos/proto/join-game.d.ts +1 -1
- package/dist/src/protos/ctos/proto/kick.d.ts +2 -1
- package/dist/src/protos/ctos/proto/player-info.d.ts +1 -1
- package/dist/src/protos/ctos/proto/tp-result.d.ts +2 -1
- package/dist/src/protos/network-enums.d.ts +94 -0
- package/dist/src/protos/stoc/proto/error-msg.d.ts +2 -1
- package/dist/src/protos/stoc/proto/hs-player-enter.d.ts +1 -1
- package/dist/src/protos/stoc/proto/srvpro-roomlist.d.ts +2 -1
- package/index.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Network protocol enums
|
|
3
|
+
* These enums are derived from gframe/network.h
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Hand result (rock-paper-scissors)
|
|
7
|
+
*/
|
|
8
|
+
export declare enum HandResult {
|
|
9
|
+
ROCK = 1,
|
|
10
|
+
SCISSORS = 2,
|
|
11
|
+
PAPER = 3
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Turn player result (first/second)
|
|
15
|
+
*/
|
|
16
|
+
export declare enum TurnPlayerResult {
|
|
17
|
+
SECOND = 0,
|
|
18
|
+
FIRST = 1
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Player type / position
|
|
22
|
+
*/
|
|
23
|
+
export declare enum NetPlayerType {
|
|
24
|
+
PLAYER1 = 0,
|
|
25
|
+
PLAYER2 = 1,
|
|
26
|
+
PLAYER3 = 2,
|
|
27
|
+
PLAYER4 = 3,
|
|
28
|
+
PLAYER5 = 4,
|
|
29
|
+
PLAYER6 = 5,
|
|
30
|
+
OBSERVER = 7
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Chat message colors (used in STOC_Chat.player_type)
|
|
34
|
+
*/
|
|
35
|
+
export declare enum ChatColor {
|
|
36
|
+
LIGHTBLUE = 8,
|
|
37
|
+
RED = 11,
|
|
38
|
+
GREEN = 12,
|
|
39
|
+
BLUE = 13,
|
|
40
|
+
BABYBLUE = 14,
|
|
41
|
+
PINK = 15,
|
|
42
|
+
YELLOW = 16,
|
|
43
|
+
WHITE = 17,
|
|
44
|
+
GRAY = 18,
|
|
45
|
+
DARKGRAY = 19
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Game mode
|
|
49
|
+
*/
|
|
50
|
+
export declare enum GameMode {
|
|
51
|
+
SINGLE = 0,
|
|
52
|
+
MATCH = 1,
|
|
53
|
+
TAG = 2
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Error message type
|
|
57
|
+
*/
|
|
58
|
+
export declare enum ErrorMessageType {
|
|
59
|
+
JOINERROR = 1,
|
|
60
|
+
DECKERROR = 2,
|
|
61
|
+
SIDEERROR = 3,
|
|
62
|
+
VERERROR = 4
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Deck error type (used in high 4 bits of error code)
|
|
66
|
+
*/
|
|
67
|
+
export declare enum DeckErrorType {
|
|
68
|
+
LFLIST = 1,
|
|
69
|
+
OCGONLY = 2,
|
|
70
|
+
TCGONLY = 3,
|
|
71
|
+
UNKNOWNCARD = 4,
|
|
72
|
+
CARDCOUNT = 5,
|
|
73
|
+
MAINCOUNT = 6,
|
|
74
|
+
EXTRACOUNT = 7,
|
|
75
|
+
SIDECOUNT = 8,
|
|
76
|
+
NOTAVAIL = 9
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Player change state
|
|
80
|
+
*/
|
|
81
|
+
export declare enum PlayerChangeState {
|
|
82
|
+
OBSERVE = 8,
|
|
83
|
+
READY = 9,
|
|
84
|
+
NOTREADY = 10,
|
|
85
|
+
LEAVE = 11
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Room status (SRVPro)
|
|
89
|
+
*/
|
|
90
|
+
export declare enum RoomStatus {
|
|
91
|
+
WAITING = 0,
|
|
92
|
+
DUELING = 1,
|
|
93
|
+
SIDING = 2
|
|
94
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { YGOProStocBase } from '../base';
|
|
2
|
+
import { RoomStatus } from '../../network-enums';
|
|
2
3
|
export declare class SrvproRoomInfo {
|
|
3
4
|
roomname: string;
|
|
4
|
-
room_status:
|
|
5
|
+
room_status: RoomStatus;
|
|
5
6
|
room_duel_count: number;
|
|
6
7
|
room_turn_count: number;
|
|
7
8
|
player1: string;
|
package/index.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * from './src/protos/common';
|
|
|
4
4
|
export * from './src/protos/ctos';
|
|
5
5
|
export * from './src/protos/stoc';
|
|
6
6
|
export * from './src/protos/msg';
|
|
7
|
+
export * from './src/protos/network-enums';
|
|
7
8
|
export * from './src/vendor/ocgcore-constants';
|
|
8
9
|
export * from './src/vendor/script-constants';
|