mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Fix basic trials not rewarding materials
This commit is contained in:
@@ -16,19 +16,14 @@ public class HandlerCharGemInstanceApplyReq extends NetHandler {
|
||||
var req = CharGemInstanceApplyReq.parseFrom(message);
|
||||
|
||||
var data = GameData.getCharGemInstanceDataTable().get(req.getId());
|
||||
if (data == null) {
|
||||
if (data == null || !data.hasEnergy(session.getPlayer())) {
|
||||
return this.encodeMsg(NetMsgId.char_gem_instance_apply_failed_ack);
|
||||
}
|
||||
|
||||
// Check player energy
|
||||
if (data.getEnergyConsume() > session.getPlayer().getEnergy()) {
|
||||
return this.encodeMsg(NetMsgId.char_gem_instance_apply_failed_ack);
|
||||
}
|
||||
|
||||
// Set player
|
||||
// Set player instance id
|
||||
session.getPlayer().getInstanceManager().setCurInstanceId(req.getId());
|
||||
|
||||
// Template
|
||||
// Send response
|
||||
return this.encodeMsg(NetMsgId.char_gem_instance_apply_succeed_ack);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user