mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-09-30 13:56:49 -05:00
Fixed all_skill ranking always being set to 0.
Moved "samples" folder to "apisamples"
This commit is contained in:
2
gitadora@asphyxia/.gitignore
vendored
2
gitadora@asphyxia/.gitignore
vendored
@@ -1 +1 @@
|
|||||||
samples/
|
apisamples/
|
||||||
@@ -391,13 +391,15 @@ export const getPlayer: EPR = async (info, data, send) => {
|
|||||||
},
|
},
|
||||||
reward: {
|
reward: {
|
||||||
// status: K.ARRAY('u32', extra.reward_status ?? Array(50).fill(0)),
|
// status: K.ARRAY('u32', extra.reward_status ?? Array(50).fill(0)),
|
||||||
status: K.ARRAY('u32', Array(50).fill(1)),
|
status: K.ARRAY('u32', Array(50).fill(0)),
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
trbitem: {
|
trbitem: {
|
||||||
item: {
|
item: {
|
||||||
itemid: K.ITEM('s32', 707)
|
itemid: K.ITEM('s32', 707)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
rivaldata: {},
|
rivaldata: {},
|
||||||
frienddata: {},
|
frienddata: {},
|
||||||
thanks_medal: {
|
thanks_medal: {
|
||||||
@@ -528,8 +530,8 @@ export const getPlayer: EPR = async (info, data, send) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isAsphyxiaDebugMode()) {
|
if (isAsphyxiaDebugMode()) {
|
||||||
await IO.WriteFile(`samples/lastGetPlayerRequest.json`, JSON.stringify(data, null, 4))
|
await IO.WriteFile(`apisamples/lastGetPlayerRequest.json`, JSON.stringify(data, null, 4))
|
||||||
await IO.WriteFile(`samples/lastGetPlayerResponse.json`, JSON.stringify(response, null, 4))
|
await IO.WriteFile(`apisamples/lastGetPlayerResponse.json`, JSON.stringify(response, null, 4))
|
||||||
}
|
}
|
||||||
send.object(response);
|
send.object(response);
|
||||||
}
|
}
|
||||||
@@ -807,8 +809,8 @@ export const savePlayers: EPR = async (info, data, send) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isAsphyxiaDebugMode()) {
|
if (isAsphyxiaDebugMode()) {
|
||||||
await IO.WriteFile(`samples/lastSavePlayerRequest.json`, JSON.stringify(data, null, 4))
|
await IO.WriteFile(`apisamples/lastSavePlayersRequest.json`, JSON.stringify(data, null, 4))
|
||||||
await IO.WriteFile(`samples/lastSavePlayerResponse.json`, JSON.stringify(response, null, 4))
|
await IO.WriteFile(`apisamples/lastSavePlayersResponse.json`, JSON.stringify(response, null, 4))
|
||||||
}
|
}
|
||||||
await send.object(response);
|
await send.object(response);
|
||||||
}
|
}
|
||||||
@@ -1004,7 +1006,7 @@ async function getPlayerRanking(refid: string, version: string, game: 'gf' | 'dm
|
|||||||
let idxA = _.findIndex(sortedProfilesA, (e) => e.__refid === refid)
|
let idxA = _.findIndex(sortedProfilesA, (e) => e.__refid === refid)
|
||||||
idxA = idxA > -1 ? idxA + 1 : playerCount // Default to last place if not found in the DB.
|
idxA = idxA > -1 ? idxA + 1 : playerCount // Default to last place if not found in the DB.
|
||||||
let idxB = _.findIndex(sortedProfilesB, (e) => e.__refid === refid)
|
let idxB = _.findIndex(sortedProfilesB, (e) => e.__refid === refid)
|
||||||
idxA = idxB > -1 ? idxB + 1 : playerCount // Default to last place if not found in the DB.
|
idxB = idxB > -1 ? idxB + 1 : playerCount // Default to last place if not found in the DB.
|
||||||
|
|
||||||
return {
|
return {
|
||||||
refid,
|
refid,
|
||||||
|
|||||||
Reference in New Issue
Block a user