diff --git a/RatingBuster.lua b/RatingBuster.lua index 0a7367c..73f7ac8 100644 --- a/RatingBuster.lua +++ b/RatingBuster.lua @@ -38,15 +38,6 @@ RatingBuster.date = ("$Date: 2008-07-22 15:35:19 +0800 (星期二, 22 七月 200 ----------- local cache = {} setmetatable(cache, {__mode = "kv"}) -- weak table to enable garbage collection -local function clearCache() - for k in pairs(cache) do - cache[k] = nil - end -end - -function RatingBuster:ToggleDebugging() - wipe(cache) -end --------------------- -- Local Variables -- @@ -81,7 +72,7 @@ end local function setOption(info, value, dataType) dataType = dataType or "profile" db[dataType][info[#info]] = value - clearCache() + RatingBuster:ClearCache() end local function getGem(info) return db.profile[info[#info]].gemLink @@ -112,7 +103,7 @@ local function setGem(info, value) gemText = gemText:sub(11) end db.profile[info[#info]].gemText = gemText - clearCache() + RatingBuster:ClearCache() local socket = "EMPTY_SOCKET_" .. info[#info]:sub(7):upper() if not debugstack():find("AceConsole") then RatingBuster:Print(L["%s is now set to %s"]:format(_G[socket], link)) @@ -128,7 +119,7 @@ end local function setColor(info, r, g, b) local color = db.global[info[#info]] color:SetRGB(r, g, b) - clearCache() + RatingBuster:ClearCache() end ColorPickerFrame:SetMovable(true) @@ -163,8 +154,8 @@ local options = { name = "Debug", desc = "Toggle debugging", func = function() - RatingBuster:ToggleDebugging() - StatLogic:ToggleDebugging() + RatingBuster:ClearCache() + StatLogic:ClearCache() end, dialogHidden = true, }, @@ -1101,7 +1092,7 @@ local options = { set = function(info, v) local db = RatingBuster.db:GetNamespace("AlwaysBuffed") db.profile[info[#info]] = v - clearCache() + RatingBuster:ClearCache() StatLogic:InvalidateEvent("UNIT_AURA", "player") end, args = { @@ -1685,7 +1676,7 @@ PLAYER_LOGIN - Most information about the game world should now be available to } --]] -- OnInitialize(name) called at ADDON_LOADED -function RatingBuster:RefreshConfig() +function RatingBuster:ClearCache() wipe(cache) end @@ -1696,9 +1687,9 @@ end function RatingBuster:InitializeDatabase() RatingBuster.db = LibStub("AceDB-3.0"):New("RatingBusterDB", defaults, class) - RatingBuster.db.RegisterCallback(RatingBuster, "OnProfileChanged", "RefreshConfig") - RatingBuster.db.RegisterCallback(RatingBuster, "OnProfileCopied", "RefreshConfig") - RatingBuster.db.RegisterCallback(RatingBuster, "OnProfileReset", "RefreshConfig") + RatingBuster.db.RegisterCallback(RatingBuster, "OnProfileChanged", "ClearCache") + RatingBuster.db.RegisterCallback(RatingBuster, "OnProfileCopied", "ClearCache") + RatingBuster.db.RegisterCallback(RatingBuster, "OnProfileReset", "ClearCache") db = RatingBuster.db options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(RatingBuster.db) @@ -1750,7 +1741,7 @@ function RatingBuster:OnEnable() -- for setting a new level self:RegisterEvent("PLAYER_LEVEL_UP") -- Events that require cache clearing - self:RegisterEvent("CHARACTER_POINTS_CHANGED", clearCache) -- talent point changed + self:RegisterEvent("CHARACTER_POINTS_CHANGED", RatingBuster.ClearCache) -- talent point changed self:RegisterBucketEvent("UNIT_AURA", 1) -- fire at most once every 1 second end @@ -1762,14 +1753,14 @@ end -- arg1 = New player level function RatingBuster:PLAYER_LEVEL_UP(_, newlevel) playerLevel = newlevel - clearCache() + RatingBuster:ClearCache() end -- event = UNIT_AURA -- arg1 = List of UnitIDs in the AceBucket interval function RatingBuster:UNIT_AURA(units) if units.player then - clearCache() + RatingBuster:ClearCache() end end diff --git a/libs/StatLogic/Cata_Logic.lua b/libs/StatLogic/Cata_Logic.lua index 070c9cc..5b00e91 100644 --- a/libs/StatLogic/Cata_Logic.lua +++ b/libs/StatLogic/Cata_Logic.lua @@ -2466,35 +2466,35 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 53646, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Shaman: Totemic Wrath - Buff: 77747 -- 4.0.1: Spell Power increased by 10%. { ["value"] = 0.1, ["aura"] = 77747, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Shaman: Flametongue Totem - Buff: 52109 -- 4.0.1: Spell Power increased by 6%. { ["value"] = 0.06, ["aura"] = 52109, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Mage: Arcane Brilliance - Buff: 79058 -- 4.0.1: Spell Power increased by 6%. { ["value"] = 0.06, ["aura"] = 79058, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Mage: Dalaran Brilliance - Buff: 61316 -- 4.0.1: Spell Power increased by 6%. { ["value"] = 0.06, ["aura"] = 61316, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, }, ["MOD_HEALING"] = { @@ -2503,35 +2503,35 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 53646, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Shaman: Totemic Wrath - Buff: 77747 -- 4.0.1: Spell Power increased by 10%. { ["value"] = 0.1, ["aura"] = 77747, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Shaman: Flametongue Totem - Buff: 52109 -- 4.0.1: Spell Power increased by 6%. { ["value"] = 0.06, ["aura"] = 52109, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Mage: Arcane Brilliance - Buff: 79058 -- 4.0.1: Spell Power increased by 6%. { ["value"] = 0.06, ["aura"] = 79058, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, -- Mage: Dalaran Brilliance - Buff: 61316 -- 4.0.1: Spell Power increased by 6%. { ["value"] = 0.06, ["aura"] = 61316, - ["group"] = addon.BuffGroup.SpellPower, + ["group"] = addon.ExclusiveGroup.SpellPower, }, }, ["MOD_ARMOR"] = { @@ -2554,7 +2554,7 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 19506, - ["group"] = addon.BuffGroup.AttackPower, + ["group"] = addon.ExclusiveGroup.AttackPower, }, -- Death Knight: Abomination's Might - Buff: 55972 -- 4.0.1: Attack power increased by 5/10%. @@ -2563,7 +2563,7 @@ StatLogic.StatModTable["ALL"] = { 0.05, 0.1, }, ["aura"] = 55972, - ["group"] = addon.BuffGroup.AttackPower, + ["group"] = addon.ExclusiveGroup.AttackPower, }, -- Shaman: Unleashed Rage - Buff: 30809 -- 4.0.1: Melee attack power increased by 4/7/10%. @@ -2572,14 +2572,14 @@ StatLogic.StatModTable["ALL"] = { 0.04, 0.07, 0.1, }, ["aura"] = 30809, - ["group"] = addon.BuffGroup.AttackPower, + ["group"] = addon.ExclusiveGroup.AttackPower, }, -- Paladin: Blessing of Might - Buff: 19740 -- 4.0.1: Increasing attack power by 10%. { ["value"] = 0.1, ["aura"] = 19740, - ["group"] = addon.BuffGroup.AttackPower, + ["group"] = addon.ExclusiveGroup.AttackPower, }, }, ["MOD_MANA"] = { @@ -2614,28 +2614,28 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.05, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Druid: Mark of the Wild - Buff: 79061 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 79061, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Hunter: Embrace of the Shale Spider - Buff: 90363 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 90363, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff: 69378 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%. { ["value"] = 0.04, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_AGI"] = { @@ -2644,28 +2644,28 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.05, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Druid: Mark of the Wild - Buff: 79061 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 79061, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Hunter: Embrace of the Shale Spider - Buff: 90363 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 90363, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff: 69378 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%. { ["value"] = 0.04, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_STA"] = { @@ -2674,28 +2674,28 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.05, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Druid: Mark of the Wild - Buff: 79061 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 79061, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Hunter: Embrace of the Shale Spider - Buff: 90363 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 90363, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff: 69378 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%. { ["value"] = 0.04, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_INT"] = { @@ -2704,28 +2704,28 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.05, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Druid: Mark of the Wild - Buff: 79061 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 79061, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Hunter: Embrace of the Shale Spider - Buff: 90363 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 5%. { ["value"] = 0.05, ["aura"] = 90363, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff: 69378 -- 4.0.1: Strength, Agility, Stamina, and Intellect increased by 4%. { ["value"] = 0.04, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_SPI"] = { @@ -2896,7 +2896,7 @@ function StatLogic:GetDodgePerAgi() -- Talents that modify Agi will not add to posBuff, so we need to calculate baseAgi -- But Agi from Kings etc. will add to posBuff, so we subtract those if present for _, case in ipairs(StatLogic.StatModTable["ALL"]["MOD_AGI"]) do - if case.group == addon.BuffGroup.AllStats then + if case.group == addon.ExclusiveGroup.AllStats then if StatLogic:GetAuraInfo(case.aura) then modAgi = modAgi - case.value end diff --git a/libs/StatLogic/StatLogic.lua b/libs/StatLogic/StatLogic.lua index f1ffd8b..3882b06 100644 --- a/libs/StatLogic/StatLogic.lua +++ b/libs/StatLogic/StatLogic.lua @@ -245,7 +245,7 @@ setmetatable(cache, {__mode = "kv"}) -- weak table to enable garbage collection -- Set Debugging -- ------------------- local DEBUG = false -function StatLogic:ToggleDebugging() +function StatLogic:ClearCache() DEBUG = not DEBUG wipe(cache) end @@ -971,6 +971,16 @@ addon.StatModValidators = { ["PLAYER_LEVEL_UP"] = true, }, }, + rune = { + validate = function(case) + if type(case.rune) == "number" then + return C_Engraving.IsRuneEquipped(case.rune) + else + return true + end + end, + events = {} + }, set = { validate = function(case) return equipped_sets[case.set] and equipped_sets[case.set] >= case.pieces @@ -1038,6 +1048,9 @@ function StatLogic:InvalidateEvent(event, unit) -- Since stats added by weaon subclass StatMods are inserted -- directly into the cached sum, we need to wipe the item sum cache wipe(cache) + if RatingBuster then + RatingBuster:ClearCache() + end end end @@ -1154,14 +1167,15 @@ do end do - addon.BuffGroup = { + addon.ExclusiveGroup = { AllStats = 1, AttackPower = 2, SpellPower = 3, Armor = 4, Feral = 5, + WeaponRacial = 6, } - local BuffGroupCache = {} + local ExclusiveGroupCache = {} local function ApplyMod(currentValue, newValue, initialValue) if initialValue == 0 then @@ -1217,13 +1231,13 @@ do if newValue then if case.group then - local oldValue = BuffGroupCache[case.group] + local oldValue = ExclusiveGroupCache[case.group] if oldValue and newValue > oldValue then currentValue = RemoveMod(currentValue, oldValue, initialValue) end if not oldValue or newValue > oldValue then currentValue = ApplyMod(currentValue, newValue, initialValue) - BuffGroupCache[case.group] = newValue + ExclusiveGroupCache[case.group] = newValue end else currentValue = ApplyMod(currentValue, newValue, initialValue) @@ -1244,7 +1258,7 @@ do end if not value then - wipe(BuffGroupCache) + wipe(ExclusiveGroupCache) local statModInfo = StatLogic.StatModInfo[statModName] if not statModInfo then return 0 end value = statModInfo.initialValue diff --git a/libs/StatLogic/TBC_Logic.lua b/libs/StatLogic/TBC_Logic.lua index 4a950f2..6a3f3e7 100644 --- a/libs/StatLogic/TBC_Logic.lua +++ b/libs/StatLogic/TBC_Logic.lua @@ -223,25 +223,25 @@ if addon.class == "DRUID" then { ["value"] = 1, ["aura"] = 768, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Bear Form { ["value"] = 1, ["aura"] = 5487, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Dire Bear Form { ["value"] = 1, ["aura"] = 9634, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Moonkin Form { ["value"] = 1, ["aura"] = 24858, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, }, ["ADD_AP_MOD_STR"] = { @@ -1706,7 +1706,7 @@ StatLogic.StatModTable["ALL"] = { 0.08, 0.16, 0.25, }, ["aura"] = 15363, - ["group"] = addon.BuffGroup.Armor, + ["group"] = addon.ExclusiveGroup.Armor, }, -- Shaman: Ancestral Fortitude (Rank 1/2/3) - Buff -- Increases your armor value by 8%/16%/25%. @@ -1715,7 +1715,7 @@ StatLogic.StatModTable["ALL"] = { 0.08, 0.16, 0.25, }, ["aura"] = 16237, - ["group"] = addon.BuffGroup.Armor, + ["group"] = addon.ExclusiveGroup.Armor, }, }, ["MOD_STR"] = { @@ -1724,14 +1724,14 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Kings - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_AGI"] = { diff --git a/libs/StatLogic/Vanilla_Logic.lua b/libs/StatLogic/Vanilla_Logic.lua index 1778020..676b84e 100644 --- a/libs/StatLogic/Vanilla_Logic.lua +++ b/libs/StatLogic/Vanilla_Logic.lua @@ -185,19 +185,19 @@ if addon.class == "DRUID" then { ["value"] = 1, ["aura"] = 768, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Bear Form { ["value"] = 1, ["aura"] = 5487, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Dire Bear Form { ["value"] = 1, ["aura"] = 9634, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, }, ["ADD_AP_MOD_STR"] = { @@ -1527,7 +1527,8 @@ if addon.playerRace == "Dwarf" then ["value"] = 5, ["weapon"] = { [Enum.ItemWeaponSubclass.Guns] = true, - } + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, } }, } @@ -1578,7 +1579,8 @@ elseif addon.playerRace == "Human" then [Enum.ItemWeaponSubclass.Mace2H] = true, [Enum.ItemWeaponSubclass.Sword1H] = true, [Enum.ItemWeaponSubclass.Sword2H] = true, - } + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, } } } @@ -1590,7 +1592,8 @@ elseif addon.playerRace == "Orc" then ["weapon"] = { [Enum.ItemWeaponSubclass.Axe1H] = true, [Enum.ItemWeaponSubclass.Axe2H] = true, - } + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, } } } @@ -1617,7 +1620,8 @@ elseif addon.playerRace == "Troll" then ["weapon"] = { [Enum.ItemWeaponSubclass.Bows] = true, [Enum.ItemWeaponSubclass.Thrown] = true, - } + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, } } } @@ -1656,7 +1660,7 @@ StatLogic.StatModTable["ALL"] = { 0.08, 0.16, 0.25, }, ["aura"] = 15363, - ["group"] = addon.BuffGroup.Armor, + ["group"] = addon.ExclusiveGroup.Armor, }, -- Shaman: Ancestral Fortitude (Rank 1/2/3) - Buff -- Increases your armor value by 8%/16%/25%. @@ -1665,7 +1669,7 @@ StatLogic.StatModTable["ALL"] = { 0.08, 0.16, 0.25, }, ["aura"] = 16237, - ["group"] = addon.BuffGroup.Armor, + ["group"] = addon.ExclusiveGroup.Armor, ["spellid"] = 16240, }, }, @@ -1675,21 +1679,21 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Kings - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Heart of the Lion - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 409583, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, ["rune"] = true, }, -- Buff: Fervor of the Temple Explorer @@ -1705,21 +1709,21 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Kings - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Heart of the Lion - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 409583, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, ["rune"] = true, }, -- Buff: Fervor of the Temple Explorer @@ -1735,21 +1739,21 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Kings - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Heart of the Lion - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 409583, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, ["rune"] = true, }, -- Buff: Fervor of the Temple Explorer @@ -1765,21 +1769,21 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Kings - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Heart of the Lion - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 409583, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, ["rune"] = true, }, -- Buff: Fervor of the Temple Explorer @@ -1795,21 +1799,21 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Kings - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Heart of the Lion - Buff -- Increases stats by 10%. { ["value"] = 0.1, ["aura"] = 409583, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, ["rune"] = true, }, -- Buff: Fervor of the Temple Explorer @@ -1949,6 +1953,78 @@ StatLogic.StatModTable["ALL"] = { ["value"] = 1, }, }, + [StatLogic.Stats.WeaponSkill] = { + -- Rune: Sword Specialization + { + ["rune"] = 51232, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Sword1H] = true, + [Enum.ItemWeaponSubclass.Sword2H] = true, + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, + }, + -- Rune: Axe Specialization + { + ["rune"] = 51233, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Axe1H] = true, + [Enum.ItemWeaponSubclass.Axe2H] = true, + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, + }, + -- Rune: Mace Specialization + { + ["rune"] = 51234, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Mace1H] = true, + [Enum.ItemWeaponSubclass.Mace2H] = true, + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, + }, + -- Rune: Dagger Specialization + { + ["rune"] = 51235, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Dagger] = true, + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, + }, + -- Rune: Fist Weapon Specialization + { + ["rune"] = 51236, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Unarmed] = true, + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, + }, + -- Rune: Ranged Weapon Specialization + { + ["rune"] = 51237, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Bows] = true, + [Enum.ItemWeaponSubclass.Guns] = true, + [Enum.ItemWeaponSubclass.Crossbow] = true, + [Enum.ItemWeaponSubclass.Thrown] = true, + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, + }, + -- Rune: Pole Weapon Specialization + { + ["rune"] = 51238, + ["value"] = 5, + ["weapon"] = { + [Enum.ItemWeaponSubclass.Staff] = true, + [Enum.ItemWeaponSubclass.Polearm] = true, + }, + ["group"] = addon.ExclusiveGroup.WeaponRacial, + }, + }, ["ADD_SPELL_CRIT"] = { -- Buff: Moonkin Aura { diff --git a/libs/StatLogic/Wrath_Logic.lua b/libs/StatLogic/Wrath_Logic.lua index 319c1c0..6eb1df5 100644 --- a/libs/StatLogic/Wrath_Logic.lua +++ b/libs/StatLogic/Wrath_Logic.lua @@ -1014,25 +1014,25 @@ if addon.class == "DRUID" then { ["value"] = 1, ["aura"] = 768, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Bear Form { ["value"] = 1, ["aura"] = 5487, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Dire Bear Form { ["value"] = 1, ["aura"] = 9634, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, -- Moonkin Form { ["value"] = 1, ["aura"] = 24858, - ["group"] = addon.BuffGroup.Feral, + ["group"] = addon.ExclusiveGroup.Feral, }, }, ["ADD_AP_MOD_STR"] = { @@ -3117,7 +3117,7 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 19506, - ["group"] = addon.BuffGroup.AttackPower, + ["group"] = addon.ExclusiveGroup.AttackPower, }, -- Death Knight: Abomination's Might - Buff -- Attack power increased by 5/10%. @@ -3126,7 +3126,7 @@ StatLogic.StatModTable["ALL"] = { 0.05, 0.1, }, ["aura"] = 53138, - ["group"] = addon.BuffGroup.AttackPower, + ["group"] = addon.ExclusiveGroup.AttackPower, }, -- Shaman: Unleashed Rage - Buff -- Melee attack power increased by 4/7/10%. @@ -3135,7 +3135,7 @@ StatLogic.StatModTable["ALL"] = { 0.04, 0.07, 0.1, }, ["aura"] = 30809, - ["group"] = addon.BuffGroup.AttackPower, + ["group"] = addon.ExclusiveGroup.AttackPower, }, }, -- MetaGem: Beaming Earthsiege Diamond - 41389 @@ -3152,31 +3152,31 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Blessing of Sanctuary { ["value"] = 0.1, ["aura"] = 20911, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Sanctuary { ["value"] = 0.1, ["aura"] = 25899, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff -- Increases stats by 8%. { ["value"] = 0.08, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_AGI"] = { @@ -3185,19 +3185,19 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff -- Increases stats by 8%. { ["value"] = 0.08, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_STA"] = { @@ -3206,31 +3206,31 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Blessing of Sanctuary { ["value"] = 0.1, ["aura"] = 20911, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Greater Blessing of Sanctuary { ["value"] = 0.1, ["aura"] = 25899, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff -- Increases stats by 8%. { ["value"] = 0.08, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["MOD_INT"] = { @@ -3239,19 +3239,19 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff -- Increases stats by 8%. { ["value"] = 0.08, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- MetaGem: Ember Skyfire Diamond - 35503 -- +14 Spell Power and +2% Intellect @@ -3272,19 +3272,19 @@ StatLogic.StatModTable["ALL"] = { { ["value"] = 0.1, ["aura"] = 20217, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, { ["value"] = 0.1, ["aura"] = 25898, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, -- Leatherworking: Blessing of Forgotten Kings - Buff -- Increases stats by 8%. { ["value"] = 0.08, ["aura"] = 69378, - ["group"] = addon.BuffGroup.AllStats, + ["group"] = addon.ExclusiveGroup.AllStats, }, }, ["ADD_DODGE_REDUCTION_MOD_EXPERTISE"] = { @@ -3493,7 +3493,7 @@ function StatLogic:GetDodgePerAgi() -- Talents that modify Agi will not add to posBuff, so we need to calculate baseAgi -- But Agi from Kings etc. will add to posBuff, so we subtract those if present for _, case in ipairs(StatLogic.StatModTable["ALL"]["MOD_AGI"]) do - if case.group == addon.BuffGroup.AllStats then + if case.group == addon.ExclusiveGroup.AllStats then if StatLogic:GetAuraInfo(case.aura) then modAgi = modAgi - case.value end