From 109740971d8ea1c52e735655706947e6f3aea993 Mon Sep 17 00:00:00 2001 From: gaofengduan <782277855@qq.com> Date: Thu, 11 Jul 2019 16:58:55 +0800 Subject: [PATCH] fix diner --- src/actions/DinerAction.lua | 11 +++++++---- src/csvdata | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/actions/DinerAction.lua b/src/actions/DinerAction.lua index 27da680..657ad0b 100644 --- a/src/actions/DinerAction.lua +++ b/src/actions/DinerAction.lua @@ -170,11 +170,14 @@ function _M.expediteSellRpc( agent, data ) if count >= max then return 1 end - local cost = {[ItemId.Diamond] = globalCsv.diner_sell_quick_cost[count+1]} - if not role:checkItemEnough(cost) then - return 2 + local diamond = globalCsv.diner_sell_quick_cost[count] + if diamond > 0 then + local cost = {[ItemId.Diamond] = diamond} + if not role:checkItemEnough(cost) then + return 2 + end + role:costItems(cost) end - role:costItems(cost) local dirty = false local reward,popular = "",0 diff --git a/src/csvdata b/src/csvdata index 13eb69b..3605bdd 160000 --- a/src/csvdata +++ b/src/csvdata @@ -1 +1 @@ -Subproject commit 13eb69bd67154cb457bd9885e27546754b169b92 +Subproject commit 3605bdd04bc3ef79ff0d25e18a3b7afe9edabdc0 -- libgit2 0.21.2