Mannequin save look event now checks for acc_anyroomowner

This commit is contained in:
Remco 2021-02-02 18:18:08 +01:00 committed by Thijmen Stavenuiter
parent 64b75a0be6
commit e62973f5d1

View File

@ -1,16 +1,19 @@
package com.eu.habbo.messages.incoming.rooms.items; package com.eu.habbo.messages.incoming.rooms.items;
import com.eu.habbo.Emulator; import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.permissions.Permission;
import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.habbohotel.users.HabboItem; import com.eu.habbo.habbohotel.users.HabboItem;
import com.eu.habbo.messages.incoming.MessageHandler; import com.eu.habbo.messages.incoming.MessageHandler;
public class MannequinSaveLookEvent extends MessageHandler { public class MannequinSaveLookEvent extends MessageHandler {
@Override @Override
public void handle() throws Exception { public void handle() throws Exception {
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom(); Habbo habbo = this.client.getHabbo();
Room room = habbo.getHabboInfo().getCurrentRoom();
if (room == null || this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId()) if (room == null || !room.isOwner(habbo))
return; return;
HabboItem item = room.getHabboItem(this.packet.readInt()); HabboItem item = room.getHabboItem(this.packet.readInt());