Skip to content
Merged
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
23 changes: 7 additions & 16 deletions proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@ message Player {

oneof spec {
BalanceDruid balance_druid = 12;
FeralDruid feral_druid = 13;
GuardianDruid guardian_druid = 53;
FeralCatDruid feral_druid = 13;
FeralBearDruid guardian_druid = 53;
RestorationDruid restoration_druid = 14;

BeastMasteryHunter beast_mastery_hunter = 15;
MarksmanshipHunter marksmanship_hunter = 16;
SurvivalHunter survival_hunter = 17;
Hunter hunter = 17;

ArcaneMage arcane_mage = 18;
FireMage fire_mage = 19;
FrostMage frost_mage = 20;
Mage mage = 20;

HolyPaladin holy_paladin = 21;
ProtectionPaladin protection_paladin = 22;
Expand All @@ -64,20 +60,15 @@ message Player {
HolyPriest holy_priest = 25;
ShadowPriest shadow_priest = 26;

AssassinationRogue assassination_rogue = 27;
CombatRogue combat_rogue = 28;
SubtletyRogue subtlety_rogue = 29;
Rogue rogue = 29;

ElementalShaman elemental_shaman = 30;
EnhancementShaman enhancement_shaman = 31;
RestorationShaman restoration_shaman = 32;

AfflictionWarlock affliction_warlock = 33;
DemonologyWarlock demonology_warlock = 34;
DestructionWarlock destruction_warlock = 35;
Warlock warlock = 35;

ArmsWarrior arms_warrior = 36;
FuryWarrior fury_warrior = 37;
DPSWarrior dps_warrior = 37;
ProtectionWarrior protection_warrior = 38;
}

Expand Down
2 changes: 1 addition & 1 deletion proto/apl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ message APLActionItemSwap {
}

message APLActionCatOptimalRotationAction {
FeralDruid.Rotation.AplType rotation_type = 1;
FeralCatDruid.Rotation.AplType rotation_type = 1;
bool bear_weave = 2;
bool snek_weave = 3;
bool allow_aoe_berserk = 4;
Expand Down
63 changes: 27 additions & 36 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,42 +42,33 @@ message ScalingItemProperties {
enum Spec {
SpecUnknown = 0;

SpecBalanceDruid = 4;
SpecFeralDruid = 5;
SpecGuardianDruid = 31;
SpecRestorationDruid = 6;

SpecBeastMasteryHunter = 7;
SpecMarksmanshipHunter = 8;
SpecSurvivalHunter = 9;

SpecArcaneMage = 10;
SpecFireMage = 11;
SpecFrostMage = 12;

SpecHolyPaladin = 13;
SpecProtectionPaladin = 14;
SpecRetributionPaladin = 15;

SpecDisciplinePriest = 16;
SpecHolyPriest = 17;
SpecShadowPriest = 18;

SpecAssassinationRogue = 19;
SpecCombatRogue = 20;
SpecSubtletyRogue = 21;

SpecElementalShaman = 22;
SpecEnhancementShaman = 23;
SpecRestorationShaman = 24;

SpecAfflictionWarlock = 25;
SpecDemonologyWarlock = 26;
SpecDestructionWarlock = 27;

SpecArmsWarrior = 28;
SpecFuryWarrior = 29;
SpecProtectionWarrior = 30;
SpecBalanceDruid = 1;
SpecFeralCatDruid = 2;
SpecFeralBearDruid = 3;
SpecRestorationDruid = 4;

SpecHunter = 5;

SpecMage = 6;

SpecHolyPaladin = 7;
SpecProtectionPaladin = 8;
SpecRetributionPaladin = 9;

SpecDisciplinePriest = 10;
SpecHolyPriest = 11;
SpecShadowPriest = 12;

SpecRogue = 13;

SpecElementalShaman = 14;
SpecEnhancementShaman = 15;
SpecRestorationShaman = 16;

SpecWarlock = 17;

SpecDPSWarrior = 18;
SpecProtectionWarrior = 19;
}

enum Race {
Expand Down
4 changes: 2 additions & 2 deletions proto/druid.proto
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ message BalanceDruid {
Options options = 3;
}

message FeralDruid {
message FeralCatDruid {
message Rotation {
enum AplType {
SingleTarget = 0;
Expand Down Expand Up @@ -127,7 +127,7 @@ message FeralDruid {
Options options = 3;
}

message GuardianDruid {
message FeralBearDruid {
message Rotation {
bool maintain_faerie_fire = 1;
bool maintain_demoralizing_roar = 2;
Expand Down
38 changes: 1 addition & 37 deletions proto/hunter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ message HunterOptions {
double glaive_toss_success = 9;
}

message BeastMasteryHunter {
message Hunter {
message Rotation {
RotationType type = 9;
HunterStingType sting = 5;
Expand All @@ -174,39 +174,3 @@ message BeastMasteryHunter {
}
Options options = 1;
}

message MarksmanshipHunter {
message Rotation {
RotationType type = 9;
HunterStingType sting = 5;

bool trap_weave = 1;

// Switch to Aspect of the Viper when mana goes below this percent.
double viper_start_mana_percent = 6;
// Switch back to Aspect of the Hawk when mana goes above this percent.
double viper_stop_mana_percent = 7;

// Allow use of Explosive Shot Rank 3 during LNL procs.
bool allow_explosive_shot_downrank = 10;

bool multi_dot_serpent_sting = 11;
}
message Options {
HunterOptions class_options = 1;
}
Options options = 1;
}

message SurvivalHunter {
message Rotation {
RotationType type = 9;
HunterStingType sting = 5;

bool multi_dot_serpent_sting = 11;
}
message Options {
HunterOptions class_options = 1;
}
Options options = 1;
}
30 changes: 1 addition & 29 deletions proto/mage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ message MageOptions {
MageArmor default_mage_armor = 1;
}

message ArcaneMage {
message Mage {
message Rotation {
}

Expand All @@ -100,31 +100,3 @@ message ArcaneMage {
}
Options options = 1;
}

message FireMage {
message Rotation {
// Minimum Combustion threshold to cast Combustion at during lust
int32 combust_always_send = 1;
int32 combust_bloodlust = 2;
int32 combust_post_alter = 3;
int32 combust_no_alter = 4;
int32 combust_end_of_combat = 5;
}

message Options {
MageOptions class_options = 1;
}
Options options = 1;
}

message FrostMage {
message Rotation {
}

message Options {
MageOptions class_options = 1;
// Chance for water elemental to disobey, doing nothing rather than cast.
double water_elemental_disobey_chance = 2;
}
Options options = 1;
}
21 changes: 1 addition & 20 deletions proto/rogue.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,11 @@ message RogueOptions {
float vanish_break_time = 5;
}

message AssassinationRogue {
message Rogue {
message Rotation {}

message Options {
RogueOptions class_options = 1;
}
Options options = 1;
}

message CombatRogue {
message Rotation {}

message Options {
RogueOptions class_options = 1;
}
Options options = 1;
}

message SubtletyRogue {
message Rotation {}

message Options {
RogueOptions class_options = 1;
int32 honor_among_thieves_crit_rate = 6;
}
Options options = 1;
}
22 changes: 1 addition & 21 deletions proto/warlock.proto
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ message WarlockOptions {
bool use_item_swap_bonus_stats = 3;
}

message AfflictionWarlock {
message Warlock {
message Rotation {
}

Expand All @@ -102,23 +102,3 @@ message AfflictionWarlock {
}
Options options = 1;
}

message DemonologyWarlock {
message Rotation {
}

message Options {
WarlockOptions class_options = 1;
}
Options options = 1;
}

message DestructionWarlock {
message Rotation {
}

message Options {
WarlockOptions class_options = 1;
}
Options options = 1;
}
12 changes: 1 addition & 11 deletions proto/warrior.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,7 @@ message WarriorTalents {
message WarriorOptions {
}

message ArmsWarrior {
message Rotation {}

message Options {
WarriorOptions class_options = 1;
bool stance_snapshot = 2;
}
Options options = 1;
}

message FuryWarrior {
message DPSWarrior {
message Rotation {}

message Options {
Expand Down
28 changes: 4 additions & 24 deletions ui/core/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ import {
HandType,
HealingModel,
IndividualBuffs,
ItemLevelState,
ItemRandomSuffix,
ItemSlot,
Profession,
PseudoStat,
Race,
RangedWeaponType,
ReforgeStat,
Spec,
Stat,
UnitReference,
Expand Down Expand Up @@ -482,11 +480,6 @@ export class Player<SpecType extends Spec> {
return this.sim.db.getAvailableReforges(equippedItem.item).map(reforge => equippedItem.getReforgeData(reforge)!);
}

// Returns reforge given an id
getReforge(id: number): ReforgeStat | undefined {
return this.sim.db.getReforgeById(id);
}

// Returns all enchants that this player can wear in the given slot.
getEnchants(slot: ItemSlot): Array<Enchant> {
return this.sim.db.getEnchants(slot).filter(enchant => canEquipEnchant(enchant, this.playerSpec));
Expand Down Expand Up @@ -698,7 +691,7 @@ export class Player<SpecType extends Spec> {
}

canDualWield2H(): boolean {
return this.getSpec() == Spec.SpecFuryWarrior;
return false;
}

equipItem(eventID: EventID, slot: ItemSlot, newItem: EquippedItem | null) {
Expand Down Expand Up @@ -744,7 +737,7 @@ export class Player<SpecType extends Spec> {
getMeleeCritCapInfo(): MeleeCritCapInfo {
const meleeCrit = this.currentStats.finalStats?.pseudoStats[PseudoStat.PseudoStatPhysicalCritPercent] || 0.0;
const meleeHit = this.currentStats.finalStats?.pseudoStats[PseudoStat.PseudoStatPhysicalHitPercent] || 0.0;
const expertise = (this.currentStats.finalStats?.stats[Stat.StatExpertiseRating] || 0.0) / Mechanics.EXPERTISE_PER_QUARTER_PERCENT_REDUCTION / 4;
const expertise = (this.currentStats.finalStats?.stats[Stat.StatExpertise] || 0.0) / Mechanics.EXPERTISE_PER_QUARTER_PERCENT_REDUCTION / 4;
//const agility = (this.currentStats.finalStats?.stats[Stat.StatAgility] || 0.0) / this.getClass();
const suppression = 4.8;
const glancing = 24.0;
Expand Down Expand Up @@ -1079,19 +1072,6 @@ export class Player<SpecType extends Spec> {
return this.computeStatsEP(stats);
}

computeUpgradeEP(equippedItem: EquippedItem, upgradeLevel: ItemLevelState, slot: ItemSlot): number {
const cacheKey = `${equippedItem.id}-${JSON.stringify(this.epWeights)}-${slot}-${equippedItem.randomSuffix?.id}-${upgradeLevel}`;
if (this.upgradeEPCache.has(cacheKey)) {
return this.upgradeEPCache.get(cacheKey)!;
}

const stats = equippedItem.withUpgrade(upgradeLevel).withDynamicStats().calcStats(slot);
const ep = this.computeStatsEP(stats);
this.upgradeEPCache.set(cacheKey, ep);

return ep;
}

computeItemEP(item: Item, slot: ItemSlot): number {
if (item == null) return 0;

Expand Down Expand Up @@ -1253,10 +1233,10 @@ export class Player<SpecType extends Spec> {
};

if (filters.minIlvl != 0) {
itemData = filterItems(itemData, item => (item.scalingOptions?.[ItemLevelState.Base].ilvl || item.ilvl) >= filters.minIlvl);
itemData = filterItems(itemData, item => (item.scalingOptions?.[0].ilvl || item.ilvl) >= filters.minIlvl);
}
if (filters.maxIlvl != 0) {
itemData = filterItems(itemData, item => (item.scalingOptions?.[ItemLevelState.Base].ilvl || item.ilvl) <= filters.maxIlvl);
itemData = filterItems(itemData, item => (item.scalingOptions?.[0].ilvl || item.ilvl) <= filters.maxIlvl);
}

if (filters.factionRestriction != UIItem_FactionRestriction.UNSPECIFIED) {
Expand Down
Loading
Loading