Commit 003806dcee3ad45c2c53b4930e1cc714557d0294

Authored by zhouhaihai
2 parents 00178a01 8e524d41

Merge branch 'bugfix' into tr/publish

* bugfix:
  优化
  充值返利邮件档位排序
  伤害错误
  反的判断
  返利邮件拼接充值档位
  bug
  buff  被动 限定地图
src/adv/AdvBuff.lua
@@ -434,6 +434,9 @@ function Buff:initNew(release, data) @@ -434,6 +434,9 @@ function Buff:initNew(release, data)
434 if self.buffData.effectTime > 0 then 434 if self.buffData.effectTime > 0 then
435 self.count = self.buffData.effectTime 435 self.count = self.buffData.effectTime
436 end 436 end
  437 + if self.buffData.mapLock == 1 then
  438 + self.mapId = self.owner.battle.adv:getCurMap().mapId
  439 + end
437 end 440 end
438 441
439 function Buff:createAfter() 442 function Buff:createAfter()
@@ -456,6 +459,9 @@ function Buff:initByDB(data) @@ -456,6 +459,9 @@ function Buff:initByDB(data)
456 if data.count then 459 if data.count then
457 self.count = data.count 460 self.count = data.count
458 end 461 end
  462 + if data.mapId then
  463 + self.mapId = data.mapId
  464 + end
459 self.layer = data.layer or 1 465 self.layer = data.layer or 1
460 if self._initDB then 466 if self._initDB then
461 self:_initDB(data) 467 self:_initDB(data)
@@ -464,7 +470,7 @@ end @@ -464,7 +470,7 @@ end
464 470
465 471
466 function Buff:afterRound() 472 function Buff:afterRound()
467 - if self.isDel or self.owner.isDead then return end 473 + if self.owner.isDead or self:isHide() then return end
468 474
469 -- keepTerm 检查 475 -- keepTerm 检查
470 if not self:checkKeep() then 476 if not self:checkKeep() then
@@ -533,7 +539,7 @@ function Buff:checkKeep() @@ -533,7 +539,7 @@ function Buff:checkKeep()
533 end 539 end
534 checkFunc[5] = function(_, buffId) 540 checkFunc[5] = function(_, buffId)
535 local buff = self.owner:getBuffById(buffId) 541 local buff = self.owner:getBuffById(buffId)
536 - if buff and not buff.isDel then 542 + if buff then
537 return true 543 return true
538 end 544 end
539 return false 545 return false
@@ -574,6 +580,18 @@ function Buff:effect() @@ -574,6 +580,18 @@ function Buff:effect()
574 return self:_effectValue() 580 return self:_effectValue()
575 end 581 end
576 end 582 end
  583 +
  584 +-- 在当前阶段不可用 小透明 < 不会回合遍历 不会查找遍历 可以删除遍历 可以下层遍历 >
  585 +function Buff:isHide()
  586 + if self.isDel then
  587 + return true
  588 + end
  589 + if self.buffData.mapLock == 1 and self.mapId and self.owner.battle.adv:getCurMap().mapId ~= self.mapId then
  590 + return true
  591 + end
  592 + return false
  593 +end
  594 +
577 --删除buff 时调用 595 --删除buff 时调用
578 function Buff:endBuff() 596 function Buff:endBuff()
579 if self._endBuff then 597 if self._endBuff then
@@ -678,6 +696,9 @@ function Buff:getDB() @@ -678,6 +696,9 @@ function Buff:getDB()
678 if self.count ~= -1 then 696 if self.count ~= -1 then
679 db.count = self.count 697 db.count = self.count
680 end 698 end
  699 + if self.mapId then
  700 + db.mapId = self.mapId
  701 + end
