Skip to content
Draft
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
4 changes: 2 additions & 2 deletions Modules/Config/MeleeSection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function _Config:LoadMeleeSection()
desc = function() return i18n("Shows/Hides the expertise value.") end,
width = 1.5,
hidden = function()
return (not ECS.IsWotlk)
return (not (ECS.IsWotlk or ECS.IsSoD))
end,
disabled = function() return (not ExtendedCharacterStats.profile.melee.display); end,
get = function () return ExtendedCharacterStats.profile.melee.expertise.display; end,
Expand Down Expand Up @@ -383,4 +383,4 @@ function _Config:LoadMeleeSection()
},
},
}
end
end
45 changes: 36 additions & 9 deletions Modules/Data/Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,35 @@ Data.WARLOCK = 9
Data.DRUID = 11

Data.setNames = {
AUGURS_REGALIA = "Augur's Regalia",
BATTLEGEAR_OF_MIGHT = "Battlegear of Might",
BONESCYTHE_LEATHERS = "Bonescythe Leathers",
DREAMWALKER_GUARDIAN = "Dreamwalker Guardian",
DREADNOUGHTS_BATTLEGEAR = "Dreadnought's Battlegear",
FREETHINKERS_ARMOR = "Freethinker's Armor",
HARUSPEXS_GARB = "Haruspex's Garb",
PLAGUEHEART_STITCHINGS = "Plagueheart Stitchings",
REDEMPTION_BULWARK = "Redemption Bulwark",
STORMRAGE_RAIMENT = "Stormrage Raiment",
VESTMENTS_OF_TRANSCENDENCE = "Vestments of Transcendence",
SYMBOLS_OF_UNENDING_LIFE = "Symbols of Unending Life",
TEN_STORMS = "The Ten Storms",
THE_EARTHSHATTERER = "The Earthshatterer",
HARUSPEXS_GARB = "Haruspex's Garb",
AUGURS_REGALIA = "Augur's Regalia",
FREETHINKERS_ARMOR = "Freethinker's Armor"
THE_EARTHSHATTERER_RESOLVE = "The Earthshatterer Resolve",
VESTMENTS_OF_TRANSCENDENCE = "Vestments of Transcendence",
}

Data.enchantIds = {
ANIMALISTIC_EXPERTISE = "7875", -- Your melee attacks have 5% less chance to be Dodged or Parried.
BIZNICK_SCOPE = "2523", -- 3% Hit from Biznicks 247x128 Accurascope
BRACER_MANA_REGENERATION = "2565", -- 4 MP5 on bracer
PROPHETIC_AURA = "2590", -- 4 MP5 for priest ZG Enchant
RESILIENCE_OF_THE_SCOURGE = "2715", -- 4 MP5 for priest ZG Enchant
INSCRIPTION_OF_FAITH = "2980", -- 4 MP5 from aldor enchant
GLYPH_OF_RENEWAL = "3001", -- 7 MP5 from Honor Hold/Thrallmar enchant
RESTORE_MANA_PRIME = "3150", -- 6 MP5 on chest
BRILLIANT_MANA_OIL = "2629", -- 12 MP5
GLYPH_OF_RENEWAL = "3001", -- 7 MP5 from Honor Hold/Thrallmar enchant
INSCRIPTION_OF_FAITH = "2980", -- 4 MP5 from aldor enchant
LESSER_MANA_OIL = "2625", -- 8 MP5
MINOR_MANA_OIL = "2624", -- 4 MP5
PROPHETIC_AURA = "2590", -- 4 MP5 for priest ZG Enchant
RESILIENCE_OF_THE_SCOURGE = "2715", -- 5 MP5 Sapphiron shoulder enchant
RESTORE_MANA_PRIME = "3150", -- 6 MP5 on chest
}

