维护提醒

BWIKI 全站将于 9 月 3 日(全天)进行维护,期间无法编辑任何页面或发布新的评论。

全站通知:

模块:Shops

来自星露谷物语维基
跳到导航 跳到搜索
[ 创建 | 刷新 ]文档页面
当前模块文档缺失,需要扩充。
local Helper = require("Module:Helper")
local ShopsData = Helper.LazyLoad('Module:Shops/data')

local p = {}

local AdventureShop = ShopsData['AdventureShop']

-- =p.weaponPrice{args={'(W)0'}}
function p.weaponPrice(frame)
	local id = frame.args[1] -- '(W)0'
	for _, item in ipairs(AdventureShop.Items) do
        if item.ItemId == id then
        	local price = item.Price
        	if price == -1 then
        		return '不可购买'
        	end
        	return Helper.ExpandTemplate("模板:Price",{price})
    	end
	end
	return '不可购买'
end

return p