不好意思,又发现了一个问题。 【商店基础】脚本里写的是: #----------------------------------------------------------------------------- # 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 我理解的是,可以把商品卖回给商店,商品数量会增加,相应价格的金钱也会返回给玩家。 但我测试的时候,商品卖回给商店后,在购买界面就看不到这个商品了,而且钱也没返还 TVT 我就是在物品里默认的位置设置的价格,没什么妖蛾子…… 请帮忙看看为什么卖回功能不起作用……谢谢! |
非常感谢!目前没发现其他问题~今晚再去试试stock=0的情况…… |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-2-21 19:32
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.