Skip to content

Commit

Permalink
fix(explore): explore will no longer throw when you try to find an item
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Sep 21, 2023
1 parent bbdf35d commit 2cb92c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions server/src/modules/content/content.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ export class ContentService {
return this.equipment[item] || this.collectibles[item];
}

public hasRecipe(item: string): boolean {
return !!this.recipes[item];
}

public getRecipe(item: string): IRecipe {
const recipeRef = this.recipes[item];
if (!recipeRef) throw new NotFoundException(`Recipe ${item} not found!`);
Expand Down
2 changes: 1 addition & 1 deletion server/src/modules/player/player.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export class PlayerService {
.allEquipment()
.filter(
(item) =>
!this.contentService.getRecipe(item.itemId) &&
!this.contentService.hasRecipe(item.itemId) &&
item.levelRequirement <= location.level &&
item.levelRequirement >= location.itemLevel,
),
Expand Down

0 comments on commit 2cb92c9

Please sign in to comment.