Commit 4c7d396c10bb21ca770265542d41f4677ace0696
1 parent
3efc352e
不回复 更改看板娘
Showing
2 changed files
with
3 additions
and
4 deletions
Show diff stats
src/ProtocolCode.lua
| @@ -90,7 +90,7 @@ actionCodes = { | @@ -90,7 +90,7 @@ actionCodes = { | ||
| 90 | Hero_drawHeroRpc = 220, | 90 | Hero_drawHeroRpc = 220, |
| 91 | Hero_repayHeroRpc = 221, | 91 | Hero_repayHeroRpc = 221, |
| 92 | Hero_unlockPoolRpc = 222, | 92 | Hero_unlockPoolRpc = 222, |
| 93 | - Hero_changeCrownRpc = 223, | 93 | + Hero_changeCrown = 223, |
| 94 | 94 | ||
| 95 | Hang_startRpc = 251, | 95 | Hang_startRpc = 251, |
| 96 | Hang_checkRpc = 252, | 96 | Hang_checkRpc = 252, |
src/actions/HeroAction.lua
| @@ -941,19 +941,18 @@ function _M.unlockPoolRpc(agent, data) | @@ -941,19 +941,18 @@ function _M.unlockPoolRpc(agent, data) | ||
| 941 | return true | 941 | return true |
| 942 | end | 942 | end |
| 943 | 943 | ||
| 944 | -function _M.changeCrownRpc(agnet, data) | 944 | +function _M.changeCrown(agnet, data) |
| 945 | local role = agent.role | 945 | local role = agent.role |
| 946 | local msg = MsgPack.unpack(data) | 946 | local msg = MsgPack.unpack(data) |
| 947 | 947 | ||
| 948 | local heroType = msg.heroType | 948 | local heroType = msg.heroType |
| 949 | 949 | ||
| 950 | - if not role:isHaveHero(heroType) then return end | 950 | + if not role:isHaveHero(heroType) then return true end |
| 951 | role:setProperty("crown", heroType) | 951 | role:setProperty("crown", heroType) |
| 952 | 952 | ||
| 953 | role:log("hero_show", { | 953 | role:log("hero_show", { |
| 954 | hero_id = heroType, | 954 | hero_id = heroType, |
| 955 | }) | 955 | }) |
| 956 | - SendPacket(actionCodes.Hero_changeCrownRpc, "") | ||
| 957 | return true | 956 | return true |
| 958 | end | 957 | end |
| 959 | 958 |