Commit 59acc11e9b1f0610999998140879d6bff7fe8600
1 parent
c4817e41
赛季更新
Showing
4 changed files
with
18 additions
and
1 deletions
Show diff stats
src/ProtocolCode.lua
src/actions/HttpAction.lua
... | ... | @@ -197,6 +197,11 @@ function _M.broadcast(query) |
197 | 197 | return "广播成功" |
198 | 198 | end |
199 | 199 | |
200 | +function _M.endless_season_check() | |
201 | + mcast_util.pub_world(actionCodes.Sys_endlessSeason, "") | |
202 | + return "success" | |
203 | +end | |
204 | + | |
200 | 205 | function _M.online(query) |
201 | 206 | local count = datacenter.get("onlineCount") or 0 |
202 | 207 | return count | ... | ... |
src/adv/AdvPlayer.lua
... | ... | @@ -414,7 +414,9 @@ function BaseObject:recover(value, releaser, params) |
414 | 414 | params = params or {} |
415 | 415 | value = math.max(0, math.ceil(value)) |
416 | 416 | self.hp = math.min(self.hpMax, self.hp + value) |
417 | - self.battle.adv:pushBackEvent(AdvBackEventType.HpChange, {change = value}) | |
417 | + if self:is("Player") then | |
418 | + self.battle.adv:pushBackEvent(AdvBackEventType.HpChange, {change = value}) | |
419 | + end | |
418 | 420 | end |
419 | 421 | |
420 | 422 | function BaseObject:addSpecialSkill(skillId, skillLevel, target) | ... | ... |
src/agent.lua
... | ... | @@ -51,6 +51,15 @@ end |
51 | 51 | |
52 | 52 | local _pipelinings = {} --可同时多个序列 栈的形式保证嵌套不出错 |
53 | 53 | function SendPacket(actionCode, bin, client_fd) |
54 | + -- 内部消息不扩散出去 | |
55 | + if actionCode == actionCodes.Sys_endlessSeason then | |
56 | + if agentInfo.role then | |
57 | + agentInfo.role:advEndlessSeasonCheck() | |
58 | + end | |
59 | + return | |
60 | + end | |
61 | + | |
62 | + | |
54 | 63 | client_fd = client_fd or agentInfo.client_fd |
55 | 64 | |
56 | 65 | local handlerName = actionHandlers[actionCode] | ... | ... |