Work on Ascension Backport

This commit is contained in:
andrew6180
2024-05-17 15:08:08 -07:00
parent 5de2a04b8c
commit bb7e0d2c27
325 changed files with 26995 additions and 41741 deletions
-4
View File
@@ -41,10 +41,6 @@ end
--auto run frame to dispatch scrtips for some events that details! doesn't handle
local autoRunCodeEventFrame = CreateFrame("frame")
if (not detailsFramework.IsTimewalkWoW()) then
autoRunCodeEventFrame:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
end
autoRunCodeEventFrame.OnEventFunc = function(self, event)
--ignore events triggered more than once in a small time window
if (autoRunCodeEventFrame[event] and not autoRunCodeEventFrame[event]:IsCancelled()) then
+1 -17
View File
@@ -122,26 +122,10 @@ do
local UnitName = UnitName
local GetRealmName = GetRealmName
local initialSpecListOverride = {
[1455] = 251, --dk
[1456] = 577, --demon hunter
[1447] = 102, --druid
[1465] = 1467, --evoker
[1448] = 253, --hunter
[1449] = 63, --mage
[1450] = 269, --monk
[1451] = 70, --paladin
[1452] = 258, --priest
[1453] = 260, --rogue
[1444] = 262, --shaman
[1454] = 266, --warlock
[1446] = 71, --warrior
}
---@param self actor
---@param specId number
function Details:SetSpecId(specId)
self.spec = initialSpecListOverride[specId] or specId
self.spec = specId
end
---@param self details|actor
+1 -1
View File
@@ -152,7 +152,7 @@ local eventListener = Details:CreateEventListener()
eventListener:RegisterEvent("COMBAT_PLAYER_ENTER", function()
--check if can start the real time dps tracker
local bCanStartRealTimeDpsTracker = Details.use_realtimedps or (Details.combat_log.evoker_show_realtimedps and Details.playerspecid == 1473)
local bCanStartRealTimeDpsTracker = Details.use_realtimedps
if (not bCanStartRealTimeDpsTracker) then
bCanStartRealTimeDpsTracker = Details.zone_type == "arena" and Details.realtimedps_always_arena
end
-682
View File
@@ -1,682 +0,0 @@
local Details = _G.Details
local textAlpha = 0.9
local AceLocale = LibStub("AceLocale-3.0")
local L = AceLocale:GetLocale ( "Details" )
local addonName, Details222 = ...
local on_deathrecap_line_enter = function(self)
if (self.spellid) then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
Details:GameTooltipSetSpellByID (self.spellid)
self:SetBackdropColor(.3, .3, .3, .2)
GameTooltip:Show()
self.backgroundTextureOverlay:Show()
self.timeAt:SetAlpha(1)
self.sourceName:SetAlpha(1)
self.amount:SetAlpha(1)
self.lifePercent:SetAlpha(1)
end
end
local on_deathrecap_line_leave = function(self)
GameTooltip:Hide()
self:SetBackdropColor(.3, .3, .3, 0)
self.backgroundTextureOverlay:Hide()
self.timeAt:SetAlpha(textAlpha)
self.sourceName:SetAlpha(textAlpha)
self.amount:SetAlpha(textAlpha)
self.lifePercent:SetAlpha(textAlpha)
end
local create_deathrecap_line = function(parent, n)
local line = CreateFrame("frame", "DetailsDeathRecapLine" .. n, parent, "BackdropTemplate")
line:SetPoint("topleft", parent, "topleft", 10, (-24 * n) - 17)
line:SetPoint("topright", parent, "topright", -10, (-24 * n) - 17)
line:SetScript("OnEnter", on_deathrecap_line_enter)
line:SetScript("OnLeave", on_deathrecap_line_leave)
line:SetSize(300, 21)
local timeAt = line:CreateFontString(nil, "overlay", "GameFontNormal")
local backgroundTexture = line:CreateTexture(nil, "border")
local backgroundTextureOverlay = line:CreateTexture(nil, "artwork")
local spellIcon = line:CreateTexture(nil, "overlay")
local spellIconBorder = line:CreateTexture(nil, "overlay")
spellIcon:SetDrawLayer("overlay", 1)
spellIconBorder:SetDrawLayer("overlay", 2)
local sourceName = line:CreateFontString(nil, "overlay", "GameFontNormal")
local amount = line:CreateFontString(nil, "overlay", "GameFontNormal")
local lifePercent = line:CreateFontString(nil, "overlay", "GameFontNormal")
local lifeStatusBar = line:CreateTexture(nil, "border", nil, -3)
--grave icon
local graveIcon = line:CreateTexture(nil, "overlay")
graveIcon:SetTexture([[Interface\MINIMAP\POIIcons]])
graveIcon:SetTexCoord(146/256, 160/256, 0/512, 18/512)
graveIcon:SetPoint("left", line, "left", 11, 0)
graveIcon:SetSize(14, 18)
--spell icon
spellIcon:SetSize(19, 19)
spellIconBorder:SetTexture([[Interface\ENCOUNTERJOURNAL\LootTab]])
spellIconBorder:SetTexCoord(6/256, 38/256, 49/128, 81/128)
spellIconBorder:SetSize(20, 20)
spellIconBorder:SetPoint("topleft", spellIcon, "topleft", 0, 0)
--locations
timeAt:SetPoint("left", line, "left", 2, 0)
spellIcon:SetPoint("left", line, "left", 50, 0)
sourceName:SetPoint("left", line, "left", 82, 0)
amount:SetPoint("left", line, "left", 240, 0)
lifePercent:SetPoint("left", line, "left", 320, 0)
--text colors
Details.gump:SetFontColor(amount, "red")
Details.gump:SetFontColor(timeAt, "gray")
Details.gump:SetFontColor(sourceName, "yellow")
Details.gump:SetFontSize(sourceName, 10)
--text alpha
timeAt:SetAlpha(textAlpha)
sourceName:SetAlpha(textAlpha)
amount:SetAlpha(textAlpha)
lifePercent:SetAlpha(textAlpha)
--text setup
amount:SetWidth(85)
amount:SetJustifyH("right")
lifePercent:SetWidth(42)
lifePercent:SetJustifyH("right")
--life statusbar
lifeStatusBar:SetPoint("topleft", line, "topleft")
lifeStatusBar:SetPoint("bottomleft", line, "bottomleft")
lifeStatusBar:SetColorTexture(0.5, 0.5, 0.5, 0.4)
backgroundTexture:SetTexture([[Interface\AddOns\Details\images\deathrecap_background]])
backgroundTexture:SetTexCoord(0, 1, 0, 1)
backgroundTexture:SetVertexColor(.1, .1, .1, .3)
--top border
local TopFader = line:CreateTexture(nil, "border")
TopFader:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_top]])
TopFader:SetTexCoord(0, 1, 0, 1)
TopFader:SetVertexColor(.1, .1, .1, .3)
TopFader:SetPoint("bottomleft", backgroundTexture, "topleft", 0, -0)
TopFader:SetPoint("bottomright", backgroundTexture, "topright", 0, -0)
TopFader:SetHeight(32)
TopFader:Hide()
line.TopFader = TopFader
if (n == 10) then
--bottom fader
local backgroundTexture2 = line:CreateTexture(nil, "border")
backgroundTexture2:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_bottom]])
backgroundTexture2:SetTexCoord(0, 1, 0, 1)
backgroundTexture2:SetVertexColor(.1, .1, .1, .3)
backgroundTexture2:SetPoint("topleft", backgroundTexture, "bottomleft", 0, 0)
backgroundTexture2:SetPoint("topright", backgroundTexture, "bottomright", 0, 0)
backgroundTexture2:SetHeight(32)
Details.gump:SetFontSize(amount, 14)
Details.gump:SetFontSize(lifePercent, 14)
backgroundTexture:SetVertexColor(.2, .1, .1, .3)
end
backgroundTexture:SetPoint("topleft", 0, 1)
backgroundTexture:SetPoint("bottomright", 0, -1)
backgroundTexture:SetDesaturated(true)
backgroundTextureOverlay:SetTexture([[Interface\AdventureMap\AdventureMap]])
backgroundTextureOverlay:SetTexCoord(460/1024, 659/1024, 330/1024, 350/1024)
backgroundTextureOverlay:SetAllPoints()
backgroundTextureOverlay:SetDesaturated(true)
backgroundTextureOverlay:SetAlpha(0.5)
backgroundTextureOverlay:Hide()
line.timeAt = timeAt
line.spellIcon = spellIcon
line.sourceName = sourceName
line.amount = amount
line.lifePercent = lifePercent
line.backgroundTexture = backgroundTexture
line.backgroundTextureOverlay = backgroundTextureOverlay
line.graveIcon = graveIcon
line.lifeStatusBar = lifeStatusBar
if (n == 10) then
graveIcon:Show()
line.timeAt:Hide()
else
graveIcon:Hide()
end
return line
end
local OpenDetailsDeathRecapAtSegment = function(segment)
Details.OpenDetailsDeathRecap (segment, RecapID)
end
function Details.BuildDeathTableFromRecap (recapID)
local events = DeathRecap_GetEvents (recapID)
--check if it is a valid recap
if (not events or #events <= 0) then
DeathRecapFrame.Unavailable:Show()
return
end
--build an death log using details format
ArtificialDeathLog = {
{}, --deathlog events
(events [1] and events [1].timestamp) or (DeathRecapFrame and DeathRecapFrame.DeathTimeStamp) or 0, --time of death
UnitName ("player"),
select(2, UnitClass("player")),
UnitHealthMax ("player"),
"0m 0s", --formated fight time
["dead"] = true,
["last_cooldown"] = false,
["dead_at"] = 0,
n = 1
}
for i = 1, #events do
local evtData = events [i]
local spellId, spellName, texture = DeathRecapFrame_GetEventInfo ( evtData )
local ev = {
true,
spellId or 0,
evtData.amount or 0,
evtData.timestamp or 0, --?
evtData.currentHP or 0,
evtData.sourceName or "--x--x--",
evtData.absorbed or 0,
evtData.school or 0,
false,
evtData.overkill,
not spellId and {spellId, spellName, texture},
}
table.insert(ArtificialDeathLog[1], ev)
ArtificialDeathLog.n = ArtificialDeathLog.n + 1
end
return ArtificialDeathLog
end
function Details.GetDeathRecapFromChat()
local chat1 = ChatFrame1
local recapIDFromChat
if (chat1) then
local numLines = chat1:GetNumMessages()
for i = numLines, 1, -1 do
local text = chat1:GetMessageInfo (i)
if (text) then
if (text:find("Hdeath:%d")) then
local recapID = text:match ("|Hdeath:(%d+)|h")
if (recapID) then
recapIDFromChat = tonumber(recapID)
end
break
end
end
end
end
if (recapIDFromChat) then
Details.OpenDetailsDeathRecap (nil, recapIDFromChat, true)
return
end
end
function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
if (not Details.death_recap.enabled) then
if (Details.DeathRecap and Details.DeathRecap.Lines) then
for i = 1, 10 do
Details.DeathRecap.Lines [i]:Hide()
end
for i, button in ipairs(Details.DeathRecap.Segments) do
button:Hide()
end
end
return
end
--hide blizzard death recap
DeathRecapFrame.Recap1:Hide()
DeathRecapFrame.Recap2:Hide()
DeathRecapFrame.Recap3:Hide()
DeathRecapFrame.Recap4:Hide()
DeathRecapFrame.Recap5:Hide()
--create details death recap if not existant
if (not Details.DeathRecap) then
Details.DeathRecap = CreateFrame("frame", "DetailsDeathRecap", DeathRecapFrame, "BackdropTemplate")
Details.DeathRecap:SetAllPoints()
DeathRecapFrame.Title:SetText(DeathRecapFrame.Title:GetText() .. " (by Details!)")
--lines
Details.DeathRecap.Lines = {}
for i = 1, 10 do
Details.DeathRecap.Lines [i] = create_deathrecap_line (Details.DeathRecap, i)
end
--segments
Details.DeathRecap.Segments = {}
for i = 5, 1, -1 do
local segmentButton = CreateFrame("button", "DetailsDeathRecapSegmentButton" .. i, Details.DeathRecap, "BackdropTemplate")
segmentButton:SetSize(16, 20)
segmentButton:SetPoint("topright", DeathRecapFrame, "topright", (-abs(i-6) * 22) - 10, -5)
local text = segmentButton:CreateFontString(nil, "overlay", "GameFontNormal")
segmentButton.text = text
text:SetText("#" .. i)
text:SetPoint("center")
Details.gump:SetFontColor(text, "silver")
segmentButton:SetScript("OnClick", function()
OpenDetailsDeathRecapAtSegment (i)
end)
table.insert(Details.DeathRecap.Segments, i, segmentButton)
end
end
for i = 1, 10 do
Details.DeathRecap.Lines[i]:Hide()
end
--segment to use
local death = Details.tabela_vigente.last_events_tables
--see if this segment has a death for the player
local foundPlayer = false
for index = #death, 1, -1 do
if (death [index] [3] == Details.playername) then
foundPlayer = true
break
end
end
--in case a combat has been created after the player death, the death won't be at the current segment
if (not foundPlayer) then
local segmentsTable = Details:GetCombatSegments()
for i = 1, 2 do
local segment = segmentsTable [1]
if (segment and segment ~= Details.tabela_vigente) then
if (Details.tabela_vigente.start_time - 3 < segment.end_time) then
death = segment.last_events_tables
end
end
end
end
--segments
if (Details.death_recap.show_segments) then
local last_index = 0
local buttonsInUse = {}
local segmentsTable = Details:GetCombatSegments()
for i, button in ipairs(Details.DeathRecap.Segments) do
if (segmentsTable[i]) then
button:Show()
table.insert(buttonsInUse, button)
Details.gump:SetFontColor(button.text, "silver")
last_index = i
else
button:Hide()
end
end
local buttonsInUse2 = {}
for i = #buttonsInUse, 1, -1 do
table.insert(buttonsInUse2, buttonsInUse[i])
end
for i = 1, #buttonsInUse2 do
local button = buttonsInUse2 [i]
button:ClearAllPoints()
button:SetPoint("topright", DeathRecapFrame, "topright", (-i * 22) - 10, -5)
end
if (not segment) then
Details.gump:SetFontColor(Details.DeathRecap.Segments [1].text, "orange")
else
Details.gump:SetFontColor(Details.DeathRecap.Segments [segment].text, "orange")
death = segmentsTable[segment] and segmentsTable[segment].last_events_tables
end
else
for i, button in ipairs(Details.DeathRecap.Segments) do
button:Hide()
end
end
--if couldn't find the requested log from details!, so, import the log from the blizzard death recap
--or if the player cliced on the chat link for the recap
local ArtificialDeathLog
if (not death or RecapID) then
if (segment) then
--nop, the player requested a death log from details it self but the log does not exists
DeathRecapFrame.Unavailable:Show()
return
end
--get the death events from the blizzard's recap
ArtificialDeathLog = Details.BuildDeathTableFromRecap (RecapID)
end
DeathRecapFrame.Unavailable:Hide()
--get the relevance config
local relevanceTime = Details.death_recap.relevance_time
local t
if (ArtificialDeathLog) then
t = ArtificialDeathLog
else
for index = #death, 1, -1 do
if (death [index] [3] == Details.playername) then
t = death [index]
break
end
end
end
if (t) then
local events = t [1]
local timeOfDeath = t [2]
local BiggestDamageHits = {}
for i = #events, 1, -1 do
table.insert(BiggestDamageHits, events [i])
end
table.sort (BiggestDamageHits, function(t1, t2)
return t1[3] > t2[3]
end)
for i = #BiggestDamageHits, 1, -1 do
if (BiggestDamageHits [i][4] + relevanceTime < timeOfDeath) then
tremove(BiggestDamageHits, i)
end
end
--check if the event which killed the player is in the list, or addit to BiggestDamageHits
local hitKill
for i = #events, 1, -1 do
local event = events [i]
local evType = event [1]
if (type(evType) == "boolean" and evType) then
hitKill = event
break
end
end
if (hitKill) then
local haveHitKill = false
for index, t in ipairs(BiggestDamageHits) do
if (t == hitKill) then
haveHitKill = true
break
end
end
if (not haveHitKill) then
table.insert(BiggestDamageHits, 1, hitKill)
end
end
--check if there's at least 10 big events, if not fill with smaller events
if (#BiggestDamageHits < 10) then
for i = #events, 1, -1 do
local event = events [i]
local evType = event [1]
if (type(evType) == "boolean" and evType) then
local alreadyHave = false
for index, t in ipairs(BiggestDamageHits) do
if (t == event) then
alreadyHave = true
break
end
end
if (not alreadyHave) then
table.insert(BiggestDamageHits, event)
if (#BiggestDamageHits == 10) then
break
end
end
end
end
else
--cut table to show only 10 events
while (#BiggestDamageHits > 10) do
tremove(BiggestDamageHits, 11)
end
end
if (#BiggestDamageHits == 0) then
if (not fromChat) then
Details.GetDeathRecapFromChat()
return
end
end
table.sort (BiggestDamageHits, function(t1, t2)
return t1[4] > t2[4]
end)
local events = BiggestDamageHits
local maxHP = t [5]
local lineIndex = 10
--for i = #events, 1, -1 do
for i, event in ipairs(events) do
local event = events [i]
local evType = event [1]
local hp = min (floor(event [5] / maxHP * 100), 100)
local spellName, _, spellIcon = Details.GetSpellInfo(event [2])
local amount = event [3]
local eventTime = event [4]
local source = event [6]
local overkill = event [10] or 0
local customSpellInfo = event [11]
if (type(evType) == "boolean" and evType) then
local line = Details.DeathRecap.Lines [lineIndex]
if (line) then
line.timeAt:SetText(format("%.1f", eventTime - timeOfDeath) .. "s")
line.spellIcon:SetTexture(spellIcon or customSpellInfo and customSpellInfo [3] or "")
line.TopFader:Hide()
--line.spellIcon:SetTexCoord(.1, .9, .1, .9)
--line.sourceName:SetText("|cFFC6B0D9" .. source .. "|r")
--parse source and cut the length of the string after setting the spellname and source
local sourceClass = Details:GetClass(source)
local sourceSpec = Details:GetSpec(source)
if (not sourceClass) then
local combat = Details:GetCurrentCombat()
if (combat) then
local sourceActor = combat:GetActor(1, source)
if (sourceActor) then
sourceClass = sourceActor.classe
end
end
end
if (not sourceSpec) then
local combat = Details:GetCurrentCombat()
if (combat) then
local sourceActor = combat:GetActor(1, source)
if (sourceActor) then
sourceSpec = sourceActor.spec
end
end
end
--remove real name or owner name
source = Details:GetOnlyName(source)
--remove owner name
source = source:gsub((" <.*"), "")
--if a player?
if (Details.player_class [sourceClass]) then
source = Details:AddClassOrSpecIcon (source, sourceClass, sourceSpec, 16, true)
elseif (sourceClass == "PET") then
source = Details:AddClassOrSpecIcon (source, sourceClass)
end
--remove the dot signal from the spell name
if (not spellName) then
spellName = customSpellInfo and customSpellInfo [2] or "*?*"
if (spellName:find(STRING_ENVIRONMENTAL_DAMAGE_FALLING)) then
if (UnitName ("player") == "Elphaba") then
spellName = "Gravity Won!, Elphaba..."
source = ""
else
source = "Gravity"
end
--/run for a,b in pairs(_G) do if (type(b)=="string" and b:find("Falling")) then print(a,b) end end
end
end
spellName = spellName:gsub(L["STRING_DOT"], "")
spellName = spellName:gsub("[*] ", "")
source = source or ""
line.sourceName:SetText(spellName .. " (" .. "|cFFC6B0D9" .. source .. "|r" .. ")")
DetailsFramework:TruncateText (line.sourceName, 185)
if (amount > 1000) then
--line.amount:SetText("-" .. Details:ToK (amount))
line.amount:SetText("-" .. Details:comma_value(floor(amount)))
else
--line.amount:SetText("-" .. floor(amount))
line.amount:SetText("-" .. floor(amount))
end
line.lifePercent:SetText(hp .. "%")
line.lifeStatusBar:SetWidth(line:GetWidth() * (hp/100))
line.spellid = event [2]
line:Show()
if (Details.death_recap.show_life_percent) then
line.lifePercent:Show()
line.amount:SetPoint("left", line, "left", 240, 0)
line.lifePercent:SetPoint("left", line, "left", 320, 0)
else
line.lifePercent:Hide()
line.amount:SetPoint("left", line, "left", 280, 0)
--line.lifePercent:SetPoint("left", line, "left", 320, 0)
end
end
lineIndex = lineIndex - 1
end
end
local lastLine = Details.DeathRecap.Lines [lineIndex + 1]
if (lastLine) then
lastLine.TopFader:Show()
end
DeathRecapFrame.Unavailable:Hide()
else
if (not fromChat) then
Details.GetDeathRecapFromChat()
end
end
end
hooksecurefunc (_G, "DeathRecap_LoadUI", function()
hooksecurefunc (_G, "DeathRecapFrame_OpenRecap", function(RecapID)
local currentCombat = Details:GetCurrentCombat()
--get the player current death and link the death table with the death recapID
local playerDeaths = currentCombat:GetPlayerDeaths(Details.playername)
if (playerDeaths) then
local latestDeath = playerDeaths[#playerDeaths]
if (latestDeath) then
latestDeath.RecapID = RecapID
--synchronize last events from Details! and Blizzard recap
local events = DeathRecap_GetEvents(recapID)
--death is event index 1 (the event that killed the player)
local evtData = events[1]
if (evtData) then
--recap by blizzard
local spellName = evtData.spellName
local spellId = evtData.spellId
local event = evtData.event
local environmentalType = evtData.environmentalType
local timeStamp = evtData.timestamp
local amountDamage = evtData.amount
local overkill = evtData.overkill
local absorbed = evtData.absorbed
local resisted = evtData.resisted
local blocked = evtData.blocked
local currentHp = evtData.currentHP
local hideCaster = evtData.hideCaster
local sourceName = evtData.sourceName
local casterPrestige = evtData.casterPrestige
local spellSchool = evtData.school
local spellId, spellName, texture = DeathRecapFrame_GetEventInfo(evtData)
local format = Details:GetCurrentToKFunction()
if (Details.death_recap.enabled) then
if (type(spellName) == string and (Details:GetZoneType() == "party" or Details:GetZoneType() == "raid")) then
texture = texture or [[Interface\ICONS\INV_Misc_QuestionMark]]
local msgText = "|cFFAAAAFFDeath Recap (Blizzard):"
print(msgText, "|T" .. texture .. ":16:16:0:0:64:64:5:59:5:59|t", GetSpellLink(spellId) or spellName, format(_, amountDamage or 0))
end
end
--recap by Details!
--[=[
local deathEventsDetails = latestDeath[1]
for evIndex = #deathEventsDetails, 1, -1 do
local ev = deathEventsDetails[evIndex]
local evType = ev[1]
local spellId = ev[2]
local amount = ev[3]
--is a damage? true boolean
if (type(evType) == "boolean" and evType) then
local spellName, _, spellIcon = Details.GetSpellInfo(spellId)
if (spellName) then
--print("Killed by (Details!-Debug): ", spellName, "amount:", amount)
else
--print("Killed by (Details!-Debug): spell not found")
end
break
end
end
--]=]
--Details:Msg("the message above are debugs of an Alpha version of Details!")
--local whatKilledThePlayer = 0
end
end
end
Details.OpenDetailsDeathRecap(nil, RecapID)
end)
end)
--[=[ hooks not loaded at this point
Details:InstallHook(DETAILS_HOOK_DEATH, function(_, _, _, _, _, _, _, targetName)
if (targetName == UnitName("player")) then
end
end)
--]=]
-4
View File
@@ -158,10 +158,6 @@ function Details222.EJCache.CreateEncounterJournalDump()
--use current tier for dungeons, as the current tier shows the dungeons used for the current season of Mythic+
local startIndex, endIndex
if (bIsRaid) then
if (detailsFramework.IsCataWow()) then
if currentTierId == 1 then break end --Cata has only one tier. Looking up tier 0 errors. ~CATA
end
EJ_SelectTier(currentTierId - 1) --print("tier selected:", currentTierId - 1, "raids") --debug
startIndex = raidTierStartIndex
endIndex = 20
+16 -31
View File
@@ -11,33 +11,18 @@ local addonName, Details222 = ...
-- immersion namespace
Details.Immersion = {}
-- ASCENSION
-- @andrew
-- This is disabled by unregistering the event
-- its fixable but would require a small amount of work that is pointless at the movement
-- since ascension has no fights / activities that would use this
local immersionFrame = _G.CreateFrame("frame", "DetailsImmersionFrame", _G.UIParent)
immersionFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
--immersionFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
immersionFrame.DevelopmentDebug = false
--check if can enabled the immersion stuff
function immersionFrame.CheckIfCanEnableImmersion()
local mapID = C_Map.GetBestMapForUnit("player")
if (mapID) then
--check if the player is inside a POI
local mapFileName = C_Map.GetMapInfo(mapID)
mapFileName = mapFileName and mapFileName.name
if (mapFileName and mapFileName:find("InvasionPoint")) then
Details.immersion_enabled = true
if (immersionFrame.DevelopmentDebug) then
print("Details!", "CheckIfCanEnableImmersion() > immersion enabled.")
end
else
if (Details.immersion_enabled) then
if (immersionFrame.DevelopmentDebug) then
print("Details!", "CheckIfCanEnableImmersion() > immersion disabled.")
end
Details.immersion_enabled = nil
end
end
end
return false
end
--check events
@@ -50,16 +35,16 @@ end)
--store the GUID of the npc or player and point to the coords there the icon is
local iconPath1 = [[Interface\AddOns\Details\images\special_bar_icons]]
Details.Immersion.IconDatabase = {
["167826"] = {file = iconPath1, iconId = 1, interest = true, class = "MAGE"}, --lady jaina proudmoore
["167827"] = {file = iconPath1, iconId = 2, interest = true, class = "SHAMAN"}, --Thrall
-- ["167826"] = {file = iconPath1, iconId = 1, interest = true, class = "MAGE"}, --lady jaina proudmoore
-- ["167827"] = {file = iconPath1, iconId = 2, interest = true, class = "SHAMAN"}, --Thrall
["157432"] = {file = iconPath1, iconId = 3, interest = true, class = "WARRIOR"}, --bloodletter phantoriax, a npc inside torghast
["166148"] = {file = iconPath1, iconId = 4, interest = true, class = "WARRIOR"}, --sawn, a npc inside torghast
["171996"] = {file = iconPath1, iconId = 5, interest = true, class = "WARRIOR"}, --kythekios, a npc inside torghast
["172007"] = {file = iconPath1, iconId = 6, interest = true, class = "WARRIOR"}, --thelia, a npc inside torghast
["172024"] = {file = iconPath1, iconId = 7, interest = true, class = "WARRIOR"}, --telethakas, a npc inside torghast
["157406"] = {file = iconPath1, iconId = 8, interest = true, class = "WARRIOR"}, --renavyth, a npc inside torghast
["166151"] = {file = iconPath1, iconId = 9, interest = true, class = "WARRIOR"}, --moriaz the red, a npc inside torghast
-- ["157432"] = {file = iconPath1, iconId = 3, interest = true, class = "WARRIOR"}, --bloodletter phantoriax, a npc inside torghast
-- ["166148"] = {file = iconPath1, iconId = 4, interest = true, class = "WARRIOR"}, --sawn, a npc inside torghast
-- ["171996"] = {file = iconPath1, iconId = 5, interest = true, class = "WARRIOR"}, --kythekios, a npc inside torghast
-- ["172007"] = {file = iconPath1, iconId = 6, interest = true, class = "WARRIOR"}, --thelia, a npc inside torghast
-- ["172024"] = {file = iconPath1, iconId = 7, interest = true, class = "WARRIOR"}, --telethakas, a npc inside torghast
-- ["157406"] = {file = iconPath1, iconId = 8, interest = true, class = "WARRIOR"}, --renavyth, a npc inside torghast
-- ["166151"] = {file = iconPath1, iconId = 9, interest = true, class = "WARRIOR"}, --moriaz the red, a npc inside torghast
}
local customIconsDB = Details.Immersion.IconDatabase
+3 -2
View File
@@ -13,7 +13,7 @@ local GetInstanceInfo = GetInstanceInfo
local time = time
local floor = math.floor
local C_Timer = C_Timer
local C_ChallengeMode = C_ChallengeMode
local C_MythicPlus = C_MythicPlus
--constants
local CONST_USE_PLAYER_EDPS = false
@@ -166,7 +166,8 @@ function mythicDungeonCharts:OnBossDefeated()
local currentCombat = Details:GetCurrentCombat()
local segmentType = currentCombat:GetCombatType()
local bossInfo = currentCombat:GetBossInfo()
local mythicLevel = C_ChallengeMode and C_ChallengeMode.GetActiveKeystoneInfo()
local activeKeystone = C_MythicPlus.IsKeystoneActive() and C_MythicPlus.GetActiveKeystoneInfo()
local mythicLevel = activeKeystone and activeKeystone.keystoneLevel
if (mythicLevel and mythicLevel > 0) then
if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running and bossInfo) then
+16 -15
View File
@@ -27,13 +27,11 @@ local DetailsMythicPlusFrame = _G.CreateFrame("frame", "DetailsMythicPlusFrame",
DetailsMythicPlusFrame.DevelopmentDebug = false
--disabling the mythic+ feature if the user is playing in wow classic
if (not DF.IsTimewalkWoW()) then
DetailsMythicPlusFrame:RegisterEvent("CHALLENGE_MODE_START")
DetailsMythicPlusFrame:RegisterEvent("CHALLENGE_MODE_COMPLETED")
DetailsMythicPlusFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
DetailsMythicPlusFrame:RegisterEvent("ENCOUNTER_END")
DetailsMythicPlusFrame:RegisterEvent("START_TIMER")
end
DetailsMythicPlusFrame:RegisterEvent("MYTHIC_PLUS_STARTED")
DetailsMythicPlusFrame:RegisterEvent("MYTHIC_PLUS_COMPLETE")
DetailsMythicPlusFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA")
DetailsMythicPlusFrame:RegisterEvent("ENCOUNTER_END")
DetailsMythicPlusFrame:RegisterEvent("START_TIMER")
function Details222.MythicPlus.LogStep(log)
local today = date("%d/%m/%y %H:%M:%S")
@@ -131,10 +129,11 @@ function DetailsMythicPlusFrame.MythicDungeonStarted()
--this counter is individual for each character
Details.mythic_dungeon_id = Details.mythic_dungeon_id + 1
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local activeKeystone = C_MythicPlus.IsKeystoneActive() and C_MythicPlus.GetActiveKeystoneInfo()
local mythicLevel = activeKeystone and activeKeystone.keystoneLevel
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
local mapID = C_Map.GetBestMapForUnit("player")
local mapID = activeKeystone.dungeonID
if (not mapID) then
return
@@ -184,7 +183,7 @@ function DetailsMythicPlusFrame.OnChallengeModeStart()
else
--print("D! mythic dungeon was already started!")
--from zone changed
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local mythicLevel = MythicPlusUtil.GetActiveKeystoneLevel()
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
if (not Details.MythicPlus.Started and Details.MythicPlus.DungeonID == currentZoneID and Details.MythicPlus.Level == mythicLevel) then
@@ -225,7 +224,8 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
if (not combatObject.is_boss.killed) then
local encounterName = combatObject.is_boss.encounter
local zoneName = combatObject.is_boss.zone
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local activeKeystone = C_MythicPlus.IsKeystoneActive() and C_MythicPlus.GetActiveKeystoneInfo()
local mythicLevel = activeKeystone and activeKeystone.keystoneLevel
local currentCombat = Details:GetCurrentCombat()
@@ -233,7 +233,8 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
combatObject.is_boss = nil
--tag the combat as mythic dungeon trash
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
local instanceMapID = activeKeystone and activeKeystone.dungeonID
local zoneName = instanceMapID and GetLFGDungeonInfoByID(instanceMapID)
---@type mythicdungeoninfo
local mythicPlusInfo = {
@@ -315,7 +316,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
end
end
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local mythicLevel = MythicPlusUtil.GetActiveKeystoneLevel()
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
Details222.MythicPlus.LogStep("COMBAT_MYTHICDUNGEON_START | settings: " .. result .. " | level: " .. mythicLevel .. " | zone: " .. zoneName .. " | zoneId: " .. currentZoneID)
@@ -396,7 +397,7 @@ end)
---@param combatObject combat
function DetailsMythicPlusFrame.SaveMythicPlusStats(combatObject)
local mapChallengeModeID, mythicLevel, time, onTime, keystoneUpgradeLevels, practiceRun, oldOverallDungeonScore, newOverallDungeonScore, IsMapRecord, IsAffixRecord, PrimaryAffix, isEligibleForScore, members = C_ChallengeMode.GetCompletionInfo()
local mapChallengeModeID, mythicLevel, time, onTime = CMythicPlusUtil.GetCompletionInfo(true)
if (mapChallengeModeID) then
local statName = "mythicdungeoncompletedDF2"
@@ -450,7 +451,7 @@ function DetailsMythicPlusFrame.SaveMythicPlusStats(combatObject)
statsForLevel.history = statsForLevel.history or {}
local amountDeaths = C_ChallengeMode.GetDeathCount() or 0
local amountDeaths = 0
---@type mythicplusrunstats
local runStats = {
+2 -2
View File
@@ -7,7 +7,7 @@ local _
local GetTime = GetTime
local GetInstanceInfo = GetInstanceInfo
local time = time
local C_ChallengeMode = C_ChallengeMode
local MythicPlusUtil = MythicPlusUtil
local InCombatLockdown = InCombatLockdown
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
@@ -42,7 +42,7 @@ function Details222.MythicPlus.OnBossDefeated(encounterID, encounterName)
SegmentName = (encounterName or Loc["STRING_UNKNOW"]) .. " (" .. string.lower(_G["BOSS"]) .. ")"
}
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local mythicLevel = MythicPlusUtil.GetActiveKeystoneLevel()
local mPlusTable = currentCombat.is_mythic_dungeon
--logs
+2 -2
View File
@@ -96,8 +96,8 @@ function plater_integration_frame.AddDamageToGUID (sourceGUID, targetGUID, time,
end
end
plater_integration_frame:SetScript("OnEvent", function(self)
local time, token, hidding, sourceGUID, sourceName, sourceFlag, sourceFlag2, targetGUID, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = CombatLogGetCurrentEventInfo()
plater_integration_frame:SetScript("OnEvent", function(self, event, ...)
local time, token, hidding, sourceGUID, sourceName, sourceFlag, sourceFlag2, targetGUID, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = CombatLogGetCurrentEventInfo(...)
--damage taken by the GUID unit
if (token == "SPELL_DAMAGE" or token == "SPELL_PERIODIC_DAMAGE" or token == "RANGE_DAMAGE" or token == "DAMAGE_SHIELD") then
+1 -44
View File
@@ -10,7 +10,7 @@ do
local UnitClass = UnitClass
local UnitGUID = UnitGUID
local CONST_UNKNOWN_CLASS_COORDS = {0.75, 1, 0.75, 1}
local CONST_UNKNOWN_CLASS_COORDS = { 0, 0.125, 0.5, 0.625 }
local CONST_DEFAULT_COLOR = {1, 1, 1, 1}
local roles = {
@@ -275,32 +275,6 @@ do
return Details.cached_specs[unitSerial]
end
local specNamesToId = {}
function Details:BuildSpecsNameCache()
if (DetailsFramework.IsDragonflightAndBeyond()) then
---@type table<class, table<specializationid, boolean>>
local classSpecList = DetailsFramework.ClassSpecs
---@number
local numClasses = GetNumClasses()
for i = 1, numClasses do
local classInfo = C_CreatureInfo.GetClassInfo(i)
local localizedClassName = classInfo.className
local classTag = classInfo.classFile
local specIdsList = classSpecList[classTag]
if (specIdsList) then
for specId in pairs(specIdsList) do
local specId2, specName = GetSpecializationInfoByID(specId)
if (specId2 and specName) then
specNamesToId[specName .. " " .. localizedClassName] = specId2
end
end
end
end
end
end
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -402,23 +376,6 @@ do
actorSpec = Details.cached_specs[actorObject.serial]
end
--attempt to get spec from tooltip
if (not actorSpec and DetailsFramework:IsDragonflightAndBeyond()) then
local tooltipData = C_TooltipInfo.GetHyperlink("unit:" .. actorObject.serial)
if (tooltipData and tooltipData.lines) then
for i = 1, #tooltipData.lines do
local thisLineData = tooltipData.lines[i]
local text = thisLineData.leftText
if (text and thisLineData.type == 0) then
local specId = specNamesToId[text]
if (specId and type(specId) == "number") then
actorSpec = specId
end
end
end
end
end
--attempt to get from the spells the actor used in the current combat
if (not actorSpec) then
local currentCombatObject = Details:GetCurrentCombat()
+48 -208
View File
@@ -608,188 +608,58 @@ local default_profile = {
[71] = {448/512, 512/512, 192/512, 256/512}, --warrior arms
[72] = {0, 64/512, 256/512, 320/512}, --warrior fury
[73] = {64/512, 128/512, 256/512, 320/512}, --warrior protect
[1467] = {256/512, 320/512, 256/512, 320/512}, -- Devastation
[1468] = {320/512, 384/512, 256/512, 320/512}, -- Preservation
[1473] = {384/512, 448/512, 256/512, 320/512}, -- Augmentation
},
--class icons and colors
class_icons_small = [[Interface\AddOns\Details\images\classes_small]],
class_coords = {
["DEMONHUNTER"] = {
0.73828126 / 2, -- [1]
1 / 2, -- [2]
0.5 / 2, -- [3]
0.75 / 2, -- [4]
},
["HUNTER"] = {
0, -- [1]
0.25 / 2, -- [2]
0.25 / 2, -- [3]
0.5 / 2, -- [4]
},
["WARRIOR"] = {
0, -- [1]
0.25 / 2, -- [2]
0, -- [3]
0.25 / 2, -- [4]
},
["ROGUE"] = {
0.49609375 / 2, -- [1]
0.7421875 / 2, -- [2]
0, -- [3]
0.25 / 2, -- [4]
},
["MAGE"] = {
0.25 / 2, -- [1]
0.49609375 / 2, -- [2]
0, -- [3]
0.25 / 2, -- [4]
},
["PET"] = {
0.25 / 2, -- [1]
0.49609375 / 2, -- [2]
0.75 / 2, -- [3]
1 / 2, -- [4]
},
["DRUID"] = {
0.7421875 / 2, -- [1]
0.98828125 / 2, -- [2]
0, -- [3]
0.25 / 2, -- [4]
},
["MONK"] = {
0.5 / 2, -- [1]
0.73828125 / 2, -- [2]
0.5 / 2, -- [3]
0.75 / 2, -- [4]
},
["DEATHKNIGHT"] = {
0.25 / 2, -- [1]
0.5 / 2, -- [2]
0.5 / 2, -- [3]
0.75 / 2, -- [4]
},
["UNKNOW"] = {
0.5 / 2, -- [1]
0.75 / 2, -- [2]
0.75 / 2, -- [3]
1 / 2, -- [4]
},
["PRIEST"] = {
0.49609375 / 2, -- [1]
0.7421875 / 2, -- [2]
0.25 / 2, -- [3]
0.5 / 2, -- [4]
},
["UNGROUPPLAYER"] = {
0.5 / 2, -- [1]
0.75 / 2, -- [2]
0.75 / 2, -- [3]
1 / 2, -- [4]
},
["Alliance"] = {
0.49609375 / 2, -- [1]
0.742187 / 25, -- [2]
0.75 / 2, -- [3]
1 / 2, -- [4]
},
["WARLOCK"] = {
0.7421875 / 2, -- [1]
0.98828125 / 2, -- [2]
0.25 / 2, -- [3]
0.5 / 2, -- [4]
},
["ENEMY"] = {
0, -- [1]
0.25 / 2, -- [2]
0.75 / 2, -- [3]
1 / 2, -- [4]
},
["Horde"] = {
0.7421875 / 2, -- [1]
0.98828125 / 2, -- [2]
0.75 / 2, -- [3]
1 / 2, -- [4]
},
["PALADIN"] = {
0, -- [1]
0.25 / 2, -- [2]
0.5 / 2, -- [3]
0.75 / 2, -- [4]
},
["MONSTER"] = {
0, -- [1]
0.25 / 2, -- [2]
0.75 / 2, -- [3]
1 / 2, -- [4]
},
["SHAMAN"] = {
0.25 / 2, -- [1]
0.49609375 / 2, -- [2]
0.25 / 2, -- [3]
0.5 / 2, -- [4]
},
["EVOKER"] = {
0.50390625, -- [1]
0.625, -- [2]
0, -- [3]
0.125, -- [4]
},
["Alliance"] = { 0.375, 0.5, 0.5, 0.625 },
["Horde"] = { 0.25, 0.375, 0.5, 0.625 },
["PET"] = { 0.125, 0.25, 0.5, 0.625 },
["MONSTER"] = { 0, 0.125, 0.5, 0.625 },
["ENEMY"] = { 0, 0.125, 0.5, 0.625 },
["UNKNOW"] = { 0, 0.125, 0.5, 0.625 },
["UNGROUPPLAYER"] = { 0.375, 0.5, 0.5, 0.625 },
["WITCHHUNTER"] = { 0.875, 1, 0.375, 0.5 },
["WITCHDOCTOR"] = { 0.75, 0.875, 0.375, 0.5 },
["WILDWALKER"] = { 0.625, 0.75, 0.375, 0.5 },
["WARRIOR"] = { 0.5, 0.625, 0.375, 0.5 },
["WARLOCK"] = { 0.375, 0.5, 0.375, 0.5 },
["TINKER"] = { 0.25, 0.375, 0.375, 0.5 },
["SUNCLERIC"] = { 0.125, 0.25, 0.375, 0.5 },
["STORMBRINGER"] = { 0, 0.125, 0.375, 0.5 },
["STARCALLER"] = { 0.875, 1, 0.25, 0.375 },
["SPIRITMAGE"] = { 0.75, 0.875, 0.25, 0.375 },
["SONOFARUGAL"] = { 0.625, 0.75, 0.25, 0.375 },
["SHAMAN"] = { 0.5, 0.625, 0.25, 0.375 },
["ROGUE"] = { 0.375, 0.5, 0.25, 0.375 },
["REAPER"] = { 0.25, 0.375, 0.25, 0.375 },
["RANGER"] = { 0.125, 0.25, 0.25, 0.375 },
["PYROMANCER"] = { 0, 0.125, 0.25, 0.375 },
["PROPHET"] = { 0.875, 1, 0.125, 0.25 },
["PRIEST"] = { 0.75, 0.875, 0.125, 0.25 },
["PALADIN"] = { 0.625, 0.75, 0.125, 0.25 },
["NECROMANCER"] = { 0.5, 0.625, 0.125, 0.25 },
["MONK"] = { 0.375, 0.5, 0.125, 0.25 },
["MAGE"] = { 0.25, 0.375, 0.125, 0.25 },
["HUNTER"] = { 0.125, 0.25, 0.125, 0.25 },
["HERO"] = { 0, 0.125, 0.125, 0.25 },
["GUARDIAN"] = { 0.875, 1, 0, 0.125 },
["FLESHWARDEN"] = { 0.75, 0.875, 0, 0.125 },
["DRUID"] = { 0.625, 0.75, 0, 0.125 },
["DEMONHUNTER"] = { 0.5, 0.625, 0, 0.125 },
["DEATHKNIGHT"] = { 0.375, 0.5, 0, 0.125 },
["CULTIST"] = { 0.25, 0.375, 0, 0.125 },
["CHRONOMANCER"] = { 0.125, 0.25, 0, 0.125 },
["BARBARIAN"] = { 0, 0.125, 0, 0.125 },
},
class_colors = {
["DEMONHUNTER"] = {
0.64,
0.19,
0.79,
},
["HUNTER"] = {
0.67, -- [1]
0.83, -- [2]
0.45, -- [3]
},
["WARRIOR"] = {
0.78, -- [1]
0.61, -- [2]
0.43, -- [3]
},
["PALADIN"] = {
0.96, -- [1]
0.55, -- [2]
0.73, -- [3]
},
["SHAMAN"] = {
0, -- [1]
0.44, -- [2]
0.87, -- [3]
},
["MAGE"] = {
0.41, -- [1]
0.8, -- [2]
0.94, -- [3]
},
["ROGUE"] = {
1, -- [1]
0.96, -- [2]
0.41, -- [3]
},
["UNKNOW"] = {
0.2, -- [1]
0.2, -- [2]
0.2, -- [3]
},
["PRIEST"] = {
1, -- [1]
1, -- [2]
1, -- [3]
},
["WARLOCK"] = {
0.58, -- [1]
0.51, -- [2]
0.79, -- [3]
},
["UNGROUPPLAYER"] = {
0.4, -- [1]
0.4, -- [2]
@@ -807,21 +677,6 @@ local default_profile = {
0.4, -- [2]
0.5, -- [3]
},
["DRUID"] = {
1, -- [1]
0.49, -- [2]
0.04, -- [3]
},
["MONK"] = {
0, -- [1]
1, -- [2]
0.59, -- [3]
},
["DEATHKNIGHT"] = {
0.77, -- [1]
0.12, -- [2]
0.23, -- [3]
},
["ARENA_GREEN"] = {
0.686, -- [1]
0.372, -- [2]
@@ -842,15 +697,6 @@ local default_profile = {
0.32156, -- [2]
0.89019, -- [3]
},
["EVOKER"] = {
--0.2000,
--0.4980,
--0.5764,
0.2000,
0.5764,
0.4980,
},
},
death_log_colors = {
@@ -1152,6 +998,11 @@ local default_profile = {
auto_swap_to_dynamic_overall = false,
}
for class, color in pairs(RAID_CLASS_COLORS) do
default_profile.class_colors[class] = { color.r, color.g, color.b }
end
Details.default_profile = default_profile
-- aqui fica as propriedades do jogador que no sero armazenadas no profile
@@ -1171,8 +1022,6 @@ local default_player_data = {
track_hunter_frenzy = false,
merge_gemstones_1007 = false,
merge_critical_heals = false,
calc_evoker_damage = true,
evoker_show_realtimedps = false,
},
--this is used by the new data capture for charts
@@ -1389,8 +1238,6 @@ local default_global_data = {
user_is_patreon_supporter = false,
show_aug_predicted_spell_damage = false,
show_warning_id1 = true,
show_warning_id1_amount = 0,
@@ -1548,7 +1395,6 @@ local default_global_data = {
},
performance_profiles = { --deprecated
["RaidFinder"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
["Raid15"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
["Raid30"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
["Mythic"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
@@ -1681,7 +1527,6 @@ local default_global_data = {
delete_damage_TCOB = true, --delete damage on the concil of blood encounter
},
}
Details.default_global_data = default_global_data
function Details:GetTutorialCVar(key, default)
@@ -1778,15 +1623,11 @@ function Details:UpdateState_CurrentMythicDungeonRun(stillOngoing, segmentID, la
end
function Details:RestoreState_CurrentMythicDungeonRun()
--no need to check for mythic+ if the user is playing on classic wow
if (DetailsFramework.IsTimewalkWoW()) then
return
end
local savedTable = Details.mythic_dungeon_currentsaved
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local activeKeystone = C_MythicPlus.IsKeystoneActive() and C_MythicPlus.GetActiveKeystoneInfo()
local mythicLevel = activeKeystone and activeKeystone.keystoneLevel
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
local mapID = C_Map.GetBestMapForUnit("player")
local mapID = activeKeystone and activeKeystone.dungeonID
if (not mapID) then
--print("D! no mapID to restored mythic dungeon state.")
@@ -2035,9 +1876,8 @@ function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCod
mythicPlusSettings.mythicrun_chart_frame_minimized = {}
mythicPlusSettings.finished_run_frame = {}
--max segments allowed
--make the max amount of segments be 25
Details.segments_amount = 25
--max segments to save between sections
Details.segments_amount_to_save = 15
--transfer instance data to the new created profile
+1 -1
View File
@@ -7,7 +7,7 @@ local tinsert = tinsert
local addonName, Details222 = ...
function Details.InstallRaidInfo()
if not DetailsFramework.IsDragonflightWow() then return end --In Cata, EJ_SelectInstance will fail due to instance not existing. This file only contains dragonflight raids anyways. Best keep it on DF only.
if true then return end -- this needs data for ascension probably
do
local INSTANCE_EJID = 1200
local INSTANCE_MAPID = 2522
+10 -8
View File
@@ -125,12 +125,15 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (command == "mythic+") then
local statName = "mythicdungeoncompletedDF2"
local mythicDungeonRuns = Details222.PlayerStats:GetStat(statName)
if mythicDungeonRuns then
dumpt(mythicDungeonRuns)
dumpt(mythicDungeonRuns)
for mapChallengeModeID, mapChallengeModeData in pairs(mythicDungeonRuns) do
local mapName = C_ChallengeMode.GetMapUIInfo(mapChallengeModeID)
print(mapName, mapChallengeModeData.level, mapChallengeModeData.completed, mapChallengeModeData.time)
for mapChallengeModeID, mapChallengeModeData in pairs(mythicDungeonRuns) do
local mapName = LFGGetDungeonInfoByID(mapChallengeModeID)
print(mapName, mapChallengeModeData.level, mapChallengeModeData.completed, mapChallengeModeData.time)
end
else
Details:Msg("No Mythic Dungeon Runs to Report!")
end
elseif (command == "mergepetspells") then --deprecated
@@ -2229,7 +2232,7 @@ if (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE) then
local coords = CLASS_ICON_TCOORDS
local _, class = GetClassInfo(classId)
local mapName = C_ChallengeMode.GetMapUIInfo(keystoneInfo.mythicPlusMapID) or ""
local mapName = LFGGetDungeonInfoByID(keystoneInfo.mythicPlusMapID) or ""
--local mapInfoChallenge = C_Map.GetMapInfo(keystoneInfo.challengeMapID)
--local mapNameChallenge = mapInfoChallenge and mapInfoChallenge.name or ""
@@ -2237,14 +2240,13 @@ if (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE) then
local isInMyParty = UnitInParty(unitName) and (string.byte(unitName, 1) + string.byte(unitName, 2)) or 0
local isGuildMember = guildName and guildUsers[unitName] and true
if (keystoneInfo.level > 0 or keystoneInfo.rating > 0) then
if (keystoneInfo.level > 0) then
local keystoneTable = {
unitName,
keystoneInfo.level,
keystoneInfo.mapID,
keystoneInfo.challengeMapID,
keystoneInfo.classID,
keystoneInfo.rating,
keystoneInfo.mythicPlusMapID,
classIcon,
coords[class],
-597
View File
@@ -1,597 +0,0 @@
local addonName, Details222 = ...
local Details = Details
local _
local CONST_SPELLID_EBONMIGHT = 395152
local CONST_SPELLID_SS = 413984
local CONST_SPELLID_PRESCIENCE = 410089
local CONST_SPELLID_EONS_BREATH = 409560
local CONST_SPELLID_TANK_SHIELD = 360827
local CONST_SPELLID_INFERNOBLESS = 410263
local UnitExists = UnitExists
local UnitIsUnit = UnitIsUnit
local augmentationFunctions = Details222.SpecHelpers[1473]
local augmentationCache = Details222.SpecHelpers[1473].augmentation_cache
local playerRealmName = GetRealmName()
local getAmountOfBuffsAppliedBySpellId = function(spellId)
local amountBuffs = 0
local spellName = GetSpellInfo(spellId)
for i, unitId in ipairs(Details222.UnitIdCache.PartyIds) do
if (UnitExists(unitId)) then
for o = 1, 40 do
local auraName = UnitBuff(unitId, o)
if (auraName == spellName) then
amountBuffs = amountBuffs + 1
break
elseif (not auraName) then
break
end
end
else
break
end
end
return amountBuffs
end
local eventListener = Details:CreateEventListener()
--eventListener:RegisterEvent("COMBAT_PLAYER_ENTER")
eventListener:RegisterEvent("COMBAT_PLAYER_LEAVING", function(eventName, combatObject)
--close the time on the current amount of prescience stacks the evoker have
---@type combat
local combat = Details:GetCurrentCombat()
local amountOfAugEvokers = 0
---@type actorcontainer
local damageContainer = combat:GetContainer(DETAILS_ATTRIBUTE_DAMAGE)
---@type actor[]
local players = {}
---@type actor
local augEvokerObject
for index, actorObject in damageContainer:ListActors() do
--check the specId to know if the actor has the augmentation specId
if (actorObject.spec == 1473) then
amountOfAugEvokers = amountOfAugEvokers + 1
players[#players+1] = actorObject
augEvokerObject = actorObject
elseif (actorObject:IsPlayer()) then
players[#players+1] = actorObject
end
end
--print("players", #players, "amountOfAugEvokers:", amountOfAugEvokers, augEvokerObject and augEvokerObject:Name() or "nil")
if (amountOfAugEvokers == 1 and augEvokerObject) then
local breathOfEonsDamage = 0
local infernoBlessingDamage = 0
local fateMirrorDamage = 0
local blisteringScalesDamage = 0
for i = 1, #players do
---@actor
local playerObject = players[i]
local spellContainer = playerObject:GetSpellContainer("spell")
local breathOfEons = spellContainer:GetSpell(CONST_SPELLID_EONS_BREATH)
local infornoBlessing = spellContainer:GetSpell(CONST_SPELLID_INFERNOBLESS)
local blisteringScales = spellContainer:GetSpell(CONST_SPELLID_TANK_SHIELD)
local fateMirror = spellContainer:GetSpell(CONST_SPELLID_SS)
if (breathOfEons and breathOfEons.total >= 1) then
breathOfEonsDamage = breathOfEonsDamage + breathOfEons.total
end
if (infornoBlessing and infornoBlessing.total >= 1) then
infernoBlessingDamage = infernoBlessingDamage + infornoBlessing.total
end
if (blisteringScales and blisteringScales.total >= 1) then
blisteringScalesDamage = blisteringScalesDamage + blisteringScales.total
end
if (fateMirror and fateMirror.total >= 1) then
fateMirrorDamage = fateMirrorDamage + fateMirror.total
end
end
local augmentedSpellContainer = augEvokerObject.augmentedSpellsContainer
if (breathOfEonsDamage > 0) then
local bCanCreateSpellIfMissing = true
local breathOfEonsSpell = augmentedSpellContainer:GetOrCreateSpell(CONST_SPELLID_EONS_BREATH, bCanCreateSpellIfMissing, "SPELL_DAMAGE")
breathOfEonsSpell.total = breathOfEonsDamage
end
if (infernoBlessingDamage > 0) then
local bCanCreateSpellIfMissing = true
local infernoBlessingSpell = augmentedSpellContainer:GetOrCreateSpell(CONST_SPELLID_INFERNOBLESS, bCanCreateSpellIfMissing, "SPELL_DAMAGE")
infernoBlessingSpell.total = infernoBlessingDamage
end
if (blisteringScalesDamage > 0) then
local bCanCreateSpellIfMissing = true
local blisteringScalesSpell = augmentedSpellContainer:GetOrCreateSpell(CONST_SPELLID_TANK_SHIELD, bCanCreateSpellIfMissing, "SPELL_DAMAGE")
blisteringScalesSpell.total = blisteringScalesDamage
end
if (fateMirrorDamage > 0) then
local bCanCreateSpellIfMissing = true
local fateMirrorSpell = augmentedSpellContainer:GetOrCreateSpell(CONST_SPELLID_SS, bCanCreateSpellIfMissing, "SPELL_DAMAGE")
fateMirrorSpell.total = fateMirrorDamage
end
end
--[=[
---@type actorcontainer
local damageContainer = combat:GetContainer(DETAILS_ATTRIBUTE_MISC)
--print(1, "COMBAT_PLAYER_LEAVING", next(augmentationCache.prescience_stacks))
for actorName, stackInfo in pairs(augmentationCache.prescience_stacks) do
local actorObject = damageContainer:GetActor(actorName)
local currentAmountOfApplications = stackInfo.currentStacks
if (currentAmountOfApplications >= 1 and currentAmountOfApplications <= 5) then
--close the time the evoker had this amount of stacks
local timeOfTheLastEvent = stackInfo.latestStackUpdateTime
local timeNow = GetTime()
local timeDiff = timeNow - timeOfTheLastEvent
if (timeDiff > 0) then
stackInfo.stackTime[currentAmountOfApplications] = stackInfo.stackTime[currentAmountOfApplications] + timeDiff
end
end
actorObject.prescience_stack_data_by_timeline = DetailsFramework.table.copy({}, stackInfo.stackTime)
end
--]=]
end)
---@class details_evoker_presciencetimeline : table
---@field currentStacks number amount of stacks the evoker has at the moment
---@field stackTime table<number, number, number, number, number> amountof time the evoker had the amount of stacks, one stack if the first index, 5 stacks if the last index
---@field latestStackUpdateTime number GetTime() of the latest stack amount update, this is used to calculate the time the evoker had each amount of stacks
local latestPrescienceEvent = 0
local latestAuraInstanceId = 0
function augmentationFunctions.OnAugmentationBuffUpdate(eventName, ...)
---@combat
local currentCombat = Details:GetCurrentCombat()
--test #1: calculate the amount of stack in real time
if (eventName == "AURA_UPDATE" and Details.in_combat) then
local targetGUID, auraInfo, eventType = ...
local spellId = auraInfo.spellId
if (spellId == CONST_SPELLID_PRESCIENCE) then
--[=[
if (latestPrescienceEvent ~= GetTime()) then
latestPrescienceEvent = GetTime()
latestAuraInstanceId = auraInfo.instanceId
else
if (latestAuraInstanceId == auraInfo.instanceId) then
return
end
latestPrescienceEvent = GetTime()
latestAuraInstanceId = auraInfo.instanceId
end
if ((currentCombat and currentCombat.is_challenge) or Details.debug) then
local sourceUnitId = auraInfo.sourceUnit
local sourceGUID = UnitGUID(sourceUnitId)
local sourceName = Details:GetFullName(sourceUnitId)
local evokerUtilityObject = currentCombat:GetContainer(DETAILS_ATTRIBUTE_MISC):GetOrCreateActor(sourceGUID, sourceName, 0x514, true)
if (evokerUtilityObject) then
local stackInfo = evokerUtilityObject.prescience_stack_data2
if (not stackInfo) then
stackInfo = {
currentStacks = 0,
stackTime = {0, 0, 0, 0, 0},
latestStackUpdateTime = GetTime()
}
evokerUtilityObject.prescience_stack_data2 = stackInfo
end
if (eventType == "BUFF_UPTIME_IN") then
local currentAmountOfApplications = stackInfo.currentStacks
--print("in", currentAmountOfApplications, GetTime())
if (currentAmountOfApplications > 0) then
--the the time the evoker had this amount of stacks
local timeOfTheLastEvent = stackInfo.latestStackUpdateTime
local timeNow = GetTime()
local timeDiff = timeNow - timeOfTheLastEvent
if (timeDiff > 0) then
stackInfo.stackTime[currentAmountOfApplications] = stackInfo.stackTime[currentAmountOfApplications] + timeDiff
end
end
stackInfo.latestStackUpdateTime = GetTime()
stackInfo.currentStacks = stackInfo.currentStacks + 1
elseif (eventType == "BUFF_UPTIME_OUT") then
local currentAmountOfApplications = stackInfo.currentStacks
--print("out", currentAmountOfApplications)
if (currentAmountOfApplications > 0) then
--the the time the evoker had this amount of stacks
local timeOfTheLastEvent = stackInfo.latestStackUpdateTime
local timeNow = GetTime()
local timeDiff = timeNow - timeOfTheLastEvent
if (timeDiff > 0) then
stackInfo.stackTime[currentAmountOfApplications] = stackInfo.stackTime[currentAmountOfApplications] + timeDiff
end
end
stackInfo.latestStackUpdateTime = GetTime()
stackInfo.currentStacks = stackInfo.currentStacks - 1
end
end
end
--]=]
end
--test #2: calculate the amount of stacks post combat using a list of events (timeline)
--note to self: I'm not working with real time data, these are past events, GetTime() and time() will always return the same value
elseif (eventName == "TIMELINE_READY") then --not in use
--if true then return end
--timelineTable is an indexed table with all the timeline events
--[=[
---@type details_auratimeline[]
local timelineTable = ...
__details_debug.prescience_timeline = __details_debug.prescience_timeline or {}
__details_debug.prescience_timeline[#__details_debug.prescience_timeline+1] = timelineTable
--amount of time the evoker had the amount of stacks
--[evokerName] = details_evoker_presciencetimeline
---@type table<string, details_evoker_presciencetimeline>
local prescienceStacksByEvoker = {}
for i = 1, #timelineTable do
---@type details_auratimeline
local auraEvent = timelineTable[i]
if (auraEvent.spellId == CONST_SPELLID_PRESCIENCE) then
local evokerName = auraEvent.sourceName
---@type details_evoker_presciencetimeline
local evokerPrescienceStackInfo = prescienceStacksByEvoker[evokerName]
if (auraEvent.event == "BUFF_UPTIME_IN") then
if (not evokerPrescienceStackInfo) then
evokerPrescienceStackInfo = {
currentStacks = 0,
stackTime = {0, 0, 0, 0, 0},
latestStackUpdateTime = 0
}
prescienceStacksByEvoker[evokerName] = evokerPrescienceStackInfo
end
local currentAmountOfStacks = evokerPrescienceStackInfo.currentStacks
--the evoker gained a stack, so we need to add the time he had the previous amount of stacks
if (currentAmountOfStacks > 0) then
local timeWithThisAmountOfStacks = evokerPrescienceStackInfo.stackTime[currentAmountOfStacks]
if (timeWithThisAmountOfStacks) then
local appliedTime = auraEvent.appliedTime
local timeDiff = appliedTime - evokerPrescienceStackInfo.latestStackUpdateTime
if (timeDiff > 0) then
evokerPrescienceStackInfo.stackTime[currentAmountOfStacks] = timeWithThisAmountOfStacks + timeDiff
end
end
end
evokerPrescienceStackInfo.latestStackUpdateTime = auraEvent.appliedTime
evokerPrescienceStackInfo.currentStacks = currentAmountOfStacks + 1
elseif (auraEvent.event == "BUFF_UPTIME_OUT") then
if (evokerPrescienceStackInfo) then
--the evoker lost a stack, so we need to add the time he had the previous amount of stacks
local currentAmountOfStacks = evokerPrescienceStackInfo.currentStacks
local timeWithThisAmountOfStacks = evokerPrescienceStackInfo.stackTime[currentAmountOfStacks]
auraEvent.addTimeLineTable.closed = true
if (timeWithThisAmountOfStacks) then
local timeNow = auraEvent.removedTime
local timeDiff = timeNow - evokerPrescienceStackInfo.latestStackUpdateTime
if (timeDiff > 0) then
evokerPrescienceStackInfo.stackTime[currentAmountOfStacks] = timeWithThisAmountOfStacks + timeDiff
end
end
evokerPrescienceStackInfo.currentStacks = evokerPrescienceStackInfo.currentStacks - 1
evokerPrescienceStackInfo.latestStackUpdateTime = auraEvent.removedTime
end
end
end
end
--iterate again and print the tables with the key 'closed' that are not set to true
local nonClosedTables = {}
for i = 1, #timelineTable do
---@type details_auratimeline
local auraEvent = timelineTable[i]
if (auraEvent.spellId == CONST_SPELLID_PRESCIENCE) then
if (auraEvent.event == "BUFF_UPTIME_IN") then
if (not auraEvent.closed) then
nonClosedTables[#nonClosedTables+1] = auraEvent
end
end
end
end
Details222.DebugMsg("|cFFFFFF00Non Closed Tables:", #nonClosedTables)
for evokerName, evokerPrescienceStackInfo in pairs(prescienceStacksByEvoker) do --table 'prescience_stack_data_by_timeline' not found, something wrong here
local evokerUtilityObject = currentCombat:GetContainer(DETAILS_ATTRIBUTE_MISC):GetActor(evokerName)
if (evokerUtilityObject) then
evokerUtilityObject.prescience_stack_data_by_timeline = DetailsFramework.table.copy({}, evokerPrescienceStackInfo.stackTime)
end
end
--]=]
end
end
function augmentationFunctions.BuffIn(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, auraType, amount)
if (not Details.in_combat) then --when the player enter and leave combat, it tracks which players had buffs applied
return
end
if (spellId == 395152) then --ebom might on third parties
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, _, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName(targetName, spellId, sourceName)
local attributeGained = v2
--unit already have the buff from this evoker
if (type(attributeGained) == "number") then
if (augmentationCache.ebon_might[targetSerial]) then
for index, evokerInfo in ipairs(augmentationCache.ebon_might[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
evokerInfo[4] = attributeGained
return
end
end
end
augmentationCache.ebon_might[targetSerial] = augmentationCache.ebon_might[targetSerial] or {}
local evokerInfo = {sourceSerial, sourceName, sourceFlags, attributeGained}
table.insert(augmentationCache.ebon_might[targetSerial], evokerInfo)
end
elseif (spellId == 413984) then --ss
if (UnitExists(targetName) and targetName ~= Details.playername) then
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName(targetName, spellId, sourceName)
local versaGained = v1
if (type(versaGained) == "number") then
augmentationCache.ss[targetSerial] = augmentationCache.ss[targetSerial] or {}
local ssInfo = {sourceSerial, sourceName, sourceFlags, versaGained}
table.insert(augmentationCache.ss[targetSerial], ssInfo)
end
end
elseif (spellId == 410089) then --prescience
--added Prescience to a player (targetName)
augmentationCache.prescience[targetSerial] = augmentationCache.prescience[targetSerial] or {}
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
table.insert(augmentationCache.prescience[targetSerial], evokerInfo)
---@combat
local currentCombat = Details:GetCurrentCombat()
local evokerUtilityObject = currentCombat:GetContainer(DETAILS_ATTRIBUTE_MISC):GetOrCreateActor(sourceSerial, sourceName, sourceFlags, true)
local stackInfo = evokerUtilityObject.cleu_prescience_time
if (not stackInfo) then
stackInfo = {
currentStacks = 0,
stackTime = {0, 0, 0, 0, 0},
latestStackUpdateTime = GetTime()
}
evokerUtilityObject.cleu_prescience_time = stackInfo
end
local prescienceApplied = getAmountOfBuffsAppliedBySpellId(CONST_SPELLID_PRESCIENCE)
if (prescienceApplied > 0) then
local currentAmountOfApplications = stackInfo.currentStacks
if (currentAmountOfApplications >= 1 and currentAmountOfApplications <= 5) then
--the the time the evoker had this amount of stacks
local timeOfTheLastEvent = stackInfo.latestStackUpdateTime
local timeNow = GetTime()
local timeDiff = timeNow - timeOfTheLastEvent
if (timeDiff > 0) then
stackInfo.stackTime[currentAmountOfApplications] = stackInfo.stackTime[currentAmountOfApplications] + timeDiff
end
end
stackInfo.latestStackUpdateTime = GetTime()
stackInfo.currentStacks = prescienceApplied
end
elseif (spellId == 409560) then --eons breath
local unitIDAffected = Details:FindUnitIDByUnitSerial(targetSerial)
if (unitIDAffected) then
local duration, expirationTime = Details:FindDebuffDuration(unitIDAffected, spellId, Details:Ambiguate(sourceName))
if (duration) then
local breathTargets = augmentationCache.breath_targets[targetSerial]
if (not breathTargets) then
augmentationCache.breath_targets[targetSerial] = {}
breathTargets = augmentationCache.breath_targets[targetSerial]
end
--evoker serial, evoker name, evoker flags, target unitID, unixtime, duration, expirationTime (GetTime + duration)
local eonsBreathInfo = {sourceSerial, sourceName, sourceFlags, unitIDAffected, time, duration, expirationTime}
table.insert(breathTargets, eonsBreathInfo)
end
end
elseif (spellId == 360827) then --tank shield
augmentationCache.shield[targetSerial] = augmentationCache.shield[targetSerial] or {}
local evokerInfo = {sourceSerial, sourceName, sourceFlags, amount}
table.insert(augmentationCache.shield[targetSerial], evokerInfo)
elseif (spellId == 410263) then --inferno bless
augmentationCache.infernobless[targetSerial] = augmentationCache.infernobless[targetSerial] or {}
local evokerInfo = {sourceSerial, sourceName, sourceFlags}
table.insert(augmentationCache.infernobless[targetSerial], evokerInfo)
end
end
function augmentationFunctions.BuffRefresh(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellschool, tipo, amount)
if (spellId == 395152) then
if (augmentationCache.ebon_might[targetSerial]) then
for index, evokerInfo in ipairs(augmentationCache.ebon_might[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, auraSpellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName(targetName, spellId, sourceName)
local attributeGained = v2
if (type(attributeGained) == "number") then
evokerInfo[4] = attributeGained
return
end
end
end
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, auraSpellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName(targetName, spellId, sourceName)
local attributeGained = v2
if (type(attributeGained) == "number") then
Details222.DebugMsg("Ebon Might Refreshed!, but the evoker was not found in the cache (1), adding:", sourceName, sourceSerial, targetName, targetSerial)
table.insert(augmentationCache.ebon_might[targetSerial], {sourceSerial, sourceName, sourceFlags, attributeGained})
end
else
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, auraSpellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName(targetName, spellId, sourceName)
local attributeGained = v2
if (type(attributeGained) == "number") then
Details222.DebugMsg("Ebon Might Refreshed!, but the evoker was not found in the cache (2), adding:", sourceName, sourceSerial, targetName, targetSerial)
table.insert(augmentationCache.ebon_might[targetSerial], {sourceSerial, sourceName, sourceFlags, attributeGained})
end
end
elseif (spellId == 413984) then --ss
if (UnitExists(targetName) and targetName ~= Details.playername) then
local auraName, texture, count, auraType, duration, expirationTime, sourceUnit, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossAura, isFromPlayerOrPlayerPet, nameplateShowAll, timeMod, v1, v2, v3, v4, v5 = Details:FindBuffCastedByUnitName (targetName, spellId, sourceName)
local versaGained = v1
if (type(versaGained) == "number") then
local bFound = false
augmentationCache.ss[targetSerial] = augmentationCache.ss[targetSerial] or {}
for index, evokerInfo in ipairs(augmentationCache.ss[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
evokerInfo[4] = versaGained
bFound = true
break
end
end
if (not bFound) then
table.insert(augmentationCache.ss[targetSerial], {sourceSerial, sourceName, sourceFlags, versaGained})
end
end
end
elseif (spellId == 410089) then
local bFound = false
augmentationCache.prescience[targetSerial] = augmentationCache.prescience[targetSerial] or {}
for index, evokerInfo in ipairs(augmentationCache.prescience[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
evokerInfo[4] = amount
bFound = true
break
end
end
if (not bFound) then
table.insert(augmentationCache.prescience[targetSerial], {sourceSerial, sourceName, sourceFlags, amount})
end
end
end
function augmentationFunctions.BuffOut(token, time, sourceSerial, sourceName, sourceFlags, targetSerial, targetName, targetFlags, targetFlags2, spellId, spellName, spellSchool, tipo, amount)
if (not Details.in_combat) then --when the player enter and leave combat, it tracks which players had buffs applied
--return
end
if (spellId == 395152) then --ebon might
if (augmentationCache.ebon_might[targetSerial]) then
for index, evokerInfo in ipairs(augmentationCache.ebon_might[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
table.remove(augmentationCache.ebon_might[targetSerial], index)
break
end
end
end
elseif (spellId == 413984) then --ss
if (augmentationCache.ss[targetSerial]) then
for index, evokerInfo in ipairs(augmentationCache.ss[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
table.remove(augmentationCache.ss[targetSerial], index)
break
end
end
end
elseif (spellId == 410089) then --prescience
if (augmentationCache.prescience[targetSerial]) then
for index, evokerInfo in ipairs(augmentationCache.prescience[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
table.remove(augmentationCache.prescience[targetSerial], index)
break
end
end
---@combat
local currentCombat = Details:GetCurrentCombat()
local evokerUtilityObject = currentCombat:GetContainer(DETAILS_ATTRIBUTE_MISC):GetOrCreateActor(sourceSerial, sourceName, sourceFlags, true)
local stackInfo = evokerUtilityObject.cleu_prescience_time
if (stackInfo) then
local prescienceApplied = getAmountOfBuffsAppliedBySpellId(CONST_SPELLID_PRESCIENCE)
if (prescienceApplied >= 0) then
local currentAmountOfApplications = stackInfo.currentStacks
if (currentAmountOfApplications >= 1 and currentAmountOfApplications <= 5) then
--the the time the evoker had this amount of stacks
local timeOfTheLastEvent = stackInfo.latestStackUpdateTime
local timeNow = GetTime()
local timeDiff = timeNow - timeOfTheLastEvent
if (timeDiff > 0) then
stackInfo.stackTime[currentAmountOfApplications] = stackInfo.stackTime[currentAmountOfApplications] + timeDiff
end
end
stackInfo.latestStackUpdateTime = GetTime()
stackInfo.currentStacks = prescienceApplied
end
end
end
elseif (spellId == 360827) then
if (augmentationCache.shield[targetSerial]) then
for index, evokerInfo in ipairs(augmentationCache.shield[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
table.remove(augmentationCache.shield[targetSerial], index)
break
end
end
end
elseif (spellId == 410263) then
if (augmentationCache.infernobless[targetSerial]) then
for index, evokerInfo in ipairs(augmentationCache.infernobless[targetSerial]) do
if (evokerInfo[1] == sourceSerial) then
table.remove(augmentationCache.infernobless[targetSerial], index)
break
end
end
end
end
end
+20 -219
View File
@@ -14,7 +14,6 @@ do
local C_Timer = C_Timer
--is this a timewalking exp?
local bIsClassicWow = DetailsFramework.IsClassicWow()
--default spell cache container
Details.spellcache = {}
@@ -22,16 +21,14 @@ do
local allSpellNames
--check if this is running in classic wow and build a cache with spell names poiting to their icons
if (bIsClassicWow) then
allSpellNames = {}
local maxSpellIdInClassic = 60000
--build a cache with spell names poiting to their icons
allSpellNames = {}
local maxSpellId = 90000
for i = 1, maxSpellIdInClassic do
local spellName, _, spellIcon = GetSpellInfo(i)
if spellName and spellIcon and spellIcon ~= 136235 and not allSpellNames[spellName] then
allSpellNames[spellName] = spellIcon
end
for i = 1, maxSpellId do
local spellName, _, spellIcon = GetSpellInfo(i)
if spellName and spellIcon and spellIcon ~= "Interface\\Icons\\trade_engineering" and not allSpellNames[spellName] then
allSpellNames[spellName] = spellIcon
end
end
@@ -75,11 +72,7 @@ do
end
local spellInfo
if (bIsClassicWow) then
spellInfo = {GetSpellInfoClassic(key)}
else
spellInfo = {GetSpellInfo(key)}
end
spellInfo = {GetSpellInfoClassic(key)}
spellCache[key] = spellInfo
return spellInfo
@@ -102,10 +95,6 @@ do
end
end
local lightOfTheMartyr_Name, _, lightOfTheMartyr_Icon = GetSpellInfo(196917)
lightOfTheMartyr_Name = lightOfTheMartyr_Name or "Deprecated Spell - Light of the Martyr"
lightOfTheMartyr_Icon = lightOfTheMartyr_Icon or ""
---@type table<number, customspellinfo>
local defaultSpellCustomization = {}
@@ -120,8 +109,8 @@ do
local formatTextForItem = function(itemId)
local result = ""
local itemIcon = C_Item.GetItemIconByID(itemId)
local itemName = C_Item.GetItemNameByID(itemId)
local itemIcon = GetItemIconInstant(itemId)
local itemName = GetItemName(itemId)
if (itemIcon and itemName) then
--limit the amount of characters of the item name
@@ -140,204 +129,16 @@ do
return result
end
if (DetailsFramework.IsClassicWow()) then
defaultSpellCustomization = {
[1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
}
elseif (DetailsFramework.IsTBCWow()) then
defaultSpellCustomization = {
[1] = {name = _G["MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
}
elseif (DetailsFramework.IsWotLKWow()) then
defaultSpellCustomization = {
[1] = {name = _G["MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
}
elseif (DetailsFramework.IsCataWow()) then
defaultSpellCustomization = {
[1] = {name = _G["MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
}
elseif (DetailsFramework.IsShadowlandsWow()) then
defaultSpellCustomization = {
[1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
[98021] = {name = Loc ["STRING_SPIRIT_LINK_TOTEM"]},
[108271] = {name = GetSpellInfo(108271), icon = "Interface\\Addons\\Details\\images\\icon_astral_shift"},
[196917] = {name = lightOfTheMartyr_Name .. " (" .. Loc ["STRING_DAMAGE"] .. ")", icon = lightOfTheMartyr_Icon},
[77535] = {name = GetSpellInfo(77535), icon = "Interface\\Addons\\Details\\images\\icon_blood_shield"},
--bfa trinkets (deprecated)
[278155] = {name = GetSpellInfo(278155) .. " (Trinket)"}, --[Twitching Tentacle of Xalzaix]
[279664] = {name = GetSpellInfo(279664) .. " (Trinket)"}, --[Vanquished Tendril of G'huun]
[278227] = {name = GetSpellInfo(278227) .. " (Trinket)"}, --[T'zane's Barkspines]
[278383] = {name = GetSpellInfo(278383) .. " (Trinket)"}, --[Azurethos' Singed Plumage]
[278862] = {name = GetSpellInfo(278862) .. " (Trinket)"}, --[Drust-Runed Icicle]
[278359] = {name = GetSpellInfo(278359) .. " (Trinket)"}, --[Doom's Hatred]
[278812] = {name = GetSpellInfo(278812) .. " (Trinket)"}, --[Lion's Grace]
[270827] = {name = GetSpellInfo(270827) .. " (Trinket)"}, --[Vessel of Skittering Shadows]
[271071] = {name = GetSpellInfo(271071) .. " (Trinket)"}, --[Conch of Dark Whispers]
[270925] = {name = GetSpellInfo(270925) .. " (Trinket)"}, --[Hadal's Nautilus]
[271115] = {name = GetSpellInfo(271115) .. " (Trinket)"}, --[Ignition Mage's Fuse]
[271462] = {name = GetSpellInfo(271462) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[271465] = {name = GetSpellInfo(271465) .. " (Trinket)"}, --[Rotcrusted Voodoo Doll]
[268998] = {name = GetSpellInfo(268998) .. " (Trinket)"}, --[Balefire Branch]
[271671] = {name = GetSpellInfo(271671) .. " (Trinket)"}, --[Lady Waycrest's Music Box]
[277179] = {name = GetSpellInfo(277179) .. " (Trinket)"}, --[Dread Gladiator's Medallion]
[277187] = {name = GetSpellInfo(277187) .. " (Trinket)"}, --[Dread Gladiator's Emblem]
[277181] = {name = GetSpellInfo(277181) .. " (Trinket)"}, --[Dread Gladiator's Insignia]
[277185] = {name = GetSpellInfo(277185) .. " (Trinket)"}, --[Dread Gladiator's Badge]
[278057] = {name = GetSpellInfo(278057) .. " (Trinket)"}, --[Vigilant's Bloodshaper]
}
else --retail (dragonflight)
defaultSpellCustomization = {
[1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
[98021] = {name = Loc ["STRING_SPIRIT_LINK_TOTEM"]},
[108271] = {name = GetSpellInfo(108271), icon = "Interface\\Addons\\Details\\images\\icon_astral_shift"},
[196917] = {name = lightOfTheMartyr_Name .. " (" .. Loc ["STRING_DAMAGE"] .. ")", icon = lightOfTheMartyr_Icon},
[77535] = {name = GetSpellInfo(77535), icon = "Interface\\Addons\\Details\\images\\icon_blood_shield"},
[395296] = {name = GetSpellInfo(395296) .. " (on your self)", icon = "Interface\\Addons\\Details\\images\\ebon_might"},
[424428] = {name = (GetSpellInfo(424428) or "none") .. " (4P)", icon = "Interface\\Addons\\Details\\images\\spells\\eruption_tier4.jpg", defaultName = GetSpellInfo(424428), breakdownCanStack = true}, --augmentation 4pc tier 10.2
[422779] = {name = (GetSpellInfo(422779) or "none") .. " (4P)", icon = "Interface\\Addons\\Details\\images\\spells\\burning_frenzy_tier4.jpg", defaultName = GetSpellInfo(422779)}, --feral 4pc tier 10.2
}
customItemList[394453] = {itemId = 195480, isPassive = true} --ring: Seal of Diurna's Chosen
customItemList[382135] = {itemId = 194308} --trinket: Manic Grieftorch
customItemList[382058] = {itemId = 194299} --trinket: Decoration of Flame (shield)
customItemList[382056] = {itemId = 194299} --trinket: Decoration of Flame
customItemList[382090] = {itemId = 194302} --trinket: Storm-Eater's Boon
customItemList[381967] = {itemId = 194305} --trinket: Controlled Current Technique
customItemList[382426] = {itemId = 194309, isPassive = true} --trinket: Spiteful Storm
customItemList[377455] = {itemId = 194304} --trinket: Iceblood Deathsnare
customItemList[377451] = {itemId = 194300} --trinket: Conjured Chillglobe
customItemList[382097] = {itemId = 194303} --trinket: Rumbling Ruby
customItemList[385903] = {itemId = 193639, isPassive = true} --trinket: Umbrelskul's Fractured Heart
customItemList[381475] = {itemId = 193769} --trinket: Erupting Spear Fragment
customItemList[388739] = {itemId = 193660, isPassive = true} --trinket: Idol of Pure Decay
customItemList[388855] = {itemId = 193678} --trinket: Miniature Singing Stone
customItemList[388755] = {itemId = 193677, isPassive = true} --trinket: Furious Ragefeather
customItemList[383934] = {itemId = 193736} --trinket: Water's Beating Heart
customItemList[214052] = {itemId = 133641, isPassive = true} --trinket: Eye of Skovald
customItemList[214200] = {itemId = 133646} --trinket: Mote of Sanctification
customItemList[387036] = {itemId = 193748} --trinket: Kyrakka's Searing Embers (heal)
customItemList[397376] = {itemId = 193748, isPassive = true} --trinket: Kyrakka's Searing Embers (damage)
customItemList[214985] = {itemId = 137486} --trinket: Windscar Whetstone
customItemList[384004] = {itemId = 193815} --trinket: Homeland Raid Horn
customItemList[377459] = {itemId = 194306} --trinket: All-Totem of the Master Fire Damage
customItemList[377461] = {itemId = 194306} --trinket: All-Totem of the Master Air Damage
customItemList[382133] = {itemId = 194306} --trinket: All-Totem of the Master Ice Damage
customItemList[377458] = {itemId = 194306} --trinket: All-Totem of the Master Earth Damage
customItemList[408815] = {itemId = 202569} --weapon: Djaruun, Pillar of the Elder Flame
customItemList[407961] = {itemId = 203996, isPassive = true} --trinket: Igneous Flowstone
customItemList[408682] = {itemId = 202610} --trinket: Dragonfire Bomb Dispenser
customItemList[401324] = {itemId = 202617, isPassive = true} --trinket: Elementium Pocket Anvil
customItemList[401306] = {itemId = 202617} --trinket: Elementium Pocket Anvil (use)
customItemList[402583] = {itemId = 203963} --trinket: Beacon to the Beyond
customItemList[384325] = {itemId = 193672, isPassive = true} --trinket: Frenzying Signoll Flare
customItemList[384290] = {itemId = 193672, isPassive = true} --trinket: Frenzying Signoll Flare (dot)
customItemList[388948] = {itemId = 193732} --trinket: Globe of Jagged Ice
customItemList[381760] = {itemId = 193786, isPassive = true} --trinket: Mutated Magmammoth Scale (melee)
customItemList[389839] = {itemId = 193757, isPassive = true} --trinket: Ruby Whelp Shell
customItemList[401428] = {itemId = 202615, isPassive = true} --trinket: Vessel of Searing Shadow
--10.2
customItemList[426672] = {itemId = 207168, isPassive = true, nameExtra = "(vers)", icon = [[Interface\AddOns\Details\images\spells\spell_druid_bearhug_blackwhite.jpg]]} --trinket: Pip's Emerald Friendship Badge urctos
customItemList[426674] = {itemId = 207168, isPassive = true, nameExtra = "(*vers*)", icon = 571585} --trinket: Pip's Emerald Friendship Badge urctos
customItemList[426676] = {itemId = 207168, isPassive = true, nameExtra = "(crit)", icon = [[Interface\AddOns\Details\images\spells\elf_face_right.jpg]]} --trinket: Pip's Emerald Friendship Badge aerwynn
customItemList[426677] = {itemId = 207168, isPassive = true, nameExtra = "(*crit*)", icon = 2403539} --trinket: Pip's Emerald Friendship Badge aerwynn
customItemList[426647] = {itemId = 207168, isPassive = true, nameExtra = "(mast)", icon = [[Interface\AddOns\Details\images\spells\lil_dragon_left.jpg]]} --trinket: Pip's Emerald Friendship Badge pip
customItemList[426648] = {itemId = 207168, isPassive = true, nameExtra = "(*mast*)", icon = 5342919} --trinket: Pip's Emerald Friendship Badge pip
customItemList[426431] = {itemId = 210494, isPassive = true} --enchant: Incandescent Essence (ranged dps)
customItemList[426486] = {itemId = 210494, isPassive = true} --enchant: Incandescent Essence (ranged dps)
customItemList[424965] = {itemId = 207784, isPassive = true} --weapon: Thorncaller Claw
customItemList[425181] = {itemId = 207784, isPassive = true, nameExtra = "(*aoe*)"} --weapon: Thorncaller Claw
customItemList[425127] = {itemId = 207783, isPassive = true} --weapon: Cruel Dreamcarver (heal)
customItemList[423611] = {itemId = 207167, isPassive = true, nameExtra = "*proc*"} --trinket: Ashes of the Embersoul (extra proc)
customItemList[426553] = {itemId = 208614, isPassive = true} --trinket: Augury of the Primal Flame
customItemList[426564] = {itemId = 208614, isPassive = true} --trinket: Augury of the Primal Flame (damage)
customItemList[425154] = {itemId = 207166, isPassive = true} --trinket: Cataclysmic Signet Brand
customItemList[427037] = {itemId = 207175, isPassive = true} --trinket: Coiled Serpent Idol
customItemList[421996] = {itemId = 207173, isPassive = true} --trinket: Gift of Ursine Vengeance
customItemList[421994] = {itemId = 207173, isPassive = true} --trinket: Gift of Ursine Vengeance (buff)
customItemList[422441] = {itemId = 207169, isPassive = true} --trinket: Branch of the Tormented Ancient (buff)
customItemList[417458] = {itemId = 207566, isPassive = true} --trinket: Accelerating Sandglass
customItemList[417452] = {itemId = 207566, isPassive = true} --trinket: Accelerating Sandglass (buff)
customItemList[214169] = {itemId = 136715, isPassive = true} --trinket: Spiked Counterweight
customItemList[92174] = {itemId = 133192, isPassive = true} --trinket: Porcelain Crab
customItemList[429262] = {itemId = 109999, isPassive = true} --trinket: Witherbark's Branch (buff)
customItemList[418527] = {itemId = 207581, isPassive = true} --trinket: Mirror of Fractured Tomorrows (buff)
customItemList[214342] = {itemId = 137312, isPassive = true} --trinket: Nightmare Egg Shell
customItemList[429246] = {itemId = 110004, isPassive = true} --trinket: Coagulated Genesaur Blood
customItemList[214350] = {itemId = 137306, isPassive = true} --trinket: Oakheart's Gnarled Root
customItemList[429221] = {itemId = 133201, isPassive = true} --trinket: Sea Star
customItemList[215270] = {itemId = 136714, isPassive = true} --trinket: Amalgam's Seventh Spine
customItemList[417534] = {itemId = 207579, isPassive = true} --trinket: Time-Thief's Gambit
customItemList[270827] = {itemId = 159610, isPassive = true} --trinket: Vessel of Skittering Shadows
customItemList[271671] = {itemId = 159631, isPassive = true} --trinket: Lady Waycrest's Music Box
customItemList[215407] = {itemId = 136716, isPassive = true} --trinket: Caged Horror
customItemList[213786] = {itemId = 137301, isPassive = true} --trinket: Corrupted Starlight
customItemList[427209] = {itemId = 208616, onUse = true, castId = 427113, defaultName = GetSpellInfo(427113)} --weapon: Dreambinder, Loom of the Great Cycle
customItemList[427161] = {itemId = 208615, onUse = true, castId = 422956, defaultName = GetSpellInfo(422956)} --trinket: Nymue's Unraveling Spindle
customItemList[425701] = {itemId = 207174, onUse = true, castId = 422750, defaultName = GetSpellInfo(422750)} --trinket: Fyrakk's Tainted Rageheart
customItemList[425509] = {itemId = 207169, onUse = true, castId = 422441, defaultName = GetSpellInfo(422441)} --trinket: Branch of the Tormented Ancient
customItemList[422146] = {itemId = 207172, onUse = true, castId = 422146, defaultName = GetSpellInfo(422146)} --trinket: Belor'relos, the Sunstone
customItemList[265953] = {itemId = 158319, onUse = true, castId = 265954, defaultName = GetSpellInfo(265953)} --trinket: My'das Talisman
customItemList[429257] = {itemId = 109999, onUse = true, castId = 429257, defaultName = GetSpellInfo(429257)} --trinket: Witherbark's Branch (no damage)
customItemList[427430] = {itemId = 207165, onUse = true, castId = 422146, defaultName = GetSpellInfo(422303), nameExtra = "*return*"} --trinket: Bandolier of Twisted Blades
customItemList[422303] = {itemId = 207165, onUse = true, castId = 422146, defaultName = GetSpellInfo(422303), nameExtra = "*throw*"} --trinket: Bandolier of Twisted Blades
customItemList[426898] = {itemId = 207167, onUse = true, castId = 423611, nameExtra = "*on use*", defaultName = GetSpellInfo(423611)} --trinket: Ashes of the Embersoul
customItemList[429271] = {itemId = 110009, onUse = true, castId = 429271, defaultName = GetSpellInfo(429271)} --trinket: Leaf of the Ancient Protectors
customItemList[429272] = {itemId = 110009, onUse = true, castId = 429271, nameExtra = "(*vers*)", defaultName = GetSpellInfo(429271)} --trinket: Leaf of the Ancient Protectors
customItemList[433522] = {itemId = 212684, isPassive = true} -- trinket: Umbrelskul's Fractured Heart dot
customItemList[433549] = {itemId = 212684, isPassive = true} -- trinket: Umbrelskul's Fractured Heart execute
end
defaultSpellCustomization = {
[1] = {name = _G["MELEE"], icon = [[Interface\ICONS\INV_Sword_04]]},
[2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\ICONS\INV_Weapon_Bow_07]]},
[3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]},
[4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]},
[5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]},
[6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]},
[7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]},
[8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]},
}
if (LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) then
for spellId, customTable in pairs(LIB_OPEN_RAID_SPELL_CUSTOM_NAMES) do
+302 -3860
View File
File diff suppressed because it is too large Load Diff
+24 -109
View File
@@ -34,38 +34,20 @@ function Details:CreateTestBars (alphabet, isArena)
local pclass = select(2, UnitClass("player"))
local actors_name = {
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1467},
{"Spiro", "EVOKER", 1468},
{"Spiro", "EVOKER", 1468},
{"Spiro", "EVOKER", 1468},
{"Spiro", "EVOKER", 1468},
{"Drakaris", "EVOKER", 1468},
{"Ragnaros", "MAGE", 63},
{"The Lich King", "DEATHKNIGHT", },
{"Your Neighbor", "SHAMAN", },
{"Your Raid Leader", "MONK", },
{"Huffer", "HUNTER", },
{"Your Internet Girlfriend", "SHAMAN", },
{"Mr. President", "WARRIOR", },
{"Ragnaros", "MAGE", 86},
{"The Lich King", "DEATHKNIGHT", },
{"Antonidas", "MAGE"},
{"Your Math Teacher", "SHAMAN", },
{"King Djoffrey", "PALADIN", },
{UnitName ("player") .. " Snow", pclass, },
{"A Drunk Dawrf", "MONK", },
{"Low Dps Guy", "MONK", },
{"Helvis Phresley", "DEATHKNIGHT", },
{"Stormwind Guard", "WARRIOR", },
{"A PvP Player", "ROGUE", 260},
{"Stormwind Guard", "WARRIOR", },
{"Bolvar Fordragon", "PALADIN", },
{"Malygos", "MAGE", },
{"Akama", "ROGUE", },
{"Nozdormu", "MAGE", },
{"Lady Blaumeux", "DEATHKNIGHT", },
{"Cairne Bloodhoof", "WARRIOR", },
{"Borivar", "ROGUE", 260},
{"Borivar", "ROGUE", 75},
{"C'Thun", "WARLOCK", },
{"Drek'Thar", "DEATHKNIGHT", },
{"Durotan", "WARRIOR", },
@@ -76,15 +58,14 @@ function Details:CreateTestBars (alphabet, isArena)
{"Fritz Fizzlesprocket", "HUNTER", },
{"Lisa Gallywix", "ROGUE", },
{"M'uru", "WARLOCK", },
{"Priestess MacDonnell", "PRIEST", },
{"Elune", "PRIEST", },
{"Nazgrel", "WARRIOR", },
{"Ner'zhul", "WARLOCK", },
{"Saria Nightwatcher", "PALADIN", },
{"Kael'thas Sunstrider", "MAGE", 63},
{"Kael'thas Sunstrider", "MAGE", 86},
{"Velen", "PRIEST"},
{"Tyrande Whisperwind", "PRIEST", 257},
{"Sargeras", "WARLOCK", 267},
{"Tyrande Whisperwind", "PRIEST", 77},
{"Sargeras", "WARLOCK", 89},
{"Arthas", "PALADIN", },
{"Orman of Stromgarde", "WARRIOR", },
{"General Rajaxx", "WARRIOR", },
@@ -92,10 +73,11 @@ function Details:CreateTestBars (alphabet, isArena)
{"Roland", "MAGE", },
{"Archmage Trelane", "MAGE", },
{"Lilian Voss", "ROGUE", },
{"Dutch", "HERO", },
}
local russian_actors_name = { --arial narrow
{"Экспортировать", "MAGE", 63},
{"Экспортировать", "MAGE", 86},
{"Готово", "DEATHKNIGHT", },
{"Создать", "SHAMAN", },
{"Текущий", "MONK", },
@@ -125,8 +107,8 @@ function Details:CreateTestBars (alphabet, isArena)
local cn_actor_name = { --GBK
{"打断", "PRIEST"},
{"恢复", "PRIEST", 257},
{"自动射击", "WARLOCK", 267},
{"恢复", "PRIEST", 77},
{"自动射击", "WARLOCK", 89},
{"平均", "PALADIN", },
{"团队", "WARRIOR", },
{"当前", "WARRIOR", },
@@ -199,47 +181,13 @@ function Details:CreateTestBars (alphabet, isArena)
robot.enemy = true
end
end
if (who[3]) then
robot:SetSpecId(who[3])
elseif (robot.classe == "DEATHKNIGHT") then
local specs = {250, 251, 252}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "DRUID") then
local specs = {102, 103, 104, 105}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "HUNTER") then
local specs = {253, 254, 255}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "MAGE") then
local specs = {62, 63, 64}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "MONK") then
local specs = {268, 269, 270}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "PALADIN") then
local specs = {65, 66, 70}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "PRIEST") then
local specs = {256, 257, 258}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "ROGUE") then
local specs = {259, 260, 261}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "SHAMAN") then
local specs = {262, 263, 264}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "WARLOCK") then
local specs = {265, 266, 267}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "WARRIOR") then
local specs = {71, 72, 73}
robot:SetSpecId(specs [math.random(1, #specs)])
robot.total = math.random(10000000, 20000000)
if robot.nome == "Dutch" then
robot.total = robot.total * 3 -- real
end
robot.total = math.random(10000000, 60000000)
robot.damage_taken = math.random(10000000, 60000000)
robot.friendlyfire_total = math.random(10000000, 60000000)
robot.damage_taken = math.random(10000000, 20000000)
robot.friendlyfire_total = math.random(10000000, 20000000)
total_damage = total_damage + robot.total
@@ -262,47 +210,14 @@ function Details:CreateTestBars (alphabet, isArena)
robot.grupo = true
robot.classe = who[2]
if (who[3]) then
robot:SetSpecId(who[3])
elseif (robot.classe == "DEATHKNIGHT") then
local specs = {250, 251, 252}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "DRUID") then
local specs = {102, 103, 104, 105}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "HUNTER") then
local specs = {253, 254, 255}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "MAGE") then
local specs = {62, 63, 64}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "MONK") then
local specs = {268, 269, 270}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "PALADIN") then
local specs = {65, 66, 70}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "PRIEST") then
local specs = {256, 257, 258}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "ROGUE") then
local specs = {259, 260, 261}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "SHAMAN") then
local specs = {262, 263, 264}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "WARLOCK") then
local specs = {265, 266, 267}
robot:SetSpecId(specs [math.random(1, #specs)])
elseif (robot.classe == "WARRIOR") then
local specs = {71, 72, 73}
robot:SetSpecId(specs [math.random(1, #specs)])
robot.total = math.random(10000000, 20000000)
if robot.nome == "Dutch" then
robot.total = robot.total * 3 -- real
end
robot.total = math.random(10000000, 60000000)
robot.totalover = math.random(10000000, 60000000)
robot.totalabsorb = math.random(10000000, 60000000)
robot.healing_taken = math.random(10000000, 60000000)
robot.totalover = math.random(10000000, 20000000)
robot.totalabsorb = math.random(10000000, 20000000)
robot.healing_taken = math.random(10000000, 20000000)
total_heal = total_heal + robot.total
+1 -1
View File
@@ -47,7 +47,7 @@
texture:SetPoint(anchor1, anchorFrame, anchor2, x, y)
end
fromTexture:SetColorTexture(0.0156, 0.047, 0.1215, 1)
fromTexture:SetTexture(0.0156, 0.047, 0.1215, 1)
end
function Details222.Textures.SavePortraitTextureForUnitID(unitId)