View Single Post
09-21-15, 03:16 AM   #1
Gryns
A Deviate Faerie Dragon
 
Gryns's Avatar
Join Date: Sep 2015
Posts: 11
Getting rid of realm suffixes

I have been trying to find a solution to something that has been bothering me for a while now. The realm names that you see behind a person's name have been bothering me to no end. i.e. Gryns-Aggrammar. They feel like clutter, and it has been my undying mission to get rid of them everywhere.

With the help of a wide variety of addons and scripts I have removed them from chat, raid frames, and now, thanks to TipTac -tooltips. And even though TipTac removes them from player tooltips, it leaves the realm names in a few other tooltips. Amongst which; in the tooltip for pets and companions (Gryns-Aggramar's Pet/Companion/Minion), and as a loot/dead body tooltip in a party/raid (belongs to Gryns-Aggramar).

Now I've kludged together a solution for the pet/companion tooltips (through hours of experimentation, because I know nothing about LUA code. But I can't find a solution for the loot/dead body tooltip.

Here are the parts of the code that I ruined so it serves my own purpose;

" -- Find NPC Title -- 09.08.22: Should now work with colorblind mode
if (first) and (not u.isPlayer) then
u.title = (isColorBlind and GameTooltipTextLeft3 or GameTooltipTextLeft2):GetText();
if (u.title) and (u.title:find(TT_LevelMatch)) or (u.title:find("-")) then
u.title = nil; "

This is for the pets, it changes the owner line to a class and level line, not ideal, but at least the damn realm name is gone.

" -- BattlePets
elseif (isPetWild or isPetCompanion) then
lineOne[#lineOne + 1] = reaction;
lineOne[#lineOne + 1] = name;
lineInfo[#lineInfo + 1] = " ";
lineInfo[#lineInfo + 1] = cfg.colRace;
local petType = UnitBattlePetType(unit) or 5;
lineInfo[#lineInfo + 1] = name;
if (isPetWild) then
lineInfo[#lineInfo + 1] = " ";
lineInfo[#lineInfo + 1] = UnitCreatureFamily(unit) or UnitCreatureType(unit);
else
if not (petLevelLineIndex) then
for i = 2, gtt:NumLines() do
local gttLineText = _G["GameTooltipTextLeft"..i]:GetText();
if (type(gttLineText) == "string") and (gttLineText:find("-")) then
petLevelLineIndex = i;
break;
end
end
end
lineInfoIndex = petLevelLineIndex or 2;
local expectedLine = 3 + (isColorBlind and 1 or 0);
if (lineInfoIndex > expectedLine) then
GameTooltipTextLeft2:SetFormattedText("%s%s",reaction,u.title);
end
end "

This is for companions and battle pets, again not ideal, because this changes the owner line to the level and name of the pet, and only works if the pet does not have a custom name. But at least the damn realm name is gone.

I was wondering if anyone could help me out with the code, I would like to remove the realm suffix from the pets and companions tooltips and the loot/dead body tooltip.

I don't mind just the player's name, I would just like to get the realm-suffix removed. If that's not possible, then lets remove the whole bloody line.

Thanks in advance,

Gryns.

PS.
There are also a few places where the suffixes still are but if they are possible to remove as well, then by all means, let's get them too. These are the current target floating name, and in chat whispers. These still contain the realm suffixes for some reason.
__________________
-- Live like a King, laugh like his Jester. --
  Reply With Quote