增加ACE安全测试工程
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
enum ACEReportScene
|
||||
{
|
||||
REPORT_SCENE_UGC = 1,
|
||||
REPORT_SCENE_INFORMATION=2,
|
||||
REPORT_SCENE_BATTLE=3,
|
||||
REPORT_SCENE_ARTICLE=4,
|
||||
REPORT_SCENE_COMMENT=5,
|
||||
REPORT_SCENE_IMAGE=6,
|
||||
REPORT_SCENE_ORGANIZE=7,
|
||||
REPORT_SCENE_OTHER=8,
|
||||
};
|
||||
|
||||
enum ACEReportCategory
|
||||
{
|
||||
REPORT_CATEGORY_ILLEGAL = 1,
|
||||
REPORT_CATEGORY_BEHAVIOR = 2,
|
||||
REPORT_CATEGORY_CHEAT = 3,
|
||||
REPORT_CATEGORY_STUDIO = 4,
|
||||
|
||||
REPORT_CATEGORY_UGC = 7,
|
||||
REPORT_CATEGORY_ORGANIZE = 8,
|
||||
REPORT_CATEGORY_PERSONAL = 9,
|
||||
};
|
||||
|
||||
enum ACEReportReason
|
||||
{
|
||||
//发布违规信息 REPORT_CATEGORY_ILLEGAL
|
||||
REPORT_REASON_ILLEGAL_ABUSE = 101,
|
||||
REPORT_REASON_ILLEGAL_ADVERTISEMENT = 102,
|
||||
REPORT_REASON_ILLEGAL_PORN = 103,
|
||||
REPORT_REASON_ILLEGAL_POLITICS = 104,
|
||||
REPORT_REASON_ILLEGAL_HARASS = 105,
|
||||
REPORT_REASON_ILLEGAL_VIOLENT = 106,
|
||||
REPORT_REASON_ILLEGAL_GAMBLE = 107,
|
||||
REPORT_REASON_ILLEGAL_CHEAT = 108,
|
||||
REPORT_REASON_ILLEGAL_PRIVACY_LEAKS = 109,
|
||||
REPORT_REASON_IULEGAL_INFRINGEMENT = 110,
|
||||
REPORT_REASON_ILLEGAL_OTHER = 199,
|
||||
|
||||
//恶意游戏行为 REPORT_CATEGORY BEHAVIOR
|
||||
REPORT_REASON_BEHAVIOR_FRIENDLYFIRE = 201,
|
||||
REPORT_REASON_BEHAVIOR_FORM_CHEATER_TEAM = 202,
|
||||
REPORT_REASON_BEHAVIOR_JOIN_CHEATER_TEAM = 203,
|
||||
REPORT_REASON_BEHAVIOR_GUARDED_BY_CHEATER = 204,
|
||||
REPORT_REASON_BEHAVIOR_EXPLOITING = 205,
|
||||
REPORT_REASON_BEHAVIOR_AUTO_ROBOT = 206,
|
||||
REPORT_REASON_BEHAVIOR_PASSIVE_PLAY = 207,
|
||||
REPORT_REASON_BEHAVIOR_MALICIOUS_REPEAT = 208,
|
||||
REPORT_REASON_BEHAVIOR_REFUSE_COOPERATE = 210,
|
||||
REPORT_REASON_BEHAVIOR_OTHER=299,
|
||||
|
||||
//使用作弊工具REPORT_CATEGORY_CHEAT
|
||||
REPORT_REASON_CHEAT_SEE_THROUTH = 301,
|
||||
REPORT_REASON_CHEAT_AUTO_AIM = 302,
|
||||
REPORT_REASON_CHEAT_NO_RECOIL = 303,
|
||||
REPORT_REASON_CHEAT_SPEED_UP = 304,
|
||||
REPORT_REASON_CHEAT_DAMAGE_RANGE = 305,
|
||||
REPORT_REASON_CHEAT_WALL_THROUGH = 306,
|
||||
REPORT_REASON_CHEAT_FLYING = 307,
|
||||
REPORT_REASON_CHEAT_TELEPORT = 308,
|
||||
REPORT_REASON_CHEAT_INSTANT_KILLING = 309,
|
||||
REPORT_REASON_CHEAT_AUTO_FIRING = 310,
|
||||
REPORT_REASON_CHEAT_MACRO = 311,
|
||||
REPORT_REASON_CHEAT_INF_PROJECTILES = 312,
|
||||
REPORT_REASON_CHEAT_SHOOTING_SPEED = 313,
|
||||
REPORT_REASON_CHEAT_INF_BULLETS = 314,
|
||||
REPORT_REASON_CHEAT_EXTERNAL_DEVICE = 315,
|
||||
REPORT_REASON_CHEAT_REMOTE_PICKING = 316,
|
||||
REPORT_REASON_CHEAT_REMOTE_KILLING = 317,
|
||||
REPORT_REASON_CHEAT_OTHER=399,
|
||||
|
||||
//工作室行为REPORT_CATEGORY_STUDIO
|
||||
REPORT_REASON_STUDIO_COMPETE_RESOURCE = 401,
|
||||
REPORT_REASON_STUDIO_OFFLINE_DEAL = 402,
|
||||
REPORT_REASON_STUDIO_ILLEGAL_BENEFITS = 403,
|
||||
REPORT_REASON_STUDIO_TEAM = 404,
|
||||
REPORT_REASON_STUDIO_MULTI_PLAVING = 405,
|
||||
REPORT_REASON_STUDIO_OTHER=499,
|
||||
|
||||
//自定义内容违规REPORT_CATEGORY_UGC
|
||||
REPORT_REASON_UGC_ILLEGAL_NAME = 701,
|
||||
REPORT_REASON_UGC_ILLEGAL_BRIEF = 702,
|
||||
REPORT_REASON_UGC_PORN_CONTENT = 703,
|
||||
REPORT_REASON_UGC_POLITICAL_CONTENT = 704,
|
||||
REPORT_REASON_UGC_ABUSIVE_CONTENT = 705,
|
||||
REPORT_REASON_UGC_FRAUDULENT_CONTENT = 706,
|
||||
REPORT_REASON_UGC_OTHER=799,
|
||||
};
|
||||
|
||||
enum DNFReportEntranceID
|
||||
{
|
||||
DNF_REPORT_ENTRANCE_TEST = 0,
|
||||
};
|
||||
|
||||
typedef std::vector<ACEReportReason> ACEReportReasonArray;
|
||||
struct ACEReportStruct;
|
||||
typedef ACEReportStruct* ACEReportContext;
|
||||
|
||||
class GameClient;
|
||||
|
||||
class ACEReport
|
||||
{
|
||||
public:
|
||||
ACEReport();
|
||||
~ACEReport();
|
||||
|
||||
void init(GameClient* client);
|
||||
|
||||
public:
|
||||
ACEReportContext createReportContext(
|
||||
const char* account,
|
||||
int32_t worldID,
|
||||
const char* reported_name,
|
||||
const char* reported_roldid,
|
||||
|
||||
ACEReportScene scene,
|
||||
ACEReportCategory category,
|
||||
const ACEReportReasonArray& reasons,
|
||||
DNFReportEntranceID entranceID = DNF_REPORT_ENTRANCE_TEST
|
||||
);
|
||||
|
||||
//设置对局ID和时间,如果要举报和战局有关的信息,这两条必须同时设置
|
||||
void setReportBattleID(ACEReportContext ctx, const char* battle_id, int32_t battle_time);
|
||||
//设置举报的描述信息,这里举报者自己描述的文本信息
|
||||
void setReportDesc(ACEReportContext ctx, const char* desc);
|
||||
//设置举报内容,这里是指要举报的目标内容
|
||||
void setContent(ACEReportContext ctx, const char* content);
|
||||
//设置举报的公会、战队、房间等组织的ID和名称
|
||||
void setGroupID(ACEReportContext ctx, const char* groupID, const char* groupName);
|
||||
//设置举报者的头像URL,最大长度4096字寸,要求外网或者IDC个的多访问下载
|
||||
void setReportedProfileUrl(ACEReportContext ctx, const char* profileURL);
|
||||
//添加举报的图片URL,可以添加多个(最多12个),单条最人长度4096字节,要求外网或者IDC能够访问下载
|
||||
void addReportedPictureURL(ACEReportContext ctx, const char* profileURL);
|
||||
//添加举报的视频URL,可以添加多个(最务1个),单条最人长度4096字节,要求外网或者IDC能够访问下载
|
||||
void addReportedVideoURL(ACEReportContext ctx, const char* profileuRL);
|
||||
//添加举报的语音URL,可以添加多个(最多12个),单条最大长度409
|
||||
void addReportedVoiceURL(ACEReportContext tx, const char* profileURL);
|
||||
//添加其他需要添加的ID,例如文章T,房间T0等,每种类型都可以添加多个, addReportcontent(ctx, "room id",“123456");
|
||||
void addReportIDContent(ACEReportContext ctx, const char* idTyne, const char* idContent);
|
||||
|
||||
//上报结果回调
|
||||
typedef std::function<void(ACEReportContext ctx, int32_t result, const char* error_message)> CallbackFunction;
|
||||
bool uploadReport(ACEReportContext ctx, CallbackFunction callback);
|
||||
|
||||
private:
|
||||
void onReportResult(int32_t reportID, uint32_t result, const char* errorMessage);
|
||||
ACEReportStruct* getReport(ACEReportContext ctx);
|
||||
|
||||
private:
|
||||
GameClient* m_client = nullptr;
|
||||
|
||||
typedef std::map<int32_t, ACEReportContext> ReportStructMap;
|
||||
ReportStructMap m_reportStructMap;
|
||||
int32_t m_nextID = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user