pvp: 修复重复对手bug
This commit is contained in:
@@ -233,7 +233,12 @@ export async function getRank(key: string, serverId: number, roleId: string, lim
|
||||
// 获取我的排名
|
||||
export async function getMyRank(key: string, serverId: number, roleId: string) {
|
||||
let myRank = await redisClient().zrevrankAsync(getKeyName(key, serverId), roleId);
|
||||
return myRank + 1;
|
||||
|
||||
if(!myRank && myRank != 0) {
|
||||
return 0
|
||||
} else {
|
||||
return myRank + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// 获取排名第几名的信息
|
||||
|
||||
Reference in New Issue
Block a user