作者: david_ng223 时间: 2014-4-16 10:38
提示: 作者被禁止或删除 内容自动屏蔽作者: tottoyea 时间: 2014-4-17 10:01
非常感谢!目前没发现其他问题~今晚再去试试stock=0的情况……作者: tottoyea 时间: 2014-4-22 22:45
不好意思,又发现了一个问题。
【商店基础】脚本里写的是:
#-----------------------------------------------------------------------------
# Returns a good, given a shop and an item. If the shop already has that good
# just return it. Otherwise, make a new good. If the price is negative, then
# the price is the default price. Otherwise, it is the specified price.
#-----------------------------------------------------------------------------
def self.get_good(shop, item, price=-1)
good = shop.shop_goods.detect {|good| good.item == item}
return good if good
good_id = shop.shop_goods.size + 1
type = item_type(item)
if price < 0
price_type = price = 0
else
price_type = 1
end
return Game_ShopGood.new(good_id, type, item.id, price_type, price)
end