From 848695d1f27d1a2cf21a49e63271a66ff129e447 Mon Sep 17 00:00:00 2001 From: chenyueqi Date: Tue, 30 Mar 2021 20:39:07 +0800 Subject: [PATCH] 枚举索引错误 --- src/actions/RoleAction.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index c1196fd..cace97a 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -1407,16 +1407,16 @@ function _M.diamondConvertRpc(agent, data) if role:getAllDiamond() < cost then return 2 end local get = globalCsv.legal_tender_cost * cost - role:costDiamond({count = cost, log = {desc = "convert", int1 = ItemType.Jade, int2 = get}}) + role:costDiamond({count = cost, log = {desc = "convert", int1 = ItemId.Jade, int2 = get}}) local reward, change if oper == 1 then -- 钻石兑换成虹光玉 reward, change = role:award({[ItemId.Jade] = get}, {log = {desc = "convert"}}) elseif oper == 2 then -- 钻石兑换成虹光玉再兑换成招募券 local allReward = {[ItemId.Jade] = get} local quan = math.floor(get/globalCsv.recruit_cost) - allReward[ItemType.Jade] = allReward[ItemType.Jade] - quan * globalCsv.recruit_cost - if allReward[ItemType.Jade] == 0 then - allReward[ItemType.Jade] = nil + allReward[ItemId.Jade] = allReward[ItemId.Jade] - quan * globalCsv.recruit_cost + if allReward[ItemId.Jade] == 0 then + allReward[ItemId.Jade] = nil end if quan > 0 then allReward[ItemId.RecruitmentCard] = quan -- libgit2 0.21.2