起名:添加屏蔽词检测

This commit is contained in:
luying
2021-11-10 19:41:06 +08:00
parent 32fe508625
commit a7f3bcc730
11 changed files with 178 additions and 33 deletions
+63
View File
@@ -126,6 +126,69 @@ export class Chat37Params {
}
}
setSign(sign: string) {
this.sign = sign;
}
}
export class CheckName37Params {
game_key: string;
sid: number; // 游戏区
username: number; // channelInfo.uid
actor: string; // roleName
actor_id: string; // roleId
ip: string; // 玩家ip
time: number; // unix时间戳
sign: string;
constructor(role: RoleType, roleName: string, user: UserType) {
let channelInfo = <LoginValidateData37>user.channelInfo;
this.game_key = SDK_37_CONST.GAME_KEY;
this.sid = role.serverId;
this.username = channelInfo.uid;
this.actor = roleName;
this.actor_id = role.roleId;
this.ip = user.ip;
this.time = nowSeconds();
}
getBody() {
let { game_key, sid, username, actor_id, ip, time } = this;
return {
game_key, sid, username, actor_id, ip, time
}
}
setSign(sign: string) {
this.sign = sign;
}
}
export class CheckGuild37Params {
game_key: string;
sid: number; // 游戏区
guildid: number; // 军团code
time: number; // unix时间戳
sign: string;
type: number;
content: string; // 内容
constructor(guildCode: string, serverId: number, type: number, content: string) {
this.game_key = SDK_37_CONST.GAME_KEY;
this.sid = serverId;
this.guildid = 10;
this.time = nowSeconds();
this.type = type;
this.content = content;
}
getBody() {
let { game_key, sid, time, type } = this;
return {
game_key, sid, time, type
}
}
setSign(sign: string) {
this.sign = sign;
}