Skip to content

Commit 304c374

Browse files
committed
dungeon reward fixes
1 parent 1e0ebf9 commit 304c374

9 files changed

Lines changed: 35 additions & 18 deletions

File tree

apps/web/app/pages/misc/about/about.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ export class AboutComponent implements OnInit {
2121
if (APP_CONFIG.isPTR) {
2222
return `Public Test Realm ${version}`
2323
}
24-
return '1.6.6'
25-
// return APP_CONFIG.version.split('-')[0]
24+
return APP_CONFIG.version.split('-')[0]
2625
}
2726

2827
constructor() {}

apps/web/app/pages/tools/dungeons/dungeon-detail.component.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,28 @@ export class DungeonDetailComponent implements OnInit {
118118
difficulty: this.difficulty$,
119119
events: this.nw.db.gameEventsMap,
120120
items: this.nw.db.itemsMap,
121+
loot: this.nw.db.lootTablesMap
121122
})
122123
).pipe(
123-
map(({ rank, difficulty, events, items }) => {
124+
map(({ rank, difficulty, events, items, loot }) => {
125+
124126
if (!difficulty) {
125127
return []
126128
}
127129

128130
return [
129-
{ eventId: difficulty.CompletionEvent1, rankId: 'bronze' as DifficultyRank },
130-
{ eventId: difficulty.CompletionEvent2, rankId: 'silver' as DifficultyRank },
131-
{ eventId: difficulty.CompletionEvent3, rankId: 'gold' as DifficultyRank },
131+
{ eventId: difficulty.CompletionEvent1, rankPos: 1, rankId: 'bronze' as DifficultyRank },
132+
{ eventId: difficulty.CompletionEvent2, rankPos: 2, rankId: 'silver' as DifficultyRank },
133+
{ eventId: difficulty.CompletionEvent3, rankPos: 3, rankId: 'gold' as DifficultyRank },
132134
]
133-
.map(({ eventId, rankId }, i) => {
135+
.map(({ eventId, rankPos, rankId }, i) => {
136+
// TODO: cleanup
134137
const event = events.get(eventId)
135-
const item = items.get(event.ItemReward as string)
138+
const bucket = loot.get(`Loot_MutDiff${difficulty.MutationDifficulty}T${rankPos}`)
139+
const bucketItem = bucket.Items?.[0]
140+
const itemId = bucketItem?.ItemID
141+
const item = items.get(itemId)
142+
136143
if (!item) {
137144
return null
138145
}
@@ -141,7 +148,7 @@ export class DungeonDetailComponent implements OnInit {
141148
ItemID: item.ItemID,
142149
ItemName: item.Name,
143150
IconPath: getItemIconPath(item),
144-
Quantity: event.ItemRewardQty,
151+
Quantity: bucketItem?.Qty || '?',
145152
Completed: rankId == rank,
146153
toggle: () => {
147154
if (rankId == rank) {

apps/web/app/pages/tools/dungeons/dungeons.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core'
22
import { GameEvent, Gamemodes, Housingitems, ItemDefinitionMaster, Mutationdifficulty } from '@nw-data/types'
33
import { uniq } from 'lodash'
4-
import { combineLatest, defer, isObservable, map, Observable, of, switchMap } from 'rxjs'
4+
import { combineLatest, defer, isObservable, map, Observable, of, switchMap, tap } from 'rxjs'
55
import { NwLootbucketService, NwService } from '~/nw'
66
import { getVitalDungeon } from '~/nw/utils'
77
import { DungeonPreferencesService } from '~/preferences'

apps/web/app/widgets/item-detail/item-detail-header.component.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
</a>
88
<aside class="flex-1 flex flex-col justify-between">
99
<div class="flex flex-row justify-between">
10-
<h3 class="font-bold text-rarity-{{vm.rarity}}" [nwText]="vm.name"></h3>
10+
<h3 class="font-bold text-rarity-{{vm.rarity}} leading-4 mt-1" [nwText]="vm.name"></h3>
1111
<div class="flex flex-col items-end">
1212
<nwb-item-marker [itemId]="vm.entityId" *ngIf="showMarker$ | async" class="text-right"></nwb-item-marker>
1313
<nwb-gs-tracker [itemId]="vm.entityId" *ngIf="showGsMarker$ | async" class="text-right mt-1 tooltip-left" [emptyTip]="'Track Gear Score'"></nwb-gs-tracker>
1414
</div>
1515
</div>
16-
<div class="flex flex-row justify-between gap-2">
17-
<span [nwText]="vm.typeName"></span>
18-
<span class="font-bold text-rarity-{{vm.rarity}}" [nwText]="vm.rarityName"></span>
16+
<div>
17+
<div *ngIf="vm.sourceLabel" class="text-xs" [class.text-error]="vm.isDeprecated">{{ vm.sourceLabel }}</div>
18+
<div class="flex flex-row justify-between gap-2">
19+
<span [nwText]="vm.typeName"></span>
20+
<span class="font-bold text-rarity-{{vm.rarity}}" [nwText]="vm.rarityName"></span>
21+
</div>
1922
</div>
2023
</aside>
2124
</ng-container>

apps/web/app/widgets/item-detail/item-detail-header.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class ItemDetailHeaderComponent {
2626
}
2727

2828
protected name$ = this.detail.name$
29+
protected source$ = this.detail.source$
2930
protected rarity$ = this.detail.rarity$
3031
protected rarityName$ = this.detail.rarityName$
3132
protected tier$ = this.detail.tierLabel$

apps/web/app/widgets/item-detail/item-detail.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
hasPerkInherentAffix,
1818
getItemTierAsRoman,
1919
} from '~/nw/utils'
20-
import { deferStateFlat, shareReplayRefCount } from '~/utils'
20+
import { deferStateFlat, humanize, shareReplayRefCount } from '~/utils'
2121

2222
function isTruthy(value: any) {
2323
return !!value
@@ -59,6 +59,7 @@ export class ItemDetailService {
5959
public readonly itemStatsRef$ = this.item$.pipe(map((it) => it?.ItemStatsRef))
6060
public readonly entityId$ = new ReplaySubject<string>(1)
6161
public readonly name$ = this.entity$.pipe(map((it) => it?.Name))
62+
public readonly source$ = this.entity$.pipe(map((it) => it?.['$source']))
6263
public readonly description$ = this.entity$.pipe(map((it) => it?.Description))
6364
public readonly icon$ = this.entity$.pipe(map((it) => getItemIconPath(it)))
6465
public readonly rarity$ = this.entity$.pipe(map((it) => getItemRarity(it)))
@@ -87,6 +88,8 @@ export class ItemDetailService {
8788
entity: this.entity$,
8889
entityId: this.entityId$,
8990
name: this.name$,
91+
sourceLabel: this.source$.pipe(map((it) => humanize(it))),
92+
isDeprecated: this.source$.pipe(map((it) => /depricated/i.test(it|| ''))),
9093
description: this.description$,
9194
icon: this.icon$,
9295
rarity: this.finalRarity$,

apps/web/app/widgets/vitals-families/vital-detail.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ const FAMILY_META = {
2525
Icon: 'assets/images/missionimage_undead1.png',
2626
Name: 'VC_Lost',
2727
},
28+
fae: {
29+
Icon: '',
30+
Name: 'Fae',
31+
},
2832
}
2933

3034
@Component({

apps/web/nw-data/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,7 @@ export interface Spelltable {
28422842
SpellID: string;
28432843
SpellPrefabPath?: string;
28442844
SpellTypes?: string;
2845-
StatusEffectDurations?: string;
2845+
StatusEffectDurations?: number | string;
28462846
StatusEffects?: string;
28472847
StickWhenAttached?: boolean;
28482848
StoreOffsetWhenStuckToGDE?: boolean;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nw-buddy",
3-
"version": "1.7.0-6",
3+
"version": "1.7.0-7",
44
"description": "New World Buddy",
55
"keywords": [],
66
"main": "dist/electron/main.js",
@@ -15,7 +15,7 @@
1515
"dev": "npm-run-all -p dev:electron dev:web",
1616
"dev:web": "ng serve --host 0.0.0.0 --disable-host-check -c dev -o",
1717
"dev:electron": "yarn electron:serve",
18-
"build": "yarn build:electron && yarn build:web:capacitor && electron-builder build --publish=never --config=electron-config.js",
18+
"build": "yarn build:electron && yarn build:web && electron-builder build --publish=never --config=electron-config.js",
1919
"build:web": "ng build --base-href ./",
2020
"build:web:electron": "yarn build:web -c electron",
2121
"build:web:capacitor": "yarn build:web -c capacitor",

0 commit comments

Comments
 (0)