Data.gemIds = {
Expand All @@ -50,3 +58,22 @@ Data.gemIds = {
TWO_MP5_GEMS = {"30589", "32225", "24065", "30594", "31865", "32214", "30606", "23121", "24057", "32216", "30603", "30560", "30550"},
ONE_MP5_GEMS = {"23106", "31864", "28465", "23109"}
}

Data.itemsIds = {
INCREASED_EXPERTISE_1 = {233585, 234650, 233397, 233693, 233692, 233401, 233689, 236130, 236056, 236022, 233635, 237512, 236034, 236032, 236030, 236023, 236039, 236038, 236036, 236035, 236037,
236026, 236031, 236033, 236029, 236040, 235888, 233651, 233658, 233376, 236051, 236055, 236052, 236050, 236054, 233634, 234984, 233659, 233662, 233663, 233661, 234748, 236020, 236012, 236005,
236010, 236019, 236007, 236016, 236006, 236008, 236009, 236011, 236021, 236209, 236201, 236206, 236215, 236205, 236204, 236203, 236208, 236211, 236212, 236218, 236202, 236210, 236171, 236172,
236175, 236174, 236170, 233637, 233582, 233711, 233412, 233413, 233415, 236222, 236309, 233579, 233618, 236339, 237275, 236260, 236319, 233992, 236139, 236207, 233642, 236304, 236262, 233612,
236125, 236133, 236141, 236137, 236138, 236129, 236128, 236136, 236135, 236140, 236124, 236134, 236013, 233600, 233442, 235005, 236216, 236176, 236311, 233699, 233700, 233668, 233665, 233666,
236306, 236341, 236293, 236263, 236255
},
INCREASED_EXPERTISE_2 = {233640, 234985, 236300, 233614},
TIMEWORN = {234146, 234147, 233564, 233561, 233617, 234148, 234149, 233644, 234075, 234150, 233559, 233618, 233645, 233522, 233563, 233567, 233566, 233560, 233619, 233520, 233521, 233523, 233568,
234098, 234099, 234100, 234102, 233578, 233582, 233579, 235047, 233646, 233574, 233583, 233573, 233575, 233584, 233577, 234090, 234093, 234094, 234095, 234091, 233635, 233631, 233633, 233637,
233632, 234156, 234157, 233611, 233612, 233614, 233613, 233623, 233622, 233590, 233592, 233593, 233594, 233595, 233591, 234069, 234068, 234070, 234071, 234072, 234064, 234063, 234065, 234066,
234062, 234161, 234162, 234163, 234164, 234165, 234166, 234078, 234123, 234073, 234081, 234120, 234088, 234082, 234087, 234084, 234077, 234117, 234103, 234105, 234106, 234107, 234108, 234109,
234110, 234111, 234114, 233625, 233624, 233607, 233610, 233608, 234167, 234168, 234171, 233496, 233506, 233518, 233517, 233514, 233516, 233505, 233604, 233603, 233598, 234174, 234962, 234173,
234963
},
TIMEWORN_EXPERTISE = {234018, 234022, 234027, 234031, 234035}
}
10 changes: 5 additions & 5 deletions Modules/Data/DataUtils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ function DataUtils:GetEnchantForEquipSlot(equipSlot)
end

---@param itemLink ItemLink
---@return number|nil
---@return string|nil
function DataUtils:GetEnchantFromItemLink(itemLink)
if itemLink then
local _, itemStringLink = GetItemInfo(itemLink)
if itemStringLink then
local _, _, enchant = string.find(itemStringLink, "item:%d+:(%d*)")
local _, _, enchant, _ = strsplit(":", itemStringLink, 4)
return enchant
end
end
Expand All @@ -110,17 +110,17 @@ function DataUtils.GetRuneForEquipSlot(equipSlot)
end

---@param itemLink ItemLink
---@return (number, number, number) | nil
---@return (string, string, string) | nil
function DataUtils:GetSocketedGemsFromItemLink(itemLink)
if itemLink then
local _, itemStringLink = GetItemInfo(itemLink)
if itemStringLink then
local _, _, gem1, gem2, gem3 = string.find(itemStringLink, "item:%d*:%d*:(%d*):(%d*):(%d*)")
local _, _, gem1, gem2, gem3, _ = strsplit(":", itemStringLink, 6)
return gem1, gem2, gem3
end
end

return nil
end

return DataUtils
return DataUtils
161 changes: 127 additions & 34 deletions Modules/Data/ItemSets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ local _, _, classId = UnitClass("player")
local setNames = Data.setNames

local itemSets = {
[setNames.AUGURS_REGALIA] = {
[19609] = true,
[19828] = true,
[19829] = true,
[19830] = true,
[19956] = true
},
[setNames.BATTLEGEAR_OF_MIGHT] = {
[16861] = true,
[16862] = true,
Expand All @@ -15,6 +22,75 @@ local itemSets = {
[16867] = true,
[16868] = true
},
[setNames.BONESCYTHE_LEATHERS] = {
[236032] = true,
[236033] = true,
[236034] = true,
[236035] = true,
[236036] = true,
[236037] = true,
[236038] = true,
[236039] = true,
[236040] = true
},
[setNames.DREADNOUGHTS_BATTLEGEAR] = {
[236005] = true,
[246006] = true,
[236007] = true,
[236008] = true,
[236009] = true,
[236010] = true,
[236011] = true,
[236012] = true,
[236013] = true
},
[setNames.DREAMWALKER_GUARDIAN] = {
[236201] = true,
[236202] = true,
[236203] = true,
[236204] = true,
[236205] = true,
[236206] = true,
[236207] = true,
[236208] = true,
[236209] = true
},
[setNames.FREETHINKERS_ARMOR] = {
[19588] = true,
[19825] = true,
[19826] = true,
[19827] = true,
[19952] = true
},
[setNames.HARUSPEXS_GARB] = {
[19613] = true,
[19838] = true,
[19839] = true,
[19840] = true,
[19955] = true
},
[setNames.PLAGUEHEART_STITCHINGS] = {
[236068] = true,
[236069] = true,
[236070] = true,
[236071] = true,
[236072] = true,
[236073] = true,
[236074] = true,
[236075] = true,
[236076] = true
},
[setNames.REDEMPTION_BULWARK] = {
[236133] = true,
[236134] = true,
[236135] = true,
[236136] = true,
[236137] = true,
[236138] = true,
[236139] = true,
[236140] = true,
[236141] = true
},
[setNames.STORMRAGE_RAIMENT] = {
[16899] = true,
[16900] = true,
Expand All @@ -25,15 +101,10 @@ local itemSets = {
[16897] = true,
[16898] = true
},
[setNames.VESTMENTS_OF_TRANSCENDENCE] = {
[16919] = true,
[16920] = true,
[16921] = true,
[16922] = true,
[16923] = true,
[16924] = true,
[16925] = true,
[16926] = true
[setNames.SYMBOLS_OF_UNENDING_LIFE] = {
[233417] = true,
[233418] = true,
[233419] = true
},
[setNames.TEN_STORMS] = {
[16943] = true,
Expand All @@ -46,39 +117,61 @@ local itemSets = {
[16950] = true
},
[setNames.THE_EARTHSHATTERER] = {
[22468] = true,
[22470] = true,
[22469] = true,
[22466] = true,
[22464] = true,
[22465] = true,
[22466] = true,
[22467] = true,
[22464] = true,
[22468] = true,
[22469] = true,
[22470] = true,
[22471] = true,
[23065] = true
},
[setNames.HARUSPEXS_GARB] = {
[19613] = true,
[19838] = true,
[19839] = true,
[19840] = true,
[19955] = true
[setNames.THE_EARTHSHATTERERS_RESOLVE] = {
[236160] = true,
[236162] = true,
[236163] = true,
[236164] = true,
[236165] = true,
[236166] = true,
[236167] = true,
[236168] = true,
[236169] = true
},
[setNames.AUGURS_REGALIA] = {
[19609] = true,
[19828] = true,
[19829] = true,
[19830] = true,
[19956] = true
},
[setNames.FREETHINKERS_ARMOR] = {
[19588] = true,
[19825] = true,
[19826] = true,
[19827] = true,
[19952] = true
[setNames.VESTMENTS_OF_TRANSCENDENCE] = {
[16919] = true,
[16920] = true,
[16921] = true,
[16922] = true,
[16923] = true,
[16924] = true,
[16925] = true,
[16926] = true
},
}

function Data:HasSetBonusIncreasedExpertise2()
if classId == Data.WARRIOR then
return Data:IsSetBonusActive(setNames.DREADNOUGHTS_BATTLEGEAR, 2)
elseif classId == Data.DRUID then
return Data:IsSetBonusActive(setNames.DREAMWALKER_GUARDIAN, 2)
elseif classId == Data.SHAMAN then
return Data:IsSetBonusActive(setNames.THE_EARTHSHATTERERS_RESOLVE, 2)
elseif classId == Data.PALADIN then
return Data:IsSetBonusActive(setNames.REDEMPTION_BULWARK, 2)
elseif classId == Data.ROGUE then
return Data:IsSetBonusActive(setNames.BONESCYTHE_LEATHERS, 2)
elseif classId == Data.WARLOCK then
return Data:IsSetBonusActive(setNames.PLAGUEHEART_STITCHINGS, 2)
end
end

function Data:HasSetBonusIncreasedExpertise5()
if classId == Data.DRUID then
return Data:IsSetBonusActive(setNames.SYMBOLS_OF_UNENDING_LIFE, 3)
end
end

function Data:HasSetBonusModifierMP5()
if classId == Data.PRIEST then
return Data:IsSetBonusActive(setNames.VESTMENTS_OF_TRANSCENDENCE, 3)
Expand Down Expand Up @@ -126,4 +219,4 @@ function Data:IsSetBonusActive(setName, bonusLevel)
end
end
return (equippedPieces >= bonusLevel)
end
end
47 changes: 46 additions & 1 deletion Modules/Data/Melee.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,52 @@ end
---@return number
function Data:GetExpertise()
local expertise, _ = GetExpertise()

if ECS.IsSoD then
for _, itemId in pairs(Data.itemsIds.INCREASED_EXPERTISE_2) do
if C_Item.IsEquippedItem(itemId) then
expertise = expertise + 2
end
end

for _, itemId in pairs(Data.itemsIds.INCREASED_EXPERTISE_1) do
if C_Item.IsEquippedItem(itemId) then
expertise = expertise + 1
end
end

for _, itemId in pairs(Data.itemsIds.TIMEWORN_EXPERTISE) do
if C_Item.IsEquippedItem(itemId) then
for _, t in pairs(Data.itemsIds.TIMEWORN) do
if C_Item.IsEquippedItem(t) then
expertise = expertise + 1
end
end
break -- no need to check for other rings, you can have only one
end
end

if Data:HasSetBonusIncreasedExpertise2() then
expertise = expertise + 2
end

if Data:HasSetBonusIncreasedExpertise5() then
expertise = expertise + 5
end

if classId == Data.DRUID then
for i = 1, 18 do
local itemLink = GetInventoryItemLink("player", i)
if itemLink then
local enchant = DataUtils:GetEnchantFromItemLink(itemLink)
if enchant and enchant == Data.enchantIds.ANIMALISTIC_EXPERTISE then
expertise = expertise + 5
end
end
end
end
end

return DataUtils:Round(expertise, 0)
end

Expand Down Expand Up @@ -276,4 +322,3 @@ function Data:GetMeleeHasteBonus()
local hasteBonus = GetCombatRatingBonus(CR_HASTE_MELEE)
return DataUtils:Round(hasteBonus, 2) .. "%"
end

2 changes: 1 addition & 1 deletion Modules/Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ local function GetDefaultStatsProfile()
textColor = colors.ATTACK_SPEED_SECONDARY,
statColor = colors.ATTACK_SPEED_PRIMARY,
},
expertise = {display = true, isTbcOnly = true, refName = "Expertise", text = "Expertise"},
expertise = {display = true, refName = "Expertise", text = "Expertise"},
expertiseRating = {display = true, isTbcOnly = true, refName = "ExpertiseRating", text = "Expertise Rating"},
hasteRating = {
display = true,
Expand Down
Loading