mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-16 06:15:20 +01:00
Refactor how handlers encode messages
This commit is contained in:
@@ -20,7 +20,7 @@ public class HandlerDailyInstanceSettleReq extends NetHandler {
|
||||
// Get boss level data
|
||||
var data = GameData.getDailyInstanceDataTable().get(player.getInstanceManager().getCurInstanceId());
|
||||
if (data == null || !data.hasEnergy(player)) {
|
||||
return this.encodeMsg(NetMsgId.daily_instance_settle_failed_ack);
|
||||
return session.encodeMsg(NetMsgId.daily_instance_settle_failed_ack);
|
||||
}
|
||||
|
||||
// Parse request
|
||||
@@ -53,7 +53,7 @@ public class HandlerDailyInstanceSettleReq extends NetHandler {
|
||||
}
|
||||
|
||||
// Send response
|
||||
return this.encodeMsg(NetMsgId.daily_instance_settle_succeed_ack, rsp);
|
||||
return session.encodeMsg(NetMsgId.daily_instance_settle_succeed_ack, rsp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user