fix homeroom packet

This commit is contained in:
dank074 2022-03-18 18:30:14 -05:00
parent 53fb788fd0
commit 1e32abe426
3 changed files with 6 additions and 6 deletions

View File

@ -114,7 +114,7 @@ public class SecureLoginEvent extends MessageHandler {
ArrayList<ServerMessage> messages = new ArrayList<>();
messages.add(new SecureLoginOKComposer().compose());
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), 0).compose());
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose());
messages.add(new UserEffectsListComposer(habbo, this.client.getHabbo().getInventory().getEffectsComponent().effects.values()).compose());
messages.add(new UserClothesComposer(this.client.getHabbo()).compose());
messages.add(new NewUserIdentityComposer(habbo).compose());

View File

@ -10,7 +10,7 @@ public class SetHomeRoomEvent extends MessageHandler {
if (roomId != this.client.getHabbo().getHabboInfo().getHomeRoom()) {
this.client.getHabbo().getHabboInfo().setHomeRoom(roomId);
this.client.sendResponse(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()));
this.client.sendResponse(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), 0));
}
}
}

View File

@ -6,18 +6,18 @@ import com.eu.habbo.messages.outgoing.Outgoing;
public class UserHomeRoomComposer extends MessageComposer {
private final int homeRoom;
private final int newRoom;
private final int roomToEnter;
public UserHomeRoomComposer(int homeRoom, int newRoom) {
public UserHomeRoomComposer(int homeRoom, int roomToEnter) {
this.homeRoom = homeRoom;
this.newRoom = newRoom;
this.roomToEnter = roomToEnter;
}
@Override
protected ServerMessage composeInternal() {
this.response.init(Outgoing.UserHomeRoomComposer);
this.response.appendInt(this.homeRoom);
this.response.appendInt(this.newRoom);
this.response.appendInt(this.roomToEnter);
return this.response;
}
}