Skip to content

Commit

Permalink
Add weapon stat mod validator
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed Jul 26, 2023
1 parent 9218b47 commit 120263f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 12 additions & 0 deletions libs/StatLogic/StatLogic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,18 @@ addon.StatModValidators = {
["UPDATE_SHAPESHIFT_FORM"] = true,
},
},
weapon = {
validate = function(case)
local weapon = GetInventoryItemID("player", 16)
if weapon then
local subclassID = select(7, GetItemInfoInstant(weapon))
return subclassID and case.weapon[subclassID]
end
end,
events = {
["UNIT_INVENTORY_CHANGED"] = "player",
}
},
set = {
validate = function(case)
return equipped_sets[case.set] and equipped_sets[case.set] >= case.pieces
Expand Down
12 changes: 6 additions & 6 deletions libs/StatLogic/Vanilla_Logic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ elseif addon.class == "ROGUE" then
1, 2, 3, 4, 5,
},
["weapon"] = {
Enum.ItemWeaponSubclass.Dagger,
[Enum.ItemWeaponSubclass.Dagger] = true,
},
},
-- Fist Weapon Specialization
Expand All @@ -617,7 +617,7 @@ elseif addon.class == "ROGUE" then
1, 2, 3, 4, 5,
},
["weapon"] = {
Enum.ItemWeaponSubclass.Unarmed,
[Enum.ItemWeaponSubclass.Unarmed] = true,
},
},
},
Expand Down Expand Up @@ -863,7 +863,7 @@ elseif addon.class == "WARRIOR" then
["buff"] = 12328, -- ["Death Wish"],
},
},
["ADD_CRIT"] = {
["ADD_MELEE_CRIT"] = {
-- Cruelty
{
["tab"] = 2,
Expand All @@ -880,8 +880,8 @@ elseif addon.class == "WARRIOR" then
1, 2, 3, 4, 5,
},
["weapon"] = {
Enum.ItemWeaponSubclass.Axe1H,
Enum.ItemWeaponSubclass.Axe2H,
[Enum.ItemWeaponSubclass.Axe1H] = true,
[Enum.ItemWeaponSubclass.Axe2H] = true,
},
},
-- Polearm Specialization
Expand All @@ -892,7 +892,7 @@ elseif addon.class == "WARRIOR" then
1, 2, 3, 4, 5,
},
["weapon"] = {
Enum.ItemWeaponSubclass.Polearm,
[Enum.ItemWeaponSubclass.Polearm] = true,
},
},
-- Berserker Stance
Expand Down

0 comments on commit 120263f

Please sign in to comment.