mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-01-18 19:31:49 +00:00
Fix giving of ammo to default to store amount rather than zero.
This commit is contained in:
parent
2b354a1371
commit
9e7606e669
@ -3339,13 +3339,18 @@ end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
export def createItem(itemNum)#1
|
||||
word pItem
|
||||
if itemNum <= NUM_WEAPONS
|
||||
return createStruct(MOD_GEN_WEAPONS, (itemNum-1)<<1)
|
||||
pItem = createStruct(MOD_GEN_WEAPONS, (itemNum-1)<<1)
|
||||
elsif itemNum <= NUM_WEAPONS+NUM_ARMORS
|
||||
pItem = createStruct(MOD_GEN_ARMORS, (itemNum-NUM_WEAPONS-1)<<1)
|
||||
else
|
||||
pItem = createStruct(MOD_GEN_MISC_ITEMS, (itemNum-NUM_WEAPONS-NUM_ARMORS-1)<<1)
|
||||
if pItem->t_type == TYPE_FANCY_ITEM
|
||||
pItem=>w_count = pItem=>w_storeAmount
|
||||
fin
|
||||
fin
|
||||
if itemNum <= NUM_WEAPONS+NUM_ARMORS
|
||||
return createStruct(MOD_GEN_ARMORS, (itemNum-NUM_WEAPONS-1)<<1)
|
||||
fin
|
||||
return createStruct(MOD_GEN_MISC_ITEMS, (itemNum-NUM_WEAPONS-NUM_ARMORS-1)<<1)
|
||||
return pItem
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -126,9 +126,6 @@ def displayBuyPage(pItemTbl, markupRatio, pageNum, nPages)#1
|
||||
for numOnPage = 0 to PAGE_SIZE-1
|
||||
if !(*pItemNum); break; fin
|
||||
pItem = createItem(*pItemNum)
|
||||
if pItem->t_type == TYPE_FANCY_ITEM
|
||||
pItem=>w_count = pItem=>w_storeAmount
|
||||
fin
|
||||
pageItems[numOnPage] = pItem
|
||||
price = max(1, pItem=>w_price + addRatio(pItem=>w_price, markupRatio))
|
||||
price = max(1, price - addRatio(price, charmRatio))
|
||||
|
Loading…
x
Reference in New Issue
Block a user