Merge branch 'IgnoreDFPhialCombatStart' of https://github.com/Flamanis/Details-Damage-Meter into IgnoreDFPhialCombatStart
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
name: Release AddOn
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
|
||||
# for github releases, this secret is automatically provided to the workflow
|
||||
|
||||
jobs:
|
||||
release: # "release" is a job, you can name it anything you want
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # reads history for commit changelog
|
||||
|
||||
- uses: BigWigsMods/packager@v2
|
||||
@@ -6,6 +6,9 @@
|
||||
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibWindow-1.1, LibDBIcon-1.0, NickTag-1.0, LibDataBroker-1.1, LibGraph-2.0
|
||||
## Version: #@project-version@
|
||||
|
||||
## X-Curse-Project-ID: 61284
|
||||
## X-Wago-ID: 25NRDlK3
|
||||
|
||||
#@no-lib-strip@
|
||||
Libs\libs.xml
|
||||
#@end-no-lib-strip@
|
||||
|
||||
+208
-3
@@ -15,7 +15,7 @@ local max = math.max
|
||||
|
||||
--api locals
|
||||
local PixelUtil = PixelUtil or DFPixelUtil
|
||||
local version = 12
|
||||
local version = 13
|
||||
|
||||
local CONST_MENU_TYPE_MAINMENU = "main"
|
||||
local CONST_MENU_TYPE_SUBMENU = "sub"
|
||||
@@ -1411,6 +1411,7 @@ function DF:CreateCoolTip()
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--build the sub menu when the cooltip is set to be a menu
|
||||
function gameCooltip:ShowSub(index)
|
||||
if (gameCooltip.OptionsTable.IgnoreSubMenu) then
|
||||
DF:FadeFrame(frame2, 1)
|
||||
@@ -1593,10 +1594,203 @@ function DF:CreateCoolTip()
|
||||
row.leftText:SetHeight(10)
|
||||
end
|
||||
|
||||
--when showing a tooltip, this function will build the second frame
|
||||
function gameCooltip:BuildTooltipSecondFrame()
|
||||
--get all sub tables for indexes in the main frame and store it into only one table
|
||||
local LeftTextTableSub = {}
|
||||
for mainFrameIndex, subTable in pairs(gameCooltip.LeftTextTableSub) do
|
||||
for subIndex, subTable2 in ipairs(subTable) do
|
||||
LeftTextTableSub[#LeftTextTableSub+1] = subTable2
|
||||
end
|
||||
end
|
||||
|
||||
local RightTextTableSub = {}
|
||||
for mainFrameIndex, subTable in pairs(gameCooltip.RightTextTableSub) do
|
||||
for subIndex, subTable2 in ipairs(subTable) do
|
||||
RightTextTableSub[#RightTextTableSub+1] = subTable2
|
||||
end
|
||||
end
|
||||
|
||||
local LeftIconTableSub = {}
|
||||
for mainFrameIndex, subTable in pairs(gameCooltip.LeftIconTableSub) do
|
||||
for subIndex, subTable2 in ipairs(subTable) do
|
||||
LeftIconTableSub[#LeftIconTableSub+1] = subTable2
|
||||
end
|
||||
end
|
||||
|
||||
local RightIconTableSub = {}
|
||||
for mainFrameIndex, subTable in pairs(gameCooltip.RightIconTableSub) do
|
||||
for subIndex, subTable2 in ipairs(subTable) do
|
||||
RightIconTableSub[#RightIconTableSub+1] = subTable2
|
||||
end
|
||||
end
|
||||
|
||||
local StatusBarTableSub = {}
|
||||
for mainFrameIndex, subTable in pairs(gameCooltip.StatusBarTableSub) do
|
||||
for subIndex, subTable2 in ipairs(subTable) do
|
||||
StatusBarTableSub[#StatusBarTableSub+1] = subTable2
|
||||
end
|
||||
end
|
||||
|
||||
local WallpaperTableSub = {}
|
||||
for mainFrameIndex, subTable in pairs(gameCooltip.WallpaperTableSub) do
|
||||
for subIndex, subTable2 in ipairs(subTable) do
|
||||
WallpaperTableSub[#WallpaperTableSub+1] = subTable2
|
||||
end
|
||||
end
|
||||
|
||||
local TopIconTableSub = {}
|
||||
for mainFrameIndex, subTable in pairs(gameCooltip.TopIconTableSub) do
|
||||
for subIndex, subTable2 in ipairs(subTable) do
|
||||
TopIconTableSub[#TopIconTableSub+1] = subTable2
|
||||
end
|
||||
end
|
||||
|
||||
frame2:EnableMouse(false)
|
||||
|
||||
--width
|
||||
if (gameCooltip.OptionsTable.FixedWidth) then
|
||||
frame2:SetWidth(gameCooltip.OptionsTable.FixedWidth)
|
||||
end
|
||||
|
||||
frame2.w = gameCooltip.OptionsTable.FixedWidth or 0
|
||||
frame2.hHeight = 0
|
||||
frame2.hHeight = 0
|
||||
gameCooltip.active = true
|
||||
|
||||
for currentIndex = 1, #LeftTextTableSub do
|
||||
local button = frame2.Lines[currentIndex]
|
||||
if (not button) then
|
||||
button = gameCooltip:CreateButtonOnSecondFrame(currentIndex)
|
||||
end
|
||||
|
||||
button.index = currentIndex
|
||||
|
||||
button:Show()
|
||||
button.background:Hide()
|
||||
button:SetHeight(gameCooltip.OptionsTable.ButtonHeightMod or gameCooltip.default_height)
|
||||
|
||||
--clear registered click buttons
|
||||
button:RegisterForClicks()
|
||||
|
||||
--setup texts and icons
|
||||
gameCooltip:TextAndIcon(currentIndex, frame2, button, LeftTextTableSub[currentIndex], RightTextTableSub[currentIndex], LeftIconTableSub[currentIndex], RightIconTableSub[currentIndex])
|
||||
--setup statusbar
|
||||
gameCooltip:StatusBar(button, StatusBarTableSub[currentIndex])
|
||||
|
||||
currentIndex = currentIndex + 1
|
||||
end
|
||||
|
||||
--hide unused lines
|
||||
for i = #LeftTextTableSub+1, #frame2.Lines do
|
||||
frame2.Lines[i]:Hide()
|
||||
end
|
||||
|
||||
local spacing = 0
|
||||
if (gameCooltip.OptionsTable.YSpacingMod) then
|
||||
spacing = gameCooltip.OptionsTable.YSpacingMod
|
||||
end
|
||||
|
||||
--normalize height of all rows
|
||||
local heightValue = -6 + spacing + (gameCooltip.OptionsTable.ButtonsYMod or 0)
|
||||
for i = 1, #LeftTextTableSub do
|
||||
local menuButton = frame2.Lines[i]
|
||||
|
||||
menuButton:ClearAllPoints()
|
||||
menuButton:SetPoint("center", frame2, "center")
|
||||
menuButton:SetPoint("left", frame2, "left", -4, 0)
|
||||
menuButton:SetPoint("right", frame2, "right", 4, 0)
|
||||
|
||||
if (menuButton.divbar) then
|
||||
menuButton.divbar:Hide()
|
||||
menuButton.isDiv = false
|
||||
end
|
||||
|
||||
--height
|
||||
if (gameCooltip.OptionsTable.AlignAsBlizzTooltip) then
|
||||
local height = max(2, menuButton.leftText:GetStringHeight(), menuButton.rightText:GetStringHeight(), menuButton.leftIcon:GetHeight(), menuButton.rightIcon:GetHeight(), gameCooltip.OptionsTable.AlignAsBlizzTooltipForceHeight or 2)
|
||||
menuButton:SetHeight(height)
|
||||
menuButton:SetPoint("top", frame2, "top", 0, heightValue)
|
||||
heightValue = heightValue + (height * -1)
|
||||
|
||||
elseif (gameCooltip.OptionsTable.IgnoreButtonAutoHeight) then
|
||||
local height = max(menuButton.leftText:GetStringHeight(), menuButton.rightText:GetStringHeight(), menuButton.leftIcon:GetHeight(), menuButton.rightIcon:GetHeight())
|
||||
menuButton:SetHeight(height)
|
||||
menuButton:SetPoint("top", frame2, "top", 0, heightValue)
|
||||
heightValue = heightValue + (height * -1) + spacing + (gameCooltip.OptionsTable.ButtonsYMod or 0)
|
||||
|
||||
else
|
||||
menuButton:SetHeight(frame2.hHeight + (gameCooltip.OptionsTable.ButtonHeightMod or 0))
|
||||
menuButton:SetPoint("top", frame2, "top", 0, (((i-1) * frame2.hHeight) * -1) - 6 + (gameCooltip.OptionsTable.ButtonsYMod or 0) + spacing)
|
||||
end
|
||||
|
||||
if (gameCooltip.OptionsTable.YSpacingMod and not gameCooltip.OptionsTable.IgnoreButtonAutoHeight) then
|
||||
spacing = spacing + gameCooltip.OptionsTable.YSpacingMod
|
||||
end
|
||||
|
||||
menuButton:EnableMouse(false)
|
||||
end
|
||||
|
||||
if (not gameCooltip.OptionsTable.FixedWidth) then
|
||||
if (gameCooltip.Type == 2) then --with bars
|
||||
if (gameCooltip.OptionsTable.MinWidth) then
|
||||
local width = frame2.w + 34
|
||||
PixelUtil.SetWidth(frame2, math.max(width, gameCooltip.OptionsTable.MinWidth))
|
||||
else
|
||||
PixelUtil.SetWidth(frame2, frame2.w + 34)
|
||||
end
|
||||
else
|
||||
--width stability check
|
||||
local width = frame2.w + 24
|
||||
if (width > gameCooltip.LastSize - 5 and width < gameCooltip.LastSize + 5) then
|
||||
width = gameCooltip.LastSize
|
||||
else
|
||||
gameCooltip.LastSize = width
|
||||
end
|
||||
|
||||
if (gameCooltip.OptionsTable.MinWidth) then
|
||||
PixelUtil.SetWidth(frame2, math.max(width, gameCooltip.OptionsTable.MinWidth))
|
||||
else
|
||||
PixelUtil.SetWidth(frame2, width)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (gameCooltip.OptionsTable.FixedHeight) then
|
||||
PixelUtil.SetHeight(frame2, gameCooltip.OptionsTable.FixedHeight)
|
||||
else
|
||||
if (gameCooltip.OptionsTable.AlignAsBlizzTooltip) then
|
||||
PixelUtil.SetHeight(frame2, ((heightValue - 10) * -1) + (gameCooltip.OptionsTable.AlignAsBlizzTooltipFrameHeightOffset or 0))
|
||||
|
||||
elseif (gameCooltip.OptionsTable.IgnoreButtonAutoHeight) then
|
||||
PixelUtil.SetHeight(frame2, (heightValue + spacing) * -1)
|
||||
|
||||
else
|
||||
PixelUtil.SetHeight(frame2, max((frame2.hHeight * gameCooltip.Indexes) + 8 + ((gameCooltip.OptionsTable.ButtonsYMod or 0) * -1), 22))
|
||||
end
|
||||
end
|
||||
|
||||
if (gameCooltip.WallpaperTable[1]) then
|
||||
gameCooltip:SetupWallpaper(gameCooltip.WallpaperTable, frame2.frameWallpaper)
|
||||
else
|
||||
frame2.frameWallpaper:Hide()
|
||||
end
|
||||
|
||||
--unhide frame
|
||||
DF:FadeFrame(frame2, 0)
|
||||
|
||||
--fix sparks
|
||||
for i = 1, #LeftTextTableSub do
|
||||
local menuButton = frame2.Lines[i]
|
||||
menuButton:SetAlpha(1)
|
||||
if (menuButton.spark:IsShown() or menuButton.spark2:IsShown()) then
|
||||
gameCooltip:RefreshSpark(menuButton)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--~inicio ~start ~tooltip
|
||||
function gameCooltip:BuildTooltip()
|
||||
--hide sub frame
|
||||
DF:FadeFrame(frame2, 1)
|
||||
--hide select bar
|
||||
gameCooltip:HideSelectedTexture(frame1)
|
||||
|
||||
@@ -1740,6 +1934,14 @@ function DF:CreateCoolTip()
|
||||
gameCooltip:RefreshSpark(menuButton)
|
||||
end
|
||||
end
|
||||
|
||||
--check if there is something to show in the second frame
|
||||
if (gameCooltip.HaveSubMenu) then
|
||||
gameCooltip:BuildTooltipSecondFrame()
|
||||
else
|
||||
--hide sub frame
|
||||
DF:FadeFrame(frame2, 1)
|
||||
end
|
||||
end
|
||||
|
||||
function gameCooltip:CreateDivBar(button)
|
||||
@@ -2867,6 +3069,7 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
|
||||
--adds a line for tooltips
|
||||
--AddLine creates a new line on the tooltip
|
||||
function gameCooltip:AddLine(leftText, rightText, menuType, ColorR1, ColorG1, ColorB1, ColorA1, ColorR2, ColorG2, ColorB2, ColorA2, fontSize, fontFace, fontFlag)
|
||||
--check data integrity
|
||||
local leftTextType = type(leftText)
|
||||
@@ -2922,6 +3125,8 @@ function DF:CreateCoolTip()
|
||||
gameCooltip.IndexesSub[gameCooltip.Indexes] = 0
|
||||
end
|
||||
|
||||
--as a new line as been added, reset the amount of sub indexes
|
||||
--this key is only used within functions that add something to the tooltip
|
||||
gameCooltip.SubIndexes = 0
|
||||
|
||||
frameTableLeft = gameCooltip.LeftTextTable
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 410
|
||||
local dversion = 412
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary(major, minor)
|
||||
|
||||
|
||||
+25
-13
@@ -1971,16 +1971,25 @@ function detailsFramework:CreateScaleBar(frame, config) --~scale
|
||||
end
|
||||
|
||||
local no_options = {}
|
||||
--[=[
|
||||
options available to panel_options:
|
||||
NoScripts = false, --if true, won't set OnMouseDown and OnMouseUp (won't be movable)
|
||||
NoTUISpecialFrame = false, --if true, won't add the frame to 'UISpecialFrames'
|
||||
DontRightClickClose = false, --if true, won't make the frame close when clicked with the right mouse button
|
||||
UseScaleBar = false, --if true, will create a scale bar in the top left corner (require a table on 'db' to save the scale)
|
||||
UseStatusBar = false, --if true, creates a status bar at the bottom of the frame (frame.StatusBar)
|
||||
NoCloseButton = false, --if true, won't show the close button
|
||||
NoTitleBar = false, --if true, don't create the title bar
|
||||
]=]
|
||||
|
||||
---create a simple panel with a title bar, a close button and a background
|
||||
---already has onmousedown and onmouseup scripts to make it movable
|
||||
---the panelOptions table can be used to set some options:
|
||||
---NoScripts = false, --if true, won't set OnMouseDown and OnMouseUp (won't be movable)
|
||||
---NoTUISpecialFrame = false, --if true, won't add the frame to 'UISpecialFrames'
|
||||
---DontRightClickClose = false, --if true, won't make the frame close when clicked with the right mouse button
|
||||
---UseScaleBar = false, --if true, will create a scale bar in the top left corner (require a table on 'db' to save the scale)
|
||||
---UseStatusBar = false, --if true, creates a status bar at the bottom of the frame (frame.StatusBar)
|
||||
---NoCloseButton = false, --if true, won't show the close button
|
||||
---NoTitleBar = false, --if true, don't create the title bar
|
||||
---@param parent table
|
||||
---@param width number|nil
|
||||
---@param height number|nil
|
||||
---@param title string|nil
|
||||
---@param frameName string|nil
|
||||
---@param panelOptions table|nil
|
||||
---@param savedVariableTable table|nil
|
||||
---@return table
|
||||
function detailsFramework:CreateSimplePanel(parent, width, height, title, frameName, panelOptions, savedVariableTable)
|
||||
if (savedVariableTable and frameName and not savedVariableTable[frameName]) then
|
||||
savedVariableTable[frameName] = {
|
||||
@@ -4474,8 +4483,11 @@ end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ~standard backdrop
|
||||
|
||||
function detailsFramework:ApplyStandardBackdrop(frame, solidColor, alphaScale)
|
||||
---this is the standard backdrop for detailsframework, it's a dark-ish color semi transparent with a thin opaque black border
|
||||
---@param frame table
|
||||
---@param bUseSolidColor any
|
||||
---@param alphaScale number
|
||||
function detailsFramework:ApplyStandardBackdrop(frame, bUseSolidColor, alphaScale)
|
||||
alphaScale = alphaScale or 0.95
|
||||
|
||||
if (not frame.SetBackdrop)then
|
||||
@@ -4485,7 +4497,7 @@ function detailsFramework:ApplyStandardBackdrop(frame, solidColor, alphaScale)
|
||||
|
||||
local red, green, blue, alpha = detailsFramework:GetDefaultBackdropColor()
|
||||
|
||||
if (solidColor) then
|
||||
if (bUseSolidColor) then
|
||||
local colorDeviation = 0.05
|
||||
frame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Buttons\WHITE8X8]], tileSize = 32, tile = true})
|
||||
frame:SetBackdropColor(red, green, blue, 0.872)
|
||||
|
||||
@@ -937,6 +937,7 @@ DF.CrowdControlSpells = {
|
||||
[61721] = "MAGE", --Polymorph Rabbit
|
||||
[28272] = "MAGE", --Polymorph Pig
|
||||
[277792] = "MAGE", --Polymorph Bumblebee
|
||||
[391622] = "MAGE", --Polymorph Duck
|
||||
[2139] = "MAGE", --Counterspell
|
||||
|
||||
[82691] = "MAGE", --Ring of Frost (debuff spellid)
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--global name declaration
|
||||
--local _StartDebugTime = debugprofilestop() print(debugprofilestop() - _StartDebugTime)
|
||||
--test if the packager will deploy to wago
|
||||
_ = nil
|
||||
_G._detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
local addonName, Details222 = ...
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 10403
|
||||
_detalhes.alpha_build_counter = 10403 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 10405
|
||||
_detalhes.alpha_build_counter = 10405 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.dont_open_news = true
|
||||
_detalhes.game_version = version
|
||||
_detalhes.userversion = version .. " " .. _detalhes.build_counter
|
||||
@@ -86,6 +87,16 @@ do
|
||||
|
||||
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
|
||||
|
||||
--Fixed load errors on Wrath.
|
||||
--Fixed enemy cast time in the death tooltip sometimes showing off time.
|
||||
--Allow negative offsets on Aligned Text Columns (Flamanis).
|
||||
--Remove multi-spec entries for shaman guessing (Flamanis).
|
||||
--More Demon hunter abilities added to be merged (Flamanis).
|
||||
--Added duck polymorph to Mage CCs (Flamanis).
|
||||
--Fixed an issue with some options not updating when the window is selected at the bottom right corner of the options panel (Flamanis).
|
||||
|
||||
|
||||
local news = {
|
||||
{"v10.0.2.10333.147", "Jan 04th, 2023"},
|
||||
|
||||
|
||||
@@ -374,6 +374,11 @@ function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
|
||||
--progress bar texture
|
||||
gameCooltip:SetOption("StatusBarTexture", statusbarTexture)
|
||||
|
||||
--for i = 1, 20 do
|
||||
-- gameCooltip:AddLine("What Info Could Go Here?", "Oh!", 2, "white")
|
||||
-- gameCooltip:AddIcon("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 2, 1, 16, 16, .75, 1, 0, 1)
|
||||
--end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
+301
-354
File diff suppressed because it is too large
Load Diff
@@ -83,7 +83,7 @@ function Details.options.InitializeOptionsWindow(instance)
|
||||
if (not instance:IsEnabled() or not instance:IsStarted()) then
|
||||
_detalhes.CriarInstancia (_, _, instance.meu_id)
|
||||
end
|
||||
Details.options.SetCurrentInstance(instance)
|
||||
Details.options.SetCurrentInstanceAndRefresh(instance)
|
||||
f.updateMicroFrames()
|
||||
end
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ function Details.options.SetCurrentInstanceAndRefresh(instance)
|
||||
sectionFrame:RefreshOptions()
|
||||
end
|
||||
end
|
||||
Details.options.UpdateAutoHideSettings(instance)
|
||||
end
|
||||
|
||||
function Details.options.UpdateAutoHideSettings(instance)
|
||||
|
||||
+218
-200
@@ -396,6 +396,10 @@ do
|
||||
local bossInfoTable = {} --[bossId] = bossInfo
|
||||
local raidInfoTable = {}
|
||||
|
||||
if (not EncounterJournal_LoadUI) then
|
||||
return bossIndexedTable, bossInfoTable, raidInfoTable
|
||||
end
|
||||
|
||||
if (not EncounterJournal) then
|
||||
EncounterJournal_LoadUI()
|
||||
end
|
||||
@@ -540,250 +544,264 @@ do
|
||||
return
|
||||
end
|
||||
|
||||
if (not EncounterJournal_LoadUI) then
|
||||
return
|
||||
end
|
||||
|
||||
--todo generate encounter spells cache
|
||||
|
||||
--check if the encounter journal added is loaded
|
||||
if (not EncounterJournal) then
|
||||
EncounterJournal_LoadUI()
|
||||
end
|
||||
|
||||
hooksecurefunc("EncounterJournal_OpenJournalLink", Details222.EJCache.OnClickEncounterJournalLink)
|
||||
|
||||
do
|
||||
--iterate among all raid instances, by passing true in the second argument of EJ_GetInstanceByIndex, indicates to the API we want to get raid instances
|
||||
local bGetRaidInstances = true
|
||||
|
||||
EncounterJournalRaidTab:Click()
|
||||
EncounterJournal_TierDropDown_Select(_, 10) --select Dragonflight
|
||||
|
||||
for instanceIndex = 10, 2, -1 do
|
||||
local journalInstanceID, instanceName, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID = EJ_GetInstanceByIndex(instanceIndex, bGetRaidInstances)
|
||||
|
||||
if (journalInstanceID) then
|
||||
--tell the encounter journal to display the raid instance by the instanceId
|
||||
EncounterJournal_DisplayInstance(journalInstanceID)
|
||||
|
||||
--build a table with data of the raid instance
|
||||
local instanceData = {
|
||||
name = instanceName,
|
||||
mapId = dungeonAreaMapID,
|
||||
bgImage = bgImage,
|
||||
instanceId = journalInstanceID,
|
||||
|
||||
encountersArray = {},
|
||||
encountersByName = {},
|
||||
encountersByDungeonEncounterId = {},
|
||||
encountersByJournalEncounterId = {},
|
||||
|
||||
icon = buttonImage1,
|
||||
iconSize = {70, 36},
|
||||
iconCoords = {0.01, .67, 0.025, .725},
|
||||
|
||||
iconLore = loreImage,
|
||||
iconLoreSize = {70, 36},
|
||||
iconLoreCoords = {0, 1, 0, 0.95},
|
||||
|
||||
iconTexture = buttonImage2,
|
||||
iconTextureSize = {70, 36},
|
||||
iconTextureCoords = {0, 1, 0, 0.95},
|
||||
}
|
||||
|
||||
--cache the raidData on different tables using different indexes
|
||||
Details222.EJCache.CacheRaidData_ByInstanceId[journalInstanceID] = instanceData
|
||||
Details222.EJCache.CacheRaidData_ByInstanceName[instanceName] = instanceData
|
||||
Details222.EJCache.CacheRaidData_ByMapId[dungeonAreaMapID] = instanceData
|
||||
|
||||
for encounterIndex = 1, 20 do
|
||||
local name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, UiMapID = _G.EJ_GetEncounterInfoByIndex(encounterIndex, journalInstanceID)
|
||||
if (name) then
|
||||
|
||||
local encounterData = {
|
||||
name = name,
|
||||
mapId = dungeonAreaMapID,
|
||||
uiMapId = UiMapID,
|
||||
dungeonEncounterId = dungeonEncounterID,
|
||||
journalEncounterId = journalEncounterID,
|
||||
journalInstanceId = journalInstanceID,
|
||||
}
|
||||
|
||||
local journalEncounterCreatureId, creatureName, creatureDescription, creatureDisplayID, iconImage, uiModelSceneID = EJ_GetCreatureInfo(1, journalEncounterID)
|
||||
if (journalEncounterCreatureId) then
|
||||
encounterData.creatureName = creatureName
|
||||
encounterData.creatureIcon = iconImage
|
||||
encounterData.creatureId = journalEncounterCreatureId
|
||||
encounterData.creatureDisplayId = creatureDisplayID
|
||||
encounterData.creatureUIModelSceneId = uiModelSceneID
|
||||
end
|
||||
|
||||
instanceData.encountersArray[#instanceData.encountersArray+1] = encounterData
|
||||
instanceData.encountersByName[name] = encounterData
|
||||
instanceData.encountersByDungeonEncounterId[dungeonEncounterID] = encounterData
|
||||
instanceData.encountersByJournalEncounterId[journalEncounterID] = encounterData
|
||||
end
|
||||
end
|
||||
end
|
||||
--delay the cache createation as it is not needed right away
|
||||
--createEJCache() will check if encounter journal is loaded, if not it will load it and then create the cache
|
||||
local createEJCache = function()
|
||||
--check if the encounter journal added is loaded
|
||||
if (not EncounterJournal) then
|
||||
--local startTime = debugprofilestop()
|
||||
EncounterJournal_LoadUI()
|
||||
--local endTime = debugprofilestop()
|
||||
--print("DE loading EJ:", endTime - startTime)
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local bGetRaidInstances = false
|
||||
EncounterJournalDungeonTab:Click()
|
||||
EncounterJournal_TierDropDown_Select(_, 11) --select mythic+
|
||||
hooksecurefunc("EncounterJournal_OpenJournalLink", Details222.EJCache.OnClickEncounterJournalLink)
|
||||
|
||||
for instanceIndex = 20, 1, -1 do
|
||||
local journalInstanceID, instanceName, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID = EJ_GetInstanceByIndex(instanceIndex, bGetRaidInstances)
|
||||
do
|
||||
--iterate among all raid instances, by passing true in the second argument of EJ_GetInstanceByIndex, indicates to the API we want to get raid instances
|
||||
local bGetRaidInstances = true
|
||||
|
||||
if (journalInstanceID) then
|
||||
--tell the encounter journal to display the dungeon instance by the instanceId
|
||||
EncounterJournal_DisplayInstance(journalInstanceID)
|
||||
EncounterJournalRaidTab:Click()
|
||||
EncounterJournal_TierDropDown_Select(_, 10) --select Dragonflight
|
||||
|
||||
--build a table with data of the raid instance
|
||||
local instanceData = {
|
||||
name = instanceName,
|
||||
mapId = dungeonAreaMapID,
|
||||
bgImage = bgImage,
|
||||
instanceId = journalInstanceID,
|
||||
for instanceIndex = 10, 2, -1 do
|
||||
local journalInstanceID, instanceName, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID = EJ_GetInstanceByIndex(instanceIndex, bGetRaidInstances)
|
||||
|
||||
encountersArray = {},
|
||||
encountersByName = {},
|
||||
encountersByDungeonEncounterId = {},
|
||||
encountersByJournalEncounterId = {},
|
||||
if (journalInstanceID) then
|
||||
--tell the encounter journal to display the raid instance by the instanceId
|
||||
EncounterJournal_DisplayInstance(journalInstanceID)
|
||||
|
||||
icon = buttonImage1,
|
||||
iconSize = {70, 36},
|
||||
iconCoords = {0.01, .67, 0.025, .725},
|
||||
--build a table with data of the raid instance
|
||||
local instanceData = {
|
||||
name = instanceName,
|
||||
mapId = dungeonAreaMapID,
|
||||
bgImage = bgImage,
|
||||
instanceId = journalInstanceID,
|
||||
|
||||
iconLore = loreImage,
|
||||
iconLoreSize = {70, 36},
|
||||
iconLoreCoords = {0, 1, 0, 0.95},
|
||||
encountersArray = {},
|
||||
encountersByName = {},
|
||||
encountersByDungeonEncounterId = {},
|
||||
encountersByJournalEncounterId = {},
|
||||
|
||||
iconTexture = buttonImage2,
|
||||
iconTextureSize = {70, 36},
|
||||
iconTextureCoords = {0, 1, 0, 0.95},
|
||||
}
|
||||
icon = buttonImage1,
|
||||
iconSize = {70, 36},
|
||||
iconCoords = {0.01, .67, 0.025, .725},
|
||||
|
||||
--cache the raidData on different tables using different indexes
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceId[journalInstanceID] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceName[instanceName] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByMapId[dungeonAreaMapID] = instanceData
|
||||
iconLore = loreImage,
|
||||
iconLoreSize = {70, 36},
|
||||
iconLoreCoords = {0, 1, 0, 0.95},
|
||||
|
||||
--iterate among all encounters of the dungeon instance
|
||||
for encounterIndex = 1, 20 do
|
||||
local name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, UiMapID = _G.EJ_GetEncounterInfoByIndex(encounterIndex, journalInstanceID)
|
||||
if (name) then
|
||||
iconTexture = buttonImage2,
|
||||
iconTextureSize = {70, 36},
|
||||
iconTextureCoords = {0, 1, 0, 0.95},
|
||||
}
|
||||
|
||||
local encounterData = {
|
||||
name = name,
|
||||
mapId = dungeonAreaMapID,
|
||||
uiMapId = UiMapID,
|
||||
dungeonEncounterId = dungeonEncounterID,
|
||||
journalEncounterId = journalEncounterID,
|
||||
journalInstanceId = journalInstanceID,
|
||||
}
|
||||
--cache the raidData on different tables using different indexes
|
||||
Details222.EJCache.CacheRaidData_ByInstanceId[journalInstanceID] = instanceData
|
||||
Details222.EJCache.CacheRaidData_ByInstanceName[instanceName] = instanceData
|
||||
Details222.EJCache.CacheRaidData_ByMapId[dungeonAreaMapID] = instanceData
|
||||
|
||||
local journalEncounterCreatureId, creatureName, creatureDescription, creatureDisplayID, iconImage, uiModelSceneID = EJ_GetCreatureInfo(1, journalEncounterID)
|
||||
if (journalEncounterCreatureId) then
|
||||
encounterData.creatureName = creatureName
|
||||
encounterData.creatureIcon = iconImage
|
||||
encounterData.creatureId = journalEncounterCreatureId
|
||||
encounterData.creatureDisplayId = creatureDisplayID
|
||||
encounterData.creatureUIModelSceneId = uiModelSceneID
|
||||
for encounterIndex = 1, 20 do
|
||||
local name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, UiMapID = _G.EJ_GetEncounterInfoByIndex(encounterIndex, journalInstanceID)
|
||||
if (name) then
|
||||
|
||||
local encounterData = {
|
||||
name = name,
|
||||
mapId = dungeonAreaMapID,
|
||||
uiMapId = UiMapID,
|
||||
dungeonEncounterId = dungeonEncounterID,
|
||||
journalEncounterId = journalEncounterID,
|
||||
journalInstanceId = journalInstanceID,
|
||||
}
|
||||
|
||||
local journalEncounterCreatureId, creatureName, creatureDescription, creatureDisplayID, iconImage, uiModelSceneID = EJ_GetCreatureInfo(1, journalEncounterID)
|
||||
if (journalEncounterCreatureId) then
|
||||
encounterData.creatureName = creatureName
|
||||
encounterData.creatureIcon = iconImage
|
||||
encounterData.creatureId = journalEncounterCreatureId
|
||||
encounterData.creatureDisplayId = creatureDisplayID
|
||||
encounterData.creatureUIModelSceneId = uiModelSceneID
|
||||
end
|
||||
|
||||
instanceData.encountersArray[#instanceData.encountersArray+1] = encounterData
|
||||
instanceData.encountersByName[name] = encounterData
|
||||
instanceData.encountersByDungeonEncounterId[dungeonEncounterID] = encounterData
|
||||
instanceData.encountersByJournalEncounterId[journalEncounterID] = encounterData
|
||||
end
|
||||
|
||||
instanceData.encountersArray[#instanceData.encountersArray+1] = encounterData
|
||||
instanceData.encountersByName[name] = encounterData
|
||||
instanceData.encountersByDungeonEncounterId[dungeonEncounterID] = encounterData
|
||||
instanceData.encountersByJournalEncounterId[journalEncounterID] = encounterData
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
EncounterJournal_TierDropDown_Select(_, 10) --select Dragonflight
|
||||
do
|
||||
local bGetRaidInstances = false
|
||||
EncounterJournalDungeonTab:Click()
|
||||
EncounterJournal_TierDropDown_Select(_, 11) --select mythic+
|
||||
|
||||
for instanceIndex = 20, 1, -1 do
|
||||
local journalInstanceID, instanceName, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID = EJ_GetInstanceByIndex(instanceIndex, bGetRaidInstances)
|
||||
for instanceIndex = 20, 1, -1 do
|
||||
local journalInstanceID, instanceName, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID = EJ_GetInstanceByIndex(instanceIndex, bGetRaidInstances)
|
||||
|
||||
if (journalInstanceID and not Details222.EJCache.CacheDungeonData_ByInstanceId[journalInstanceID]) then
|
||||
--tell the encounter journal to display the dungeon instance by the instanceId
|
||||
EncounterJournal_DisplayInstance(journalInstanceID)
|
||||
if (journalInstanceID) then
|
||||
--tell the encounter journal to display the dungeon instance by the instanceId
|
||||
EncounterJournal_DisplayInstance(journalInstanceID)
|
||||
|
||||
--build a table with data of the raid instance
|
||||
local instanceData = {
|
||||
name = instanceName,
|
||||
mapId = dungeonAreaMapID,
|
||||
bgImage = bgImage,
|
||||
instanceId = journalInstanceID,
|
||||
--build a table with data of the raid instance
|
||||
local instanceData = {
|
||||
name = instanceName,
|
||||
mapId = dungeonAreaMapID,
|
||||
bgImage = bgImage,
|
||||
instanceId = journalInstanceID,
|
||||
|
||||
encountersArray = {},
|
||||
encountersByName = {},
|
||||
encountersByDungeonEncounterId = {},
|
||||
encountersByJournalEncounterId = {},
|
||||
encountersArray = {},
|
||||
encountersByName = {},
|
||||
encountersByDungeonEncounterId = {},
|
||||
encountersByJournalEncounterId = {},
|
||||
|
||||
icon = buttonImage1,
|
||||
iconSize = {70, 36},
|
||||
iconCoords = {0.01, .67, 0.025, .725},
|
||||
icon = buttonImage1,
|
||||
iconSize = {70, 36},
|
||||
iconCoords = {0.01, .67, 0.025, .725},
|
||||
|
||||
iconLore = loreImage,
|
||||
iconLoreSize = {70, 36},
|
||||
iconLoreCoords = {0, 1, 0, 0.95},
|
||||
iconLore = loreImage,
|
||||
iconLoreSize = {70, 36},
|
||||
iconLoreCoords = {0, 1, 0, 0.95},
|
||||
|
||||
iconTexture = buttonImage2,
|
||||
iconTextureSize = {70, 36},
|
||||
iconTextureCoords = {0, 1, 0, 0.95},
|
||||
}
|
||||
iconTexture = buttonImage2,
|
||||
iconTextureSize = {70, 36},
|
||||
iconTextureCoords = {0, 1, 0, 0.95},
|
||||
}
|
||||
|
||||
--cache the raidData on different tables using different indexes
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceId[journalInstanceID] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceName[instanceName] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByMapId[dungeonAreaMapID] = instanceData
|
||||
--cache the raidData on different tables using different indexes
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceId[journalInstanceID] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceName[instanceName] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByMapId[dungeonAreaMapID] = instanceData
|
||||
|
||||
--iterate among all encounters of the dungeon instance
|
||||
for encounterIndex = 1, 20 do
|
||||
local name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, UiMapID = _G.EJ_GetEncounterInfoByIndex(encounterIndex, journalInstanceID)
|
||||
if (name) then
|
||||
--iterate among all encounters of the dungeon instance
|
||||
for encounterIndex = 1, 20 do
|
||||
local name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, UiMapID = _G.EJ_GetEncounterInfoByIndex(encounterIndex, journalInstanceID)
|
||||
if (name) then
|
||||
|
||||
local encounterData = {
|
||||
name = name,
|
||||
mapId = dungeonAreaMapID,
|
||||
uiMapId = UiMapID,
|
||||
dungeonEncounterId = dungeonEncounterID,
|
||||
journalEncounterId = journalEncounterID,
|
||||
journalInstanceId = journalInstanceID,
|
||||
}
|
||||
local encounterData = {
|
||||
name = name,
|
||||
mapId = dungeonAreaMapID,
|
||||
uiMapId = UiMapID,
|
||||
dungeonEncounterId = dungeonEncounterID,
|
||||
journalEncounterId = journalEncounterID,
|
||||
journalInstanceId = journalInstanceID,
|
||||
}
|
||||
|
||||
local journalEncounterCreatureId, creatureName, creatureDescription, creatureDisplayID, iconImage, uiModelSceneID = EJ_GetCreatureInfo(1, journalEncounterID)
|
||||
if (journalEncounterCreatureId) then
|
||||
encounterData.creatureName = creatureName
|
||||
encounterData.creatureIcon = iconImage
|
||||
encounterData.creatureId = journalEncounterCreatureId
|
||||
encounterData.creatureDisplayId = creatureDisplayID
|
||||
encounterData.creatureUIModelSceneId = uiModelSceneID
|
||||
local journalEncounterCreatureId, creatureName, creatureDescription, creatureDisplayID, iconImage, uiModelSceneID = EJ_GetCreatureInfo(1, journalEncounterID)
|
||||
if (journalEncounterCreatureId) then
|
||||
encounterData.creatureName = creatureName
|
||||
encounterData.creatureIcon = iconImage
|
||||
encounterData.creatureId = journalEncounterCreatureId
|
||||
encounterData.creatureDisplayId = creatureDisplayID
|
||||
encounterData.creatureUIModelSceneId = uiModelSceneID
|
||||
end
|
||||
|
||||
instanceData.encountersArray[#instanceData.encountersArray+1] = encounterData
|
||||
instanceData.encountersByName[name] = encounterData
|
||||
instanceData.encountersByDungeonEncounterId[dungeonEncounterID] = encounterData
|
||||
instanceData.encountersByJournalEncounterId[journalEncounterID] = encounterData
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
instanceData.encountersArray[#instanceData.encountersArray+1] = encounterData
|
||||
instanceData.encountersByName[name] = encounterData
|
||||
instanceData.encountersByDungeonEncounterId[dungeonEncounterID] = encounterData
|
||||
instanceData.encountersByJournalEncounterId[journalEncounterID] = encounterData
|
||||
EncounterJournal_TierDropDown_Select(_, 10) --select Dragonflight
|
||||
|
||||
for instanceIndex = 20, 1, -1 do
|
||||
local journalInstanceID, instanceName, description, bgImage, buttonImage1, loreImage, buttonImage2, dungeonAreaMapID = EJ_GetInstanceByIndex(instanceIndex, bGetRaidInstances)
|
||||
|
||||
if (journalInstanceID and not Details222.EJCache.CacheDungeonData_ByInstanceId[journalInstanceID]) then
|
||||
--tell the encounter journal to display the dungeon instance by the instanceId
|
||||
EncounterJournal_DisplayInstance(journalInstanceID)
|
||||
|
||||
--build a table with data of the raid instance
|
||||
local instanceData = {
|
||||
name = instanceName,
|
||||
mapId = dungeonAreaMapID,
|
||||
bgImage = bgImage,
|
||||
instanceId = journalInstanceID,
|
||||
|
||||
encountersArray = {},
|
||||
encountersByName = {},
|
||||
encountersByDungeonEncounterId = {},
|
||||
encountersByJournalEncounterId = {},
|
||||
|
||||
icon = buttonImage1,
|
||||
iconSize = {70, 36},
|
||||
iconCoords = {0.01, .67, 0.025, .725},
|
||||
|
||||
iconLore = loreImage,
|
||||
iconLoreSize = {70, 36},
|
||||
iconLoreCoords = {0, 1, 0, 0.95},
|
||||
|
||||
iconTexture = buttonImage2,
|
||||
iconTextureSize = {70, 36},
|
||||
iconTextureCoords = {0, 1, 0, 0.95},
|
||||
}
|
||||
|
||||
--cache the raidData on different tables using different indexes
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceId[journalInstanceID] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByInstanceName[instanceName] = instanceData
|
||||
Details222.EJCache.CacheDungeonData_ByMapId[dungeonAreaMapID] = instanceData
|
||||
|
||||
--iterate among all encounters of the dungeon instance
|
||||
for encounterIndex = 1, 20 do
|
||||
local name, description, journalEncounterID, rootSectionID, link, journalInstanceID, dungeonEncounterID, UiMapID = _G.EJ_GetEncounterInfoByIndex(encounterIndex, journalInstanceID)
|
||||
if (name) then
|
||||
|
||||
local encounterData = {
|
||||
name = name,
|
||||
mapId = dungeonAreaMapID,
|
||||
uiMapId = UiMapID,
|
||||
dungeonEncounterId = dungeonEncounterID,
|
||||
journalEncounterId = journalEncounterID,
|
||||
journalInstanceId = journalInstanceID,
|
||||
}
|
||||
|
||||
local journalEncounterCreatureId, creatureName, creatureDescription, creatureDisplayID, iconImage, uiModelSceneID = EJ_GetCreatureInfo(1, journalEncounterID)
|
||||
if (journalEncounterCreatureId) then
|
||||
encounterData.creatureName = creatureName
|
||||
encounterData.creatureIcon = iconImage
|
||||
encounterData.creatureId = journalEncounterCreatureId
|
||||
encounterData.creatureDisplayId = creatureDisplayID
|
||||
encounterData.creatureUIModelSceneId = uiModelSceneID
|
||||
end
|
||||
|
||||
instanceData.encountersArray[#instanceData.encountersArray+1] = encounterData
|
||||
instanceData.encountersByName[name] = encounterData
|
||||
instanceData.encountersByDungeonEncounterId[dungeonEncounterID] = encounterData
|
||||
instanceData.encountersByJournalEncounterId[journalEncounterID] = encounterData
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--reset the dungeon journal to the default state
|
||||
C_Timer.After(0.5, function()
|
||||
EncounterJournal_ResetDisplay(nil, "none")
|
||||
end)
|
||||
|
||||
--EncounterJournal_OpenJournalLink(tag, jtype, id, difficultyID)
|
||||
--EncounterJournal_OpenJournal(difficultyID, instanceID, encounterID, sectionID, creatureID, itemID, tierIndex)
|
||||
end
|
||||
|
||||
--reset the dungeon journal to the default state
|
||||
C_Timer.After(0.5, function()
|
||||
EncounterJournal_ResetDisplay(nil, "none")
|
||||
end)
|
||||
--todo: should run one second after the player_login event or entering_world
|
||||
C_Timer.After(1, function()
|
||||
if (EncounterJournalSuggestTab) then
|
||||
--EncounterJournalSuggestTab:Click()
|
||||
if (not EncounterJournal_LoadUI) then
|
||||
return
|
||||
end
|
||||
createEJCache()
|
||||
end)
|
||||
|
||||
--EncounterJournal_OpenJournalLink(tag, jtype, id, difficultyID)
|
||||
--EncounterJournal_OpenJournal(difficultyID, instanceID, encounterID, sectionID, creatureID, itemID, tierIndex)
|
||||
|
||||
--local tooltipInfo = CreateBaseTooltipInfo("GetHyperlink", link, classID, specID);
|
||||
|
||||
end
|
||||
|
||||
@@ -20,11 +20,14 @@ local parseSectionInfoForSpellID = function(sectionInfo)
|
||||
end
|
||||
|
||||
|
||||
--this function is called when the player clicks on a link in the chat window to open a section in the encounter journal
|
||||
function Details222.EJCache.OnClickEncounterJournalLink(tag, journalType, id, difficultyId)
|
||||
journalType = tonumber(journalType)
|
||||
id = tonumber(id)
|
||||
difficultyId = tonumber(difficultyId)
|
||||
---this function is called when the player clicks on a link in the chat window to open a section in the encounter journal
|
||||
---Details! then will check if that spell linked did damage to the raid and show a small box with the damage done
|
||||
---@param tag any tag isn't used
|
||||
---@param journalTypeString string
|
||||
---@param idString string
|
||||
function Details222.EJCache.OnClickEncounterJournalLink(tag, journalTypeString, idString)
|
||||
local journalType = tonumber(journalTypeString)
|
||||
local id = tonumber(idString)
|
||||
|
||||
local instanceId, encounterId, sectionId, tierIndex = EJ_HandleLinkPath(journalType, id)
|
||||
if (sectionId) then
|
||||
|
||||
@@ -125,9 +125,7 @@ do
|
||||
|
||||
--Enhancement Shaman:
|
||||
[333974] = 263, --Fire Nova
|
||||
[117014] = 263, --Elemental Blast
|
||||
[51533] = 263, --Feral Spirit
|
||||
[378270] = 263, --Deeply Rooted Elements
|
||||
[384352] = 263, --Doom Winds
|
||||
[197214] = 263, --Sundering
|
||||
[114051] = 263, --Ascendance
|
||||
|
||||
Reference in New Issue
Block a user