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 54  
55 55 local dirty = false
56 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 58 dirty = true
59 59 end
60 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 62 dirty = true
63 63 end
64 64 if dirty then
65   - role.dishData:notifyUpdateProperty("order", role.dinerData:getProperty("order"))
  65 + role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order"))
66 66 end
67 67  
68 68 local sells = json.decode(role.dinerData:getProperty("sells"))
... ... @@ -142,7 +142,7 @@ function _M.getSellRewardRpc( agent, data )
142 142 sells[slot].reward = ""
143 143  
144 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 146 dirty = true
147 147 end
148 148 end
... ... @@ -153,7 +153,7 @@ function _M.getSellRewardRpc( agent, data )
153 153 role:addItem({itemId = k,count = v})
154 154 end
155 155 if dirty then
156   - role.dishData:notifyUpdateProperty("order", role.dinerData:getProperty("order"))
  156 + role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order"))
157 157 end
158 158  
159 159 SendPacket(actionCodes.Diner_getSellRewardRpc, MsgPack.pack({reward = reward}))
... ...