From 4c7d396c10bb21ca770265542d41f4677ace0696 Mon Sep 17 00:00:00 2001 From: zhouhaihai Date: Wed, 26 Aug 2020 14:40:39 +0800 Subject: [PATCH] 不回复 更改看板娘 --- src/ProtocolCode.lua | 2 +- src/actions/HeroAction.lua | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ProtocolCode.lua b/src/ProtocolCode.lua index 9da88ab..3dba2e3 100644 --- a/src/ProtocolCode.lua +++ b/src/ProtocolCode.lua @@ -90,7 +90,7 @@ actionCodes = { Hero_drawHeroRpc = 220, Hero_repayHeroRpc = 221, Hero_unlockPoolRpc = 222, - Hero_changeCrownRpc = 223, + Hero_changeCrown = 223, Hang_startRpc = 251, Hang_checkRpc = 252, diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 068c521..1b5fba8 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -941,19 +941,18 @@ function _M.unlockPoolRpc(agent, data) return true end -function _M.changeCrownRpc(agnet, data) +function _M.changeCrown(agnet, data) local role = agent.role local msg = MsgPack.unpack(data) local heroType = msg.heroType - if not role:isHaveHero(heroType) then return end + if not role:isHaveHero(heroType) then return true end role:setProperty("crown", heroType) role:log("hero_show", { hero_id = heroType, }) - SendPacket(actionCodes.Hero_changeCrownRpc, "") return true end -- libgit2 0.21.2