mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-21 11:50:49 +00:00
feigndeath: fix nil table index
This commit is contained in:
@@ -11,10 +11,10 @@ pfUI:RegisterModule("feigndeath", function ()
|
|||||||
if event == "PLAYER_TARGET_CHANGED" and UnitIsDead("target") then
|
if event == "PLAYER_TARGET_CHANGED" and UnitIsDead("target") then
|
||||||
healthscan:SetUnit("target")
|
healthscan:SetUnit("target")
|
||||||
cache[UnitName("target")] = healthbar:GetValue()
|
cache[UnitName("target")] = healthbar:GetValue()
|
||||||
elseif event == "UNIT_HEALTH" and UnitIsDead(arg1) then
|
elseif event == "UNIT_HEALTH" and UnitIsDead(arg1) and UnitName(arg1) then
|
||||||
healthscan:SetUnit(arg1)
|
healthscan:SetUnit(arg1)
|
||||||
cache[UnitName(arg1)] = healthbar:GetValue()
|
cache[UnitName(arg1)] = healthbar:GetValue()
|
||||||
elseif event == "UNIT_HEALTH" then
|
elseif event == "UNIT_HEALTH" and UnitName(arg1) then
|
||||||
cache[UnitName(arg1)] = nil
|
cache[UnitName(arg1)] = nil
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user