Skip to content

Commit

Permalink
fix: quest detection
Browse files Browse the repository at this point in the history
  • Loading branch information
feildmaster committed Oct 16, 2023
1 parent adfb451 commit 9ba756c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# UnderScript Changelog

## Version 0.55.1 (2023-10-16)
1. Fixed quest detection

## Version 0.55.0 (2023-10-15)
### New Features
1. Implement Bug Tracker (Sentry.io)
Expand All @@ -8,7 +11,7 @@
1. Update google analytics
### Plugins
1. `player:endTurn` event (cancelable)
1. `plugin.quests.update()`: Updates quests, returns `Promise.then({ quests, previous }).catch(error)``
1. `plugin.quests.update()`: Updates quests, returns `Promise.then({ quests, previous }).catch(error)`
1. `plugin.quests.getQuests()`: Gets currently cached quests (empty if update is not called)

## Version 0.54.1 (2023-08-19)
Expand Down
3 changes: 1 addition & 2 deletions src/utils/quests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import axios from 'axios';
import eventManager from './eventManager.js';
import Quest, { getId } from '../structures/quests/Quest.js';
import onPage from './onPage.js';

/**
* @type {Map<number, Quest>}
Expand All @@ -15,7 +14,7 @@ export function getQuests() {

function update(data, { callback, event = true }) {
const previous = getQuests().map((q) => q.clone());
$(data).find('progress.xpBar').parentsUntil('tbody', 'tr').each((_, el) => {
$(data).find('.questTable progress').parentsUntil('tbody', 'tr').each((_, el) => {
const id = getId(el);
if (!id) return; // Pass quest or malformed data
if (quests.has(id)) {
Expand Down

0 comments on commit 9ba756c

Please sign in to comment.