-
Posted by Myrroddin on Wed, 17 Nov 2010 21:46:14
I was having a read through this, and found an interesting API, Get DenominationsFromCopper() which doesn't seem to be documented. Can anyone shed some light on this please?
The relevant code is thus:
function GuildBankFrame_UpdateMoneyLog() local numTransactions = GetNumGuildBankMoneyTransactions(); local type, name, amount, year, month, day, hour; local msg; local money; GuildBankMessageFrame:Clear(); for i=1, numTransactions, 1 do type, name, amount, year, month, day, hour = GetGuildBankMoneyTransaction(i); if ( not name ) then name = UNKNOWN; end name = NORMAL_FONT_COLOR_CODE..name..FONT_COLOR_CODE_CLOSE; money = GetDenominationsFromCopper(amount); if ( type == "deposit" ) then msg = format(GUILDBANK_DEPOSIT_MONEY_FORMAT, name, money); elseif ( type == "withdraw" ) then msg = format(GUILDBANK_WITHDRAW_MONEY_FORMAT, name, money); elseif ( type == "repair" ) then msg = format(GUILDBANK_REPAIR_MONEY_FORMAT, name, money); elseif ( type == "withdrawForTab" ) then msg = format(GUILDBANK_WITHDRAWFORTAB_MONEY_FORMAT, name, money); elseif ( type == "buyTab" ) then msg = format(GUILDBANK_BUYTAB_MONEY_FORMAT, name, money); end GuildBankMessageFrame:AddMessage(msg..GUILD_BANK_LOG_TIME_PREPEND..format(GUILD_BANK_LOG_TIME, RecentTimeDate(year, month, day, hour))); end FauxScrollFrame_Update(GuildBankTransactionsScrollFrame, numTransactions, MAX_TRANSACTIONS_SHOWN, GUILDBANK_TRANSACTION_HEIGHT ); end
-
Posted by jnwhiteh on Wed, 17 Nov 2010 22:22:07
That's because it's not an API function. It's a function defined by Blizzard in the FrameXML. It's defined in MoneyFrame.lua:
function GetDenominationsFromCopper(money) return GetCoinText(money, " "); end
The GetCountText function is an API function, and is documented.