Search added to options panel
This commit is contained in:
+17
-3
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 275
|
||||
local dversion = 277
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
@@ -4285,13 +4285,18 @@ do
|
||||
local object = tremove(self.notUse, #self.notUse)
|
||||
if (object) then
|
||||
tinsert(self.inUse, object)
|
||||
if (self.onAcquire) then
|
||||
local result, errortext = pcall(self.onAcquire, object)
|
||||
end
|
||||
return object, false
|
||||
|
||||
else
|
||||
--need to create the new object
|
||||
local newObject = self.newObjectFunc(self, unpack(self.payload))
|
||||
if (newObject) then
|
||||
tinsert(self.inUse, newObject)
|
||||
if (self.onAcquire) then
|
||||
local result, errortext = pcall(self.onAcquire, object)
|
||||
end
|
||||
return newObject, true
|
||||
end
|
||||
end
|
||||
@@ -4315,6 +4320,10 @@ do
|
||||
for i = #self.inUse, 1, -1 do
|
||||
local object = tremove(self.inUse, i)
|
||||
tinsert(self.notUse, object)
|
||||
|
||||
if (self.onReset) then
|
||||
local result, errortext = pcall(self.onReset, object)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4347,6 +4356,12 @@ do
|
||||
Hide = hide,
|
||||
Show = show,
|
||||
GetAmount = getamount,
|
||||
SetOnReset = function(self, func)
|
||||
self.onReset = func
|
||||
end,
|
||||
SetOnAcquire = function(self, func)
|
||||
self.onAcquire = func
|
||||
end,
|
||||
}
|
||||
|
||||
function DF:CreatePool(func, ...)
|
||||
@@ -4365,7 +4380,6 @@ do
|
||||
function DF:CreateObjectPool(func, ...)
|
||||
return DF:CreatePool(func, ...)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
+100
-7
@@ -16,6 +16,16 @@ local loadstring = loadstring --> lua local
|
||||
|
||||
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
|
||||
local IS_WOW_PROJECT_NOT_MAINLINE = WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE
|
||||
local IS_WOW_PROJECT_CLASSIC_ERA = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
|
||||
local IS_WOW_PROJECT_CLASSIC_TBC = WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
|
||||
|
||||
local UnitCastingInfo = UnitCastingInfo
|
||||
local UnitChannelInfo = UnitChannelInfo
|
||||
|
||||
if IS_WOW_PROJECT_CLASSIC_ERA then
|
||||
UnitCastingInfo = CastingInfo
|
||||
UnitChannelInfo = ChannelInfo
|
||||
end
|
||||
|
||||
local PixelUtil = PixelUtil or DFPixelUtil
|
||||
|
||||
@@ -7233,7 +7243,7 @@ DF.StatusBarFunctions = {
|
||||
{"UNIT_HEALTH", true},
|
||||
{"UNIT_MAXHEALTH", true},
|
||||
{(IS_WOW_PROJECT_NOT_MAINLINE) and "UNIT_HEALTH_FREQUENT", true}, -- this one is classic-only...
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_HEAL_PREDICTION", true},
|
||||
{"UNIT_HEAL_PREDICTION", true},
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_ABSORB_AMOUNT_CHANGED", true},
|
||||
{(IS_WOW_PROJECT_MAINLINE) and "UNIT_HEAL_ABSORB_AMOUNT_CHANGED", true},
|
||||
}
|
||||
@@ -7264,8 +7274,8 @@ DF.StatusBarFunctions = {
|
||||
|
||||
--> check for settings and update some events
|
||||
if (not self.Settings.ShowHealingPrediction) then
|
||||
if IS_WOW_PROJECT_MAINLINE then
|
||||
self:UnregisterEvent ("UNIT_HEAL_PREDICTION")
|
||||
if IS_WOW_PROJECT_MAINLINE then
|
||||
self:UnregisterEvent ("UNIT_HEAL_ABSORB_AMOUNT_CHANGED")
|
||||
end
|
||||
self.incomingHealIndicator:Hide()
|
||||
@@ -7365,7 +7375,6 @@ DF.StatusBarFunctions = {
|
||||
|
||||
--health and absorbs prediction
|
||||
healthBarMetaFunctions.UpdateHealPrediction = function (self)
|
||||
if IS_WOW_PROJECT_NOT_MAINLINE then return end
|
||||
local currentHealth = self.currentHealth
|
||||
local currentHealthMax = self.currentHealthMax
|
||||
local healthPercent = currentHealth / currentHealthMax
|
||||
@@ -7381,7 +7390,7 @@ DF.StatusBarFunctions = {
|
||||
--incoming heal on the unit from all sources
|
||||
local unitHealIncoming = self.displayedUnit and UnitGetIncomingHeals (self.displayedUnit) or 0
|
||||
--heal absorbs
|
||||
local unitHealAbsorb = self.displayedUnit and UnitGetTotalHealAbsorbs (self.displayedUnit) or 0
|
||||
local unitHealAbsorb = IS_WOW_PROJECT_MAINLINE and self.displayedUnit and UnitGetTotalHealAbsorbs (self.displayedUnit) or 0
|
||||
|
||||
if (unitHealIncoming > 0) then
|
||||
--calculate what is the percent of health incoming based on the max health the player has
|
||||
@@ -7405,7 +7414,7 @@ DF.StatusBarFunctions = {
|
||||
end
|
||||
end
|
||||
|
||||
if (self.Settings.ShowShields) then
|
||||
if (self.Settings.ShowShields and IS_WOW_PROJECT_MAINLINE) then
|
||||
--damage absorbs
|
||||
local unitDamageAbsorb = self.displayedUnit and UnitGetTotalAbsorbs (self.displayedUnit) or 0
|
||||
|
||||
@@ -8360,7 +8369,7 @@ DF.CastFrameFunctions = {
|
||||
|
||||
UpdateCastingInfo = function (self, unit)
|
||||
local name, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible, spellID
|
||||
if IS_WOW_PROJECT_MAINLINE then
|
||||
if not IS_WOW_PROJECT_CLASSIC_TBC then
|
||||
name, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible, spellID = UnitCastingInfo (unit)
|
||||
else
|
||||
name, text, texture, startTime, endTime, isTradeSkill, castID, spellID = UnitCastingInfo (unit)
|
||||
@@ -8428,7 +8437,7 @@ DF.CastFrameFunctions = {
|
||||
|
||||
UpdateChannelInfo = function (self, unit, ...)
|
||||
local name, text, texture, startTime, endTime, isTradeSkill, notInterruptible, spellID
|
||||
if IS_WOW_PROJECT_MAINLINE then
|
||||
if not IS_WOW_PROJECT_CLASSIC_TBC then
|
||||
name, text, texture, startTime, endTime, isTradeSkill, notInterruptible, spellID = UnitChannelInfo (unit)
|
||||
else
|
||||
name, text, texture, startTime, endTime, isTradeSkill, spellID = UnitChannelInfo (unit)
|
||||
@@ -8651,6 +8660,90 @@ DF.CastFrameFunctions = {
|
||||
|
||||
}
|
||||
|
||||
-- for classic era use LibClassicCasterino:
|
||||
local LibCC = LibStub ("LibClassicCasterino", true)
|
||||
if IS_WOW_PROJECT_CLASSIC_ERA and LibCC then
|
||||
local fCast = CreateFrame("frame")
|
||||
|
||||
local getCastBar = function (unitId)
|
||||
local plateFrame = C_NamePlate.GetNamePlateForUnit (unitId)
|
||||
if (not plateFrame) then
|
||||
return
|
||||
end
|
||||
|
||||
local castBar = plateFrame.unitFrame and plateFrame.unitFrame.castBar
|
||||
if (not castBar) then
|
||||
return
|
||||
end
|
||||
|
||||
return castBar
|
||||
end
|
||||
|
||||
local triggerCastEvent = function (castBar, event, unitId, ...)
|
||||
if (castBar and castBar.OnEvent) then
|
||||
castBar.OnEvent (castBar, event, unitId)
|
||||
end
|
||||
end
|
||||
|
||||
local funcCast = function (event, unitId, ...)
|
||||
local castBar = getCastBar (unitId)
|
||||
if (castBar) then
|
||||
triggerCastEvent (castBar, event, unitId)
|
||||
end
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_START = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_STOP = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_DELAYED = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_FAILED = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_INTERRUPTED = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_CHANNEL_START = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_CHANNEL_UPDATE = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
fCast.UNIT_SPELLCAST_CHANNEL_STOP = function (self, event, unitId, ...)
|
||||
triggerCastEvent (getCastBar (unitId), event, unitId)
|
||||
end
|
||||
|
||||
if LibCC then
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_START", funcCast)
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_DELAYED", funcCast) -- only for player
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_STOP", funcCast)
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_FAILED", funcCast)
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_INTERRUPTED", funcCast)
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_CHANNEL_START", funcCast)
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_CHANNEL_UPDATE", funcCast) -- only for player
|
||||
LibCC.RegisterCallback(fCast,"UNIT_SPELLCAST_CHANNEL_STOP", funcCast)
|
||||
|
||||
UnitCastingInfo = function(unit)
|
||||
return LibCC:UnitCastingInfo (unit)
|
||||
end
|
||||
|
||||
UnitChannelInfo = function(unit)
|
||||
return LibCC:UnitChannelInfo (unit)
|
||||
end
|
||||
end
|
||||
end -- end classic era
|
||||
|
||||
-- ~castbar
|
||||
|
||||
function DF:CreateCastBar (parent, name, settingsOverride)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 8812
|
||||
_detalhes.alpha_build_counter = 8812 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 8888
|
||||
_detalhes.alpha_build_counter = 8888 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.bcc_counter = 28
|
||||
_detalhes.dont_open_news = true
|
||||
_detalhes.game_version = version
|
||||
@@ -33,6 +33,15 @@ do
|
||||
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
|
||||
local news = {
|
||||
|
||||
{"v9.1.0.8888.145", "October 7th, 2021"},
|
||||
"Search has been added into the options panel",
|
||||
"Improvements on overkill amount of damage",
|
||||
"Fonts 'Oswald' and 'NuevaStd' enabled again.",
|
||||
"Added critical hits to Death Log (by C. Raethke)",
|
||||
"Added settings to change the color on death log, they are within the class colors panel.",
|
||||
"Don't show TaintWarning frame if MiniMapBattlefieldFrame is hidden (by Flamanis).",
|
||||
|
||||
{"v9.1.0.8812.145", "September 5th, 2021"},
|
||||
"Fonts 'Oswald' and 'NuevaStd' disabled due to some erros on the client side.",
|
||||
"Death Knight adds now include the icon of the spell whose summoned them.",
|
||||
@@ -755,8 +764,8 @@ do
|
||||
SharedMedia:Register ("border", "Details BarBorder 3", [[Interface\AddOns\Details\images\border_3]])
|
||||
SharedMedia:Register ("border", "1 Pixel", [[Interface\Buttons\WHITE8X8]])
|
||||
--misc fonts
|
||||
--SharedMedia:Register ("font", "Oswald", [[Interface\Addons\Details\fonts\Oswald-Regular.otf]]) --blizz deativated support to .OTF font? (04-Set-2021)
|
||||
--SharedMedia:Register ("font", "Nueva Std Cond", [[Interface\Addons\Details\fonts\NuevaStd-Cond.otf]])
|
||||
SharedMedia:Register ("font", "Oswald", [[Interface\Addons\Details\fonts\Oswald-Regular.ttf]])
|
||||
SharedMedia:Register ("font", "Nueva Std Cond", [[Interface\Addons\Details\fonts\NuevaStd-Cond.ttf]])
|
||||
SharedMedia:Register ("font", "Accidental Presidency", [[Interface\Addons\Details\fonts\Accidental Presidency.ttf]])
|
||||
SharedMedia:Register ("font", "TrashHand", [[Interface\Addons\Details\fonts\TrashHand.TTF]])
|
||||
SharedMedia:Register ("font", "Harry P", [[Interface\Addons\Details\fonts\HARRYP__.TTF]])
|
||||
|
||||
+16
-14
@@ -153,11 +153,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
|
||||
local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS
|
||||
local container_misc = _detalhes.container_type.CONTAINER_MISC_CLASS
|
||||
local duel_candidates = _detalhes.duel_candidates
|
||||
|
||||
local _token_ids = _detalhes.TokenID
|
||||
|
||||
local OBJECT_TYPE_ENEMY = 0x00000040
|
||||
@@ -165,7 +161,6 @@
|
||||
local OBJECT_TYPE_PETS = 0x00003000
|
||||
local AFFILIATION_GROUP = 0x00000007
|
||||
local REACTION_FRIENDLY = 0x00000010
|
||||
local REACTION_MINE = 0x00000001
|
||||
|
||||
local ENVIRONMENTAL_FALLING_NAME = Loc ["STRING_ENVIRONMENTAL_FALLING"]
|
||||
local ENVIRONMENTAL_DROWNING_NAME = Loc ["STRING_ENVIRONMENTAL_DROWNING"]
|
||||
@@ -254,12 +249,11 @@
|
||||
end
|
||||
end
|
||||
|
||||
--tbc prayer of mending cache
|
||||
--tbc spell caches
|
||||
local TBC_PrayerOfMendingCache = {}
|
||||
--tbc earth shield cache
|
||||
local TBC_EarthShieldCache = {}
|
||||
--tbc life bloom cache
|
||||
local TBC_LifeBloomLatestHeal
|
||||
local TBC_JudgementOfLightCache = {}
|
||||
|
||||
--expose the override spells table to external scripts
|
||||
_detalhes.OverridedSpellIds = override_spellId
|
||||
@@ -905,9 +899,10 @@
|
||||
|
||||
if (_is_in_instance) then
|
||||
if (overkill and overkill > 0) then
|
||||
overkill = overkill + 1
|
||||
--if enabled it'll cut the amount of overkill from the last hit (which killed the actor)
|
||||
--when disabled it'll show the total damage done for the latest hit
|
||||
--amount = amount - overkill
|
||||
amount = amount - overkill
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1102,14 +1097,13 @@
|
||||
|
||||
if (is_friendly_fire and spellid ~= SPELLID_KYRIAN_DRUID_TANK) then --kyrian spell remove on 10.0
|
||||
if (este_jogador.grupo) then --> se tiver ele n�o adiciona o evento l� em cima
|
||||
local t = last_events_cache [alvo_name]
|
||||
local t = last_events_cache[alvo_name]
|
||||
|
||||
if (not t) then
|
||||
t = _current_combat:CreateLastEventsTable (alvo_name)
|
||||
t = _current_combat:CreateLastEventsTable(alvo_name)
|
||||
end
|
||||
|
||||
local i = t.n
|
||||
|
||||
local this_event = t [i]
|
||||
|
||||
this_event [1] = true --> true if this is a damage || false for healing
|
||||
@@ -1990,8 +1984,6 @@
|
||||
spellid = override_spellId [spellid] or spellid
|
||||
end
|
||||
|
||||
|
||||
|
||||
--sanguine ichor mythic dungeon affix (heal enemies)
|
||||
if (spellid == SPELLID_SANGUINE_HEAL) then
|
||||
who_name = GetSpellInfo(SPELLID_SANGUINE_HEAL)
|
||||
@@ -2031,6 +2023,13 @@
|
||||
elseif (spellid == SPELLID_DRUID_LIFEBLOOM_HEAL) then
|
||||
TBC_LifeBloomLatestHeal = cura_efetiva
|
||||
return
|
||||
|
||||
elseif (spellid == 27163) then --Judgement of Light (paladin)
|
||||
local sourceData = TBC_JudgementOfLightCache[who_name]
|
||||
if (sourceData) then
|
||||
who_serial, who_name, who_flags = unpack(sourceData)
|
||||
TBC_JudgementOfLightCache[who_name] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2338,6 +2337,9 @@
|
||||
|
||||
elseif (spellid == SPELLID_PRIEST_POM_BUFF) then
|
||||
TBC_PrayerOfMendingCache [alvo_name] = {who_serial, who_name, who_flags}
|
||||
|
||||
elseif (spellid == 27163) then --Judgement Of Light
|
||||
TBC_JudgementOfLightCache[alvo_name] = {who_serial, who_name, who_flags}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,6 +11,12 @@ function Details:DumpTable (t)
|
||||
return Details:Dump (t)
|
||||
end
|
||||
|
||||
function Details:DumpInline(t)
|
||||
for key, value in pairs(t) do
|
||||
print(key, value)
|
||||
end
|
||||
end
|
||||
|
||||
function Details:Dump (t)
|
||||
if (not DetailsDumpFrame) then
|
||||
DetailsDumpFrame = DetailsFramework:CreateSimplePanel (_G.UIParent)
|
||||
|
||||
Reference in New Issue
Block a user