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

Function CalcItemValue

Source/items.cpp:1093–1109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1091}
1092
1093void CalcItemValue(int i)
1094{
1095 int v;
1096
1097 v = item[i]._iVMult1 + item[i]._iVMult2;
1098 if (v > 0) {
1099 v *= item[i]._ivalue;
1100 }
1101 if (v < 0) {
1102 v = item[i]._ivalue / v;
1103 }
1104 v = item[i]._iVAdd1 + item[i]._iVAdd2 + v;
1105 if (v <= 0) {
1106 v = 1;
1107 }
1108 item[i]._iIvalue = v;
1109}
1110
1111void GetBookSpell(int i, int lvl)
1112{

Callers 2

GetStaffPowerFunction · 0.85
GetItemPowerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected