View Single Post
05-24-14, 11:04 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Ash93 View Post
Also I was wondering if it is possible to make the damage and healing floating combat text rounded to something like 50,000 -> 50k. I know Mik's can do that but I couldn't get it to do it over the enemy player's head.
This is not possible, as the default UI's floating damage/healing text is rendered as part of the game world, not as part of the UI, and addons don't have access to it. If they did, they could use it that access to get information Blizzard doesn't want addons to have, such as calculating the exact position of enemy units based on the position of the text. If you want to change any aspect of the floating damage/healing text other than which font it uses, you have to use an addon to replace the whole system, and you can't have the numbers appear over the relevant units in the game world.

Originally Posted by Ash93 View Post
Was wondering if anyone knew how to make damage text show up on the target portrait like the player portrait.
Not tested, but this should work:
Code:
local text = TargetFrame:CreateFontString(nil, "OVERLAY", "NumberFontNormalHuge")
text:SetPoint("CENTER", TargetFrame, "TOPLEFT", 73, -42)
text:Hide()

CombatFeedback_Initialize(self, text, 30)

local f = CreateFrame("Frame", nil, TargetFrame)
f:RegisterUnitEvent("UNIT_COMBAT", "target")
f:SetScript("OnEvent", function(self, event, unit, ...)
     CombatFeedback_OnCombatEvent(TargetFrame, ...)
end)
f:SetScript("OnUpdate", function(self, elapsed)
     CombatFeedback_OnUpdate(TargetFrame, elapsed)
end)
If you need help turning the above code into an addon, copy and paste it into this page:
http://addon.bool.no/
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote