diff --git a/src/assets/UnitData.json b/src/assets/UnitData.json index a456def2..dc952e6f 100644 --- a/src/assets/UnitData.json +++ b/src/assets/UnitData.json @@ -260,9 +260,9 @@ "Short Name": "Anuphet", "Faction": "Necrons", "Alliance": "Xenos", - "Health": 8151, - "Damage": 1630, - "Armour": 2781, + "Health": 8148, + "Damage": 1629, + "Armour": 1822, "Initial rarity": "Epic", "Melee Damage": "Energy", "Melee Hits": 4, @@ -594,12 +594,12 @@ "Short Name": "Morvenn", "Faction": "Adepta Sororitas", "Alliance": "Imperial", - "Health": 8151, - "Damage": 1151, - "Armour": 1822, + "Health": 9105, + "Damage": 2301, + "Armour": 2301, "Initial rarity": "Legendary", "Melee Damage": "Power", - "Melee Hits": 5, + "Melee Hits": 2, "Ranged Damage": "Bolter", "Ranged Hits": 3, "Distance": 3, @@ -999,18 +999,18 @@ "Short Name": "Pestillian", "Faction": "Death guard", "Alliance": "Chaos", - "Health": 10529, - "Damage": 3356, - "Armour": 3164, + "Health": 11499, + "Damage": 3832, + "Armour": 2589, "Initial rarity": "Rare", - "Melee Damage": "Direct", + "Melee Damage": "Toxic", "Melee Hits": 1, "Movement": 2, "Equipment1": "Crit", "Equipment2": "Defense", "Equipment3": "Crit Booster", - "Traits": ["Contagions of Nurgle", "Resilient", "Putrid Explosion"], - "Active Ability": "Direct", + "Traits": ["Contagions of Nurgle", "Resilient", "Explodes"], + "Active Ability": "Toxic", "Passive Ability": "Blast", "Number": 34, "ForcedSummons": false, @@ -1585,8 +1585,8 @@ "Short Name": "Azrael", "Faction": "Dark Angels", "Alliance": "Imperial", - "Health": 8151, - "Damage": 2110, + "Health": 9105, + "Damage": 2685, "Armour": 2301, "Initial rarity": "Epic", "Melee Damage": "Power", @@ -2015,9 +2015,9 @@ "lre": { "id": 7, "finished": false, - "eventStage": 2, - "nextEventDate": "December 8", - "nextEventDateUtc": "Sun, 8 December 2024 00:00:00 GMT" + "eventStage": 3, + "nextEventDate": "TBA", + "nextEventDateUtc": "" } }, { @@ -2074,6 +2074,30 @@ "Icon": "lucien.webp", "releaseDate": "2024-09-08T00:00:00Z" }, + { + "Name": "Nicodemus", + "Title": "Sanguinary Priest", + "Full Name": "Nicodemus", + "Short Name": "Nicodemus", + "Faction": "Blood Angels", + "Alliance": "Imperial", + "Health": 8624, + "Damage": 2205, + "Armour": 2207, + "Initial rarity": "Rare", + "Melee Damage": "Chain", + "Melee Hits": 3, + "Movement": 3, + "Equipment1": "Crit", + "Equipment2": "Defense", + "Equipment3": "Crit Booster", + "Traits": ["Healer", "Rapid Assault"], + "Number": 83, + "ForcedSummons": false, + "RequiredInCampaign": false, + "Icon": "nicodemus.webp", + "releaseDate": "2024-12-22T00:00:00Z" + }, { "Name": "Mephiston", "Title": "Lord of Death", @@ -2104,8 +2128,8 @@ "id": 8, "finished": false, "eventStage": 2, - "nextEventDate": "TBA", - "nextEventDateUtc": "" + "nextEventDate": "January 12", + "nextEventDateUtc": "Sun, 12 January 2025 00:00:00 GMT" } }, { diff --git a/src/assets/WhatsNew.json b/src/assets/WhatsNew.json index e9e166d6..5558ab4d 100644 --- a/src/assets/WhatsNew.json +++ b/src/assets/WhatsNew.json @@ -1,6 +1,64 @@ { - "currentVersion": "1.6.6", + "currentVersion": "1.6.7", "releaseNotes": [ + { + "version": "1.6.7", + "date": "December 18", + "type": "Update", + "new": [ + { + "text": "Added new collectable character", + "subPoints": [ + "[Blood Angels] Nicodemus, Sanguinary Priest, unlockable in the ‘Insanguination’ event, starting December 22" + ] + }, + { + "text": "Updated LRE dates", + "subPoints": [ + "[Blood Angels] Mephiston, Lord of Death, unlockable in the second ‘Angels of Death‘ event, starting January 12" + ] + }, + { + "text": "Updates according to balancing changes", + "subPoints": [ + "Morvenn Vahl, stats changes and changed melee attack hits from 5 to 2", + "Azrael, stats changes", + "Pestillian, stats changes, Normal melee attack changed from Direct Damage to Toxic and Replaced Putrid Explosion trait with Explodes trait" + ] + } + ], + "minor": [ + { + "text": "Updated LRE master table and leaderboard tables to not take into account extra points from the Defeat All enemies requirement (SeventhSun)" + }, + { + "text": "For mobile devices reduced server push debounce time to one second instead of 10 seconds (Tani)" + }, + { + "text": "Added LRE track names to LRE teams table (SeventhSun)" + }, + { + "text": "Updated Inventory to show basic and crafted upgrades in separate columns (Peuchy)" + }, + { + "text": "Updated Inventory sections to be expandable and collapsable" + } + ], + "bugFixes": [ + { + "text": "Corrected Anuphet stats values (Medon)" + }, + { + "text": "Fixed issue with Shards campaign nodes not being filtered according to the filter settings on the Daily Raids page (Peuchy)" + }, + { + "text": "Fixed issue with LRE UI x/14 shows as undefined/14 (SeventhSun)" + }, + { + "text": "Fixed issue with LRE Completed Tracks not filtered from teams (Kinks)" + } + ] + }, { "version": "1.6.6", "date": "November 18", diff --git a/src/assets/images/characters/nicodemus.png b/src/assets/images/characters/nicodemus.png new file mode 100644 index 00000000..4a61d44a Binary files /dev/null and b/src/assets/images/characters/nicodemus.png differ diff --git a/src/assets/images/portraits - png/nicodemus.png b/src/assets/images/portraits - png/nicodemus.png new file mode 100644 index 00000000..ce6b8722 Binary files /dev/null and b/src/assets/images/portraits - png/nicodemus.png differ diff --git a/src/assets/images/portraits/nicodemus.webp b/src/assets/images/portraits/nicodemus.webp new file mode 100644 index 00000000..8558154e Binary files /dev/null and b/src/assets/images/portraits/nicodemus.webp differ diff --git a/src/assets/legendary-events/Patermine.json b/src/assets/legendary-events/Patermine.json index 97296543..5bbc794d 100644 --- a/src/assets/legendary-events/Patermine.json +++ b/src/assets/legendary-events/Patermine.json @@ -10,12 +10,12 @@ "Defeat 30 Orks", "Defeat 75 Black Templars", "Defeat 100 Black Legion", - "Use abilities 15 times with Imperial units, Deal 10k damage with Abilities", + "Use abilities 15 times with Imperial units, Deal 10k damage with Abilities", "Use abilities 20 times with Chaos units, Deal 15k damage with Abilities", "Use abilities 25 times with Xenos units, Deal 20k damage with Abilities", - "Play 3 Legendary Event Battles, Deal 25k Psychic damage", - "Play 3 Legendary Event Battles, Deal 25k Piercing damage", - "Play 3 Legendary Event Battles, Deal 25k Power damage" + "Play 3 Legendary Event Battles, Deal 25k Bolter damage", + "Play 3 Legendary Event Battles, Deal 25k Power damage", + "Play 3 Legendary Event Battles, Deal 25k Piercing damage" ], "premiumMissions": [ "Win 1 battle without Summoning any units", diff --git a/src/assets/rankUpData.json b/src/assets/rankUpData.json index 00afd52d..3474e14c 100644 --- a/src/assets/rankUpData.json +++ b/src/assets/rankUpData.json @@ -10878,6 +10878,144 @@ "Superaugmented Defences" ] }, + "Nicodemus": { + "Stone I": [ + "Healing Ointment", + "The Iron Phoenix", + "Canister of Chemicals", + "Weapon Anointment Oils", + "Armor Trim", + "Fine Purity Seal" + ], + "Stone II": [ + "Field Ration", + "Healing Ointment", + "Combat Stimms", + "Blessed Weapon Oils", + "Purity Seal", + "Rebreather" + ], + "Stone III": [ + "Enriched Rations", + "First Aid Kit", + "Frag Grenade", + "Basic Auxiliary Core", + "Blessed Tasset Plate", + "Cloak" + ], + "Iron I": [ + "First Aid Kit", + "Reliquary of Protection", + "Combat Stimms", + "Locator Beacon", + "Oath Seal", + "Blessed Ceramite" + ], + "Iron II": [ + "Enriched Rations", + "Sanctified Reliquary of Protection", + "Belt of Frag Grenades", + "Divinator Class Auspex", + "Artificer Tasset Plate", + "Cloak" + ], + "Iron III": [ + "Box of Rations", + "The Gold Phoenix", + "Blood Shard Bolt", + "Powerful Auxiliary Core", + "Adamantium Lump", + "Subdermal Plating" + ], + "Bronze I": [ + "Bloodstone Tear", + "The Phoenix Ascendant", + "Box of Ammo", + "Classified Data-Slate", + "Blessed Purity Seal", + "Ceramite Bar" + ], + "Bronze II": [ + "Bloodstone Pendant", + "Medical Supply Crate", + "Krak Grenade", + "Anointed Auxiliary Core", + "Artisan Plating", + "Fine Cloak" + ], + "Bronze III": [ + "Metal Decorative Skull", + "Exquisite Medical Supplies", + "Quake Bolts", + "Sanctified Weapon Oils", + "Artisan of War Plating", + "Duplicate Organ" + ], + "Silver I": [ + "Bloodstone Pendant", + "Golden Ornamental Skull", + "Quake Bolts", + "Blessed Promethium Canister", + "Artisan of War Plating", + "Ceramite Sheet" + ], + "Silver II": [ + "Blood Vial", + "Greater Reliquary of Protection", + "Decimator Bolts", + "Anointed Auxiliary Core", + "Artisan of War Plating", + "Decorated Cloak" + ], + "Silver III": [ + "Bloodstone Pendant", + "Legendary Reliquary of Protection", + "Quake Bolts", + "Digital Weapons", + "Purity Seal of the Primarch", + "Ceramite Plates" + ], + "Gold I": [ + "Bloodstone Icon", + "Tome of Arcane Knowledge", + "Archeotech Bionics", + "Relic Auxiliary Core", + "Angelic Plating", + "Divine Cloak" + ], + "Gold II": [ + "Icon of the Angel", + "Legendary Reliquary of Protection", + "Decimator Bolts", + "Digital Weapons", + "Angelic Plating", + "Seal of the Emperor's Protection" + ], + "Gold III": [ + "Bloodstone Icon", + "Tome of Arcane Knowledge", + "Archangel's Shard", + "Blessed Promethium Canister", + "Visage of Death", + "Divine Cloak" + ], + "Diamond I": [ + "Icon of the Angel", + "Grand Strategy", + "Archangel's Shard", + "Hyperstim", + "Visage of Death", + "Ceramite Plates" + ], + "Diamond II": [ + "Icon of the Angel", + "Superaugmented Constitution", + "Archangel's Shard", + "Superaugmented Strength", + "Visage of Death", + "Superaugmented Defences" + ] + }, "Titus": { "Stone I": [ "Ropes and Chains", diff --git a/src/reducers/store.provider2.tsx b/src/reducers/store.provider2.tsx index 6be24844..182c276c 100644 --- a/src/reducers/store.provider2.tsx +++ b/src/reducers/store.provider2.tsx @@ -26,6 +26,7 @@ import { guildReducer } from 'src/reducers/guildReducer'; import { mowsReducer } from 'src/reducers/mows.reducer'; import { enable as enableDarkMode, disable as disableDarkMode } from 'darkreader'; import { teamsReducer } from 'src/reducers/teams.reducer'; +import { isMobile } from 'react-device-detect'; export const StoreProvider = ({ children }: React.PropsWithChildren) => { const { isAuthenticated, setUser, setUserInfo, logout } = useAuth(); @@ -192,28 +193,31 @@ export const StoreProvider = ({ children }: React.PropsWithChildren) => { if (isAuthenticated) { clearTimeout(saveTimeoutId); - const timeoutId = setTimeout(() => { - setUserDataApi(storeValue) - .then(({ data }) => { - const { modifiedDateTicks } = data; - localStorage.setItem('TP-ModifiedDateTicks', modifiedDateTicks); - enqueueSnackbar('Pushed local data to server.', { variant: 'success' }); - }) - .catch((err: AxiosError) => { - if (err.response?.status === 401) { - enqueueSnackbar('Session expired. Please re-login.', { variant: 'error' }); - } else if (err.response?.status === 409) { - enqueueSnackbar( - 'Conflict. Please refresh the page to pull latest changes. Your current changes will be lost', - { variant: 'error' } - ); - } else { - enqueueSnackbar('Failed to push data to server. Please do manual back-up.', { - variant: 'error', - }); - } - }); - }, 10000); + const timeoutId = setTimeout( + () => { + setUserDataApi(storeValue) + .then(({ data }) => { + const { modifiedDateTicks } = data; + localStorage.setItem('TP-ModifiedDateTicks', modifiedDateTicks); + enqueueSnackbar('Pushed local data to server.', { variant: 'success' }); + }) + .catch((err: AxiosError) => { + if (err.response?.status === 401) { + enqueueSnackbar('Session expired. Please re-login.', { variant: 'error' }); + } else if (err.response?.status === 409) { + enqueueSnackbar( + 'Conflict. Please refresh the page to pull latest changes. Your current changes will be lost', + { variant: 'error' } + ); + } else { + enqueueSnackbar('Failed to push data to server. Please do manual back-up.', { + variant: 'error', + }); + } + }); + }, + isMobile ? 1000 : 10000 + ); setSaveTimeoutId(timeoutId); } }, [modified]); diff --git a/src/routes/inventory.tsx b/src/routes/inventory.tsx index c1f09f78..b76e2ad3 100644 --- a/src/routes/inventory.tsx +++ b/src/routes/inventory.tsx @@ -1,6 +1,14 @@ import React, { useCallback, useContext, useMemo, useState } from 'react'; -import { FormControl, Input, InputAdornment } from '@mui/material'; +import { + Accordion, + AccordionDetails, + AccordionSummary, + FormControl, + Input, + InputAdornment, + TextField, +} from '@mui/material'; import { StaticDataService } from '../services'; import { Rarity } from '../models/enums'; import { DispatchContext, StoreContext } from '../reducers/store.provider'; @@ -18,6 +26,9 @@ import './inventory.scss'; import { Conditional } from 'src/v2/components/conditional'; import { ITableRow } from './inventory-models'; import { InventoryItem } from 'src/routes/inventory-item'; +import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; +import { LeProgressOverviewMissions } from 'src/shared-components/le-progress-overview-missions'; +import { isMobile } from 'react-device-detect'; interface Props { itemsFilter?: string[]; @@ -66,11 +77,28 @@ export const Inventory: React.FC = ({ itemsFilter = [], onUpdate }) => { return map(groupBy(itemsList.filter(filterItem), 'rarity'), (items, rarity) => ({ label: Rarity[+rarity], rarity: +rarity, - items: map(groupBy(items, 'alphabet'), (subItems, letter) => ({ - letter, - subItems, - })), - itemsAll: items, + items: map( + groupBy( + items.filter(x => !x.craftable), + 'alphabet' + ), + (subItems, letter) => ({ + letter, + subItems, + }) + ), + itemsCrafted: map( + groupBy( + items.filter(x => x.craftable), + 'alphabet' + ), + (subItems, letter) => ({ + letter, + subItems, + }) + ), + itemsAll: items.filter(x => !x.craftable), + itemsAllCrafted: items.filter(x => x.craftable), })); }, [itemsList, filterItem]); @@ -136,37 +164,89 @@ export const Inventory: React.FC = ({ itemsFilter = [], onUpdate }) => { {itemsGrouped .map(group => ( -
-

- {group.label} -

-
- {viewPreferences.inventoryShowAlphabet && - group.items.map(group => ( -
-
{group.letter}
- {group.subItems.map(item => ( - - ))} -
- ))} + + }> +

+ {group.label} +

+
+ +
+
+ {viewPreferences.inventoryShowAlphabet && ( +
+
+ {group.itemsAllCrafted.length > 0 &&

Basic

} + {group.items.map(group => ( +
+
{group.letter}
+ {group.subItems.map(item => ( + + ))} +
+ ))} +
+ {group.itemsAllCrafted.length > 0 && ( +
+

Crafted

+ {group.itemsCrafted.map(group => ( +
+
{group.letter}
+ {group.subItems.map(item => ( + + ))} +
+ ))} +
+ )} +
+ )} - {!viewPreferences.inventoryShowAlphabet && - group.itemsAll.map(item => ( - - ))} -
-
+ {!viewPreferences.inventoryShowAlphabet && ( +
+
+ {group.itemsAllCrafted.length > 0 &&

Basic

} + {group.itemsAll.map(item => ( + + ))} +
+ {group.itemsAllCrafted.length > 0 && ( +
+

Crafted

+ {group.itemsAllCrafted.map(item => ( + + ))} +
+ )} +
+ )} +
+
+ + )) .reverse()} diff --git a/src/routes/legendary-events/legendary-event.tsx b/src/routes/legendary-events/legendary-event.tsx index 632ca23b..2ddeb050 100644 --- a/src/routes/legendary-events/legendary-event.tsx +++ b/src/routes/legendary-events/legendary-event.tsx @@ -11,7 +11,7 @@ import { useLreProgress } from 'src/shared-components/le-progress.hooks'; import { ILreTrackProgress } from 'src/v2/features/lre/lre.models'; export const LegendaryEvent = ({ legendaryEvent }: { legendaryEvent: ILegendaryEvent }) => { - const { characters, viewPreferences, leSelectedTeams, leProgress } = useContext(StoreContext); + const { characters, viewPreferences, leSelectedTeams } = useContext(StoreContext); const dispatch = useContext(DispatchContext); const { model: lreProgress } = useLreProgress(legendaryEvent); @@ -90,9 +90,7 @@ export const LegendaryEvent = ({ legendaryEvent }: { legendaryEvent: ILegendaryE return (
-
+
{viewPreferences.showAlpha && ( { result[key] = { name: key, slots: restrictionsByChar[key].length, - points: sum(restrictions.map(x => track.getRestrictionPoints(x))) + track.killPoints, + points: sum(restrictions.map(x => track.getRestrictionPoints(x))), }; } return result; diff --git a/src/routes/legendary-events/points-table.tsx b/src/routes/legendary-events/points-table.tsx index 3ea43c28..fb0b888c 100644 --- a/src/routes/legendary-events/points-table.tsx +++ b/src/routes/legendary-events/points-table.tsx @@ -247,7 +247,7 @@ const PointsTable = (props: { legendaryEvent: ILegendaryEvent }) => { result[key] = { name: key, slots: restrictionsByChar[key].length, - points: sum(restrictions.map(x => track.getRestrictionPoints(x))) + track.killPoints, + points: sum(restrictions.map(x => track.getRestrictionPoints(x))), }; } return result; diff --git a/src/routes/tables/dailyRaids.tsx b/src/routes/tables/dailyRaids.tsx index 2e45dcaa..b01c2d69 100644 --- a/src/routes/tables/dailyRaids.tsx +++ b/src/routes/tables/dailyRaids.tsx @@ -134,10 +134,11 @@ export const DailyRaids = () => { campaignsProgress: campaignsProgress, preferences: dailyRaidsPreferences, raidedLocations: dailyRaids.raidedLocations, + filters: dailyRaids.filters, }, ...shardsGoals ); - }, [shardsGoals, dailyRaidsPreferences]); + }, [shardsGoals, dailyRaidsPreferences, dailyRaids.filters]); const actualEnergy = useMemo(() => { return dailyRaidsPreferences.dailyEnergy - estimatedShards.energyPerDay - dailyRaidsPreferences.shardsEnergy; diff --git a/src/services/static-data.service.ts b/src/services/static-data.service.ts index 6694559b..44d92b53 100644 --- a/src/services/static-data.service.ts +++ b/src/services/static-data.service.ts @@ -553,7 +553,7 @@ export class StaticDataService { return true; } - return UpgradesService.passLocationFilter(location, settings.filters, materialRarity); + return CampaignsService.passLocationFilter(location, settings.filters, materialRarity); }); return orderBy(unlockedLocations, ['energyPerItem', 'expectedGold'], ['asc', 'desc']); diff --git a/src/v2/features/goals/campaigns.service.ts b/src/v2/features/goals/campaigns.service.ts index b7055df0..72cd5308 100644 --- a/src/v2/features/goals/campaigns.service.ts +++ b/src/v2/features/goals/campaigns.service.ts @@ -2,6 +2,7 @@ ICampaignBattleComposed, ICampaignConfigs, ICampaignsData, + IDailyRaidsFilters, IDropRate, IRecipeData, } from 'src/models/interfaces'; @@ -81,6 +82,80 @@ export class CampaignsService { return result; } + public static passLocationFilter( + location: ICampaignBattleComposed, + filters: IDailyRaidsFilters, + materialRarity?: Rarity + ): boolean { + const { + alliesFactions, + alliesAlliance, + enemiesAlliance, + enemiesFactions, + campaignTypes, + upgradesRarity, + slotsCount, + enemiesTypes, + enemiesCount, + } = filters; + + if (enemiesCount?.length) { + if (!enemiesCount.includes(location.enemiesTotal)) { + return false; + } + } + + if (enemiesTypes?.length) { + if (!location.enemiesTypes.some(enemyType => enemiesTypes.includes(enemyType))) { + return false; + } + } + + if (slotsCount && slotsCount.length) { + if (!slotsCount.includes(location.slots ?? 5)) { + return false; + } + } + + if (upgradesRarity.length && materialRarity) { + if (!upgradesRarity.includes(materialRarity)) { + return false; + } + } + + if (campaignTypes.length) { + if (!campaignTypes.includes(location.campaignType)) { + return false; + } + } + + if (alliesAlliance.length) { + if (!alliesAlliance.includes(location.alliesAlliance)) { + return false; + } + } + + if (alliesFactions.length) { + if (!location.alliesFactions.some(faction => alliesFactions.includes(faction))) { + return false; + } + } + + if (enemiesAlliance.length) { + if (!location.enemiesAlliances.some(alliance => enemiesAlliance.includes(alliance))) { + return false; + } + } + + if (enemiesFactions.length) { + if (!location.enemiesFactions.some(faction => enemiesFactions.includes(faction))) { + return false; + } + } + + return true; + } + private static getEnemiesAndAllies(campaign: Campaign): { enemies: { alliance: Alliance; factions: Faction[] }; allies: { alliance: Alliance; factions: Faction[] }; diff --git a/src/v2/features/goals/goals.models.ts b/src/v2/features/goals/goals.models.ts index 0e039c60..2aed71b3 100644 --- a/src/v2/features/goals/goals.models.ts +++ b/src/v2/features/goals/goals.models.ts @@ -7,7 +7,12 @@ Rarity, RarityStars, } from 'src/models/enums'; -import { ICampaignBattleComposed, ICampaignsProgress, IDailyRaidsPreferences } from 'src/models/interfaces'; +import { + ICampaignBattleComposed, + ICampaignsProgress, + IDailyRaidsFilters, + IDailyRaidsPreferences, +} from 'src/models/interfaces'; import { ICharacterAbilitiesMaterialsTotal, IXpEstimate } from 'src/v2/features/characters/characters.models'; import { IMowMaterialsTotal } from 'src/v2/features/lookup/lookup.models'; @@ -113,6 +118,7 @@ export interface IEstimatedAscensionSettings { raidedLocations: IItemRaidLocation[]; campaignsProgress: ICampaignsProgress; preferences: IDailyRaidsPreferences; + filters?: IDailyRaidsFilters; } export interface IEstimatedShards { diff --git a/src/v2/features/goals/shards.service.ts b/src/v2/features/goals/shards.service.ts index 6b350ab8..4db958c0 100644 --- a/src/v2/features/goals/shards.service.ts +++ b/src/v2/features/goals/shards.service.ts @@ -57,7 +57,9 @@ export class ShardsService { const previousShardsTokens = sum(result.filter((_, index) => index < i).map(x => x.onslaughtTokensTotal)); const unlockedLocations = material.possibleLocations.filter(location => { const campaignProgress = settings.campaignsProgress[location.campaign as keyof ICampaignsProgress]; - return location.nodeNumber <= campaignProgress; + const isPassFilter = + !settings.filters || CampaignsService.passLocationFilter(location, settings.filters); + return location.nodeNumber <= campaignProgress && isPassFilter; }); const raidsLocations = diff --git a/src/v2/features/goals/upgrades.service.ts b/src/v2/features/goals/upgrades.service.ts index a98ee225..21e6e4a9 100644 --- a/src/v2/features/goals/upgrades.service.ts +++ b/src/v2/features/goals/upgrades.service.ts @@ -469,7 +469,8 @@ export class UpgradesService { const campaignProgress = settings.campaignsProgress[location.campaign as keyof ICampaignsProgress]; location.isUnlocked = location.nodeNumber <= campaignProgress; location.isPassFilter = - !settings.filters || this.passLocationFilter(location, settings.filters, combinedUpgrade.rarity); + !settings.filters || + CampaignsService.passLocationFilter(location, settings.filters, combinedUpgrade.rarity); location.isCompleted = completedLocations.some(locationId => location.id === locationId); location.isSelected = location.isUnlocked && location.isPassFilter; } @@ -520,80 +521,6 @@ export class UpgradesService { } } - public static passLocationFilter( - location: ICampaignBattleComposed, - filters: IDailyRaidsFilters, - materialRarity: Rarity - ): boolean { - const { - alliesFactions, - alliesAlliance, - enemiesAlliance, - enemiesFactions, - campaignTypes, - upgradesRarity, - slotsCount, - enemiesTypes, - enemiesCount, - } = filters; - - if (enemiesCount?.length) { - if (!enemiesCount.includes(location.enemiesTotal)) { - return false; - } - } - - if (enemiesTypes?.length) { - if (!location.enemiesTypes.some(enemyType => enemiesTypes.includes(enemyType))) { - return false; - } - } - - if (slotsCount && slotsCount.length) { - if (!slotsCount.includes(location.slots ?? 5)) { - return false; - } - } - - if (upgradesRarity.length) { - if (!upgradesRarity.includes(materialRarity)) { - return false; - } - } - - if (campaignTypes.length) { - if (!campaignTypes.includes(location.campaignType)) { - return false; - } - } - - if (alliesAlliance.length) { - if (!alliesAlliance.includes(location.alliesAlliance)) { - return false; - } - } - - if (alliesFactions.length) { - if (!location.alliesFactions.some(faction => alliesFactions.includes(faction))) { - return false; - } - } - - if (enemiesAlliance.length) { - if (!location.enemiesAlliances.some(alliance => enemiesAlliance.includes(alliance))) { - return false; - } - } - - if (enemiesFactions.length) { - if (!location.enemiesFactions.some(faction => enemiesFactions.includes(faction))) { - return false; - } - } - - return true; - } - public static updateInventory( inventory: Record, upgrades: Array diff --git a/src/v2/features/lre/lre-teams-table.tsx b/src/v2/features/lre/lre-teams-table.tsx index ff94e401..eebf25f7 100644 --- a/src/v2/features/lre/lre-teams-table.tsx +++ b/src/v2/features/lre/lre-teams-table.tsx @@ -240,7 +240,7 @@ export const LreTeamsTable: React.FC = ({ columnDefs={columnsDefs} components={components} rowData={rows} - headerHeight={75} + headerHeight={90} rowHeight={35} getRowStyle={getRowStyle} onGridReady={fitGridOnWindowResize(gridRef)} @@ -254,7 +254,6 @@ export const LreTeamsTable: React.FC = ({ rows={selectedTeamsRows} editTeam={editExistingTeam} deleteTeam={deleteTeam} - completedRequirements={[]} /> ) : ( diff --git a/src/v2/features/lre/selected-teams-table.tsx b/src/v2/features/lre/selected-teams-table.tsx index 5f2211c0..cae07a66 100644 --- a/src/v2/features/lre/selected-teams-table.tsx +++ b/src/v2/features/lre/selected-teams-table.tsx @@ -15,10 +15,9 @@ interface Props { rows: ITableRow[]; editTeam: (teamId: string) => void; deleteTeam: (teamId: string) => void; - completedRequirements: string[]; } -export const SelectedTeamsTable: React.FC = ({ completedRequirements, rows, editTeam, deleteTeam, track }) => { +export const SelectedTeamsTable: React.FC = ({ rows, editTeam, deleteTeam, track }) => { const { viewPreferences } = useContext(StoreContext); const gridRef = useRef(null); @@ -61,15 +60,14 @@ export const SelectedTeamsTable: React.FC = ({ completedRequirements, row }; const columnsDefs = useMemo>( - () => getSectionColumns(track.unitsRestrictions), - [track.eventId, completedRequirements] + () => getSectionColumns(track.unitsRestrictions.filter(x => !x.hide)), + [track.eventId] ); function getSectionColumns(unitsRestrictions: ILegendaryEventTrackRequirement[]): Array { return unitsRestrictions.map(u => ({ field: u.name, headerName: u.name, - hide: completedRequirements.includes(u.name), })); } diff --git a/src/v2/features/lre/track-requirement-check.tsx b/src/v2/features/lre/track-requirement-check.tsx index 4e7c731d..a877f3a8 100644 --- a/src/v2/features/lre/track-requirement-check.tsx +++ b/src/v2/features/lre/track-requirement-check.tsx @@ -22,6 +22,7 @@ export const TrackRequirementCheck: React.FC = ({ restriction, checked, p {progress} + {restriction.name}
); diff --git a/src/v2/pages/lre/lre.tsx b/src/v2/pages/lre/lre.tsx index 4af5b401..3841a845 100644 --- a/src/v2/pages/lre/lre.tsx +++ b/src/v2/pages/lre/lre.tsx @@ -99,7 +99,9 @@ export const Lre: React.FC = () => { )}
-
{renderTabContent()}
+
+ {renderTabContent()} +
{showSettings && (