Skip to content

Commit

Permalink
Merge pull request #1008 from wowsims/hunter-t12-fix
Browse files Browse the repository at this point in the history
Fix t12 activation for hunter
  • Loading branch information
ToxicKevinFerm authored Sep 13, 2024
2 parents 603dec6 + 95f3a71 commit c82ae38
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 26 deletions.
10 changes: 5 additions & 5 deletions sim/death_knight/frost/TestFrost.results
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ dps_results: {
value: {
dps: 21998.53427
tps: 19961.6477
hps: 245.25882
hps: 245.25883
}
}
dps_results: {
Expand All @@ -336,15 +336,15 @@ dps_results: {
value: {
dps: 21944.09428
tps: 20055.84482
hps: 245.25882
hps: 245.25883
}
}
dps_results: {
key: "TestFrost-AllItems-DarkmoonCard:Hurricane-62051"
value: {
dps: 21351.64308
tps: 19499.4618
hps: 245.25882
hps: 245.25883
}
}
dps_results: {
Expand All @@ -368,7 +368,7 @@ dps_results: {
value: {
dps: 21150.92099
tps: 19199.08409
hps: 245.25882
hps: 245.25883
}
}
dps_results: {
Expand Down Expand Up @@ -1024,7 +1024,7 @@ dps_results: {
value: {
dps: 20899.85176
tps: 19038.60319
hps: 245.25882
hps: 245.25883
}
}
dps_results: {
Expand Down
4 changes: 2 additions & 2 deletions sim/hunter/beast_mastery/TestBM.results
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ dps_results: {
dps_results: {
key: "TestBM-AllItems-Flamewaker'sBattlegear"
value: {
dps: 22901.40754
tps: 19274.16058
dps: 22901.28393
tps: 19273.40391
}
}
dps_results: {
Expand Down
3 changes: 1 addition & 2 deletions sim/hunter/hunter.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ const (
HunterSpellBestialWrath
HunterPetFocusDump
HunterSpellsTierTwelve = HunterSpellArcaneShot | HunterSpellKillCommand | HunterSpellChimeraShot | HunterSpellExplosiveShot |
HunterSpellBlackArrow | HunterSpellMultiShot | HunterSpellAimedShot |
HunterSpellSerpentSting
HunterSpellMultiShot | HunterSpellAimedShot
HunterSpellsAll = HunterSpellSteadyShot | HunterSpellCobraShot |
HunterSpellArcaneShot | HunterSpellKillCommand | HunterSpellChimeraShot | HunterSpellExplosiveShot |
HunterSpellExplosiveTrap | HunterSpellBlackArrow | HunterSpellMultiShot | HunterSpellAimedShot |
Expand Down
4 changes: 2 additions & 2 deletions sim/hunter/survival/TestSV.results
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ dps_results: {
dps_results: {
key: "TestSV-AllItems-Flamewaker'sBattlegear"
value: {
dps: 26578.98545
tps: 24005.0804
dps: 26633.74628
tps: 24069.21807
}
}
dps_results: {
Expand Down
12 changes: 12 additions & 0 deletions ui/core/proto_utils/gear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,18 @@ export class Gear extends BaseGear {
getFailedProfessionRequirements(professions: Array<Profession>): Array<Item | Gem | Enchant> {
return (this.asArray().filter(ei => ei != null) as Array<EquippedItem>).map(ei => ei.getFailedProfessionRequirements(professions)).flat();
}
getItemSetCount(name: string) {
if (!name) return 0;

const validSetItemSlots = [ItemSlot.ItemSlotHead, ItemSlot.ItemSlotShoulder, ItemSlot.ItemSlotChest, ItemSlot.ItemSlotHands, ItemSlot.ItemSlotLegs];
let setItemCount = 0;
for (const slot of validSetItemSlots) {
const item = this.getEquippedItem(slot);
if (item?.item?.setName === name) setItemCount++;
}

return setItemCount;
}
}

/**
Expand Down
19 changes: 18 additions & 1 deletion ui/hunter/survival/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const P1_EP_PRESET = PresetUtils.makePresetEpWeights(
{
[Stat.StatStamina]: 0.5,
[Stat.StatAgility]: 3.27,
[Stat.StatIntellect]: 1.1,
[Stat.StatRangedAttackPower]: 1.0,
[Stat.StatHitRating]: 2.16,
[Stat.StatCritRating]: 1.17,
Expand All @@ -57,6 +56,24 @@ export const P1_EP_PRESET = PresetUtils.makePresetEpWeights(
),
);

export const P2_EP_PRESET = PresetUtils.makePresetEpWeights(
'SV P2 (T12 4 set)',
Stats.fromMap(
{
[Stat.StatStamina]: 0.5,
[Stat.StatAgility]: 3.37,
[Stat.StatRangedAttackPower]: 1.0,
[Stat.StatHitRating]: 2.56,
[Stat.StatCritRating]: 1.27,
[Stat.StatHasteRating]: 0.94,
[Stat.StatMasteryRating]: 1.04,
},
{
[PseudoStat.PseudoStatRangedDps]: 4.16,
},
),
);

// Default talents. Uses the wowhead calculator format, make the talents on
// https://wowhead.com/wotlk/talent-calc and copy the numbers in the url.

Expand Down
33 changes: 19 additions & 14 deletions ui/hunter/survival/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,22 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecSurvivalHunter, {
warnings: [],

// All stats for which EP should be calculated.
epStats: [Stat.StatStamina, Stat.StatAgility, Stat.StatRangedAttackPower, Stat.StatHitRating, Stat.StatCritRating, Stat.StatHasteRating, Stat.StatMasteryRating],
epStats: [
Stat.StatStamina,
Stat.StatAgility,
Stat.StatRangedAttackPower,
Stat.StatHitRating,
Stat.StatCritRating,
Stat.StatHasteRating,
Stat.StatMasteryRating,
],
epPseudoStats: [PseudoStat.PseudoStatRangedDps],
// Reference stat against which to calculate EP.
epReferenceStat: Stat.StatRangedAttackPower,
// Which stats to display in the Character Stats section, at the bottom of the left-hand sidebar.
displayStats: UnitStat.createDisplayStatArray(
[
Stat.StatHealth,
Stat.StatStamina,
Stat.StatAgility,
Stat.StatRangedAttackPower,
Stat.StatMasteryRating,
],
[
PseudoStat.PseudoStatPhysicalHitPercent,
PseudoStat.PseudoStatPhysicalCritPercent,
PseudoStat.PseudoStatRangedHastePercent,
],
[Stat.StatHealth, Stat.StatStamina, Stat.StatAgility, Stat.StatRangedAttackPower, Stat.StatMasteryRating],
[PseudoStat.PseudoStatPhysicalHitPercent, PseudoStat.PseudoStatPhysicalCritPercent, PseudoStat.PseudoStatRangedHastePercent],
),
modifyDisplayStats: (player: Player<Spec.SpecSurvivalHunter>) => {
return sharedHunterDisplayStatsModifiers(player);
Expand Down Expand Up @@ -248,7 +246,14 @@ export class SurvivalHunterSimUI extends IndividualSimUI<Spec.SpecSurvivalHunter
super(parentElem, player, SPEC_CONFIG);

player.sim.waitForInit().then(() => {
new ReforgeOptimizer(this);
new ReforgeOptimizer(this, {
getEPDefaults: (player: Player<Spec.SpecFuryWarrior>) => {
if (player.getGear().getItemSetCount('Lightning-Charged Battlegear') >= 4) {
return Presets.P1_EP_PRESET.epWeights;
}
return Presets.P2_EP_PRESET.epWeights;
},
});
});
}
}

0 comments on commit c82ae38

Please sign in to comment.