PDA

View Full Version : Adding rogue combo points to MonitorStats


ahotasu
11-25-2004, 12:55 AM
Since I can't log on to test this, I thought I'd come here and ask if you think this would work.

I want to add a rogue's combo points to Monitor stats so here's a dirty hack I've put together. I'd like to know if you think it will work or not.

I copy/pasted this information from the RogueHelper addon into the MonitorStats addon .lua file

the ROGUEHELPER_MAX_COMBO_POINTS constant, and these 2 functions:
function RogueHelper_GetComboPointsMax()
return ROGUEHELPER_MAX_COMBO_POINTS;
end

function RogueHelper_GetComboPointsText()
local text = "";
text = GetComboPoints().."/"..RogueHelper_GetComboPointsMax();
return text;
end


I then edited the show mana stats portion of MonitorStats like this:
manaPct = (UnitMana(unitName) * 100.0) / UnitManaMax(unitName);
manaColor = MonitorStatus_GetManaColor(manaPct);

--hacked by ahotasu for rogue combo points
if(MonitorStatus_ShowPercent == 1) then
manaPct = string.format("%4.0f", manaPct).." "..RogueHelper_GetComboPointsText();
else
manaPct = string.format("%d/%d", UnitMana(unitName), UnitManaMax(unitName)).." "..RogueHelper_GetComboPointsText();
--end of hack addition
end
manaText:SetText(manaPct);
manaText:SetTextColor(manaColor.r, manaColor.g, manaColor.b);


Will this work; basically my idea is just to concatenate the X/5 variable to the mana part of MonitorStats. I'm not too worried about separating the color yet; just want to see if this will work.
so questions:
Is that the correct way to concatenate strings? will that work?
Is it going to bug out when it tries to load a target or party member's combo points or will it either show my combo point stats on each member's stats or will it work properly and not display except for me?

Thanks for the help.

sarf
11-27-2004, 01:53 AM
The code looks as if it should work.

Sarf
---
CChheecckk yyoouurr dduupplleexx sswwiittcchh..

maverickk
12-03-2004, 04:06 PM
so what does it do tell you how maney combo points you have..why would you need that i don't think its a big deal....