bug fixes
This commit is contained in:
+92
-91
@@ -123,169 +123,170 @@ DF:Mixin(ButtonMetaFunctions, DF.ScriptHookMixin)
|
||||
ButtonMetaFunctions.GetMembers["textfont"] = gmember_textfont --alias
|
||||
ButtonMetaFunctions.GetMembers["textsize"] = gmember_textsize --alias
|
||||
|
||||
ButtonMetaFunctions.__index = function(_table, _member_requested)
|
||||
|
||||
local func = ButtonMetaFunctions.GetMembers [_member_requested]
|
||||
ButtonMetaFunctions.__index = function(object, key)
|
||||
local func = ButtonMetaFunctions.GetMembers[key]
|
||||
if (func) then
|
||||
return func (_table, _member_requested)
|
||||
return func(object, key)
|
||||
end
|
||||
|
||||
local fromMe = rawget(_table, _member_requested)
|
||||
if (fromMe) then
|
||||
return fromMe
|
||||
local alreadyHaveKey = rawget(object, key)
|
||||
if (alreadyHaveKey) then
|
||||
return alreadyHaveKey
|
||||
end
|
||||
|
||||
return ButtonMetaFunctions [_member_requested]
|
||||
return ButtonMetaFunctions[key]
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--tooltip
|
||||
local smember_tooltip = function(_object, _value)
|
||||
return _object:SetTooltip (_value)
|
||||
local smember_tooltip = function(object, value)
|
||||
return object:SetTooltip (value)
|
||||
end
|
||||
|
||||
--show
|
||||
local smember_show = function(_object, _value)
|
||||
if (_value) then
|
||||
return _object:Show()
|
||||
local smember_show = function(object, value)
|
||||
if (value) then
|
||||
return object:Show()
|
||||
else
|
||||
return _object:Hide()
|
||||
return object:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
--hide
|
||||
local smember_hide = function(_object, _value)
|
||||
if (not _value) then
|
||||
return _object:Show()
|
||||
local smember_hide = function(object, value)
|
||||
if (not value) then
|
||||
return object:Show()
|
||||
else
|
||||
return _object:Hide()
|
||||
return object:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
--frame width
|
||||
local smember_width = function(_object, _value)
|
||||
return _object.button:SetWidth(_value)
|
||||
local smember_width = function(object, value)
|
||||
return object.button:SetWidth(value)
|
||||
end
|
||||
|
||||
--frame height
|
||||
local smember_height = function(_object, _value)
|
||||
return _object.button:SetHeight(_value)
|
||||
local smember_height = function(object, value)
|
||||
return object.button:SetHeight(value)
|
||||
end
|
||||
|
||||
--text
|
||||
local smember_text = function(_object, _value)
|
||||
return _object.button.text:SetText(_value)
|
||||
local smember_text = function(object, value)
|
||||
return object.button.text:SetText(value)
|
||||
end
|
||||
|
||||
--function
|
||||
local smember_function = function(_object, _value)
|
||||
return rawset(_object, "func", _value)
|
||||
local smember_function = function(object, value)
|
||||
return rawset(object, "func", value)
|
||||
end
|
||||
|
||||
--param1
|
||||
local smember_param1 = function(_object, _value)
|
||||
return rawset(_object, "param1", _value)
|
||||
local smember_param1 = function(object, value)
|
||||
return rawset(object, "param1", value)
|
||||
end
|
||||
|
||||
--param2
|
||||
local smember_param2 = function(_object, _value)
|
||||
return rawset(_object, "param2", _value)
|
||||
local smember_param2 = function(object, value)
|
||||
return rawset(object, "param2", value)
|
||||
end
|
||||
|
||||
--text color
|
||||
local smember_textcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
return _object.button.text:SetTextColor(_value1, _value2, _value3, _value4)
|
||||
local smember_textcolor = function(object, value)
|
||||
local value1, value2, value3, value4 = DF:ParseColors(value)
|
||||
return object.button.text:SetTextColor(value1, value2, value3, value4)
|
||||
end
|
||||
|
||||
--text font
|
||||
local smember_textfont = function(_object, _value)
|
||||
return DF:SetFontFace (_object.button.text, _value)
|
||||
local smember_textfont = function(object, value)
|
||||
return DF:SetFontFace (object.button.text, value)
|
||||
end
|
||||
|
||||
--text size
|
||||
local smember_textsize = function(_object, _value)
|
||||
return DF:SetFontSize (_object.button.text, _value)
|
||||
local smember_textsize = function(object, value)
|
||||
return DF:SetFontSize (object.button.text, value)
|
||||
end
|
||||
|
||||
--texture
|
||||
local smember_texture = function(_object, _value)
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2, _value3, _value4 = unpack(_value)
|
||||
if (_value1) then
|
||||
_object.button:SetNormalTexture(_value1)
|
||||
local smember_texture = function(object, value)
|
||||
if (type(value) == "table") then
|
||||
local value1, value2, value3, value4 = unpack(value)
|
||||
if (value1) then
|
||||
object.button:SetNormalTexture(value1)
|
||||
end
|
||||
if (_value2) then
|
||||
_object.button:SetHighlightTexture(_value2, "ADD")
|
||||
if (value2) then
|
||||
object.button:SetHighlightTexture(value2, "ADD")
|
||||
end
|
||||
if (_value3) then
|
||||
_object.button:SetPushedTexture(_value3)
|
||||
if (value3) then
|
||||
object.button:SetPushedTexture(value3)
|
||||
end
|
||||
if (_value4) then
|
||||
_object.button:SetDisabledTexture (_value4)
|
||||
if (value4) then
|
||||
object.button:SetDisabledTexture(value4)
|
||||
end
|
||||
else
|
||||
_object.button:SetNormalTexture(_value)
|
||||
_object.button:SetHighlightTexture(_value, "ADD")
|
||||
_object.button:SetPushedTexture(_value)
|
||||
_object.button:SetDisabledTexture (_value)
|
||||
object.button:SetNormalTexture(value)
|
||||
object.button:SetHighlightTexture(value, "ADD")
|
||||
object.button:SetPushedTexture(value)
|
||||
object.button:SetDisabledTexture(value)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
--locked
|
||||
local smember_locked = function(_object, _value)
|
||||
if (_value) then
|
||||
_object.button:SetMovable(false)
|
||||
return rawset(_object, "is_locked", true)
|
||||
local smember_locked = function(object, value)
|
||||
if (value) then
|
||||
object.button:SetMovable(false)
|
||||
return rawset(object, "is_locked", true)
|
||||
else
|
||||
_object.button:SetMovable(true)
|
||||
rawset(_object, "is_locked", false)
|
||||
object.button:SetMovable(true)
|
||||
rawset(object, "is_locked", false)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
--text align
|
||||
local smember_textalign = function(_object, _value)
|
||||
if (_value == "left" or _value == "<") then
|
||||
_object.button.text:SetPoint("left", _object.button, "left", 2, 0)
|
||||
_object.capsule_textalign = "left"
|
||||
elseif (_value == "center" or _value == "|") then
|
||||
_object.button.text:SetPoint("center", _object.button, "center", 0, 0)
|
||||
_object.capsule_textalign = "center"
|
||||
elseif (_value == "right" or _value == ">") then
|
||||
_object.button.text:SetPoint("right", _object.button, "right", -2, 0)
|
||||
_object.capsule_textalign = "right"
|
||||
local smember_textalign = function(object, value)
|
||||
if (value == "left" or value == "<") then
|
||||
object.button.text:SetPoint("left", object.button, "left", 2, 0)
|
||||
object.capsule_textalign = "left"
|
||||
|
||||
elseif (value == "center" or value == "|") then
|
||||
object.button.text:SetPoint("center", object.button, "center", 0, 0)
|
||||
object.capsule_textalign = "center"
|
||||
|
||||
elseif (value == "right" or value == ">") then
|
||||
object.button.text:SetPoint("right", object.button, "right", -2, 0)
|
||||
object.capsule_textalign = "right"
|
||||
end
|
||||
end
|
||||
|
||||
ButtonMetaFunctions.SetMembers = ButtonMetaFunctions.SetMembers or {}
|
||||
ButtonMetaFunctions.SetMembers ["tooltip"] = smember_tooltip
|
||||
ButtonMetaFunctions.SetMembers ["show"] = smember_show
|
||||
ButtonMetaFunctions.SetMembers ["hide"] = smember_hide
|
||||
ButtonMetaFunctions.SetMembers ["width"] = smember_width
|
||||
ButtonMetaFunctions.SetMembers ["height"] = smember_height
|
||||
ButtonMetaFunctions.SetMembers ["text"] = smember_text
|
||||
ButtonMetaFunctions.SetMembers ["clickfunction"] = smember_function
|
||||
ButtonMetaFunctions.SetMembers ["param1"] = smember_param1
|
||||
ButtonMetaFunctions.SetMembers ["param2"] = smember_param2
|
||||
ButtonMetaFunctions.SetMembers ["textcolor"] = smember_textcolor
|
||||
ButtonMetaFunctions.SetMembers ["textfont"] = smember_textfont
|
||||
ButtonMetaFunctions.SetMembers ["textsize"] = smember_textsize
|
||||
ButtonMetaFunctions.SetMembers ["fontcolor"] = smember_textcolor--alias
|
||||
ButtonMetaFunctions.SetMembers ["fontface"] = smember_textfont--alias
|
||||
ButtonMetaFunctions.SetMembers ["fontsize"] = smember_textsize--alias
|
||||
ButtonMetaFunctions.SetMembers ["texture"] = smember_texture
|
||||
ButtonMetaFunctions.SetMembers ["locked"] = smember_locked
|
||||
ButtonMetaFunctions.SetMembers ["textalign"] = smember_textalign
|
||||
ButtonMetaFunctions.SetMembers= ButtonMetaFunctions.SetMembers or {}
|
||||
ButtonMetaFunctions.SetMembers["tooltip"] = smember_tooltip
|
||||
ButtonMetaFunctions.SetMembers["show"] = smember_show
|
||||
ButtonMetaFunctions.SetMembers["hide"] = smember_hide
|
||||
ButtonMetaFunctions.SetMembers["width"] = smember_width
|
||||
ButtonMetaFunctions.SetMembers["height"] = smember_height
|
||||
ButtonMetaFunctions.SetMembers["text"] = smember_text
|
||||
ButtonMetaFunctions.SetMembers["clickfunction"] = smember_function
|
||||
ButtonMetaFunctions.SetMembers["param1"] = smember_param1
|
||||
ButtonMetaFunctions.SetMembers["param2"] = smember_param2
|
||||
ButtonMetaFunctions.SetMembers["textcolor"] = smember_textcolor
|
||||
ButtonMetaFunctions.SetMembers["textfont"] = smember_textfont
|
||||
ButtonMetaFunctions.SetMembers["textsize"] = smember_textsize
|
||||
ButtonMetaFunctions.SetMembers["fontcolor"] = smember_textcolor--alias
|
||||
ButtonMetaFunctions.SetMembers["fontface"] = smember_textfont--alias
|
||||
ButtonMetaFunctions.SetMembers["fontsize"] = smember_textsize--alias
|
||||
ButtonMetaFunctions.SetMembers["texture"] = smember_texture
|
||||
ButtonMetaFunctions.SetMembers["locked"] = smember_locked
|
||||
ButtonMetaFunctions.SetMembers["textalign"] = smember_textalign
|
||||
|
||||
ButtonMetaFunctions.__newindex = function(_table, _key, _value)
|
||||
local func = ButtonMetaFunctions.SetMembers [_key]
|
||||
ButtonMetaFunctions.__newindex = function(object, key, value)
|
||||
local func = ButtonMetaFunctions.SetMembers[key]
|
||||
if (func) then
|
||||
return func (_table, _value)
|
||||
return func(object, value)
|
||||
else
|
||||
return rawset(_table, _key, _value)
|
||||
return rawset(object, key, value)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -1134,7 +1134,7 @@ function DF:CreateCoolTip()
|
||||
|
||||
function gameCooltip:RefreshSpark(menuButton)
|
||||
menuButton.spark:ClearAllPoints()
|
||||
menuButton.spark:SetPoint("LEFT", menuButton.statusbar, "LEFT", (menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth() / 100)) - 5, 0)
|
||||
menuButton.spark:SetPoint("left", menuButton.statusbar, "left", (menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth() / 100)) - 5, 0)
|
||||
menuButton.spark2:ClearAllPoints()
|
||||
menuButton.spark2:SetPoint("left", menuButton.statusbar, "left", menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth()/100) - 16, 0)
|
||||
end
|
||||
|
||||
@@ -2630,6 +2630,12 @@ end
|
||||
|
||||
DF.ClientLanguage = clientLanguage
|
||||
|
||||
function DF:DetectTextLanguage(text)
|
||||
for i = 1, #text do
|
||||
--or not
|
||||
end
|
||||
end
|
||||
|
||||
--returns which region the language the client is running, return "western", "russia" or "asia"
|
||||
function DF:GetClientRegion()
|
||||
if (clientLanguage == "zhCN" or clientLanguage == "koKR" or clientLanguage == "zhTW") then
|
||||
|
||||
+23
-26
@@ -421,8 +421,8 @@ DF:Mixin(DFSliderMetaFunctions, DF.ScriptHookMixin)
|
||||
buttonPlus:SetPushedTexture([[Interface\Buttons\UI-PlusButton-Down]])
|
||||
buttonMinor:SetPushedTexture([[Interface\Buttons\UI-MinusButton-Down]])
|
||||
|
||||
buttonPlus:SetDisabledTexture ([[Interface\Buttons\UI-PlusButton-Disabled]])
|
||||
buttonMinor:SetDisabledTexture ([[Interface\Buttons\UI-MinusButton-Disabled]])
|
||||
buttonPlus:SetDisabledTexture([[Interface\Buttons\UI-PlusButton-Disabled]])
|
||||
buttonMinor:SetDisabledTexture([[Interface\Buttons\UI-MinusButton-Disabled]])
|
||||
|
||||
buttonPlus:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||
buttonMinor:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||
@@ -1047,9 +1047,7 @@ function DF:CreateSlider (parent, w, h, min, max, step, defaultv, isDecemal, mem
|
||||
return slider, label
|
||||
end
|
||||
|
||||
function DF:NewSlider (parent, container, name, member, w, h, min, max, step, defaultv, isDecemal, isSwitch, with_label, slider_template, label_template)
|
||||
|
||||
--early checks
|
||||
function DF:NewSlider (parent, container, name, member, width, height, minValue, maxValue, step, defaultValue, isDecemal, isSwitch, with_label, slider_template, label_template)
|
||||
if (not name) then
|
||||
name = "DetailsFrameworkSlider" .. DF.SliderCounter
|
||||
DF.SliderCounter = DF.SliderCounter + 1
|
||||
@@ -1080,13 +1078,13 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
end
|
||||
|
||||
--defaults
|
||||
min = min or 1
|
||||
max = max or 2
|
||||
minValue = minValue or 1
|
||||
maxValue = maxValue or 2
|
||||
step = step or 1
|
||||
defaultv = defaultv or min
|
||||
defaultValue = defaultValue or minValue
|
||||
|
||||
w = w or 130
|
||||
h = h or 19
|
||||
width = width or 130
|
||||
height = height or 19
|
||||
|
||||
--default members:
|
||||
SliderObject.lockdown = false
|
||||
@@ -1098,40 +1096,40 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
SliderObject.useDecimals = isDecemal or false
|
||||
|
||||
if (SliderObject.useDecimals) then
|
||||
SliderObject.slider:SetValueStep (0.01)
|
||||
SliderObject.slider:SetValueStep(0.01)
|
||||
else
|
||||
SliderObject.slider:SetValueStep (step)
|
||||
SliderObject.slider:SetValueStep(step)
|
||||
end
|
||||
|
||||
if (not APISliderFunctions) then
|
||||
APISliderFunctions = true
|
||||
local idx = getmetatable(SliderObject.slider).__index
|
||||
for funcName, funcAddress in pairs(idx) do
|
||||
if (not DFSliderMetaFunctions [funcName]) then
|
||||
DFSliderMetaFunctions [funcName] = function(object, ...)
|
||||
if (not DFSliderMetaFunctions[funcName]) then
|
||||
DFSliderMetaFunctions[funcName] = function(object, ...)
|
||||
local x = loadstring ( "return _G['"..object.slider:GetName().."']:"..funcName.."(...)")
|
||||
return x (...)
|
||||
return x(...)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
SliderObject.slider.MyObject = SliderObject
|
||||
SliderObject.slider:SetWidth(w)
|
||||
SliderObject.slider:SetHeight(h)
|
||||
SliderObject.slider:SetWidth(width)
|
||||
SliderObject.slider:SetHeight(height)
|
||||
SliderObject.slider:SetOrientation ("horizontal")
|
||||
SliderObject.slider:SetMinMaxValues(min, max)
|
||||
SliderObject.slider:SetValue(defaultv)
|
||||
SliderObject.ivalue = defaultv
|
||||
SliderObject.slider:SetMinMaxValues(minValue, maxValue)
|
||||
SliderObject.slider:SetValue(defaultValue)
|
||||
SliderObject.ivalue = defaultValue
|
||||
|
||||
SliderObject.slider:SetBackdrop({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
|
||||
SliderObject.slider:SetBackdropColor(0.9, 0.7, 0.7, 1.0)
|
||||
|
||||
SliderObject.thumb = SliderObject.slider:CreateTexture(nil, "artwork")
|
||||
SliderObject.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||
SliderObject.thumb:SetSize(30+(h*0.2), h*1.2)
|
||||
SliderObject.thumb:SetSize(30 + (height * 0.2), height * 1.2)
|
||||
SliderObject.thumb.originalWidth = SliderObject.thumb:GetWidth()
|
||||
SliderObject.thumb.originalHeight =SliderObject.thumb:GetHeight()
|
||||
SliderObject.thumb.originalHeight = SliderObject.thumb:GetHeight()
|
||||
SliderObject.thumb:SetAlpha(0.7)
|
||||
SliderObject.slider:SetThumbTexture (SliderObject.thumb)
|
||||
SliderObject.slider.thumb = SliderObject.thumb
|
||||
@@ -1142,9 +1140,9 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
|
||||
SliderObject.amt = SliderObject.slider:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
|
||||
|
||||
local amt = defaultv
|
||||
local amt = defaultValue
|
||||
if (amt < 10 and amt >= 1) then
|
||||
amt = "0"..amt
|
||||
amt = "0" .. amt
|
||||
end
|
||||
|
||||
if (SliderObject.useDecimals) then
|
||||
@@ -1157,7 +1155,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
SliderObject.amt:SetPoint("center", SliderObject.thumb, "center")
|
||||
SliderObject.slider.amt = SliderObject.amt
|
||||
|
||||
SliderObject.previous_value = {defaultv or 0, 0, 0}
|
||||
SliderObject.previous_value = {defaultValue or 0, 0, 0}
|
||||
|
||||
--hooks
|
||||
SliderObject.HookList = {
|
||||
@@ -1200,7 +1198,6 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
||||
end
|
||||
|
||||
return SliderObject, with_label
|
||||
|
||||
end
|
||||
|
||||
DF.AdjustmentSliderOptions = {
|
||||
|
||||
@@ -43,10 +43,10 @@ TODO:
|
||||
- add into gear info how many tier set parts the player has
|
||||
- raid lockouts normal-heroic-mythic
|
||||
- soulbind character (covenant choise) - probably not used in 10.0
|
||||
|
||||
|
||||
BUGS:
|
||||
- after a /reload, it is not starting new tickers for spells under cooldown
|
||||
|
||||
|
||||
--]=]
|
||||
|
||||
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
|
||||
@@ -63,9 +63,11 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
|
||||
end
|
||||
|
||||
local major = "LibOpenRaid-1.0"
|
||||
local CONST_LIB_VERSION = 59
|
||||
local CONST_LIB_VERSION = 60
|
||||
LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
local unpack = table.unpack or _G.unpack
|
||||
|
||||
--declae the library within the LibStub
|
||||
local libStub = _G.LibStub
|
||||
local openRaidLib = libStub:NewLibrary(major, CONST_LIB_VERSION)
|
||||
@@ -322,15 +324,15 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
openRaidLib.Schedules = {
|
||||
registeredUniqueTimers = {}
|
||||
}
|
||||
|
||||
|
||||
--run a scheduled function with its payload
|
||||
local triggerScheduledTick = function(tickerObject)
|
||||
local payload = tickerObject.payload
|
||||
local callback = tickerObject.callback
|
||||
|
||||
local result, errortext = pcall(callback, _G.unpack(payload))
|
||||
|
||||
local result, errortext = xpcall(callback, geterrorhandler(), unpack(payload))
|
||||
if (not result) then
|
||||
sendChatMessage("openRaidLib: error on scheduler:", tickerObject.scheduleName, tickerObject.stack, errortext)
|
||||
sendChatMessage("openRaidLib: error on scheduler:", tickerObject.scheduleName, tickerObject.stack)
|
||||
end
|
||||
|
||||
if (tickerObject.isUnique) then
|
||||
@@ -455,15 +457,14 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
||||
local func = addonObject[functionName]
|
||||
|
||||
if (func) then
|
||||
--using pcall at the moment, should get a better caller in the future
|
||||
local okay, errorMessage = pcall(func, ...)
|
||||
local okay, errorMessage = xpcall(func, geterrorhandler(), ...)
|
||||
if (not okay) then
|
||||
sendChatMessage("error:", errorMessage)
|
||||
sendChatMessage("error on callback for event:", event)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function openRaidLib.RegisterCallback(addonObject, event, callbackMemberName)
|
||||
--check of integrity
|
||||
local integrity = checkRegisterDataIntegrity(addonObject, event, callbackMemberName)
|
||||
@@ -1211,7 +1212,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
||||
weaponEnchant = 0,
|
||||
noGems = {},
|
||||
noEnchants = {},
|
||||
}
|
||||
}
|
||||
|
||||
function openRaidLib.GetAllUnitsGear()
|
||||
return openRaidLib.GearManager.GetAllUnitsGear()
|
||||
@@ -1376,7 +1377,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
||||
--[2] int durability
|
||||
--[3] int weapon enchant
|
||||
--[4] table with integers of equipSlot without enchant
|
||||
--[5] table with integers of equipSlot which has a gem slot but the slot is empty
|
||||
--[5] table with integers of equipSlot which has a gem slot but the slot is empty
|
||||
|
||||
local dataToSend = CONST_COMM_GEARINFO_FULL_PREFIX .. ","
|
||||
local playerGearInfo = openRaidLib.GearManager.GetPlayerFullGearInfo()
|
||||
|
||||
@@ -323,21 +323,23 @@ elseif (isExpansion_Shadowlands()) then
|
||||
|
||||
elseif (isExpansion_Dragonflight()) then
|
||||
LIB_OPEN_RAID_BLOODLUST = {
|
||||
[2825] = true, --bloodlust
|
||||
[32182] = true, --heroism
|
||||
[80353] = true, --timewarp
|
||||
[90355] = true, --ancient hysteria
|
||||
[309658] = true, --current exp drums
|
||||
[2825] = true, --bloodlust (shaman)
|
||||
[32182] = true, --heroism (shaman)
|
||||
[80353] = true, --timewarp (mage)
|
||||
[90355] = true, --ancient hysteria (hunter)
|
||||
[309658] = true, --current exp drums (letherwork)
|
||||
--need to get the 30% haste buff from evokers
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
|
||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 347901
|
||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0 --need to update to dragonflight
|
||||
|
||||
LIB_OPEN_RAID_COVENANT_ICONS = {
|
||||
[[Interface\ICONS\UI_Sigil_Kyrian]], --kyrian
|
||||
[[Interface\ICONS\UI_Sigil_Venthyr]], --venthyr
|
||||
[[Interface\ICONS\UI_Sigil_NightFae]], --nightfae
|
||||
[[Interface\ICONS\UI_Sigil_Necrolord]], --necrolords
|
||||
--need to get the icon for the new 4 covanants in dragonflight
|
||||
--"Interface\\ICONS\\UI_Sigil_Kyrian", --kyrian
|
||||
--"Interface\\ICONS\\UI_Sigil_Venthyr", --venthyr
|
||||
--"Interface\\ICONS\\UI_Sigil_NightFae", --nightfae
|
||||
--"Interface\\ICONS\\UI_Sigil_Necrolord", --necrolords
|
||||
}
|
||||
|
||||
--which gear slots can be enchanted on the latest retail version of the game
|
||||
@@ -360,78 +362,68 @@ elseif (isExpansion_Dragonflight()) then
|
||||
-- local enchandId = select(3, strsplit(":", itemLink))
|
||||
-- print("enchantId:", enchandId)
|
||||
LIB_OPEN_RAID_ENCHANT_IDS = {
|
||||
--need to get this data to dragonflight
|
||||
--FEET
|
||||
--[6207] = INVSLOT_FEET, --[Enchant Boots - Speed of Soul]
|
||||
[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
|
||||
[6212] = INVSLOT_FEET, --[Enchant Boots - Agile Soulwalker] + 10 agi
|
||||
--[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
|
||||
--[6212] = INVSLOT_FEET, --[Enchant Boots - Agile Soulwalker] + 10 agi
|
||||
|
||||
--WRIST
|
||||
--[6222] = INVSLOT_WRIST, [Enchant Bracers - Shaded Hearthing]
|
||||
[6219] = INVSLOT_WRIST, --[Enchant Bracers - Illuminated Soul] + 10 int
|
||||
[6220] = INVSLOT_WRIST, --[Enchant Bracers - Eternal Intellect] + 15 int
|
||||
--[6219] = INVSLOT_WRIST, --[Enchant Bracers - Illuminated Soul] + 10 int
|
||||
--[6220] = INVSLOT_WRIST, --[Enchant Bracers - Eternal Intellect] + 15 int
|
||||
|
||||
--HAND
|
||||
--[6205] = INVSLOT_HAND, --[Enchant Gloves - Shadowlands Gathering]
|
||||
[6209] = INVSLOT_HAND, --[Enchant Gloves - Strength of Soul] +10 str
|
||||
[6210] = INVSLOT_HAND, --[Enchant Gloves - Eternal Strength] +15 str
|
||||
--[6209] = INVSLOT_HAND, --[Enchant Gloves - Strength of Soul] +10 str
|
||||
--[6210] = INVSLOT_HAND, --[Enchant Gloves - Eternal Strength] +15 str
|
||||
|
||||
--FINGER
|
||||
[6164] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Critical Strike] +16
|
||||
[6166] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Haste] +16
|
||||
[6168] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Mastery] +16
|
||||
[6170] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Versatility] +16
|
||||
--[6164] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Critical Strike] +16
|
||||
--[6166] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Haste] +16
|
||||
--[6168] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Mastery] +16
|
||||
--[6170] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Versatility] +16
|
||||
|
||||
--BACK
|
||||
[6202] = INVSLOT_BACK, --[Enchant Cloak - Fortified Speed] +20 stam +30 speed
|
||||
[6203] = INVSLOT_BACK, --[Enchant Cloak - Fortified Avoidance] +20 stam +30 avoidance
|
||||
[6204] = INVSLOT_BACK, --[Enchant Cloak - Fortified Leech]
|
||||
[6208] = INVSLOT_BACK, --[Enchant Cloak - Soul Vitality]
|
||||
--[6202] = INVSLOT_BACK, --[Enchant Cloak - Fortified Speed] +20 stam +30 speed
|
||||
--[6203] = INVSLOT_BACK, --[Enchant Cloak - Fortified Avoidance] +20 stam +30 avoidance
|
||||
--[6204] = INVSLOT_BACK, --[Enchant Cloak - Fortified Leech]
|
||||
--[6208] = INVSLOT_BACK, --[Enchant Cloak - Soul Vitality]
|
||||
|
||||
--CHEST
|
||||
[6213] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bulwark] +25 armor +20 agi or str
|
||||
[6214] = INVSLOT_CHEST, --[Enchant Chest - Eternal Skirmish] +20 agi or str +more white damage
|
||||
[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
|
||||
[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
|
||||
[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
|
||||
--[6213] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bulwark] +25 armor +20 agi or str
|
||||
--[6214] = INVSLOT_CHEST, --[Enchant Chest - Eternal Skirmish] +20 agi or str +more white damage
|
||||
--[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
|
||||
--[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
|
||||
--[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
|
||||
|
||||
--MAINHAND
|
||||
[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
|
||||
[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
|
||||
[6227] = INVSLOT_MAINHAND, --[Enchant Weapon - Ascended Vigor] + healing received increased
|
||||
[6228] = INVSLOT_MAINHAND, --[Enchant Weapon - Sinful Revelation] + 6% bleed damage
|
||||
[6229] = INVSLOT_MAINHAND, --[Enchant Weapon - Celestial Guidance] + 5% agility
|
||||
[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
|
||||
[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
|
||||
[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
|
||||
[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
|
||||
[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
|
||||
[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
|
||||
[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
|
||||
[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
|
||||
--[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
|
||||
--[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
|
||||
--[6227] = INVSLOT_MAINHAND, --[Enchant Weapon - Ascended Vigor] + healing received increased
|
||||
--[6228] = INVSLOT_MAINHAND, --[Enchant Weapon - Sinful Revelation] + 6% bleed damage
|
||||
--[6229] = INVSLOT_MAINHAND, --[Enchant Weapon - Celestial Guidance] + 5% agility
|
||||
--[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
|
||||
--[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
|
||||
--[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
|
||||
--[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
|
||||
--[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
|
||||
--[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
|
||||
--[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
|
||||
--[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
|
||||
}
|
||||
|
||||
-- how to get the gemId:
|
||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
||||
-- local gemId = select(4, strsplit(":", itemLink))
|
||||
-- print("gemId:", gemId)
|
||||
--how to get the gemId:
|
||||
--local itemLink = GetInventoryItemLink("player", slotId)
|
||||
--local gemId = select(4, strsplit(":", itemLink))
|
||||
--print("gemId:", gemId)
|
||||
LIB_OPEN_RAID_GEM_IDS = {
|
||||
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
|
||||
[173125] = true, --Revitalizing Jewel Doublet (green, +100 health)
|
||||
[173130] = true, --Masterful Jewel Cluster (blue, master)
|
||||
[173129] = true, --Versatile Jewel Cluster (blue, versatility)
|
||||
[173127] = true, --Deadly Jewel Cluster (blue, crit)
|
||||
[173128] = true, --Quick Jewel Cluster (blue, haste)
|
||||
[168636] = true, --Leviathan's Eye of Strength (purple, strength)
|
||||
[168638] = true, --Leviathan's Eye of Intellect (purple, intellect)
|
||||
[169220] = true, --Straddling Sage Agate (blue, movement speed)
|
||||
--need update to dragonflight
|
||||
}
|
||||
|
||||
--/dump GetWeaponEnchantInfo()
|
||||
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {
|
||||
[6188] = true, --shadowcore oil
|
||||
[6190] = true, --embalmer's oil
|
||||
[6201] = true, --weighted
|
||||
[6200] = true, --sharpened
|
||||
--need update to dragonflight
|
||||
[5400] = true, --flametongue
|
||||
[5401] = true, --windfury
|
||||
}
|
||||
|
||||
@@ -954,7 +954,7 @@ do
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:SetNormalTexture(texture)
|
||||
macroPopupButton:SetPushedTexture(texture)
|
||||
macroPopupButton:SetDisabledTexture (texture)
|
||||
macroPopupButton:SetDisabledTexture(texture)
|
||||
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
@@ -978,7 +978,7 @@ do
|
||||
if ( index <= numMacroIcons and texture ) then
|
||||
macroPopupButton:SetNormalTexture(texture)
|
||||
macroPopupButton:SetPushedTexture(texture)
|
||||
macroPopupButton:SetDisabledTexture (texture)
|
||||
macroPopupButton:SetDisabledTexture(texture)
|
||||
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
||||
macroPopupButton.IconID = index
|
||||
macroPopupButton:Show()
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 10136
|
||||
_detalhes.alpha_build_counter = 10136 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 10142
|
||||
_detalhes.alpha_build_counter = 10142 --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
|
||||
@@ -49,6 +49,7 @@
|
||||
--namespace for the player breakdown window
|
||||
Details.PlayerBreakdown = {}
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--initialization stuff
|
||||
local _
|
||||
|
||||
+52
-31
@@ -198,10 +198,16 @@ function atributo_misc:CreateBuffTargetObject()
|
||||
}
|
||||
end
|
||||
|
||||
local backgroundColor = {0, 0, 0, 1}
|
||||
local statusBarDamageBackgroundTable = {value = 100, texture = [[Interface\AddOns\Details\images\bar_serenity]], color = {1, 0, 0, 0.1}}
|
||||
local statusBarBackgroundTable_ForDeathTooltip = {
|
||||
value = 100,
|
||||
texture = [[Interface\AddOns\Details\images\bar_serenity]],
|
||||
color = {DetailsFramework:GetDefaultBackdropColor()}
|
||||
}
|
||||
|
||||
function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
--expose in case someone want to customize the death tooltip background
|
||||
Details.StatusBarBackgroundTable_ForDeathTooltip = statusBarBackgroundTable_ForDeathTooltip
|
||||
|
||||
function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
|
||||
local events = deathTable[1]
|
||||
local timeOfDeath = deathTable[2]
|
||||
local maxHP = max(deathTable[5], 0.001)
|
||||
@@ -209,14 +215,23 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
local lastcooldown = false
|
||||
local gameCooltip = GameCooltip
|
||||
|
||||
local showSpark = Details.death_tooltip_spark
|
||||
local barTypeColors = Details.death_log_colors
|
||||
local statusbarTexture = Details.death_tooltip_texture
|
||||
local tooltipWidth = Details.death_tooltip_width
|
||||
|
||||
local damageSourceColor = "FFFFFFFF" --FFC6B0D9
|
||||
local healingSourceColor = "FF988EA0" --FFC6B0D9
|
||||
|
||||
local damageAmountColor = "FFFFFFFF"
|
||||
local healingAmountColor = "FF988EA0"
|
||||
|
||||
gameCooltip:Reset()
|
||||
gameCooltip:SetType("tooltipbar")
|
||||
|
||||
gameCooltip:AddLine(Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, unpack(self.click_to_report_color))
|
||||
gameCooltip:AddLine(Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, unpack(Details.click_to_report_color))
|
||||
gameCooltip:AddIcon([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||
|
||||
local barTypeColors = Details.death_log_colors
|
||||
|
||||
--death parser
|
||||
for i, event in ipairs(events) do
|
||||
local currentHP = event[5]
|
||||
@@ -229,7 +244,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
local spellName, _, spellIcon = _GetSpellInfo(event[2])
|
||||
local amount = event[3]
|
||||
local eventTime = event[4]
|
||||
local source = event[6]
|
||||
local source = Details:GetOnlyName(event[6] or "")
|
||||
|
||||
if (eventTime + 12 > timeOfDeath) then
|
||||
if (type(evType) == "boolean") then
|
||||
@@ -252,34 +267,34 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
--end
|
||||
|
||||
overkill = " (" .. Details:ToK(overkill) .. " |cFFFF8800overkill|r)"
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|c" .. damageSourceColor .. source .. "|r)", "|c" .. damageAmountColor .. "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
else
|
||||
overkill = ""
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. damageSourceColor .. source .. "|r)", "|c" .. damageAmountColor .. "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
end
|
||||
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
|
||||
if (event[9]) then
|
||||
--friendly fire
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.friendlyfire, true, statusBarDamageBackgroundTable)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.friendlyfire, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||
else
|
||||
--from a enemy
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.damage, true, statusBarDamageBackgroundTable)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.damage, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||
end
|
||||
else
|
||||
--heal
|
||||
if (amount > Details.deathlog_healingdone_min) then
|
||||
if (combatObject.is_arena) then
|
||||
if (amount > Details.deathlog_healingdone_min_arena) then
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. healingSourceColor .. source .. "|r)", "|c" .. healingAmountColor .. "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||
end
|
||||
else
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. healingSourceColor .. source .. "|r)", "|c" .. healingAmountColor .. "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
|
||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -289,7 +304,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
--cooldown
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, true)
|
||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, showSpark)
|
||||
|
||||
elseif (evType == 2 and not battleress) then
|
||||
--battle ress
|
||||
@@ -301,10 +316,9 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
|
||||
elseif (evType == 4) then
|
||||
--debuff
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "x" .. amount .. AURA_TYPE_DEBUFF .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||
gameCooltip:AddIcon(spellIcon)
|
||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, true)
|
||||
|
||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, showSpark)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -348,26 +362,33 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
||||
--move each line in the Y axis (vertical offsett)
|
||||
gameCooltip:SetOption("LineYOffset", 0)
|
||||
|
||||
gameCooltip:SetOption("FixedWidth", (type(_detalhes.death_tooltip_width) == "number" and _detalhes.death_tooltip_width) or 300)
|
||||
--tooltip width
|
||||
gameCooltip:SetOption("FixedWidth", (type(tooltipWidth) == "number" and tooltipWidth) or 300)
|
||||
|
||||
--progress bar texture
|
||||
gameCooltip:SetOption("StatusBarTexture", statusbarTexture)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function Details:ToolTipDead(instance, deathTable, barFrame)
|
||||
local gameCooltip = GameCooltip
|
||||
|
||||
Details:ShowDeathTooltip(instance:GetShowingCombat(), deathTable)
|
||||
local builtTooltip = Details.ShowDeathTooltipFunction(instance, barFrame, instance:GetShowingCombat(), deathTable)
|
||||
if (builtTooltip) then
|
||||
local myPoint = Details.tooltip.anchor_point
|
||||
local anchorPoint = Details.tooltip.anchor_relative
|
||||
local xOffset = Details.tooltip.anchor_offset[1]
|
||||
local yOffset = Details.tooltip.anchor_offset[2]
|
||||
|
||||
local myPoint = Details.tooltip.anchor_point
|
||||
local anchorPoint = Details.tooltip.anchor_relative
|
||||
local xOffset = Details.tooltip.anchor_offset[1]
|
||||
local yOffset = Details.tooltip.anchor_offset[2]
|
||||
if (Details.tooltip.anchored_to == 1) then
|
||||
gameCooltip:SetHost(barFrame, myPoint, anchorPoint, xOffset, yOffset)
|
||||
else
|
||||
gameCooltip:SetHost(DetailsTooltipAnchor, myPoint, anchorPoint, xOffset, yOffset)
|
||||
end
|
||||
|
||||
if (Details.tooltip.anchored_to == 1) then
|
||||
gameCooltip:SetHost(barFrame, myPoint, anchorPoint, xOffset, yOffset)
|
||||
else
|
||||
gameCooltip:SetHost(DetailsTooltipAnchor, myPoint, anchorPoint, xOffset, yOffset)
|
||||
gameCooltip:ShowCooltip()
|
||||
end
|
||||
|
||||
gameCooltip:ShowCooltip()
|
||||
end
|
||||
|
||||
local function RefreshBarraMorte (morte, barra, instancia)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
--textures
|
||||
button:SetNormalTexture(icon)
|
||||
button:SetPushedTexture(icon)
|
||||
button:SetDisabledTexture (icon)
|
||||
button:SetDisabledTexture(icon)
|
||||
button:SetHighlightTexture(icon, "ADD")
|
||||
button.__icon = icon
|
||||
button.__name = pluginname
|
||||
|
||||
+4
-4
@@ -68,7 +68,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
|
||||
new_button:SetNormalTexture(pic_up)
|
||||
new_button:SetPushedTexture(pic_down)
|
||||
new_button:SetDisabledTexture (pic_disabled)
|
||||
new_button:SetDisabledTexture(pic_disabled)
|
||||
new_button:SetHighlightTexture(pic_highlight, "ADD")
|
||||
|
||||
local new_text = new_button:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
@@ -223,7 +223,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
||||
function new_button:ChangeIcon (icon1, icon2, icon3, icon4)
|
||||
new_button:SetNormalTexture(icon1)
|
||||
new_button:SetPushedTexture(icon2)
|
||||
new_button:SetDisabledTexture (icon3)
|
||||
new_button:SetDisabledTexture(icon3)
|
||||
new_button:SetHighlightTexture(icon4, "ADD")
|
||||
end
|
||||
|
||||
@@ -519,7 +519,7 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
||||
botao_cima:SetHeight(32)
|
||||
botao_cima:SetNormalTexture([[Interface\Buttons\Arrow-Up-Up]])
|
||||
botao_cima:SetPushedTexture([[Interface\Buttons\Arrow-Up-Down]])
|
||||
botao_cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
|
||||
botao_cima:SetDisabledTexture([[Interface\Buttons\Arrow-Up-Disabled]])
|
||||
botao_cima:Show()
|
||||
botao_cima:Disable()
|
||||
|
||||
@@ -536,7 +536,7 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
||||
botao_baixo:SetHeight(32)
|
||||
botao_baixo:SetNormalTexture([[Interface\Buttons\Arrow-Down-Up]])
|
||||
botao_baixo:SetPushedTexture([[Interface\Buttons\Arrow-Down-Down]])
|
||||
botao_baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
|
||||
botao_baixo:SetDisabledTexture([[Interface\Buttons\Arrow-Down-Disabled]])
|
||||
botao_baixo:Show()
|
||||
botao_baixo:Disable()
|
||||
|
||||
|
||||
@@ -3532,14 +3532,14 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.button_up:SetHeight(32)
|
||||
baseframe.button_up:SetNormalTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Up]])
|
||||
baseframe.button_up:SetPushedTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Down]])
|
||||
baseframe.button_up:SetDisabledTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Disabled]])
|
||||
baseframe.button_up:SetDisabledTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Disabled]])
|
||||
baseframe.button_up:Disable()
|
||||
|
||||
baseframe.button_down:SetWidth(29)
|
||||
baseframe.button_down:SetHeight(32)
|
||||
baseframe.button_down:SetNormalTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Up]])
|
||||
baseframe.button_down:SetPushedTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Down]])
|
||||
baseframe.button_down:SetDisabledTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Disabled]])
|
||||
baseframe.button_down:SetDisabledTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Disabled]])
|
||||
baseframe.button_down:Disable()
|
||||
|
||||
baseframe.button_up:SetPoint("topright", baseframe.scroll_up, "topright", -4, 3)
|
||||
@@ -3801,7 +3801,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
instancia.break_snap_button:SetScript("OnLeave", unSnapButtonOnLeave)
|
||||
|
||||
instancia.break_snap_button:SetNormalTexture(DEFAULT_SKIN)
|
||||
instancia.break_snap_button:SetDisabledTexture (DEFAULT_SKIN)
|
||||
instancia.break_snap_button:SetDisabledTexture(DEFAULT_SKIN)
|
||||
instancia.break_snap_button:SetHighlightTexture(DEFAULT_SKIN, "ADD")
|
||||
instancia.break_snap_button:SetPushedTexture(DEFAULT_SKIN)
|
||||
|
||||
@@ -7112,7 +7112,7 @@ function Details:ChangeSkin(skin_name)
|
||||
self.baseframe.resize_esquerda.texture:SetTexture(skin_file) --bot�o de redimencionar da esquerda
|
||||
|
||||
self.break_snap_button:SetNormalTexture(skin_file) --cadeado
|
||||
self.break_snap_button:SetDisabledTexture (skin_file)
|
||||
self.break_snap_button:SetDisabledTexture(skin_file)
|
||||
self.break_snap_button:SetHighlightTexture(skin_file, "ADD")
|
||||
self.break_snap_button:SetPushedTexture(skin_file)
|
||||
|
||||
|
||||
@@ -1218,7 +1218,7 @@ local default_skin = function()
|
||||
--scrollbar
|
||||
window.container_barras.cima:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||
window.container_barras.cima:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||
window.container_barras.cima:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_barras.cima:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_barras.cima:GetNormalTexture():ClearAllPoints()
|
||||
window.container_barras.cima:GetPushedTexture():ClearAllPoints()
|
||||
window.container_barras.cima:GetDisabledTexture():ClearAllPoints()
|
||||
@@ -1230,7 +1230,7 @@ local default_skin = function()
|
||||
|
||||
window.container_barras.baixo:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||
window.container_barras.baixo:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||
window.container_barras.baixo:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_barras.baixo:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_barras.baixo:GetNormalTexture():ClearAllPoints()
|
||||
window.container_barras.baixo:GetPushedTexture():ClearAllPoints()
|
||||
window.container_barras.baixo:GetDisabledTexture():ClearAllPoints()
|
||||
@@ -1253,7 +1253,7 @@ local default_skin = function()
|
||||
--
|
||||
window.container_alvos.cima:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||
window.container_alvos.cima:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||
window.container_alvos.cima:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_alvos.cima:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_alvos.cima:GetNormalTexture():ClearAllPoints()
|
||||
window.container_alvos.cima:GetPushedTexture():ClearAllPoints()
|
||||
window.container_alvos.cima:GetDisabledTexture():ClearAllPoints()
|
||||
@@ -1265,7 +1265,7 @@ local default_skin = function()
|
||||
|
||||
window.container_alvos.baixo:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||
window.container_alvos.baixo:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||
window.container_alvos.baixo:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_alvos.baixo:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||
window.container_alvos.baixo:GetNormalTexture():ClearAllPoints()
|
||||
window.container_alvos.baixo:GetPushedTexture():ClearAllPoints()
|
||||
window.container_alvos.baixo:GetDisabledTexture():ClearAllPoints()
|
||||
|
||||
@@ -78,7 +78,7 @@ function _detalhes:OpenWelcomeWindow()
|
||||
forward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Down]])
|
||||
forward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
|
||||
forward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
|
||||
forward:SetDisabledTexture ([[Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled]])
|
||||
forward:SetDisabledTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled]])
|
||||
|
||||
local backward = CreateFrame("button", nil, window)
|
||||
backward:SetWidth(26)
|
||||
@@ -87,7 +87,7 @@ function _detalhes:OpenWelcomeWindow()
|
||||
backward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Down]])
|
||||
backward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
|
||||
backward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
|
||||
backward:SetDisabledTexture ([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled]])
|
||||
backward:SetDisabledTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled]])
|
||||
|
||||
forward:SetScript("OnClick", function()
|
||||
if (index < #pages) then
|
||||
|
||||
+164
-162
@@ -1,14 +1,14 @@
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--Profiles:
|
||||
--return the current profile name
|
||||
|
||||
|
||||
function _detalhes:GetCurrentProfileName()
|
||||
|
||||
--check is have a profile name
|
||||
@@ -16,7 +16,7 @@ function _detalhes:GetCurrentProfileName()
|
||||
local character_key = UnitName ("player") .. "-" .. GetRealmName()
|
||||
_detalhes_database.active_profile = character_key
|
||||
end
|
||||
|
||||
|
||||
--end
|
||||
return _detalhes_database.active_profile
|
||||
end
|
||||
@@ -35,31 +35,31 @@ function _detalhes:CreateProfile (name)
|
||||
if (_detalhes_global.__profiles [name]) then
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
--copy the default table
|
||||
local new_profile = Details.CopyTable(_detalhes.default_profile)
|
||||
new_profile.instances = {}
|
||||
|
||||
|
||||
--add to global container
|
||||
_detalhes_global.__profiles [name] = new_profile
|
||||
|
||||
|
||||
--end
|
||||
return new_profile
|
||||
|
||||
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--Profiles:
|
||||
--return the list os all profiles
|
||||
|
||||
|
||||
function _detalhes:GetProfileList()
|
||||
|
||||
|
||||
--build the table
|
||||
local t = {}
|
||||
for name, profile in pairs(_detalhes_global.__profiles) do
|
||||
for name, profile in pairs(_detalhes_global.__profiles) do
|
||||
t [#t + 1] = name
|
||||
end
|
||||
|
||||
|
||||
--end
|
||||
return t
|
||||
end
|
||||
@@ -67,42 +67,42 @@ end
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--Profiles:
|
||||
--delete a profile
|
||||
|
||||
|
||||
function _detalhes:EraseProfile (profile_name)
|
||||
|
||||
|
||||
--erase profile table
|
||||
_detalhes_global.__profiles [profile_name] = nil
|
||||
|
||||
|
||||
if (_detalhes_database.active_profile == profile_name) then
|
||||
|
||||
|
||||
local character_key = UnitName ("player") .. "-" .. GetRealmName()
|
||||
|
||||
|
||||
local my_profile = _detalhes:GetProfile (character_key)
|
||||
|
||||
|
||||
if (my_profile) then
|
||||
_detalhes:ApplyProfile (character_key, true)
|
||||
else
|
||||
local profile = _detalhes:CreateProfile (character_key)
|
||||
_detalhes:ApplyProfile (character_key, true)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
--end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--Profiles:
|
||||
--return the profile table requested
|
||||
|
||||
|
||||
function _detalhes:GetProfile (name, create)
|
||||
|
||||
--get the profile, create and return
|
||||
if (not name) then
|
||||
name = _detalhes:GetCurrentProfileName()
|
||||
end
|
||||
|
||||
|
||||
local profile = _detalhes_global.__profiles [name]
|
||||
|
||||
if (not profile and not create) then
|
||||
@@ -112,10 +112,10 @@ function _detalhes:GetProfile (name, create)
|
||||
profile = _detalhes:CreateProfile (name)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--end
|
||||
return profile
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:SetProfileCProp (name, cprop, value)
|
||||
if (not name) then
|
||||
@@ -123,7 +123,7 @@ function _detalhes:SetProfileCProp (name, cprop, value)
|
||||
end
|
||||
|
||||
local profile = _detalhes:GetProfile (name, false)
|
||||
|
||||
|
||||
if (profile) then
|
||||
if (type(value) == "table") then
|
||||
rawset (profile, cprop, Details.CopyTable(value))
|
||||
@@ -142,11 +142,11 @@ function _detalhes:ResetProfile (profile_name)
|
||||
|
||||
--get the profile
|
||||
local profile = _detalhes:GetProfile (profile_name, true)
|
||||
|
||||
|
||||
if (not profile) then
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
--reset all already created instances
|
||||
for index, instance in _detalhes:ListInstances() do
|
||||
if (not instance.baseframe) then
|
||||
@@ -155,7 +155,7 @@ function _detalhes:ResetProfile (profile_name)
|
||||
instance.skin = ""
|
||||
instance:ChangeSkin (_detalhes.default_skin_to_use)
|
||||
end
|
||||
|
||||
|
||||
for index, instance in pairs(_detalhes.unused_instances) do
|
||||
if (not instance.baseframe) then
|
||||
instance:AtivarInstancia()
|
||||
@@ -163,7 +163,7 @@ function _detalhes:ResetProfile (profile_name)
|
||||
instance.skin = ""
|
||||
instance:ChangeSkin(_detalhes.default_skin_to_use)
|
||||
end
|
||||
|
||||
|
||||
--reset the profile
|
||||
table.wipe(profile.instances)
|
||||
|
||||
@@ -180,9 +180,9 @@ function _detalhes:ResetProfile (profile_name)
|
||||
instance.horizontalSnap = false
|
||||
instance.verticalSnap = false
|
||||
instance.snap = {}
|
||||
|
||||
|
||||
_detalhes:ApplyProfile (profile_name, true)
|
||||
|
||||
|
||||
--end
|
||||
return true
|
||||
end
|
||||
@@ -227,7 +227,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
|
||||
profile.ocd_tracker = nil --moved to local character saved
|
||||
|
||||
|
||||
--always save the previous profile, except if nosave flag is up
|
||||
if (not nosave) then
|
||||
--salva o profile ativo no momento
|
||||
@@ -235,7 +235,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
|
||||
--update profile keys before go
|
||||
for key, value in pairs(_detalhes.default_profile) do
|
||||
for key, value in pairs(_detalhes.default_profile) do
|
||||
--the entire key doesn't exist
|
||||
if (profile [key] == nil) then
|
||||
if (type(value) == "table") then
|
||||
@@ -243,44 +243,44 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
else
|
||||
profile [key] = value
|
||||
end
|
||||
|
||||
|
||||
--the key exist and is a table, check for missing values on sub tables
|
||||
elseif (type(value) == "table") then
|
||||
--deploy only copy non existing data
|
||||
_detalhes.table.deploy(profile [key], value)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--apply the profile values
|
||||
for key, _ in pairs(_detalhes.default_profile) do
|
||||
for key, _ in pairs(_detalhes.default_profile) do
|
||||
local value = profile [key]
|
||||
|
||||
if (type(value) == "table") then
|
||||
if (key == "class_specs_coords") then
|
||||
value = Details.CopyTable(_detalhes.default_profile.class_specs_coords)
|
||||
end
|
||||
|
||||
|
||||
local ctable = Details.CopyTable(value)
|
||||
_detalhes [key] = ctable
|
||||
else
|
||||
_detalhes [key] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--set the current profile
|
||||
if (not is_copy) then
|
||||
_detalhes.active_profile = profile_name
|
||||
_detalhes_database.active_profile = profile_name
|
||||
end
|
||||
|
||||
|
||||
--apply the skin
|
||||
|
||||
|
||||
--first save the local instance configs
|
||||
_detalhes:SaveLocalInstanceConfig()
|
||||
|
||||
|
||||
local saved_skins = profile.instances
|
||||
local instance_limit = _detalhes.instances_amount
|
||||
|
||||
|
||||
--then close all opened instances
|
||||
for index, instance in _detalhes:ListInstances() do
|
||||
if (not getmetatable(instance)) then
|
||||
@@ -306,14 +306,14 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
instance1:ResetInstanceConfig()
|
||||
instance1.skin = "no skin"
|
||||
instance1:ChangeSkin (_detalhes.default_skin_to_use)
|
||||
|
||||
|
||||
--release the snap and lock
|
||||
instance1:LoadLocalInstanceConfig()
|
||||
instance1.snap = {}
|
||||
instance1.horizontalSnap = nil
|
||||
instance1.verticalSnap = nil
|
||||
instance1:LockInstance (false)
|
||||
|
||||
|
||||
if (#_detalhes.tabela_instancias > 1) then
|
||||
for i = #_detalhes.tabela_instancias, 2, -1 do
|
||||
_detalhes.tabela_instancias [i].modo = 2
|
||||
@@ -322,10 +322,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
|
||||
--load skins
|
||||
local instances_loaded = 0
|
||||
|
||||
|
||||
for index, skin in ipairs(saved_skins) do
|
||||
if (instance_limit < index) then
|
||||
break
|
||||
@@ -337,7 +337,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
--create a instance without creating its frames (not initializing)
|
||||
instance = _detalhes:CreateDisabledInstance (index, skin)
|
||||
end
|
||||
|
||||
|
||||
--copy skin
|
||||
for key, value in pairs(skin) do
|
||||
if (type(value) == "table") then
|
||||
@@ -346,16 +346,16 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
instance [key] = value
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--apply default values if some key is missing
|
||||
instance:LoadInstanceConfig()
|
||||
|
||||
|
||||
--reset basic config
|
||||
instance.snap = {}
|
||||
instance.horizontalSnap = nil
|
||||
instance.verticalSnap = nil
|
||||
instance:LockInstance (false)
|
||||
|
||||
|
||||
--load data saved for this character only
|
||||
instance:LoadLocalInstanceConfig()
|
||||
if (skin.__was_opened) then
|
||||
@@ -367,7 +367,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
|
||||
instance.modo = instance.modo or 2
|
||||
|
||||
|
||||
--load data saved again
|
||||
instance:LoadLocalInstanceConfig()
|
||||
--check window positioning
|
||||
@@ -396,7 +396,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--open the instance
|
||||
if (instance:IsEnabled()) then
|
||||
if (not instance.baseframe) then
|
||||
@@ -404,7 +404,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
|
||||
instance:LockInstance (instance.isLocked)
|
||||
|
||||
|
||||
--tinsert(_detalhes.resize_debug, #_detalhes.resize_debug+1, "libwindow X (427): " .. (instance.libwindow.x or 0))
|
||||
instance:RestoreMainWindowPosition()
|
||||
instance:ReajustaGump()
|
||||
@@ -414,10 +414,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
else
|
||||
instance.skin = skin.skin
|
||||
end
|
||||
|
||||
|
||||
instances_loaded = instances_loaded + 1
|
||||
end
|
||||
|
||||
|
||||
--move unused instances for unused container
|
||||
if (#_detalhes.tabela_instancias > instances_loaded) then
|
||||
for i = #_detalhes.tabela_instancias, instances_loaded+1, -1 do
|
||||
@@ -425,13 +425,13 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
_detalhes.tabela_instancias [i] = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--check all snaps for invalid entries
|
||||
for i = 1, instances_loaded do
|
||||
local instance = _detalhes:GetInstance(i)
|
||||
local previous_instance_id = _detalhes:GetInstance(i-1) and _detalhes:GetInstance(i-1):GetId() or 0
|
||||
local next_instance_id = _detalhes:GetInstance(i+1) and _detalhes:GetInstance(i+1):GetId() or 0
|
||||
|
||||
|
||||
for snap_side, instance_id in pairs(instance.snap) do
|
||||
if (instance_id < 1) then --invalid instance
|
||||
instance.snap [snap_side] = nil
|
||||
@@ -440,7 +440,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--auto realign windows
|
||||
if (not _detalhes.initializing) then
|
||||
for _, instance in _detalhes:ListInstances() do
|
||||
@@ -472,9 +472,9 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
--check instance amount
|
||||
_detalhes.opened_windows = 0
|
||||
for index = 1, _detalhes.instances_amount do
|
||||
@@ -483,22 +483,22 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
_detalhes.opened_windows = _detalhes.opened_windows + 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--update tooltip settings
|
||||
_detalhes:SetTooltipBackdrop()
|
||||
|
||||
|
||||
--update player detail window
|
||||
_detalhes:ApplyPDWSkin()
|
||||
|
||||
|
||||
--update the numerical system
|
||||
_detalhes:SelectNumericalSystem()
|
||||
|
||||
|
||||
--refresh the update interval
|
||||
_detalhes:RefreshUpdater()
|
||||
|
||||
|
||||
--refresh animation functions
|
||||
_detalhes:RefreshAnimationFunctions()
|
||||
|
||||
|
||||
--refresh broadcaster tools
|
||||
_detalhes:LoadFramesForBroadcastTools()
|
||||
|
||||
@@ -515,24 +515,24 @@ end
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--Profiles:
|
||||
--return the profile table requested
|
||||
|
||||
|
||||
function _detalhes:SaveProfile (saveas)
|
||||
|
||||
|
||||
--get the current profile
|
||||
|
||||
|
||||
local profile_name
|
||||
|
||||
|
||||
if (saveas) then
|
||||
profile_name = saveas
|
||||
else
|
||||
profile_name = _detalhes:GetCurrentProfileName()
|
||||
end
|
||||
|
||||
|
||||
local profile = _detalhes:GetProfile (profile_name, true)
|
||||
|
||||
--save default keys
|
||||
for key, _ in pairs(_detalhes.default_profile) do
|
||||
|
||||
for key, _ in pairs(_detalhes.default_profile) do
|
||||
|
||||
local current_value = _detalhes [key]
|
||||
|
||||
if (type(current_value) == "table") then
|
||||
@@ -743,7 +743,7 @@ local default_profile = {
|
||||
0.125, -- [4]
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
class_colors = {
|
||||
["DEMONHUNTER"] = {
|
||||
0.64,
|
||||
@@ -872,10 +872,10 @@ local default_profile = {
|
||||
--minimap
|
||||
minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1, text_format = 3},
|
||||
data_broker_text = "",
|
||||
|
||||
|
||||
--hotcorner
|
||||
hotcorner_topleft = {hide = false},
|
||||
|
||||
|
||||
--PvP
|
||||
only_pvp_frags = false,
|
||||
color_by_arena_team = true,
|
||||
@@ -892,24 +892,24 @@ local default_profile = {
|
||||
disable_stretch_button = false,
|
||||
disable_alldisplays_window = false,
|
||||
damage_taken_everything = false,
|
||||
|
||||
|
||||
--info window
|
||||
player_details_window = {
|
||||
skin = "ElvUI",
|
||||
bar_texture = "Skyline",
|
||||
scale = 1,
|
||||
},
|
||||
|
||||
|
||||
options_window = {
|
||||
scale = 1,
|
||||
},
|
||||
|
||||
|
||||
--segments
|
||||
segments_amount = 40,
|
||||
segments_amount_to_save = 40,
|
||||
segments_panic_mode = false,
|
||||
segments_auto_erase = 1,
|
||||
|
||||
|
||||
--instances
|
||||
instances_amount = 5,
|
||||
instances_segments_locked = true,
|
||||
@@ -917,16 +917,16 @@ local default_profile = {
|
||||
instances_menu_click_to_open = false,
|
||||
instances_no_libwindow = false,
|
||||
instances_suppress_trash = 0,
|
||||
|
||||
|
||||
--if clear ungroup characters when logout
|
||||
clear_ungrouped = true,
|
||||
|
||||
|
||||
--if clear graphic data when logout
|
||||
clear_graphic = true,
|
||||
|
||||
|
||||
--item level tracker
|
||||
track_item_level = false,
|
||||
|
||||
|
||||
--text settings
|
||||
font_sizes = {menus = 10},
|
||||
font_faces = {menus = "Friz Quadrata TT"},
|
||||
@@ -934,7 +934,7 @@ local default_profile = {
|
||||
total_abbreviation = 2,
|
||||
numerical_system = 1,
|
||||
numerical_system_symbols = "auto",
|
||||
|
||||
|
||||
--performance
|
||||
use_row_animations = true,
|
||||
--default animation speed - % per second
|
||||
@@ -958,22 +958,22 @@ local default_profile = {
|
||||
trash_concatenate = false,
|
||||
trash_auto_remove = false,
|
||||
world_combat_is_trash = false,
|
||||
|
||||
|
||||
--death log
|
||||
deadlog_limit = 16,
|
||||
deadlog_events = 32,
|
||||
|
||||
|
||||
--report
|
||||
report_lines = 5,
|
||||
report_to_who = "",
|
||||
report_heal_links = false,
|
||||
report_schema = 1,
|
||||
deny_score_messages = false,
|
||||
|
||||
|
||||
--colors
|
||||
default_bg_color = 0.0941,
|
||||
default_bg_alpha = 0.5,
|
||||
|
||||
|
||||
--fades
|
||||
row_fade_in = {"in", 0.2},
|
||||
windows_fade_in = {"in", 0.2},
|
||||
@@ -989,13 +989,13 @@ local default_profile = {
|
||||
["aura"] = true,
|
||||
["spellcast"] = true,
|
||||
},
|
||||
|
||||
|
||||
--bookmark
|
||||
bookmark_text_size = 11,
|
||||
|
||||
|
||||
--cloud capture
|
||||
cloud_capture = true,
|
||||
|
||||
|
||||
--combat
|
||||
minimum_combat_time = 5, --combats with less then this in elapsed time is discarted
|
||||
minimum_overall_combat_time = 10, --minimum time the combat must have to be added into the overall data
|
||||
@@ -1011,15 +1011,17 @@ local default_profile = {
|
||||
use_battleground_server_parser = false,
|
||||
force_activity_time_pvp = true,
|
||||
death_tooltip_width = 350,
|
||||
death_tooltip_spark = false,
|
||||
death_tooltip_texture = "Details Serenity",
|
||||
override_spellids = true,
|
||||
all_players_are_group = false,
|
||||
|
||||
|
||||
--skins
|
||||
standard_skin = false,
|
||||
skin = "Minimalistic",
|
||||
profile_save_pos = true,
|
||||
options_group_edit = true,
|
||||
|
||||
|
||||
chat_tab_embed = {
|
||||
enabled = false,
|
||||
tab_name = "",
|
||||
@@ -1027,10 +1029,10 @@ local default_profile = {
|
||||
x_offset = 0,
|
||||
y_offset = 0,
|
||||
},
|
||||
|
||||
|
||||
--broadcaster options
|
||||
broadcaster_enabled = false,
|
||||
|
||||
|
||||
--event tracker
|
||||
event_tracker = {
|
||||
frame = {
|
||||
@@ -1080,7 +1082,7 @@ local default_profile = {
|
||||
update_interval = 0.30,
|
||||
sample_size = 3, --in seconds
|
||||
},
|
||||
|
||||
|
||||
--streamer
|
||||
-- _detalhes.streamer_config.
|
||||
streamer_config = {
|
||||
@@ -1091,19 +1093,19 @@ local default_profile = {
|
||||
faster_updates = false,
|
||||
use_animation_accel = true,
|
||||
},
|
||||
|
||||
|
||||
--tooltip
|
||||
tooltip = {
|
||||
fontface = "Friz Quadrata TT",
|
||||
fontface = "Friz Quadrata TT",
|
||||
fontsize = 10,
|
||||
fontsize_title = 10,
|
||||
fontcolor = {1, 1, 1, 1},
|
||||
fontcolor = {1, 1, 1, 1},
|
||||
fontcolor_right = {1, 0.7, 0, 1}, --{1, 0.9254, 0.6078, 1}
|
||||
fontshadow = false,
|
||||
fontshadow = false,
|
||||
background = {0.1960, 0.1960, 0.1960, 0.8697},
|
||||
abbreviation = 2, -- 2 = ToK I Upper 5 = ToK I Lower -- was 8
|
||||
maximize_method = 1,
|
||||
show_amount = false,
|
||||
abbreviation = 2, -- 2 = ToK I Upper 5 = ToK I Lower -- was 8
|
||||
maximize_method = 1,
|
||||
show_amount = false,
|
||||
commands = {},
|
||||
header_text_color = {1, 0.9176, 0, 1}, --{1, 0.7, 0, 1}
|
||||
header_statusbar = {0.3, 0.3, 0.3, 0.8, false, false, "WorldState Score"},
|
||||
@@ -1114,27 +1116,27 @@ local default_profile = {
|
||||
anchor_point = "bottom",
|
||||
anchor_relative = "top",
|
||||
anchor_offset = {0, 0},
|
||||
|
||||
|
||||
border_texture = "Details BarBorder 3",
|
||||
border_color = {0, 0, 0, 1},
|
||||
border_size = 14,
|
||||
|
||||
|
||||
tooltip_max_abilities = 6,
|
||||
tooltip_max_targets = 2,
|
||||
tooltip_max_pets = 2,
|
||||
|
||||
|
||||
--menus_bg_coords = {331/512, 63/512, 109/512, 143/512}, --with gradient on right side
|
||||
menus_bg_coords = {0.309777336120606, 0.924000015258789, 0.213000011444092, 0.279000015258789},
|
||||
menus_bg_color = {.8, .8, .8, 0.2},
|
||||
menus_bg_texture = [[Interface\SPELLBOOK\Spellbook-Page-1]],
|
||||
|
||||
|
||||
icon_border_texcoord = {L = 5/64, R = 59/64, T = 5/64, B = 59/64},
|
||||
icon_size = {W = 13, H = 13},
|
||||
|
||||
|
||||
--height used on tooltips at displays such as damage taken by spell
|
||||
line_height = 17,
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
_detalhes.default_profile = default_profile
|
||||
@@ -1178,9 +1180,9 @@ local default_player_data = {
|
||||
cached_specs = {},
|
||||
cached_talents = {},
|
||||
cached_roles = {},
|
||||
|
||||
|
||||
last_day = date ("%d"),
|
||||
|
||||
|
||||
combat_id = 0,
|
||||
combat_counter = 0,
|
||||
last_instance_id = 0,
|
||||
@@ -1252,14 +1254,14 @@ local default_player_data = {
|
||||
--benchmark
|
||||
benchmark_db = {
|
||||
frame = {},
|
||||
|
||||
|
||||
},
|
||||
--rank
|
||||
rank_window = {
|
||||
last_difficulty = 15,
|
||||
last_raid = "",
|
||||
},
|
||||
|
||||
|
||||
--death panel buttons
|
||||
on_death_menu = false,
|
||||
}
|
||||
@@ -1333,16 +1335,16 @@ local default_global_data = {
|
||||
scale = 1
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
--profile by spec
|
||||
profile_by_spec = {},
|
||||
|
||||
|
||||
--displays by spec
|
||||
displays_by_spec = {},
|
||||
|
||||
|
||||
--death log
|
||||
show_totalhitdamage_on_overkill = false,
|
||||
|
||||
|
||||
--switch tables
|
||||
switchSaved = {slots = 4, table = {
|
||||
{["atributo"] = 1, ["sub_atributo"] = 1}, --damage done
|
||||
@@ -1351,18 +1353,18 @@ local default_global_data = {
|
||||
{["atributo"] = 4, ["sub_atributo"] = 5}, --deaths
|
||||
}},
|
||||
report_pos = {1, 1},
|
||||
|
||||
|
||||
--tutorial
|
||||
tutorial = {
|
||||
logons = 0,
|
||||
unlock_button = 0,
|
||||
version_announce = 0,
|
||||
main_help_button = 0,
|
||||
alert_frames = {false, false, false, false, false, false},
|
||||
logons = 0,
|
||||
unlock_button = 0,
|
||||
version_announce = 0,
|
||||
main_help_button = 0,
|
||||
alert_frames = {false, false, false, false, false, false},
|
||||
bookmark_tutorial = false,
|
||||
ctrl_click_close_tutorial = false,
|
||||
},
|
||||
|
||||
|
||||
performance_profiles = {
|
||||
["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},
|
||||
@@ -1373,16 +1375,16 @@ local default_global_data = {
|
||||
["Arena"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||
["Dungeon"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||
},
|
||||
|
||||
|
||||
--auras (wa auras created from the aura panel)
|
||||
details_auras = {},
|
||||
|
||||
|
||||
--ilvl
|
||||
item_level_pool = {},
|
||||
|
||||
|
||||
--latest report
|
||||
latest_report_table = {},
|
||||
|
||||
|
||||
--death recap
|
||||
death_recap = {
|
||||
enabled = true,
|
||||
@@ -1397,14 +1399,14 @@ local default_global_data = {
|
||||
spell_pool = {},
|
||||
encounter_spell_pool = {},
|
||||
npcid_pool = {},
|
||||
|
||||
|
||||
--aura creation frame libwindow
|
||||
createauraframe = {},
|
||||
|
||||
|
||||
--min health done on the death report
|
||||
deathlog_healingdone_min = 1,
|
||||
deathlog_healingdone_min_arena = 400,
|
||||
|
||||
|
||||
--mythic plus config
|
||||
mythic_plus = {
|
||||
always_in_combat = false, --
|
||||
@@ -1421,10 +1423,10 @@ local default_global_data = {
|
||||
mythicrun_chart_frame_minimized = {},
|
||||
mythicrun_chart_frame_ready = {},
|
||||
},
|
||||
|
||||
|
||||
--plugin window positions
|
||||
plugin_window_pos = {},
|
||||
|
||||
|
||||
--run code
|
||||
run_code = {
|
||||
["on_specchanged"] = "\n-- run when the player changes its spec",
|
||||
@@ -1434,7 +1436,7 @@ local default_global_data = {
|
||||
["on_entercombat"] = "\n-- this code runs when the player enters in combat",
|
||||
["on_groupchange"] = "\n-- this code runs when the player enter or leave a group",
|
||||
},
|
||||
|
||||
|
||||
--plater integration
|
||||
plater = {
|
||||
realtime_dps_enabled = false,
|
||||
@@ -1454,12 +1456,12 @@ local default_global_data = {
|
||||
damage_taken_color = {1, 1, 0, 1},
|
||||
damage_taken_shadow = true,
|
||||
damage_taken_anchor = {side = 7, x = 0, y = 0},
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
--dungeon information - can be accessed by plugins and third party mods
|
||||
dungeon_data = {},
|
||||
|
||||
|
||||
--raid information - can be accessed by plugins and third party mods
|
||||
raid_data = {},
|
||||
|
||||
@@ -1481,7 +1483,7 @@ function _detalhes:GetTutorialCVar(key, default)
|
||||
if (_detalhes.streamer_config.no_alerts) then
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
local value = _detalhes.tutorial [key]
|
||||
if (value == nil and default) then
|
||||
_detalhes.tutorial [key] = default
|
||||
@@ -1494,13 +1496,13 @@ function _detalhes:SetTutorialCVar (key, value)
|
||||
end
|
||||
|
||||
function _detalhes:SaveProfileSpecial()
|
||||
|
||||
|
||||
--get the current profile
|
||||
local profile_name = _detalhes:GetCurrentProfileName()
|
||||
local profile = _detalhes:GetProfile (profile_name, true)
|
||||
|
||||
--save default keys
|
||||
for key, _ in pairs(_detalhes.default_profile) do
|
||||
for key, _ in pairs(_detalhes.default_profile) do
|
||||
|
||||
local current_value = _detalhes_database [key] or _detalhes_global [key] or _detalhes.default_player_data [key] or _detalhes.default_global_data [key]
|
||||
|
||||
@@ -1543,15 +1545,15 @@ end
|
||||
|
||||
function _detalhes:UpdateState_CurrentMythicDungeonRun (stillOngoing, segmentID, latestBossAt)
|
||||
local savedTable = _detalhes.mythic_dungeon_currentsaved
|
||||
|
||||
|
||||
if (not stillOngoing) then
|
||||
savedTable.started = false
|
||||
end
|
||||
|
||||
|
||||
if (segmentID) then
|
||||
savedTable.segment_id = segmentID
|
||||
end
|
||||
|
||||
|
||||
if (latestBossAt) then
|
||||
savedTable.previous_boss_killed_at = latestBossAt
|
||||
end
|
||||
@@ -1568,14 +1570,14 @@ function _detalhes:RestoreState_CurrentMythicDungeonRun()
|
||||
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
|
||||
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
|
||||
local mapID = C_Map.GetBestMapForUnit ("player")
|
||||
|
||||
|
||||
if (not mapID) then
|
||||
--print("D! no mapID to restored mythic dungeon state.")
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local ejID = 0
|
||||
|
||||
|
||||
if (mapID) then
|
||||
ejID = DetailsFramework.EncounterJournal.EJ_GetInstanceForMap (mapID) or 0
|
||||
end
|
||||
@@ -1599,7 +1601,7 @@ function _detalhes:RestoreState_CurrentMythicDungeonRun()
|
||||
DetailsMythicPlusFrame.IsDoingMythicDungeon = true
|
||||
|
||||
print("D! (debug) mythic dungeon state restored.")
|
||||
|
||||
|
||||
C_Timer.After(2, function()
|
||||
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_START")
|
||||
end)
|
||||
@@ -1610,7 +1612,7 @@ function _detalhes:RestoreState_CurrentMythicDungeonRun()
|
||||
else
|
||||
print("D! (debug) zone name or zone Id isn't the same:", zoneName, savedTable.dungeon_name, currentZoneID, savedTable.dungeon_zone_id)
|
||||
end
|
||||
|
||||
|
||||
--mythic run is over
|
||||
savedTable.started = false
|
||||
else
|
||||
@@ -1670,21 +1672,21 @@ local exportProfileBlacklist = {
|
||||
function Details:ExportCurrentProfile()
|
||||
--save the current profile
|
||||
Details:SaveProfile()
|
||||
|
||||
|
||||
--data saved inside the profile
|
||||
local profileObject = Details:GetProfile (Details:GetCurrentProfileName())
|
||||
if (not profileObject) then
|
||||
Details:Msg("fail to get the current profile.")
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
--data saved individual for each character
|
||||
local defaultPlayerData = Details.default_player_data
|
||||
local playerData = {}
|
||||
--data saved for the account
|
||||
local defaultGlobalData = Details.default_global_data
|
||||
local globaData = {}
|
||||
|
||||
|
||||
--fill player and global data tables
|
||||
for key, _ in pairs(defaultPlayerData) do
|
||||
if (not exportProfileBlacklist[key]) then
|
||||
@@ -1704,7 +1706,7 @@ function Details:ExportCurrentProfile()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local exportedData = {
|
||||
profile = profileObject,
|
||||
playerData = playerData,
|
||||
@@ -1722,13 +1724,13 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
Details:Msg("invalid profile name or profile name is too short.") --localize-me
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
profileString = DetailsFramework:Trim (profileString)
|
||||
local currentDataVersion = 1
|
||||
|
||||
|
||||
local dataTable = Details:DecompressData (profileString, "print")
|
||||
if (dataTable) then
|
||||
|
||||
|
||||
local profileObject = Details:GetProfile (newProfileName, false)
|
||||
if (not profileObject) then
|
||||
--profile doesn't exists, create new
|
||||
@@ -1738,20 +1740,20 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local profileData, playerData, globalData, version = dataTable.profile, dataTable.playerData, dataTable.globaData, dataTable.version
|
||||
|
||||
|
||||
if (version < currentDataVersion) then
|
||||
--perform update in the sereived settings
|
||||
end
|
||||
|
||||
|
||||
--character data defaults
|
||||
local defaultPlayerData = Details.default_player_data
|
||||
--global data defaults
|
||||
local defaultGlobalData = Details.default_global_data
|
||||
--profile defaults
|
||||
local defaultProfileData = Details.default_profile
|
||||
|
||||
|
||||
--transfer player and global data tables from the profile to details object
|
||||
for key, _ in pairs(defaultPlayerData) do
|
||||
local importedValue = playerData[key]
|
||||
@@ -1763,7 +1765,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for key, _ in pairs(defaultGlobalData) do
|
||||
local importedValue = globalData[key]
|
||||
if (importedValue ~= nil) then
|
||||
@@ -1774,7 +1776,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--transfer data from the imported profile to the new profile object
|
||||
for key, _ in pairs(defaultProfileData) do
|
||||
local importedValue = profileData[key]
|
||||
|
||||
@@ -36,6 +36,15 @@ function Details:StartMeUp() --I'll never stop!
|
||||
|
||||
self.click_to_report_color = {1, 0.8, 0, 1}
|
||||
|
||||
--death tooltip function, exposed for 3rd party customization
|
||||
--called when the mouse hover over a player line when displaying deaths
|
||||
--the function called receives 4 parameters: instanceObject, lineFrame, combatObject, deathTable
|
||||
--@instance: the details! object of the window showing the deaths
|
||||
--@lineFrame: the frame to setpoint your frame
|
||||
--@combatObject: the combat it self
|
||||
--@deathTable: a table containing all the information about the player's death
|
||||
Details.ShowDeathTooltipFunction = Details.ShowDeathTooltip
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--initialize
|
||||
C_Timer.After(2, function()
|
||||
|
||||
Reference in New Issue
Block a user