Function UpdateStockAvailability
| 10315 | function UpdateStockAvailability takes item whichItem returns nothing |
| 10316 | local itemtype iType = GetItemType(whichItem) |
| 10317 | local integer iLevel = GetItemLevel(whichItem) |
| 10318 | |
| 10319 | // Update allowed type/level combinations.
|
| 10320 | if (iType == ITEM_TYPE_PERMANENT) then |
| 10321 | set bj_stockAllowedPermanent[iLevel] = true |
| 10322 | elseif (iType == ITEM_TYPE_CHARGED) then |
| 10323 | set bj_stockAllowedCharged[iLevel] = true |
| 10324 | elseif (iType == ITEM_TYPE_ARTIFACT) then |
| 10325 | set bj_stockAllowedArtifact[iLevel] = true |
| 10326 | else
|
| 10327 | // Not interested in this item type - ignore the item.
|
| 10328 | endif
|
| 10329 | endfunction
|