- Updated flask and food list to BFA.
- Framework update. - RaidCheck plugin updated. - API added: _detalhes:GetSpecFromSerial (guid) - API added: _detalhes:GetIconTexture (iconType, withAlpha) - API added: _detalhes:GetRoleIcon (role) - API added: _detalhes:GetSpecIcon (spec)
This commit is contained in:
+39
-18
@@ -1,5 +1,5 @@
|
||||
|
||||
local dversion = 96
|
||||
local dversion = 98
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
@@ -1566,6 +1566,39 @@ function DF:CreateAnimation (animation, type, order, duration, arg1, arg2, arg3,
|
||||
return anim
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> frame shakes
|
||||
|
||||
--> frame shakes rely on OnUpdate scripts, we are using a built-in OnUpdate so is guarantee it'll run
|
||||
local FrameshakeUpdateFrame = DetailsFrameworkFrameshakeControl or CreateFrame ("frame", "DetailsFrameworkFrameshakeControl", UIParent)
|
||||
--> store the frame which has frame shakes registered
|
||||
FrameshakeUpdateFrame.RegisteredFrames = FrameshakeUpdateFrame.RegisteredFrames or {}
|
||||
|
||||
FrameshakeUpdateFrame.RegisterFrame = function (newFrame)
|
||||
--> add the frame into the registered frames to update
|
||||
DF.table.addunique (FrameshakeUpdateFrame.RegisteredFrames, newFrame)
|
||||
end
|
||||
|
||||
--forward declared
|
||||
local frameshake_do_update
|
||||
|
||||
FrameshakeUpdateFrame:SetScript ("OnUpdate", function (self, deltaTime)
|
||||
for i = 1, #FrameshakeUpdateFrame.RegisteredFrames do
|
||||
local parent = FrameshakeUpdateFrame.RegisteredFrames [i]
|
||||
--> check if there's a shake running
|
||||
if (parent.__frameshakes.enabled > 0) then
|
||||
--update all shakes for this frame
|
||||
for i = 1, #parent.__frameshakes do
|
||||
local shakeObject = parent.__frameshakes [i]
|
||||
if (shakeObject.IsPlaying) then
|
||||
frameshake_do_update (parent, shakeObject, deltaTime)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
local frameshake_shake_finished = function (parent, shakeObject)
|
||||
if (shakeObject.IsPlaying) then
|
||||
shakeObject.IsPlaying = false
|
||||
@@ -1603,7 +1636,8 @@ local frameshake_shake_finished = function (parent, shakeObject)
|
||||
end
|
||||
end
|
||||
|
||||
local frameshake_do_update = function (parent, shakeObject, deltaTime)
|
||||
--already declared above the update function
|
||||
frameshake_do_update = function (parent, shakeObject, deltaTime)
|
||||
|
||||
--> check delta time
|
||||
deltaTime = deltaTime or 0
|
||||
@@ -1679,20 +1713,6 @@ local frameshake_do_update = function (parent, shakeObject, deltaTime)
|
||||
end
|
||||
end
|
||||
|
||||
local frameshake_update_all = function (parent, deltaTime)
|
||||
--> check if there's a shake running
|
||||
--print ("Shakes Enabled: ", parent.__frameshakes.enabled)
|
||||
if (parent.__frameshakes.enabled > 0) then
|
||||
--update all shakes
|
||||
for i = 1, #parent.__frameshakes do
|
||||
local shakeObject = parent.__frameshakes [i]
|
||||
if (shakeObject.IsPlaying) then
|
||||
frameshake_do_update (parent, shakeObject, deltaTime)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local frameshake_stop = function (parent, shakeObject)
|
||||
frameshake_shake_finished (parent, shakeObject)
|
||||
end
|
||||
@@ -1810,8 +1830,9 @@ function DF:CreateFrameShake (parent, duration, amplitude, frequency, absoluteSi
|
||||
parent.PlayFrameShake = frameshake_play
|
||||
parent.StopFrameShake = frameshake_stop
|
||||
parent.UpdateFrameShake = frameshake_do_update
|
||||
parent.UpdateAllFrameShake = frameshake_update_all
|
||||
parent:HookScript ("OnUpdate", frameshake_update_all)
|
||||
|
||||
--> register the frame within the frame shake updater
|
||||
FrameshakeUpdateFrame.RegisterFrame (parent)
|
||||
end
|
||||
|
||||
tinsert (parent.__frameshakes, frameShake)
|
||||
|
||||
+22
-9
@@ -4805,20 +4805,26 @@ DF.IconRowFunctions = {
|
||||
local iconFrame = self.IconPool [self.NextIcon]
|
||||
|
||||
if (not iconFrame) then
|
||||
local newIconFrame = CreateFrame ("cooldown", "$parentIconCooldown" .. self.NextIcon, self, "CooldownFrameTemplate")
|
||||
local newIconFrame = CreateFrame ("frame", "$parentIcon" .. self.NextIcon, self)
|
||||
newIconFrame:SetSize (self.options.icon_width, self.options.icon_height)
|
||||
|
||||
newIconFrame.Texture = newIconFrame:CreateTexture (nil, "background")
|
||||
newIconFrame.Texture:SetAllPoints()
|
||||
|
||||
newIconFrame.Text = newIconFrame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
newIconFrame.Text:SetPoint ("center")
|
||||
newIconFrame.Text:Hide()
|
||||
|
||||
newIconFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
|
||||
newIconFrame:SetBackdropBorderColor (0, 0, 0, 0)
|
||||
newIconFrame:EnableMouse (false)
|
||||
|
||||
local cooldownFrame = CreateFrame ("cooldown", "$parentIconCooldown" .. self.NextIcon, self, "CooldownFrameTemplate")
|
||||
cooldownFrame:SetAllPoints()
|
||||
cooldownFrame:EnableMouse (false)
|
||||
|
||||
newIconFrame.Text = cooldownFrame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
newIconFrame.Text:SetPoint ("center")
|
||||
newIconFrame.Text:Hide()
|
||||
|
||||
newIconFrame.Cooldown = cooldownFrame
|
||||
|
||||
self.IconPool [self.NextIcon] = newIconFrame
|
||||
iconFrame = newIconFrame
|
||||
end
|
||||
@@ -4852,8 +4858,15 @@ DF.IconRowFunctions = {
|
||||
return iconFrame
|
||||
end,
|
||||
|
||||
SetIcon = function (self, spellId, borderColor, startTime, duration)
|
||||
local spellName, _, spellIcon = GetSpellInfo (spellId)
|
||||
SetIcon = function (self, spellId, borderColor, startTime, duration, forceTexture)
|
||||
|
||||
local spellName, _, spellIcon
|
||||
|
||||
if (not forceTexture) then
|
||||
spellName, _, spellIcon = GetSpellInfo (spellId)
|
||||
else
|
||||
spellIcon = forceTexture
|
||||
end
|
||||
|
||||
if (spellIcon) then
|
||||
local iconFrame = self:GetIcon()
|
||||
@@ -4864,10 +4877,10 @@ DF.IconRowFunctions = {
|
||||
iconFrame:SetBackdropBorderColor (Plater:ParseColors (borderColor))
|
||||
else
|
||||
iconFrame:SetBackdropBorderColor (0, 0, 0 ,0)
|
||||
end
|
||||
end
|
||||
|
||||
if (startTime) then
|
||||
CooldownFrame_Set (iconFrame, startTime, duration, true, true)
|
||||
CooldownFrame_Set (iconFrame.Cooldown, startTime, duration, true, true)
|
||||
|
||||
if (self.options.show_text) then
|
||||
iconFrame.Text:Show()
|
||||
|
||||
@@ -766,3 +766,65 @@ function DF:GetCooldownInfo (spellId)
|
||||
return DF.CooldownsInfo [spellId]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--consumables
|
||||
|
||||
DF.FlaskIDs = {
|
||||
[251836] = true, -- Flask of the Currents agility
|
||||
[251837] = true, -- Flask of Endless Fathoms intellect
|
||||
[251838] = true, -- Flask of the Vast Horizon stamina
|
||||
[251839] = true, -- Flask of the Undertow strength
|
||||
}
|
||||
|
||||
DF.FoodIDs = {
|
||||
[257422] = 41, --Mon'Dazi versatility
|
||||
[257413] = 41, --Ravenberry Tarts haste
|
||||
[257418] = 41, --Loa Loaf mastery
|
||||
[257408] = 41, --Kul Tiramisu critical
|
||||
|
||||
[257424] = 55, --Spiced Snapper versatility
|
||||
[257415] = 55, --Swamp Fish 'n Chips haste
|
||||
[257420] = 55, --Sailor's Pie mastery
|
||||
[257410] = 55, --Honey-Glazed Haunches critical
|
||||
|
||||
[259448] = 75, --Galley Banquet agility
|
||||
[259449] = 75, --Galley Banquet intellect
|
||||
[259453] = 75, --Galley Banquet stamina
|
||||
[259452] = 75, --Galley Banquet strength
|
||||
|
||||
[259454] = 100, --Bountiful Captain's Feast agility
|
||||
[259455] = 100, --Bountiful Captain's Feast intellect
|
||||
[259457] = 100, --Bountiful Captain's Feast stamina
|
||||
[257427] = 100, --Bountiful Captain's Feast strength
|
||||
}
|
||||
|
||||
DF.PotionIDs = {
|
||||
[279152] = true, --Battle Potion of Agility
|
||||
[279151] = true, --Battle Potion of Intellect
|
||||
[279154] = true, --Battle Potion of Stamina
|
||||
[279153] = true, --Battle Potion of Strength
|
||||
|
||||
[269853] = true, --Potion of Rising Death (range)
|
||||
[251316] = true, --Potion of Bursting Blood (melee)
|
||||
[251231] = true, --Steelskin Potion (tank)
|
||||
}
|
||||
|
||||
DF.RuneIDs = {
|
||||
[270058] = true, --Battle-Scarred Augment Rune
|
||||
}
|
||||
|
||||
-- /dump UnitAura ("player", 1)
|
||||
-- /dump UnitAura ("player", 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user