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

Function AddStoreHoldRepair

Source/stores.cpp:751–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749}
750
751void AddStoreHoldRepair(ItemStruct *itm, int i)
752{
753 ItemStruct *item;
754 int v;
755
756 item = &storehold[storenumh];
757 storehold[storenumh] = *itm;
758 if (item->_iMagical != ITEM_QUALITY_NORMAL && item->_iIdentified)
759 item->_ivalue = 30 * item->_iIvalue / 100;
760 v = item->_ivalue * (100 * (item->_iMaxDur - item->_iDurability) / item->_iMaxDur) / 100;
761 if (!v) {
762 if (item->_iMagical != ITEM_QUALITY_NORMAL && item->_iIdentified)
763 return;
764 v = 1;
765 }
766 if (v > 1)
767 v >>= 1;
768 item->_iIvalue = v;
769 item->_ivalue = v;
770 storehidx[storenumh] = i;
771 storenumh++;
772}
773
774void S_StartWitch()
775{

Callers 1

S_StartSRepairFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected