diff --git a/IceBarElement.lua b/IceBarElement.lua
index 989caf9..7f7a20c 100644
--- a/IceBarElement.lua
+++ b/IceBarElement.lua
@@ -23,8 +23,9 @@ IceBarElement.prototype.CurrScale = 1
function IceBarElement.prototype:init(name)
IceBarElement.super.prototype.init(self, name)
- if AceLibrary:HasInstance("LibDogTag-2.0") then
- DogTag = AceLibrary("LibDogTag-2.0")
+ if AceLibrary:HasInstance("LibDogTag-3.0") then
+ DogTag = AceLibrary("LibDogTag-3.0")
+ AceLibrary("LibDogTag-Unit-3.0")
end
end
@@ -41,6 +42,14 @@ function IceBarElement.prototype:Enable()
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckCombat")
self:RegisterEvent("PLAYER_TARGET_CHANGED", "TargetChanged")
+ if self.moduleSettings.myTagVersion < IceHUD.CurrTagVersion then
+ local origDefaults = self:GetDefaultSettings()
+
+ self.moduleSettings.upperText = origDefaults["upperText"]
+ self.moduleSettings.lowerText = origDefaults["lowerText"]
+ self.moduleSettings.myTagVersion = IceHUD.CurrTagVersion
+ end
+
self:RegisterFontStrings()
end
@@ -48,10 +57,10 @@ end
function IceBarElement.prototype:RegisterFontStrings()
if DogTag ~= nil then
if self.frame.bottomUpperText and self.moduleSettings.upperText then
- DogTag:AddFontString(self.frame.bottomUpperText, self.frame, self.unit, self.moduleSettings.upperText)
+ DogTag:AddFontString(self.frame.bottomUpperText, self.frame, self.moduleSettings.upperText, "Unit", { unit = self.unit })
end
if self.frame.bottomLowerText and self.moduleSettings.lowerText then
- DogTag:AddFontString(self.frame.bottomLowerText, self.frame, self.unit, self.moduleSettings.lowerText)
+ DogTag:AddFontString(self.frame.bottomLowerText, self.frame, self.moduleSettings.lowerText, "Unit", {unit = self.unit })
end
end
end
@@ -75,6 +84,7 @@ function IceBarElement.prototype:GetDefaultSettings()
settings["shouldAnimate"] = true
settings["desiredLerpTime"] = 0.2
settings["barVisible"] = {bg = true, bar = true}
+ settings["myTagVersion"] = 2
return settings
end
@@ -327,7 +337,7 @@ function IceBarElement.prototype:GetOptions()
end,
set = function(v)
if DogTag ~= nil and v ~= '' and v ~= nil then
- v = DogTag:FixCodeStyle(v)
+ v = DogTag:CleanCode(v)
end
self.moduleSettings.upperText = v
@@ -349,7 +359,7 @@ function IceBarElement.prototype:GetOptions()
end,
set = function(v)
if DogTag ~= nil and v ~= '' and v ~= nil then
- v = DogTag:FixCodeStyle(v)
+ v = DogTag:CleanCode(v)
end
self.moduleSettings.lowerText = v
diff --git a/IceHUD.lua b/IceHUD.lua
index de4ed40..3c1ecdb 100644
--- a/IceHUD.lua
+++ b/IceHUD.lua
@@ -3,6 +3,8 @@ IceHUD = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceDebug-2.0")
local waterfall = AceLibrary("Waterfall-1.0")
local SML = AceLibrary("LibSharedMedia-2.0")
+IceHUD.CurrTagVersion = 3
+
IceHUD.Location = "Interface\\AddOns\\IceHUD"
IceHUD.options =
{
diff --git a/IceHUD.toc b/IceHUD.toc
index b558bb0..f82c905 100644
--- a/IceHUD.toc
+++ b/IceHUD.toc
@@ -5,8 +5,8 @@
## Notes: Another HUD addon
## Version: 1.2 ($Revision$)
## SavedVariables: IceCoreDB
-## OptionalDeps: Ace2, GratuityLib, LibSharedMedia-2.0, WaterfallLib, Deformat-2.0, LibDogTag-2.0
-## X-Embeds: Ace2, GratuityLib, LibSharedMedia-2.0, WaterfallLib, Deformat-2.0, LibDogTag-2.0, LibMobHealth-4.0
+## OptionalDeps: Ace2, GratuityLib, LibSharedMedia-2.0, WaterfallLib, Deformat-2.0, LibDogTag-3.0
+## X-Embeds: Ace2, GratuityLib, LibSharedMedia-2.0, WaterfallLib, Deformat-2.0, LibDogTag-3.0, LibDogTag-Unit-3.0, LibMobHealth-4.0
## X-Category: UnitFrame
## X-Date: $Date$
## X-Website: http://www.wowace.com/forums/index.php/topic,1705.0.html
diff --git a/embeds.xml b/embeds.xml
index ae42f13..049af4f 100644
--- a/embeds.xml
+++ b/embeds.xml
@@ -10,7 +10,8 @@
-
+
+
diff --git a/modules/PetHealth.lua b/modules/PetHealth.lua
index 665d9a9..4931965 100644
--- a/modules/PetHealth.lua
+++ b/modules/PetHealth.lua
@@ -111,7 +111,7 @@ function PetHealth.prototype:Update(unit)
self:UpdateBar(self.health/self.maxHealth, color)
- if not AceLibrary:HasInstance("LibDogTag-2.0") then
+ if not AceLibrary:HasInstance("LibDogTag-3.0") then
self:SetBottomText1(math.floor(self.healthPercentage * 100))
end
end
diff --git a/modules/PetMana.lua b/modules/PetMana.lua
index d94647f..be7bba8 100644
--- a/modules/PetMana.lua
+++ b/modules/PetMana.lua
@@ -122,7 +122,7 @@ function PetMana.prototype:Update(unit)
self:UpdateBar(self.mana/self.maxMana, color)
- if not AceLibrary:HasInstance("LibDogTag-2.0") then
+ if not AceLibrary:HasInstance("LibDogTag-3.0") then
self:SetBottomText1(math.floor(self.manaPercentage * 100))
end
end
diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua
index c513a83..a3b7b8a 100644
--- a/modules/PlayerHealth.lua
+++ b/modules/PlayerHealth.lua
@@ -687,7 +687,7 @@ function PlayerHealth.prototype:Update(unit)
self:UpdateBar(self.health/self.maxHealth, color)
- if not AceLibrary:HasInstance("LibDogTag-2.0") then
+ if not AceLibrary:HasInstance("LibDogTag-3.0") then
self:SetBottomText1(math.floor(self.healthPercentage * 100))
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), textColor)
end
diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua
index 24dab8c..250da5a 100644
--- a/modules/PlayerMana.lua
+++ b/modules/PlayerMana.lua
@@ -185,7 +185,7 @@ function PlayerMana.prototype:Update(unit)
self.tickerFrame:SetStatusBarColor(self:GetColor("PlayerEnergy", self.moduleSettings.tickerAlpha))
end
- if not AceLibrary:HasInstance("LibDogTag-2.0") then
+ if not AceLibrary:HasInstance("LibDogTag-3.0") then
-- extra hack for whiny rogues (are there other kind?)
local displayPercentage = self.manaPercentage
if (self.manaType == 3) then
diff --git a/modules/TargetHealth.lua b/modules/TargetHealth.lua
index c8096d2..c2f7944 100644
--- a/modules/TargetHealth.lua
+++ b/modules/TargetHealth.lua
@@ -27,7 +27,7 @@ function TargetHealth.prototype:GetDefaultSettings()
settings["classColor"] = false
settings["hideBlizz"] = true
settings["upperText"] = "[PercentHP:Round]"
- settings["lowerText"] = "[Text([CurHP:Round]/[MaxHP:Round]):HPColor:Bracket]"
+ settings["lowerText"] = "[(HP:Round \"/\" MaxHP:Round):HPColor:Bracket]"
settings["raidIconOnTop"] = true
settings["showRaidIcon"] = true
settings["raidIconXOffset"] = 12
@@ -291,7 +291,7 @@ function TargetHealth.prototype:Update(unit)
self:UpdateBar(self.health/self.maxHealth, self.color)
- if not AceLibrary:HasInstance("LibDogTag-2.0") then
+ if not AceLibrary:HasInstance("LibDogTag-3.0") then
self:SetBottomText1(math.floor(self.healthPercentage * 100))
-- first see if we have LibMobHealth that we can piggyback on
diff --git a/modules/TargetInfo.lua b/modules/TargetInfo.lua
index eb58b76..b135e88 100644
--- a/modules/TargetInfo.lua
+++ b/modules/TargetInfo.lua
@@ -33,8 +33,9 @@ function TargetInfo.prototype:init()
self.scalingEnabled = true
- if AceLibrary:HasInstance("LibDogTag-2.0") then
- DogTag = AceLibrary("LibDogTag-2.0")
+ if AceLibrary:HasInstance("LibDogTag-3.0") then
+ DogTag = AceLibrary("LibDogTag-3.0")
+ AceLibrary("LibDogTag-Unit-3.0")
end
end
@@ -60,6 +61,15 @@ function TargetInfo.prototype:Enable(core)
RegisterUnitWatch(self.frame)
+ if self.moduleSettings.myTagVersion < IceHUD.CurrTagVersion then
+ local origDefaults = self:GetDefaultSettings()
+
+ self.moduleSettings.line1tag = origDefaults["line1tag"]
+ self.moduleSettings.line2tag = origDefaults["line2tag"]
+ self.moduleSettings.line3tag = origDefaults["line3tag"]
+ self.moduleSettings.myTagVersion = IceHUD.CurrTagVersion
+ end
+
self:RegisterFontStrings()
end
@@ -259,7 +269,7 @@ function TargetInfo.prototype:GetOptions()
return self.moduleSettings.line1Tag
end,
set = function(v)
- v = DogTag:FixCodeStyle(v)
+ v = DogTag:CleanCode(v)
self.moduleSettings.line1Tag = v
self:RegisterFontStrings()
self:Redraw()
@@ -279,7 +289,7 @@ function TargetInfo.prototype:GetOptions()
return self.moduleSettings.line2Tag
end,
set = function(v)
- v = DogTag:FixCodeStyle(v)
+ v = DogTag:CleanCode(v)
self.moduleSettings.line2Tag = v
self:RegisterFontStrings()
self:Redraw()
@@ -299,7 +309,7 @@ function TargetInfo.prototype:GetOptions()
return self.moduleSettings.line3Tag
end,
set = function(v)
- v = DogTag:FixCodeStyle(v)
+ v = DogTag:CleanCode(v)
self.moduleSettings.line3Tag = v
self:RegisterFontStrings()
self:Redraw()
@@ -328,9 +338,10 @@ function TargetInfo.prototype:GetDefaultSettings()
defaults["mouseBuff"] = true
defaults["filter"] = "Never"
defaults["perRow"] = 10
- defaults["line1Tag"] = "[NameHostile]"
- defaults["line2Tag"] = "[Level:DifficultyColor] [ [IsPlayer ? Race ! CreatureType]:ClassColor] [ [IsPlayer ? Class]:ClassColor] [ [~PvP ? Text(PvE) ! Text(PvP)]:HostileColor] [Leader:Yellow] [InCombat:Red] [Classification]"
+ defaults["line1Tag"] = "[Name:HostileColor]"
+ defaults["line2Tag"] = "[Level:DifficultyColor] [[IsPlayer ? Race ! CreatureType]:ClassColor] [[IsPlayer ? Class]:ClassColor] [[~PvP ? \"PvE\" ! \"PvP\"]:HostileColor] [IsLeader ? \"Leader\":Yellow] [InCombat:Red] [Classification]"
defaults["line3Tag"] = "[Guild:Angle]"
+ defaults["myTagVersion"] = 2
return defaults
end
@@ -340,21 +351,21 @@ function TargetInfo.prototype:RegisterFontStrings()
if DogTag ~= nil then
if self.frame.targetName then
if self.moduleSettings.line1Tag ~= '' then
- DogTag:AddFontString(self.frame.targetName, self.frame, target, self.moduleSettings.line1Tag)
+ DogTag:AddFontString(self.frame.targetName, self.frame, self.moduleSettings.line1Tag, "Unit", { unit = target })
else
DogTag:RemoveFontString(self.frame.targetName)
end
end
if self.frame.targetInfo then
if self.moduleSettings.line2Tag ~= '' then
- DogTag:AddFontString(self.frame.targetInfo, self.frame, target, self.moduleSettings.line2Tag)
+ DogTag:AddFontString(self.frame.targetInfo, self.frame, self.moduleSettings.line2Tag, "Unit", { unit = target })
else
DogTag:RemoveFontString(self.frame.targetInfo)
end
end
if self.frame.targetGuild then
if self.moduleSettings.line3Tag ~= '' then
- DogTag:AddFontString(self.frame.targetGuild, self.frame, target, self.moduleSettings.line3Tag)
+ DogTag:AddFontString(self.frame.targetGuild, self.frame, self.moduleSettings.line3Tag, "Unit", { unit = target })
else
DogTag:RemoveFontString(self.frame.targetGuild)
end
diff --git a/modules/TargetMana.lua b/modules/TargetMana.lua
index 7320aaf..75b923e 100644
--- a/modules/TargetMana.lua
+++ b/modules/TargetMana.lua
@@ -79,7 +79,7 @@ function TargetMana.prototype:Update(unit)
self:UpdateBar(self.mana/self.maxMana, color)
- if not AceLibrary:HasInstance("LibDogTag-2.0") then
+ if not AceLibrary:HasInstance("LibDogTag-3.0") then
self:SetBottomText1(math.floor(self.manaPercentage * 100))
self:SetBottomText2(self:GetFormattedText(self.mana, self.maxMana), color)
end