Library update
This commit is contained in:
+37
-41
@@ -2929,62 +2929,58 @@ end
|
||||
|
||||
-----------------------------
|
||||
--safe copy from blizz api
|
||||
function DF:Mixin (object, ...)
|
||||
function DF:Mixin(object, ...)
|
||||
for i = 1, select("#", ...) do
|
||||
local mixin = select(i, ...);
|
||||
for k, v in pairs(mixin) do
|
||||
object[k] = v;
|
||||
local mixin = select(i, ...)
|
||||
for key, value in pairs(mixin) do
|
||||
object[key] = value
|
||||
end
|
||||
end
|
||||
|
||||
return object;
|
||||
return object
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
--> animations
|
||||
|
||||
function DF:CreateAnimationHub (parent, onPlay, onFinished)
|
||||
function DF:CreateAnimationHub(parent, onPlay, onFinished)
|
||||
local newAnimation = parent:CreateAnimationGroup()
|
||||
newAnimation:SetScript ("OnPlay", onPlay)
|
||||
newAnimation:SetScript ("OnFinished", onFinished)
|
||||
newAnimation:SetScript ("OnStop", onFinished)
|
||||
newAnimation:SetScript("OnPlay", onPlay)
|
||||
newAnimation:SetScript("OnFinished", onFinished)
|
||||
newAnimation:SetScript("OnStop", onFinished)
|
||||
newAnimation.NextAnimation = 1
|
||||
return newAnimation
|
||||
end
|
||||
|
||||
function DF:CreateAnimation (animation, type, order, duration, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||
local anim = animation:CreateAnimation (type)
|
||||
|
||||
anim:SetOrder (order or animation.NextAnimation)
|
||||
anim:SetDuration (duration)
|
||||
|
||||
type = string.upper (type)
|
||||
|
||||
if (type == "ALPHA") then
|
||||
anim:SetFromAlpha (arg1)
|
||||
anim:SetToAlpha (arg2)
|
||||
|
||||
elseif (type == "SCALE") then
|
||||
if (DF.IsDragonflight()) then
|
||||
anim:SetScaleFrom (arg1, arg2)
|
||||
anim:SetScaleTo (arg3, arg4)
|
||||
else
|
||||
anim:SetFromScale (arg1, arg2)
|
||||
anim:SetToScale (arg3, arg4)
|
||||
end
|
||||
function DF:CreateAnimation(animation, animationType, order, duration, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||
local anim = animation:CreateAnimation(animationType)
|
||||
anim:SetOrder(order or animation.NextAnimation)
|
||||
anim:SetDuration(duration)
|
||||
|
||||
anim:SetOrigin (arg5 or "center", arg6 or 0, arg7 or 0) --point, x, y
|
||||
|
||||
elseif (type == "ROTATION") then
|
||||
anim:SetDegrees (arg1) --degree
|
||||
anim:SetOrigin (arg2 or "center", arg3 or 0, arg4 or 0) --point, x, y
|
||||
|
||||
elseif (type == "TRANSLATION") then
|
||||
anim:SetOffset (arg1, arg2)
|
||||
|
||||
animationType = string.upper(animationType)
|
||||
|
||||
if (animationType == "ALPHA") then
|
||||
anim:SetFromAlpha(arg1)
|
||||
anim:SetToAlpha(arg2)
|
||||
|
||||
elseif (animationType == "SCALE") then
|
||||
if (DF.IsDragonflight()) then
|
||||
anim:SetScaleFrom(arg1, arg2)
|
||||
anim:SetScaleTo(arg3, arg4)
|
||||
else
|
||||
anim:SetFromScale(arg1, arg2)
|
||||
anim:SetToScale(arg3, arg4)
|
||||
end
|
||||
anim:SetOrigin(arg5 or "center", arg6 or 0, arg7 or 0) --point, x, y
|
||||
|
||||
elseif (animationType == "ROTATION") then
|
||||
anim:SetDegrees(arg1) --degree
|
||||
anim:SetOrigin(arg2 or "center", arg3 or 0, arg4 or 0) --point, x, y
|
||||
|
||||
elseif (animationType == "TRANSLATION") then
|
||||
anim:SetOffset(arg1, arg2)
|
||||
end
|
||||
|
||||
animation.NextAnimation = animation.NextAnimation + 1
|
||||
|
||||
animation.NextAnimation = animation.NextAnimation + 1
|
||||
return anim
|
||||
end
|
||||
|
||||
|
||||
@@ -255,4 +255,20 @@ function openRaidLib.FilterCooldowns(unitName, allCooldowns, filters)
|
||||
end
|
||||
|
||||
return resultFilters
|
||||
end
|
||||
|
||||
function openRaidLib.FlaskGetBySpellId(spellId)
|
||||
return LIB_OPEN_RAID_FLASK_BUFF[spellId]
|
||||
end
|
||||
|
||||
function openRaidLib.FlaskGetTier(auraInfo)
|
||||
local flaskTable = openRaidLib.FlaskGetBySpellId(auraInfo.spellId)
|
||||
local points = auraInfo.points
|
||||
for i = 1, #points do
|
||||
local flaskTier = flaskTable[points[i]]
|
||||
if (flaskTier) then
|
||||
return flaskTier
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
@@ -58,7 +58,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
|
||||
end
|
||||
|
||||
local major = "LibOpenRaid-1.0"
|
||||
local CONST_LIB_VERSION = 57
|
||||
local CONST_LIB_VERSION = 58
|
||||
LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
--declae the library within the LibStub
|
||||
|
||||
@@ -467,7 +467,8 @@ elseif (isExpansion_Dragonflight()) then
|
||||
--spellId of healing from potions
|
||||
LIB_OPEN_RAID_HEALING_POTIONS = {
|
||||
[370511] = 1, --Refreshing Healing Potion
|
||||
|
||||
[371039] = 1, --Potion of Withering Vitality
|
||||
[6262] = 1, --Warlock's Healthstone
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ function Details.AuraTracker.RefreshScroll(self, data, offset, totalLines)
|
||||
line.Icon.texture = auraInfo.icon
|
||||
line.Name.text = auraInfo.name
|
||||
line.SpellId.text = auraInfo.spellId
|
||||
line.LuaTableEntry.text = formatToLuaTable.doFormat2NoIndex(auraInfo)
|
||||
line.LuaTableEntry.text = formatToLuaTable.doFormat5(auraInfo) --doFormat2NoIndex
|
||||
line.Points.text = formatToLuaTable.doFormat2NoIndexFromCache(auraInfo)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user