Ensure the user removing a saddle is the horse's owner

This commit is contained in:
Alejandro 2020-02-05 14:26:02 +02:00
parent a668cb9802
commit 5f5345c80c

View File

@ -22,7 +22,7 @@ public class HorseRemoveSaddleEvent extends MessageHandler {
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
Pet pet = room.getPet(this.packet.readInt());
if (pet == null || !(pet instanceof HorsePet)) return;
if (pet == null || !(pet instanceof HorsePet) || pet.getUserId() != this.client.getHabbo().getHabboInfo().getId()) return;
HorsePet horse = (HorsePet) pet;