From 36aa99508a1d6497df43c2c1971fa5568b5e00f2 Mon Sep 17 00:00:00 2001 From: Tercio Date: Sun, 18 Aug 2013 00:16:15 -0300 Subject: [PATCH] - FIxed issue with Cloud Capture. --- core/control.lua | 11 +++++++++++ core/network.lua | 38 ++++++++++++++++++++++++++++++++------ 2 files changed, 43 insertions(+), 6 deletions(-) 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