General Bug Fixes

- Fixed custom displays import.
- Fixed 'Dynamic Overall Data' tooltip script.
- When using /details it tells the version of the addon much more clear.
This commit is contained in:
Tercio Jose
2019-09-21 13:40:38 -03:00
parent 9e376e8035
commit b4c9a55cc2
4 changed files with 31 additions and 25 deletions
+5 -5
View File
File diff suppressed because one or more lines are too long
+19 -17
View File
@@ -1218,14 +1218,14 @@
local PotionUsed = {
name = Loc ["STRING_CUSTOM_POT_DEFAULT"],
icon = [[Interface\ICONS\Trade_Alchemy_PotionD4]],
icon = [[Interface\ICONS\INV_Potion_03]],
attribute = false,
spellid = false,
author = "Details!",
desc = Loc ["STRING_CUSTOM_POT_DEFAULT_DESC"],
source = false,
target = false,
script_version = 4,
script_version = 5,
script = [[
--init:
local combat, instance_container, instance = ...
@@ -1438,7 +1438,7 @@
local Healthstone = {
name = Loc ["STRING_CUSTOM_HEALTHSTONE_DEFAULT"],
icon = [[Interface\ICONS\warlock_ healthstone]],
icon = [[Interface\ICONS\INV_Stone_04]],
attribute = false,
spellid = false,
author = "Details! Team",
@@ -1508,7 +1508,7 @@
]],
percent_script = false,
total_script = false,
script_version = 14,
script_version = 15,
}
-- /run _detalhes:AddDefaultCustomDisplays()
local have = false
@@ -1533,14 +1533,14 @@
local DamageActivityTime = {
name = Loc ["STRING_CUSTOM_ACTIVITY_DPS"],
icon = [[Interface\ICONS\Achievement_PVP_H_06]],
icon = [[Interface\Buttons\UI-MicroStream-Red]],
attribute = false,
spellid = false,
author = "Details!",
desc = Loc ["STRING_CUSTOM_ACTIVITY_DPS_DESC"],
source = false,
target = false,
script_version = 1,
script_version = 3,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
@@ -1597,14 +1597,14 @@
local HealActivityTime = {
name = Loc ["STRING_CUSTOM_ACTIVITY_HPS"],
icon = [[Interface\ICONS\Achievement_PVP_G_06]],
icon = [[Interface\Buttons\UI-MicroStream-Green]],
attribute = false,
spellid = false,
author = "Details!",
desc = Loc ["STRING_CUSTOM_ACTIVITY_HPS_DESC"],
source = false,
target = false,
script_version = 1,
script_version = 2,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
@@ -1769,14 +1769,14 @@
local CC_Received = {
name = Loc ["STRING_CUSTOM_CC_RECEIVED"],
icon = [[Interface\ICONS\Spell_Mage_IceNova]],
icon = [[Interface\ICONS\Spell_Frost_ChainsOfIce]],
attribute = false,
spellid = false,
author = "Details!",
desc = "Show the amount of crowd control received for each player.",
source = false,
target = false,
script_version = 2,
script_version = 3,
script = [[
local combat, instance_container, instance = ...
local total, top, amt = 0, 0, 0
@@ -1903,14 +1903,14 @@
local MySpells = {
name = Loc ["STRING_CUSTOM_MYSPELLS"],
icon = [[Interface\ICONS\ABILITY_MAGE_ARCANEBARRAGE]],
icon = [[Interface\CHATFRAME\UI-ChatIcon-Battlenet]],
attribute = false,
spellid = false,
author = "Details!",
desc = Loc ["STRING_CUSTOM_MYSPELLS_DESC"],
source = false,
target = false,
script_version = 6,
script_version = 7,
script = [[
--get the parameters passed
local combat, instance_container, instance = ...
@@ -2411,14 +2411,14 @@
local DynamicOverallDamage = {
name = Loc ["STRING_CUSTOM_DYNAMICOVERAL"], --"Dynamic Overall Damage",
icon = [[Interface\ICONS\Achievement_Quests_Completed_08]],
icon = [[Interface\Buttons\Spell-Reset]],
attribute = false,
spellid = false,
author = "Details!",
desc = "Show overall damage done on the fly.",
source = false,
target = false,
script_version = 4,
script_version = 5,
script = [[
--init:
local combat, instance_container, instance = ...
@@ -2485,9 +2485,11 @@
--current
local player = CurrentCombat [1]:GetActor (actor.nome)
local playerSpells = player:GetSpellList()
for spellID, spellTable in pairs (playerSpells) do
AllSpells [spellID] = (AllSpells [spellID] or 0) + (spellTable.total or 0)
if (player) then
local playerSpells = player:GetSpellList()
for spellID, spellTable in pairs (playerSpells) do
AllSpells [spellID] = (AllSpells [spellID] or 0) + (spellTable.total or 0)
end
end
local sortedList = {}
+6 -2
View File
@@ -1670,8 +1670,8 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
end
print (" ")
local v = _detalhes.game_version .. "." .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
print (Loc ["STRING_DETAILS1"] .. "" .. v .. " [|cFFFFFF00CORE: " .. _detalhes.realversion .. "|r] " .. Loc ["STRING_COMMAND_LIST"] .. ":")
--local v = _detalhes.game_version .. "." .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
--print (Loc ["STRING_DETAILS1"] .. "" .. v .. " [|cFFFFFF00CORE: " .. _detalhes.realversion .. "|r] " .. Loc ["STRING_COMMAND_LIST"] .. ":")
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_NEW"] .. "|r: " .. Loc ["STRING_SLASH_NEW_DESC"])
print ("|cffffaeae/details|r |cffffff33" .. Loc ["STRING_SLASH_SHOW"] .. " " .. Loc ["STRING_SLASH_HIDE"] .. " " .. Loc ["STRING_SLASH_TOGGLE"] .. "|r|cfffcffb0 <" .. Loc ["STRING_WINDOW_NUMBER"] .. ">|r: " .. Loc ["STRING_SLASH_SHOWHIDETOGGLE_DESC"])
@@ -1685,6 +1685,10 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
--print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WORLDBOSS"] .. "|r: " .. Loc ["STRING_SLASH_WORLDBOSS_DESC"])
print (" ")
local v = _detalhes.game_version .. "." .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter)
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00DETAILS! VERSION|r: |cFFFFAA00R" .. (_detalhes.build_counter >= _detalhes.alpha_build_counter and _detalhes.build_counter or _detalhes.alpha_build_counter))
print (Loc ["STRING_DETAILS1"] .. "|cFFFFFF00GAME VERSION|r: |cFFFFAA00" .. _detalhes.game_version)
end
end
+1 -1
View File
@@ -875,7 +875,7 @@
local import = function()
local text = editbox:GetText()
local deserialized_object = Plater.DecompressData (text, "print")
local deserialized_object = Details:DecompressData (text, "print")
if (not deserialized_object) then
_detalhes:Msg (Loc ["STRING_CUSTOM_IMPORT_ERROR"])