Forum > Serverside Modding

[QUESTION] Re-positioning Strings

<< < (2/2)

Vortalex:

--- Quote from: "schlumpf" ---Assembling the tooltips is hardcoded iirc.
--- End quote ---

Figures. Any tips on how I would go about making the changes I want?

schlumpf:
You'd need to find the function, then find where the different parts of it are added, possibly needing to move quite a lot of assembly. Without experience in reverse engineering and assembly, this'd most possibly not feasible.

stoneharry:

--- Quote from: "schlumpf" ---You'd need to find the function, then find where the different parts of it are added, possibly needing to move quite a lot of assembly. Without experience in reverse engineering and assembly, this'd most possibly not feasible.
--- End quote ---

I've hacked such a system together using Lua/XML. I did it for the talent tooltips such required talent points is hardcoded in the client, so instead I overwrote the display with my own value. :)

I believe it was this function? Code is a mess, was a while ago:

--- Code: ---function PlayerTalentFrameTalent_OnEnter(self)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetTalent(PanelTemplates_GetSelectedTab(PlayerTalentFrame), self:GetID(),
PlayerTalentFrame.inspect, PlayerTalentFrame.pet, PlayerTalentFrame.talentGroup, GetCVarBool("previewTalents"));

local canLearn = nil;
local wrapRest = false;
local l = GameTooltip:NumLines();
if (_G["GameTooltipTextLeft"..l]:GetText() == "Click to learn") then
canLearn = true;
wrapRest = true;
l = l - 1;
end
local tmp = {};
local r = true;
local i = 1;
for c=1, l do
r = true;
local n = {};
local left = _G["GameTooltipTextLeft"..c];
local right = _G["GameTooltipTextRight"..c];
if ( left ) then
n.w = true;
n.r1, n.g1, n.b1 = left:GetTextColor();
local t = left:GetText();
if ( strsub(t, 1, 8) == "Requires" ) then
n.w = wrapRest;
if ( strsub(t, -7) == "Talents" ) then
local d = tonumber(strmatch(t, "%d+")) / 5;
t = gsub(t, "%d+", d);
wrapRest = true;
if ( d <= PlayerTalentFrame.pointsSpent + PlayerTalentFrame.previewPointsSpent ) then
n.r1 = 1.0; n.g1 = 1.0; n.b1 = 1.0;
r = false;
if ( canLearn == nil ) then
canLearn = true;
end
end
elseif ( not wrapRest ) then
canLearn = false;
end
end
n.t1 = t;
end
if ( right ) then
n.r2, n.g2, n.b2 = right:GetTextColor();
n.t2 = right:GetText();
end
if ( r ) then
tmp[i] = n;
i = i + 1;
end
end
i = nil;
GameTooltip:ClearLines();
for i=1, #tmp do
if ( tmp[i].t1 and tmp[i].t2 ) then
GameTooltip:AddDoubleLine(tmp[i].t1, tmp[i].t2, tmp[i].r1, tmp[i].g1, tmp[i].b1, tmp[i].r2, tmp[i].g2, tmp[i].b2);
elseif ( tmp[i].t1 ) then
GameTooltip:AddLine(tmp[i].t1, tmp[i].r1, tmp[i].g1, tmp[i].b1, tmp[i].w);
elseif ( tmp[i].t2 ) then
GameTooltip:AddDoubleLine("", tmp[i].t2, 0, 0, 0, tmp[i].r2, tmp[i].g2, tmp[i].b2);
end
end
if ( canLearn ) then
GameTooltip:AddLine("Click to learn", 0, 1, 0, true);
end
GameTooltip:Show();
end

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version