Closed BelegCufea closed 1 year ago
What precisely are you trying to get it to look like? Can you provide a screen shot?
Not saying it's not something that can't be accomplished but putting a lot of code in that function may cause performance issues if it fires multiple times on several rep gains at once.
Are you trying to just display it for you, or like spam it to chat for everyone to see?
The code I provided above just use ordinary lua print
function so it's just for the player (like standard Exp messages from Blizz are).
If you want to see it in action you can try it by posting the code from --START
to --END
into Ara_Broker_Reputations.lua
(as I am not sure how to include image, sorry).
As for the performance issues I didn't observed any (yet). I don't know if it can be optimized (as I just copied part of your code a reused it for something it was clearly not designed to do). I thought it can be toggled on/off, so if someone don't want to see it or there are any performance hits, it can be disabled.
But if you don't want to have such functionality in your addon (for whatever reason as it is outside of scope of 'broker'), it is perfectly fine. I still love your addon.
Have a nice day and thanks for your reply.
Apologies, but at the moment, I'm not inclined to add this unless there are more people that are looking for it. You're of course free to update the code on your end.
Essentially, I'm concerned about it adding in lag to the process by firing this code every time rep increases.
No problem at all.
Thanks for considering it.
Hi.
Very nice addon you have here :-)
I would like to have option to print reputation gains in chat. And in nicer way with more info than standard WoW. (BTW I am not a lua programmer neither a native English speaker so I am sorry for any mistakes in either)
I have put some crude code that suits my needs (but I recon, you can print same info as is in broker text/broker tooltip) . I reused
GetBarMainRepInfo
with parameter (GetRepInfo(factionId)
) but it can be easily changed to suit both calls (the one inUpdateBar
->GetRepInfo(barFaction)
) if u choose to implement it. I have put it inCHAT_MSG_COMBAT_FACTION_CHANGE
as I want to see multiple gains if there are any instead of just the header one (andUpdateBar
does not have actual rep gain, just session one as far as I understand it).I have not played with it much, so there may be some edge cases (paragon, max rep ...), but it seems to work just fine for now.
Thank you for your great work.