diff --git a/src/actions/ActivityAction.lua b/src/actions/ActivityAction.lua index d9c745c..9ac7a76 100644 --- a/src/actions/ActivityAction.lua +++ b/src/actions/ActivityAction.lua @@ -316,6 +316,7 @@ function _M.gachakonRpc(agent, data) local gachakonInfo = role.activity:getActData("Gachakon") or {} local award = {} local remain = 0 + local showAward = {} for i = 1, count do local tmpCfg = clone(actCfg) remain = 0 @@ -335,6 +336,7 @@ function _M.gachakonRpc(agent, data) if not id then return 4 end gachakonInfo[id] = (gachakonInfo[id] or 0) + 1 local curAward = tmpCfg[id].award:toNumMap() + table.insert(showAward, curAward) for k, v in pairs(curAward) do award[k] = (award[k] or 0) + v end @@ -355,7 +357,7 @@ function _M.gachakonRpc(agent, data) end role.activity:updateActData("Gachakon", gachakonInfo) - SendPacket(actionCodes.Activity_gachakonRpc, MsgPack.pack(role:packReward(reward, change))) + SendPacket(actionCodes.Activity_gachakonRpc, MsgPack.pack(showAward)) return true end diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index ba8a5e6..ee38053 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -146,7 +146,9 @@ function _M.talentRpc(agent, data) local talent = hero:getProperty("talent") local heroCfgId = hero:getProperty("type") local curStage = talent:getv(0, 1) + local oldStage = curStage local curLevel = talent:getv(1, 1) + local oldLevel = curLevel local curData = csvdb["unit_talent_"..heroCfgId.."Csv"][curStage] if not curData then return 1 end local oldSkillLv = hero:getSkillLevel(1) @@ -174,13 +176,16 @@ function _M.talentRpc(agent, data) hero:updateProperty({field = "talent", value = talent}) - -- role:log("hero_talent", { - -- hero_id = hero:getProperty("type"), --英雄ID - -- hero_talent_id = curStage, --天赋ID - -- hero_talent_cost = cost, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} - -- hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 - -- hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 - -- }) + + role:log("hero_talent", { + hero_id = hero:getProperty("type"), --英雄ID + hero_talent_stagebef = oldStage, --英雄精进升级前停留阶段 + hero_talent_stage = curStage, --英雄精进升级后停留阶段 + hero_talent_cost = json.encode(cost), --英雄精进升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,….} + hero_talent_subid = curData[oldLevel].effect, --升级属性ID,生命、攻击、防御、命中、闪避分别对应(0,1,2,3,4) + hero_talent_sublevel = curData[oldLevel].level, --升级属性等级,如生命升级从1到2,则记录2 + }) + hero:mylog({desc = "talent", int1 = talent:getv(0, 1), int2 = talent:getv(1, 1)}) SendPacket(actionCodes.Hero_talentRpc, '') diff --git a/src/actions/RadioAction.lua b/src/actions/RadioAction.lua index e20ae5a..f9594d4 100644 --- a/src/actions/RadioAction.lua +++ b/src/actions/RadioAction.lua @@ -158,7 +158,27 @@ function _M.finishQuestRpc(agent, data) msg["big"] = bigSuccess msg["id"] = id msg["heroFaith"] = heroFaithMap - SendPacket(actionCodes.Radio_finishQuestRpc, MsgPack.pack(msg)) + SendPacket(actionCodes.Radio_finishQuestRpc, MsgPack.pack(msg)) + + + local herolist = {} + for _, heroId in ipairs(task.heros) do + local hero = role.heros[heroId] + if hero then + table.insert(herolist, hero:getProperty("type")) + end + end + + -- 讨伐行动 + role:log("punitive_action", { + mission_id = id, --关卡ID + mission_herolist = herolist, -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] + mission_success_rate = totalCoef, -- 大成功几率 + mission_reward = json.encode(r), -- 获得奖励,建议使用json格式记录。示例:{ itemid1: 1, itemid2: 3, itemid3: 5} + mission_result = 1, -- 战斗结果(0-无效,1-胜利,2-失败) + mission_roundtime = config.time, -- 完成耗时(秒) + }) + return true end diff --git a/src/csvdata b/src/csvdata index f019454..bb22707 160000 --- a/src/csvdata +++ b/src/csvdata @@ -1 +1 @@ -Subproject commit f019454e533ec12642ab9d7518c80b73c1cc00bb +Subproject commit bb227076bc3bb79747546fdddc380c8018e7e82b -- libgit2 0.21.2