Skip to content

Commit

Permalink
Merge pull request #894 from skippi/dendro-web-fix
Browse files Browse the repository at this point in the history
fix dendro not showing properly on web
  • Loading branch information
k0l11 authored Sep 2, 2022
2 parents c117096 + a069b80 commit 07b6033
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/src/Components/Character/CharacterCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ function statKeyToIcon(key: string): JSX.Element {
return <IconPhysical />;
case 'heal':
return <IconHeal />;
case 'dendro':
return <IconHydro />; // TODO: fix dendro icon
default:
return <span />;
}
Expand Down
8 changes: 8 additions & 0 deletions app/src/Components/Character/Stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ export function ConsolidateCharStats(chars: Character[]): {
count: 0,
t: '%',
},
dendro: {
name: 'dendro%',
flatIndex: -1,
percentIndex: StatToIndexMap['DendroP'],
val: {},
count: 0,
t: '%',
},
heal: {
name: 'heal',
flatIndex: -1,
Expand Down
2 changes: 1 addition & 1 deletion app/src/Pages/Sim/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const statKeys = [
'electro%',
'anemo%',
'geo%',
'phys%',
'dendro%',
'phys%',
'atkspd%',
'dmg%',
];
Expand Down
4 changes: 2 additions & 2 deletions app/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ export const StatToIndexMap: { [key in string]: number } = {
ElectroP: 15,
AnemoP: 16,
GeoP: 17,
PhyP: 18,
DendroP: 19,
DendroP: 18,
PhyP: 19,
};
3 changes: 1 addition & 2 deletions pkg/core/attributes/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ var StatTypeString = [...]string{
"electro%",
"anemo%",
"geo%",
"phys%",
// "ele%",
"dendro%",
"phys%",
"atkspd%",
"dmg%",
}
Expand Down

0 comments on commit 07b6033

Please sign in to comment.