com.xmobitea.changx.gn-unity 2.0.2 → 2.3.0
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/Editor/GNServerSettingsEditor.cs +42 -322
- package/Runtime/Common/GNArray.cs +120 -35
- package/Runtime/Common/GNData.cs +19 -6
- package/Runtime/Common/GNHashtable.cs +174 -11
- package/Runtime/Common/IGNData.cs +11 -2
- package/Runtime/Config/GNServerSettings.cs +136 -92
- package/Runtime/Constant/Commands.cs +82 -19
- package/Runtime/Constant/EnumType/GoogleLoginType.cs +5 -5
- package/Runtime/Constant/EnumType/GroupStatus.cs +7 -7
- package/Runtime/Constant/EnumType/ItemType.cs +5 -5
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs +6 -6
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs +2 -2
- package/Runtime/Constant/EnumType/OwnerType.cs +3 -2
- package/Runtime/Constant/EnumType/PushPlatformType.cs +10 -0
- package/Runtime/Constant/EnumType/PushPlatformType.cs.meta +11 -0
- package/Runtime/Constant/EnumType/RequestType.cs +1 -0
- package/Runtime/Constant/EnumType/StoreReceiveType.cs +13 -0
- package/Runtime/Constant/EnumType/StoreReceiveType.cs.meta +11 -0
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs +53 -48
- package/Runtime/Constant/EventCode.cs +29 -2
- package/Runtime/Constant/OperationCode.cs +249 -211
- package/Runtime/Constant/ParameterCode/GNParameterCode.cs +610 -466
- package/Runtime/Constant/ReturnCode.cs +50 -2
- package/Runtime/Entity/DataMember.cs +221 -3
- package/Runtime/Entity/GNMetadata.cs +46 -1
- package/Runtime/Entity/InvalidMember.cs +24 -5
- package/Runtime/Entity/Models/AuthenticateModels.cs +251 -207
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs +153 -131
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs +61 -51
- package/Runtime/Entity/Models/CharacterPlayerModels.cs +985 -849
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs +957 -885
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs +165 -150
- package/Runtime/Entity/Models/CloudScriptModels.cs +185 -0
- package/Runtime/Entity/Models/CloudScriptModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs +134 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs +34 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs.meta +11 -0
- package/Runtime/Entity/Models/ContentModels.cs +150 -153
- package/Runtime/Entity/Models/ContentRequestModels.cs +129 -129
- package/Runtime/Entity/Models/ContentResponseModels.cs +24 -24
- package/Runtime/Entity/Models/DashboardModels.cs +1684 -1156
- package/Runtime/Entity/Models/DashboardRequestModels.cs +220 -147
- package/Runtime/Entity/Models/DashboardResponseModels.cs +92 -57
- package/Runtime/Entity/Models/GamePlayerModels.cs +1073 -933
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs +939 -867
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs +162 -147
- package/Runtime/Entity/Models/GenericModels.cs +102 -102
- package/Runtime/Entity/Models/GroupModels.cs +812 -676
- package/Runtime/Entity/Models/GroupRequestModels.cs +741 -669
- package/Runtime/Entity/Models/GroupResponseModels.cs +129 -114
- package/Runtime/Entity/Models/InventoryModels.cs +667 -558
- package/Runtime/Entity/Models/InventoryRequestModels.cs +626 -579
- package/Runtime/Entity/Models/InventoryResponseModels.cs +109 -99
- package/Runtime/Entity/Models/MasterPlayerModels.cs +1882 -1340
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs +1643 -1253
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs +293 -213
- package/Runtime/Entity/Models/MultiplayerModels.cs +293 -223
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs +199 -149
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs +10 -0
- package/Runtime/Entity/Models/StoreInventoryModels.cs +514 -323
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs +236 -165
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs +45 -30
- package/Runtime/Entity/OperationEvent.cs +43 -7
- package/Runtime/Entity/OperationHelper.cs +18 -2
- package/Runtime/Entity/OperationRequest.cs +80 -37
- package/Runtime/Entity/OperationResponse.cs +111 -63
- package/Runtime/Entity/Request/CustomOperationRequest.cs +53 -2
- package/Runtime/Entity/Response/CustomOperationResponse.cs +25 -4
- package/Runtime/GNNetwork.cs +333 -21
- package/Runtime/GNNetworkApi.cs +25 -13
- package/Runtime/GNNetworkAuthenticateApi.cs +531 -98
- package/Runtime/GNNetworkCharacterPlayerApi.cs +1587 -762
- package/Runtime/GNNetworkCloudScriptApi.cs +181 -0
- package/Runtime/GNNetworkCloudScriptApi.cs.meta +11 -0
- package/Runtime/GNNetworkContentApi.cs +238 -132
- package/Runtime/GNNetworkDashboardApi.cs +278 -117
- package/Runtime/GNNetworkGamePlayerApi.cs +1558 -747
- package/Runtime/GNNetworkGroupApi.cs +1228 -582
- package/Runtime/GNNetworkInventoryApi.cs +1048 -507
- package/Runtime/GNNetworkMasterPlayerApi.cs +2586 -1067
- package/Runtime/GNNetworkMultiplayerApi.cs +328 -147
- package/Runtime/GNNetworkStoreInventoryApi.cs +388 -162
- package/Runtime/Helper/CodeHelper.cs +45 -3
- package/Runtime/Helper/ConverterService.cs +240 -85
- package/Runtime/Logger/GNDebug.cs +46 -3
- package/Runtime/Networking/AuthenticateStatus.cs +30 -8
- package/Runtime/Networking/Handler/IServerEventHandler.cs +8 -8
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs +31 -2
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs +24 -3
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs +24 -2
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs +24 -2
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs +21 -2
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs +20 -2
- package/Runtime/Networking/Http/HttpPeer.cs +68 -25
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs +44 -4
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs +63 -40
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs +43 -13
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs +72 -39
- package/Runtime/Networking/IPeer.cs +24 -2
- package/Runtime/Networking/NetworkingPeer.cs +64 -10
- package/Runtime/Networking/NetworkingPeerAPI.cs +20 -21
- package/Runtime/Networking/OperationPending.cs +79 -15
- package/Runtime/Networking/PeerBase.cs +86 -23
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs +57 -18
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs +70 -10
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs +165 -23
- package/Runtime/Networking/Socket/SocketPeer.cs +63 -12
- package/Runtime/Unity/ServiceCoroutine.cs +10 -0
- package/Runtime/Unity/ServiceCoroutine.cs.meta +11 -0
- package/Runtime/Unity/ServiceUpdate.cs +14 -1
- package/package.json +1 -1
|
@@ -1,30 +1,93 @@
|
|
|
1
1
|
namespace XmobiTea.GN.Constant
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/// <summary>
|
|
4
|
+
/// Holds constant values used throughout the GN networking system.
|
|
5
|
+
/// </summary>
|
|
6
|
+
public class Commands
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// HTTP header key for specifying the user agent.
|
|
10
|
+
/// </summary>
|
|
11
|
+
public const string USER_AGENT = "User-Agent";
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
/// <summary>
|
|
14
|
+
/// HTTP header key for specifying the content type.
|
|
15
|
+
/// </summary>
|
|
16
|
+
public const string CONTENT_TYPE = "Content-Type";
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// HTTP header key for specifying the content length.
|
|
20
|
+
/// </summary>
|
|
21
|
+
public const string CONTENT_LENGTH = "Content-Length";
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
/// <summary>
|
|
24
|
+
/// MIME type for JSON content.
|
|
25
|
+
/// </summary>
|
|
26
|
+
public const string APPLICATION_JSON = "application/json";
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
/// <summary>
|
|
29
|
+
/// MIME type for MsgPack content.
|
|
30
|
+
/// </summary>
|
|
31
|
+
public const string APPLICATION_MSGPACK = "application/msgpack";
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
/// <summary>
|
|
34
|
+
/// Key for the authentication token in requests.
|
|
35
|
+
/// </summary>
|
|
36
|
+
public const string RequestAuthTokenCmd = "a";
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// Key for the secret key in requests.
|
|
40
|
+
/// </summary>
|
|
41
|
+
public const string RequestSecretCmd = "s";
|
|
27
42
|
|
|
28
|
-
|
|
43
|
+
/// <summary>
|
|
44
|
+
/// Key for the gameId key in requests.
|
|
45
|
+
/// </summary>
|
|
46
|
+
public const string RequestGameIdCmd = "g";
|
|
29
47
|
|
|
48
|
+
/// <summary>
|
|
49
|
+
/// Key for MsgPack request commands.
|
|
50
|
+
/// </summary>
|
|
51
|
+
public const string RequestCmd_MsgPack = "r";
|
|
52
|
+
|
|
53
|
+
/// <summary>
|
|
54
|
+
/// Key for MsgPack response commands.
|
|
55
|
+
/// </summary>
|
|
56
|
+
public const string ResponseCmd_MsgPack = "r";
|
|
57
|
+
|
|
58
|
+
/// <summary>
|
|
59
|
+
/// Key for MsgPack event commands.
|
|
60
|
+
/// </summary>
|
|
61
|
+
public const string EventCmd_MsgPack = "e";
|
|
62
|
+
|
|
63
|
+
/// <summary>
|
|
64
|
+
/// Key for JSON request commands.
|
|
65
|
+
/// </summary>
|
|
66
|
+
public const string RequestCmd_Json = "t";
|
|
67
|
+
|
|
68
|
+
/// <summary>
|
|
69
|
+
/// Key for JSON response commands.
|
|
70
|
+
/// </summary>
|
|
71
|
+
public const string ResponseCmd_Json = "t";
|
|
72
|
+
|
|
73
|
+
/// <summary>
|
|
74
|
+
/// Key for JSON event commands.
|
|
75
|
+
/// </summary>
|
|
76
|
+
public const string EventCmd_Json = "y";
|
|
77
|
+
|
|
78
|
+
/// <summary>
|
|
79
|
+
/// General key for data fields.
|
|
80
|
+
/// </summary>
|
|
81
|
+
public const string Data = "d";
|
|
82
|
+
|
|
83
|
+
/// <summary>
|
|
84
|
+
/// Key for file fields.
|
|
85
|
+
/// </summary>
|
|
86
|
+
public const string File = "f";
|
|
87
|
+
|
|
88
|
+
/// <summary>
|
|
89
|
+
/// Private constructor to prevent instantiation of this utility class.
|
|
90
|
+
/// </summary>
|
|
91
|
+
private Commands() { }
|
|
92
|
+
}
|
|
30
93
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
namespace XmobiTea.GN.Constant
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
public enum GroupStatus
|
|
4
|
+
{
|
|
5
|
+
Member = 1,
|
|
6
|
+
WaitingAccept = 2,
|
|
7
|
+
SentRequestAndWaitingAccept = 3,
|
|
8
|
+
NotMember = 4,
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
}
|
|
11
11
|
|
|
12
12
|
}
|
|
@@ -1,54 +1,59 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Constant
|
|
1
|
+
namespace XmobiTea.GN.Constant
|
|
2
|
+
{
|
|
2
3
|
public partial class GNErrorCode
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
{
|
|
5
|
+
public const int Ok = 1;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
7
|
+
public const int AccountNotFound = 2;
|
|
8
|
+
public const int AccountPasswordWrong = 3;
|
|
9
|
+
public const int AccountUsernameExists = 4;
|
|
10
|
+
public const int VerifyTokenError = 5;
|
|
11
|
+
public const int ServiceNameNotFound = 6;
|
|
12
|
+
public const int CharacterPlayerNotFound = 7;
|
|
13
|
+
public const int NotEnoughCurrency = 8;
|
|
14
|
+
public const int KeyNotFound = 9;
|
|
15
|
+
public const int ItemNotFound = 10;
|
|
16
|
+
public const int CatalogIdNotFound = 11;
|
|
17
|
+
public const int GroupNotFound = 12;
|
|
18
|
+
public const int OwnerNotFound = 13;
|
|
19
|
+
public const int ClassIdNotFound = 14;
|
|
20
|
+
public const int MemberNotFound = 15;
|
|
21
|
+
public const int PlayerNotMember = 16;
|
|
22
|
+
public const int GamePlayerNotFound = 17;
|
|
23
|
+
public const int FileNotFound = 18;
|
|
24
|
+
public const int FileNotUpload = 19;
|
|
25
|
+
public const int OwnerTypeNotSupport = 20;
|
|
26
|
+
public const int ItemNotComsumable = 21;
|
|
27
|
+
public const int GameNotFound = 22;
|
|
28
|
+
public const int GameIsExists = 23;
|
|
29
|
+
public const int SecretInfoNotFound = 24;
|
|
30
|
+
public const int SecretInfoIsExists = 25;
|
|
31
|
+
public const int ExternalNotLinked = 26;
|
|
32
|
+
public const int ExternalLinkedOtherAccount = 27;
|
|
33
|
+
public const int ExternalLinkedOtherValue = 28;
|
|
34
|
+
public const int MasterPlayerNotFound = 29;
|
|
35
|
+
public const int StoreItemNotFound = 30;
|
|
36
|
+
public const int BuyerNotFound = 31;
|
|
37
|
+
public const int CanNotBuyThisStoreItem = 32;
|
|
38
|
+
public const int ExceptionWhenValidateReceipt = 33;
|
|
39
|
+
public const int StoreInvalid = 34;
|
|
40
|
+
public const int ReceiptInvalid = 35;
|
|
41
|
+
public const int StoreItemHadBeenRemove = 36;
|
|
42
|
+
public const int DisplayNameHasUse = 37;
|
|
43
|
+
public const int PlayerBan = 38;
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
public const int MatchmakingTicketNotFound = 39;
|
|
46
|
+
public const int MatchmakingTicketAlreadyCompleted = 40;
|
|
47
|
+
public const int MatchmakingPlayerHasNotJoinedTicket = 41;
|
|
48
|
+
public const int MatchNotFound = 42;
|
|
49
|
+
public const int MatchmakingPlayerHasJoinedOtherTicket = 43;
|
|
50
|
+
public const int MatchmakingQueueNotFound = 44;
|
|
51
|
+
public const int TicketSizeError = 45;
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
public const int ExecuteError = 46;
|
|
54
|
+
public const int VersionInvalid = 47;
|
|
55
|
+
public const int EmailInvalid = 48;
|
|
56
|
+
|
|
57
|
+
}
|
|
53
58
|
|
|
54
59
|
}
|
|
@@ -1,16 +1,43 @@
|
|
|
1
1
|
namespace XmobiTea.GN.Constant
|
|
2
2
|
{
|
|
3
|
+
/// <summary>
|
|
4
|
+
/// Defines constant event codes for handling various server events.
|
|
5
|
+
/// </summary>
|
|
3
6
|
public partial class EventCode
|
|
4
7
|
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// Event code for when a game player's friend list is updated.
|
|
10
|
+
/// </summary>
|
|
5
11
|
public const int OnGamePlayerFriendUpdate = 1;
|
|
12
|
+
|
|
13
|
+
/// <summary>
|
|
14
|
+
/// Event code for when a character player's friend list is updated.
|
|
15
|
+
/// </summary>
|
|
6
16
|
public const int OnCharacterPlayerFriendUpdate = 2;
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// Event code for when a game player's group list is updated.
|
|
20
|
+
/// </summary>
|
|
7
21
|
public const int OnGamePlayerGroupUpdate = 3;
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
/// Event code for when a group member's details are updated.
|
|
25
|
+
/// </summary>
|
|
8
26
|
public const int OnGroupMemberUpdate = 4;
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
/// Event code for when group messages are updated.
|
|
30
|
+
/// </summary>
|
|
9
31
|
public const int OnGroupMessageUpdate = 5;
|
|
32
|
+
|
|
33
|
+
/// <summary>
|
|
34
|
+
/// Event code for when a character player's group list is updated.
|
|
35
|
+
/// </summary>
|
|
10
36
|
public const int OnCharacterPlayerGroupUpdate = 6;
|
|
11
37
|
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// Private constructor to prevent instantiation of this utility class.
|
|
40
|
+
/// </summary>
|
|
12
41
|
private EventCode() { }
|
|
13
|
-
|
|
14
42
|
}
|
|
15
|
-
|
|
16
43
|
}
|