mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 21:41:53 -05:00
Re-enabled the "tapped" HostileColor by using the new Legion API
This fixes HostileColor to show gray once again when a unit is tapped by someone else.
This commit is contained in:
@ -10,8 +10,8 @@ local UnitClass, UnitRace, UnitIsPlayer, UnitIsFriend, UnitIsUnit, UnitClassBase
|
||||
UnitClass, UnitRace, UnitIsPlayer, UnitIsFriend, UnitIsUnit, UnitClassBase, UnitName, UnitExists, GetRealmName, UnitLevel
|
||||
local UnitCanAttack, UnitCreatureFamily, UnitCreatureType, UnitClassification, UnitGUID, UnitSex, UnitPlayerControlled, UnitPlayerOrPetInRaid =
|
||||
UnitCanAttack, UnitCreatureFamily, UnitCreatureType, UnitClassification, UnitGUID, UnitSex, UnitPlayerControlled, UnitPlayerOrPetInRaid
|
||||
local GetGuildInfo, UnitIsPVP, UnitIsTapped, UnitIsTappedByPlayer, UnitIsDead, UnitReaction, UnitSelectionColor, UnitPVPName =
|
||||
GetGuildInfo, UnitIsPVP, UnitIsTapped, UnitIsTappedByPlayer, UnitIsDead, UnitReaction, UnitSelectionColor, UnitPVPName
|
||||
local GetGuildInfo, UnitIsPVP, UnitIsTapped, UnitIsTappedByPlayer, UnitIsDead, UnitReaction, UnitSelectionColor, UnitPVPName, UnitIsTapDenied =
|
||||
GetGuildInfo, UnitIsPVP, UnitIsTapped, UnitIsTappedByPlayer, UnitIsDead, UnitReaction, UnitSelectionColor, UnitPVPName, UnitIsTapDenied
|
||||
|
||||
DogTag_Unit_funcs[#DogTag_Unit_funcs+1] = function(DogTag_Unit, DogTag)
|
||||
|
||||
@ -545,7 +545,7 @@ DogTag:AddTag("Unit", "HostileColor", {
|
||||
-- either enemy or friend, no violence
|
||||
r, g, b = unpack(DogTag.__colors.civilian)
|
||||
end
|
||||
elseif (not wow_700 and UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) or UnitIsDead(unit) then
|
||||
elseif (not wow_700 and UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) or (wow_700 and UnitIsTapDenied(unit)) or UnitIsDead(unit) then
|
||||
r, g, b = unpack(DogTag.__colors.tapped)
|
||||
else
|
||||
local reaction = UnitReaction(unit, "player")
|
||||
|
Reference in New Issue
Block a user