SplitCopper
function · unassigned · primitive
- Address
0x6c6260· 59 bytes, up to0x6c629a- Signature
void __fastcall (int32_t copper, int32_t *parts)- Meaning
- Splits an amount into copper, silver and gold, dividing the remainder by 10000 and 100 when it reaches them
- Confidence
- verified, proof one
- Finding
- ui/loot#coin-row-text
- Test
ui::loot_coin_split_difftest
Finding: Coin row text in ui: the loot window
GetLootRowName (0x4c2550) names the coin row while the money is above 0. SplitCopper splits it into
gold, silver and copper, and each part above 0, gold first, becomes %d %s%s of its count, the global
text of its key (GOLD, SILVER or COPPER, from 0x6c6230) cut to 31 bytes, and \n after gold
and silver, nothing after copper. The first part is formatted into the output and each later one
appended with SStrPack, both bounded by the caller's size. SplitCopper(n) divides by 10000, then
by 100, each time the remainder at least the divisor, else that part is 0; copper is what is left.
0x6c6230(i) returns the key COPPER, SILVER or GOLD for 0, 1 or 2, else ERROR_CAPS.
The derivation is in the doc.
Callers 4
- AutoLootAll ui
- GetLootRowName ui
- CGPlayer_C::ReadQuestComplete objectlayer
- ReadLootMoneyNotify objectlayer
Callees 1
- CurrencyMultiplier unassigned
Calls and jumps by a bare address, from tables/calls.tsv.