forked from Mirrors/openclonk
Fix weapons not buyable in Gidl/Guardians (#1611).
Switch2Items() is probably broken but luckily not used.shapetextures
parent
21d8a2a64a
commit
675b9ee050
|
@ -210,13 +210,13 @@ public func OnBuySelection(int callback_idx)
|
|||
else
|
||||
{
|
||||
// Regular item: Buy into inventory
|
||||
// Get rid of current item (unless it's the same we already want)
|
||||
// Get rid of current item
|
||||
if (last_item)
|
||||
SellItem(last_item);
|
||||
var item;
|
||||
// Create item
|
||||
if (!item) item = cursor->CreateContents(entry.item);
|
||||
if (!item) return false;
|
||||
cursor->Switch2Items(cursor->GetItemPos(last_item), cursor->GetItemPos(item));
|
||||
if (last_item) SellItem(last_item);
|
||||
if (!item) return false; // ???
|
||||
// for later sale
|
||||
item.GidlValue = entry.cost;
|
||||
// ammo up!
|
||||
|
|
Loading…
Reference in New Issue