pvp:修复存储roleId字段
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user