diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 7ccc749..8b4c6aa 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -1532,6 +1532,8 @@ function _M.diamondConvertRpc(agent, data) local oper = msg.oper if oper ~= 1 and oper ~= 2 then return 0 end + print("oper: ") + print(oper) local cost = math.ceil(msg.cost or 0) if cost <= 0 then return 1 end @@ -1549,6 +1551,7 @@ function _M.diamondConvertRpc(agent, data) local quan = math.floor(get/globalCsv.recruit_cost) local remain = get - quan * globalCsv.recruit_cost + print("get: " .. get .. "; old: " .. old .. "; remain: " .. remain) local allReward = {} if remain > old then allReward[ItemId.Jade] = remain - old @@ -1556,11 +1559,13 @@ function _M.diamondConvertRpc(agent, data) elseif remain == old then else role:costItems({[ItemId.Jade] = old - remain}, {log = {desc = "convert", short1=oper}}) + role:checkWorldChangePoints({[ItemWorldLine.CostJade]= quan * globalCsv.recruit_cost - (old - remain)}) end if quan > 0 then allReward[ItemId.RecruitmentCard] = quan end + dump(allReward) reward, change = role:award(allReward, {log = {desc = "convert"}}) end -- libgit2 0.21.2