Commit c1849aa6e5b2f118bce57308eb51b5acba09e5e2
1 parent
284482c6
roleaction增加一个获取随机名字协议
Showing
2 changed files
with
7 additions
and
0 deletions
Show diff stats
src/ProtocolCode.lua
src/actions/RoleAction.lua
... | ... | @@ -352,6 +352,12 @@ function _M.changeNameRpc(agent, data) |
352 | 352 | return true |
353 | 353 | end |
354 | 354 | |
355 | +function _M.getRandomNameRpc() | |
356 | + local name = randomRoleName() | |
357 | + SendPacket(actionCodes.Role_getRandomNameRpc, MsgPack.pack({name = name})) | |
358 | + return true | |
359 | +end | |
360 | + | |
355 | 361 | function _M.changeIntroRpc(agent, data) |
356 | 362 | local role = agent.role |
357 | 363 | local roleId = role:getProperty("id") | ... | ... |