Scripts "Health Potion & Stone" and "Potion Used" updated
This commit is contained in:
+2
-1
@@ -28,9 +28,10 @@ locales\Details-zhTW.lua
|
||||
boot.lua
|
||||
indent.lua
|
||||
core\util.lua
|
||||
functions\mixin.lua
|
||||
API.lua
|
||||
functions\events.lua
|
||||
|
||||
functions\events.lua
|
||||
functions\private.lua
|
||||
functions\profiles.lua
|
||||
functions\hooks.lua
|
||||
|
||||
@@ -24,6 +24,7 @@ locales\Details-zhTW.lua
|
||||
boot.lua
|
||||
indent.lua
|
||||
core\util.lua
|
||||
functions\mixin.lua
|
||||
API.lua
|
||||
|
||||
functions\private.lua
|
||||
|
||||
+5
-1
@@ -4174,6 +4174,10 @@ function DF:QuickDispatch(func, ...)
|
||||
return true
|
||||
end
|
||||
|
||||
---call a function in safe mode with payload
|
||||
---@param func function
|
||||
---@param ... any
|
||||
---@return any
|
||||
function DF:Dispatch(func, ...)
|
||||
if (type(func) ~= "function") then
|
||||
return dispatch_error (_, "DF:Dispatch expect a function as parameter 1.")
|
||||
@@ -4183,7 +4187,7 @@ function DF:Dispatch(func, ...)
|
||||
local okay = dispatchResult[1]
|
||||
|
||||
if (not okay) then
|
||||
return nil
|
||||
return false
|
||||
end
|
||||
|
||||
tremove(dispatchResult, 1)
|
||||
|
||||
+1
-1
@@ -8593,7 +8593,7 @@ detailsFramework.CastFrameFunctions = {
|
||||
self.value = self.empowered and (GetTime() - self.spellStartTime) or (self.spellEndTime - GetTime())
|
||||
self.maxValue = self.spellEndTime - self.spellStartTime
|
||||
|
||||
if (self.value < 0 or self.value >= self.maxValue) then
|
||||
if (self.value < 0 or self.value > self.maxValue) then
|
||||
self.value = 0
|
||||
end
|
||||
|
||||
|
||||
@@ -944,6 +944,7 @@ DF.CrowdControlSpells = {
|
||||
[122] = "MAGE", --Frost Nova
|
||||
[157997] = "MAGE", --Ice Nova
|
||||
[31661] = "MAGE", --Dragon's Breath
|
||||
[157981] = "MAGE", --Blast Wave
|
||||
|
||||
[205364] = "PRIEST", --Mind Control (talent)
|
||||
[605] = "PRIEST", --Mind Control
|
||||
|
||||
@@ -64,8 +64,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
|
||||
end
|
||||
|
||||
local major = "LibOpenRaid-1.0"
|
||||
--local CONST_LIB_VERSION = 87
|
||||
local CONST_LIB_VERSION = 92 --this is a rollback version, due to some zero hour bug issues
|
||||
local CONST_LIB_VERSION = 93
|
||||
|
||||
if (not LIB_OPEN_RAID_MAX_VERSION) then
|
||||
LIB_OPEN_RAID_MAX_VERSION = CONST_LIB_VERSION
|
||||
@@ -98,6 +97,11 @@ local unpack = table.unpack or _G.unpack
|
||||
local CONST_CVAR_TEMPCACHE = "LibOpenRaidTempCache"
|
||||
local CONST_CVAR_TEMPCACHE_DEBUG = "LibOpenRaidTempCacheDebug"
|
||||
|
||||
--delay to request all data from other players
|
||||
local CONST_REQUEST_ALL_DATA_COOLDOWN = 30
|
||||
--delay to send all data to other players
|
||||
local CONST_SEND_ALL_DATA_COOLDOWN = 30
|
||||
|
||||
--show failures (when the function return an error) results to chat
|
||||
local CONST_DIAGNOSTIC_ERRORS = false
|
||||
--show the data to be sent and data received from comm
|
||||
@@ -764,7 +768,7 @@ end
|
||||
openRaidLib.internalCallback.TriggerEvent("talentUpdate")
|
||||
end
|
||||
local delayedTalentChange = function()
|
||||
openRaidLib.Schedules.NewUniqueTimer(0.5 + math.random(), talentChangedCallback, "TalentChangeEventGroup", "talentChangedCallback_Schedule")
|
||||
openRaidLib.Schedules.NewUniqueTimer(math.random(3, 6), talentChangedCallback, "TalentChangeEventGroup", "talentChangedCallback_Schedule")
|
||||
end
|
||||
|
||||
local eventFunctions = {
|
||||
@@ -789,7 +793,7 @@ end
|
||||
--the group has changed, trigger a long timer to send full data
|
||||
--as the timer is unique, a new change to the group will replace and refresh the time
|
||||
--using random time, players won't trigger all at the same time
|
||||
local randomTime = 0.3 + math.random(0, 0.7)
|
||||
local randomTime = 5 + math.random() + math.random(1, 5)
|
||||
openRaidLib.Schedules.NewUniqueTimer(randomTime, openRaidLib.mainControl.SendFullData, "mainControl", "sendFullData_Schedule")
|
||||
end
|
||||
|
||||
@@ -1124,12 +1128,14 @@ end
|
||||
|
||||
--send a request to all players in the group to send their data
|
||||
function openRaidLib.RequestAllData()
|
||||
--the the player isn't in group, don't send the request
|
||||
if (not IsInGroup()) then
|
||||
return
|
||||
end
|
||||
|
||||
openRaidLib.requestAllInfoCooldown = openRaidLib.requestAllInfoCooldown or 0
|
||||
|
||||
--check if the player can sent another request
|
||||
if (openRaidLib.requestAllInfoCooldown > GetTime()) then
|
||||
return
|
||||
end
|
||||
@@ -1137,22 +1143,30 @@ end
|
||||
openRaidLib.commHandler.SendCommData(CONST_COMM_FULLINFO_PREFIX)
|
||||
diagnosticComm("RequestAllInfo| " .. CONST_COMM_FULLINFO_PREFIX) --debug
|
||||
|
||||
openRaidLib.requestAllInfoCooldown = GetTime() + 5
|
||||
openRaidLib.requestAllInfoCooldown = GetTime() + CONST_REQUEST_ALL_DATA_COOLDOWN
|
||||
return true
|
||||
end
|
||||
|
||||
--this function handles the request from another player to send all data
|
||||
function openRaidLib.commHandler.SendFullData()
|
||||
openRaidLib.mainControl.SendFullData()
|
||||
end
|
||||
|
||||
openRaidLib.commHandler.RegisterComm(CONST_COMM_FULLINFO_PREFIX, function(data, sourceName)
|
||||
openRaidLib.sendRequestedAllInfoCooldown = openRaidLib.sendRequestedAllInfoCooldown or 0
|
||||
|
||||
--some player in the group requested all information from all players
|
||||
--check if there's some delay before sending the data
|
||||
if (openRaidLib.sendRequestedAllInfoCooldown > GetTime()) then
|
||||
--reschedule the function call
|
||||
openRaidLib.Schedules.NewUniqueTimer(openRaidLib.sendRequestedAllInfoCooldown - GetTime(), openRaidLib.commHandler.SendFullData, "CommHandler", "sendFullData_Schedule")
|
||||
return
|
||||
end
|
||||
|
||||
openRaidLib.Schedules.NewUniqueTimer(random() + math.random(0, 3), openRaidLib.mainControl.SendFullData, "mainControl", "sendFullData_Schedule")
|
||||
openRaidLib.sendRequestedAllInfoCooldown = GetTime() + 5
|
||||
end)
|
||||
openRaidLib.Schedules.NewUniqueTimer(math.random(1, 6), openRaidLib.commHandler.SendFullData, "CommHandler", "sendFullData_Schedule")
|
||||
|
||||
--set the delay for the next request
|
||||
openRaidLib.sendRequestedAllInfoCooldown = GetTime() + CONST_SEND_ALL_DATA_COOLDOWN
|
||||
end)
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------
|
||||
--~player general ~info ~unit
|
||||
|
||||
@@ -191,6 +191,17 @@ do
|
||||
[371339] = {tier = {[562] = 3, [476] = 1, [519] = 2}}, --Phial of Elemental Chaos
|
||||
}
|
||||
|
||||
LIB_OPEN_RAID_ALL_POTIONS = {
|
||||
[370511] = 1, --Refreshing Healing Potion
|
||||
[371039] = 1, --Potion of Withering Vitality
|
||||
[370607] = 1, --Aerated Mana Potion
|
||||
[371024] = 1, --Elemental Potion of Power
|
||||
[371028] = 1, --Elemental Potion of Ultimate Power
|
||||
[371033] = 1, --Potion of Frozen Focus
|
||||
[371125] = 1, --Potion of the Hushed Zephyr
|
||||
[371052] = 1, --Potion of Chilled Clarity
|
||||
}
|
||||
|
||||
--spellId of healing from potions
|
||||
LIB_OPEN_RAID_HEALING_POTIONS = {
|
||||
[370511] = 1, --Refreshing Healing Potion
|
||||
|
||||
@@ -122,6 +122,8 @@ LIB_OPEN_RAID_FOOD_BUFF = {}
|
||||
|
||||
LIB_OPEN_RAID_FLASK_BUFF = {}
|
||||
|
||||
LIB_OPEN_RAID_ALL_POTIONS = {}
|
||||
|
||||
LIB_OPEN_RAID_MELEE_SPECS = {
|
||||
[251] = "DEATHKNIGHT",
|
||||
[252] = "DEATHKNIGHT",
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
local addonName, Details222 = ...
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 10406
|
||||
_detalhes.alpha_build_counter = 10406 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 10407
|
||||
_detalhes.alpha_build_counter = 10407 --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
|
||||
@@ -75,6 +75,7 @@
|
||||
Details222.EJCache = {}
|
||||
Details222.Segments = {}
|
||||
Details222.Tables = {}
|
||||
Details222.Mixins = {}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--initialization stuff
|
||||
@@ -1117,4 +1118,6 @@ function Details222.Tables.MakeWeakTable(mode)
|
||||
local newTable = {}
|
||||
setmetatable(newTable, {__mode = mode or "v"})
|
||||
return newTable
|
||||
end
|
||||
end
|
||||
|
||||
--STRING_CUSTOM_POT_DEFAULT
|
||||
+174
-206
@@ -47,31 +47,31 @@
|
||||
return combatContainers [attribute]
|
||||
end
|
||||
|
||||
function classCustom:RefreshWindow (instance, combat, force, export)
|
||||
function classCustom:RefreshWindow(instanceObject, combatObject, force, export)
|
||||
--get the custom object
|
||||
local custom_object = instance:GetCustomObject()
|
||||
local customObject = instanceObject:GetCustomObject()
|
||||
|
||||
if (not custom_object) then
|
||||
return instance:ResetAttribute()
|
||||
if (not customObject) then
|
||||
return instanceObject:ResetAttribute()
|
||||
end
|
||||
|
||||
--save the custom name in the instance
|
||||
instance.customName = custom_object:GetName()
|
||||
instanceObject.customName = customObject.name
|
||||
|
||||
--get the container holding the custom actor objects for this instance
|
||||
local instance_container = classCustom:GetInstanceCustomActorContainer (instance)
|
||||
local instance_container = classCustom:GetInstanceCustomActorContainer (instanceObject)
|
||||
|
||||
local last_shown = classCustom._InstanceLastCustomShown [instance:GetId()]
|
||||
if (last_shown and last_shown ~= custom_object:GetName()) then
|
||||
local last_shown = classCustom._InstanceLastCustomShown [instanceObject:GetId()]
|
||||
if (last_shown and last_shown ~= customObject:GetName()) then
|
||||
instance_container:WipeCustomActorContainer()
|
||||
end
|
||||
classCustom._InstanceLastCustomShown [instance:GetId()] = custom_object:GetName()
|
||||
classCustom._InstanceLastCustomShown [instanceObject:GetId()] = customObject:GetName()
|
||||
|
||||
local last_combat_shown = classCustom._InstanceLastCombatShown [instance:GetId()]
|
||||
if (last_combat_shown and last_combat_shown ~= combat) then
|
||||
local last_combat_shown = classCustom._InstanceLastCombatShown [instanceObject:GetId()]
|
||||
if (last_combat_shown and last_combat_shown ~= combatObject) then
|
||||
instance_container:WipeCustomActorContainer()
|
||||
end
|
||||
classCustom._InstanceLastCombatShown [instance:GetId()] = combat
|
||||
classCustom._InstanceLastCombatShown [instanceObject:GetId()] = combatObject
|
||||
|
||||
--declare the main locals
|
||||
local total = 0
|
||||
@@ -79,65 +79,69 @@
|
||||
local amount = 0
|
||||
|
||||
--check if is a custom script (if has .script)
|
||||
if (custom_object:IsScripted()) then
|
||||
|
||||
if (customObject:IsScripted()) then
|
||||
--be save reseting the values on every refresh
|
||||
instance_container:ResetCustomActorContainer()
|
||||
|
||||
local func
|
||||
local scriptTypeName = "search"
|
||||
|
||||
if (_detalhes.custom_function_cache [instance.customName]) then
|
||||
func = _detalhes.custom_function_cache [instance.customName]
|
||||
if (_detalhes.custom_function_cache [instanceObject.customName]) then
|
||||
func = _detalhes.custom_function_cache [instanceObject.customName]
|
||||
else
|
||||
local errortext
|
||||
func, errortext = loadstring (custom_object.script)
|
||||
func, errortext = loadstring (customObject.script)
|
||||
if (func) then
|
||||
DetailsFramework:SetEnvironment(func)
|
||||
_detalhes.custom_function_cache [instance.customName] = func
|
||||
_detalhes.custom_function_cache [instanceObject.customName] = func
|
||||
else
|
||||
_detalhes:Msg("|cFFFF9900error compiling code for custom display " .. (instance.customName or "") .. " |r:", errortext)
|
||||
_detalhes:Msg("|cFFFF9900error compiling code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext)
|
||||
end
|
||||
|
||||
if (custom_object.tooltip) then
|
||||
local tooltip_script, errortext = loadstring (custom_object.tooltip)
|
||||
if (customObject.tooltip) then
|
||||
local tooltip_script, errortext = loadstring (customObject.tooltip)
|
||||
if (tooltip_script) then
|
||||
DetailsFramework:SetEnvironment(tooltip_script)
|
||||
_detalhes.custom_function_cache [instance.customName .. "Tooltip"] = tooltip_script
|
||||
_detalhes.custom_function_cache [instanceObject.customName .. "Tooltip"] = tooltip_script
|
||||
else
|
||||
_detalhes:Msg("|cFFFF9900error compiling tooltip code for custom display " .. (instance.customName or "") .. " |r:", errortext)
|
||||
_detalhes:Msg("|cFFFF9900error compiling tooltip code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext)
|
||||
end
|
||||
scriptTypeName = "tooltip"
|
||||
end
|
||||
|
||||
if (custom_object.total_script) then
|
||||
local total_script, errortext = loadstring (custom_object.total_script)
|
||||
if (customObject.total_script) then
|
||||
local total_script, errortext = loadstring (customObject.total_script)
|
||||
if (total_script) then
|
||||
DetailsFramework:SetEnvironment(total_script)
|
||||
_detalhes.custom_function_cache [instance.customName .. "Total"] = total_script
|
||||
_detalhes.custom_function_cache [instanceObject.customName .. "Total"] = total_script
|
||||
else
|
||||
_detalhes:Msg("|cFFFF9900error compiling total code for custom display " .. (instance.customName or "") .. " |r:", errortext)
|
||||
_detalhes:Msg("|cFFFF9900error compiling total code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext)
|
||||
end
|
||||
scriptTypeName = "total"
|
||||
end
|
||||
|
||||
if (custom_object.percent_script) then
|
||||
local percent_script, errortext = loadstring (custom_object.percent_script)
|
||||
if (customObject.percent_script) then
|
||||
local percent_script, errortext = loadstring (customObject.percent_script)
|
||||
if (percent_script) then
|
||||
DetailsFramework:SetEnvironment(percent_script)
|
||||
_detalhes.custom_function_cache [instance.customName .. "Percent"] = percent_script
|
||||
_detalhes.custom_function_cache [instanceObject.customName .. "Percent"] = percent_script
|
||||
else
|
||||
_detalhes:Msg("|cFFFF9900error compiling percent code for custom display " .. (instance.customName or "") .. " |r:", errortext)
|
||||
_detalhes:Msg("|cFFFF9900error compiling percent code for custom display " .. (instanceObject.customName or "") .. " |r:", errortext)
|
||||
end
|
||||
scriptTypeName = "percent"
|
||||
end
|
||||
end
|
||||
|
||||
if (not func) then
|
||||
_detalhes:Msg(Loc ["STRING_CUSTOM_FUNC_INVALID"], func)
|
||||
_detalhes:EndRefresh (instance, 0, combat, combat [1])
|
||||
_detalhes:EndRefresh (instanceObject, 0, combatObject, combatObject [1])
|
||||
end
|
||||
|
||||
local okey, _total, _top, _amount = pcall (func, combat, instance_container, instance)
|
||||
local okey, _total, _top, _amount = pcall (func, combatObject, instance_container, instanceObject)
|
||||
if (not okey) then
|
||||
_detalhes:Msg("|cFFFF9900error on custom display function|r:", _total)
|
||||
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
|
||||
local errorText = _total
|
||||
_detalhes:Msg("|cFFFF9900error on display " .. customObject:GetName() .. " (" .. scriptTypeName .. ")|r:", errorText)
|
||||
return _detalhes:EndRefresh(instanceObject, 0, combatObject, combatObject[1])
|
||||
end
|
||||
|
||||
total = _total or 0
|
||||
@@ -146,20 +150,20 @@
|
||||
|
||||
else --does not have a .script
|
||||
--get the attribute
|
||||
local attribute = custom_object:GetAttribute() --"damagedone"
|
||||
local attribute = customObject:GetAttribute() --"damagedone"
|
||||
|
||||
--get the custom function(actor, source, target, spellid)
|
||||
local func = classCustom [attribute]
|
||||
|
||||
--get the combat container
|
||||
local container_index = self:GetCombatContainerIndex (attribute)
|
||||
local combat_container = combat [container_index]._ActorTable
|
||||
local combat_container = combatObject [container_index]._ActorTable
|
||||
|
||||
--build container
|
||||
total, top, amount = classCustom:BuildActorList (func, custom_object.source, custom_object.target, custom_object.spellid, combat, combat_container, container_index, instance_container, instance, custom_object)
|
||||
total, top, amount = classCustom:BuildActorList (func, customObject.source, customObject.target, customObject.spellid, combatObject, combat_container, container_index, instance_container, instanceObject, customObject)
|
||||
end
|
||||
|
||||
if (custom_object:IsSpellTarget()) then
|
||||
if (customObject:IsSpellTarget()) then
|
||||
amount = classCustom._TargetActorsProcessedAmt
|
||||
total = classCustom._TargetActorsProcessedTotal
|
||||
top = classCustom._TargetActorsProcessedTop
|
||||
@@ -167,21 +171,21 @@
|
||||
|
||||
if (amount == 0) then
|
||||
if (force) then
|
||||
if (instance:IsGroupMode()) then
|
||||
for i = 1, instance.rows_fit_in_window do
|
||||
Details.FadeHandler.Fader(instance.barras [i], "in", Details.fade_speed)
|
||||
if (instanceObject:IsGroupMode()) then
|
||||
for i = 1, instanceObject.rows_fit_in_window do
|
||||
Details.FadeHandler.Fader(instanceObject.barras [i], "in", Details.fade_speed)
|
||||
end
|
||||
end
|
||||
end
|
||||
instance:EsconderScrollBar()
|
||||
return _detalhes:EndRefresh (instance, total, combat, nil)
|
||||
instanceObject:EsconderScrollBar()
|
||||
return _detalhes:EndRefresh (instanceObject, total, combatObject, nil)
|
||||
end
|
||||
|
||||
if (amount > #instance_container._ActorTable) then
|
||||
amount = #instance_container._ActorTable
|
||||
end
|
||||
|
||||
combat.totals [custom_object:GetName()] = total
|
||||
combatObject.totals [customObject:GetName()] = total
|
||||
|
||||
instance_container:Sort()
|
||||
instance_container:Remap()
|
||||
@@ -189,10 +193,10 @@
|
||||
if (export) then
|
||||
|
||||
-- key name value need to be formated
|
||||
if (custom_object) then
|
||||
if (customObject) then
|
||||
|
||||
local percent_script = _detalhes.custom_function_cache [instance.customName .. "Percent"]
|
||||
local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"]
|
||||
local percent_script = _detalhes.custom_function_cache [instanceObject.customName .. "Percent"]
|
||||
local total_script = _detalhes.custom_function_cache [instanceObject.customName .. "Total"]
|
||||
local okey
|
||||
|
||||
for index, actor in ipairs(instance_container._ActorTable) do
|
||||
@@ -200,20 +204,20 @@
|
||||
local percent, ptotal
|
||||
|
||||
if (percent_script) then
|
||||
okey, percent = pcall (percent_script, floor(actor.value), top, total, combat, instance, actor)
|
||||
okey, percent = pcall (percent_script, floor(actor.value), top, total, combatObject, instanceObject, actor)
|
||||
if (not okey) then
|
||||
_detalhes:Msg("|cFFFF9900percent script error|r:", percent)
|
||||
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
|
||||
return _detalhes:EndRefresh (instanceObject, 0, combatObject, combatObject [1])
|
||||
end
|
||||
else
|
||||
percent = format ("%.1f", floor(actor.value) / total * 100)
|
||||
end
|
||||
|
||||
if (total_script) then
|
||||
local okey, value = pcall (total_script, floor(actor.value), top, total, combat, instance, actor)
|
||||
local okey, value = pcall (total_script, floor(actor.value), top, total, combatObject, instanceObject, actor)
|
||||
if (not okey) then
|
||||
_detalhes:Msg("|cFFFF9900total script error|r:", value)
|
||||
return _detalhes:EndRefresh (instance, 0, combat, combat [1])
|
||||
return _detalhes:EndRefresh (instanceObject, 0, combatObject, combatObject [1])
|
||||
end
|
||||
|
||||
if (type(value) == "number") then
|
||||
@@ -244,11 +248,11 @@
|
||||
return total, instance_container._ActorTable, top, amount, "report_name"
|
||||
end
|
||||
|
||||
instance:RefreshScrollBar (amount)
|
||||
instanceObject:RefreshScrollBar (amount)
|
||||
|
||||
classCustom:Refresh (instance, instance_container, combat, force, total, top, custom_object)
|
||||
classCustom:Refresh (instanceObject, instance_container, combatObject, force, total, top, customObject)
|
||||
|
||||
return _detalhes:EndRefresh (instance, total, combat, combat [container_index])
|
||||
return _detalhes:EndRefresh (instanceObject, total, combatObject, combatObject [container_index])
|
||||
|
||||
end
|
||||
|
||||
@@ -915,44 +919,29 @@
|
||||
end
|
||||
end
|
||||
|
||||
function classCustom:ToolTip (instance, bar_number, row_object, keydown)
|
||||
function classCustom:ToolTip (instanceObject, barNumber, rowObject, keydown)
|
||||
--get the custom object
|
||||
local custom_object = instance:GetCustomObject()
|
||||
local customObject = instanceObject:GetCustomObject()
|
||||
|
||||
if (custom_object.notooltip) then
|
||||
if (customObject.notooltip) then
|
||||
return
|
||||
end
|
||||
|
||||
--get the actor
|
||||
local actor = self.my_actor
|
||||
local actorObject = self.my_actor
|
||||
|
||||
local r, g, b
|
||||
if (actor.id) then
|
||||
local school_color = _detalhes.school_colors [actor.classe]
|
||||
if (not school_color) then
|
||||
school_color = _detalhes.school_colors ["unknown"]
|
||||
end
|
||||
r, g, b = unpack(school_color)
|
||||
if (actorObject.id) then
|
||||
_detalhes:AddTooltipSpellHeaderText (select(1, _GetSpellInfo(actorObject.id)), "yellow", 1, select(3, _GetSpellInfo(actorObject.id)), 0.90625, 0.109375, 0.15625, 0.875, false, 18)
|
||||
else
|
||||
r, g, b = actor:GetClassColor()
|
||||
_detalhes:AddTooltipSpellHeaderText (customObject:GetName(), "yellow", 1, customObject:GetIcon(), 0.90625, 0.109375, 0.15625, 0.875, false, 18)
|
||||
end
|
||||
|
||||
if (actor.id) then
|
||||
_detalhes:AddTooltipSpellHeaderText (select(1, _GetSpellInfo(actor.id)), "yellow", 1, select(3, _GetSpellInfo(actor.id)), 0.90625, 0.109375, 0.15625, 0.875)
|
||||
else
|
||||
_detalhes:AddTooltipSpellHeaderText (custom_object:GetName(), "yellow", 1, custom_object:GetIcon(), 0.90625, 0.109375, 0.15625, 0.875)
|
||||
end
|
||||
|
||||
--GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
|
||||
_detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6)
|
||||
|
||||
if (custom_object:IsScripted()) then
|
||||
if (custom_object.tooltip) then
|
||||
local func = _detalhes.custom_function_cache [instance.customName .. "Tooltip"]
|
||||
if (func) then
|
||||
|
||||
end
|
||||
local okey, errortext = pcall (func, actor, instance.showing, instance, keydown)
|
||||
if (customObject:IsScripted()) then
|
||||
if (customObject.tooltip) then
|
||||
local func = _detalhes.custom_function_cache [instanceObject.customName .. "Tooltip"]
|
||||
local okey, errortext = pcall(func, actorObject, instanceObject.showing, instanceObject, keydown)
|
||||
if (not okey) then
|
||||
_detalhes:Msg("|cFFFF9900error on custom display tooltip function|r:", errortext)
|
||||
return false
|
||||
@@ -960,14 +949,14 @@
|
||||
end
|
||||
else
|
||||
--get the attribute
|
||||
local attribute = custom_object:GetAttribute()
|
||||
local attribute = customObject:GetAttribute()
|
||||
local container_index = classCustom:GetCombatContainerIndex (attribute)
|
||||
|
||||
--get the tooltip function
|
||||
local func = classCustom [attribute .. "Tooltip"]
|
||||
|
||||
--build the tooltip
|
||||
func (_, actor, custom_object.target, custom_object.spellid, instance.showing, instance)
|
||||
func (_, actorObject, customObject.target, customObject.spellid, instanceObject.showing, instanceObject)
|
||||
end
|
||||
|
||||
return true
|
||||
@@ -1169,113 +1158,109 @@
|
||||
end
|
||||
|
||||
function _detalhes:AddDefaultCustomDisplays()
|
||||
|
||||
local PotionUsed = {
|
||||
name = Loc ["STRING_CUSTOM_POT_DEFAULT"],
|
||||
icon = [[Interface\ICONS\INV_Potion_03]],
|
||||
attribute = false,
|
||||
spellid = false,
|
||||
author = "Details!",
|
||||
author = "Terciob",
|
||||
desc = Loc ["STRING_CUSTOM_POT_DEFAULT_DESC"],
|
||||
source = false,
|
||||
target = false,
|
||||
script_version = 6,
|
||||
script_version = 8,
|
||||
import_string = "1EvBVnkoq4FlxKwDWDjCn6Q0kfD7kL(YwruUMOLK7JaoGPX3rSrgZwLV4F73yJ5LMxjPDfBBzHXZZZmEMhg7p0FHVxoRGhH9x57HkeRzCFVhWcejn)x89YWWROIG8iojt47LYIqPYWFGslW9LHcwM(3cuk83i2MvibCdHMlq0iSm8lYqhhh5e5e9s0pydsS2jjLX4w6hAREnhlk4uzyVEYWbdYfCc9fNeghm2Q3NCgM0RVb2)qd3Vn8MBSvohwYN6P8GCIVxmopY3ZBn7vz4RRzkMid3cXNmKJiXYWICm8BKmmJjim4LXfkKGyynqomnIvqfyUJVNgLpG4UkW2pQljV6Fg2tIyu)Nh(N3(5H367rrBW(EZn8CjqCyRkdNMsIv7vce)fSqD3oCSKnZw9V4ifNIkYfSn3ZOWwkfZBXYstA4Qz9vrvzmI2OYiAJUPV5hfBhmaq3K22qYJalJemUcEds1omLKlMLSuqsjITJvwLR9xBIo6jSq)QPGXwp84IXUt9cgVyX3DVB5Ihd(BxV7TlXnMzGfYLzJKtsuOg03qGQGsTXtYqeEU1bWhs(GBMidlVgmGrt3cffPOTaX1l(foRiRXesIm0QfcJCZFszXC9sSST1KI2SGQltsy13G8yC1Uje9jO0C8(MV)tANP17)a3XRksacvKjiBWVjNFe4lxXsT911cAE0oMGnbpfc1wy1RCH9S33Z6mYb97rZfnHuv7hdCscdQrbFfHO)Qq3IcScEqghBSd2CZzQkxrEtfjrDF6ROTWFhECSmjaniTs)hK41jG6kWVn7(LEbZNTWD2ZbUpyFCC0PJwOC2Kq1LUFtZjZD)(jJNQR9kOe8c85xMMMqRTm8Vay6mjBiBMgSoqqmn(8gnyakoUzpvu1BB6ep763rDB0444)rPU2UvTVoqNCr88WKVl9MxAN5v2xEYUYRPNulJQJb34(vFFCo71k9WsT0PU3fmB(Jph89XUpemE6utVH3okQNPBuJZc0Q0YpvEYwrdNS7yTDJRV4IBd5kNr4lTzPdSBq(bogTr0D3PPJzGdA9ShFf(a6fZStPvOD7f7PRu(4eX4x1QdxDOTRcZ1fwDs05891)SLTUszmvoXU7EVtjJtA07rBSujQvz2zlnAnRz1Th(BHVHb6)t5tGPdlh3EuZC3hCCw942ibCkJvfc9rFemwQGKvpf9Bt87mt9XMGUEK33POENfX)5iA)HksFPIYVtr4par32H)ZWHW6xE8IYqmYixwf5U0e2f8jQNqQ0NUut1KpfYIwTbQJD474gfRSQ5NAEhZpMdY7yQUDsb8cwJjVSwC632boywTc)fLo4ou0)Po2engoDQOiFfcoy07rCPQ12x47))d",
|
||||
script = [[
|
||||
--init:
|
||||
local combat, instance_container, instance = ...
|
||||
local combatObject, customContainer, instanceObject = ...
|
||||
local total, top, amount = 0, 0, 0
|
||||
|
||||
|
||||
--get the misc actor container
|
||||
local misc_container = combat:GetActorList ( DETAILS_ATTRIBUTE_MISC )
|
||||
|
||||
local listOfUtilityActors = combatObject:GetActorList(DETAILS_ATTRIBUTE_MISC)
|
||||
|
||||
--do the loop:
|
||||
for _, player in ipairs( misc_container ) do
|
||||
|
||||
for _, actorObject in ipairs(listOfUtilityActors) do
|
||||
--only player in group
|
||||
if (player:IsGroupPlayer()) then
|
||||
|
||||
local found_potion = false
|
||||
|
||||
if (actorObject:IsGroupPlayer()) then
|
||||
local bFoundPotion = false
|
||||
|
||||
--get the spell debuff uptime container
|
||||
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spells and player.debuff_uptime_spells._ActorTable
|
||||
if (debuff_uptime_container) then
|
||||
local debuffUptimeContainer = actorObject:GetSpellContainer("debuff")
|
||||
if (debuffUptimeContainer) then
|
||||
--potion of focus (can't use as pre-potion, so, its amount is always 1
|
||||
local focus_potion = debuff_uptime_container [DETAILS_FOCUS_POTION_ID]
|
||||
|
||||
if (focus_potion) then
|
||||
local focusPotion = debuffUptimeContainer:GetSpell(DETAILS_FOCUS_POTION_ID)
|
||||
if (focusPotion) then
|
||||
total = total + 1
|
||||
found_potion = true
|
||||
bFoundPotion = true
|
||||
if (top < 1) then
|
||||
top = 1
|
||||
end
|
||||
--add amount to the player
|
||||
instance_container:AddValue (player, 1)
|
||||
customContainer:AddValue(actorObject, 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--get the spell buff uptime container
|
||||
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable
|
||||
if (buff_uptime_container) then
|
||||
for spellId, _ in pairs(DetailsFramework.PotionIDs) do
|
||||
local potionUsed = buff_uptime_container [spellId]
|
||||
|
||||
if (potionUsed) then
|
||||
local used = potionUsed.activedamt
|
||||
local buffUptimeContainer = actorObject:GetSpellContainer("buff")
|
||||
if (buffUptimeContainer) then
|
||||
for spellId, potionPower in pairs(LIB_OPEN_RAID_ALL_POTIONS) do
|
||||
local spellTable = buffUptimeContainer:GetSpell(spellId)
|
||||
if (spellTable) then
|
||||
local used = spellTable.activedamt
|
||||
if (used and used > 0) then
|
||||
total = total + used
|
||||
found_potion = true
|
||||
bFoundPotion = true
|
||||
if (used > top) then
|
||||
top = used
|
||||
end
|
||||
|
||||
|
||||
--add amount to the player
|
||||
instance_container:AddValue (player, used)
|
||||
customContainer:AddValue(actorObject, used)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (found_potion) then
|
||||
|
||||
if (bFoundPotion) then
|
||||
amount = amount + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--return:
|
||||
return total, top, amount
|
||||
]],
|
||||
|
||||
tooltip = [[
|
||||
--init:
|
||||
local player, combat, instance = ...
|
||||
local actorObject, combatObject, instanceObject = ...
|
||||
|
||||
--get the debuff container for potion of focus
|
||||
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spells and player.debuff_uptime_spells._ActorTable
|
||||
if (debuff_uptime_container) then
|
||||
local focus_potion = debuff_uptime_container [DETAILS_FOCUS_POTION_ID]
|
||||
if (focus_potion) then
|
||||
local name, _, icon = GetSpellInfo(DETAILS_FOCUS_POTION_ID)
|
||||
GameCooltip:AddLine(name, 1) --can use only 1 focus potion (can't be pre-potion)
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
|
||||
end
|
||||
end
|
||||
|
||||
--get the misc actor container
|
||||
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable
|
||||
if (buff_uptime_container) then
|
||||
for spellId, _ in pairs(DetailsFramework.PotionIDs) do
|
||||
local potionUsed = buff_uptime_container [spellId]
|
||||
|
||||
if (potionUsed) then
|
||||
local name, _, icon = GetSpellInfo(spellId)
|
||||
GameCooltip:AddLine(name, potionUsed.activedamt)
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
GameCooltip:AddIcon (icon, 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
|
||||
local iconSize = 20
|
||||
|
||||
local buffUptimeContainer = actorObject:GetSpellContainer("buff")
|
||||
if (buffUptimeContainer) then
|
||||
for spellId, potionPower in pairs(LIB_OPEN_RAID_ALL_POTIONS) do
|
||||
local spellTable = buffUptimeContainer:GetSpell(spellId)
|
||||
if (spellTable) then
|
||||
local used = spellTable.activedamt
|
||||
if (used and used > 0) then
|
||||
local spellName, _, spellIcon = GetSpellInfo(spellId)
|
||||
GameCooltip:AddLine(spellName, used)
|
||||
GameCooltip:AddIcon(spellIcon, 1, 1, iconSize, iconSize)
|
||||
Details:AddTooltipBackgroundStatusbar()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
]]
|
||||
]],
|
||||
|
||||
total_script = [[
|
||||
local value, top, total, combat, instance = ...
|
||||
return math.floor(value) .. " "
|
||||
]],
|
||||
|
||||
percent_script = [[
|
||||
local value, top, total, combat, instance = ...
|
||||
value = math.floor(value)
|
||||
return ""
|
||||
]],
|
||||
}
|
||||
|
||||
local have = false
|
||||
@@ -1304,82 +1289,65 @@
|
||||
icon = [[Interface\ICONS\INV_Stone_04]],
|
||||
attribute = false,
|
||||
spellid = false,
|
||||
author = "Details! Team",
|
||||
author = "Terciob",
|
||||
desc = Loc ["STRING_CUSTOM_HEALTHSTONE_DEFAULT_DESC"],
|
||||
source = false,
|
||||
target = false,
|
||||
script = [[
|
||||
--get the parameters passed
|
||||
local combat, instance_container, instance = ...
|
||||
--declade the values to return
|
||||
local total, top, amount = 0, 0, 0
|
||||
|
||||
--do the loop
|
||||
local AllHealCharacters = combat:GetActorList (DETAILS_ATTRIBUTE_HEAL)
|
||||
for index, character in ipairs(AllHealCharacters) do
|
||||
local AllSpells = character:GetSpellList()
|
||||
local found = false
|
||||
for spellid, spell in pairs(AllSpells) do
|
||||
if (DETAILS_HEALTH_POTION_LIST [spellid]) then
|
||||
instance_container:AddValue (character, spell.total)
|
||||
total = total + spell.total
|
||||
if (top < spell.total) then
|
||||
top = spell.total
|
||||
local combatObject, instanceContainer, instanceObject = ...
|
||||
local total, top, amount = 0, 0, 0
|
||||
|
||||
local listOfHealingActors = combatObject:GetActorList(DETAILS_ATTRIBUTE_HEAL)
|
||||
for _, actorObject in ipairs(listOfHealingActors) do
|
||||
local listOfSpells = actorObject:GetSpellList()
|
||||
local found = false
|
||||
|
||||
for spellId, spellTable in pairs(listOfSpells) do
|
||||
if (LIB_OPEN_RAID_HEALING_POTIONS[spellId]) then
|
||||
instanceContainer:AddValue(actorObject, spellTable.total)
|
||||
total = total + spellTable.total
|
||||
if (top < spellTable.total) then
|
||||
top = spellTable.total
|
||||
end
|
||||
found = true
|
||||
end
|
||||
found = true
|
||||
end
|
||||
|
||||
if (found) then
|
||||
amount = amount + 1
|
||||
end
|
||||
end
|
||||
|
||||
if (found) then
|
||||
amount = amount + 1
|
||||
end
|
||||
end
|
||||
--loop end
|
||||
--return the values
|
||||
return total, top, amount
|
||||
|
||||
return total, top, amount
|
||||
]],
|
||||
|
||||
tooltip = [[
|
||||
--get the parameters passed
|
||||
local actor, combat, instance = ...
|
||||
|
||||
--get the cooltip object (we dont use the convencional GameTooltip here)
|
||||
local GameCooltip = GameCooltip
|
||||
local R, G, B, A = 0, 0, 0, 0.75
|
||||
|
||||
local hs = actor:GetSpell (6262)
|
||||
if (hs) then
|
||||
GameCooltip:AddLine(select(1, GetSpellInfo(6262)), _detalhes:ToK(hs.total))
|
||||
GameCooltip:AddIcon (select(3, GetSpellInfo(6262)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
local actorObject, combatObject, instanceObject = ...
|
||||
local spellContainer = actorObject:GetSpellContainer("spell")
|
||||
|
||||
local iconSize = 20
|
||||
|
||||
local allHealingPotions = {6262}
|
||||
for spellId, potionPower in pairs(LIB_OPEN_RAID_ALL_POTIONS) do
|
||||
allHealingPotions[#allHealingPotions+1] = spellId
|
||||
end
|
||||
|
||||
local pot = actor:GetSpell (DETAILS_HEALTH_POTION_ID)
|
||||
if (pot) then
|
||||
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), _detalhes:ToK(pot.total))
|
||||
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_HEALTH_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
|
||||
for i = 1, #allHealingPotions do
|
||||
local spellId = allHealingPotions[i]
|
||||
local spellTable = spellContainer:GetSpell(spellId)
|
||||
if (spellTable) then
|
||||
local spellName, _, spellIcon = GetSpellInfo(spellId)
|
||||
GameCooltip:AddLine(spellName, Details:ToK(spellTable.total))
|
||||
GameCooltip:AddIcon(spellIcon, 1, 1, iconSize, iconSize)
|
||||
GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.75)
|
||||
end
|
||||
end
|
||||
|
||||
local pot = actor:GetSpell (DETAILS_HEALTH_POTION2_ID)
|
||||
if (pot) then
|
||||
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), _detalhes:ToK(pot.total))
|
||||
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_HEALTH_POTION2_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
end
|
||||
|
||||
local pot = actor:GetSpell (DETAILS_REJU_POTION_ID)
|
||||
if (pot) then
|
||||
GameCooltip:AddLine(select(1, GetSpellInfo(DETAILS_REJU_POTION_ID)), _detalhes:ToK(pot.total))
|
||||
GameCooltip:AddIcon (select(3, GetSpellInfo(DETAILS_REJU_POTION_ID)), 1, 1, _detalhes.tooltip.line_height, _detalhes.tooltip.line_height)
|
||||
GameCooltip:AddStatusBar (100, 1, R, G, B, A)
|
||||
end
|
||||
|
||||
--Cooltip code
|
||||
]],
|
||||
percent_script = false,
|
||||
total_script = false,
|
||||
script_version = 16,
|
||||
script_version = 18,
|
||||
}
|
||||
|
||||
-- /run _detalhes:AddDefaultCustomDisplays()
|
||||
local have = false
|
||||
for _, custom in ipairs(self.custom) do
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
local Translit = LibStub("LibTranslit-1.0")
|
||||
local gump = Details.gump
|
||||
local _ = nil
|
||||
local detailsFramework = DetailsFramework
|
||||
local addonName, Details222 = ...
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -490,6 +491,7 @@ end
|
||||
}
|
||||
|
||||
setmetatable(newDamageActor, atributo_damage)
|
||||
detailsFramework:Mixin(newDamageActor, Details222.Mixins.ActorMixin)
|
||||
|
||||
return newDamageActor
|
||||
end
|
||||
@@ -6287,6 +6289,7 @@ end
|
||||
|
||||
function Details.refresh:r_atributo_damage (este_jogador, shadow)
|
||||
--restaura metas do ator
|
||||
detailsFramework:Mixin(este_jogador, Details222.Mixins.ActorMixin)
|
||||
setmetatable(este_jogador, Details.atributo_damage)
|
||||
este_jogador.__index = Details.atributo_damage
|
||||
--restaura as metas dos containers
|
||||
|
||||
+31
-29
@@ -28,6 +28,8 @@ local IsInGroup = IsInGroup
|
||||
local _string_replace = _detalhes.string.replace --details api
|
||||
local gump = _detalhes.gump
|
||||
|
||||
local detailsFramework = DetailsFramework
|
||||
|
||||
local alvo_da_habilidade = _detalhes.alvo_da_habilidade
|
||||
local container_habilidades = _detalhes.container_habilidades
|
||||
local container_combatentes = _detalhes.container_combatentes
|
||||
@@ -65,12 +67,10 @@ local info = _detalhes.playerDetailWindow
|
||||
local keyName
|
||||
|
||||
function atributo_heal:NovaTabela (serial, nome, link)
|
||||
|
||||
local alphabetical = _detalhes:GetOrderNumber(nome)
|
||||
|
||||
--constructor
|
||||
local _new_healActor = {
|
||||
|
||||
local thisActor = {
|
||||
tipo = class_type, --atributo 2 = cura
|
||||
|
||||
total = alphabetical,
|
||||
@@ -108,9 +108,10 @@ function atributo_heal:NovaTabela (serial, nome, link)
|
||||
targets_absorbs = {}
|
||||
}
|
||||
|
||||
setmetatable(_new_healActor, atributo_heal)
|
||||
detailsFramework:Mixin(thisActor, Details222.Mixins.ActorMixin)
|
||||
setmetatable(thisActor, atributo_heal)
|
||||
|
||||
return _new_healActor
|
||||
return thisActor
|
||||
end
|
||||
|
||||
|
||||
@@ -2385,26 +2386,26 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
|
||||
|
||||
data[3] = t3
|
||||
|
||||
local level1AverageDamage = "0"
|
||||
local level2AverageDamage = "0"
|
||||
local level3AverageDamage = "0"
|
||||
local level4AverageDamage = "0"
|
||||
local level5AverageDamage = "0"
|
||||
local level1AverageHeal = "0"
|
||||
local level2AverageHeal = "0"
|
||||
local level3AverageHeal = "0"
|
||||
local level4AverageHeal = "0"
|
||||
local level5AverageHeal = "0"
|
||||
|
||||
if (empowerHealPerLevel[1]) then
|
||||
level1AverageDamage = Details:ToK(empowerHealPerLevel[1] / empowerAmountPerLevel[1])
|
||||
level1AverageHeal = Details:ToK(empowerHealPerLevel[1] / empowerAmountPerLevel[1])
|
||||
end
|
||||
if (empowerHealPerLevel[2]) then
|
||||
level2AverageDamage = Details:ToK(empowerHealPerLevel[2] / empowerAmountPerLevel[2])
|
||||
level2AverageHeal = Details:ToK(empowerHealPerLevel[2] / empowerAmountPerLevel[2])
|
||||
end
|
||||
if (empowerHealPerLevel[3]) then
|
||||
level3AverageDamage = Details:ToK(empowerHealPerLevel[3] / empowerAmountPerLevel[3])
|
||||
level3AverageHeal = Details:ToK(empowerHealPerLevel[3] / empowerAmountPerLevel[3])
|
||||
end
|
||||
if (empowerHealPerLevel[4]) then
|
||||
level4AverageDamage = Details:ToK(empowerHealPerLevel[4] / empowerAmountPerLevel[4])
|
||||
level4AverageHeal = Details:ToK(empowerHealPerLevel[4] / empowerAmountPerLevel[4])
|
||||
end
|
||||
if (empowerHealPerLevel[5]) then
|
||||
level5AverageDamage = Details:ToK(empowerHealPerLevel[5] / empowerAmountPerLevel[5])
|
||||
level5AverageHeal = Details:ToK(empowerHealPerLevel[5] / empowerAmountPerLevel[5])
|
||||
end
|
||||
|
||||
t3[1] = 0
|
||||
@@ -2416,24 +2417,24 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
|
||||
t3[10] = ""
|
||||
t3[11] = ""
|
||||
|
||||
if (level1AverageDamage ~= "0") then
|
||||
t3[4] = "Level 1 Average: " .. level1AverageDamage .. " (" .. (empowerAmountPerLevel[1] or 0) .. ")"
|
||||
if (level1AverageHeal ~= "0") then
|
||||
t3[4] = "Level 1 Average: " .. level1AverageHeal .. " (" .. (empowerAmountPerLevel[1] or 0) .. ")"
|
||||
end
|
||||
|
||||
if (level2AverageDamage ~= "0") then
|
||||
t3[6] = "Level 2 Average: " .. level2AverageDamage .. " (" .. (empowerAmountPerLevel[2] or 0) .. ")"
|
||||
if (level2AverageHeal ~= "0") then
|
||||
t3[6] = "Level 2 Average: " .. level2AverageHeal .. " (" .. (empowerAmountPerLevel[2] or 0) .. ")"
|
||||
end
|
||||
|
||||
if (level3AverageDamage ~= "0") then
|
||||
t3[11] = "Level 3 Average: " .. level3AverageDamage .. " (" .. (empowerAmountPerLevel[3] or 0) .. ")"
|
||||
if (level3AverageHeal ~= "0") then
|
||||
t3[11] = "Level 3 Average: " .. level3AverageHeal .. " (" .. (empowerAmountPerLevel[3] or 0) .. ")"
|
||||
end
|
||||
|
||||
if (level4AverageDamage ~= "0") then
|
||||
t3[10] = "Level 4 Average: " .. level4AverageDamage .. " (" .. (empowerAmountPerLevel[4] or 0) .. ")"
|
||||
if (level4AverageHeal ~= "0") then
|
||||
t3[10] = "Level 4 Average: " .. level4AverageHeal .. " (" .. (empowerAmountPerLevel[4] or 0) .. ")"
|
||||
end
|
||||
|
||||
if (level5AverageDamage ~= "0") then
|
||||
t3[5] = "Level 5 Average: " .. level5AverageDamage .. " (" .. (empowerAmountPerLevel[5] or 0) .. ")"
|
||||
if (level5AverageHeal ~= "0") then
|
||||
t3[5] = "Level 5 Average: " .. level5AverageHeal .. " (" .. (empowerAmountPerLevel[5] or 0) .. ")"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2983,11 +2984,12 @@ atributo_heal.__sub = function(tabela1, tabela2)
|
||||
return tabela1
|
||||
end
|
||||
|
||||
function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
|
||||
setmetatable(este_jogador, atributo_heal)
|
||||
este_jogador.__index = atributo_heal
|
||||
function _detalhes.refresh:r_atributo_heal(thisActor, shadow)
|
||||
setmetatable(thisActor, atributo_heal)
|
||||
thisActor.__index = atributo_heal
|
||||
detailsFramework:Mixin(thisActor, Details222.Mixins.ActorMixin)
|
||||
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells)
|
||||
_detalhes.refresh:r_container_habilidades(thisActor.spells, shadow and shadow.spells)
|
||||
end
|
||||
|
||||
function _detalhes.clear:c_atributo_heal (este_jogador)
|
||||
|
||||
@@ -22,6 +22,7 @@ local AceLocale = LibStub("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
local detailsFramework = DetailsFramework
|
||||
|
||||
local gump = _detalhes.gump
|
||||
|
||||
@@ -84,6 +85,7 @@ function atributo_energy:NovaTabela (serial, nome, link)
|
||||
spells = container_habilidades:NovoContainer (container_energy),
|
||||
}
|
||||
|
||||
detailsFramework:Mixin(_new_energyActor, Details222.Mixins.ActorMixin)
|
||||
setmetatable(_new_energyActor, atributo_energy)
|
||||
|
||||
return _new_energyActor
|
||||
@@ -1520,6 +1522,7 @@ function atributo_energy:ColetarLixo (lastevent)
|
||||
end
|
||||
|
||||
function _detalhes.refresh:r_atributo_energy (este_jogador, shadow)
|
||||
detailsFramework:Mixin(este_jogador, Details222.Mixins.ActorMixin)
|
||||
setmetatable(este_jogador, _detalhes.atributo_energy)
|
||||
este_jogador.__index = _detalhes.atributo_energy
|
||||
|
||||
@@ -1527,7 +1530,7 @@ function _detalhes.refresh:r_atributo_energy (este_jogador, shadow)
|
||||
|
||||
if (shadow and not shadow.powertype) then
|
||||
shadow.powertype = este_jogador.powertype
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes.clear:c_atributo_energy (este_jogador)
|
||||
|
||||
+33
-27
@@ -26,6 +26,7 @@ local _detalhes = _G._detalhes
|
||||
local Details = _detalhes
|
||||
local AceLocale = LibStub("AceLocale-3.0")
|
||||
local Loc = AceLocale:GetLocale ( "Details" )
|
||||
local detailsFramework = DetailsFramework
|
||||
local addonName, Details222 = ...
|
||||
|
||||
local gump = _detalhes.gump
|
||||
@@ -169,14 +170,17 @@ end
|
||||
end
|
||||
|
||||
function atributo_misc:NovaTabela(serial, nome, link)
|
||||
local newActor = {
|
||||
local newUtilityActor = {
|
||||
last_event = 0,
|
||||
tipo = class_type,
|
||||
pets = {}
|
||||
}
|
||||
setmetatable(newActor, atributo_misc)
|
||||
|
||||
return newActor
|
||||
setmetatable(newUtilityActor, atributo_misc)
|
||||
|
||||
detailsFramework:Mixin(newUtilityActor, Details222.Mixins.ActorMixin)
|
||||
|
||||
return newUtilityActor
|
||||
end
|
||||
|
||||
function atributo_misc:CreateBuffTargetObject()
|
||||
@@ -2738,107 +2742,109 @@ function atributo_misc:ColetarLixo (lastevent)
|
||||
return _detalhes:ColetarLixo (class_type, lastevent)
|
||||
end
|
||||
|
||||
function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
|
||||
setmetatable(este_jogador, _detalhes.atributo_misc)
|
||||
este_jogador.__index = _detalhes.atributo_misc
|
||||
function _detalhes.refresh:r_atributo_misc(thisActor, shadow)
|
||||
setmetatable(thisActor, _detalhes.atributo_misc)
|
||||
detailsFramework:Mixin(thisActor, Details222.Mixins.ActorMixin)
|
||||
|
||||
thisActor.__index = _detalhes.atributo_misc
|
||||
|
||||
--refresh spell cast
|
||||
if (este_jogador.spell_cast) then
|
||||
if (thisActor.spell_cast) then
|
||||
if (shadow and not shadow.spell_cast) then
|
||||
shadow.spell_cast = {}
|
||||
end
|
||||
end
|
||||
|
||||
--refresh cc done
|
||||
if (este_jogador.cc_done) then
|
||||
if (thisActor.cc_done) then
|
||||
if (shadow and not shadow.cc_done_targets) then
|
||||
shadow.cc_done = 0
|
||||
shadow.cc_done_targets = {}
|
||||
shadow.cc_done_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.cc_done_spells, shadow and shadow.cc_done_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.cc_done_spells, shadow and shadow.cc_done_spells)
|
||||
end
|
||||
|
||||
--refresh interrupts
|
||||
if (este_jogador.interrupt_targets) then
|
||||
if (thisActor.interrupt_targets) then
|
||||
if (shadow and not shadow.interrupt_targets) then
|
||||
shadow.interrupt = 0
|
||||
shadow.interrupt_targets = {}
|
||||
shadow.interrupt_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
shadow.interrompeu_oque = {}
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spells, shadow and shadow.interrupt_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.interrupt_spells, shadow and shadow.interrupt_spells)
|
||||
end
|
||||
|
||||
--refresh buff uptime
|
||||
if (este_jogador.buff_uptime_targets) then
|
||||
if (thisActor.buff_uptime_targets) then
|
||||
if (shadow and not shadow.buff_uptime_targets) then
|
||||
shadow.buff_uptime = 0
|
||||
shadow.buff_uptime_targets = {}
|
||||
shadow.buff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spells, shadow and shadow.buff_uptime_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.buff_uptime_spells, shadow and shadow.buff_uptime_spells)
|
||||
end
|
||||
|
||||
--refresh buff uptime
|
||||
if (este_jogador.debuff_uptime_targets) then
|
||||
if (thisActor.debuff_uptime_targets) then
|
||||
if (shadow and not shadow.debuff_uptime_targets) then
|
||||
shadow.debuff_uptime = 0
|
||||
if (este_jogador.boss_debuff) then
|
||||
if (thisActor.boss_debuff) then
|
||||
shadow.debuff_uptime_targets = {}
|
||||
shadow.boss_debuff = true
|
||||
shadow.damage_twin = este_jogador.damage_twin
|
||||
shadow.spellschool = este_jogador.spellschool
|
||||
shadow.damage_spellid = este_jogador.damage_spellid
|
||||
shadow.damage_twin = thisActor.damage_twin
|
||||
shadow.spellschool = thisActor.spellschool
|
||||
shadow.damage_spellid = thisActor.damage_spellid
|
||||
shadow.debuff_uptime = 0
|
||||
else
|
||||
shadow.debuff_uptime_targets = {}
|
||||
end
|
||||
shadow.debuff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spells, shadow and shadow.debuff_uptime_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.debuff_uptime_spells, shadow and shadow.debuff_uptime_spells)
|
||||
end
|
||||
|
||||
--refresh cooldowns defensive
|
||||
if (este_jogador.cooldowns_defensive_targets) then
|
||||
if (thisActor.cooldowns_defensive_targets) then
|
||||
if (shadow and not shadow.cooldowns_defensive_targets) then
|
||||
shadow.cooldowns_defensive = 0
|
||||
shadow.cooldowns_defensive_targets = {}
|
||||
shadow.cooldowns_defensive_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spells, shadow and shadow.cooldowns_defensive_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.cooldowns_defensive_spells, shadow and shadow.cooldowns_defensive_spells)
|
||||
end
|
||||
|
||||
--refresh ressers
|
||||
if (este_jogador.ress_targets) then
|
||||
if (thisActor.ress_targets) then
|
||||
if (shadow and not shadow.ress_targets) then
|
||||
shadow.ress = 0
|
||||
shadow.ress_targets = {}
|
||||
shadow.ress_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.ress_spells, shadow and shadow.ress_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.ress_spells, shadow and shadow.ress_spells)
|
||||
end
|
||||
|
||||
--refresh dispells
|
||||
if (este_jogador.dispell_targets) then
|
||||
if (thisActor.dispell_targets) then
|
||||
if (shadow and not shadow.dispell_targets) then
|
||||
shadow.dispell = 0
|
||||
shadow.dispell_targets = {}
|
||||
shadow.dispell_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --cria o container das habilidades usadas para interromper
|
||||
shadow.dispell_oque = {}
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.dispell_spells, shadow and shadow.dispell_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.dispell_spells, shadow and shadow.dispell_spells)
|
||||
end
|
||||
|
||||
--refresh cc_breaks
|
||||
if (este_jogador.cc_break_targets) then
|
||||
if (thisActor.cc_break_targets) then
|
||||
if (shadow and not shadow.cc_break) then
|
||||
shadow.cc_break = 0
|
||||
shadow.cc_break_targets = {}
|
||||
shadow.cc_break_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
|
||||
shadow.cc_break_oque = {}
|
||||
end
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.cc_break_spells, shadow and shadow.cc_break_spells)
|
||||
_detalhes.refresh:r_container_habilidades (thisActor.cc_break_spells, shadow and shadow.cc_break_spells)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+6
-4
@@ -1631,14 +1631,16 @@
|
||||
|
||||
-- /run local a,b=Details.tooltip.header_statusbar,0.3;a[1]=b;a[2]=b;a[3]=b;a[4]=0.8;
|
||||
|
||||
function Details:AddTooltipSpellHeaderText (headerText, headerColor, amount, iconTexture, L, R, T, B, separator)
|
||||
|
||||
function Details:AddTooltipSpellHeaderText (headerText, headerColor, amount, iconTexture, L, R, T, B, separator, iconSize)
|
||||
if (separator and separator == true) then
|
||||
GameCooltip:AddLine ("", "", nil, nil, 1, 1, 1, 1, 8)
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
if (type(iconSize) ~= "number") then
|
||||
iconSize = 14
|
||||
end
|
||||
|
||||
if (Details.tooltip.show_amount) then
|
||||
GameCooltip:AddLine (headerText, "x" .. amount .. "", nil, headerColor, 1, 1, 1, .4, Details.tooltip.fontsize_title)
|
||||
else
|
||||
@@ -1646,7 +1648,7 @@
|
||||
end
|
||||
|
||||
if (iconTexture) then
|
||||
GameCooltip:AddIcon (iconTexture, 1, 1, 14, 14, L or 0, R or 1, T or 0, B or 1)
|
||||
GameCooltip:AddIcon (iconTexture, 1, 1, iconSize, iconSize, L or 0, R or 1, T or 0, B or 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+551
-565
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
|
||||
local Details = _G.Details
|
||||
local detailsFramework = _G.DetailsFramework
|
||||
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0", true)
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
Details222.Mixins.ActorMixin = {
|
||||
GetSpellContainer = function(self, containerType)
|
||||
if (containerType == "debuff") then
|
||||
return self.debuff_uptime_spells
|
||||
|
||||
elseif (containerType == "buff") then
|
||||
return self.buff_uptime_spells
|
||||
|
||||
elseif (containerType == "spell") then
|
||||
return self.spells
|
||||
end
|
||||
|
||||
end,
|
||||
}
|
||||
+69
-1
@@ -2044,12 +2044,80 @@ function _detalhes:CreateListPanel()
|
||||
end
|
||||
|
||||
|
||||
--this table store addons which want to replace the keystone command
|
||||
--more than one addon can be registered and all of them will be called when the user type /keystone
|
||||
--is up to the user to decide which addon to use
|
||||
local keystoneCallbacks = {}
|
||||
|
||||
---register an addon and a callback function to be called when the user type /keystone
|
||||
---@param addonObject table
|
||||
---@param memberName string
|
||||
---@param ... any
|
||||
---@return boolean true if the addon was registered, false if it was already registered and got unregistered
|
||||
function Details:ReplaceKeystoneCommand(addonObject, memberName, ...)
|
||||
--check if the parameters passed are valid types
|
||||
if (type(addonObject) ~= "table") then
|
||||
error("Details:ReplaceKeystoneCommand: addonObject must be a table")
|
||||
|
||||
elseif (type(memberName) ~= "string") then
|
||||
error("Details:ReplaceKeystoneCommand: memberName must be a string")
|
||||
|
||||
elseif (type(addonObject[memberName]) ~= "function") then
|
||||
error("Details:ReplaceKeystoneCommand: t[memberName] doesn't point to a function.")
|
||||
end
|
||||
|
||||
--check if the addonObject is already registered and remove it
|
||||
for i = #keystoneCallbacks, 1, -1 do
|
||||
if (keystoneCallbacks[i].addonObject == addonObject) then
|
||||
--check if the memberName is the same
|
||||
if (keystoneCallbacks[i].memberName == memberName) then
|
||||
tremove(keystoneCallbacks, i)
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local payload = {...}
|
||||
|
||||
keystoneCallbacks[#keystoneCallbacks+1] = {
|
||||
addonObject = addonObject,
|
||||
memberName = memberName,
|
||||
payload = payload
|
||||
}
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE) then
|
||||
SLASH_KEYSTONE1 = "/keystone"
|
||||
SLASH_KEYSTONE2 = "/keys"
|
||||
SLASH_KEYSTONE3 = "/key"
|
||||
|
||||
function SlashCmdList.KEYSTONE(msg, editbox)
|
||||
--if there is addons registered to use the keystone command, call them and do not show the default frame from details!
|
||||
if (#keystoneCallbacks > 0) then
|
||||
--loop through all registered addons and call their callback function
|
||||
local bCallbackSuccess = false
|
||||
for i = 1, #keystoneCallbacks do
|
||||
local thisCallback = keystoneCallbacks[i]
|
||||
|
||||
local addonObject = thisCallback.addonObject
|
||||
local memberName = thisCallback.memberName
|
||||
local payload = thisCallback.payload
|
||||
|
||||
if (type(addonObject[memberName]) == "function") then
|
||||
local result = DetailsFramework:Dispatch(addonObject[memberName], unpack(payload)) --uses xpcall
|
||||
if (result ~= false) then
|
||||
bCallbackSuccess = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (bCallbackSuccess) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0")
|
||||
if (openRaidLib) then
|
||||
if (not DetailsKeystoneInfoFrame) then
|
||||
@@ -2158,7 +2226,7 @@ if (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE) then
|
||||
line.keystoneLevelText.text = level
|
||||
line.dungeonNameText.text = mapName
|
||||
DetailsFramework:TruncateText(line.dungeonNameText, 240)
|
||||
line.classicDungeonNameText.text = mapNameChallenge or ""
|
||||
line.classicDungeonNameText.text = "" --mapNameChallenge
|
||||
DetailsFramework:TruncateText(line.classicDungeonNameText, 120)
|
||||
line.inMyParty = inMyParty > 0
|
||||
line.inMyGuild = isGuildMember
|
||||
|
||||
Reference in New Issue
Block a user