Skip to content

Commit

Permalink
Merge pull request #932 from hillerstorm/pala_gui_fixes
Browse files Browse the repository at this point in the history
[Pala] Some gui fixes
  • Loading branch information
hillerstorm authored Aug 13, 2024
2 parents c017c16 + 6678471 commit 3b69404
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
8 changes: 3 additions & 5 deletions ui/core/talents/trees/paladin.json
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,8 @@
},
"spellIds": [
31866,
75806,
31867,
31868,
85043
31868
],
"maxPoints": 3
},
Expand Down Expand Up @@ -740,8 +738,8 @@
},
"spellIds": [
53375,
53376,
90286
90286,
53376
],
"maxPoints": 3
},
Expand Down
19 changes: 10 additions & 9 deletions ui/paladin/protection/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
PaladinAura as PaladinAura,
PaladinMajorGlyph,
PaladinMinorGlyph,
PaladinPrimeGlyph,
PaladinSeal,
ProtectionPaladin_Options as ProtectionPaladinOptions,
} from '../../core/proto/paladin.js';
Expand Down Expand Up @@ -59,15 +60,15 @@ export const GenericAoeTalents = {
data: SavedTalents.create({
"talentsString": "-32023013122121101231-032032",
"glyphs": {
"prime1": 45744,
"prime2": 41098,
"prime3": 43869,
"major1": 41107,
"major2": 43367,
"major3": 43867,
"minor1": 43368,
"minor2": 43340,
"minor3": 43366
"prime1": PaladinPrimeGlyph.GlyphOfShieldOfTheRighteous,
"prime2": PaladinPrimeGlyph.GlyphOfCrusaderStrike,
"prime3": PaladinPrimeGlyph.GlyphOfSealOfTruth,
"major1": PaladinMajorGlyph.GlyphOfTheAsceticCrusader,
"major2": PaladinMajorGlyph.GlyphOfLayOnHands,
"major3": PaladinMajorGlyph.GlyphOfHolyWrath,
"minor1": PaladinMinorGlyph.GlyphOfTruth,
"minor2": PaladinMinorGlyph.GlyphOfBlessingOfMight,
"minor3": PaladinMinorGlyph.GlyphOfInsight,
},
}),
};
Expand Down
46 changes: 25 additions & 21 deletions ui/paladin/protection/sim.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import * as BuffDebuffInputs from '../../core/components/inputs/buffs_debuffs.js';
import * as OtherInputs from '../../core/components/inputs/other_inputs.js';
import * as Mechanics from '../../core/constants/mechanics.js';
import { IndividualSimUI, registerSpecConfig } from '../../core/individual_sim_ui.js';
import { Player } from '../../core/player.js';
import { PlayerClasses } from '../../core/player_classes';
import { APLAction, APLListItem, APLPrepullAction, APLRotation } from '../../core/proto/apl.js';
import { Cooldowns, Debuffs, Faction, IndividualBuffs, PartyBuffs, PseudoStat, Race, RaidBuffs, Spec, Stat, TristateEffect } from '../../core/proto/common.js';
import { PaladinMajorGlyph, PaladinSeal, ProtectionPaladin_Rotation as ProtectionPaladinRotation } from '../../core/proto/paladin.js';
import * as AplUtils from '../../core/proto_utils/apl_utils.js';
import { APLRotation, APLRotation_Type } from '../../core/proto/apl.js';
import { Debuffs, Faction, IndividualBuffs, PartyBuffs, PseudoStat, Race, RaidBuffs, Spec, Stat } from '../../core/proto/common.js';
import { PaladinPrimeGlyph, PaladinSeal } from '../../core/proto/paladin.js';
import { Stats } from '../../core/proto_utils/stats.js';
import { TypedEvent } from '../../core/typed_event.js';
import * as PaladinInputs from '../inputs.js';
// import * as ProtInputs from './inputs.js';
import * as Presets from './presets.js';

const isGlyphOfSealOfTruthActive = (player: Player<Spec.SpecProtectionPaladin>): boolean => {
const currentSeal = player.getSpecOptions().classOptions?.seal;
return (
player.getPrimeGlyps().includes(PaladinPrimeGlyph.GlyphOfSealOfTruth) &&
(currentSeal === PaladinSeal.Truth || currentSeal === PaladinSeal.Righteousness)
);
};

const SPEC_CONFIG = registerSpecConfig(Spec.SpecProtectionPaladin, {
cssClass: 'protection-paladin-sim-ui',
cssScheme: PlayerClasses.getCssClass(PlayerClasses.Paladin),
Expand Down Expand Up @@ -70,22 +75,19 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecProtectionPaladin, {
Stat.StatFrostResistance,
Stat.StatMastery,
],
// modifyDisplayStats: (player: Player<Spec.SpecProtectionPaladin>) => {
// let stats = new Stats();
modifyDisplayStats: (player: Player<Spec.SpecProtectionPaladin>) => {
let stats = new Stats();

// TypedEvent.freezeAllAndDo(() => {
// if (
// player.getMajorGlyphs().includes(PaladinMajorGlyph.GlyphOfSealOfVengeance) &&
// player.getSpecOptions().classOptions?.seal == PaladinSeal.Vengeance
// ) {
// stats = stats.addStat(Stat.StatExpertise, 10 * Mechanics.EXPERTISE_PER_QUARTER_PERCENT_REDUCTION);
// }
// });
TypedEvent.freezeAllAndDo(() => {
if (isGlyphOfSealOfTruthActive(player)) {
stats = stats.addStat(Stat.StatExpertise, 2.5 * 4 * Mechanics.EXPERTISE_PER_QUARTER_PERCENT_REDUCTION);
}
});

// return {
// talents: stats,
// };
// },
return {
talents: stats,
};
},
defaults: {
// Default equipped gear.
gear: Presets.PRERAID_PRESET.gear,
Expand Down Expand Up @@ -129,6 +131,8 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecProtectionPaladin, {
vindication: true,
thunderClap: true,
}),
rotationType: APLRotation_Type.TypeSimple,
simpleRotation: Presets.ROTATION_DEFAULT,
},

// IconInputs to include in the 'Player' section on the settings tab.
Expand Down Expand Up @@ -173,7 +177,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecProtectionPaladin, {
return Presets.ROTATION_DEFAULT.rotation.rotation!;
},

simpleRotation: (_player: Player<Spec.SpecProtectionPaladin>, simple: ProtectionPaladinRotation, cooldowns: Cooldowns): APLRotation => {
simpleRotation: (_player: Player<Spec.SpecProtectionPaladin>): APLRotation => {
return Presets.ROTATION_DEFAULT.rotation.rotation!;
},

Expand Down

0 comments on commit 3b69404

Please sign in to comment.