Skip to content

Commit 1e0eaa3

Browse files
authored
Merge pull request #1741 from ThingEngineering/main
Deploy
2 parents e7e43c4 + cb97572 commit 1e0eaa3

8 files changed

Lines changed: 62 additions & 10 deletions

File tree

apps/frontend/auctions/components/results/Selected.svelte

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import { Region } from '@/enums/region';
66
import { wowthingData } from '@/shared/stores/data';
77
import { leftPad } from '@/utils/formatting';
8+
import { applyBonusIds } from '@/utils/items/apply-bonus-ids';
89
910
import IconifyWrapper from '@/shared/components/images/IconifyWrapper.svelte';
1011
@@ -41,7 +42,11 @@
4142
}
4243
.quantity {
4344
text-align: right;
44-
width: 5.5rem;
45+
width: 3.5rem;
46+
}
47+
.level {
48+
text-align: right;
49+
width: 3rem;
4550
}
4651
.price {
4752
text-align: right;
@@ -54,7 +59,8 @@
5459
<thead>
5560
<tr>
5661
<th>Realm</th>
57-
<th>Lvl/Qty</th>
62+
<th>Qty</th>
63+
<th>Lvl</th>
5864
<!-- {#if auctions[0]?.connectedRealmId < 100000}
5965
<th>Bid</th>
6066
{/if} -->
@@ -66,6 +72,7 @@
6672
<tr>
6773
<td class="realm">L O A D I N G . . .</td>
6874
<td class="quantity"></td>
75+
<td class="level"></td>
6976
<td class="price"></td>
7077
</tr>
7178
{:then auctions}
@@ -89,12 +96,24 @@
8996
{realm.displayText}
9097
</td>
9198
<td class="quantity">
99+
{auction.quantity.toLocaleString()}
100+
</td>
101+
<td class="level">
92102
{#if auction.petSpeciesId}
93103
<span class="quality{auction.petQuality}">
94104
{auction.petLevel}
95105
</span>
96106
{:else}
97-
{auction.quantity.toLocaleString()}
107+
{@const item = wowthingData.items.items[auction.itemId]}
108+
{#if item}
109+
{@const { itemLevel, quality } = applyBonusIds(
110+
auction.bonusIds,
111+
{ itemLevel: item.itemLevel, quality: item.quality }
112+
)}
113+
<span class="quality{quality}">
114+
{itemLevel}
115+
</span>
116+
{/if}
98117
{/if}
99118
</td>
100119
<!-- {#if auctions[0]?.connectedRealmId < 100000}

apps/frontend/auctions/stores/specific.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class SpecificStore {
1010

1111
async search(
1212
auctionAppState: AuctionsAppState,
13-
groupKey: string,
13+
groupKey: string
1414
): Promise<UserAuctionDataAuction[]> {
1515
let things: UserAuctionDataAuction[] = [];
1616

@@ -51,7 +51,7 @@ class SpecificStore {
5151
const responseData = (await response.json()) as UserAuctionDataAuctionArray[];
5252

5353
things = responseData.map(
54-
(auctionArray) => new UserAuctionDataAuction(...auctionArray),
54+
(auctionArray) => new UserAuctionDataAuction(...auctionArray)
5555
);
5656
things.sort((a, b) => a.buyoutPrice - b.buyoutPrice);
5757

apps/frontend/components/achievements/get-achievement-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export function getAchievementStatus(
181181

182182
recurse(null, ret.rootCriteriaTree, true, true);
183183

184-
ret.reputation =
184+
ret.reputation ||=
185185
ret.criteriaTrees.length === 1 &&
186186
ret.criteriaTrees[0].length === 1 &&
187187
achievementData.criteriaById.get(ret.criteriaTrees[0][0].criteriaId)?.type ===

apps/frontend/enums/item-bonus-type.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export enum ItemBonusType {
3535
Unknown33 = 33,
3636
ItemBonusListGroupId = 34,
3737
ItemLimitCategoryId = 35,
38-
Unknown36 = 36,
38+
ItemLevelPvp = 36,
3939
ItemConversionId = 37,
4040
Unknown38 = 38,
4141
Unknown39 = 39,
@@ -44,4 +44,15 @@ export enum ItemBonusType {
4444
BaseItemLevel = 42,
4545
Unknown43 = 43,
4646
Unknown44 = 44,
47+
Unknown45 = 45,
48+
Unknown46 = 46,
49+
Unknown47 = 47,
50+
SquishCurve = 48,
51+
ScaleConfig = 49,
52+
Unknown50 = 50,
53+
Unknown51 = 51,
54+
ScaleCrafted = 52,
55+
PostSquishItemLevel = 53,
56+
Unknown54 = 54,
57+
Unknown55 = 55,
4758
}

apps/frontend/shared/components/currencies/Currency.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script lang="ts">
2+
import { currencyIconOverride } from '@/data/currencies';
23
import { timeState } from '@/shared/state/time.svelte';
34
import { getCurrencyData } from '@/utils/characters/get-currency-data';
45
import type { StaticDataCurrency } from '@/shared/stores/static/types';
56
import type { CharacterProps } from '@/types/props';
67
78
import WowthingImage from '@/shared/components/images/sources/WowthingImage.svelte';
8-
import { currencyIconOverride } from '@/data/currencies';
99
1010
type Props = CharacterProps & {
1111
currency: StaticDataCurrency;

apps/frontend/utils/items/apply-bonus-ids.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function applyBonusIds(bonusIds: number[], { itemLevel, quality }: Props)
1010
const ret = {
1111
itemLevel: itemLevel || 0,
1212
quality: quality || 0,
13+
bonusStars: 0,
1314
};
1415

1516
for (const bonusId of bonusIds) {
@@ -25,9 +26,24 @@ export function applyBonusIds(bonusIds: number[], { itemLevel, quality }: Props)
2526
ret.quality = bonus[1];
2627
} else if (bonus[0] === ItemBonusType.BaseItemLevel) {
2728
ret.itemLevel = bonus[1];
29+
} else if (bonus[0] === ItemBonusType.ScaleConfig) {
30+
if (scaleConfigToItemLevel[bonus[1]]) {
31+
ret.itemLevel = scaleConfigToItemLevel[bonus[1]];
32+
}
33+
} else if (bonus[0] === ItemBonusType.ScaleCrafted) {
34+
// TODO: fix for non-profession items?
35+
if (bonus[2] === 2) {
36+
ret.itemLevel += bonus[1];
37+
ret.bonusStars = bonus[3];
38+
}
2839
}
2940
}
3041
}
3142

3243
return ret;
3344
}
45+
46+
// I don't want to deal with all of the item scaling dumps, hardcode it for now
47+
const scaleConfigToItemLevel: Record<number, number> = {
48+
266: 206,
49+
};

apps/tool/Data/IgnoredSkillLineAbilities.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public static partial class Hardcoded
1414
46628,
1515
46629,
1616
46630,
17+
18+
50551, // Rockslide Shake that doesn't exist
1719
];
1820

1921
public static readonly HashSet<int> IgnoredSkillLineAbilitySpells =

apps/tool/Tools/DumpsTool.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,9 @@ private async Task ImportRecipeItems(WowDbContext context)
16801680
var seen = new HashSet<(int, int)>();
16811681
foreach (var skillLineAbility in skillLineAbilities)
16821682
{
1683-
if (skillLineAbility.Spell == 0 || !_teachSpellBySpellId.TryGetValue(skillLineAbility.Spell, out var recipeItemIds))
1683+
if (skillLineAbility.Spell == 0 ||
1684+
Hardcoded.IgnoredSkillLineAbilities.Contains(skillLineAbility.ID) ||
1685+
!_teachSpellBySpellId.TryGetValue(skillLineAbility.Spell, out var recipeItemIds))
16841686
{
16851687
continue;
16861688
}
@@ -1704,7 +1706,9 @@ private async Task ImportRecipeItems(WowDbContext context)
17041706
}
17051707
}
17061708

1707-
// TODO deletes
1709+
await context.WowProfessionRecipeItem
1710+
.Where(item => Hardcoded.IgnoredSkillLineAbilities.Contains(item.SkillLineAbilityId))
1711+
.ExecuteDeleteAsync();
17081712

17091713
_timer.AddPoint("RecipeItems");
17101714
}

0 commit comments

Comments
 (0)