Commit 498f0eb23da0bc968c88f6d312674c577b5d721b
1 parent
1bab9165
冒险 action
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
src/actions/AdvAction.lua
... | ... | @@ -385,7 +385,7 @@ function _M.useItemRpc(agent, data) |
385 | 385 | |
386 | 386 | --消耗 |
387 | 387 | if itemData["function"] == 0 or itemData["function"] == 1 then |
388 | - adv:cost({[itemId] = count}, {}) | |
388 | + adv:cost({[itemId] = count}, {log = {desc = "useItem", int1 = itemId, int2 = count}}) | |
389 | 389 | adv:backUse({[itemId] = count}) |
390 | 390 | end |
391 | 391 | |
... | ... | @@ -500,7 +500,7 @@ function _M.upArtifactRpc(agent, data) |
500 | 500 | |
501 | 501 | local status = adv:artifactLevelUp(id) |
502 | 502 | if not status then return 5 end |
503 | - adv:cost(cost, {}) | |
503 | + adv:cost(cost, {log = {desc = "upArtifact", int1 = id}}) | |
504 | 504 | adv:backCost(cost) |
505 | 505 | if status == 1 then -- 现在穿着呢。更新下 |
506 | 506 | adv:saveDB() | ... | ... |
src/adv/Adv.lua
... | ... | @@ -957,7 +957,7 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) |
957 | 957 | end, |
958 | 958 | -- 拥有道具 |
959 | 959 | [1] = function(_, itemId, count) |
960 | - if self:cost({[itemId] = count}, {}, true) then | |
960 | + if self:cost({[itemId] = count}, {log = {desc = "chooseEvent", key1 = tag, int1 = chooseData.id}}, true) then | |
961 | 961 | return true |
962 | 962 | end |
963 | 963 | end, |
... | ... | @@ -989,7 +989,7 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) |
989 | 989 | end, |
990 | 990 | -- 提交一个物品 |
991 | 991 | [5] = function (_, itemId, count) |
992 | - if self:cost({[itemId] = count}, {}) then | |
992 | + if self:cost({[itemId] = count}, {log = {desc = "chooseEvent", key1 = tag, int1 = chooseData.id}}) then | |
993 | 993 | self:backCost({[itemId] = count}) |
994 | 994 | return true |
995 | 995 | end |
... | ... | @@ -1213,7 +1213,7 @@ local function clickTrader(self, room, block, params) |
1213 | 1213 | if not goodsData then return false, 5 end |
1214 | 1214 | |
1215 | 1215 | local costCount = math.ceil(goodsData.price * (block.event.shop[buyId][2] or 100) / 100) |
1216 | - if not self:cost({[goodsData.currency] = costCount}, {}) then return false, 6 end --不够 | |
1216 | + if not self:cost({[goodsData.currency] = costCount}, {log = {desc = "clickTrader", int1 = block.event.id}}) then return false, 6 end --不够 | |
1217 | 1217 | self:backCost({[goodsData.currency] = costCount}) |
1218 | 1218 | local reward = self:award({[goodsData.item] = goodsData.num}, {log = {desc = "clickTrader", int1 = block.event.id}}) |
1219 | 1219 | if goodsData.restrict == 1 then | ... | ... |
src/adv/AdvMap.lua
... | ... | @@ -60,7 +60,7 @@ function Map:checkOver() |
60 | 60 | local mapCsv = csvdb["mapCsv"][self.mapId] |
61 | 61 | |
62 | 62 | if mapCsv.clearType == 1 then -- 消耗 |
63 | - if self.adv:cost(mapCsv.clear:toNumMap()) then return true end | |
63 | + if self.adv:cost(mapCsv.clear:toNumMap(), {log = {desc = "overCost", int1 = block.event.id}}) then return true end | |
64 | 64 | elseif mapCsv.clearType == 2 then -- 杀光 |
65 | 65 | if #self.adv.battle.player:getTeam(2) == 0 then return true end |
66 | 66 | elseif mapCsv.clearType == 3 then -- 持有 | ... | ... |