Compare commits

...

3 Commits

Author SHA1 Message Date
354fb483bb Fix incorrect mana alpha when max mana is 0 2021-03-21 11:18:58 -05:00
f6c737c654 Activate totems for all classes in 9.0+
Some class abilities spawn units that live for a specific amount of time, and the game
handles these as Totems.
2020-12-27 21:28:16 -06:00
9a38c4b3ea Revert file to original 2020-12-05 16:49:07 -06:00
4 changed files with 33 additions and 25 deletions

View File

@ -2,58 +2,54 @@ package-as: IceHUD
externals:
libs/LibStub:
url: https://repos.wowace.com/wow/libstub/trunk
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/LibStub
tag: latest
libs/CallbackHandler-1.0:
url: https://repos.wowace.com/wow/callbackhandler/trunk
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/CallbackHandler-1.0
tag: latest
libs/AceEvent-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceEvent-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
tag: latest
libs/AceTimer-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceTimer-3.0
tag: latest
libs/AceDB-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceDB-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDB-3.0
tag: latest
libs/AceDBOptions-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceDBOptions-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceDBOptions-3.0
tag: latest
libs/AceConfig-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0
tag: latest
libs/AceGUI-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceGUI-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
tag: latest
libs/AceGUI-3.0-SharedMediaWidgets:
url: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk
url: svn://svn.wowace.com/wow/ace-gui-3-0-shared-media-widgets/mainline/trunk/AceGUI-3.0-SharedMediaWidgets
tag: latest
libs/AceAddon-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
tag: latest
libs/AceConsole-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
tag: latest
libs/AceLocale-3.0:
url: https://repos.wowace.com/wow/ace3/trunk/AceLocale-3.0
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
tag: latest
libs/LibRangeCheck-2.0:
url: https://repos.wowace.com/wow/librangecheck-2-0/trunk
url: svn://svn.wowace.com/wow/librangecheck-2-0/mainline/trunk/LibRangeCheck-2.0
libs/LibSharedMedia-3.0:
url: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk
url: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
tag: latest
libs/LibDogTag-3.0:
url: https://repos.wowace.com/wow/libdogtag-3-0
tag: latest
type: git
url: git://git.wowace.com/wow/libdogtag-3-0/mainline.git
libs/LibDogTag-Unit-3.0:
url: https://repos.wowace.com/wow/libdogtag-unit-3-0
tag: latest
type: git
url: git://git.wowace.com/wow/libdogtag-unit-3-0/mainline.git
libs/LibDBIcon-1.0:
url: https://repos.wowace.com/wow/libdbicon-1-0/trunk
url: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0
libs/LibDualSpec-1.0:
url: https://repos.wowace.com/wow/libdualspec-1-0
url: git://git.wowace.com/wow/libdualspec-1-0/mainline.git
optional-dependencies:
- libdogtag-3-0

View File

@ -243,7 +243,14 @@ function IceUnitBar.prototype:Update()
self.mana = IceHUD:MathRound(self.mana / 100)
self.maxMana = IceHUD:MathRound(self.maxMana / 100)
end
self.manaPercentage = self.maxMana ~= 0 and (self.mana/self.maxMana) or 0
-- account for cases where maxMana is 0, perhaps briefly (during certain spells, for example)
-- and properly handle it as full. this allows for proper alpha handling during these times.
if self.maxMana == self.mana then
self.manaPercentage = 1
else
self.manaPercentage = self.maxMana ~= 0 and (self.mana/self.maxMana) or 0
end
local locClass
locClass, self.unitClass = UnitClass(self.unit)

View File

@ -1,5 +1,10 @@
# Changelog
vNext:
- Activated Totems module for all classes in Shadowlands. Some class abilities spawn units that live for a specific amount of time, and the game handles these as Totems.
- Fixed an issue where mana bars could use the wrong alpha settings if the player's maximum mana was 0 (such as during the use of Soulshape).
v1.13.2:
- Fixed which version of LibDogTag was being packaged. The previous version did not have 9.0 compatibility and was generating errors (ticket #293).

View File

@ -245,7 +245,7 @@ function Totems.prototype:UpdateTotem(event, totem, ...)
if not totem or tonumber(totem) ~= totem or totem < 1 or totem > self.numTotems or not GetTotemInfo then
return
end
local thisTotemName = self.totemNames[TOTEM_PRIORITIES[totem]]
local haveTotem, name, startTime, duration, icon = GetTotemInfo(totem);
if duration > 0 then
self.frame.graphical[totem].totem:SetTexture(icon)
@ -422,6 +422,6 @@ end
-- Load us up
local _, unitClass = UnitClass("player")
if (unitClass == "SHAMAN") or (unitClass == "DRUID") then
if IceHUD.WowVer >= 90000 or (unitClass == "SHAMAN") or (unitClass == "DRUID") then
IceHUD.Totems = Totems:new()
end