API:GameData.Player.GetRenownRefundCost
From RoR Wiki
UI Lua API · Career functions
Version: WAR 1.4.8
Returns the price of refunding the player's renown points.
cost = GameData.Player.GetRenownRefundCost()
Arguments
None.
Returns
- cost
number– Refund price in money.
Details
- The value is read from the client's career advance data; the function does no calculation.
- The stock renown training window compares it with
GameData.Player.moneyand shows it withMoneyFrame.FormatMoneyStringbefore offering RefundRenownPoints.
Errors
None.
Example
From ea_interactionwindow/source/interactionrenowntraining.lua:
local respecCost = GameData.Player.GetRenownRefundCost()
...
elseif (respecCost > GameData.Player.money)
then
DialogManager.MakeOneButtonDialog( GetStringFormatFromTable("TrainingStrings", StringTables.Training.TEXT_RESPEC_NOT_ENOUGH_MONEY, { MoneyFrame.FormatMoneyString (respecCost) }),
GetString( StringTables.Default.LABEL_OKAY ), nil )
