You know the realms your characters are on, couldn't you run a nameplate scan for characters on the same realm(s) and compare those, storing the results?
Lua Code:
SLASH_AAAAA1 = "/aa"
SlashCmdList["AAAAA"] = function(msg)
for i=1, 40 do
local name, realm = UnitName("NamePlate"..i)
if realm then
local realmRelationship = UnitRealmRelationship("NamePlate"..i)
print(name, realm, realmRelationship)
end
end
end
Something a bit more elegant <cough> and automated could be put together and build your db over time/characters I'm sure.
Edit: Too much time on my hands.
Lua Code:
local f = CreateFrame("Frame", "FizzleNamePlateInspector", UIParent)
f:RegisterEvent("UNIT_NAME_UPDATE")
f:RegisterEvent("NAME_PLATE_UNIT_ADDED")
f:SetScript("OnEvent", function(self, event, ...)
local arg1 = ...
local name, realm = UnitName(arg1)
if realm then
local realmRelationship = UnitRealmRelationship(arg1)
print(name, realm, realmRelationship)
end
end)