mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-19 02:15:45 +01:00
Talent moving stamina cost
This commit is contained in:
@@ -4,7 +4,9 @@ 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 {
|
||||
@@ -12,9 +14,10 @@ public class HandlerEvtDoSkillSuccNotify extends PacketHandler {
|
||||
@Override
|
||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||
EvtDoSkillSuccNotify notify = EvtDoSkillSuccNotify.parseFrom(payload);
|
||||
// TODO: Will be used for deducting stamina for charged skills.
|
||||
|
||||
session.getPlayer().getStaminaManager().handleEvtDoSkillSuccNotify(session, notify);
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user