Merge pull request #741 from Flamanis/TWW-Fixes

Initial changes to fix TWW issues
This commit is contained in:
Tercio Jose
2024-06-07 19:18:29 -03:00
committed by GitHub
21 changed files with 1239 additions and 21 deletions
+23 -1
View File
@@ -1283,7 +1283,29 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--consumables
if (DF.IsShadowlandsWow() or DF.IsDragonflight()) then --Temporary IsDragonFlight until I get the items together
if (DF.IsWarWow()) then
--TWW TODO Get buff ids. Current alpha on 6/6 does not have all professions fully implemented.
DF.WeaponEnchantIds = {
}
DF.FlaskIDs = {
}
DF.FoodIDs = {
--TODO Get all buffs. Current alpha on 6/6 does not have all buffs.
[457173] = 1, -- Lowest Secondary Stat +273 30min (Pan Seared Mycobloom)
[457174] = 1, -- Lowest Secondary Stat +273 15min (Skewered Filet)
}
DF.PotionIDs = {
}
DF.FeastIDs = {
}
DF.RuneIDs = {
}
elseif (DF.IsShadowlandsWow() or DF.IsDragonflight()) then --Temporary IsDragonFlight until I get the items together
DF.WeaponEnchantIds = {
[6188] = true, --shadowcore oil
[6190] = true, --embalmer's oil
+2
View File
@@ -10,6 +10,8 @@ end
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
local GetItemInfo = GetItemInfo or C_Item.GetItemInfo
local CONST_FRACTION_OF_A_SECOND = 0.01
local CONST_COOLDOWN_TYPE_OFFENSIVE = 1
+19
View File
@@ -29,6 +29,25 @@ local GetItemInfo = GetItemInfo
local GetItemStats = GetItemStats
local GetInventoryItemLink = GetInventoryItemLink
local GetSpellInfo = GetSpellInfo or function(...) local result = C_Spell.GetSpellInfo(...) if result then return result.name, nil, result.iconID end end
local GetSpellTabInfo = GetSpellTabInfo or function(index)
local skillLineInfo = C_SpellBook.GetSpellBookSkillLineInfo(index);
if skillLineInfo then
return skillLineInfo.name,
skillLineInfo.iconID,
skillLineInfo.itemIndexOffset,
skillLineInfo.numSpellBookItems,
skillLineInfo.isGuild,
skillLineInfo.offSpecID,
skillLineInfo.shouldHide,
skillLineInfo.specID;
end
end
local GetDetailedItemLevelInfo = GetDetailedItemLevelInfo or C_Item.GetDetailedItemLevelInfo
local GetSpellBookItemInfo = GetSpellBookItemInfo or C_SpellBook.GetSpellBookItemInfo
local isTimewalkWoW = function()
local _, _, _, buildInfo = GetBuildInfo()
if (buildInfo < 40000) then
+2 -2
View File
@@ -32,13 +32,13 @@ LIB_OPEN_RAID_CAN_LOAD = false
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
local isExpansion_Dragonflight = function()
if (gameVersion >= 100000) then
if (gameVersion >= 100000 and gameVersion < 110000) then
return true
end
end
--don't load if it's not retail, emergencial patch due to classic and bcc stuff not transposed yet
if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) then
if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE or not isExpansion_Dragonflight()) then
return
end
File diff suppressed because it is too large Load Diff
+1
View File
@@ -8,4 +8,5 @@
<Script file="ThingsToMantain_Wrath.lua" />
<Script file="ThingsToMantain_Era.lua" />
<Script file="ThingsToMantain_Cata.lua" />
<Script file="ThingsToMantain_TheWarWithin.lua" />
</Ui>
+11
View File
@@ -171,6 +171,17 @@
--aura scanner
Details222.AuraScan = {}
local GetSpellInfo = GetSpellInfo or C_Spell.GetSpellInfo
Details222.GetSpellInfo = GetSpellInfo
if (DetailsFramework.IsWarWow()) then
Details222.GetSpellInfo = function(...)
local result = GetSpellInfo(...)
if result then
return result.name, 1, result.iconID
end
end
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--initialization stuff
local _
+1 -1
View File
@@ -36,7 +36,7 @@
local IsInRaid = IsInRaid --api local
local IsInGroup = IsInGroup --api local
local GetSpellInfo = GetSpellInfo --api local
local GetSpellInfo = Details222.GetSpellInfo --api local
local _GetSpellInfo = Details.getspellinfo --details api
local stringReplace = Details.string.replace --details api
+1 -1
View File
@@ -20,7 +20,7 @@ local tinsert = table.insert
local _math_min = math.min
local _math_ceil = math.ceil
--api locals
local GetSpellInfo = GetSpellInfo
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = _detalhes.getspellinfo
local IsInRaid = IsInRaid
local IsInGroup = IsInGroup
+2
View File
@@ -3,6 +3,8 @@ local addonName, Details222 = ...
local Details = Details
local detailsFramework = DetailsFramework
local GetSpellInfo = Details222.GetSpellInfo
--this are the fields from spellTable that can be summed
local spellTable_FieldsToSum = {
["counter"] = true,
+8 -8
View File
@@ -1420,7 +1420,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex (target, debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
@@ -1450,7 +1450,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("party"..raidIndex.."target", debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = UnitGUID(unitCaster)
@@ -1470,7 +1470,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("playertarget", debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = UnitGUID(unitCaster)
@@ -1490,7 +1490,7 @@ function _detalhes:CatchRaidDebuffUptime(sOperationType) -- "DEBUFF_UPTIME_IN"
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("playertarget", debuffIndex, 'HARMFUL')
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = UnitGUID(unitCaster)
@@ -1534,7 +1534,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
end
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellId = _UnitAura(unitId, buffIndex, nil, "HELPFUL")
local name, _, _, _, _, _, unitCaster, _, _, spellId = C_UnitAuras.GetAuraDataByIndex(unitId, buffIndex, "HELPFUL")
if (name and unitCaster and UnitExists(unitCaster) and UnitExists(unitId) and UnitIsUnit(unitCaster, unitId)) then
_detalhes.parser:add_buff_uptime(nil, cacheGetTime, playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, 0x0, spellId, name, sOperationType)
@@ -1578,7 +1578,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
local unitId = "party" .. groupIndex
for buffIndex = 1, 41 do
if (UnitExists(unitId)) then
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = UnitBuff(unitId, buffIndex)
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = C_UnitAuras.GetAuraDataByIndex(unitId, buffIndex, 'HELPFUL')
if (auraName) then
if (UnitExists(unitCaster)) then
local bBuffIsPlacedOnTarget = Details.CreditBuffToTarget[spellId]
@@ -1621,7 +1621,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
--player it self (while in a party that isn't a raid group)
local unitId = "player"
for buffIndex = 1, 41 do
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = UnitBuff(unitId, buffIndex)
local auraName, _, _, _, _, _, unitCaster, _, _, spellId = C_UnitAuras.GetAuraDataByIndex(unitId, buffIndex, 'HELPFUL')
if (auraName) then
if (UnitExists(unitCaster)) then -- and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, unitId)
local bBuffIsPlacedOnTarget = Details.CreditBuffToTarget[spellId]
@@ -1680,7 +1680,7 @@ function _detalhes:CatchRaidBuffUptime(sOperationType)
local focus_augmentation = {}
for buffIndex = 1, 41 do
local auraName, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
local auraName, _, _, _, _, _, unitCaster, _, _, spellid = C_UnitAuras.GetAuraDataByIndex ("player", buffIndex, "HELPFUL")
if (auraName and unitCaster and UnitExists(unitCaster) and UnitIsUnit(unitCaster, "player")) then
local playerName = Details.playername
local playerGUID = UnitGUID("player")
+1 -1
View File
@@ -68,7 +68,7 @@
local debugPetname = false
local SPELLID_SANGUINE_HEAL = 226510
local sanguineActorName = GetSpellInfo(SPELLID_SANGUINE_HEAL)
local sanguineActorName = Details222.GetSpellInfo(SPELLID_SANGUINE_HEAL)
---attempt to get the owner of rogue's Akaari's Soul from Secrect Technique
+1 -1
View File
@@ -4,7 +4,7 @@ local addonName, Details222 = ...
local detailsFramework = DetailsFramework
local _
local AuraUtil, wipe, C_UnitAuras, GetSpellInfo, GetTime, UnitGUID, UnitExists = AuraUtil, table.wipe, C_UnitAuras, GetSpellInfo, GetTime, UnitGUID, UnitExists
local AuraUtil, wipe, C_UnitAuras, GetSpellInfo, GetTime, UnitGUID, UnitExists = AuraUtil, table.wipe, C_UnitAuras, Details222.GetSpellInfo, GetTime, UnitGUID, UnitExists
local AuraScan = Details222.AuraScan
AuraScan.Enabled = false
+1
View File
@@ -7,6 +7,7 @@ local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
local select = select
local floor = floor
local GetNumGroupMembers = GetNumGroupMembers
local GetSpellInfo = Details222.GetSpellInfo
local CONST_INSPECT_ACHIEVEMENT_DISTANCE = 1 --Compare Achievements, 28 yards
local CONST_SPELLBOOK_GENERAL_TABID = 1
+2
View File
@@ -1,6 +1,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Details = _G.Details
local addonName, Details222 = ...
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
local detailsFramework = DetailsFramework
@@ -26,6 +27,7 @@
local _UnitGroupRolesAssigned = detailsFramework.UnitGroupRolesAssigned
local _GetSpellInfo = Details.getspellinfo
local GetSpellInfo = Details222.GetSpellInfo
local isWOTLK = detailsFramework.IsWotLKWow()
local isERA = detailsFramework.IsClassicWow()
local isCATA = detailsFramework.IsCataWow()
@@ -6,8 +6,8 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local unpack = unpack
local GetTime = GetTime
local CreateFrame = CreateFrame
local GetSpellLink = GetSpellLink
local GetSpellInfo = GetSpellInfo
local GetSpellLink = GetSpellLink or C_Spell.GetSpellLink
local GetSpellInfo = Details222.GetSpellInfo
local _GetSpellInfo = Details.GetSpellInfo
local GameTooltip = GameTooltip
local IsShiftKeyDown = IsShiftKeyDown
+1 -1
View File
@@ -161,7 +161,7 @@ end
isReady, normalizedPercent, timeLeft, charges, minValue, maxValue, currentValue = openRaidLib.GetCooldownStatusFromCooldownInfo(cooldownInfo)
end)
if (not bRunOkay) then
local spellName = GetSpellInfo(spellId)
local spellName = Details222.GetSpellInfo(spellId)
--print("error on cooldown update:", unitName, spellName, errorText)
return
end
+3
View File
@@ -1,7 +1,10 @@
local Details = _G.Details
local addonName, Details222 = ...
local L = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local GetSpellInfo = Details222.GetSpellInfo
--default weaktable
Details.weaktable = {__mode = "v"}
+3 -1
View File
@@ -7,7 +7,6 @@ do
local rawget = rawget
local rawset = rawset
local setmetatable = setmetatable
local GetSpellInfo = GetSpellInfo
local unpack = unpack
local tinsert = table.insert
local tremove = tremove
@@ -15,6 +14,9 @@ do
--is this a timewalking exp?
local bIsClassicWow = DetailsFramework.IsClassicWow()
local bIsWarWow = DetailsFramework.IsWarWow()
local GetSpellInfo = Details222.GetSpellInfo
--default spell cache container
Details.spellcache = {}
+1 -1
View File
@@ -9,7 +9,7 @@ do
_detalhes.PotionList [spellID] = true
end
if (DetailsFramework.IsDragonflight()) then
if (DetailsFramework.IsDragonflight() or DetailsFramework.IsWarWow()) then
--/details generatespelllist
_detalhes.SpecSpellList = { --~spec
--Evoker Augmentation
+1 -1
View File
@@ -489,7 +489,7 @@ function Details:StartMeUp()
---@type trinketdata
local thisTrinketData = {
itemName = C_Item.GetItemNameByID(trinketTable.itemId),
spellName = GetSpellInfo(spellId) or "spell not found",
spellName = Details222.GetSpellInfo(spellId) or "spell not found",
lastActivation = 0,
lastPlayerName = "",
totalCooldownTime = 0,