mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- updated all modules to use the new UnitAura return value that tells who the caster was. now checking if that return == "player" for figuring out if the player cast it or not
This commit is contained in:
@ -125,6 +125,7 @@ function IceCustomBar.prototype:GetOptions()
|
|||||||
self.moduleSettings.myUnit = v
|
self.moduleSettings.myUnit = v
|
||||||
self.unit = v
|
self.unit = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
|
self:UpdateCustomBar(self.unit)
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
@ -143,6 +144,7 @@ function IceCustomBar.prototype:GetOptions()
|
|||||||
set = function(v)
|
set = function(v)
|
||||||
self.moduleSettings.buffOrDebuff = v
|
self.moduleSettings.buffOrDebuff = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
|
self:UpdateCustomBar(self.unit)
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
@ -163,6 +165,7 @@ function IceCustomBar.prototype:GetOptions()
|
|||||||
end
|
end
|
||||||
self.moduleSettings.buffToTrack = v
|
self.moduleSettings.buffToTrack = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
|
self:UpdateCustomBar(self.unit)
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
@ -180,6 +183,7 @@ function IceCustomBar.prototype:GetOptions()
|
|||||||
set = function(v)
|
set = function(v)
|
||||||
self.moduleSettings.trackOnlyMine = v
|
self.moduleSettings.trackOnlyMine = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
|
self:UpdateCustomBar(self.unit)
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
@ -220,7 +224,8 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
|
|||||||
local remaining
|
local remaining
|
||||||
local isBuff = self.moduleSettings.buffOrDebuff == "buff" and true or false
|
local isBuff = self.moduleSettings.buffOrDebuff == "buff" and true or false
|
||||||
local buffFilter = (isBuff and "HELPFUL" or "HARMFUL") .. (unitName == "player" and "|PLAYER" or "")
|
local buffFilter = (isBuff and "HELPFUL" or "HARMFUL") .. (unitName == "player" and "|PLAYER" or "")
|
||||||
local buff, rank, texture, count, type, duration, endTime, isMine = UnitAura(unitName, i, buffFilter)
|
local buff, rank, texture, count, type, duration, endTime, unitCaster = UnitAura(unitName, i, buffFilter)
|
||||||
|
local isMine = unitCaster == "player"
|
||||||
|
|
||||||
while buff do
|
while buff do
|
||||||
if (buff == buffName and (not self.moduleSettings.trackOnlyMine or isMine)) then
|
if (buff == buffName and (not self.moduleSettings.trackOnlyMine or isMine)) then
|
||||||
@ -232,7 +237,8 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
|
|||||||
|
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
|
|
||||||
buff, rank, texture, count, type, duration, endTime, isMine = UnitAura(unitName, i, buffFilter)
|
buff, rank, texture, count, type, duration, endTime, unitCaster = UnitAura(unitName, i, buffFilter)
|
||||||
|
isMine = unitCaster == "player"
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil, nil, nil
|
return nil, nil, nil
|
||||||
|
@ -222,7 +222,8 @@ end
|
|||||||
|
|
||||||
function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
|
function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
|
||||||
local i = 1
|
local i = 1
|
||||||
local debuff, rank, texture, count, debuffType, duration, endTime, isMine = UnitAura(unitName, i, "HARMFUL")
|
local debuff, rank, texture, count, debuffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HARMFUL")
|
||||||
|
local isMine = unitCaster == "player"
|
||||||
local result = {nil, nil, nil}
|
local result = {nil, nil, nil}
|
||||||
local remaining
|
local remaining
|
||||||
|
|
||||||
@ -241,7 +242,8 @@ function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
|
|||||||
|
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
|
|
||||||
debuff, rank, texture, count, debuffType, duration, endTime, isMine = UnitAura(unitName, i, "HARMFUL")
|
debuff, rank, texture, count, debuffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HARMFUL")
|
||||||
|
isMine = unitCaster == "player"
|
||||||
end
|
end
|
||||||
|
|
||||||
return unpack(result)
|
return unpack(result)
|
||||||
|
@ -990,10 +990,12 @@ function IceTargetInfo.prototype:UpdateBuffs()
|
|||||||
|
|
||||||
|
|
||||||
for i = 1, IceCore.BuffLimit do
|
for i = 1, IceCore.BuffLimit do
|
||||||
local buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft, isFromMe;
|
local buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft, isFromMe, unitCaster;
|
||||||
if IceHUD.WowVer >= 30000 then
|
if IceHUD.WowVer >= 30000 then
|
||||||
buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft, isFromMe
|
buffName, buffRank, buffTexture, buffApplications, buffType, buffDuration, buffTimeLeft, unitCaster
|
||||||
= UnitAura(self.unit, i, "HELPFUL" .. (filter and "|PLAYER" or "")) --UnitBuff(self.unit, i, filter and not hostile)
|
= UnitAura(self.unit, i, "HELPFUL" .. (filter and "|PLAYER" or "")) --UnitBuff(self.unit, i, filter and not hostile)
|
||||||
|
|
||||||
|
isFromMe = (unitCaster == "player")
|
||||||
else
|
else
|
||||||
buffName, buffRank, buffTexture, buffApplications, buffDuration, buffTimeLeft
|
buffName, buffRank, buffTexture, buffApplications, buffDuration, buffTimeLeft
|
||||||
= UnitBuff(self.unit, i, filter and not hostile)
|
= UnitBuff(self.unit, i, filter and not hostile)
|
||||||
@ -1044,7 +1046,9 @@ function IceTargetInfo.prototype:UpdateBuffs()
|
|||||||
|
|
||||||
for i = 1, IceCore.BuffLimit do
|
for i = 1, IceCore.BuffLimit do
|
||||||
local buffName, buffRank, buffTexture, buffApplications, debuffDispelType,
|
local buffName, buffRank, buffTexture, buffApplications, debuffDispelType,
|
||||||
debuffDuration, debuffTimeLeft, isFromMe = UnitAura(self.unit, i, "HARMFUL" .. (filter and "|PLAYER" or "")) --UnitDebuff(self.unit, i, filter and not hostile)
|
debuffDuration, debuffTimeLeft, unitCaster = UnitAura(self.unit, i, "HARMFUL" .. (filter and "|PLAYER" or "")) --UnitDebuff(self.unit, i, filter and not hostile)
|
||||||
|
|
||||||
|
local isFromMe = (unitCaster == "player")
|
||||||
|
|
||||||
if (buffTexture and (not hostile or not filter or (filter and debuffDuration))) then
|
if (buffTexture and (not hostile or not filter or (filter and debuffDuration))) then
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user