Giter Club home page Giter Club logo

Comments (1)

moonysolari avatar moonysolari commented on September 28, 2024 1

This is at least partly caused by the incorrect MissionReward.Challenges property in the return value of the missionEnd function in components/scoreHandler.ts. It currently returns all finished challenges of this sublocation. The correct behavior is to only return both global and sublocation-specific challenges that were finished since the last time the missionEnd function was called on this sub-location. Note that challenges will accumulate over several sessions especially if the user deliberately avoids triggering the mission ending page.

One solution is to categorize the Extensions.ChallengeProgression objects stored in user profiles by their sublocations, and add a Boolean property for each challenge denoting whether it has previously been returned by the missionEnd function (i.e. "ticked" on the mission ending page).

Challenges: Object.values(
controller.challengeService.getChallengesForContract(
sessionDetails.contractId,
req.gameVersion,
),
)
.flat()
// FIXME: This behaviour may not be accurate to original server
.filter(
(challengeData) =>
controller.challengeService.getPersistentChallengeProgression(
req.jwt.unique_name,
challengeData.Id,
req.gameVersion,
).Completed,
)
.map((challengeData) =>
controller.challengeService.compileRegistryChallengeTreeData(
challengeData,
controller.challengeService.getPersistentChallengeProgression(
req.jwt.unique_name,
challengeData.Id,
req.gameVersion,
),
req.gameVersion,
req.jwt.unique_name,
),
),

from peacock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.