Commit da6362dbe6b5656be6af017492b0224429455287

Authored by gaofengduan
1 parent 4864d579

fix dinerData

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
src/actions/DinerAction.lua
@@ -54,15 +54,15 @@ function _M.addSellRpc( agent, data ) @@ -54,15 +54,15 @@ function _M.addSellRpc( agent, data )
54 54
55 local dirty = false 55 local dirty = false
56 for type, value in pairs(cost) do 56 for type, value in pairs(cost) do
57 - if role.dishData:checkDinerTask(DinerTask.UseMaterial, value, type, nil, true) then 57 + if role.dinerData:checkDinerTask(DinerTask.UseMaterial, value, type, nil, true) then
58 dirty = true 58 dirty = true
59 end 59 end
60 end 60 end
61 - if role.dishData:checkDinerTask(DinerTask.AddDish, count, dish, nil, true) then 61 + if role.dinerData:checkDinerTask(DinerTask.AddDish, count, dish, nil, true) then
62 dirty = true 62 dirty = true
63 end 63 end
64 if dirty then 64 if dirty then
65 - role.dishData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) 65 + role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order"))
66 end 66 end
67 67
68 local sells = json.decode(role.dinerData:getProperty("sells")) 68 local sells = json.decode(role.dinerData:getProperty("sells"))
@@ -142,7 +142,7 @@ function _M.getSellRewardRpc( agent, data ) @@ -142,7 +142,7 @@ function _M.getSellRewardRpc( agent, data )
142 sells[slot].reward = "" 142 sells[slot].reward = ""
143 143
144 if rewards[ItemId.Gold] and rewards[ItemId.Gold] > 0 then 144 if rewards[ItemId.Gold] and rewards[ItemId.Gold] > 0 then
145 - if role.dishData:checkDinerTask(DinerTask.DishWithGold, rewards[ItemId.Gold], sell.dish, nil, true) then 145 + if role.dinerData:checkDinerTask(DinerTask.DishWithGold, rewards[ItemId.Gold], sell.dish, nil, true) then
146 dirty = true 146 dirty = true
147 end 147 end
148 end 148 end
@@ -153,7 +153,7 @@ function _M.getSellRewardRpc( agent, data ) @@ -153,7 +153,7 @@ function _M.getSellRewardRpc( agent, data )
153 role:addItem({itemId = k,count = v}) 153 role:addItem({itemId = k,count = v})
154 end 154 end
155 if dirty then 155 if dirty then
156 - role.dishData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) 156 + role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order"))
157 end 157 end
158 158
159 SendPacket(actionCodes.Diner_getSellRewardRpc, MsgPack.pack({reward = reward})) 159 SendPacket(actionCodes.Diner_getSellRewardRpc, MsgPack.pack({reward = reward}))