diff --git a/core/control.lua b/core/control.lua index a51a28eb..343a6a73 100644 --- a/core/control.lua +++ b/core/control.lua @@ -203,7 +203,18 @@ if (_detalhes:IsInInstance() or _detalhes.debug) then if (not _detalhes:CaptureIsAllEnabled()) then _detalhes:SendCloudRequest() + if (_detalhes.debug) then + _detalhes:Msg ("Details: CloudRequest()") + end end + else + if (_detalhes.debug) then + _detalhes:Msg ("Details: instance", _detalhes:IsInInstance()) + end + end + else + if (_detalhes.debug) then + _detalhes:Msg ("Details: group and cloud", _detalhes.in_group, _detalhes.cloud_capture) end end diff --git a/core/network.lua b/core/network.lua index 3db76b77..c88a4c16 100644 --- a/core/network.lua +++ b/core/network.lua @@ -63,16 +63,39 @@ if (not actor) then if (IsInRaid()) then for i = 1, GetNumGroupMembers() do - if (UnitName ("raid"..i) == name) then - actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x00000417, true) - break + if (name:find ("-")) then --> other realm + local nname, server = UnitName ("raid"..i) + if (server) then + nname = nname.."-"..server + end + if (nname == name) then + actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x00000417, true) + break + end + else + if (UnitName ("raid"..i) == name) then + actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x00000417, true) + break + end end + end elseif (IsInGroup()) then for i = 1, GetNumGroupMembers()-1 do - if (UnitName ("party"..i) == name or _detalhes.playername == name) then - actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x00000417, true) - break + if (name:find ("-")) then --> other realm + local nname, server = UnitName ("party"..i) + if (server) then + nname = nname.."-"..server + end + if (nname == name) then + actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x00000417, true) + break + end + else + if (UnitName ("party"..i) == name or _detalhes.playername == name) then + actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x00000417, true) + break + end end end end @@ -199,6 +222,9 @@ player = player .."-"..realm end _detalhes.host_of = player + if (_detalhes.debug) then + _detalhes:Msg ("Details: CloudRequest()") + end _detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("foundcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "WHISPER", player) end