mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-18 01:46:44 +01:00
Move energy-related logic to a new EnergyManager.
This commit is contained in:
@@ -4,9 +4,7 @@ import emu.grasscutter.net.packet.Opcodes;
|
||||
import emu.grasscutter.net.packet.PacketHandler;
|
||||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||||
import emu.grasscutter.net.proto.EvtDoSkillSuccNotifyOuterClass.EvtDoSkillSuccNotify;
|
||||
import emu.grasscutter.net.proto.VectorOuterClass.Vector;
|
||||
import emu.grasscutter.server.game.GameSession;
|
||||
import emu.grasscutter.utils.Position;
|
||||
|
||||
@Opcodes(PacketOpcodes.EvtDoSkillSuccNotify)
|
||||
public class HandlerEvtDoSkillSuccNotify extends PacketHandler {
|
||||
@@ -16,9 +14,8 @@ public class HandlerEvtDoSkillSuccNotify extends PacketHandler {
|
||||
EvtDoSkillSuccNotify notify = EvtDoSkillSuccNotify.parseFrom(payload);
|
||||
int skillId = notify.getSkillId();
|
||||
int casterId = notify.getCasterId();
|
||||
Vector forwardVector = notify.getForward();
|
||||
Position forward = new Position(forwardVector.getX(), forwardVector.getY(), forwardVector.getZ());
|
||||
|
||||
session.getPlayer().getStaminaManager().handleEvtDoSkillSuccNotify(session, skillId, casterId);
|
||||
session.getPlayer().getTeamManager().handleEvtDoSkillSuccNotify(session, skillId, casterId);
|
||||
session.getPlayer().getEnergyManager().handleEvtDoSkillSuccNotify(session, skillId, casterId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user