- elseif event == "UNIT_POWER" then
- updatePower(self, arg1);
- elseif event == "UNIT_AURA" then
- updateAuras(self, arg1);
- elseif event == "UNIT_ABSORB_AMOUNT_CHANGED" then
- updateShield(self, arg1);
- elseif event == "UNIT_HEAL_PREDICTION" then
- updateHealPred(self, arg1);
- elseif event == "UNIT_HEAL_ABSORB_AMOUNT_CHANGED" then
- updateHealAbsorb(self, arg1);
- elseif event == "UNIT_THREAT_SITUATION_UPDATE" then
- updateAggro(self, arg1);
- elseif event == "UNIT_MAXHEALTH" then
- updateMaxHealth(self, arg1);
- elseif event == "UNIT_MAXPOWER" then
- updateMaxPower(self, arg1);
- elseif event == "UNIT_DISPLAYPOWER" then
- updatePowerColor(self, arg1);
- elseif event == "INCOMING_RESURRECT_CHANGED" then
+ end,
+ ["UNIT_POWER"] = function(frame, unit)
+ updatePower(frame, unit);
+ end,
+ ["UNIT_AURA"] = function(frame, unit)
+ updateAuras(frame, unit);
+ end,
+ ["UNIT_HEAL_PREDICTION"] = function(frame, unit)
+ updateHealPred(frame, unit);
+ end,
+ ["UNIT_ABSORB_AMOUNT_CHANGED"] = function(frame, unit)
+ updateShield(frame, unit);
+ end,
+ ["UNIT_HEAL_ABSORB_AMOUNT_CHANGED"] = function(frame, unit)
+ updateHealAbsorb(frame, unit);
+ end,
+ ["UNIT_THREAT_SITUATION_UPDATE"] = function(frame, unit)
+ updateAggro(frame, unit);
+ end,
+ ["UNIT_MAXHEALTH"] = function(frame, unit)
+ updateMaxHealth(frame, unit);
+ end,
+ ["UNIT_MAXPOWER"] = function(frame, unit)
+ updateMaxPower(frame, unit);
+ end,
+ ["UNIT_DISPLAYPOWER"] = function(frame, unit)
+ updatePowerColor(frame, unit);
+ end,
+ ["UNIT_NAME_UPDATE"] = function(frame, unit)
+ updateName(frame, unit);
+ end,
+ ["UNIT_CONNECTION"] = function(frame, unit)
+ updateHealth(frame, unit);
+ end,
+ ["INCOMING_RESURRECT_CHANGED"] = function(frame, unit)