Originally Posted by justinbarrett
ty both, my question is where did you find these functions....I am a bit ignorant in that department, and yes Circonian, that was exactly my issue....looking for the gold amount calling the completely wrong function due to ignorance.
and one more question, what is a good event to use for this...I only found one justice event on the wiki...
I'm such a tool, after some research I found this
http://forums.elderscrollsonline.com...og-live#latest
I never look there...
|
Ah, I hadn't seen that post. You can view some of the code files here, thats were I got it from. I just looked through the code for calls to GetBounty() then read the code to see what it does:
http://esodata.uesp.net/current/index.html
there is this event:
Lua Code:
EVENT_JUSTICE_BOUNTY_PAYOFF_AMOUNT_UPDATED (integer eventCode, integer _oldBounty_, integer _newBounty_)
I got that off of the wiki events page:
http://wiki.esoui.com/Events
But, it says the parameters are eventCode, oldBounty, & newBounty.
The keywords are bounty. Remember the payoff amount is not the bounty. But when that event fires it the game calls:
Lua Code:
function ZO_BountyDisplay:OnBountyUpdated()
if IsJusticeEnabled() then
ZO_CurrencyControl_SetSimpleCurrency(self.control, CURRENCY_TYPE_MONEY, GetFullBountyPayoffAmount(), self.currencyOptions, CURRENCY_SHOW_ALL, self.playerOwesGold)
end
end
Which is when/where they update the gold label payoffAmount you see on the screen, so if you update yours when that even fires it will work just fine. Just don't forget. Don't use those oldBounty, newBounty parameters, you'll have to call: GetFullBountyPayoffAmount()