general round of code cleanup and making it more robust

This commit is contained in:
Tercio Jose
2022-12-25 14:43:36 -03:00
parent 7d5d80073b
commit 6dd148c438
9 changed files with 664 additions and 608 deletions
+6 -3
View File
@@ -2,6 +2,7 @@
local _detalhes = _G._detalhes
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
local addonName, Details222 = ...
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1124,15 +1125,17 @@ end
return true
elseif (IsInRaid()) then
local unitIdCache = Details222.UnitIdCache.Raid
for i = 1, GetNumGroupMembers(), 1 do
if (UnitAffectingCombat("raid"..i)) then
if (UnitAffectingCombat(unitIdCache[i])) then
return true
end
end
elseif (IsInGroup()) then
local unitIdCache = Details222.UnitIdCache.Party
for i = 1, GetNumGroupMembers()-1, 1 do
if (UnitAffectingCombat("party"..i)) then
if (UnitAffectingCombat(unitIdCache[i])) then
return true
end
end
@@ -1150,7 +1153,7 @@ end
end
end
_detalhes:SairDoCombate()
Details:SairDoCombate()
end
function _detalhes:FindGUIDFromName (name)