MCPcopy Create free account
hub / github.com/diasurgical/devilution / DoRepair

Function DoRepair

Source/items.cpp:2522–2541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2520}
2521
2522void DoRepair(int pnum, int cii)
2523{
2524 PlayerStruct *p;
2525 ItemStruct *pi;
2526
2527 p = &plr[pnum];
2528 PlaySfxLoc(IS_REPAIR, p->WorldX, p->WorldY);
2529
2530 if (cii >= NUM_INVLOC) {
2531 pi = &p->InvList[cii - NUM_INVLOC];
2532 } else {
2533 pi = &p->InvBody[cii];
2534 }
2535
2536 RepairItem(pi, p->_pLevel);
2537 CalcPlrInv(pnum, TRUE);
2538
2539 if (pnum == myplr)
2540 SetCursor_(CURSOR_HAND);
2541}
2542
2543void RepairItem(ItemStruct *i, int lvl)
2544{

Callers 1

TryIconCursFunction · 0.85

Calls 4

PlaySfxLocFunction · 0.85
RepairItemFunction · 0.85
CalcPlrInvFunction · 0.85
SetCursor_Function · 0.85

Tested by

no test coverage detected