More bug fixes
This commit is contained in:
+1
-1
@@ -218,7 +218,7 @@ do
|
||||
if (not name) then
|
||||
return
|
||||
end
|
||||
if (name == encountername or name:find (encountername)) then
|
||||
if (name == encountername or name:find(encountername)) then
|
||||
return i, DetailsFramework.EncounterJournal.EJ_GetEncounterInfoByIndex (i, EJID)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -143,7 +143,7 @@ function Details:CreateCallbackListeners()
|
||||
|
||||
if (_G.DBM) then
|
||||
local dbm_timer_callback = function(bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid)
|
||||
local spell = tostring (spellId)
|
||||
local spell = tostring(spellId)
|
||||
if (spell and not current_table_dbm [spell]) then
|
||||
current_table_dbm [spell] = {spell, id, msg, timer, icon, bartype, spellId, colorId, modid}
|
||||
end
|
||||
@@ -156,7 +156,7 @@ function Details:CreateCallbackListeners()
|
||||
function Details:RegisterBigWigsCallBack()
|
||||
if (BigWigsLoader) then
|
||||
function Details:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...)
|
||||
spellid = tostring (spellid)
|
||||
spellid = tostring(spellid)
|
||||
if (not current_table_bigwigs [spellid]) then
|
||||
current_table_bigwigs [spellid] = {(type(module) == "string" and module) or (module and module.moduleName) or "", spellid or "", bar_text or "", time or 0, icon or ""}
|
||||
end
|
||||
|
||||
@@ -127,16 +127,16 @@ do
|
||||
|
||||
function _detalhes:GetOnlyName(string)
|
||||
if (string) then
|
||||
return string:gsub (("%-.*"), "")
|
||||
return string:gsub(("%-.*"), "")
|
||||
end
|
||||
return self.nome:gsub (("%-.*"), "")
|
||||
return self.nome:gsub(("%-.*"), "")
|
||||
end
|
||||
|
||||
function _detalhes:RemoveOwnerName (string)
|
||||
if (string) then
|
||||
return string:gsub ((" <.*"), "")
|
||||
return string:gsub((" <.*"), "")
|
||||
end
|
||||
return self.nome:gsub ((" <.*"), "")
|
||||
return self.nome:gsub((" <.*"), "")
|
||||
end
|
||||
|
||||
function _detalhes:GetCLName(id)
|
||||
|
||||
+19
-19
@@ -43,8 +43,8 @@ local create_deathrecap_line = function(parent, n)
|
||||
local backgroundTextureOverlay = line:CreateTexture(nil, "artwork")
|
||||
local spellIcon = line:CreateTexture(nil, "overlay")
|
||||
local spellIconBorder = line:CreateTexture(nil, "overlay")
|
||||
spellIcon:SetDrawLayer ("overlay", 1)
|
||||
spellIconBorder:SetDrawLayer ("overlay", 2)
|
||||
spellIcon:SetDrawLayer("overlay", 1)
|
||||
spellIconBorder:SetDrawLayer("overlay", 2)
|
||||
local sourceName = line:CreateFontString(nil, "overlay", "GameFontNormal")
|
||||
local amount = line:CreateFontString(nil, "overlay", "GameFontNormal")
|
||||
local lifePercent = line:CreateFontString(nil, "overlay", "GameFontNormal")
|
||||
@@ -53,14 +53,14 @@ local create_deathrecap_line = function(parent, n)
|
||||
--grave icon
|
||||
local graveIcon = line:CreateTexture(nil, "overlay")
|
||||
graveIcon:SetTexture([[Interface\MINIMAP\POIIcons]])
|
||||
graveIcon:SetTexCoord (146/256, 160/256, 0/512, 18/512)
|
||||
graveIcon:SetTexCoord(146/256, 160/256, 0/512, 18/512)
|
||||
graveIcon:SetPoint("left", line, "left", 11, 0)
|
||||
graveIcon:SetSize(14, 18)
|
||||
|
||||
--spell icon
|
||||
spellIcon:SetSize(19, 19)
|
||||
spellIconBorder:SetTexture([[Interface\ENCOUNTERJOURNAL\LootTab]])
|
||||
spellIconBorder:SetTexCoord (6/256, 38/256, 49/128, 81/128)
|
||||
spellIconBorder:SetTexCoord(6/256, 38/256, 49/128, 81/128)
|
||||
spellIconBorder:SetSize(20, 20)
|
||||
spellIconBorder:SetPoint("topleft", spellIcon, "topleft", 0, 0)
|
||||
|
||||
@@ -96,13 +96,13 @@ local create_deathrecap_line = function(parent, n)
|
||||
lifeStatusBar:SetColorTexture(0.5, 0.5, 0.5, 0.4)
|
||||
|
||||
backgroundTexture:SetTexture([[Interface\AddOns\Details\images\deathrecap_background]])
|
||||
backgroundTexture:SetTexCoord (0, 1, 0, 1)
|
||||
backgroundTexture:SetTexCoord(0, 1, 0, 1)
|
||||
backgroundTexture:SetVertexColor(.1, .1, .1, .3)
|
||||
|
||||
--top border
|
||||
local TopFader = line:CreateTexture(nil, "border")
|
||||
TopFader:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_top]])
|
||||
TopFader:SetTexCoord (0, 1, 0, 1)
|
||||
TopFader:SetTexCoord(0, 1, 0, 1)
|
||||
TopFader:SetVertexColor(.1, .1, .1, .3)
|
||||
TopFader:SetPoint("bottomleft", backgroundTexture, "topleft", 0, -0)
|
||||
TopFader:SetPoint("bottomright", backgroundTexture, "topright", 0, -0)
|
||||
@@ -114,7 +114,7 @@ local create_deathrecap_line = function(parent, n)
|
||||
--bottom fader
|
||||
local backgroundTexture2 = line:CreateTexture(nil, "border")
|
||||
backgroundTexture2:SetTexture([[Interface\AddOns\Details\images\deathrecap_background_bottom]])
|
||||
backgroundTexture2:SetTexCoord (0, 1, 0, 1)
|
||||
backgroundTexture2:SetTexCoord(0, 1, 0, 1)
|
||||
backgroundTexture2:SetVertexColor(.1, .1, .1, .3)
|
||||
backgroundTexture2:SetPoint("topleft", backgroundTexture, "bottomleft", 0, 0)
|
||||
backgroundTexture2:SetPoint("topright", backgroundTexture, "bottomright", 0, 0)
|
||||
@@ -129,7 +129,7 @@ local create_deathrecap_line = function(parent, n)
|
||||
backgroundTexture:SetPoint("bottomright", 0, -1)
|
||||
backgroundTexture:SetDesaturated(true)
|
||||
backgroundTextureOverlay:SetTexture([[Interface\AdventureMap\AdventureMap]])
|
||||
backgroundTextureOverlay:SetTexCoord (460/1024, 659/1024, 330/1024, 350/1024)
|
||||
backgroundTextureOverlay:SetTexCoord(460/1024, 659/1024, 330/1024, 350/1024)
|
||||
backgroundTextureOverlay:SetAllPoints()
|
||||
backgroundTextureOverlay:SetDesaturated(true)
|
||||
backgroundTextureOverlay:SetAlpha(0.5)
|
||||
@@ -173,7 +173,7 @@ function Details.BuildDeathTableFromRecap (recapID)
|
||||
{}, --deathlog events
|
||||
(events [1] and events [1].timestamp) or (DeathRecapFrame and DeathRecapFrame.DeathTimeStamp) or 0, --time of death
|
||||
UnitName ("player"),
|
||||
select(2, UnitClass ("player")),
|
||||
select(2, UnitClass("player")),
|
||||
UnitHealthMax ("player"),
|
||||
"0m 0s", --formated fight time
|
||||
["dead"] = true,
|
||||
@@ -215,10 +215,10 @@ function Details.GetDeathRecapFromChat()
|
||||
for i = numLines, 1, -1 do
|
||||
local text = chat1:GetMessageInfo (i)
|
||||
if (text) then
|
||||
if (text:find ("Hdeath:%d")) then
|
||||
if (text:find("Hdeath:%d")) then
|
||||
local recapID = text:match ("|Hdeath:(%d+)|h")
|
||||
if (recapID) then
|
||||
recapIDFromChat = tonumber (recapID)
|
||||
recapIDFromChat = tonumber(recapID)
|
||||
end
|
||||
break
|
||||
end
|
||||
@@ -487,14 +487,14 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
|
||||
local line = Details.DeathRecap.Lines [lineIndex]
|
||||
if (line) then
|
||||
line.timeAt:SetText(format ("%.1f", eventTime - timeOfDeath) .. "s")
|
||||
line.timeAt:SetText(format("%.1f", eventTime - timeOfDeath) .. "s")
|
||||
line.spellIcon:SetTexture(spellIcon or customSpellInfo and customSpellInfo [3] or "")
|
||||
line.TopFader:Hide()
|
||||
--line.spellIcon:SetTexCoord (.1, .9, .1, .9)
|
||||
--line.spellIcon:SetTexCoord(.1, .9, .1, .9)
|
||||
--line.sourceName:SetText("|cFFC6B0D9" .. source .. "|r")
|
||||
|
||||
--parse source and cut the length of the string after setting the spellname and source
|
||||
local sourceClass = Details:GetClass (source)
|
||||
local sourceClass = Details:GetClass(source)
|
||||
local sourceSpec = Details:GetSpec (source)
|
||||
|
||||
if (not sourceClass) then
|
||||
@@ -520,7 +520,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
--remove real name or owner name
|
||||
source = Details:GetOnlyName(source)
|
||||
--remove owner name
|
||||
source = source:gsub ((" <.*"), "")
|
||||
source = source:gsub((" <.*"), "")
|
||||
|
||||
--if a player?
|
||||
if (Details.player_class [sourceClass]) then
|
||||
@@ -534,19 +534,19 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
|
||||
--remove the dot signal from the spell name
|
||||
if (not spellName) then
|
||||
spellName = customSpellInfo and customSpellInfo [2] or "*?*"
|
||||
if (spellName:find (STRING_ENVIRONMENTAL_DAMAGE_FALLING)) then
|
||||
if (spellName:find(STRING_ENVIRONMENTAL_DAMAGE_FALLING)) then
|
||||
if (UnitName ("player") == "Elphaba") then
|
||||
spellName = "Gravity Won!, Elphaba..."
|
||||
source = ""
|
||||
else
|
||||
source = "Gravity"
|
||||
end
|
||||
--/run for a,b in pairs(_G) do if (type(b)=="string" and b:find ("Falling")) then print(a,b) end end
|
||||
--/run for a,b in pairs(_G) do if (type(b)=="string" and b:find("Falling")) then print(a,b) end end
|
||||
end
|
||||
end
|
||||
|
||||
spellName = spellName:gsub (L["STRING_DOT"], "")
|
||||
spellName = spellName:gsub ("[*] ", "")
|
||||
spellName = spellName:gsub(L["STRING_DOT"], "")
|
||||
spellName = spellName:gsub("[*] ", "")
|
||||
source = source or ""
|
||||
|
||||
line.sourceName:SetText(spellName .. " (" .. "|cFFC6B0D9" .. source .. "|r" .. ")")
|
||||
|
||||
+10
-10
@@ -49,7 +49,7 @@ local addPlayerDamage = function(unitName, unitRealm)
|
||||
playerData = {
|
||||
Name = unitName,
|
||||
ChartData = {max_value = 0},
|
||||
Class = select(2, UnitClass (CLName)),
|
||||
Class = select(2, UnitClass(CLName)),
|
||||
|
||||
--spec zero for now, need to retrive later during combat
|
||||
Spec = 0,
|
||||
@@ -167,7 +167,7 @@ function mythicDungeonCharts:OnBossDefeated()
|
||||
if (mythicLevel and mythicLevel > 0) then
|
||||
if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running and bossInfo) then
|
||||
|
||||
local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo)
|
||||
local copiedBossInfo = Details:GetFramework().table.copy({}, bossInfo)
|
||||
tinsert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()})
|
||||
mythicDungeonCharts:Debug("Boss defeated, time saved", currentCombat:GetCombatTime())
|
||||
else
|
||||
@@ -177,7 +177,7 @@ function mythicDungeonCharts:OnBossDefeated()
|
||||
if (mythicDungeonCharts.ChartTable.EndTime + 2 >= now) then
|
||||
|
||||
if (bossInfo) then
|
||||
local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo)
|
||||
local copiedBossInfo = Details:GetFramework().table.copy({}, bossInfo)
|
||||
tinsert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()})
|
||||
mythicDungeonCharts:Debug("Boss defeated, time saved, but used time aproximation:", mythicDungeonCharts.ChartTable.EndTime + 2, now, currentCombat:GetCombatTime())
|
||||
end
|
||||
@@ -421,12 +421,12 @@ function mythicDungeonCharts.ShowChart()
|
||||
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin:SetTexture([[Interface\BUTTONS\UI-RadioButton]])
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin:SetTexCoord (17/64, 32/64, 0, 1)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin:SetTexCoord(17/64, 32/64, 0, 1)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPin:SetSize(16, 16)
|
||||
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "artwork")
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetTexture([[Interface\Calendar\EventNotificationGlow]])
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetTexCoord (0, 1, 0, 1)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetTexCoord(0, 1, 0, 1)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetSize(14, 14)
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetBlendMode("ADD")
|
||||
dungeonChartFrame.BossWidgetsFrame.GraphPinGlow:SetPoint("center", dungeonChartFrame.BossWidgetsFrame.GraphPin, "center", 0, 0)
|
||||
@@ -519,12 +519,12 @@ function mythicDungeonCharts.ShowChart()
|
||||
|
||||
local leftDivisorLine = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
leftDivisorLine:SetSize(2, dungeonChartFrame.ChartFrame.Graphic:GetHeight())
|
||||
leftDivisorLine:SetColorTexture (1, 1, 1, 1)
|
||||
leftDivisorLine:SetColorTexture(1, 1, 1, 1)
|
||||
leftDivisorLine:SetPoint("bottomleft", dungeonChartFrame.ChartFrame.Graphic.TextFrame, "bottomleft", -2, 0)
|
||||
|
||||
local bottomDivisorLine = dungeonChartFrame.BossWidgetsFrame:CreateTexture(nil, "overlay")
|
||||
bottomDivisorLine:SetSize(dungeonChartFrame.ChartFrame.Graphic:GetWidth(), 2)
|
||||
bottomDivisorLine:SetColorTexture (1, 1, 1, 1)
|
||||
bottomDivisorLine:SetColorTexture(1, 1, 1, 1)
|
||||
bottomDivisorLine:SetPoint("bottomleft", dungeonChartFrame.ChartFrame.Graphic.TextFrame, "bottomleft", 0, 0)
|
||||
|
||||
dungeonChartFrame.ChartFrame.Graphic:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
@@ -547,7 +547,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
newBossWidget.AvatarTexture = bossAvatar
|
||||
|
||||
local verticalLine = Details:GetFramework():CreateImage(newBossWidget, "", 1, dungeonChartFrame.ChartFrame.Graphic:GetHeight(), "overlay")
|
||||
verticalLine:SetColorTexture (1, 1, 1, 0.3)
|
||||
verticalLine:SetColorTexture(1, 1, 1, 0.3)
|
||||
verticalLine:SetPoint("bottomleft", newBossWidget, "bottomright", 0, 0)
|
||||
|
||||
local timeText = Details:GetFramework():CreateLabel(newBossWidget)
|
||||
@@ -555,7 +555,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
newBossWidget.TimeText = timeText
|
||||
|
||||
local timeBackground = Details:GetFramework():CreateImage(newBossWidget, "", 30, 12, "artwork")
|
||||
timeBackground:SetColorTexture (0, 0, 0, 0.5)
|
||||
timeBackground:SetColorTexture(0, 0, 0, 0.5)
|
||||
timeBackground:SetPoint("topleft", timeText, "topleft", -2, 2)
|
||||
timeBackground:SetPoint("bottomright", timeText, "bottomright", 2, 0)
|
||||
|
||||
@@ -589,7 +589,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
if (Details.mythic_plus.last_mythicrun_chart) then
|
||||
--load the last mythic dungeon run chart
|
||||
local t = {}
|
||||
Details:GetFramework().table.copy (t, Details.mythic_plus.last_mythicrun_chart)
|
||||
Details:GetFramework().table.copy(t, Details.mythic_plus.last_mythicrun_chart)
|
||||
mythicDungeonCharts.ChartTable = t
|
||||
mythicDungeonCharts:Debug("no valid data, saved data loaded")
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ local common_events = {
|
||||
return
|
||||
end
|
||||
|
||||
local okay, errortext = pcall (func, event, ...)
|
||||
local okay, errortext = pcall(func, event, ...)
|
||||
|
||||
if (not okay) then
|
||||
--trigger an error msg
|
||||
@@ -272,7 +272,7 @@ local common_events = {
|
||||
return
|
||||
end
|
||||
|
||||
local okay, errortext = pcall (func, context, event, ...)
|
||||
local okay, errortext = pcall(func, context, event, ...)
|
||||
|
||||
if (not okay) then
|
||||
--attempt to get the context name
|
||||
|
||||
@@ -603,7 +603,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
|
||||
|
||||
--store data
|
||||
--[=[
|
||||
local expansion = tostring (select(4, GetBuildInfo())):match ("%d%d")
|
||||
local expansion = tostring(select(4, GetBuildInfo())):match ("%d%d")
|
||||
if (expansion and type(expansion) == "string" and string.len(expansion) == 2) then
|
||||
local expansionDungeonData = _detalhes.dungeon_data [expansion]
|
||||
if (not expansionDungeonData) then
|
||||
|
||||
+2
-2
@@ -401,11 +401,11 @@ function Details.packFunctions.RetriveActorInformation(combatData, index)
|
||||
local serialNumber = combatData[index + 2]
|
||||
serialNumber = unpackActorSerial(serialNumber)
|
||||
|
||||
--class [4]
|
||||
--class[4]
|
||||
local class = combatData[index + 3]
|
||||
class = unpackActorClass(class)
|
||||
|
||||
--spec [5]
|
||||
--spec[5]
|
||||
local spec = tonumber(combatData[index + 4])
|
||||
|
||||
--return the values
|
||||
|
||||
@@ -19,7 +19,7 @@ do
|
||||
end
|
||||
|
||||
function _detalhes:GetIconTexture (iconType, withAlpha)
|
||||
iconType = string.lower (iconType)
|
||||
iconType = string.lower(iconType)
|
||||
|
||||
if (iconType == "spec") then
|
||||
if (withAlpha) then
|
||||
@@ -38,7 +38,7 @@ do
|
||||
end
|
||||
|
||||
-- try get the class from actor name
|
||||
function _detalhes:GetClass (name)
|
||||
function _detalhes:GetClass(name)
|
||||
local _, class = _UnitClass (name)
|
||||
|
||||
if (not class) then
|
||||
@@ -204,7 +204,7 @@ do
|
||||
return
|
||||
end
|
||||
|
||||
local class = _detalhes:GetClass (Actor.nome)
|
||||
local class = _detalhes:GetClass(Actor.nome)
|
||||
if (class and class ~= "UNKNOW") then
|
||||
Actor.classe = class
|
||||
Actor.need_refresh = true
|
||||
|
||||
+11
-11
@@ -165,7 +165,7 @@ function _detalhes:ResetProfile (profile_name)
|
||||
end
|
||||
|
||||
--reset the profile
|
||||
table.wipe (profile.instances)
|
||||
table.wipe(profile.instances)
|
||||
|
||||
--export first instance
|
||||
local instance = _detalhes:GetInstance(1)
|
||||
@@ -196,7 +196,7 @@ function _detalhes:CreatePanicWarning()
|
||||
--tinsert(UISpecialFrames, "DetailsPanicWarningFrame")
|
||||
_detalhes.instance_load_failed.text = _detalhes.instance_load_failed:CreateFontString(nil, "overlay", "GameFontNormal")
|
||||
_detalhes.instance_load_failed.text:SetPoint("center", _detalhes.instance_load_failed, "center")
|
||||
_detalhes.instance_load_failed.text:SetTextColor (1, 0.6, 0)
|
||||
_detalhes.instance_load_failed.text:SetTextColor(1, 0.6, 0)
|
||||
_detalhes.instance_load_failed:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
_detalhes.instance_load_failed:SetBackdropColor(1, 0, 0, 0.2)
|
||||
_detalhes.instance_load_failed:SetPoint("topleft", UIParent, "topleft", 0, -250)
|
||||
@@ -204,7 +204,7 @@ function _detalhes:CreatePanicWarning()
|
||||
end
|
||||
|
||||
local safe_load = function(func, param1, ...)
|
||||
local okey, errortext = pcall (func, param1, ...)
|
||||
local okey, errortext = pcall(func, param1, ...)
|
||||
if (not okey) then
|
||||
if (not _detalhes.instance_load_failed) then
|
||||
_detalhes:CreatePanicWarning()
|
||||
@@ -283,7 +283,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
|
||||
--then close all opened instances
|
||||
for index, instance in _detalhes:ListInstances() do
|
||||
if (not getmetatable (instance)) then
|
||||
if (not getmetatable(instance)) then
|
||||
instance.iniciada = false
|
||||
setmetatable(instance, _detalhes)
|
||||
end
|
||||
@@ -1511,7 +1511,7 @@ function _detalhes:SaveProfileSpecial()
|
||||
end
|
||||
|
||||
--save skins
|
||||
table.wipe (profile.instances)
|
||||
table.wipe(profile.instances)
|
||||
|
||||
if (_detalhes.tabela_instancias) then
|
||||
for index, instance in ipairs(_detalhes.tabela_instancias) do
|
||||
@@ -1686,7 +1686,7 @@ function Details:ExportCurrentProfile()
|
||||
for key, _ in pairs(defaultPlayerData) do
|
||||
if (not exportProfileBlacklist[key]) then
|
||||
if (type(Details[key]) == "table") then
|
||||
playerData [key] = DetailsFramework.table.copy ({}, Details[key])
|
||||
playerData [key] = DetailsFramework.table.copy({}, Details[key])
|
||||
else
|
||||
playerData [key] = Details[key]
|
||||
end
|
||||
@@ -1695,7 +1695,7 @@ function Details:ExportCurrentProfile()
|
||||
for key, _ in pairs(defaultGlobalData) do
|
||||
if (not exportProfileBlacklist[key]) then
|
||||
if (type(Details[key]) == "table") then
|
||||
globaData [key] = DetailsFramework.table.copy ({}, Details[key])
|
||||
globaData [key] = DetailsFramework.table.copy({}, Details[key])
|
||||
else
|
||||
globaData [key] = Details[key]
|
||||
end
|
||||
@@ -1754,7 +1754,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
local importedValue = playerData[key]
|
||||
if (importedValue ~= nil) then
|
||||
if (type(importedValue) == "table") then
|
||||
Details [key] = DetailsFramework.table.copy ({}, importedValue)
|
||||
Details [key] = DetailsFramework.table.copy({}, importedValue)
|
||||
else
|
||||
Details [key] = importedValue
|
||||
end
|
||||
@@ -1765,7 +1765,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
local importedValue = globalData[key]
|
||||
if (importedValue ~= nil) then
|
||||
if (type(importedValue) == "table") then
|
||||
Details [key] = DetailsFramework.table.copy ({}, importedValue)
|
||||
Details [key] = DetailsFramework.table.copy({}, importedValue)
|
||||
else
|
||||
Details [key] = importedValue
|
||||
end
|
||||
@@ -1777,7 +1777,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
local importedValue = profileData[key]
|
||||
if (importedValue ~= nil) then
|
||||
if (type(importedValue) == "table") then
|
||||
profileObject [key] = DetailsFramework.table.copy ({}, importedValue)
|
||||
profileObject [key] = DetailsFramework.table.copy({}, importedValue)
|
||||
else
|
||||
profileObject [key] = importedValue
|
||||
end
|
||||
@@ -1804,7 +1804,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
||||
Details.segments_amount_to_save = 40
|
||||
|
||||
--transfer instance data to the new created profile
|
||||
profileObject.instances = DetailsFramework.table.copy ({}, profileData.instances)
|
||||
profileObject.instances = DetailsFramework.table.copy({}, profileData.instances)
|
||||
|
||||
Details:ApplyProfile (newProfileName)
|
||||
|
||||
|
||||
+1
-1
@@ -1055,7 +1055,7 @@ local _
|
||||
|
||||
end
|
||||
|
||||
table.wipe (instance1.snap); table.wipe (instance2.snap)
|
||||
table.wipe(instance1.snap); table.wipe(instance2.snap)
|
||||
instance1.snap [3] = 2; instance2.snap [1] = 1;
|
||||
instance1.horizontalSnap = true; instance2.horizontalSnap = true
|
||||
|
||||
|
||||
+34
-34
@@ -23,7 +23,7 @@ SLASH_DETAILS1, SLASH_DETAILS2, SLASH_DETAILS3 = "/details", "/dt", "/de"
|
||||
function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
local command, rest = msg:match("^(%S*)%s*(.-)$")
|
||||
command = string.lower (command)
|
||||
command = string.lower(command)
|
||||
|
||||
if (command == Loc ["STRING_SLASH_WIPE"] or command == "wipe") then
|
||||
|
||||
@@ -41,7 +41,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
elseif (command == Loc ["STRING_SLASH_TOGGLE"] or command == "toggle") then
|
||||
|
||||
local instance = rest:match ("^(%S*)%s*(.-)$")
|
||||
instance = tonumber (instance)
|
||||
instance = tonumber(instance)
|
||||
if (instance) then
|
||||
_detalhes:ToggleWindow (instance)
|
||||
else
|
||||
@@ -51,7 +51,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
elseif (command == Loc ["STRING_SLASH_HIDE"] or command == Loc ["STRING_SLASH_HIDE_ALIAS1"] or command == "hide") then
|
||||
|
||||
local instance = rest:match ("^(%S*)%s*(.-)$")
|
||||
instance = tonumber (instance)
|
||||
instance = tonumber(instance)
|
||||
if (instance) then
|
||||
local this_instance = _detalhes:GetInstance(instance)
|
||||
if (not this_instance) then
|
||||
@@ -130,7 +130,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
_detalhes.LastShowCommand = GetTime()
|
||||
local instance = rest:match ("^(%S*)%s*(.-)$")
|
||||
instance = tonumber (instance)
|
||||
instance = tonumber(instance)
|
||||
if (instance) then
|
||||
local this_instance = _detalhes:GetInstance(instance)
|
||||
if (not this_instance) then
|
||||
@@ -173,8 +173,8 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_OPTIONS"] or command == "options" or command == "config") then
|
||||
|
||||
if (rest and tonumber (rest)) then
|
||||
local instanceN = tonumber (rest)
|
||||
if (rest and tonumber(rest)) then
|
||||
local instanceN = tonumber(rest)
|
||||
if (instanceN > 0 and instanceN <= #_detalhes.tabela_instancias) then
|
||||
local instance = _detalhes:GetInstance(instanceN)
|
||||
_detalhes:OpenOptionsWindow (instance)
|
||||
@@ -195,7 +195,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
local questIds = {{"Tarlna the Ageless", 81535}, {"Drov the Ruiner ", 87437}, {"Rukhmar", 87493}}
|
||||
for _, _table in pairs(questIds) do
|
||||
print(format ("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"]))
|
||||
print(format("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"]))
|
||||
end
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_CHANGES"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS1"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS2"] or command == "news" or command == "updates") then
|
||||
@@ -324,7 +324,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
A:Play()
|
||||
|
||||
C_Timer.NewTicker(1, function()
|
||||
texture:SetTexCoord (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
|
||||
texture:SetTexCoord(math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
|
||||
end)
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
for i = 1, 10000 do
|
||||
a [i] = {math.random (50000)}
|
||||
end
|
||||
table.wipe (a)
|
||||
table.wipe(a)
|
||||
|
||||
elseif (msg == "unitname") then
|
||||
|
||||
@@ -631,7 +631,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
scanTool:ClearLines()
|
||||
|
||||
print(petName)
|
||||
scanTool:SetUnit (petName)
|
||||
scanTool:SetUnit(petName)
|
||||
|
||||
local ownerText = scanText:GetText()
|
||||
if (not ownerText) then
|
||||
@@ -649,7 +649,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
elseif (command == "buffsof") then
|
||||
|
||||
local playername, segment = rest:match("^(%S*)%s*(.-)$")
|
||||
segment = tonumber (segment or 0)
|
||||
segment = tonumber(segment or 0)
|
||||
print("dumping buffs of ", playername, segment)
|
||||
|
||||
local c = _detalhes:GetCombat("current")
|
||||
@@ -727,7 +727,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
--debug
|
||||
elseif (command == "barra") then
|
||||
|
||||
local whichRowLine = rest and tonumber (rest) or 1
|
||||
local whichRowLine = rest and tonumber(rest) or 1
|
||||
|
||||
local instancia = _detalhes.tabela_instancias [1]
|
||||
local barra = instancia.barras [whichRowLine]
|
||||
@@ -758,7 +758,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print(g)
|
||||
print(string.len(g))
|
||||
local serial = g:sub (12, 18)
|
||||
serial = tonumber ("0x"..serial)
|
||||
serial = tonumber("0x"..serial)
|
||||
print(serial)
|
||||
|
||||
--tonumber((UnitGUID("target")):sub(-12, -9), 16))
|
||||
@@ -788,7 +788,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
Details.id_frame.texto = CreateFrame("editbox", nil, Details.id_frame, "BackdropTemplate")
|
||||
Details.id_frame.texto:SetPoint("topleft", Details.id_frame, "topleft")
|
||||
Details.id_frame.texto:SetAutoFocus(false)
|
||||
Details.id_frame.texto:SetFontObject (GameFontHighlightSmall)
|
||||
Details.id_frame.texto:SetFontObject(GameFontHighlightSmall)
|
||||
Details.id_frame.texto:SetHeight(14)
|
||||
Details.id_frame.texto:SetWidth(120)
|
||||
Details.id_frame.texto:SetJustifyH("CENTER")
|
||||
@@ -844,7 +844,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
_detalhes.id_frame.texto = CreateFrame("editbox", nil, _detalhes.id_frame)
|
||||
_detalhes.id_frame.texto:SetPoint("topleft", _detalhes.id_frame, "topleft")
|
||||
_detalhes.id_frame.texto:SetAutoFocus(false)
|
||||
_detalhes.id_frame.texto:SetFontObject (GameFontHighlightSmall)
|
||||
_detalhes.id_frame.texto:SetFontObject(GameFontHighlightSmall)
|
||||
_detalhes.id_frame.texto:SetHeight(14)
|
||||
_detalhes.id_frame.texto:SetWidth(120)
|
||||
_detalhes.id_frame.texto:SetJustifyH("CENTER")
|
||||
@@ -879,8 +879,8 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
end
|
||||
|
||||
else
|
||||
print(pass_guid.. " -> " .. tonumber (pass_guid:sub(6, 10), 16))
|
||||
_detalhes.id_frame.texto:SetText(""..tonumber (pass_guid:sub(6, 10), 16))
|
||||
print(pass_guid.. " -> " .. tonumber(pass_guid:sub(6, 10), 16))
|
||||
_detalhes.id_frame.texto:SetText(""..tonumber(pass_guid:sub(6, 10), 16))
|
||||
_detalhes.id_frame.texto:HighlightText()
|
||||
end
|
||||
|
||||
@@ -931,7 +931,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
elseif (command == "names") then
|
||||
local t, filter = rest:match("^(%S*)%s*(.-)$")
|
||||
|
||||
t = tonumber (t)
|
||||
t = tonumber(t)
|
||||
if (not t) then
|
||||
return print("not T found.")
|
||||
end
|
||||
@@ -957,7 +957,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
local t, filter = rest:match("^(%S*)%s*(.-)$")
|
||||
|
||||
t = tonumber (t)
|
||||
t = tonumber(t)
|
||||
if (not t) then
|
||||
return print("not T found.")
|
||||
end
|
||||
@@ -1073,7 +1073,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
local x, y = GetPlayerMapPosition ("player")
|
||||
|
||||
if (not DetailsPosBox) then
|
||||
_detalhes.gump:CreateTextEntry (UIParent, function()end, 200, 20, nil, "DetailsPosBox")
|
||||
_detalhes.gump:CreateTextEntry(UIParent, function()end, 200, 20, nil, "DetailsPosBox")
|
||||
DetailsPosBox:SetPoint("center", UIParent, "center")
|
||||
end
|
||||
|
||||
@@ -1309,7 +1309,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
--texture:SetTexture([[Interface\Store\Store-Splash]])
|
||||
--texture:SetTexture([[Interface\AddOns\Details\images\options_window]])
|
||||
--texture:SetTexture([[Interface\CHARACTERFRAME\Button_BloodPresence_DeathKnight]])
|
||||
--texture:SetTexCoord (unpack(_detalhes.class_specs_coords [spec]))
|
||||
--texture:SetTexCoord(unpack(_detalhes.class_specs_coords [spec]))
|
||||
|
||||
--a:SetAlpha(abs(math.sin (time)))
|
||||
--a:SetValue(abs(math.sin (time)))
|
||||
@@ -1362,7 +1362,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
local spec = DetailsFramework.GetSpecialization()
|
||||
if (spec) then
|
||||
local specID = DetailsFramework.GetSpecializationInfo (spec)
|
||||
local specID = DetailsFramework.GetSpecializationInfo(spec)
|
||||
if (specID and specID ~= 0) then
|
||||
print("Current SpecID: ", specID)
|
||||
end
|
||||
@@ -1612,7 +1612,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
local keys = {}
|
||||
|
||||
--copy from table2 to table1 overwriting values
|
||||
function f.copy (t1, t2)
|
||||
function f.copy(t1, t2)
|
||||
if (t1.Timer) then
|
||||
t1, t2 = t1.t1, t1.t2
|
||||
end
|
||||
@@ -1632,7 +1632,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
keys [key] = true
|
||||
|
||||
f.copy (t1 [key], t2 [key])
|
||||
f.copy(t1 [key], t2 [key])
|
||||
else
|
||||
t1 [key] = value
|
||||
end
|
||||
@@ -1641,8 +1641,8 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
return t1
|
||||
end
|
||||
|
||||
--local copySegment = f.copy ({}, _detalhes.tabela_vigente)
|
||||
local copySegment = f.copy ({}, _detalhes.tabela_historico.tabelas [2])
|
||||
--local copySegment = f.copy({}, _detalhes.tabela_vigente)
|
||||
local copySegment = f.copy({}, _detalhes.tabela_historico.tabelas [2])
|
||||
|
||||
--the segment received is raw and does not have metatables, need to refresh them
|
||||
local zipData = Details:CompressData (copySegment, "print")
|
||||
@@ -1664,7 +1664,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
--attempt to cast the passed value to the same value as the type in the profile
|
||||
if (whichType == "number") then
|
||||
rest = tonumber (rest)
|
||||
rest = tonumber(rest)
|
||||
if (rest) then
|
||||
_detalhes [command] = rest
|
||||
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
|
||||
@@ -1673,7 +1673,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
end
|
||||
|
||||
elseif (whichType == "string") then
|
||||
rest = tostring (rest)
|
||||
rest = tostring(rest)
|
||||
if (rest) then
|
||||
_detalhes [command] = rest
|
||||
print(Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
|
||||
@@ -1727,7 +1727,7 @@ function Details.RefreshUserList (ignoreIfHidden)
|
||||
return
|
||||
end
|
||||
|
||||
local newList = DetailsFramework.table.copy ({}, _detalhes.users or {})
|
||||
local newList = DetailsFramework.table.copy({}, _detalhes.users or {})
|
||||
|
||||
table.sort (newList, function(t1, t2)
|
||||
return t1[3] > t2[3]
|
||||
@@ -1740,7 +1740,7 @@ function Details.RefreshUserList (ignoreIfHidden)
|
||||
local foundPlayer
|
||||
|
||||
for o = 1, #newList do
|
||||
if (newList[o][1]:find (playerName)) then
|
||||
if (newList[o][1]:find(playerName)) then
|
||||
foundPlayer = true
|
||||
break
|
||||
end
|
||||
@@ -1845,7 +1845,7 @@ function Details:UpdateUserPanel (usersTable)
|
||||
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
line:SetBackdropColor(unpack(backdrop_color))
|
||||
|
||||
DetailsFramework:Mixin (line, DetailsFramework.HeaderFunctions)
|
||||
DetailsFramework:Mixin(line, DetailsFramework.HeaderFunctions)
|
||||
|
||||
line:SetScript("OnEnter", lineOnEnter)
|
||||
line:SetScript("OnLeave", lineOnLeave)
|
||||
@@ -1949,10 +1949,10 @@ function _detalhes:CreateListPanel()
|
||||
row.text:SetPoint("topleft", _detalhes.ListPanel.container, "topleft", 0, -index * 15)
|
||||
end
|
||||
|
||||
if (filter and text:find (filter)) then
|
||||
row.text:SetTextColor (1, 1, 0)
|
||||
if (filter and text:find(filter)) then
|
||||
row.text:SetTextColor(1, 1, 0)
|
||||
else
|
||||
row.text:SetTextColor (1, 1, 1)
|
||||
row.text:SetTextColor(1, 1, 1)
|
||||
end
|
||||
|
||||
row.text:SetText(text)
|
||||
|
||||
+32
-3
@@ -428,10 +428,13 @@ do
|
||||
|
||||
--Devastation Evoker:
|
||||
[368847] = 1467, --Firestorm
|
||||
[369374] = 1467, --Firestorm
|
||||
[370452] = 1467, --Shattering Star
|
||||
[375087] = 1467, --Dragonrage
|
||||
[359073] = 1467, --Eternity Surge
|
||||
[359077] = 1467, --Eternity Surge
|
||||
[357211] = 1467, --Pyre
|
||||
[357212] = 1467, --Pyre
|
||||
|
||||
--Preservation Evoker:
|
||||
[370960] = 1468, --Emerald Communion
|
||||
@@ -2960,8 +2963,34 @@ do
|
||||
[20243] = "WARRIOR", --devastate
|
||||
[115767] = "WARRIOR", --deep wounds
|
||||
[109128] = "WARRIOR", --charge
|
||||
[109128] = "WARRIOR", --charge
|
||||
[12880] = "WARRIOR", --enrage
|
||||
|
||||
--evoker:
|
||||
[368847] = "EVOKER", --Firestorm
|
||||
[370452] = "EVOKER", --Shattering Star
|
||||
[375087] = "EVOKER", --Dragonrage
|
||||
[359073] = "EVOKER", --Eternity Surge
|
||||
[369374] = "EVOKER", --Firestorm
|
||||
[357211] = "EVOKER", --Pyre
|
||||
[357212] = "EVOKER", --Pyre
|
||||
[370960] = "EVOKER", --Emerald Communion
|
||||
[370537] = "EVOKER", --Stasis
|
||||
[367226] = "EVOKER", --Spiritbloom
|
||||
[361178] = "EVOKER", --Mass Return
|
||||
[359816] = "EVOKER", --Dream Flight
|
||||
[355936] = "EVOKER", --Dream Breath
|
||||
[357170] = "EVOKER", --Time Dilation
|
||||
[363534] = "EVOKER", --Rewind
|
||||
[360823] = "EVOKER", --Naturalize
|
||||
[373861] = "EVOKER", --Temporal Anomaly
|
||||
[366155] = "EVOKER", --Reversion
|
||||
[364343] = "EVOKER", --Echo
|
||||
[356995] = "EVOKER", --Desintegrate
|
||||
[357209] = "EVOKER", --Fire Breath
|
||||
[359077] = "EVOKER", --Eternity Surge
|
||||
[361500] = "EVOKER", --Living Flame
|
||||
[353759] = "EVOKER", --Deep Breath
|
||||
[387036] = "EVOKER", --Burning Embers
|
||||
}
|
||||
|
||||
_detalhes.AbsorbSpells = {
|
||||
@@ -3949,11 +3978,11 @@ do
|
||||
return _detalhes.spells_school [school] and _detalhes.spells_school [school].formated or ""
|
||||
end
|
||||
local default_school_color = {145/255, 180/255, 228/255}
|
||||
function _detalhes:GetSpellSchoolColor (school)
|
||||
function _detalhes:GetSpellSchoolColor(school)
|
||||
return unpack(_detalhes.spells_school [school] and _detalhes.spells_school [school].decimals or default_school_color)
|
||||
end
|
||||
function _detalhes:GetCooldownList (class)
|
||||
class = class or select(2, UnitClass ("player"))
|
||||
class = class or select(2, UnitClass("player"))
|
||||
return _detalhes.DefensiveCooldownSpells [class]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,7 +31,7 @@ end
|
||||
|
||||
function Details:CreateTestBars (alphabet, isArena)
|
||||
local current_combat = Details:GetCombat("current")
|
||||
local pclass = select(2, UnitClass ("player"))
|
||||
local pclass = select(2, UnitClass("player"))
|
||||
|
||||
local actors_name = {
|
||||
{"Spiro", "EVOKER", 1467},
|
||||
|
||||
+11
-11
@@ -502,17 +502,17 @@
|
||||
return
|
||||
end
|
||||
|
||||
text = text:gsub ("{dmg}", get_player_damage)
|
||||
text = text:gsub ("{rdps}", get_raid_dps)
|
||||
text = text:gsub ("{rhps}", get_raid_hps)
|
||||
text = text:gsub ("{dps}", get_player_dps)
|
||||
text = text:gsub ("{heal}", get_player_heal)
|
||||
text = text:gsub ("{hps}", get_player_hps)
|
||||
text = text:gsub ("{time}", get_combat_time)
|
||||
text = text:gsub ("{dpos}", get_damage_position)
|
||||
text = text:gsub ("{hpos}", get_heal_position)
|
||||
text = text:gsub ("{ddiff}", get_damage_diff)
|
||||
text = text:gsub ("{hdiff}", get_heal_diff)
|
||||
text = text:gsub("{dmg}", get_player_damage)
|
||||
text = text:gsub("{rdps}", get_raid_dps)
|
||||
text = text:gsub("{rhps}", get_raid_hps)
|
||||
text = text:gsub("{dps}", get_player_dps)
|
||||
text = text:gsub("{heal}", get_player_heal)
|
||||
text = text:gsub("{hps}", get_player_hps)
|
||||
text = text:gsub("{time}", get_combat_time)
|
||||
text = text:gsub("{dpos}", get_damage_position)
|
||||
text = text:gsub("{hpos}", get_heal_position)
|
||||
text = text:gsub("{ddiff}", get_damage_diff)
|
||||
text = text:gsub("{hdiff}", get_heal_diff)
|
||||
|
||||
return text
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user