Skip to Content
The Alchemy Project

src/shop/shop_repair.c

Repairing broken items. More…

Included by shop.c.

Functions

NameDescription
Sint32mnShopRepairPrice (Sint32 inventoryEntry)Returns what a repair costs: a quarter of the price for a broken item, nothing for one that is not broken.
Sint32mnShopRunRepairMemberChoice (void)Runs the repair counter's party member choice; always returns 0.
Sint32mnShopSelectRepair (Sint32 unitId)Lets the player choose items to repair from the party member's grid, one at a time, with each one's repair price, until B or the inventory is empty.
voidmnShopRepairItem (Sint32 unitId, Sint32 slot)Repairs the item in slot: refuses one that cannot break, is not broken or is equipped and cursed on, or that the coins do not cover; asks, then takes the item away while three clangs sound, gives it back mended, charges the price and offers to equip it.

Description

Repairing broken items. Part of shop.c.

Functions in detail

mnShopRepairPrice

Sint32 mnShopRepairPrice(Sint32 inventoryEntry)

Returns what a repair costs: a quarter of the price for a broken item, nothing for one that is not broken.

References gmItemGetDefinitionStub() and Sint32.

Referenced by mnShopRepairItem() and mnShopSelectRepair().

Definition at line 7 of file shop_repair.c.

mnShopRunRepairMemberChoice

Sint32 mnShopRunRepairMemberChoice(void)

Runs the repair counter's party member choice; always returns 0.

References mnShopChooseMember() and Sint32.

Referenced by mnShopRun().

Definition at line 19 of file shop_repair.c.

mnShopSelectRepair

Sint32 mnShopSelectRepair(Sint32 unitId)

Lets the player choose items to repair from the party member's grid, one at a time, with each one's repair price, until B or the inventory is empty. Returns -1 when cancelled, 0 when the inventory ran out.

References gmInventoryCountStub(), gmUnitGetStub(), mnCursorPlace(), mnShopDrawItemPrice(), mnShopDrawMessage(), mnShopRepairItem(), mnShopRepairPrice(), mnShopShowKeeperMessage(), mnWindowCloseStub(), mnWindowCreateStub(), PerPush, PerRepeat, Sint32, sySoundPlayStub() and sySynch().

Referenced by mnShopChooseMember().

Definition at line 28 of file shop_repair.c.

mnShopRepairItem

void mnShopRepairItem(Sint32 unitId, Sint32 slot)

Repairs the item in slot: refuses one that cannot break, is not broken or is equipped and cursed on, or that the coins do not cover; asks, then takes the item away while three clangs sound, gives it back mended, charges the price and offers to equip it.

References gmInventoryFindEquippedStub(), gmInventoryRepairStub(), gmItemGetDefinitionStub(), gmPartyAdjustCoinsStub(), gmUnitGetStub(), MainRoutineStateWork, mnMessageArgumentPushStub(), mnMessageCloseFinishedWindowsStub(), mnShopAskYesNo(), mnShopConfirmEquip(), mnShopDrawMemberItems(), mnShopDrawMoney(), mnShopRepairPrice(), mnShopSellOld(), mnShopShowKeeperMessageHidingCursor(), Sint32, sySoundPlayStub() and sySynch().

Referenced by mnShopSelectRepair().

Definition at line 147 of file shop_repair.c.