681 db.layer = self.layer 702 db.layer = self.layer
682 if self.buffData.keepTerm:toArray(true, "=")[1] == 1 then 703 if self.buffData.keepTerm:toArray(true, "=")[1] == 1 then
683 db.releId = self.releaseId 704 db.releId = self.releaseId
src/adv/AdvPassive.lua
@@ -265,6 +265,9 @@ function Passive:ctor(owner, data) @@ -265,6 +265,9 @@ function Passive:ctor(owner, data)
265 self.round = data.round or 0 --触发剩余回合数 265 self.round = data.round or 0 --触发剩余回合数
266 self.count = data.count or self.passiveData.count --触发剩余次数 266 self.count = data.count or self.passiveData.count --触发剩余次数
267 self.delay = data.delay or self.passiveData.delayRound --触发延迟回合数 267 self.delay = data.delay or self.passiveData.delayRound --触发延迟回合数
  268 + if self.passiveData.mapLock == 1 and not self.mapId then
  269 + self.mapId = self.owner.battle.adv:getCurMap().mapId
  270 + end
268 271
269 self.effects = self.passiveData.effect:toTableArray(true) 272 self.effects = self.passiveData.effect:toTableArray(true)
270 self.filters = {} 273 self.filters = {}
@@ -331,7 +334,7 @@ function Passive:effect(triggerPms) @@ -331,7 +334,7 @@ function Passive:effect(triggerPms)
331 end 334 end
332 335
333 function Passive:afterRound() 336 function Passive:afterRound()
334 - if self.isDel or self.owner.isDead or self.owner.lock then return end 337 + if self.isDel or self.owner.isDead or self.owner.lock or self:isHide() then return end
335 if self.round > 0 then --回合触发的 338 if self.round > 0 then --回合触发的
336 self.round = self.round - 1 339 self.round = self.round - 1
337 end 340 end
@@ -349,9 +352,20 @@ function Passive:afterLayer() @@ -349,9 +352,20 @@ function Passive:afterLayer()
349 end 352 end
350 end 353 end
351 354
  355 +-- 在当前阶段不可用 小透明 < 不会回合遍历 不会查找遍历 可以删除遍历 可以下层遍历 >
  356 +function Passive:isHide()
  357 + if self.isDel then
  358 + return true
  359 + end
  360 + if self.passiveData.mapLock == 1 and self.mapId and self.owner.battle.adv:getCurMap().mapId ~= self.mapId then
  361 + return true
  362 + end
  363 + return false
  364 +end
  365 +
352 -- 可以触发 366 -- 可以触发
353 function Passive:canTrigger( ) 367 function Passive:canTrigger( )
354 - return self.count > 0 and self.delay <= 0 368 + return self.count > 0 and self.delay <= 0 and not self:isHide()
355 end 369 end
356 370
357 function Passive:trigger(condType, params) --触发检查 371 function Passive:trigger(condType, params) --触发检查
@@ -393,6 +407,9 @@ function Passive:getDB() @@ -393,6 +407,9 @@ function Passive:getDB()
393 db.round = self.round 407 db.round = self.round
394 db.count = self.count 408 db.count = self.count
395 db.delay = self.delay 409 db.delay = self.delay
  410 + if self.mapId then
  411 + db.mapId = self.mapId
  412 + end
