mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Merge branch 'fix-room-rights' into 'dev'
Users with rights must not remove items from the room owner See merge request morningstar/Arcturus-Community!489
This commit is contained in:
commit
469ec8a8f7
@ -9,7 +9,7 @@ import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
public class RoomPickupItemEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
int unknown = this.packet.readInt();
|
||||
int category = this.packet.readInt(); //10 = floorItem and 20 = wallItem
|
||||
int itemId = this.packet.readInt();
|
||||
|
||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||
@ -31,6 +31,8 @@ public class RoomPickupItemEvent extends MessageHandler {
|
||||
if (room.hasRights(this.client.getHabbo())) {
|
||||
if (this.client.getHabbo().hasPermission(Permission.ACC_ANYROOMOWNER)) {
|
||||
item.setUserId(this.client.getHabbo().getHabboInfo().getId());
|
||||
} else if (this.client.getHabbo().getHabboInfo().getId() != room.getOwnerId() && item.getUserId() == room.getOwnerId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
room.ejectUserItem(item);
|
||||
|
Loading…
Reference in New Issue
Block a user