返回提交历史
Modified
src/controllers/dynamic/getProfileViewingDataController.ts
+3
-5
XFEstudio/XFESpaceNinjaServer
fix: respect spoofMasteryRank in getProfileViewingDataByGuildId (#3461)
Closes #3459 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3461 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
3ef161d5
代码差异
1 个文件
+3
-5
@@ -81,10 +81,7 @@ export const getProfileViewingDataByPlayerId = async (playerId: string): Promise
81
81
const result: IPlayerProfileViewingDataResult = {
82
82
AccountId: toOid(account._id),
83
83
DisplayName: account.DisplayName,
84
PlayerLevel:
85
inventory.spoofMasteryRank !== undefined && inventory.spoofMasteryRank !== -1
86
? inventory.spoofMasteryRank
87
: inventory.PlayerLevel,
84
PlayerLevel: (inventory.spoofMasteryRank ?? -1) !== -1 ? inventory.spoofMasteryRank! : inventory.PlayerLevel,
88
85
LoadOutInventory: {
89
86
WeaponSkins: [],
90
87
XPInfo: inventory.XPInfo
@@ -146,7 +143,8 @@ export const getProfileViewingDataByGuildId = async (guildId: string): Promise<I
146
143
const result: IPlayerProfileViewingDataResult = {
147
144
AccountId: toOid(account!._id),
148
145
DisplayName: account!.DisplayName,
149
PlayerLevel: inventory!.PlayerLevel,
146
PlayerLevel:
147
(inventory!.spoofMasteryRank ?? -1) !== -1 ? inventory!.spoofMasteryRank! : inventory!.PlayerLevel,
150
148
LoadOutInventory: {
151
149
WeaponSkins: [],
152
150
XPInfo: inventory!.XPInfo