Commit 2d21f5273ee03ee6d83ee79206a0ca9fde0a11db
Merge branch 'develop' of 120.26.43.151:wasteland/server into develop
Showing
11 changed files
with
302 additions
and
39 deletions
Show diff stats
config/develop.lua
src/ProtocolCode.lua
src/actions/HangAction.lua
... | ... | @@ -156,6 +156,17 @@ function _M.startRpc( agent, data ) |
156 | 156 | end |
157 | 157 | role:updateProperty({field = "hangInfo", value = hangInfo}) |
158 | 158 | |
159 | + -- 指定当前引导的步骤 | |
160 | + if carbonId == 10101 then | |
161 | + role:saveGuide(5,11) | |
162 | + elseif carbonId == 10102 then | |
163 | + role:saveGuide(8,2) | |
164 | + elseif carbonId == 10103 then | |
165 | + role:saveGuide(9,2) | |
166 | + elseif carbonId == 10220 then | |
167 | + role:saveGuide(22,1) | |
168 | + end | |
169 | + | |
159 | 170 | SendPacket(actionCodes.Hang_startRpc, '') |
160 | 171 | return true |
161 | 172 | end |
... | ... | @@ -209,6 +220,7 @@ function _M.endBattleRpc(agent, data) |
209 | 220 | return true |
210 | 221 | end |
211 | 222 | local carbonId = msg.carbonId |
223 | + local isWin = msg.starNum and msg.starNum > 0 | |
212 | 224 | local carbonData = csvdb["idle_battleCsv"][carbonId] |
213 | 225 | if not carbonData then |
214 | 226 | return 2 |
... | ... | @@ -222,8 +234,9 @@ function _M.endBattleRpc(agent, data) |
222 | 234 | if role:checkHangPass(carbonId) then |
223 | 235 | return 4 |
224 | 236 | end |
237 | + | |
225 | 238 | local reward, change |
226 | - if msg.starNum and msg.starNum > 0 then --win | |
239 | + if isWin then --win | |
227 | 240 | role:hangFinish(carbonId) |
228 | 241 | if carbonData.main ~= 1 then |
229 | 242 | hangInfo.bossTime = nil |
... | ... | @@ -239,30 +252,35 @@ function _M.endBattleRpc(agent, data) |
239 | 252 | reward, change = role:award(reward, {log = {desc = "hangBattle", int1 = carbonId}}) |
240 | 253 | |
241 | 254 | role:checkTaskEnter("HangPass", {id = carbonId}) |
255 | + | |
256 | + -- 引导 | |
257 | + if carbonId == 10101 then | |
258 | + role:finishGuide(5) | |
259 | + elseif carbonId == 10102 then | |
260 | + role:finishGuide(8) | |
261 | + elseif carbonId == 10103 then | |
262 | + role:finishGuide(9) | |
263 | + elseif carbonId == 10220 then | |
264 | + role:finishGuide(22) | |
265 | + end | |
266 | + for _, guideData in pairs(csvdb["guide_unlockCsv"]) do | |
267 | + if guideData.type == 3 and guideData.carbonId == carbonId then | |
268 | + role:saveGuide(guideData.guideId,1,true) | |
269 | + break | |
270 | + end | |
271 | + end | |
242 | 272 | end |
243 | 273 | if hangInfo.carbonId < carbonId then |
244 | 274 | hangInfo.carbonId = carbonId |
245 | 275 | end |
246 | 276 | role:updateProperty({field = "hangInfo", value = hangInfo}) |
247 | 277 | |
248 | - local team = role:getProperty("pvpTC") | |
249 | - | |
250 | - -- 引导 | |
251 | - if carbonId == 10101 then | |
252 | - role:finishGuide(5) | |
253 | - elseif carbonId == 10102 then | |
254 | - role:finishGuide(8) | |
255 | - elseif carbonId == 10103 then | |
256 | - role:finishGuide(9) | |
257 | - elseif carbonId == 10220 then | |
258 | - role:finishGuide(22) | |
259 | - end | |
260 | - for _, guideData in pairs(csvdb["guide_unlockCsv"]) do | |
261 | - if guideData.type == 3 and guideData.carbonId == carbonId then | |
262 | - role:saveGuide(guideData.guideId,1,true) | |
263 | - break | |
264 | - end | |
265 | - end | |
278 | + role:checkBattle("hang", { | |
279 | + id = carbonId, | |
280 | + isWin = isWin, | |
281 | + info = msg.info, | |
282 | + reward = reward, | |
283 | + }) | |
266 | 284 | |
267 | 285 | SendPacket(actionCodes.Hang_endBattleRpc, MsgPack.pack({ |
268 | 286 | starNum = msg.starNum, |
... | ... | @@ -532,6 +550,12 @@ function _M.endBonusBattleRpc(agent, data) |
532 | 550 | role:checkTaskEnter("BonusPass", {id = id}) |
533 | 551 | end |
534 | 552 | |
553 | + role:checkBattle("bonus", { | |
554 | + id = id, | |
555 | + isWin = starNum and starNum > 0, | |
556 | + info = msg.info, | |
557 | + reward = reward, | |
558 | + }) | |
535 | 559 | SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({ |
536 | 560 | starNum = starNum, |
537 | 561 | reward = reward, | ... | ... |
src/actions/HeroAction.lua
... | ... | @@ -453,7 +453,7 @@ function _M.referEquipsRpc(agent, data) |
453 | 453 | local hero = role.heros[msg.id] |
454 | 454 | if not hero then return 10 end |
455 | 455 | local equips = msg.equips |
456 | - local isAuto = msg.isAuth | |
456 | + local isAuto = msg.isAuto | |
457 | 457 | if not equips or not next(equips) then return 11 end |
458 | 458 | |
459 | 459 | for typ = 1, 4 do -- 4件装备 |
... | ... | @@ -807,7 +807,7 @@ function _M.drawHeroRpc(agent, data) |
807 | 807 | role:costItems(cost, {log = {desc = "drawHero", int1 = btype, int2 = poolId}}) |
808 | 808 | |
809 | 809 | local guideHero |
810 | - if role:checkOverGuide(11) and not role:checkOverGuide(12) then | |
810 | + if role:getProperty("newerGuide") == "11=1" then | |
811 | 811 | guideHero = 613 |
812 | 812 | end |
813 | 813 | |
... | ... | @@ -941,19 +941,18 @@ function _M.unlockPoolRpc(agent, data) |
941 | 941 | return true |
942 | 942 | end |
943 | 943 | |
944 | -function _M.changeCrownRpc(agnet, data) | |
944 | +function _M.changeCrown(agnet, data) | |
945 | 945 | local role = agent.role |
946 | 946 | local msg = MsgPack.unpack(data) |
947 | 947 | |
948 | 948 | local heroType = msg.heroType |
949 | 949 | |
950 | - if not role:isHaveHero(heroType) then return end | |
950 | + if not role:isHaveHero(heroType) then return true end | |
951 | 951 | role:setProperty("crown", heroType) |
952 | 952 | |
953 | 953 | role:log("hero_show", { |
954 | 954 | hero_id = heroType, |
955 | 955 | }) |
956 | - SendPacket(actionCodes.Hero_changeCrownRpc, "") | |
957 | 956 | return true |
958 | 957 | end |
959 | 958 | ... | ... |
src/actions/PvpAction.lua
... | ... | @@ -335,11 +335,6 @@ function _M.endBattleRpc(agent, data) |
335 | 335 | local reward, change = role:award({[temp[1]] = temp[2]}, {log = {desc = "pvpBattleC"}}) |
336 | 336 | local myScore, matchScore, oldmyScore, oldMatchScore, myRank, oldMyRank = role:changePvpScoreCommon(match.t == 1 and match.id or -1, isWin) |
337 | 337 | |
338 | - _pvpBattleInfoCacheC = {} --重新发阵容了 没毛病 | |
339 | - _pvpRecordInfoCacheC = {} -- 记录刷新了 | |
340 | - _pvpRecordBattleInfoCacheC = {} -- 取新纪录的时候搞 | |
341 | - _pvpStartBattleCacheC = nil | |
342 | - | |
343 | 338 | -- 请求上传录像 |
344 | 339 | local params = { |
345 | 340 | ["roleid"] = roleId, |
... | ... | @@ -388,7 +383,22 @@ function _M.endBattleRpc(agent, data) |
388 | 383 | if isWin then |
389 | 384 | role:checkTaskEnter("PvpWin", {score = myScore}) |
390 | 385 | end |
386 | + | |
387 | + role:checkBattle("pvpc", { | |
388 | + isWin = isWin, | |
389 | + info = msg.info, | |
390 | + robotId = match.t == 2 and match.id or nil, | |
391 | + enemy = match.t == 1 and _pvpBattleInfoCacheC[match.id] or nil, | |
392 | + score = myScore, | |
393 | + reward = reward, | |
394 | + rank = myRank, | |
395 | + }) | |
391 | 396 | |
397 | + _pvpBattleInfoCacheC = {} --重新发阵容了 没毛病 | |
398 | + _pvpRecordInfoCacheC = {} -- 记录刷新了 | |
399 | + _pvpRecordBattleInfoCacheC = {} -- 取新纪录的时候搞 | |
400 | + _pvpStartBattleCacheC = nil | |
401 | + | |
392 | 402 | SendPacket(actionCodes.Pvp_endBattleRpc, MsgPack.pack({ |
393 | 403 | reward = reward, |
394 | 404 | change = change, |
... | ... | @@ -676,6 +686,17 @@ function _M.endBattleHRpc(agent, data) |
676 | 686 | end |
677 | 687 | end) |
678 | 688 | |
689 | + role:checkBattle("pvph", { | |
690 | + isWin = isWin, | |
691 | + info = msg.info, | |
692 | + robotId = match.t == 2 and match.id or nil, | |
693 | + enemy = match.t == 1 and (revenge and _pvpRecordBattleInfoCacheH[match.id] or _pvpBattleInfoCacheH[match.id]) or nil, | |
694 | + score = myScore, | |
695 | + reward = reward, | |
696 | + rank = myRank, | |
697 | + }) | |
698 | + | |
699 | + | |
679 | 700 | _pvpBattleInfoCacheH = {} --重新发阵容了 没毛病 |
680 | 701 | _pvpRecordInfoCacheH = {} -- 记录刷新了 |
681 | 702 | _pvpRecordBattleInfoCacheH = {} -- 取新纪录的时候搞 |
... | ... | @@ -686,7 +707,7 @@ function _M.endBattleHRpc(agent, data) |
686 | 707 | if isWin then |
687 | 708 | role:checkTaskEnter("PvpWin", {score = myScore}) |
688 | 709 | end |
689 | - | |
710 | + | |
690 | 711 | SendPacket(actionCodes.Pvp_endBattleHRpc, MsgPack.pack({ |
691 | 712 | reward = reward, |
692 | 713 | change = change, | ... | ... |
src/actions/StoreAction.lua
... | ... | @@ -2,6 +2,7 @@ local _M = {} |
2 | 2 | |
3 | 3 | local serverId = tonumber(skynet.getenv("servId")) |
4 | 4 | local md5 = require "md5" |
5 | +local pay_url = skynet.getenv("pay_url") or "" | |
5 | 6 | |
6 | 7 | local function makeOrder(roleId, rechargeId) |
7 | 8 | local orderId = redisproxy:hincrby("autoincrement_set", "order", 1) |
... | ... | @@ -85,7 +86,7 @@ function _M.googleRechargeRpc(agent, data) |
85 | 86 | money = dataSet.rmb * 100, |
86 | 87 | game_money = dataSet.diamond, |
87 | 88 | product_id = dataSet.productId, |
88 | - notify_url = "http://l11-ts-pub-all-wasteland.komoejoy.com/pay/google" | |
89 | + notify_url = pay_url .. "/pay/google" | |
89 | 90 | } |
90 | 91 | local sign = signPms(need, secret_key) |
91 | 92 | |
... | ... | @@ -111,7 +112,7 @@ function _M.myCardRechargeRpc(agent, data) |
111 | 112 | out_trade_no = partnerOrderId, |
112 | 113 | money = dataSet.rmb * 100, |
113 | 114 | game_money = dataSet.diamond, |
114 | - notify_url = "http://l11-ts-pub-all-wasteland.komoejoy.com/pay/mycard" | |
115 | + notify_url = pay_url .. "/pay/mycard" | |
115 | 116 | } |
116 | 117 | local sign = signPms(need, secret_key) |
117 | 118 | |
... | ... | @@ -138,7 +139,7 @@ function _M.iosRechargeRpc(agent, data) |
138 | 139 | money = dataSet.rmb * 100, |
139 | 140 | game_money = dataSet.diamond, |
140 | 141 | product_id = dataSet.iap_product_id, |
141 | - notify_url = "http://l11-ts-pub-all-wasteland.komoejoy.com/pay/ios" | |
142 | + notify_url = pay_url .. "/pay/ios" | |
142 | 143 | } |
143 | 144 | local sign = signPms(need, secret_key) |
144 | 145 | ... | ... |
src/actions/TowerAction.lua
... | ... | @@ -114,6 +114,21 @@ function _M.endBattleRpc(agent, data) |
114 | 114 | towerInfo.k = nil |
115 | 115 | role:updateProperty({field = "towerInfo", value = towerInfo}) |
116 | 116 | |
117 | + | |
118 | + local rank = redisproxy:ZREVRANK(RANK_TOWER, role:getProperty("id")) | |
119 | + if not rank then | |
120 | + rank = -1 | |
121 | + else | |
122 | + rank = rank + 1 | |
123 | + end | |
124 | + role:checkBattle("tower", { | |
125 | + id = id, | |
126 | + isWin = msg.starNum and msg.starNum > 0, | |
127 | + info = msg.info, | |
128 | + reward = reward, | |
129 | + rank = rank, | |
130 | + }) | |
131 | + | |
117 | 132 | SendPacket(actionCodes.Tower_endBattleRpc, MsgPack.pack({reward = reward, change = change})) |
118 | 133 | return true |
119 | 134 | end | ... | ... |
src/adv/AdvPassive.lua
... | ... | @@ -521,5 +521,17 @@ function Passive:effect13(eventType, triggerPms, eventId, count) |
521 | 521 | end |
522 | 522 | end |
523 | 523 | |
524 | +--14=给所有场上怪物增加buff 《 限定 怪 id》 除了自己 | |
525 | +function Passive:effect14(value, triggerPms, enemyId) | |
526 | + local aims = self.owner.battle.player:getTeam(2) | |
527 | + for k , aim in pairs(aims) do | |
528 | + if aim ~= self.owner then | |
529 | + if not enemyId or enemyId == 0 or aim.monsterId == enemyId then | |
530 | + aim:addBuff(value, self.owner) | |
531 | + end | |
532 | + end | |
533 | + end | |
534 | +end | |
535 | + | |
524 | 536 | |
525 | 537 | return Passive |
526 | 538 | \ No newline at end of file | ... | ... |
src/models/Role.lua
... | ... | @@ -7,6 +7,7 @@ local RoleTask = import(".RoleTask") --角色任务 |
7 | 7 | local RoleChangeStruct = import(".RoleChangeStruct") --角色数据额结构更改 |
8 | 8 | local RolePvp = import(".RolePvp") -- pvp |
9 | 9 | local RoleCross = import(".RoleCross") -- 跨服务请求相关 |
10 | +local RoleBattle = import(".RoleBattle") -- 跨服务请求相关 | |
10 | 11 | |
11 | 12 | RoleLog.bind(Role) |
12 | 13 | RolePlugin.bind(Role) |
... | ... | @@ -15,6 +16,7 @@ RoleTask.bind(Role) |
15 | 16 | RoleChangeStruct.bind(Role) |
16 | 17 | RolePvp.bind(Role) |
17 | 18 | RoleCross.bind(Role) |
19 | +RoleBattle.bind(Role) | |
18 | 20 | |
19 | 21 | function Role:ctor( properties ) |
20 | 22 | Role.super.ctor(self, properties) | ... | ... |
... | ... | @@ -0,0 +1,185 @@ |
1 | +local RoleBattle = {} | |
2 | + | |
3 | +--[[ | |
4 | + 100 剧情关卡类 | |
5 | + 200 非剧情类普通关卡 | |
6 | + 300 每日任务类、日常本类 | |
7 | + 400 资源获取类关卡 | |
8 | + 500 PVP关卡 | |
9 | + 1000 活动期间限定类关卡 | |
10 | + 2000 其他 | |
11 | +]] | |
12 | + | |
13 | +local BattleType = { | |
14 | + hang = 100, | |
15 | + tower = 200, | |
16 | + bonus = 300, | |
17 | + pvpc = 500, | |
18 | + pvph = 501, | |
19 | +} | |
20 | + | |
21 | +RoleBattle.bind = function (Role) | |
22 | + | |
23 | + | |
24 | +-- TODO 检查战斗是否作弊 | |
25 | +local function checkBattleCheat() | |
26 | + | |
27 | +end | |
28 | + | |
29 | + | |
30 | + | |
31 | +function Role:checkBattle(battleType, params) | |
32 | + local clientInfo = params.info or {} | |
33 | + | |
34 | + if not BattleType[battleType] then | |
35 | + print(string.format("NO find battleType: %s", battleType)) | |
36 | + return | |
37 | + end | |
38 | + | |
39 | + local selflist = {} | |
40 | + local heroscore = 0 | |
41 | + local teamskill = {} | |
42 | + local enemylist = {} | |
43 | + | |
44 | + local fixData = { | |
45 | + hang = function() | |
46 | + for slot, hero in pairs(self:getProperty("hangTS")) do | |
47 | + selflist[slot] = hero.type | |
48 | + end | |
49 | + heroscore = self:getProperty("hangTBV") | |
50 | + for slot , one in pairs(self:getProperty("hangTB").supports) do | |
51 | + teamskill[one[1]] = one[2] | |
52 | + end | |
53 | + local carbonData = csvdb["idle_battleCsv"][params.id] | |
54 | + local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] | |
55 | + for slot, one in pairs(monsterData[1]) do | |
56 | + enemylist[#enemylist + 1] = one["unitType"] | |
57 | + end | |
58 | + end, | |
59 | + tower = function() | |
60 | + local towerF = self:getProperty("towerF") | |
61 | + for slot, hero in pairs(self:getTeamHerosInfo(towerF.heros)) do | |
62 | + selflist[slot] = hero.type | |
63 | + end | |
64 | + heroscore = self:getTeamBattleValue(towerF.heros) | |
65 | + for slot , one in pairs(self:getTeamBattleInfo(towerF).supports) do | |
66 | + teamskill[one[1]] = one[2] | |
67 | + end | |
68 | + local carbonData = csvdb["tower_battleCsv"][params.id] | |
69 | + local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] | |
70 | + for slot, one in pairs(monsterData[1]) do | |
71 | + enemylist[#enemylist + 1] = one["unitType"] | |
72 | + end | |
73 | + end, | |
74 | + bonus = function() | |
75 | + local bTeam = self:getProperty("bTeam") | |
76 | + for slot, hero in pairs(self:getTeamHerosInfo(bTeam.heros)) do | |
77 | + selflist[slot] = hero.type | |
78 | + end | |
79 | + heroscore = self:getTeamBattleValue(bTeam.heros) | |
80 | + for slot , one in pairs(self:getTeamBattleInfo(bTeam).supports) do | |
81 | + teamskill[one[1]] = one[2] | |
82 | + end | |
83 | + local carbonData = csvdb["tower_battleCsv"][params.id] | |
84 | + local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] | |
85 | + for slot, one in pairs(monsterData[1]) do | |
86 | + enemylist[#enemylist + 1] = one["unitType"] | |
87 | + end | |
88 | + end, | |
89 | + pvpc = function() | |
90 | + for slot, hero in pairs(self:getProperty("pvpTSC")) do | |
91 | + selflist[slot] = hero.type | |
92 | + end | |
93 | + heroscore = self:getProperty("pvpTBVC") | |
94 | + for slot , one in pairs(self:getProperty("pvpTBC").supports) do | |
95 | + teamskill[one[1]] = one[2] | |
96 | + end | |
97 | + if params.robotId then | |
98 | + local carbonData = csvdb["pvp_robotCsv"][params.robotId] | |
99 | + local monsterData = csvdb[carbonData.monster:match("/([^/]*)$") .. "Csv"] | |
100 | + for slot, one in pairs(monsterData[1]) do | |
101 | + enemylist[#enemylist + 1] = one["unitType"] | |
102 | + end | |
103 | + else | |
104 | + for slot, one in pairs((params.enemy or {})["heros"] or {}) do | |
105 | + enemylist[slot] = one["type"] | |
106 | + end | |
107 | + end | |
108 | + end, | |
109 | + pvph = function() | |
110 | + for idx, team in pairs(self:getProperty("pvpTSH")) do | |
111 | + selflist[idx] = selflist[idx] or {} | |
112 | + for slot, hero in pairs(team) do | |
113 | + selflist[idx][slot] = hero.type | |
114 | + end | |
115 | + end | |
116 | + for _, one in pairs(self:getProperty("pvpTBVH")) do | |
117 | + heroscore = heroscore + one | |
118 | + end | |
119 | + for idx, team in pairs(self:getProperty("pvpTBH")) do | |
120 | + for slot , one in pairs(team.supports) do | |
121 | + teamskill[one[1]] = one[2] | |
122 | + end | |
123 | + end | |
124 | + | |
125 | + if params.robotId then | |
126 | + local carbonData = csvdb["pvp_robot_groupCsv"][params.robotId] | |
127 | + for idx = 1, 3 do | |
128 | + enemylist[idx] = enemylist[idx] or {} | |
129 | + local monsterData = csvdb[carbonData["monster" .. idx]:match("/([^/]*)$") .. "Csv"] | |
130 | + for slot, one in pairs(monsterData[1]) do | |
131 | + enemylist[idx][#enemylist + 1] = one["unitType"] | |
132 | + end | |
133 | + end | |
134 | + else | |
135 | + for idx, team in pairs(params.enemy or {}) do | |
136 | + enemylist[idx] = enemylist[idx] or {} | |
137 | + for slot, one in pairs(team["heros"] or {}) do | |
138 | + enemylist[idx][slot] = one["type"] | |
139 | + end | |
140 | + end | |
141 | + end | |
142 | + end | |
143 | + } | |
144 | + | |
145 | + if fixData[battleType] then | |
146 | + fixData[battleType]() | |
147 | + end | |
148 | + | |
149 | + -- robotId = match.t == 2 and match.id or nil, | |
150 | + -- enemy = match.t == 1 and (revenge and _pvpRecordBattleInfoCacheH[match.id] or _pvpBattleInfoCacheH[match.id]) or nil, | |
151 | + -- score = myScore, | |
152 | + -- reward = reward, | |
153 | + self:log("mission", { | |
154 | + mission_threadid = battleType == "hang" and math.floor((params.id % 100) / 100) or 0, -- 大关卡ID | |
155 | + mission_id = params.id or 0, -- 关卡ID | |
156 | + mission_type = BattleType[battleType], -- 关卡类型,见关卡类型枚举表 | |
157 | + mission_herolist = selflist, -- 英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] | |
158 | + mission_heroscore = heroscore, -- 编队总评分 | |
159 | + mission_enemylist = enemylist, -- 地方英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] | |
160 | + mission_damage = clientInfo.damage or {}, -- 英雄输出值。示例:{'heroid1':1000,'heroid2':2000,………..} | |
161 | + mission_ultskill = clientInfo.ultskill or {}, -- 大招使用情况。示例:{'heroid1':1000,'heroid2':2000,………..} | |
162 | + mission_reward = params.reward or {}, -- 获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | |
163 | + mission_starttime = clientInfo.start or 0, -- 战斗开始时间,格式 unixtime 秒级 | |
164 | + mission_roundtime = clientInfo.atime or 0, -- 对局时长(秒) | |
165 | + mission_result = params.isWin and 1 or 2, -- 战斗结果(0-无效,1-胜利,2-失败) | |
166 | + mission_star = 0, -- 战斗完成星数,无星级的话填写0 | |
167 | + mission_restriction = 0, -- 周期内参与限制(0表示没有上限) | |
168 | + mission_difficulty = 0, -- 关卡困难度,无难度区分的话填写0 | |
169 | + mission_strength = 1, -- 消耗的体力或次数 | |
170 | + mission_score = params.score or 0, -- 本局分数,PVP玩法记录为对战后积分,无得分的填0 | |
171 | + mission_cleartype = 1, -- 1正常通关;2代理拾荒 | |
172 | + mission_rank = params.rank, -- 对战后排名,适用于PVP玩法和电波塔,其他玩法留空 | |
173 | + misson_monsterkill = clientInfo.kill or {}, -- 击杀怪物ID和数量,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | |
174 | + misson_teamskill = teamskill, -- 编队支援技能和技能等级情况,json格式记录,{"teamskill1":1,"teamskill2":2,………..} | |
175 | + }) | |
176 | +end | |
177 | + | |
178 | + | |
179 | + | |
180 | + | |
181 | + | |
182 | +end | |
183 | + | |
184 | + | |
185 | +return RoleBattle | |
0 | 186 | \ No newline at end of file | ... | ... |
src/models/RoleLog.lua
... | ... | @@ -173,16 +173,16 @@ local MethodType = { |
173 | 173 | item_subreason = true, -- 道具流动二级原因,抽卡:卡池ID,装备强化:装备ID,副本掉落:副本ID |
174 | 174 | item_other = true, -- 其他(可包含阶数,强化等级,随机属性) |
175 | 175 | }, |
176 | - mission = { --玩家副本完成情况 --TODO | |
176 | + mission = { --玩家副本完成情况 | |
177 | 177 | mission_threadid = true, -- 大关卡ID |
178 | 178 | mission_id = true, -- 关卡ID |
179 | 179 | mission_type = true, -- 关卡类型,见关卡类型枚举表 |
180 | 180 | mission_sequenceid = "ucode", -- 本次对战ID,用于关联一次动作产生多条不同类型的日志 |
181 | - mission_herolist = true, -- 英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] | |
181 | + mission_herolist = "json", -- 英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] | |
182 | 182 | mission_heroscore = true, -- 编队总评分 |
183 | - mission_enemylist = true, -- 地方英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] | |
184 | - mission_damage = true, -- 英雄输出值。示例:{'heroid1':1000,'heroid2':2000,………..} | |
185 | - mission_ultskill = true, -- 大招使用情况。示例:{'heroid1':1000,'heroid2':2000,………..} | |
183 | + mission_enemylist = "json", -- 地方英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] | |
184 | + mission_damage = "json", -- 英雄输出值。示例:{'heroid1':1000,'heroid2':2000,………..} | |
185 | + mission_ultskill = "json", -- 大招使用情况。示例:{'heroid1':1000,'heroid2':2000,………..} | |
186 | 186 | mission_reward = "json", -- 获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
187 | 187 | mission_starttime = true, -- 战斗开始时间,格式 unixtime 秒级 |
188 | 188 | mission_roundtime = true, -- 对局时长(秒) |
... | ... | @@ -198,7 +198,7 @@ local MethodType = { |
198 | 198 | misson_teamskill = "json", -- 编队支援技能和技能等级情况,json格式记录,{"teamskill1":1,"teamskill2":2,………..} |
199 | 199 | misson_teambond = "json", -- 编队羁绊和羁绊等级,json格式记录,{"bondid1":1,"bondid2":2,………..} |
200 | 200 | }, |
201 | - residence_reward = { --玩家挂机或排名奖励 --TODO | |
201 | + residence_reward = { --玩家挂机或排名奖励 | |
202 | 202 | mission_threadid = true, --大关卡ID |
203 | 203 | mission_id = true, --关卡ID |
204 | 204 | mission_type = true, --关卡类型,见关卡类型枚举表 |
... | ... | @@ -524,6 +524,7 @@ function RoleLog.bind(Role) |
524 | 524 | }) |
525 | 525 | end |
526 | 526 | |
527 | + | |
527 | 528 | function Role:startActionUcode() |
528 | 529 | if not self._uniqueCount then |
529 | 530 | self._uniqueCount = 0 | ... | ... |