mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- replaced libhealcomm-3 support with libhealcomm-4 support
This commit is contained in:
2
.pkgmeta
2
.pkgmeta
@ -21,4 +21,4 @@ optional-dependencies:
|
|||||||
- libdogtag-3-0
|
- libdogtag-3-0
|
||||||
- libdogtag-unit-3-0
|
- libdogtag-unit-3-0
|
||||||
- librangecheck-2-0
|
- librangecheck-2-0
|
||||||
- libhealcomm-3-0
|
- libhealcomm-4-0
|
@ -5,7 +5,7 @@
|
|||||||
## Notes: Another HUD addon
|
## Notes: Another HUD addon
|
||||||
## Version: @project-version@ (Revision: @project-revision@)
|
## Version: @project-version@ (Revision: @project-revision@)
|
||||||
## SavedVariables: IceCoreDB
|
## SavedVariables: IceCoreDB
|
||||||
## OptionalDeps: Ace2, LibSharedMedia-3.0, Waterfall-1.0, Deformat, DewdropLib, LibDogTag-3.0, LibDogTag-Unit-3.0, FuBarPlugin-2.0, LibDruidMana-1.0, LibRangeCheck-2.0, LibHealComm-3.0
|
## OptionalDeps: Ace2, LibSharedMedia-3.0, Waterfall-1.0, Deformat, DewdropLib, LibDogTag-3.0, LibDogTag-Unit-3.0, FuBarPlugin-2.0, LibDruidMana-1.0, LibRangeCheck-2.0, LibHealComm-4.0
|
||||||
## X-Category: HUDs
|
## X-Category: HUDs
|
||||||
## X-Website: http://www.wowace.com/projects/ice-hud/
|
## X-Website: http://www.wowace.com/projects/ice-hud/
|
||||||
|
|
||||||
|
@ -81,11 +81,13 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
|
||||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||||
|
|
||||||
if AceLibrary:HasInstance("LibHealComm-3.0") then
|
if AceLibrary:HasInstance("LibHealComm-4.0") then
|
||||||
HealComm = AceLibrary("LibHealComm-3.0")
|
HealComm = AceLibrary("LibHealComm-4.0")
|
||||||
HealComm.RegisterCallback(self, "HealComm_DirectHealStart", function(event, healerName, healSize, endTime, ...) self:HealComm_DirectHealStart(event, healerName, healSize, endTime, ...) end)
|
HealComm.RegisterCallback(self, "HealComm_HealStarted", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) end)
|
||||||
HealComm.RegisterCallback(self, "HealComm_DirectHealStop", function(event, healerName, healSize, succeeded, ...) self:HealComm_DirectHealStop(event, healerName, healSize, succeeded, ...) end)
|
HealComm.RegisterCallback(self, "HealComm_HealUpdated", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) end)
|
||||||
HealComm.RegisterCallback(self, "HealComm_HealModifierUpdate", function(event, unit, targetName, healModifier) self:HealComm_HealModifierUpdate(event, unit, targetName, healModifier) end)
|
HealComm.RegisterCallback(self, "HealComm_HealDelayed", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) end)
|
||||||
|
HealComm.RegisterCallback(self, "HealComm_HealStopped", function(event, casterGUID, spellID, spellType, interrupted, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, interrupted, ...) end)
|
||||||
|
HealComm.RegisterCallback(self, "HealComm_ModifierChanged", function(event, guid) self:HealComm_ModifierChanged(event, guid) end)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.moduleSettings.hideBlizz) then
|
if (self.moduleSettings.hideBlizz) then
|
||||||
@ -99,19 +101,31 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
--self:Update(self.unit)
|
--self:Update(self.unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:HealComm_DirectHealStart(event, healerName, healSize, endTime, ...)
|
function PlayerHealth.prototype:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...)
|
||||||
incomingHealAmt = healSize
|
local bFoundMe = false
|
||||||
|
for i=1, select("#", ...) do
|
||||||
|
if select(i, ...) == UnitGUID("player") then
|
||||||
|
bFoundMe = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not bFoundMe then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
incomingHealAmt = HealComm:GetHealAmount(UnitGUID("player"), HealComm.ALL_HEALS)
|
||||||
|
if incomingHealAmt == nil then
|
||||||
|
incomingHealAmt = 0
|
||||||
|
end
|
||||||
self:Update()
|
self:Update()
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:HealComm_DirectHealStop(event, healerName, healSize, succeeded, ...)
|
function PlayerHealth.prototype:HealComm_ModifierChanged(event, guid)
|
||||||
incomingHealAmt = 0
|
if guid == UnitGUID("player") then
|
||||||
self:Update()
|
incomingHealAmt = incomingHealAmt * HealComm:GetHealModifier(guid)
|
||||||
end
|
self:Update()
|
||||||
|
end
|
||||||
function PlayerHealth.prototype:HealComm_HealModifierUpdate(event, unit, targetName, healModifier)
|
|
||||||
incomingHealAmt = incomingHealAmt * healModifier
|
|
||||||
self:Update()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user