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.
Sint32mnShopSelectRepair (Sint32 unitId)Lets the player choose items to repair on the sell counter's grid, which serves repairs too by shop->action.
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 for the smith's three hammer blows, 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 mnShopSelectSell().

Definition at line 5 of file shop_repair.c.

mnShopRunRepairMemberChoice

Sint32 mnShopRunRepairMemberChoice(void)

Runs the repair counter's party member choice. Called by mnShopRun for Repair.

References mnShopChooseMember() and Sint32.

Referenced by mnShopRun().

Definition at line 16 of file shop_repair.c.

mnShopSelectRepair

Sint32 mnShopSelectRepair(Sint32 unitId)

Lets the player choose items to repair on the sell counter's grid, which serves repairs too by shop->action.

References mnShopSelectSell() and Sint32.

Referenced by mnShopChooseMember().

Definition at line 23 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 for the smith's three hammer blows, gives it back mended, charges the price and offers to equip it.

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

Referenced by mnShopSelectSell().

Definition at line 32 of file shop_repair.c.