mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
TargetOfTarget.lua : aggro sound will now not be played if target is friendly
This commit is contained in:
@ -386,7 +386,9 @@ function TargetOfTarget.prototype:Update()
|
|||||||
self.frame:Show()
|
self.frame:Show()
|
||||||
|
|
||||||
local lUnitClass, unitClass = UnitClass(self.unit)
|
local lUnitClass, unitClass = UnitClass(self.unit)
|
||||||
|
local friendly = UnitIsFriend("player", "target");
|
||||||
--DEFAULT_CHAT_FRAME:AddMessage(unitClass.." - "..lUnitClass);
|
--DEFAULT_CHAT_FRAME:AddMessage(unitClass.." - "..lUnitClass);
|
||||||
|
|
||||||
local name = UnitName(self.unit)
|
local name = UnitName(self.unit)
|
||||||
local reaction = UnitReaction(self.unit, "player")
|
local reaction = UnitReaction(self.unit, "player")
|
||||||
|
|
||||||
@ -409,7 +411,7 @@ function TargetOfTarget.prototype:Update()
|
|||||||
self.frame.bar:SetMinMaxValues(0, maxHealth)
|
self.frame.bar:SetMinMaxValues(0, maxHealth)
|
||||||
self.frame.bar:SetValue(health)
|
self.frame.bar:SetValue(health)
|
||||||
|
|
||||||
if (self.moduleSettings.aggro) and ((not self.lastTarget) or (self.lastTarget ~= UnitName("target"))) then
|
if (self.moduleSettings.aggro) and (not friendly) and ((not self.lastTarget) or (self.lastTarget ~= UnitName("target"))) then
|
||||||
if (name == UnitName("player")) then
|
if (name == UnitName("player")) then
|
||||||
if (self.moduleSettings.otherSound) then
|
if (self.moduleSettings.otherSound) then
|
||||||
PlaySoundFile("Sound\\Doodad\\BellTollAlliance.wav");
|
PlaySoundFile("Sound\\Doodad\\BellTollAlliance.wav");
|
||||||
|
Reference in New Issue
Block a user