Commit 89338c475b6629e6af75e4bfb56ea20f6dcce2ad

Authored by zhouhaihai
1 parent f60b89b1

技能目标

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