396 return db 413 return db
397 end 414 end
398 415
src/adv/AdvPlayer.lua
@@ -124,7 +124,7 @@ end @@ -124,7 +124,7 @@ end
124 function BaseObject:getDisablePassiveCount() 124 function BaseObject:getDisablePassiveCount()
125 local count 125 local count
126 for _, buff in ipairs(self.buffs) do 126 for _, buff in ipairs(self.buffs) do
127 - if not buff.isDel and buff:getType() == Buff.DISABLE_BUFF then 127 + if not buff:isHide() and buff:getType() == Buff.DISABLE_BUFF then
128 if buff:effect() == 0 then 128 if buff:effect() == 0 then
129 return 0 129 return 0
130 end 130 end
@@ -138,7 +138,7 @@ function BaseObject:addBuff(buffId, releaser) @@ -138,7 +138,7 @@ function BaseObject:addBuff(buffId, releaser)
138 local buffData = csvdb["adv_map_buffCsv"][buffId] 138 local buffData = csvdb["adv_map_buffCsv"][buffId]
139 if not buffData then return end 139 if not buffData then return end
140 for _, buff in ipairs(self.buffs) do 140 for _, buff in ipairs(self.buffs) do
141 - if not buff.isDel and (buff:getType() == Buff.CLEAR_BUFF or buff:getType() == Buff.IMMNUE_BUFF) then 141 + if not buff:isHide() and (buff:getType() == Buff.CLEAR_BUFF or buff:getType() == Buff.IMMNUE_BUFF) then
142 if buff:canEffect(buffId) then 142 if buff:canEffect(buffId) then
143 buff:effect() 143 buff:effect()
144 return 144 return
@@ -166,7 +166,7 @@ end @@ -166,7 +166,7 @@ end
166 166
167 function BaseObject:getBuffById(bId) 167 function BaseObject:getBuffById(bId)
168 for idx, buff in ipairs(self.buffs) do 168 for idx, buff in ipairs(self.buffs) do
169 - if buff.id == bId then 169 + if buff.id == bId and not buff:isHide() then
170 return buff 170 return buff
171 end 171 end
172 end 172 end
@@ -196,7 +196,7 @@ end @@ -196,7 +196,7 @@ end
196 196
197 function BaseObject:hadBuff(bType) 197 function BaseObject:hadBuff(bType)
198 for _, buff in ipairs(self.buffs) do 198 for _, buff in ipairs(self.buffs) do
199 - if not buff.isDel and buff:getType() == bType then 199 + if not buff:isHide() and buff:getType() == bType then
200 return buff 200 return buff
201 end 201 end
202 end 202 end
@@ -204,7 +204,7 @@ end @@ -204,7 +204,7 @@ end
204 204
205 function BaseObject:hadBuffById(bId) 205 function BaseObject:hadBuffById(bId)
206 for _, buff in ipairs(self.buffs) do 206 for _, buff in ipairs(self.buffs) do
207 - if not buff.isDel and buff.id == bId then 207 + if not buff:isHide() and buff.id == bId then
208 return buff 208 return buff
209 end 209 end
210 end 210 end
@@ -218,7 +218,7 @@ end @@ -218,7 +218,7 @@ end
218 function BaseObject:getCommonBuffEffect(bType, otherCond) 218 function BaseObject:getCommonBuffEffect(bType, otherCond)
219 local effect, count = {[0] = 0, [1] = 0}, 0 219 local effect, count = {[0] = 0, [1] = 0}, 0
220 for _, buff in ipairs(self.buffs) do 220 for _, buff in ipairs(self.buffs) do
221 - if not buff.isDel and buff:getType() == bType then 221 + if not buff:isHide() and buff:getType() == bType then
222 local cType, value, cond = buff:effect() 222 local cType, value, cond = buff:effect()
223 if cType and (not otherCond or otherCond == cond) then 223 if cType and (not otherCond or otherCond == cond) then
224 effect[cType] = effect[cType] + value 224 effect[cType] = effect[cType] + value
@@ -233,7 +233,7 @@ end @@ -233,7 +233,7 @@ end
233 function BaseObject:getBackHurtBuff() 233 function BaseObject:getBackHurtBuff()
234 local effect = {[0] = 0, [1] = 0} 234 local effect = {[0] = 0, [1] = 0}
235 for _, buff in ipairs(self.buffs) do 235 for _, buff in ipairs(self.buffs) do
236 - if not buff.isDel and buff:getType() == Buff.BACK_HURT then 236 + if not buff:isHide() and buff:getType() == Buff.BACK_HURT then
237 local cType, value = buff:effect() -- aType 0 全部 1 普通攻击 237 local cType, value = buff:effect() -- aType 0 全部 1 普通攻击
238 if cType then 238 if cType then
239 effect[cType] = effect[cType] + value 239 effect[cType] = effect[cType] + value
@@ -268,7 +268,7 @@ function BaseObject:getBuffEffectChange(classify) @@ -268,7 +268,7 @@ function BaseObject:getBuffEffectChange(classify)
268 end 268 end
269 local effect = 0 269 local effect = 0
270 for _, buff in ipairs(self.buffs) do 270 for _, buff in ipairs(self.buffs) do
271 - if not buff.isDel and buff:getType() == Buff.Buff_EFFECT_CHANGE then 271 + if not buff:isHide() and buff:getType() == Buff.Buff_EFFECT_CHANGE then
272 local cType, value = buff:effect() 272 local cType, value = buff:effect()
273 if cType and had[cType] then 273 if cType and had[cType] then
274 effect = effect + value 274 effect = effect + value
@@ -286,7 +286,7 @@ function BaseObject:getAttrBuffChange(attr) @@ -286,7 +286,7 @@ function BaseObject:getAttrBuffChange(attr)
286 } 286 }
287 local effect, count = {[0] = 0, [1] = 0}, 0 287 local effect, count = {[0] = 0, [1] = 0}, 0
288 for _, buff in ipairs(self.buffs) do 288 for _, buff in ipairs(self.buffs) do
289 - if not buff.isDel and AttrBuff[buff:getType()] then 289 + if not buff:isHide() and AttrBuff[buff:getType()] then
290 local cType, value, attrName = buff:effect() 290 local cType, value, attrName = buff:effect()
291 if cType and attr == attrName then 291 if cType and attr == attrName then
292 effect[cType] = effect[cType] + value 292 effect[cType] = effect[cType] + value
@@ -310,7 +310,7 @@ end @@ -310,7 +310,7 @@ end
310 function BaseObject:reSetHpMax() 310 function BaseObject:reSetHpMax()
311 self.hpMax = self._hpMax 311 self.hpMax = self._hpMax
312 for _, buff in ipairs(self.buffs) do 312 for _, buff in ipairs(self.buffs) do
313 - if not buff.isDel and buff:getType() == Buff.HP_MAX_CHANGE then 313 + if not buff:isHide() and buff:getType() == Buff.HP_MAX_CHANGE then
314 local cv = buff:effect() 314 local cv = buff:effect()
315 if cv then 315 if cv then
316 self.hpMax = self.hpMax + cv 316 self.hpMax = self.hpMax + cv
@@ -349,7 +349,7 @@ function BaseObject:hurt(value, releaser, params) @@ -349,7 +349,7 @@ function BaseObject:hurt(value, releaser, params)
349 end 349 end
350 350
351 if params.hurtType ~= 5 then 351 if params.hurtType ~= 5 then
352 - if params.hurtType ~= 6 or params.hurtType ~= 4 then 352 + if params.hurtType ~= 6 and params.hurtType ~= 4 then
353 value = math.max(0, value - self.def) 353 value = math.max(0, value - self.def)
354 end 354 end
355 value = self:getInjuredValue(value) --减伤计算 355 value = self:getInjuredValue(value) --减伤计算
@@ -665,7 +665,7 @@ end @@ -665,7 +665,7 @@ end
665 --战斗结束了扣战斗buff次数 665 --战斗结束了扣战斗buff次数
666 function Player:effectBattleBuff() 666 function Player:effectBattleBuff()
667 for _, buff in ipairs(self.buffs) do 667 for _, buff in ipairs(self.buffs) do
668 - if not buff.isDel and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then 668 + if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then
669 buff:effect() 669 buff:effect()
670 end 670 end
671 end 671 end
@@ -699,7 +699,7 @@ end @@ -699,7 +699,7 @@ end
699 function Player:attrChangeCondBuffCheck(etype, cond) 699 function Player:attrChangeCondBuffCheck(etype, cond)
700 local effect = {} 700 local effect = {}
701 for _, buff in ipairs(self.buffs) do 701 for _, buff in ipairs(self.buffs) do
702 - if not buff.isDel and (buff:getType() == Buff.ATTR_CHANGE_COND) then 702 + if not buff:isHide() and (buff:getType() == Buff.ATTR_CHANGE_COND) then
703 local _et, _attr, _co = buff:getEffectBy() 703 local _et, _attr, _co = buff:getEffectBy()
704 if etype == _et and (not _co or _co == cond) then 704 if etype == _et and (not _co or _co == cond) then
705 effect[_attr] = 1 705 effect[_attr] = 1
1 -Subproject commit 76bf12dfa6afe523ec30d1da6467cb8cbd30790f 1 +Subproject commit d54c7ca07fd397022166b38b58b80a78f339f592
src/models/Activity.lua
@@ -348,9 +348,10 @@ activityFunc[Activity.ActivityType.PayBack] = { @@ -348,9 +348,10 @@ activityFunc[Activity.ActivityType.PayBack] = {
348 ["check"] = function(self, actType, notify, twd) -- 检查 348 ["check"] = function(self, actType, notify, twd) -- 检查
349 local oldVal = self:getActData(actType) or 0 349 local oldVal = self:getActData(actType) or 0
350 local newVal = oldVal + twd 350 local newVal = oldVal + twd
351 - local gift = self.owner:getPaybackReward(oldVal, newVal) 351 + local gift, checkPoint = self.owner:getPaybackReward(oldVal, newVal)
352 if gift ~= "" then 352 if gift ~= "" then
353 - self.owner:sendMail(MailId.PayBackAward, nil, gift, {newVal}) 353 + local strCp = table.concat(checkPoint ,"/")
  354 + self.owner:sendMail(MailId.PayBackAward, nil, gift, {newVal, strCp})
354 end 355 end
355 self:updateActData(actType, newVal, not notify) 356 self:updateActData(actType, newVal, not notify)
356 end, 357 end,
src/models/RoleLog.lua
@@ -62,6 +62,7 @@ local ItemReason = { @@ -62,6 +62,7 @@ local ItemReason = {
62 finishTask = 403, -- 任务 62 finishTask = 403, -- 任务
63 taskActive = 404, -- 完成活跃任务 63 taskActive = 404, -- 完成活跃任务
64 advMainTask = 405, -- 拾荒主线 64 advMainTask = 405, -- 拾荒主线
  65 + chatline = 406, --查看chatline
65 66
66 finishAchive = 601, -- 完成成就 67 finishAchive = 601, -- 完成成就
67 advAchiev = 602, -- 拾荒成就 68 advAchiev = 602, -- 拾荒成就
@@ -92,7 +93,8 @@ local ItemReason = { @@ -92,7 +93,8 @@ local ItemReason = {
92 dinerBuildUp = 1108, -- 建筑升级 93 dinerBuildUp = 1108, -- 建筑升级
93 removeSell = 1109, -- 移除售卖 94 removeSell = 1109, -- 移除售卖
94 dinerSell = 1110, -- 餐饮售卖 95 dinerSell = 1110, -- 餐饮售卖
95 - 96 + dinerShop = 1111, -- 餐厅商店
  97 + dinerSellQ = 1112, -- 餐厅快速
96 -- 英雄 98 -- 英雄
97 heroLevelUp = 1201, -- 英雄升级 99 heroLevelUp = 1201, -- 英雄升级
98 heroBreak = 1202, -- 英雄突破 100 heroBreak = 1202, -- 英雄突破
@@ -104,6 +106,13 @@ local ItemReason = { @@ -104,6 +106,13 @@ local ItemReason = {
104 unlockPool = 1208, -- 解锁英雄定向抽卡池 106 unlockPool = 1208, -- 解锁英雄定向抽卡池
105 downloadCv = 1209, -- 下载 cv包奖励 107 downloadCv = 1209, -- 下载 cv包奖励
106 refer = 1210, -- 穿戴 108 refer = 1210, -- 穿戴
  109 +
  110 + -- pvp
  111 + pvpCHead = 1301, -- pvp 跨服竞技场头像
  112 +
  113 + --adv
  114 + chooseEvent = 1351, -- 冒险选择
  115 + clickTrader = 1352, -- 冒险商店
107 } 116 }
108 117
109 118
@@ -699,7 +708,7 @@ function RoleLog.bind(Role) @@ -699,7 +708,7 @@ function RoleLog.bind(Role)
699 action_type = after - before > 0 and 1 or 0, -- 变化类型(玩家获取:1,玩家消耗:0) 708 action_type = after - before > 0 and 1 or 0, -- 变化类型(玩家获取:1,玩家消耗:0)
700 item_before = before, -- 道具变化前的数量 709 item_before = before, -- 道具变化前的数量
701 item_after = after, -- 道具变化后的数量 710 item_after = after, -- 道具变化后的数量
702 - item_reason = reasonType, -- 道具流动一级原因,如抽卡、装备强化、副本掉落,可参考道具动作类型枚举表 711 + item_reason = reasonType or 0, -- 道具流动一级原因,如抽卡、装备强化、副本掉落,可参考道具动作类型枚举表
703 item_subreason = subreason, -- 道具流动二级原因,抽卡:卡池ID,装备强化:装备ID,副本掉落:副本ID 712 item_subreason = subreason, -- 道具流动二级原因,抽卡:卡池ID,装备强化:装备ID,副本掉落:副本ID
704 item_other = other, -- 其他(可包含阶数,强化等级,随机属性) 713 item_other = other, -- 其他(可包含阶数,强化等级,随机属性)
705 }) 714 })
src/models/RolePlugin.lua
@@ -203,7 +203,7 @@ function RolePlugin.bind(Role) @@ -203,7 +203,7 @@ function RolePlugin.bind(Role)
203 function Role:changeHead(id, notNotify) 203 function Role:changeHead(id, notNotify)
204 self:updateProperty({field = "headId" ,value = id, notNotify = notNotify}) 204 self:updateProperty({field = "headId" ,value = id, notNotify = notNotify})
205 self:changeCrossServerPvpSelfInfo("headId") 205 self:changeCrossServerPvpSelfInfo("headId")
206 - self:log("role_action", {desc = "changeHead", int1 = id}) 206 + self:mylog("role_action", {desc = "changeHead", int1 = id})
207 end 207 end
208 208
209 function Role:addPlayExp(addExp, params) 209 function Role:addPlayExp(addExp, params)
@@ -761,7 +761,7 @@ function RolePlugin.bind(Role) @@ -761,7 +761,7 @@ function RolePlugin.bind(Role)
761 end 761 end
762 if heartWarning < 50 and heartWarning % 5 == 0 then 762 if heartWarning < 50 and heartWarning % 5 == 0 then
763 self:sendGmMsg("server_accountBanned_warning") 763 self:sendGmMsg("server_accountBanned_warning")
764 - self:log("role_action",{desc = "heartWarning", int1 = heartWarning}) 764 + self:mylog("role_action",{desc = "heartWarning", int1 = heartWarning})
765 end 765 end
766 end 766 end
767 767
@@ -774,11 +774,11 @@ function RolePlugin.bind(Role) @@ -774,11 +774,11 @@ function RolePlugin.bind(Role)
774 self:setProperty("banType", 0) 774 self:setProperty("banType", 0)
775 self:setProperty("heartWarning", 0) 775 self:setProperty("heartWarning", 0)
776 776
777 - self:log("role_action", {desc = "ban_rm"}) 777 + self:mylog("role_action", {desc = "ban_rm"})
778 else 778 else
779 self:setProperty("banTime", now + 86400 * time) 779 self:setProperty("banTime", now + 86400 * time)
780 self:setProperty("banType", banType) 780 self:setProperty("banType", banType)
781 - self:log("role_action", {desc = "ban", int1 = time, int2 = banType}) 781 + self:mylog("role_action", {desc = "ban", int1 = time, int2 = banType})
782 end 782 end
783 end 783 end
784 784
@@ -1595,7 +1595,7 @@ function RolePlugin.bind(Role) @@ -1595,7 +1595,7 @@ function RolePlugin.bind(Role)
1595 self:updateProperty({field = "rmbC", delta = rmb}) 1595 self:updateProperty({field = "rmbC", delta = rmb})
1596 self:updateProperty({field = "twdC", delta = rechargeData.twd}) 1596 self:updateProperty({field = "twdC", delta = rechargeData.twd})
1597 1597
1598 - self:mylog("role_action", {desc = "recharge", int1 = id, int2 = rmb, key1 = params.transactionId, key2 = params.order, long1 = params.pay_time}) 1598 + self:mylog("role_action", {desc = "recharge", int1 = id, int2 = rmb, key1 = params.transactionId, key2 = params.order, long1 = tonum(params.pay_time, 0)})
1599 1599
1600 return nil, reward 1600 return nil, reward
1601 end 1601 end
@@ -1704,6 +1704,7 @@ function RolePlugin.bind(Role) @@ -1704,6 +1704,7 @@ function RolePlugin.bind(Role)
1704 function Role:getPaybackReward(oldVal, newVal) 1704 function Role:getPaybackReward(oldVal, newVal)
1705 local maxVal, diff, extraReward = 0, 0, "" 1705 local maxVal, diff, extraReward = 0, 0, ""
1706 local gift = "" 1706 local gift = ""
  1707 + local checkPoint = {}
1707 for k, v in pairs(csvdb["rebateCsv"]) do 1708 for k, v in pairs(csvdb["rebateCsv"]) do
1708 if k > maxVal then 1709 if k > maxVal then
1709 maxVal = k 1710 maxVal = k
@@ -1714,21 +1715,30 @@ function RolePlugin.bind(Role) @@ -1714,21 +1715,30 @@ function RolePlugin.bind(Role)
1714 end 1715 end
1715 if oldVal < k and newVal > k then 1716 if oldVal < k and newVal > k then
1716 gift = gift .. v.reward .. " " 1717 gift = gift .. v.reward .. " "
  1718 +
  1719 + table.insert(checkPoint, k)
1717 end 1720 end
1718 end 1721 end
1719 if newVal > maxVal then 1722 if newVal > maxVal then
1720 local cnt = 0 1723 local cnt = 0
  1724 + local oldCheckPoint = 0
1721 if oldVal < maxVal then 1725 if oldVal < maxVal then
1722 cnt = math.floor((newVal - maxVal) / diff) 1726 cnt = math.floor((newVal - maxVal) / diff)
  1727 + oldCheckPoint = maxVal
1723 else 1728 else
1724 cnt = math.floor((newVal - maxVal) / diff) - math.floor((oldVal - maxVal) / diff) 1729 cnt = math.floor((newVal - maxVal) / diff) - math.floor((oldVal - maxVal) / diff)
  1730 + oldCheckPoint = maxVal + math.floor((oldVal - maxVal) / diff) * diff
1725 end 1731 end
1726 for i = 1, cnt do 1732 for i = 1, cnt do
1727 gift = gift .. extraReward .. " " 1733 gift = gift .. extraReward .. " "
  1734 +
  1735 + table.insert(checkPoint, oldCheckPoint + i * diff)
1728 end 1736 end
1729 end 1737 end
1730 -  
1731 - return gift 1738 + table.sort(checkPoint, function(a, b)
  1739 + return a < b
  1740 + end)
  1741 + return gift, checkPoint
1732 end 1742 end
1733 1743
1734 end 1744 end