Commit 89338c475b6629e6af75e4bfb56ea20f6dcce2ad

Authored by zhouhaihai
1 parent f60b89b1

技能目标

src/adv/Adv.lua
... ... @@ -181,7 +181,7 @@ function Adv:over(success, isAllPass)
181 181 end
182 182 end
183 183 self:clear()
184   -
  184 + self.owner:checkTaskEnter("AdvScore", {score = score})
185 185 self.owner:updateProperty({field = "advItems", value = ""})
186 186  
187 187 self:backEnd(success, score, scoreInfo, reward)
... ...
src/adv/AdvSkill.lua
... ... @@ -39,7 +39,7 @@ function Skill:filterBySide(sideType, aimType)
39 39 end
40 40 elseif sideType == 2 then -- 我方
41 41 if aimType == 1 then
42   - table.insert(targets, self)
  42 + table.insert(targets, self.owner)
43 43 elseif aimType == 2 then
44 44 targets = self.owner:getTeam(1, true)
45 45 elseif aimType == 3 then
... ...
src/models/RolePlugin.lua
... ... @@ -509,7 +509,7 @@ function RolePlugin.bind(Role)
509 509 table.insert(response, newRune:data())
510 510 SendPacket(actionCodes.Role_loadRunes, MsgPack.pack(response))
511 511 end
512   - self:checkTaskEnter("AddRune", {id = params.id, type = params.type, rarity = set.rarity}, params.notNotify)
  512 + self:checkTaskEnter("AddRune", {id = params.id, type = params.type, rarity = data.rarity}, params.notNotify)
513 513 return 0
514 514 else
515 515 return 1
... ...
src/models/RoleTask.lua
... ... @@ -41,7 +41,8 @@ local TaskType = {
41 41 AdvOverTask = 406, -- 完成任务 - id
42 42 AdvOpenBlock = 407, -- 打开地块 - id
43 43 AdvUsePotion = 408, -- 使用营养剂
44   - AdvStartSelf = 409, -- 手动冒险 - id
  44 + AdvStartSelf = 409, -- 手动冒险 - id
  45 + AdvScore = 410, -- 冒险分数 - score
45 46  
46 47 --爬塔相关
47 48 TowerPass = 501, -- 爬塔通关 - level
... ... @@ -144,7 +145,7 @@ local AchievListener = {
144 145 [TaskType.PvpWin] = {{v(3)}, {v(4), f("score")}},
145 146 [TaskType.AdvAllPass] = {{v(5), f("id")}},
146 147 [TaskType.AdvLevel] = {{v(6), f("level")}},
147   - [TaskType.AdvPass] = {{v(7), f("score")}},
  148 + [TaskType.AdvScore] = {{v(7), f("score")}},
148 149 [TaskType.AdvBattleWin] = {{v(8)}},
149 150 [TaskType.AdvOverTask] = {{v(9)}},
150 151 [TaskType.AdvOpenBlock] = {{v(10)}},
... ... @@ -198,8 +199,8 @@ function RoleTask.bind(Role)
198 199 end
199 200 for _, listener in ipairs(TaskListeners) do
200 201 if listener and listener.listen and listener.listen[taskType] and listener["func"] then
201   - local pms = {}
202 202 for _, vs in ipairs(listener.listen[taskType]) do
  203 + local pms = {}
203 204 for __, v in ipairs(vs) do
204 205 if type(v) == "table" and v.type then
205 206 if v.type == "value" then
... ... @@ -343,7 +344,7 @@ function RoleTask.bind(Role)
343 344 [25] = true,
344 345 }
345 346  
346   - for tId , achiveData in ipairs(csvdb["achievement_typeCsv"]) do
  347 + for tId , achiveData in pairs(csvdb["achievement_typeCsv"]) do
347 348 local curStatus = achiveStatus[tId] or 0
348 349 if achiveData.type == stype then
349 350 if achiveData.type == 1 then --取出难度
... ... @@ -360,11 +361,11 @@ function RoleTask.bind(Role)
360 361 end
361 362 local nStatus = 0
362 363 if achiveData.condition2 == 1 then
363   - for k , v in pairs(jobS) do
  364 + for k , v in pairs(campS) do
364 365 nStatus = math.max(nStatus, v)
365 366 end
366 367 elseif achiveData.condition2 == 2 then
367   - for k , v in pairs(campS) do
  368 + for k , v in pairs(jobS) do
368 369 nStatus = math.max(nStatus, v)
369 370 end
370 371 end
... ... @@ -393,6 +394,10 @@ function RoleTask.bind(Role)
393 394 end
394 395 nStatus = math.max(nStatus, n)
395 396 end
  397 + if achiveData.id == 35 then
  398 + print(nStatus)
  399 + end
  400 +
396 401 if nStatus > curStatus then
397 402 table.insert(change, {type = "achiveT", field = tId, value = nStatus})
398 403 end
... ... @@ -402,7 +407,7 @@ function RoleTask.bind(Role)
402 407 local suitS = {}
403 408 for _, rune in pairs(self.runeBag) do
404 409 local runeData = csvdb["runeCsv"][rune:getProperty("type")][rune:getProperty("id")]
405   - if achiveData.condition2 == 0 or achiveData.condition2 == equipData.rarity then
  410 + if achiveData.condition2 == 0 or achiveData.condition2 == runeData.rarity then
406 411 if runeData.suit ~= "" then
407 412 suitS[runeData.suit] = suitS[runeData.suit] or {}
408 413 suitS[runeData.suit][runeData.type] = 1
... ... @@ -437,8 +442,8 @@ function RoleTask.bind(Role)
437 442 if next(change) then
438 443 self:changeUpdates(change, notNotify)
439 444 end
440   -
441 445 end
  446 +
442 447 end
443 448  
444 449 return RoleTask
445 450 \ No newline at end of file
... ...