pvp:修复存储roleId字段

This commit is contained in:
luying
2021-11-08 15:52:57 +08:00
parent ff3e2cb244
commit 297f0d6b8f
2 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -572,7 +572,7 @@ export function getChineseName() {
return randomName.generate()
}
export function getRobotInfo(sysType = ROBOT_SYS_TYPE.COM_BTL) {
export function getRobotInfo(sysType?: ROBOT_SYS_TYPE) {
return {
robotRoleName: getChineseName(),
robotRoleId: makeRobotId(genCode(8), sysType),
@@ -585,7 +585,7 @@ export function checkRoleIsRobot(roleId: string) {
}
// 将一般的roleId转为带_r的
export function makeRobotId(roleId: string, sysType = ROBOT_SYS_TYPE.COM_BTL) {
export function makeRobotId(roleId: string, sysType?: ROBOT_SYS_TYPE) {
if(sysType) {
return `${sysType}|${roleId}_r`;
} else {