From da6362dbe6b5656be6af017492b0224429455287 Mon Sep 17 00:00:00 2001 From: gaofengduan <782277855@qq.com> Date: Fri, 24 May 2019 20:04:44 +0800 Subject: [PATCH] fix dinerData --- src/actions/DinerAction.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/actions/DinerAction.lua b/src/actions/DinerAction.lua index 01a73cc..e604108 100644 --- a/src/actions/DinerAction.lua +++ b/src/actions/DinerAction.lua @@ -54,15 +54,15 @@ function _M.addSellRpc( agent, data ) local dirty = false for type, value in pairs(cost) do - if role.dishData:checkDinerTask(DinerTask.UseMaterial, value, type, nil, true) then + if role.dinerData:checkDinerTask(DinerTask.UseMaterial, value, type, nil, true) then dirty = true end end - if role.dishData:checkDinerTask(DinerTask.AddDish, count, dish, nil, true) then + if role.dinerData:checkDinerTask(DinerTask.AddDish, count, dish, nil, true) then dirty = true end if dirty then - role.dishData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) + role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) end local sells = json.decode(role.dinerData:getProperty("sells")) @@ -142,7 +142,7 @@ function _M.getSellRewardRpc( agent, data ) sells[slot].reward = "" if rewards[ItemId.Gold] and rewards[ItemId.Gold] > 0 then - if role.dishData:checkDinerTask(DinerTask.DishWithGold, rewards[ItemId.Gold], sell.dish, nil, true) then + if role.dinerData:checkDinerTask(DinerTask.DishWithGold, rewards[ItemId.Gold], sell.dish, nil, true) then dirty = true end end @@ -153,7 +153,7 @@ function _M.getSellRewardRpc( agent, data ) role:addItem({itemId = k,count = v}) end if dirty then - role.dishData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) + role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) end SendPacket(actionCodes.Diner_getSellRewardRpc, MsgPack.pack({reward = reward})) -- libgit2 0.21.2