diff --git a/src/actions/AdvAction.lua b/src/actions/AdvAction.lua index 4f50f96..b082c5f 100644 --- a/src/actions/AdvAction.lua +++ b/src/actions/AdvAction.lua @@ -385,7 +385,7 @@ function _M.useItemRpc(agent, data) --消耗 if itemData["function"] == 0 or itemData["function"] == 1 then - adv:cost({[itemId] = count}, {}) + adv:cost({[itemId] = count}, {log = {desc = "useItem", int1 = itemId, int2 = count}}) adv:backUse({[itemId] = count}) end @@ -500,7 +500,7 @@ function _M.upArtifactRpc(agent, data) local status = adv:artifactLevelUp(id) if not status then return 5 end - adv:cost(cost, {}) + adv:cost(cost, {log = {desc = "upArtifact", int1 = id}}) adv:backCost(cost) if status == 1 then -- 现在穿着呢。更新下 adv:saveDB() diff --git a/src/adv/Adv.lua b/src/adv/Adv.lua index 039d33a..2942469 100644 --- a/src/adv/Adv.lua +++ b/src/adv/Adv.lua @@ -957,7 +957,7 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) end, -- 拥有道具 [1] = function(_, itemId, count) - if self:cost({[itemId] = count}, {}, true) then + if self:cost({[itemId] = count}, {log = {desc = "chooseEvent", key1 = tag, int1 = chooseData.id}}, true) then return true end end, @@ -989,7 +989,7 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) end, -- 提交一个物品 [5] = function (_, itemId, count) - if self:cost({[itemId] = count}, {}) then + if self:cost({[itemId] = count}, {log = {desc = "chooseEvent", key1 = tag, int1 = chooseData.id}}) then self:backCost({[itemId] = count}) return true end @@ -1213,7 +1213,7 @@ local function clickTrader(self, room, block, params) if not goodsData then return false, 5 end local costCount = math.ceil(goodsData.price * (block.event.shop[buyId][2] or 100) / 100) - if not self:cost({[goodsData.currency] = costCount}, {}) then return false, 6 end --不够 + if not self:cost({[goodsData.currency] = costCount}, {log = {desc = "clickTrader", int1 = block.event.id}}) then return false, 6 end --不够 self:backCost({[goodsData.currency] = costCount}) local reward = self:award({[goodsData.item] = goodsData.num}, {log = {desc = "clickTrader", int1 = block.event.id}}) if goodsData.restrict == 1 then diff --git a/src/adv/AdvMap.lua b/src/adv/AdvMap.lua index 1103a51..5cd0418 100644 --- a/src/adv/AdvMap.lua +++ b/src/adv/AdvMap.lua @@ -60,7 +60,7 @@ function Map:checkOver() local mapCsv = csvdb["mapCsv"][self.mapId] if mapCsv.clearType == 1 then -- 消耗 - if self.adv:cost(mapCsv.clear:toNumMap()) then return true end + if self.adv:cost(mapCsv.clear:toNumMap(), {log = {desc = "overCost", int1 = block.event.id}}) then return true end elseif mapCsv.clearType == 2 then -- 杀光 if #self.adv.battle.player:getTeam(2) == 0 then return true end elseif mapCsv.clearType == 3 then -- 持有 -- libgit2 0.21.2