mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Merge branch 'bot-place-fix' into 'dev'
fixed multiple bots on one tile See merge request morningstar/Arcturus-Community!259
This commit is contained in:
commit
e7532b4d5c
@ -122,6 +122,11 @@ public class BotManager {
|
|||||||
if (room.hasHabbosAt(location.x, location.y) || (!location.isWalkable() && location.state != RoomTileState.SIT && location.state != RoomTileState.LAY))
|
if (room.hasHabbosAt(location.x, location.y) || (!location.isWalkable() && location.state != RoomTileState.SIT && location.state != RoomTileState.LAY))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (room.hasBotsAt(location.x, location.y)) {
|
||||||
|
habbo.getClient().sendResponse(new BotErrorComposer(BotErrorComposer.ROOM_ERROR_BOTS_SELECTED_TILE_NOT_FREE));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RoomUnit roomUnit = new RoomUnit();
|
RoomUnit roomUnit = new RoomUnit();
|
||||||
roomUnit.setRotation(RoomUserRotation.SOUTH);
|
roomUnit.setRotation(RoomUserRotation.SOUTH);
|
||||||
roomUnit.setLocation(location);
|
roomUnit.setLocation(location);
|
||||||
|
@ -559,7 +559,7 @@ public class RoomManager {
|
|||||||
if (room.getPassword().equalsIgnoreCase(password))
|
if (room.getPassword().equalsIgnoreCase(password))
|
||||||
this.openRoom(habbo, room, doorLocation);
|
this.openRoom(habbo, room, doorLocation);
|
||||||
else {
|
else {
|
||||||
habbo.getClient().sendResponse(new GenericErrorMessagesComposer(-100002));
|
habbo.getClient().sendResponse(new GenericErrorMessagesComposer(GenericErrorMessagesComposer.WRONG_PASSWORD_USED));
|
||||||
habbo.getClient().sendResponse(new HotelViewComposer());
|
habbo.getClient().sendResponse(new HotelViewComposer());
|
||||||
habbo.getHabboInfo().setLoadingRoom(0);
|
habbo.getHabboInfo().setLoadingRoom(0);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ public class GenericErrorMessagesComposer extends MessageComposer {
|
|||||||
public static final int NEED_TO_BE_VIP = 4009;
|
public static final int NEED_TO_BE_VIP = 4009;
|
||||||
public static final int ROOM_NAME_UNACCEPTABLE = 4010;
|
public static final int ROOM_NAME_UNACCEPTABLE = 4010;
|
||||||
public static final int CANNOT_BAN_GROUP_MEMBER = 4011;
|
public static final int CANNOT_BAN_GROUP_MEMBER = 4011;
|
||||||
|
public static final int WRONG_PASSWORD_USED = -100002;
|
||||||
|
|
||||||
private final int errorCode;
|
private final int errorCode;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user