diff --git a/proto/common.proto b/proto/common.proto index 0a269784c6..e16bd6c00d 100644 --- a/proto/common.proto +++ b/proto/common.proto @@ -364,7 +364,6 @@ enum RangedWeaponType { RangedWeaponTypeBow = 1; RangedWeaponTypeCrossbow = 2; RangedWeaponTypeGun = 3; - RangedWeaponTypeRelic = 4; RangedWeaponTypeThrown = 5; RangedWeaponTypeWand = 6; } @@ -387,7 +386,6 @@ enum ItemSlot { ItemSlotTrinket2 = 13; ItemSlotMainHand = 14; // can be 1h or 2h ItemSlotOffHand = 15; - ItemSlotRanged = 16; } enum ItemQuality { diff --git a/sim/core/attack.go b/sim/core/attack.go index e1eb0c0725..bc504d88a7 100644 --- a/sim/core/attack.go +++ b/sim/core/attack.go @@ -47,19 +47,6 @@ func newWeaponFromUnarmed(critMultiplier float64) Weapon { } } -func getWeaponMinRange(item *Item) float64 { - switch item.RangedWeaponType { - case proto.RangedWeaponType_RangedWeaponTypeThrown: - case proto.RangedWeaponType_RangedWeaponTypeUnknown: - case proto.RangedWeaponType_RangedWeaponTypeWand: - return 0. - default: - return 5 - } - - return 0 -} - func getWeaponMaxRange(item *Item) float64 { switch item.RangedWeaponType { case proto.RangedWeaponType_RangedWeaponTypeUnknown: @@ -91,7 +78,7 @@ func newWeaponFromItem(item *Item, critMultiplier float64, bonusDps float64) Wea NormalizedSwingSpeed: normalizedWeaponSpeed, CritMultiplier: critMultiplier, AttackPowerPerDPS: DefaultAttackPowerPerDPS, - MinRange: getWeaponMinRange(item), + MinRange: 0, // no more deadzone in MoP MaxRange: getWeaponMaxRange(item), } } @@ -116,7 +103,8 @@ func (character *Character) WeaponFromOffHand(critMultiplier float64) Weapon { // Returns weapon stats using the ranged equipped weapon. func (character *Character) WeaponFromRanged(critMultiplier float64) Weapon { - if weapon := character.GetRangedWeapon(); weapon != nil { + weapon := character.Ranged() + if weapon != nil { return newWeaponFromItem(weapon, critMultiplier, character.PseudoStats.BonusRangedDps) } else { return Weapon{} diff --git a/sim/core/character.go b/sim/core/character.go index 0dcae2d4c8..5717b0df94 100644 --- a/sim/core/character.go +++ b/sim/core/character.go @@ -173,7 +173,7 @@ func NewCharacter(party *Party, partyIndex int, player *proto.Player) Character character.PseudoStats.InFrontOfTarget = player.InFrontOfTarget if player.EnableItemSwap && player.ItemSwap != nil { - character.enableItemSwap(player.ItemSwap, character.DefaultCritMultiplier(), character.DefaultCritMultiplier(), 0) + character.enableItemSwap(player.ItemSwap, character.DefaultCritMultiplier(), character.DefaultCritMultiplier(), character.DefaultCritMultiplier()) } character.EquipScalingManager = character.NewEquipScalingManager() @@ -530,18 +530,8 @@ func (character *Character) HasOHWeapon() bool { return character.GetOHWeapon() != nil } -// Returns the ranged weapon if one is equipped, and null otherwise. -func (character *Character) GetRangedWeapon() *Item { - weapon := character.Ranged() - if weapon.ID == 0 || - weapon.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeRelic { - return nil - } else { - return weapon - } -} func (character *Character) HasRangedWeapon() bool { - return character.GetRangedWeapon() != nil + return character.Ranged() != nil } func (character *Character) GetDynamicProcMaskForWeaponEnchant(effectID int32) *ProcMask { diff --git a/sim/core/constants.go b/sim/core/constants.go index f4c81c232c..674c4c752b 100644 --- a/sim/core/constants.go +++ b/sim/core/constants.go @@ -32,7 +32,7 @@ const OffHand Hand = false const CombatTableCoverageCap = 1.024 // 102.4% chance to avoid an attack -const NumItemSlots = proto.ItemSlot_ItemSlotRanged + 1 +const NumItemSlots = proto.ItemSlot_ItemSlotOffHand + 1 func TrinketSlots() []proto.ItemSlot { return []proto.ItemSlot{proto.ItemSlot_ItemSlotTrinket1, proto.ItemSlot_ItemSlotTrinket2} @@ -43,7 +43,7 @@ func MeleeWeaponSlots() []proto.ItemSlot { } func AllWeaponSlots() []proto.ItemSlot { - return []proto.ItemSlot{proto.ItemSlot_ItemSlotMainHand, proto.ItemSlot_ItemSlotOffHand, proto.ItemSlot_ItemSlotRanged} + return []proto.ItemSlot{proto.ItemSlot_ItemSlotMainHand, proto.ItemSlot_ItemSlotOffHand} } func ArmorSpecializationSlots() []proto.ItemSlot { diff --git a/sim/core/database.go b/sim/core/database.go index 65ad51a8d5..e115c7fdca 100644 --- a/sim/core/database.go +++ b/sim/core/database.go @@ -246,7 +246,7 @@ type ItemSpec struct { ChallengeMode bool } -type Equipment [proto.ItemSlot_ItemSlotRanged + 1]Item +type Equipment [NumItemSlots]Item func (equipment *Equipment) MainHand() *Item { return &equipment[proto.ItemSlot_ItemSlotMainHand] @@ -257,7 +257,12 @@ func (equipment *Equipment) OffHand() *Item { } func (equipment *Equipment) Ranged() *Item { - return &equipment[proto.ItemSlot_ItemSlotRanged] + mh := equipment.MainHand() + if mh.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeUnknown { + return nil + } + + return mh } func (equipment *Equipment) Head() *Item { @@ -373,7 +378,7 @@ func (equipment *Equipment) ToEquipmentSpecProto() *proto.EquipmentSpec { } // Structs used for looking up items/gems/enchants -type EquipmentSpec [proto.ItemSlot_ItemSlotRanged + 1]ItemSpec +type EquipmentSpec [NumItemSlots]ItemSpec func ProtoToEquipmentSpec(es *proto.EquipmentSpec) EquipmentSpec { var coreEquip EquipmentSpec @@ -612,7 +617,7 @@ func ItemTypeToSlot(it proto.ItemType) proto.ItemSlot { case proto.ItemType_ItemTypeWeapon: return proto.ItemSlot_ItemSlotMainHand case proto.ItemType_ItemTypeRanged: - return proto.ItemSlot_ItemSlotRanged + return proto.ItemSlot_ItemSlotMainHand } return 255 @@ -632,7 +637,7 @@ var itemTypeToSlotsMap = map[proto.ItemType][]proto.ItemSlot{ proto.ItemType_ItemTypeFeet: {proto.ItemSlot_ItemSlotFeet}, proto.ItemType_ItemTypeFinger: {proto.ItemSlot_ItemSlotFinger1, proto.ItemSlot_ItemSlotFinger2}, proto.ItemType_ItemTypeTrinket: {proto.ItemSlot_ItemSlotTrinket1, proto.ItemSlot_ItemSlotTrinket2}, - proto.ItemType_ItemTypeRanged: {proto.ItemSlot_ItemSlotRanged}, + proto.ItemType_ItemTypeRanged: {proto.ItemSlot_ItemSlotMainHand}, // ItemType_ItemTypeWeapon is excluded intentionally - the slot cannot be decided based on type alone for weapons. } diff --git a/sim/core/item_swaps.go b/sim/core/item_swaps.go index b78d5778bd..31556149ed 100644 --- a/sim/core/item_swaps.go +++ b/sim/core/item_swaps.go @@ -319,7 +319,7 @@ func (swap *ItemSwap) SwapItems(sim *Simulation, swapSet proto.APLActionItemSwap isPrepull := sim.CurrentTime < 0 for _, slot := range swap.slots { - if (slot >= proto.ItemSlot_ItemSlotMainHand) && (slot <= proto.ItemSlot_ItemSlotRanged) { + if slot == proto.ItemSlot_ItemSlotMainHand || slot == proto.ItemSlot_ItemSlotOffHand { weaponSlotSwapped = true } else if !isReset && !isPrepull { continue @@ -374,10 +374,19 @@ func (swap *ItemSwap) swapItem(sim *Simulation, slot proto.ItemSlot, isPrepull b switch slot { case proto.ItemSlot_ItemSlotMainHand: - // Feral's concept of Paws is handeled in the druid.go Initialize() - // and doesn't need MH swap handling here. - if character.AutoAttacks.AutoSwingMelee && !swap.isFeralDruid { - character.AutoAttacks.SetMH(character.WeaponFromMainHand(swap.mhCritMultiplier)) + + // As of MoP Ranged Weapons are worn in the Main Hand + // If we can get it, we equipeed a valid ranged weapon + if character.Ranged() != nil { + if character.AutoAttacks.AutoSwingRanged { + character.AutoAttacks.SetRanged(character.WeaponFromRanged(swap.rangedCritMultiplier)) + } + } else { + // Feral's concept of Paws is handeled in the druid.go Initialize() + // and doesn't need MH swap handling here. + if character.AutoAttacks.AutoSwingMelee && !swap.isFeralDruid { + character.AutoAttacks.SetMH(character.WeaponFromMainHand(swap.mhCritMultiplier)) + } } case proto.ItemSlot_ItemSlotOffHand: // OH slot handling is more involved because we need to dynamically toggle the OH weapon attack on/off @@ -392,10 +401,6 @@ func (swap *ItemSwap) swapItem(sim *Simulation, slot proto.ItemSlot, isPrepull b } character.PseudoStats.CanBlock = character.OffHand().WeaponType == proto.WeaponType_WeaponTypeShield } - case proto.ItemSlot_ItemSlotRanged: - if character.AutoAttacks.AutoSwingRanged { - character.AutoAttacks.SetRanged(character.WeaponFromRanged(swap.rangedCritMultiplier)) - } } } diff --git a/sim/core/racials.go b/sim/core/racials.go index 5338b5df9c..5923809e00 100644 --- a/sim/core/racials.go +++ b/sim/core/racials.go @@ -91,9 +91,12 @@ func applyRaceEffects(agent Agent) { case proto.Race_RaceDwarf: character.PseudoStats.ReducedFrostHitTakenChance += 0.02 - // Gun specialization (+1% ranged crit when using a gun). - if character.Ranged().RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeGun { - character.AddBonusRangedCritPercent(1) + // Crack Shot: 1% Expertise with Ranged Weapons + ranged := character.Ranged() + if ranged != nil && (ranged.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeBow || + ranged.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeGun || + ranged.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeCrossbow) { + character.AddStat(stats.ExpertiseRating, ExpertisePerQuarterPercentReduction*4) } applyWeaponSpecialization(character, 3*ExpertisePerQuarterPercentReduction, @@ -230,9 +233,12 @@ func applyRaceEffects(agent Agent) { character.PseudoStats.ReducedNatureHitTakenChance += 0.02 character.AddStat(stats.Health, character.GetBaseStats()[stats.Health]*0.05) case proto.Race_RaceTroll: - // Bow specialization (+1% ranged crit when using a bow). - if character.Ranged().RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeBow { - character.AddBonusRangedCritPercent(1) + // Dead Eye: 1% Expertise with Guns, Bows or Crossbows. + ranged := character.Ranged() + if ranged != nil && (ranged.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeBow || + ranged.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeGun || + ranged.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeCrossbow) { + character.AddStat(stats.ExpertiseRating, ExpertisePerQuarterPercentReduction*4) } // Beast Slaying (+5% damage to beasts) diff --git a/sim/death_knight/blood/_blood_test.go b/sim/death_knight/blood/_blood_test.go index 5e5cbcf9ec..df8839e6af 100644 --- a/sim/death_knight/blood/_blood_test.go +++ b/sim/death_knight/blood/_blood_test.go @@ -73,7 +73,5 @@ var ItemFilter = core.ItemFilter{ proto.WeaponType_WeaponTypeSword, proto.WeaponType_WeaponTypeMace, }, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + RangedWeaponTypes: []proto.RangedWeaponType{}, } diff --git a/sim/death_knight/frost/_frost_test.go b/sim/death_knight/frost/_frost_test.go index 012d9565b0..152ac32bda 100644 --- a/sim/death_knight/frost/_frost_test.go +++ b/sim/death_knight/frost/_frost_test.go @@ -84,7 +84,5 @@ var ItemFilter = core.ItemFilter{ proto.WeaponType_WeaponTypeSword, proto.WeaponType_WeaponTypeMace, }, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + RangedWeaponTypes: []proto.RangedWeaponType{}, } diff --git a/sim/death_knight/unholy/_unholy_test.go b/sim/death_knight/unholy/_unholy_test.go index a705581ea4..1e0baed7c6 100644 --- a/sim/death_knight/unholy/_unholy_test.go +++ b/sim/death_knight/unholy/_unholy_test.go @@ -68,7 +68,5 @@ var ItemFilter = core.ItemFilter{ proto.WeaponType_WeaponTypeSword, proto.WeaponType_WeaponTypeMace, }, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + RangedWeaponTypes: []proto.RangedWeaponType{}, } diff --git a/sim/druid/balance/_balance_test.go b/sim/druid/balance/_balance_test.go index 2a81fb5d87..043f01df78 100644 --- a/sim/druid/balance/_balance_test.go +++ b/sim/druid/balance/_balance_test.go @@ -65,8 +65,6 @@ var ItemFilter = core.ItemFilter{ proto.WeaponType_WeaponTypeStaff, proto.WeaponType_WeaponTypePolearm, }, - ArmorType: proto.ArmorType_ArmorTypeLeather, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + ArmorType: proto.ArmorType_ArmorTypeLeather, + RangedWeaponTypes: []proto.RangedWeaponType{}, } diff --git a/sim/druid/feral/_feral_test.go b/sim/druid/feral/_feral_test.go index c3eea2fc18..8926e2eab1 100644 --- a/sim/druid/feral/_feral_test.go +++ b/sim/druid/feral/_feral_test.go @@ -20,10 +20,8 @@ var FeralItemFilter = core.ItemFilter{ proto.WeaponType_WeaponTypeStaff, proto.WeaponType_WeaponTypePolearm, }, - ArmorType: proto.ArmorType_ArmorTypeLeather, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + ArmorType: proto.ArmorType_ArmorTypeLeather, + RangedWeaponTypes: []proto.RangedWeaponType{}, } func TestFeral(t *testing.T) { diff --git a/sim/druid/guardian/_tank_test.go b/sim/druid/guardian/_tank_test.go index 9a03692ab0..52c089dacf 100644 --- a/sim/druid/guardian/_tank_test.go +++ b/sim/druid/guardian/_tank_test.go @@ -40,10 +40,8 @@ func TestGuardian(t *testing.T) { proto.WeaponType_WeaponTypeStaff, proto.WeaponType_WeaponTypePolearm, }, - ArmorType: proto.ArmorType_ArmorTypeLeather, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + ArmorType: proto.ArmorType_ArmorTypeLeather, + RangedWeaponTypes: []proto.RangedWeaponType{}, }, })) } diff --git a/sim/druid/restoration/_restoration_test.go b/sim/druid/restoration/_restoration_test.go index 57dec3a06c..2305c8c111 100644 --- a/sim/druid/restoration/_restoration_test.go +++ b/sim/druid/restoration/_restoration_test.go @@ -29,9 +29,7 @@ func init() { // proto.WeaponType_WeaponTypePolearm, // }, // ArmorType: proto.ArmorType_ArmorTypeLeather, -// RangedWeaponTypes: []proto.RangedWeaponType{ -// proto.RangedWeaponType_RangedWeaponTypeRelic, -// }, +// RangedWeaponTypes: []proto.RangedWeaponType{}, // }, // })) // } diff --git a/sim/hunter/hunter.go b/sim/hunter/hunter.go index b99bfb3fbe..1c636ed271 100644 --- a/sim/hunter/hunter.go +++ b/sim/hunter/hunter.go @@ -106,14 +106,10 @@ func NewHunter(character *core.Character, options *proto.Player, hunterOptions * rangedWeapon := hunter.WeaponFromRanged(0) hunter.EnableAutoAttacks(hunter, core.AutoAttackOptions{ - // We don't know crit multiplier until later when we see the target so just - // use 0 for now. - MainHand: hunter.WeaponFromMainHand(0), - OffHand: hunter.WeaponFromOffHand(0), - Ranged: rangedWeapon, + Ranged: rangedWeapon, //ReplaceMHSwing: hunter.TryRaptorStrike, //Todo: Might be weaving AutoSwingRanged: true, - AutoSwingMelee: true, + AutoSwingMelee: false, }) hunter.AutoAttacks.RangedConfig().ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { diff --git a/sim/paladin/holy/_holy_test.go b/sim/paladin/holy/_holy_test.go index e47d3a965c..0bd8546188 100644 --- a/sim/paladin/holy/_holy_test.go +++ b/sim/paladin/holy/_holy_test.go @@ -32,9 +32,7 @@ func init() { // proto.WeaponType_WeaponTypeShield, // }, // ArmorType: proto.ArmorType_ArmorTypePlate, -// RangedWeaponTypes: []proto.RangedWeaponType{ -// proto.RangedWeaponType_RangedWeaponTypeRelic, -// }, +// RangedWeaponTypes: []proto.RangedWeaponType{}, // }, // })) // } diff --git a/sim/paladin/protection/_protection_test.go b/sim/paladin/protection/_protection_test.go index b8b7e078c2..14b94df14e 100644 --- a/sim/paladin/protection/_protection_test.go +++ b/sim/paladin/protection/_protection_test.go @@ -40,10 +40,8 @@ func TestProtection(t *testing.T) { proto.HandType_HandTypeOneHand, proto.HandType_HandTypeOffHand, }, - ArmorType: proto.ArmorType_ArmorTypePlate, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + ArmorType: proto.ArmorType_ArmorTypePlate, + RangedWeaponTypes: []proto.RangedWeaponType{}, }, })) } diff --git a/sim/paladin/retribution/_retribution_test.go b/sim/paladin/retribution/_retribution_test.go index 0d18340f25..8ed72aa8bc 100644 --- a/sim/paladin/retribution/_retribution_test.go +++ b/sim/paladin/retribution/_retribution_test.go @@ -46,10 +46,7 @@ func TestRetribution(t *testing.T) { proto.HandType_HandTypeTwoHand, }, ArmorType: proto.ArmorType_ArmorTypePlate, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, - }, + RangedWeaponTypes: []proto.RangedWeaponType{}, })) } diff --git a/sim/rogue/rogue.go b/sim/rogue/rogue.go index 965b7a0b66..f8f9460215 100644 --- a/sim/rogue/rogue.go +++ b/sim/rogue/rogue.go @@ -76,9 +76,9 @@ type Rogue struct { lastDeadlyPoisonProcMask core.ProcMask - deadlyPoisonPPHM [proto.ItemSlot_ItemSlotRanged + 1]*core.DynamicProcManager - instantPoisonPPMM [proto.ItemSlot_ItemSlotRanged + 1]*core.DynamicProcManager - woundPoisonPPMM [proto.ItemSlot_ItemSlotRanged + 1]*core.DynamicProcManager + deadlyPoisonPPHM [core.NumItemSlots]*core.DynamicProcManager + instantPoisonPPMM [core.NumItemSlots]*core.DynamicProcManager + woundPoisonPPMM [core.NumItemSlots]*core.DynamicProcManager AdrenalineRushAura *core.Aura BladeFlurryAura *core.Aura @@ -324,7 +324,8 @@ func (rogue *Rogue) HasDagger(hand core.Hand) bool { // Does the rogue have a thrown weapon equipped in the ranged slot? func (rogue *Rogue) HasThrown() bool { - return rogue.Ranged().RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeThrown + weapon := rogue.Ranged() + return weapon != nil && weapon.RangedWeaponType == proto.RangedWeaponType_RangedWeaponTypeThrown } // Check if the rogue is considered in "stealth" for the purpose of casting abilities diff --git a/sim/shaman/elemental/_elemental_test.go b/sim/shaman/elemental/_elemental_test.go index f3b090f0ab..7b8afa7eb6 100644 --- a/sim/shaman/elemental/_elemental_test.go +++ b/sim/shaman/elemental/_elemental_test.go @@ -52,10 +52,8 @@ func TestElemental(t *testing.T) { proto.WeaponType_WeaponTypeShield, proto.WeaponType_WeaponTypeStaff, }, - ArmorType: proto.ArmorType_ArmorTypeMail, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + ArmorType: proto.ArmorType_ArmorTypeMail, + RangedWeaponTypes: []proto.RangedWeaponType{}, }, })) } diff --git a/sim/shaman/enhancement/_enhancement_test.go b/sim/shaman/enhancement/_enhancement_test.go index d6dd176905..6aabdaa494 100644 --- a/sim/shaman/enhancement/_enhancement_test.go +++ b/sim/shaman/enhancement/_enhancement_test.go @@ -36,10 +36,8 @@ func TestEnhancement(t *testing.T) { proto.WeaponType_WeaponTypeShield, proto.WeaponType_WeaponTypeStaff, }, - ArmorType: proto.ArmorType_ArmorTypeMail, - RangedWeaponTypes: []proto.RangedWeaponType{ - proto.RangedWeaponType_RangedWeaponTypeRelic, - }, + ArmorType: proto.ArmorType_ArmorTypeMail, + RangedWeaponTypes: []proto.RangedWeaponType{}, }, })) } diff --git a/sim/shaman/restoration/restoration_test.go b/sim/shaman/restoration/restoration_test.go index 3998d5be0b..a1d00ff5ee 100644 --- a/sim/shaman/restoration/restoration_test.go +++ b/sim/shaman/restoration/restoration_test.go @@ -31,9 +31,7 @@ func init() { // proto.WeaponType_WeaponTypeStaff, // }, // ArmorType: proto.ArmorType_ArmorTypeMail, -// RangedWeaponTypes: []proto.RangedWeaponType{ -// proto.RangedWeaponType_RangedWeaponTypeRelic, -// }, +// RangedWeaponTypes: []proto.RangedWeaponType{}, // }, // })) // } diff --git a/tools/database/dbc/item.go b/tools/database/dbc/item.go index 16c2021c4b..249d4f7d1c 100644 --- a/tools/database/dbc/item.go +++ b/tools/database/dbc/item.go @@ -325,8 +325,6 @@ func (item *Item) GetWeaponTypes() (proto.WeaponType, proto.HandType, proto.Rang switch item.ItemClass { case ITEM_CLASS_ARMOR: switch item.ItemSubClass { - case ITEM_SUBCLASS_ARMOR_RELIC: - rangedWeaponType = proto.RangedWeaponType_RangedWeaponTypeRelic case ITEM_SUBCLASS_ARMOR_MISC: if item.InventoryType == INVTYPE_HOLDABLE { diff --git a/ui/core/components/gear_picker/filters_menu.tsx b/ui/core/components/gear_picker/filters_menu.tsx index 1ad971a104..e43e6a0b65 100644 --- a/ui/core/components/gear_picker/filters_menu.tsx +++ b/ui/core/components/gear_picker/filters_menu.tsx @@ -141,93 +141,95 @@ export class FiltersMenu extends BaseModal { }); } } else if (Player.WEAPON_SLOTS.includes(slot)) { - const weaponTypeSection = this.newSection('Weapon Type'); - weaponTypeSection.classList.add('filters-menu-section-bool-list'); - const weaponTypes = player.getPlayerClass().weaponTypes.map(ewt => ewt.weaponType); + if (player.getPlayerClass().weaponTypes.length > 0) { + const weaponTypeSection = this.newSection('Weapon Type'); + weaponTypeSection.classList.add('filters-menu-section-bool-list'); + const weaponTypes = player.getPlayerClass().weaponTypes.map(ewt => ewt.weaponType); - weaponTypes.forEach(weaponType => { - new BooleanPicker(weaponTypeSection, player.sim, { - id: `filters-weapon-type-${weaponType}`, - label: weaponTypeNames.get(weaponType), - inline: true, - changedEvent: (sim: Sim) => sim.filtersChangeEmitter, - getValue: (sim: Sim) => sim.getFilters().weaponTypes.includes(weaponType), - setValue: (eventID: EventID, sim: Sim, newValue: boolean) => { - const filters = sim.getFilters(); - if (newValue) { - filters.weaponTypes.push(weaponType); - } else { - filters.weaponTypes = filters.weaponTypes.filter(at => at != weaponType); - } - sim.setFilters(eventID, filters); - }, + weaponTypes.forEach(weaponType => { + new BooleanPicker(weaponTypeSection, player.sim, { + id: `filters-weapon-type-${weaponType}`, + label: weaponTypeNames.get(weaponType), + inline: true, + changedEvent: (sim: Sim) => sim.filtersChangeEmitter, + getValue: (sim: Sim) => sim.getFilters().weaponTypes.includes(weaponType), + setValue: (eventID: EventID, sim: Sim, newValue: boolean) => { + const filters = sim.getFilters(); + if (newValue) { + filters.weaponTypes.push(weaponType); + } else { + filters.weaponTypes = filters.weaponTypes.filter(at => at != weaponType); + } + sim.setFilters(eventID, filters); + }, + }); }); - }); - const weaponSpeedSection = this.newSection('Weapon Speed'); - weaponSpeedSection.classList.add('filters-menu-section-number-list'); - new NumberPicker(weaponSpeedSection, player.sim, { - id: 'filters-min-weapon-speed', - label: 'Min MH Speed', - //labelTooltip: 'Maximum speed for the mainhand weapon. If 0, no maximum value is applied.', - float: true, - positive: true, - changedEvent: (sim: Sim) => sim.filtersChangeEmitter, - getValue: (sim: Sim) => sim.getFilters().minMhWeaponSpeed, - setValue: (eventID: EventID, sim: Sim, newValue: number) => { - const filters = sim.getFilters(); - filters.minMhWeaponSpeed = newValue; - sim.setFilters(eventID, filters); - }, - }); - new NumberPicker(weaponSpeedSection, player.sim, { - id: 'filters-max-weapon-speed', - label: 'Max MH Speed', - //labelTooltip: 'Maximum speed for the mainhand weapon. If 0, no maximum value is applied.', - float: true, - positive: true, - changedEvent: (sim: Sim) => sim.filtersChangeEmitter, - getValue: (sim: Sim) => sim.getFilters().maxMhWeaponSpeed, - setValue: (eventID: EventID, sim: Sim, newValue: number) => { - const filters = sim.getFilters(); - filters.maxMhWeaponSpeed = newValue; - sim.setFilters(eventID, filters); - }, - }); - - if (player.getPlayerSpec().canDualWield) { + const weaponSpeedSection = this.newSection('Weapon Speed'); + weaponSpeedSection.classList.add('filters-menu-section-number-list'); new NumberPicker(weaponSpeedSection, player.sim, { - id: 'filters-min-oh-weapon-speed', - label: 'Min OH Speed', - //labelTooltip: 'Minimum speed for the offhand weapon. If 0, no minimum value is applied.', + id: 'filters-min-weapon-speed', + label: 'Min MH Speed', + //labelTooltip: 'Maximum speed for the mainhand weapon. If 0, no maximum value is applied.', float: true, positive: true, changedEvent: (sim: Sim) => sim.filtersChangeEmitter, - getValue: (sim: Sim) => sim.getFilters().minOhWeaponSpeed, + getValue: (sim: Sim) => sim.getFilters().minMhWeaponSpeed, setValue: (eventID: EventID, sim: Sim, newValue: number) => { const filters = sim.getFilters(); - filters.minOhWeaponSpeed = newValue; + filters.minMhWeaponSpeed = newValue; sim.setFilters(eventID, filters); }, }); new NumberPicker(weaponSpeedSection, player.sim, { - id: 'filters-max-oh-weapon-speed', - label: 'Max OH Speed', - //labelTooltip: 'Maximum speed for the offhand weapon. If 0, no maximum value is applied.', + id: 'filters-max-weapon-speed', + label: 'Max MH Speed', + //labelTooltip: 'Maximum speed for the mainhand weapon. If 0, no maximum value is applied.', float: true, positive: true, changedEvent: (sim: Sim) => sim.filtersChangeEmitter, - getValue: (sim: Sim) => sim.getFilters().maxOhWeaponSpeed, + getValue: (sim: Sim) => sim.getFilters().maxMhWeaponSpeed, setValue: (eventID: EventID, sim: Sim, newValue: number) => { const filters = sim.getFilters(); - filters.maxOhWeaponSpeed = newValue; + filters.maxMhWeaponSpeed = newValue; sim.setFilters(eventID, filters); }, }); + + if (player.getPlayerSpec().canDualWield) { + new NumberPicker(weaponSpeedSection, player.sim, { + id: 'filters-min-oh-weapon-speed', + label: 'Min OH Speed', + //labelTooltip: 'Minimum speed for the offhand weapon. If 0, no minimum value is applied.', + float: true, + positive: true, + changedEvent: (sim: Sim) => sim.filtersChangeEmitter, + getValue: (sim: Sim) => sim.getFilters().minOhWeaponSpeed, + setValue: (eventID: EventID, sim: Sim, newValue: number) => { + const filters = sim.getFilters(); + filters.minOhWeaponSpeed = newValue; + sim.setFilters(eventID, filters); + }, + }); + new NumberPicker(weaponSpeedSection, player.sim, { + id: 'filters-max-oh-weapon-speed', + label: 'Max OH Speed', + //labelTooltip: 'Maximum speed for the offhand weapon. If 0, no maximum value is applied.', + float: true, + positive: true, + changedEvent: (sim: Sim) => sim.filtersChangeEmitter, + getValue: (sim: Sim) => sim.getFilters().maxOhWeaponSpeed, + setValue: (eventID: EventID, sim: Sim, newValue: number) => { + const filters = sim.getFilters(); + filters.maxOhWeaponSpeed = newValue; + sim.setFilters(eventID, filters); + }, + }); + } } - } else if (slot == ItemSlot.ItemSlotRanged) { + const rangedweapontypes = player.getPlayerClass().rangedWeaponTypes; - if (rangedweapontypes.length <= 1) { + if (rangedweapontypes.length < 1) { return; } const rangedWeaponTypeSection = this.newSection('Ranged Weapon Type'); diff --git a/ui/core/components/gear_picker/gear_picker.tsx b/ui/core/components/gear_picker/gear_picker.tsx index 95f76ecf71..5c09a0af26 100644 --- a/ui/core/components/gear_picker/gear_picker.tsx +++ b/ui/core/components/gear_picker/gear_picker.tsx @@ -46,8 +46,7 @@ export default class GearPicker extends Component { ItemSlot.ItemSlotChest, ItemSlot.ItemSlotWrist, ItemSlot.ItemSlotMainHand, - ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, + ItemSlot.ItemSlotOffHand ].map(slot => new ItemPicker(leftSideRef.value!, this, simUI, player, slot)); const rightItemPickers = [ diff --git a/ui/core/components/gear_picker/item_list.tsx b/ui/core/components/gear_picker/item_list.tsx index feb483e707..97d723b376 100644 --- a/ui/core/components/gear_picker/item_list.tsx +++ b/ui/core/components/gear_picker/item_list.tsx @@ -195,6 +195,7 @@ export default class ItemList { if ( label === SelectorModalTabs.Items && + player.getPlayerClass().weaponTypes.length > 0 && (currentSlot === ItemSlot.ItemSlotMainHand || (currentSlot === ItemSlot.ItemSlotOffHand && player.getClass() === Class.ClassWarrior)) ) { if (show1hWeaponRef.value) makeShow1hWeaponsSelector(show1hWeaponRef.value, player.sim); diff --git a/ui/core/components/gear_picker/utils.tsx b/ui/core/components/gear_picker/utils.tsx index b9f571345e..989dbdcb8f 100644 --- a/ui/core/components/gear_picker/utils.tsx +++ b/ui/core/components/gear_picker/utils.tsx @@ -22,7 +22,6 @@ const emptySlotIcons: Record = { [ItemSlot.ItemSlotTrinket2]: '/mop/assets/item_slots/trinket.jpg', [ItemSlot.ItemSlotMainHand]: '/mop/assets/item_slots/mainhand.jpg', [ItemSlot.ItemSlotOffHand]: '/mop/assets/item_slots/offhand.jpg', - [ItemSlot.ItemSlotRanged]: '/mop/assets/item_slots/ranged.jpg', }; export function getEmptySlotIconUrl(slot: ItemSlot): string { return emptySlotIcons[slot]; diff --git a/ui/core/components/individual_sim_ui/bulk/utils.ts b/ui/core/components/individual_sim_ui/bulk/utils.ts index 85b14f7b67..860676235a 100644 --- a/ui/core/components/individual_sim_ui/bulk/utils.ts +++ b/ui/core/components/individual_sim_ui/bulk/utils.ts @@ -18,7 +18,6 @@ export enum BulkSimItemSlot { ItemSlotMainHand, ItemSlotOffHand, ItemSlotHandWeapon, // Weapon grouping slot for specs that can dual-wield - ItemSlotRanged, } // Return all eligible bulk item slots. @@ -49,7 +48,6 @@ export const bulkSimSlotNames: Map = new Map([ [BulkSimItemSlot.ItemSlotMainHand, 'Main Hand'], [BulkSimItemSlot.ItemSlotOffHand, 'Off Hand'], [BulkSimItemSlot.ItemSlotHandWeapon, 'Weapons'], - [BulkSimItemSlot.ItemSlotRanged, 'Ranged'], ]); export const itemSlotToBulkSimItemSlot: Map = new Map([ @@ -69,7 +67,6 @@ export const itemSlotToBulkSimItemSlot: Map = new Map [ItemSlot.ItemSlotTrinket2, BulkSimItemSlot.ItemSlotTrinket], [ItemSlot.ItemSlotMainHand, BulkSimItemSlot.ItemSlotMainHand], [ItemSlot.ItemSlotOffHand, BulkSimItemSlot.ItemSlotOffHand], - [ItemSlot.ItemSlotRanged, BulkSimItemSlot.ItemSlotRanged], ]); export const getBulkItemSlotFromSlot = (slot: ItemSlot, canDualWield: boolean): BulkSimItemSlot => { diff --git a/ui/core/components/individual_sim_ui/importers/individual_wowhead_gear_planner_importer.tsx b/ui/core/components/individual_sim_ui/importers/individual_wowhead_gear_planner_importer.tsx index b7f36868f6..c5c07961e2 100644 --- a/ui/core/components/individual_sim_ui/importers/individual_wowhead_gear_planner_importer.tsx +++ b/ui/core/components/individual_sim_ui/importers/individual_wowhead_gear_planner_importer.tsx @@ -317,6 +317,5 @@ export class IndividualWowheadGearPlannerImporter extends [ItemSlot.ItemSlotTrinket2]: 14, [ItemSlot.ItemSlotMainHand]: 16, [ItemSlot.ItemSlotOffHand]: 17, - [ItemSlot.ItemSlotRanged]: 18, }; } diff --git a/ui/core/player.ts b/ui/core/player.ts index 500c0c2991..412f4ffa15 100644 --- a/ui/core/player.ts +++ b/ui/core/player.ts @@ -33,6 +33,7 @@ import { Profession, PseudoStat, Race, + RangedWeaponType, ReforgeStat, Spec, Stat, @@ -334,7 +335,7 @@ export class Player { } this.hiddenMCDs = specConfig.hiddenMCDs || new Array(); - for (let i = 0; i < ItemSlot.ItemSlotRanged + 1; ++i) { + for (let i = 0; i < ItemSlot.ItemSlotOffHand + 1; ++i) { this.itemEPCache[i] = new Map(); } @@ -518,7 +519,7 @@ export class Player { this.enchantEPCache = new Map(); this.randomSuffixEPCache = new Map(); this.upgradeEPCache = new Map(); - for (let i = 0; i < ItemSlot.ItemSlotRanged + 1; ++i) { + for (let i = 0; i < ItemSlot.ItemSlotOffHand + 1; ++i) { this.itemEPCache[i] = new Map(); } } @@ -1371,9 +1372,14 @@ export class Player { }); } else if (Player.WEAPON_SLOTS.includes(slot)) { itemData = filterItems(itemData, item => { - if (!filters.weaponTypes.includes(item.weaponType)) { + if (item.handType == HandType.HandTypeUnknown && item.rangedWeaponType == RangedWeaponType.RangedWeaponTypeUnknown) { return false; } + + if (!filters.weaponTypes.includes(item.weaponType) && item.handType > HandType.HandTypeUnknown) { + return false; + } + if (!filters.oneHandedWeapons && item.handType != HandType.HandTypeTwoHand) { return false; } @@ -1381,25 +1387,18 @@ export class Player { return false; } - const minSpeed = slot == ItemSlot.ItemSlotMainHand ? filters.minMhWeaponSpeed : filters.minOhWeaponSpeed; - const maxSpeed = slot == ItemSlot.ItemSlotMainHand ? filters.maxMhWeaponSpeed : filters.maxOhWeaponSpeed; - if (minSpeed > 0 && item.weaponSpeed < minSpeed) { - return false; - } - if (maxSpeed > 0 && item.weaponSpeed > maxSpeed) { + // Ranged weapons are equiped in MH slot from MoP onwards + if (!filters.rangedWeaponTypes.includes(item.rangedWeaponType) && item.rangedWeaponType > RangedWeaponType.RangedWeaponTypeUnknown) { return false; } - return true; - }); - } else if (slot == ItemSlot.ItemSlotRanged) { - itemData = filterItems(itemData, item => { - if (!filters.rangedWeaponTypes.includes(item.rangedWeaponType)) { - return false; + let minSpeed = slot == ItemSlot.ItemSlotMainHand ? filters.minMhWeaponSpeed : filters.minOhWeaponSpeed; + let maxSpeed = slot == ItemSlot.ItemSlotMainHand ? filters.maxMhWeaponSpeed : filters.maxOhWeaponSpeed; + if (item.rangedWeaponType > 0) { + minSpeed = filters.minRangedWeaponSpeed; + maxSpeed = filters.maxRangedWeaponSpeed; } - const minSpeed = filters.minRangedWeaponSpeed; - const maxSpeed = filters.maxRangedWeaponSpeed; if (minSpeed > 0 && item.weaponSpeed < minSpeed) { return false; } @@ -1410,6 +1409,7 @@ export class Player { return true; }); } + return itemData; } diff --git a/ui/core/player_classes/death_knight.ts b/ui/core/player_classes/death_knight.ts index 78998ff563..10947bb27a 100644 --- a/ui/core/player_classes/death_knight.ts +++ b/ui/core/player_classes/death_knight.ts @@ -35,7 +35,7 @@ export class DeathKnight extends PlayerClass { { weaponType: WeaponType.WeaponTypeSword, canUseTwoHand: true }, // TODO: validate proficiencies ]; - static rangedWeaponTypes: RangedWeaponType[] = [RangedWeaponType.RangedWeaponTypeRelic]; + static rangedWeaponTypes: RangedWeaponType[] = []; readonly classID = DeathKnight.classID; readonly friendlyName = DeathKnight.name; diff --git a/ui/core/player_classes/druid.ts b/ui/core/player_classes/druid.ts index fbb0f0e134..92d14e8e37 100644 --- a/ui/core/player_classes/druid.ts +++ b/ui/core/player_classes/druid.ts @@ -32,7 +32,7 @@ export class Druid extends PlayerClass { { weaponType: WeaponType.WeaponTypeStaff, canUseTwoHand: true }, { weaponType: WeaponType.WeaponTypePolearm, canUseTwoHand: true }, ]; - static rangedWeaponTypes: RangedWeaponType[] = [RangedWeaponType.RangedWeaponTypeRelic]; + static rangedWeaponTypes: RangedWeaponType[] = []; readonly classID = Druid.classID; readonly friendlyName = Druid.name; diff --git a/ui/core/player_classes/paladin.ts b/ui/core/player_classes/paladin.ts index bd3db2ff53..cfd099881a 100644 --- a/ui/core/player_classes/paladin.ts +++ b/ui/core/player_classes/paladin.ts @@ -32,7 +32,7 @@ export class Paladin extends PlayerClass { { weaponType: WeaponType.WeaponTypeShield }, { weaponType: WeaponType.WeaponTypeSword, canUseTwoHand: true }, ]; - static rangedWeaponTypes: RangedWeaponType[] = [RangedWeaponType.RangedWeaponTypeRelic]; + static rangedWeaponTypes: RangedWeaponType[] = []; readonly classID = Paladin.classID; readonly friendlyName = Paladin.name; diff --git a/ui/core/player_classes/shaman.ts b/ui/core/player_classes/shaman.ts index a83a7cd72a..b39ddbba57 100644 --- a/ui/core/player_classes/shaman.ts +++ b/ui/core/player_classes/shaman.ts @@ -33,7 +33,7 @@ export class Shaman extends PlayerClass { { weaponType: WeaponType.WeaponTypeShield }, { weaponType: WeaponType.WeaponTypeStaff, canUseTwoHand: true }, ]; - static rangedWeaponTypes: RangedWeaponType[] = [RangedWeaponType.RangedWeaponTypeRelic]; + static rangedWeaponTypes: RangedWeaponType[] = []; readonly classID = Shaman.classID; readonly friendlyName = Shaman.name; diff --git a/ui/core/proto_utils/equipped_item.ts b/ui/core/proto_utils/equipped_item.ts index c90451a3aa..f9f4f57ade 100644 --- a/ui/core/proto_utils/equipped_item.ts +++ b/ui/core/proto_utils/equipped_item.ts @@ -8,6 +8,7 @@ import { ItemType, Profession, PseudoStat, + RangedWeaponType, ReforgeStat, ScalingItemProperties, Stat, @@ -29,11 +30,13 @@ export const getWeaponStatsBySlot = (item: Item, slot: ItemSlot, upgradeStep: It if (item.weaponSpeed > 0) { const weaponDps = getWeaponDPS(item, upgradeStep); if (slot === ItemSlot.ItemSlotMainHand) { - itemStats = itemStats.withPseudoStat(PseudoStat.PseudoStatMainHandDps, weaponDps); + if (item.rangedWeaponType > RangedWeaponType.RangedWeaponTypeUnknown) { + itemStats = itemStats.withPseudoStat(PseudoStat.PseudoStatRangedDps, weaponDps); + } else { + itemStats = itemStats.withPseudoStat(PseudoStat.PseudoStatMainHandDps, weaponDps); + } } else if (slot === ItemSlot.ItemSlotOffHand) { itemStats = itemStats.withPseudoStat(PseudoStat.PseudoStatOffHandDps, weaponDps); - } else if (slot === ItemSlot.ItemSlotRanged) { - itemStats = itemStats.withPseudoStat(PseudoStat.PseudoStatRangedDps, weaponDps); } } return itemStats; diff --git a/ui/core/proto_utils/gear.ts b/ui/core/proto_utils/gear.ts index 5f0c9c9fc7..7e78322c74 100644 --- a/ui/core/proto_utils/gear.ts +++ b/ui/core/proto_utils/gear.ts @@ -67,16 +67,6 @@ abstract class BaseGear { .some(id => itemIds.includes(id)); } - hasRelic(itemId: number): boolean { - const relicItem = this.getEquippedItem(ItemSlot.ItemSlotRanged); - - if (!relicItem) { - return false; - } - - return relicItem!.item.id == itemId; - } - /** * Returns a new Gear set with the item equipped. * diff --git a/ui/core/proto_utils/names.ts b/ui/core/proto_utils/names.ts index 856fd9b251..b50569a7b5 100644 --- a/ui/core/proto_utils/names.ts +++ b/ui/core/proto_utils/names.ts @@ -28,7 +28,6 @@ export const rangedWeaponTypeNames: Map = new Map([ [RangedWeaponType.RangedWeaponTypeBow, 'Bow'], [RangedWeaponType.RangedWeaponTypeCrossbow, 'Crossbow'], [RangedWeaponType.RangedWeaponTypeGun, 'Gun'], - [RangedWeaponType.RangedWeaponTypeRelic, 'Relic'], [RangedWeaponType.RangedWeaponTypeThrown, 'Thrown'], [RangedWeaponType.RangedWeaponTypeWand, 'Wand'], ]); @@ -193,7 +192,6 @@ export const slotNames: Map = new Map([ [ItemSlot.ItemSlotTrinket2, 'Trinket 2'], [ItemSlot.ItemSlotMainHand, 'Main Hand'], [ItemSlot.ItemSlotOffHand, 'Off Hand'], - [ItemSlot.ItemSlotRanged, 'Ranged'], ]); export const resourceNames: Map = new Map([ diff --git a/ui/core/proto_utils/utils.ts b/ui/core/proto_utils/utils.ts index 6ccc4813c1..b21ab4128e 100644 --- a/ui/core/proto_utils/utils.ts +++ b/ui/core/proto_utils/utils.ts @@ -1862,7 +1862,7 @@ const itemTypeToSlotsMap: Partial>> = { [ItemType.ItemTypeFeet]: [ItemSlot.ItemSlotFeet], [ItemType.ItemTypeFinger]: [ItemSlot.ItemSlotFinger1, ItemSlot.ItemSlotFinger2], [ItemType.ItemTypeTrinket]: [ItemSlot.ItemSlotTrinket1, ItemSlot.ItemSlotTrinket2], - [ItemType.ItemTypeRanged]: [ItemSlot.ItemSlotRanged], + [ItemType.ItemTypeRanged]: [ItemSlot.ItemSlotMainHand], }; export function getEligibleItemSlots(item: Item, isFuryWarrior?: boolean): Array { @@ -1953,7 +1953,7 @@ export function enchantAppliesToItem(enchant: Enchant, item: Item): boolean { ) return false; - if (sharedSlots.includes(ItemSlot.ItemSlotRanged)) { + if (enchant.type == ItemType.ItemTypeRanged) { if ( ![RangedWeaponType.RangedWeaponTypeBow, RangedWeaponType.RangedWeaponTypeCrossbow, RangedWeaponType.RangedWeaponTypeGun].includes( item.rangedWeaponType, @@ -1962,6 +1962,10 @@ export function enchantAppliesToItem(enchant: Enchant, item: Item): boolean { return false; } + if (item.rangedWeaponType > 0 && enchant.type != ItemType.ItemTypeRanged) { + return false; + } + return true; } diff --git a/ui/death_knight/blood/sim.ts b/ui/death_knight/blood/sim.ts index 95a863659e..b30ee01e57 100644 --- a/ui/death_knight/blood/sim.ts +++ b/ui/death_knight/blood/sim.ts @@ -131,7 +131,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecBloodDeathKnight, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/death_knight/frost/sim.ts b/ui/death_knight/frost/sim.ts index 377c61deb8..fcc52a9308 100644 --- a/ui/death_knight/frost/sim.ts +++ b/ui/death_knight/frost/sim.ts @@ -140,7 +140,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFrostDeathKnight, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { showExecuteProportion: false, diff --git a/ui/death_knight/unholy/sim.ts b/ui/death_knight/unholy/sim.ts index 830fecf926..76a9529256 100644 --- a/ui/death_knight/unholy/sim.ts +++ b/ui/death_knight/unholy/sim.ts @@ -123,7 +123,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecUnholyDeathKnight, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/hunter/beast_mastery/sim.ts b/ui/hunter/beast_mastery/sim.ts index ba11229cf8..0c30750bd3 100644 --- a/ui/hunter/beast_mastery/sim.ts +++ b/ui/hunter/beast_mastery/sim.ts @@ -61,7 +61,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecBeastMasteryHunter, { }, itemSwapSlots: [ ItemSlot.ItemSlotMainHand, - ItemSlot.ItemSlotRanged, ItemSlot.ItemSlotHands, ItemSlot.ItemSlotTrinket1, ItemSlot.ItemSlotTrinket2, diff --git a/ui/hunter/marksmanship/sim.ts b/ui/hunter/marksmanship/sim.ts index 2b96b4b4fc..0a72ddb48f 100644 --- a/ui/hunter/marksmanship/sim.ts +++ b/ui/hunter/marksmanship/sim.ts @@ -60,7 +60,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecMarksmanshipHunter, { }, itemSwapSlots: [ ItemSlot.ItemSlotMainHand, - ItemSlot.ItemSlotRanged, ItemSlot.ItemSlotHands, ItemSlot.ItemSlotTrinket1, ItemSlot.ItemSlotTrinket2, diff --git a/ui/hunter/shared.ts b/ui/hunter/shared.ts index f3a9ef0238..b111e64570 100644 --- a/ui/hunter/shared.ts +++ b/ui/hunter/shared.ts @@ -9,7 +9,8 @@ export const sharedHunterDisplayStatsModifiers = ( ): StatMods => { let stats = new Stats(); - const rangedWeapon = player.getEquippedItem(ItemSlot.ItemSlotRanged); + // TODO: Update for MOP Scopes + const rangedWeapon = player.getEquippedItem(ItemSlot.ItemSlotMainHand); if (rangedWeapon?.enchant?.effectId == 3608) { stats = stats.addStat(Stat.StatCritRating, 40); } diff --git a/ui/hunter/survival/sim.ts b/ui/hunter/survival/sim.ts index 383c6bb4dd..fc2746158a 100644 --- a/ui/hunter/survival/sim.ts +++ b/ui/hunter/survival/sim.ts @@ -60,7 +60,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecSurvivalHunter, { }, itemSwapSlots: [ ItemSlot.ItemSlotMainHand, - ItemSlot.ItemSlotRanged, ItemSlot.ItemSlotHands, ItemSlot.ItemSlotTrinket1, ItemSlot.ItemSlotTrinket2, diff --git a/ui/rogue/assassination/sim.ts b/ui/rogue/assassination/sim.ts index ee2238037b..3a90626968 100644 --- a/ui/rogue/assassination/sim.ts +++ b/ui/rogue/assassination/sim.ts @@ -133,7 +133,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecAssassinationRogue, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/rogue/combat/sim.ts b/ui/rogue/combat/sim.ts index e8090b9db1..c3becf05e4 100644 --- a/ui/rogue/combat/sim.ts +++ b/ui/rogue/combat/sim.ts @@ -135,7 +135,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecCombatRogue, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/rogue/subtlety/sim.ts b/ui/rogue/subtlety/sim.ts index a816393335..36978fdd08 100644 --- a/ui/rogue/subtlety/sim.ts +++ b/ui/rogue/subtlety/sim.ts @@ -134,7 +134,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecSubtletyRogue, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/warlock/affliction/sim.ts b/ui/warlock/affliction/sim.ts index 51b271fd06..f2ef931c05 100644 --- a/ui/warlock/affliction/sim.ts +++ b/ui/warlock/affliction/sim.ts @@ -99,7 +99,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecAfflictionWarlock, { ItemSlot.ItemSlotHands, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ItemSlot.ItemSlotTrinket1, ItemSlot.ItemSlotTrinket2, ], diff --git a/ui/warlock/demonology/sim.ts b/ui/warlock/demonology/sim.ts index 216cd32c76..d561ab6a81 100644 --- a/ui/warlock/demonology/sim.ts +++ b/ui/warlock/demonology/sim.ts @@ -120,7 +120,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecDemonologyWarlock, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/warlock/destruction/sim.ts b/ui/warlock/destruction/sim.ts index 7d34e2819b..f39570ede1 100644 --- a/ui/warlock/destruction/sim.ts +++ b/ui/warlock/destruction/sim.ts @@ -77,7 +77,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecDestructionWarlock, { ItemSlot.ItemSlotHands, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ItemSlot.ItemSlotTrinket1, ItemSlot.ItemSlotTrinket2, ], diff --git a/ui/warrior/arms/sim.ts b/ui/warrior/arms/sim.ts index e83b8c5500..b8896b5c88 100644 --- a/ui/warrior/arms/sim.ts +++ b/ui/warrior/arms/sim.ts @@ -108,7 +108,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecArmsWarrior, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/warrior/fury/sim.ts b/ui/warrior/fury/sim.ts index 2690c436e3..6f305da755 100644 --- a/ui/warrior/fury/sim.ts +++ b/ui/warrior/fury/sim.ts @@ -126,7 +126,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFuryWarrior, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/warrior/protection/sim.ts b/ui/warrior/protection/sim.ts index 960bea5fe7..21bc39211e 100644 --- a/ui/warrior/protection/sim.ts +++ b/ui/warrior/protection/sim.ts @@ -128,7 +128,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecProtectionWarrior, { ItemSlot.ItemSlotTrinket2, ItemSlot.ItemSlotMainHand, ItemSlot.ItemSlotOffHand, - ItemSlot.ItemSlotRanged, ], encounterPicker: { // Whether to include 'Execute DuratFion (%)' in the 'Encounter' section of the settings tab.