diff --git a/api/src/main/java/com/lunarclient/apollo/event/anticheat/ApolloPlayerAttackEvent.java b/api/src/main/java/com/lunarclient/apollo/event/anticheat/ApolloPlayerAttackEvent.java index 34e485ba..4c4694c4 100644 --- a/api/src/main/java/com/lunarclient/apollo/event/anticheat/ApolloPlayerAttackEvent.java +++ b/api/src/main/java/com/lunarclient/apollo/event/anticheat/ApolloPlayerAttackEvent.java @@ -35,10 +35,12 @@ @Value public class ApolloPlayerAttackEvent implements Event { + // TODO: docs long instantiationTimeMs; PlayerInfo playerInfo; PlayerInfo attackerInfo; + double distance; } diff --git a/common/src/main/java/com/lunarclient/apollo/module/anticheat/AntiCheatImpl.java b/common/src/main/java/com/lunarclient/apollo/module/anticheat/AntiCheatImpl.java index a56de10b..82257fea 100644 --- a/common/src/main/java/com/lunarclient/apollo/module/anticheat/AntiCheatImpl.java +++ b/common/src/main/java/com/lunarclient/apollo/module/anticheat/AntiCheatImpl.java @@ -51,8 +51,9 @@ private void onReceivePacket(ApolloReceivePacketEvent event) { event.unpack(PlayerAttackMessage.class).ifPresent(packet -> { ApolloPlayerAttackEvent playerAttackEvent = new ApolloPlayerAttackEvent( NetworkTypes.fromProtobuf(packet.getPacketInfo().getInstantiationTime()), - NetworkTypes.fromProtobuf(packet.getPlayerInfo()), - NetworkTypes.fromProtobuf(packet.getAttackerInfo()) + NetworkTypes.fromProtobuf(packet.getTargetInfo()), + NetworkTypes.fromProtobuf(packet.getAttackerInfo()), + packet.getDistance() ); EventBus.EventResult result = EventBus.getBus().post(playerAttackEvent);