mirror of
https://github.com/Melledy/Nebula.git
synced 2026-11-04 21:36:51 +01:00
Implement vampire survivor records
This commit is contained in:
1 parent
300d51aaf2
commit
30d0dfbaee
9 files changed
+165
-17
No files matched your search
@@ -4,6 +4,7 @@ import emu.nebula.net.NetHandler;
|
||||
import emu.nebula.net.NetMsgId;
|
||||
import emu.nebula.proto.VampireTalentDetail.VampireTalentDetailResp;
|
||||
import emu.nebula.net.HandlerId;
|
||||
|
||||
import emu.nebula.net.GameSession;
|
||||
|
||||
@HandlerId(NetMsgId.vampire_talent_detail_req)
|
||||
@@ -11,9 +12,13 @@ public class HandlerVampireTalentDetailReq extends NetHandler {
|
||||
|
||||
@Override
|
||||
public byte[] handle(GameSession session, byte[] message) throws Exception {
|
||||
// Get vampire surv manager
|
||||
var manager = session.getPlayer().getVampireSurvivorManager();
|
||||
|
||||
// Build response
|
||||
var rsp = VampireTalentDetailResp.newInstance()
|
||||
.setNodes(new byte[8]);
|
||||
.setNodes(manager.getTalents().toByteArray())
|
||||
.setActiveCount(manager.getTalentPoints());
|
||||
|
||||
// Encode and send
|
||||
return session.encodeMsg(NetMsgId.vampire_talent_detail_succeed_ack, rsp);
|
||||
|
||||
Reference in new issue
Block a user