92 lines
4.1 KiB
C
92 lines
4.1 KiB
C
#ifndef __ACE_SDK_ACCOUNT_H__
|
|
#define __ACE_SDK_ACCOUNT_H__
|
|
|
|
#include "ace_sdk_common.h"
|
|
|
|
#pragma pack(push, 1)
|
|
|
|
#ifndef ACE_SDK_ACCOUNT_TYPE_ENUM
|
|
#define ACE_SDK_ACCOUNT_TYPE_ENUM
|
|
typedef enum
|
|
{
|
|
ACE_SDK_ACCOUNT_TYPE_QQ = 1, // QQ Number
|
|
ACE_SDK_ACCOUNT_TYPE_WECHAT = 2, // WeChat Openid
|
|
ACE_SDK_ACCOUNT_TYPE_BAIDU = 3, // Baidu Account
|
|
ACE_SDK_ACCOUNT_TYPE_QQ_OPENID = 4, // QQ Openid
|
|
ACE_SDK_ACCOUNT_TYPE_VISITOR = 7, // Visitor
|
|
ACE_SDK_ACCOUNT_TYPE_GOPENID = 8, // Gopenid
|
|
ACE_SDK_ACCOUNT_TYPE_GOOGLE = 101, // Google Mail
|
|
ACE_SDK_ACCOUNT_TYPE_WEGAME_MAIL = 102, // Wegame Mail
|
|
ACE_SDK_ACCOUNT_TYPE_4399 = 201, // 4399
|
|
ACE_SDK_ACCOUNT_TYPE_GARENA = 202, // Garena
|
|
ACE_SDK_ACCOUNT_TYPE_GIANT_NETWORK = 203, // Giant Network
|
|
ACE_SDK_ACCOUNT_TYPE_WEGAME = 301, // WeGame Rail ID
|
|
ACE_SDK_ACCOUNT_TYPE_STEAM = 302, // Steam
|
|
ACE_SDK_ACCOUNT_TYPE_WEGAME_COMMON_ID = 308, // WeGame Common ID
|
|
ACE_SDK_ACCOUNT_TYPE_WOODUAN = 312, // WOODUAN
|
|
ACE_SDK_ACCOUNT_TYPE_VK = 314, // VK
|
|
ACE_SDK_ACCOUNT_TYPE_COMMON_ID = 601, // Common Account
|
|
ACE_SDK_ACCOUNT_TYPE_FACEBOOK = 1001, // Facebook
|
|
ACE_SDK_ACCOUNT_TYPE_SUPERCELL = 1002, // Supercell
|
|
ACE_SDK_ACCOUNT_TYPE_TCOMMIC = 1005, // Tcommic
|
|
ACE_SDK_ACCOUNT_TYPE_UPLAY = 1006, // Uplay
|
|
ACE_SDK_ACCOUNT_TYPE_PHONE_OPENID = 1014, // Telephone Openid
|
|
ACE_SDK_ACCOUNT_TYPE_LINE = 1019, // Line
|
|
ACE_SDK_ACCOUNT_TYPE_APPLE = 1020, // Apple
|
|
} AceSdkAccountType;
|
|
#endif
|
|
|
|
#ifndef ACE_SDK_ACCOUNT_PLAT_ENUM
|
|
#define ACE_SDK_ACCOUNT_PLAT_ENUM
|
|
typedef enum
|
|
{
|
|
ACE_SDK_PLAT_ID_IOS = 0, // IOS
|
|
ACE_SDK_PLAT_ID_ANDROID = 1, // Android
|
|
ACE_SDK_PLAT_ID_PC_CLIENT = 3, // PC
|
|
ACE_SDK_PLAT_ID_LINUX = 4, // Linux
|
|
ACE_SDK_PLAT_ID_SWITCH = 6, // Switch client
|
|
ACE_SDK_PLAT_ID_MAC = 7, // Mac
|
|
ACE_SDK_PLAT_ID_PS_CLIENT = 8, // PS client
|
|
ACE_SDK_PLAT_ID_XBOX_CLIENT = 9, // XBOX client
|
|
ACE_SDK_PLAT_ID_PC_EMULATOR_CLIENT = 11, // PC Emulator
|
|
ACE_SDK_PLAT_ID_HARMONY_MOBILE = 12, // Harmony Mobile
|
|
ACE_SDK_PLAT_ID_HARMONY_PC = 13, // Harmony PC
|
|
ACE_SDK_PLAT_ID_UNKNOWN = 99,
|
|
} AceSdkAccountPlatID;
|
|
#endif
|
|
|
|
#ifndef ACE_SDK_MAX_ACCOUNT_LEN
|
|
#define ACE_SDK_MAX_ACCOUNT_LEN 65
|
|
#endif
|
|
|
|
/**
|
|
* 1. Some fields below also require filling in on the client side, their consistency between client and server needs to be ensured.
|
|
*/
|
|
typedef struct
|
|
{
|
|
/**
|
|
* Player's account is a C-style string composed only of printable ascii characters(except spaces) and '\0' terminator.
|
|
* Player's account must be unique for the same 'game_id_'.
|
|
*/
|
|
char account_[ACE_SDK_MAX_ACCOUNT_LEN];
|
|
|
|
/**
|
|
* If it is not defined in 'AceSdkAccountType', fill it with 'AceSdkAccountType::ACE_SDK_ACCOUNT_TYPE_COMMON_ID'.
|
|
*/
|
|
AceSdkAccountType account_type_;
|
|
|
|
// Plat ID of player's client.
|
|
AceSdkAccountPlatID plat_id_;
|
|
|
|
// Contact ACE to obtain your game ID.
|
|
uint32_t game_id_;
|
|
|
|
/**
|
|
* For games with separate zones, please fill in the zone ID to uniquely identify a zone; for games without separate zones, please fill in 0.
|
|
*/
|
|
uint32_t world_id_;
|
|
} AceSdkAccount;
|
|
|
|
#pragma pack(pop)
|
|
|
|
#endif // __ACE_SDK_ACCOUNT_H__
|