From 937a6548b75fe2b7d00de0d4246dbcfde8aa5f17 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Tue, 11 Mar 2025 05:52:45 +0100 Subject: [PATCH 1/9] wip --- Modules/Data/ItemSets.lua | 90 ++++++++++++++++++++++++++++++++++++++- Modules/Data/Melee.lua | 31 ++++++++++++++ 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/Modules/Data/ItemSets.lua b/Modules/Data/ItemSets.lua index 3cd5ca8b..7bf847ec 100755 --- a/Modules/Data/ItemSets.lua +++ b/Modules/Data/ItemSets.lua @@ -77,8 +77,96 @@ local itemSets = { [19827] = true, [19952] = true }, + [setNames.DREADNOUGHTS_BATTLEGEAR] = { + [236005] = true, + [246006] = true, + [236007] = true, + [236008] = true, + [236009] = true, + [236010] = true, + [236011] = true, + [236012] = true, + [236013] = true + }, + [setNames.BONESCYTHE_LEATHERS] = { + [236032] = true, + [236033] = true, + [236034] = true, + [236035] = true, + [236036] = true, + [236037] = true, + [236038] = true, + [236039] = true, + [236040] = true + }, + [setNames.THE_EARTHSHATTERERS_RESOLVE] = { + [236160] = true, + [236162] = true, + [236163] = true, + [236164] = true, + [236165] = true, + [236166] = true, + [236167] = true, + [236168] = true, + [236169] = true + }, + [setNames.REDEMPTION_BULWARK] = { + [236133] = true, + [236134] = true, + [236135] = true, + [236136] = true, + [236137] = true, + [236138] = true, + [236139] = true, + [236140] = true, + [236141] = true + }, + [setNames.PLAGUEHEART_STITCHINGS] = { + [236068] = true, + [236069] = true, + [236070] = true, + [236071] = true, + [236072] = true, + [236073] = true, + [236074] = true, + [236075] = true, + [236076] = true + }, + [setNames.DREAMWALKER_GUARDIAN] = { + [236201] = true, + [236202] = true, + [236203] = true, + [236204] = true, + [236205] = true, + [236206] = true, + [236207] = true, + [236208] = true, + [236209] = true + }, } +function Data:HasSetBonusIncreasedExperise() + 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:HasSetBonusIncreasedSpellHit() + if classId == Data.WARLOCK then + return Data:IsSetBonusActive(setNames.PLAGUEHEART_STITCHINGS, 2) + end +end + function Data:HasSetBonusModifierMP5() if classId == Data.PRIEST then return Data:IsSetBonusActive(setNames.VESTMENTS_OF_TRANSCENDENCE, 3) @@ -126,4 +214,4 @@ function Data:IsSetBonusActive(setName, bonusLevel) end end return (equippedPieces >= bonusLevel) -end \ No newline at end of file +end diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index 0f0642c7..c8450aee 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -231,6 +231,37 @@ end ---@return number function Data:GetExpertise() local expertise, _ = GetExpertise() + + if ECS.IsSoD then + local increased_expertise_2 = {233640, 234985, 236300, 233614} + for _, itemId in pairs(increased_expertise_2) do + if C_Item.IsEquippedItem(itemId) then + expertise = expertise + 2 + end + end + + local 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} + for _, itemId in pairs(increased_expertise_1) do + if C_Item.IsEquippedItem(itemId) then + expertise = expertise + 1 + end + end + + local timeworn_expertise = {234018, 234022, 234027, 234031, 234035} + for _, itemId in pairs(timeworn_expertise) do + if C_Item.IsEquippedItem(itemId) then + expertise = expertise + 1 * timeworn + end + end + + if Data:HasSetBonusIncreasedExpertise() then + expertise = expertise + 2 + end + + if classId == Data.DRUID then + end + end + return DataUtils:Round(expertise, 0) end From f049e85c3ea4f7cdd541607455d8f3ddfee7e236 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Tue, 11 Mar 2025 05:59:24 +0100 Subject: [PATCH 2/9] wip --- Modules/Config/MeleeSection.lua | 4 ++-- Modules/Profile.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Config/MeleeSection.lua b/Modules/Config/MeleeSection.lua index d5886b77..8fe976ea 100755 --- a/Modules/Config/MeleeSection.lua +++ b/Modules/Config/MeleeSection.lua @@ -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, @@ -383,4 +383,4 @@ function _Config:LoadMeleeSection() }, }, } -end \ No newline at end of file +end diff --git a/Modules/Profile.lua b/Modules/Profile.lua index 135b301d..1d91b09c 100755 --- a/Modules/Profile.lua +++ b/Modules/Profile.lua @@ -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, From b019b4e2a2264c0524a18e9785daf13aed64c7c6 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Fri, 14 Mar 2025 02:32:51 +0100 Subject: [PATCH 3/9] wip --- Modules/Data/Melee.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index c8450aee..e17392ee 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -247,10 +247,16 @@ function Data:GetExpertise() end end + local 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} local timeworn_expertise = {234018, 234022, 234027, 234031, 234035} for _, itemId in pairs(timeworn_expertise) do if C_Item.IsEquippedItem(itemId) then - expertise = expertise + 1 * timeworn + for _, timewornItemId in pairs(timeworn) do + if C_Item.IsEquippedItem(timewornItemId) then + expertise = expertise + 1 + end + end + break end end From 8477a74940b0ff9ce51d7732d09cf2cb15ce7ac5 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 16 Mar 2025 03:15:29 +0100 Subject: [PATCH 4/9] wip --- Modules/Data/ItemSets.lua | 6 ------ Modules/Data/Melee.lua | 17 ++++++++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Modules/Data/ItemSets.lua b/Modules/Data/ItemSets.lua index 7bf847ec..67ed724b 100755 --- a/Modules/Data/ItemSets.lua +++ b/Modules/Data/ItemSets.lua @@ -161,12 +161,6 @@ function Data:HasSetBonusIncreasedExperise() end end -function Data:HasSetBonusIncreasedSpellHit() - if classId == Data.WARLOCK then - return Data:IsSetBonusActive(setNames.PLAGUEHEART_STITCHINGS, 2) - end -end - function Data:HasSetBonusModifierMP5() if classId == Data.PRIEST then return Data:IsSetBonusActive(setNames.VESTMENTS_OF_TRANSCENDENCE, 3) diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index e17392ee..2b1a5f40 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -240,14 +240,26 @@ function Data:GetExpertise() end end - local 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} + local 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 + } for _, itemId in pairs(increased_expertise_1) do if C_Item.IsEquippedItem(itemId) then expertise = expertise + 1 end end - local 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} + local 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 + } local timeworn_expertise = {234018, 234022, 234027, 234031, 234035} for _, itemId in pairs(timeworn_expertise) do if C_Item.IsEquippedItem(itemId) then @@ -313,4 +325,3 @@ function Data:GetMeleeHasteBonus() local hasteBonus = GetCombatRatingBonus(CR_HASTE_MELEE) return DataUtils:Round(hasteBonus, 2) .. "%" end - From 766c38a41baeb091bf67915d72c202e08fd9e5af Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 16 Mar 2025 19:07:30 +0100 Subject: [PATCH 5/9] wip --- Modules/Data/Constants.lua | 55 ++++++++--- Modules/Data/ItemSets.lua | 191 ++++++++++++++++++++----------------- Modules/Data/Melee.lua | 42 ++++---- 3 files changed, 161 insertions(+), 127 deletions(-) diff --git a/Modules/Data/Constants.lua b/Modules/Data/Constants.lua index 0eb541b5..f2b4553f 100755 --- a/Modules/Data/Constants.lua +++ b/Modules/Data/Constants.lua @@ -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 = { - 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 - LESSER_MANA_OIL = "2625", -- 8 MP5 - MINOR_MANA_OIL = "2624", -- 4 MP5 + 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 + 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 = { @@ -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} +} diff --git a/Modules/Data/ItemSets.lua b/Modules/Data/ItemSets.lua index 67ed724b..60e59123 100755 --- a/Modules/Data/ItemSets.lua +++ b/Modules/Data/ItemSets.lua @@ -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, @@ -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, @@ -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, @@ -46,59 +117,16 @@ 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.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.DREADNOUGHTS_BATTLEGEAR] = { - [236005] = true, - [246006] = true, - [236007] = true, - [236008] = true, - [236009] = true, - [236010] = true, - [236011] = true, - [236012] = true, - [236013] = true - }, - [setNames.BONESCYTHE_LEATHERS] = { - [236032] = true, - [236033] = true, - [236034] = true, - [236035] = true, - [236036] = true, - [236037] = true, - [236038] = true, - [236039] = true, - [236040] = true - }, [setNames.THE_EARTHSHATTERERS_RESOLVE] = { [236160] = true, [236162] = true, @@ -110,42 +138,19 @@ local itemSets = { [236168] = true, [236169] = true }, - [setNames.REDEMPTION_BULWARK] = { - [236133] = true, - [236134] = true, - [236135] = true, - [236136] = true, - [236137] = true, - [236138] = true, - [236139] = true, - [236140] = true, - [236141] = true - }, - [setNames.PLAGUEHEART_STITCHINGS] = { - [236068] = true, - [236069] = true, - [236070] = true, - [236071] = true, - [236072] = true, - [236073] = true, - [236074] = true, - [236075] = true, - [236076] = true - }, - [setNames.DREAMWALKER_GUARDIAN] = { - [236201] = true, - [236202] = true, - [236203] = true, - [236204] = true, - [236205] = true, - [236206] = true, - [236207] = true, - [236208] = true, - [236209] = true + [setNames.VESTMENTS_OF_TRANSCENDENCE] = { + [16919] = true, + [16920] = true, + [16921] = true, + [16922] = true, + [16923] = true, + [16924] = true, + [16925] = true, + [16926] = true }, } -function Data:HasSetBonusIncreasedExperise() +function Data:HasSetBonusIncreasedExpertise2() if classId == Data.WARRIOR then return Data:IsSetBonusActive(setNames.DREADNOUGHTS_BATTLEGEAR, 2) elseif classId == Data.DRUID then @@ -161,6 +166,12 @@ function Data:HasSetBonusIncreasedExperise() 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) diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index 2b1a5f40..5dfa0c92 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -233,50 +233,46 @@ function Data:GetExpertise() local expertise, _ = GetExpertise() if ECS.IsSoD then - local increased_expertise_2 = {233640, 234985, 236300, 233614} - for _, itemId in pairs(increased_expertise_2) do + for _, itemId in pairs(Data.itemsIds.INCREASED_EXPERTISE_2) do if C_Item.IsEquippedItem(itemId) then expertise = expertise + 2 end end - local 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 - } - for _, itemId in pairs(increased_expertise_1) do + for _, itemId in pairs(Data.itemsIds.INCREASED_EXPERTISE_1) do if C_Item.IsEquippedItem(itemId) then expertise = expertise + 1 end end - local 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 - } - local timeworn_expertise = {234018, 234022, 234027, 234031, 234035} - for _, itemId in pairs(timeworn_expertise) do + for _, itemId in pairs(Data.itemsIds.TIMEWORN_EXPERTISE) do if C_Item.IsEquippedItem(itemId) then - for _, timewornItemId in pairs(timeworn) do - if C_Item.IsEquippedItem(timewornItemId) then + for _, t in pairs(Data.itemsIds.TIMEWORN) do + if C_Item.IsEquippedItem(t) then expertise = expertise + 1 end end - break + break -- no need to check for other rings, you can have only one end end - if Data:HasSetBonusIncreasedExpertise() then + 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 From 5c2f5ad405f0e18fa14f9996458a6d8d19490de7 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 16 Mar 2025 19:15:16 +0100 Subject: [PATCH 6/9] wip --- Modules/Data/Constants.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Data/Constants.lua b/Modules/Data/Constants.lua index f2b4553f..d45eebb8 100755 --- a/Modules/Data/Constants.lua +++ b/Modules/Data/Constants.lua @@ -66,14 +66,14 @@ Data.itemsIds = { 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} + }, + 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} } From 28c8e583381f5eef3941343184bebe393338c2ce Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 16 Mar 2025 19:21:11 +0100 Subject: [PATCH 7/9] wip --- Modules/Data/Melee.lua | 58 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index 5dfa0c92..23b90526 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -232,40 +232,40 @@ end 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 + 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 + 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:HasSetBonusIncreasedExpertise2() then + expertise = expertise + 2 + end - if Data:HasSetBonusIncreasedExpertise5() then - expertise = expertise + 5 - end + if Data:HasSetBonusIncreasedExpertise5() then + expertise = expertise + 5 + end - if classId == Data.DRUID then - for i = 1, 18 do + if classId == Data.DRUID then + for i = 1, 18 do local itemLink = GetInventoryItemLink("player", i) if itemLink then local enchant = DataUtils:GetEnchantFromItemLink(itemLink) @@ -273,8 +273,8 @@ function Data:GetExpertise() expertise = expertise + 5 end end - end - end + end + end return DataUtils:Round(expertise, 0) end From e473553adcee810a77b2810dcc25c3ae644e0607 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 16 Mar 2025 19:34:55 +0100 Subject: [PATCH 8/9] wip --- Modules/Data/Constants.lua | 22 +++++++++++----------- Modules/Data/DataUtils.lua | 10 +++++----- Modules/Data/Melee.lua | 11 ++++++----- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Modules/Data/Constants.lua b/Modules/Data/Constants.lua index d45eebb8..c03e33df 100755 --- a/Modules/Data/Constants.lua +++ b/Modules/Data/Constants.lua @@ -39,17 +39,17 @@ Data.setNames = { } 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 - 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 + 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 + 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 = { diff --git a/Modules/Data/DataUtils.lua b/Modules/Data/DataUtils.lua index b31ff18f..f4bf34a7 100644 --- a/Modules/Data/DataUtils.lua +++ b/Modules/Data/DataUtils.lua @@ -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, _ = string.split(":", itemStringLink, 4) return enchant end end @@ -110,12 +110,12 @@ 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, _ = string.split(":", itemStringLink, 6) return gem1, gem2, gem3 end end @@ -123,4 +123,4 @@ function DataUtils:GetSocketedGemsFromItemLink(itemLink) return nil end -return DataUtils \ No newline at end of file +return DataUtils diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index 23b90526..c15cb2f5 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -266,11 +266,12 @@ function Data:GetExpertise() 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 + 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 From 0e03932445a38415fece6232eaf4373a8ce9d473 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 16 Mar 2025 19:38:00 +0100 Subject: [PATCH 9/9] wip --- Modules/Data/DataUtils.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Data/DataUtils.lua b/Modules/Data/DataUtils.lua index f4bf34a7..0e59cde8 100644 --- a/Modules/Data/DataUtils.lua +++ b/Modules/Data/DataUtils.lua @@ -88,7 +88,7 @@ function DataUtils:GetEnchantFromItemLink(itemLink) if itemLink then local _, itemStringLink = GetItemInfo(itemLink) if itemStringLink then - local _, _, enchant, _ = string.split(":", itemStringLink, 4) + local _, _, enchant, _ = strsplit(":", itemStringLink, 4) return enchant end end @@ -115,7 +115,7 @@ function DataUtils:GetSocketedGemsFromItemLink(itemLink) if itemLink then local _, itemStringLink = GetItemInfo(itemLink) if itemStringLink then - local _, _, gem1, gem2, gem3, _ = string.split(":", itemStringLink, 6) + local _, _, gem1, gem2, gem3, _ = strsplit(":", itemStringLink, 6) return gem1, gem2, gem3 end end