GetItemRepairCost
function · ui · primitive
- Address
0x4faf30· 145 bytes, up to0x4fafc0- Signature
int32_t __thiscall (void *this)- Meaning
- Returns an item's repair cost scaled by one minus the open merchant's discount
- Confidence
- verified, proof one
- Finding
- ui/tooltipitemfoot#results-of-the-item-methods
- Test
ui::glue_4faf30_one_minus_and_count_scale
Finding: Results of the item methods in ui: Item description, creator and sell price lines
SetBagItem(bag, slot) returns two values: 1 or nil by the builder's return value (a lock line, a timed
enchantment, a duration or a cooldown), and the item's repair cost. SetInventoryItem(unit, slot) returns
three: 1 when the slot has an item, else nil; 1 or nil by the builder's return value; and the repair cost.
A slot with no item object, such as another player's, returns nil and 0 for the last two. The ammo slot
returns two values: 1 or nil, and nil. The repair cost is the item's repair cost scaled by one minus the
open merchant's discount, a number even when 0.
The derivation is in the doc.
Callers 8
- ClickInventorySlot ui
- UseInventorySlot ui
- Script::PickupContainerItem ui
- Script::UseContainerItem ui
- Script::GetRepairAllCost ui
- Script::RepairAllItems ui
- GameTooltip::SetInventoryItem ui
- GameTooltip::SetBagItem ui
Callees 4
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- CGItem_C::GetRepairCost objectlayer
- CGUnit_C::GetMerchantDiscount objectlayer
Calls and jumps by a bare address, from tables/calls.tsv.