mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Item Pick up fix
This commit is contained in:
parent
c08c57db3c
commit
a46b38920e
@ -801,7 +801,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (habbo.getRoomUnit().getEffectId() > 0 && millis / 1000 > habbo.getRoomUnit().getEffectEndTimestamp()) {
|
if (habbo.getRoomUnit().getEffectId() > 0 && millis / 1000 > habbo.getRoomUnit().getEffectEndTimestamp()) {
|
||||||
habbo.getRoomUnit().giveEffect(0, -1)
|
habbo.getRoomUnit().giveEffect(0, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (habbo.getRoomUnit().isKicked()) {
|
if (habbo.getRoomUnit().isKicked()) {
|
||||||
@ -2892,10 +2892,6 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ejectUserItem(RoomItem item) {
|
|
||||||
this.getRoomItemManager().pickUpItem(item, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ejectAll() {
|
public void ejectAll() {
|
||||||
this.ejectAll(null);
|
this.ejectAll(null);
|
||||||
}
|
}
|
||||||
|
@ -574,6 +574,10 @@ public class RoomItemManager {
|
|||||||
Emulator.getThreading().run(item);
|
Emulator.getThreading().run(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ejectUserItem(RoomItem item) {
|
||||||
|
this.pickUpItem(item, null);
|
||||||
|
}
|
||||||
|
|
||||||
public FurnitureMovementError furnitureFitsAt(RoomTile tile, RoomItem item, int rotation, boolean checkForUnits) {
|
public FurnitureMovementError furnitureFitsAt(RoomTile tile, RoomItem item, int rotation, boolean checkForUnits) {
|
||||||
if (!this.room.getLayout().fitsOnMap(tile, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation))
|
if (!this.room.getLayout().fitsOnMap(tile, item.getBaseItem().getWidth(), item.getBaseItem().getLength(), rotation))
|
||||||
return FurnitureMovementError.INVALID_MOVE;
|
return FurnitureMovementError.INVALID_MOVE;
|
||||||
|
@ -14,16 +14,15 @@ public class PickupObjectEvent extends MessageHandler {
|
|||||||
|
|
||||||
Room room = this.client.getHabbo().getRoomUnit().getRoom();
|
Room room = this.client.getHabbo().getRoomUnit().getRoom();
|
||||||
|
|
||||||
if (room == null)
|
if (room == null) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RoomItem item = room.getHabboItem(itemId);
|
RoomItem item = room.getHabboItem(itemId);
|
||||||
|
|
||||||
if (item == null)
|
if (item == null || item instanceof InteractionPostIt) {
|
||||||
return;
|
|
||||||
|
|
||||||
if (item instanceof InteractionPostIt)
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (item.getUserId() == this.client.getHabbo().getHabboInfo().getId()) {
|
if (item.getUserId() == this.client.getHabbo().getHabboInfo().getId()) {
|
||||||
room.getRoomItemManager().pickUpItem(item, this.client.getHabbo());
|
room.getRoomItemManager().pickUpItem(item, this.client.getHabbo());
|
||||||
@ -32,14 +31,14 @@ public class PickupObjectEvent extends MessageHandler {
|
|||||||
if (this.client.getHabbo().hasRight(Permission.ACC_ANYROOMOWNER)) {
|
if (this.client.getHabbo().hasRight(Permission.ACC_ANYROOMOWNER)) {
|
||||||
item.setUserId(this.client.getHabbo().getHabboInfo().getId());
|
item.setUserId(this.client.getHabbo().getHabboInfo().getId());
|
||||||
} else {
|
} else {
|
||||||
if (this.client.getHabbo().getHabboInfo().getId() != room.getRoomInfo().getOwnerInfo().getId()) {
|
if (!room.getRoomInfo().isRoomOwner(this.client.getHabbo())) {
|
||||||
if (item.getUserId() == room.getRoomInfo().getOwnerInfo().getId()) {
|
if (item.getUserId() == room.getRoomInfo().getOwnerInfo().getId()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
room.ejectUserItem(item);
|
room.getRoomItemManager().ejectUserItem(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user