fix 战报未保存对手roleId

This commit is contained in:
luying
2021-01-15 18:24:51 +08:00
parent 3973fc66eb
commit eac517c57b
4 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -584,7 +584,7 @@ export async function generPVPOppRecInfo(isSuccess: boolean, curOpp: OppPlayers,
}
}
return {
roleId: oppRole.roleId,
roleId: robotIdComBack(oppRole.oppRoleId),
roleName: oppRole.roleName,
lv: oppRole.lv,
sHid: oppRole.sHid,
-1
View File
@@ -120,7 +120,6 @@ export async function getMyRank(key: string, serverId: number, roleId: string) {
export async function getFieldByRank(key: string, serverId: number, rank: number) {
const client: Redis.RedisClient = pinus.app.get('redis');
let myRank = await client.zrevrangeAsync(getKeyName(key, serverId), rank - 1, rank - 1);
console.log('****', JSON.stringify(myRank))
return myRank;
}
+1 -1
View File
@@ -47,7 +47,7 @@ declare module 'redis' {
// 返回有序集中指定成员的排名,从大到小
zrevrankAsync(key: string, field: string): Promise<number>;
// 命令返回有序集中,指定区间内的成员,从大到小
zrevrangeAsync(key: string, start: number, end: number): Promise<any>;
zrevrangeAsync(key: string, start: number, end: number): Promise<string[]>;
}
export interface Multi extends Commands<Multi> {
execAsync(...args: any[]): Promise<any>;