Update to the latest version, also implement daily mall gift

This commit is contained in:
Melledy committed 2026-02-23 21:06:26 -08:00
1 parent 300a838e06
commit 8809b1646e
6 files changed
+76 -20

No files matched your search

@@ -0,0 +1,24 @@
package emu.nebula.server.handlers;
import emu.nebula.net.NetHandler;
import emu.nebula.net.NetMsgId;
import emu.nebula.net.HandlerId;
import emu.nebula.net.GameSession;
@HandlerId(NetMsgId.daily_mall_reward_receive_req)
public class HandlerDailyMallRewardReceiveReq extends NetHandler {
@Override
public byte[] handle(GameSession session, byte[] message) throws Exception {
// Claim daily reward
var change = session.getPlayer().getQuestManager().claimDailyMallGift();
if (change == null) {
return session.encodeMsg(NetMsgId.daily_mall_reward_receive_failed_ack);
}
// Encode and send
return session.encodeMsg(NetMsgId.daily_mall_reward_receive_succeed_ack, change.toProto());
}
}