Skip to content

Commit

Permalink
#1 Added legacy level goal method.
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesDonnelly committed Jun 17, 2019
1 parent b91be08 commit 4146e88
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/de/mounts.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/en/mounts.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/fr/mounts.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ja/mounts.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
113
114
21 changes: 21 additions & 0 deletions extensions/obtain-methods.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const _localisationHelper = require('../src/config/_localisationHelper');
const achievements = require('../data/content/achievements.json');
const instances = require('../data/instances.json');
const maps = require('../data/maps.json');
const npcs = require('../data/npcs.json');

module.exports = {
barding: {
Expand Down Expand Up @@ -294,6 +296,9 @@ module.exports = {
]
},
mounts: {
4: [
{ fn: legacyLevelGoal, args: [30, npcs.find(npc => npc.id === 1000533), maps.find(map => map.id === 137), 36, 25] }
],
8: [
{ fn: collectorsEdition, args: [_localisationHelper.misc['Legacy (1.0)']] },
{ fn: collectorsEdition, args: [_localisationHelper.misc['A Realm Reborn']] }
Expand Down Expand Up @@ -464,4 +469,20 @@ function instancedContent(contentId, instance, language) {
contentId,
...instance
}, language)
}

/**
* Legacy level goal.
* @param {Number} contentId - The ID of the content
* @param {String} language - The localisation code (e.g. `"en"`)
*/
function legacyLevelGoal(contentId, level, npc, map, x, y, language) {
return _localisationHelper.legacyLevelGoalShort({
contentId,
level,
map,
npc,
x,
y
}, language)
}
11 changes: 11 additions & 0 deletions src/config/_localisationHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ module.exports = {
4,
[entry.level, entry.name[language], entry.type[language]]
]),
legacyLevelGoalShort: (entry, language) => ([
'legacyLevelGoalShort',
5,
[
entry.level,
entry.npc.name[language],
entry.map.name[language],
entry.x,
entry.y
]
]),
quest: {
eventQuestShort: (quest, language) => ([
'eventQuestShort',
Expand Down
3 changes: 2 additions & 1 deletion src/parsers/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,8 @@ async function parseMethodIcons() {
{ path: '/i/092000/092019.png', as: 1 }, // Shop.
{ path: '/i/092000/092013.png', as: 2 }, // Achievement.
{ path: '/i/092000/092016.png', as: 3 }, // Collectors Edition.
{ path: '/i/092000/092106.png', as: 4 } // Instanced Content.
{ path: '/i/092000/092106.png', as: 4 }, // Instanced Content.
{ path: '/i/092000/092003.png', as: 5 }, // Legacy-related.
];

await processIconGroup(paths, 'methods', { resize: 24 });
Expand Down

0 comments on commit 4146e88

Please sign in to comment.