raisnilt wrote:So i cant use ranged speed either tooltip text. The only idea left is check buffs 1by1 (rapid,improved, berserking, etc.). But that is so bad, and how should i know which one of them changes Aimed_CastTime. Damn It!
That is not bad. Its how it works. If you are concerned about performance you should check the path of the buff icon instead of making a tooltip, setting it to the buff and then checking its name. The icon path are mostly unique (meaning there is no other buff with this icon) and are independent of your clients locale.
I recently made LunaUnitFrames show aimed shots in its castbar and since i like/use your addon i'm happy to help you out. Have this code snippet:
- Code: Select all
local casttime = 3
for i=1,32 do
if UnitBuff("player",i) == "Interface\\Icons\\Ability_Warrior_InnerRage" then
casttime = casttime/1.3
end
if UnitBuff("player",i) == "Interface\\Icons\\Ability_Hunter_RunningShot" then
casttime = casttime/1.4
end
if UnitBuff("player",i) == "Interface\\Icons\\Racial_Troll_Berserk" then
casttime = casttime/ (1 + berserkValue)
end
if UnitBuff("player",i) == "Interface\\Icons\\Inv_Trinket_Naxxramas04" then
casttime = casttime/1.2
end
end
Also you need a handler for UNIT_BUFF that does determine the value of your berserk when you gain the buff:
- Code: Select all
for i=1,16 do
if UnitBuff("player",i) == "Interface\\Icons\\Racial_Troll_Berserk" then
if((UnitHealth("player")/UnitHealthMax("player")) >= 0.40) then
berserkValue = (1.30 - (UnitHealth("player")/UnitHealthMax("player")))/3
else
berserkValue = 0.30
end
end
end
Also i did see you are not using
- Code: Select all
down, up, lag = GetNetStats()
anywhere. I know this server has "internal" lag caused by the hardware of the server but the net lag is always there too.
Author of
LunaUnitFrames - The most advanced unit frames for classic WoW. Visit my
GitHub page for them and some other tools i wrote.
Rhyna - Warrior | Nost PvP | Alliance