public void execute(GameSession gameSession, IByteBuffer buffer) { var cmd = new PetGearActivationRequest(); cmd.readCommand(buffer); gameSession.Player.Pet?.Controller?.SwitchGear((GearType)cmd.gearTypeToActivate.typeValue, cmd.optParam); }
public void execute(GameSession gameSession, byte[] bytes) { var read = new PetGearActivationRequest(); read.readCommand(bytes); var player = gameSession.Player; player.Pet.SwitchGear(read.gearTypeToActivate.typeValue); }
public void execute(GameSession gameSession, byte[] bytes) { var read = new PetGearActivationRequest(); read.readCommand(bytes); var player = gameSession.Player; if (player.Pet == null) { return; } player.Pet.SwitchGear(read.gearId); }