Skip to content
Merged

Deploy #1741

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions apps/frontend/auctions/components/results/Selected.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { Region } from '@/enums/region';
import { wowthingData } from '@/shared/stores/data';
import { leftPad } from '@/utils/formatting';
import { applyBonusIds } from '@/utils/items/apply-bonus-ids';

import IconifyWrapper from '@/shared/components/images/IconifyWrapper.svelte';

Expand Down Expand Up @@ -41,7 +42,11 @@
}
.quantity {
text-align: right;
width: 5.5rem;
width: 3.5rem;
}
.level {
text-align: right;
width: 3rem;
}
.price {
text-align: right;
Expand All @@ -54,7 +59,8 @@
<thead>
<tr>
<th>Realm</th>
<th>Lvl/Qty</th>
<th>Qty</th>
<th>Lvl</th>
<!-- {#if auctions[0]?.connectedRealmId < 100000}
<th>Bid</th>
{/if} -->
Expand All @@ -66,10 +72,11 @@
<tr>
<td class="realm">L O A D I N G . . .</td>
<td class="quantity"></td>
<td class="level"></td>
<td class="price"></td>
</tr>
{:then auctions}
{#each auctions as auction}

Check warning on line 79 in apps/frontend/auctions/components/results/Selected.svelte

View workflow job for this annotation

GitHub Actions / Lint

Each block should have a key
{@const realm = wowthingData.static.connectedRealmById.get(
auction.connectedRealmId
)}
Expand All @@ -89,12 +96,24 @@
{realm.displayText}
</td>
<td class="quantity">
{auction.quantity.toLocaleString()}
</td>
<td class="level">
{#if auction.petSpeciesId}
<span class="quality{auction.petQuality}">
{auction.petLevel}
</span>
{:else}
{auction.quantity.toLocaleString()}
{@const item = wowthingData.items.items[auction.itemId]}
{#if item}
{@const { itemLevel, quality } = applyBonusIds(
auction.bonusIds,
{ itemLevel: item.itemLevel, quality: item.quality }
)}
<span class="quality{quality}">
{itemLevel}
</span>
{/if}
{/if}
</td>
<!-- {#if auctions[0]?.connectedRealmId < 100000}
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/auctions/stores/specific.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SpecificStore {

async search(
auctionAppState: AuctionsAppState,
groupKey: string,
groupKey: string
): Promise<UserAuctionDataAuction[]> {
let things: UserAuctionDataAuction[] = [];

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

things = responseData.map(
(auctionArray) => new UserAuctionDataAuction(...auctionArray),
(auctionArray) => new UserAuctionDataAuction(...auctionArray)
);
things.sort((a, b) => a.buyoutPrice - b.buyoutPrice);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export function getAchievementStatus(

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

ret.reputation =
ret.reputation ||=
ret.criteriaTrees.length === 1 &&
ret.criteriaTrees[0].length === 1 &&
achievementData.criteriaById.get(ret.criteriaTrees[0][0].criteriaId)?.type ===
Expand Down
13 changes: 12 additions & 1 deletion apps/frontend/enums/item-bonus-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export enum ItemBonusType {
Unknown33 = 33,
ItemBonusListGroupId = 34,
ItemLimitCategoryId = 35,
Unknown36 = 36,
ItemLevelPvp = 36,
ItemConversionId = 37,
Unknown38 = 38,
Unknown39 = 39,
Expand All @@ -44,4 +44,15 @@ export enum ItemBonusType {
BaseItemLevel = 42,
Unknown43 = 43,
Unknown44 = 44,
Unknown45 = 45,
Unknown46 = 46,
Unknown47 = 47,
SquishCurve = 48,
ScaleConfig = 49,
Unknown50 = 50,
Unknown51 = 51,
ScaleCrafted = 52,
PostSquishItemLevel = 53,
Unknown54 = 54,
Unknown55 = 55,
}
2 changes: 1 addition & 1 deletion apps/frontend/shared/components/currencies/Currency.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang="ts">
import { currencyIconOverride } from '@/data/currencies';
import { timeState } from '@/shared/state/time.svelte';
import { getCurrencyData } from '@/utils/characters/get-currency-data';
import type { StaticDataCurrency } from '@/shared/stores/static/types';
import type { CharacterProps } from '@/types/props';

import WowthingImage from '@/shared/components/images/sources/WowthingImage.svelte';
import { currencyIconOverride } from '@/data/currencies';

type Props = CharacterProps & {
currency: StaticDataCurrency;
Expand Down
16 changes: 16 additions & 0 deletions apps/frontend/utils/items/apply-bonus-ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export function applyBonusIds(bonusIds: number[], { itemLevel, quality }: Props)
const ret = {
itemLevel: itemLevel || 0,
quality: quality || 0,
bonusStars: 0,
};

for (const bonusId of bonusIds) {
Expand All @@ -25,9 +26,24 @@ export function applyBonusIds(bonusIds: number[], { itemLevel, quality }: Props)
ret.quality = bonus[1];
} else if (bonus[0] === ItemBonusType.BaseItemLevel) {
ret.itemLevel = bonus[1];
} else if (bonus[0] === ItemBonusType.ScaleConfig) {
if (scaleConfigToItemLevel[bonus[1]]) {
ret.itemLevel = scaleConfigToItemLevel[bonus[1]];
}
} else if (bonus[0] === ItemBonusType.ScaleCrafted) {
// TODO: fix for non-profession items?
if (bonus[2] === 2) {
ret.itemLevel += bonus[1];
ret.bonusStars = bonus[3];
}
}
}
}

return ret;
}

// I don't want to deal with all of the item scaling dumps, hardcode it for now
const scaleConfigToItemLevel: Record<number, number> = {
266: 206,
};
2 changes: 2 additions & 0 deletions apps/tool/Data/IgnoredSkillLineAbilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public static partial class Hardcoded
46628,
46629,
46630,

50551, // Rockslide Shake that doesn't exist
];

public static readonly HashSet<int> IgnoredSkillLineAbilitySpells =
Expand Down
8 changes: 6 additions & 2 deletions apps/tool/Tools/DumpsTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,9 @@ private async Task ImportRecipeItems(WowDbContext context)
var seen = new HashSet<(int, int)>();
foreach (var skillLineAbility in skillLineAbilities)
{
if (skillLineAbility.Spell == 0 || !_teachSpellBySpellId.TryGetValue(skillLineAbility.Spell, out var recipeItemIds))
if (skillLineAbility.Spell == 0 ||
Hardcoded.IgnoredSkillLineAbilities.Contains(skillLineAbility.ID) ||
!_teachSpellBySpellId.TryGetValue(skillLineAbility.Spell, out var recipeItemIds))
{
continue;
}
Expand All @@ -1704,7 +1706,9 @@ private async Task ImportRecipeItems(WowDbContext context)
}
}

// TODO deletes
await context.WowProfessionRecipeItem
.Where(item => Hardcoded.IgnoredSkillLineAbilities.Contains(item.SkillLineAbilityId))
.ExecuteDeleteAsync();

_timer.AddPoint("RecipeItems");
}
Expand Down
Loading