mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
feat: adjust rld achievement
This commit is contained in:
parent
63507f00f6
commit
993b35cf3b
@ -120,7 +120,7 @@ export const mergeAchievements = async (
|
|||||||
|
|
||||||
const mergedLocalAchievements = unlockedAchievements.concat(newAchievements);
|
const mergedLocalAchievements = unlockedAchievements.concat(newAchievements);
|
||||||
|
|
||||||
if (game?.remoteId) {
|
if (game.remoteId) {
|
||||||
return HydraApi.put(
|
return HydraApi.put(
|
||||||
"/profile/games/achievements",
|
"/profile/games/achievements",
|
||||||
{
|
{
|
||||||
|
@ -242,6 +242,13 @@ const processRld = (unlockedAchievements: any): UnlockedAchievement[] => {
|
|||||||
const unlockedAchievement = unlockedAchievements[achievement];
|
const unlockedAchievement = unlockedAchievements[achievement];
|
||||||
|
|
||||||
if (unlockedAchievement?.State) {
|
if (unlockedAchievement?.State) {
|
||||||
|
const unlocked = new DataView(
|
||||||
|
new Uint8Array(
|
||||||
|
Buffer.from(unlockedAchievement.State.toString(), "hex")
|
||||||
|
).buffer
|
||||||
|
).getUint32(0, true);
|
||||||
|
|
||||||
|
if (unlocked === 1) {
|
||||||
newUnlockedAchievements.push({
|
newUnlockedAchievements.push({
|
||||||
name: achievement,
|
name: achievement,
|
||||||
unlockTime:
|
unlockTime:
|
||||||
@ -253,6 +260,7 @@ const processRld = (unlockedAchievements: any): UnlockedAchievement[] => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return newUnlockedAchievements;
|
return newUnlockedAchievements;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user