- updated to use UnitGetIncomingHeals instead of LibHealComm when running cataclysm client. doesn't seem to work with HoTs at the moment, so that's something to keep an eye on as the beta progresses

This commit is contained in:
Parnic
2010-09-06 03:05:16 +00:00
parent da6c76a472
commit 0c4814732c

View File

@ -88,13 +88,17 @@ 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-4.0") then if IceHUD.WowVer < 40000 then
HealComm = AceLibrary("LibHealComm-4.0") if AceLibrary:HasInstance("LibHealComm-4.0") then
HealComm.RegisterCallback(self, "HealComm_HealStarted", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) end) HealComm = AceLibrary("LibHealComm-4.0")
HealComm.RegisterCallback(self, "HealComm_HealUpdated", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, 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_HealDelayed", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) 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_HealStopped", function(event, casterGUID, spellID, spellType, interrupted, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, interrupted, ...) 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_ModifierChanged", function(event, guid) self:HealComm_ModifierChanged(event, guid) 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
else
self:RegisterEvent("UNIT_HEAL_PREDICTION", "IncomingHealPrediction")
end end
if (self.moduleSettings.hideBlizz) then if (self.moduleSettings.hideBlizz) then
@ -135,6 +139,17 @@ function PlayerHealth.prototype:HealComm_ModifierChanged(event, guid)
end end
end end
function PlayerHealth.prototype:IncomingHealPrediction(unit)
if IceHUD.WowVer >= 40000 then
if unit and unit ~= self.unit then
return
end
incomingHealAmt = UnitGetIncomingHeals(self.unit)
self:Update()
end
end
-- OVERRIDE -- OVERRIDE
function PlayerHealth.prototype:GetOptions() function PlayerHealth.prototype:GetOptions()