mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 15:36:27 +01:00
Merge branch 'patch/misc-packet-opt' into 'dev'
packet optimization See merge request morningstar/Arcturus-Community!498
This commit is contained in:
commit
2fe1796804
@ -6,6 +6,7 @@ import com.eu.habbo.habbohotel.modtool.ModToolSanctionItem;
|
||||
import com.eu.habbo.habbohotel.modtool.ModToolSanctions;
|
||||
import com.eu.habbo.habbohotel.navigation.NavigatorSavedSearch;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomManager;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboManager;
|
||||
import com.eu.habbo.habbohotel.users.clothingvalidation.ClothingValidationManager;
|
||||
@ -13,7 +14,6 @@ import com.eu.habbo.habbohotel.users.subscriptions.SubscriptionHabboClub;
|
||||
import com.eu.habbo.messages.NoAuthMessage;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.achievements.AchievementListComposer;
|
||||
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterAccountInfoComposer;
|
||||
import com.eu.habbo.messages.outgoing.gamecenter.GameCenterGameListComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
||||
@ -24,13 +24,13 @@ import com.eu.habbo.messages.outgoing.handshake.SecureLoginOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.handshake.AvailabilityStatusMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.handshake.PingComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryAchievementsComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.UserEffectsListComposer;
|
||||
import com.eu.habbo.messages.outgoing.modtool.CfhTopicsMessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.modtool.ModToolComposer;
|
||||
import com.eu.habbo.messages.outgoing.modtool.ModToolSanctionInfoComposer;
|
||||
import com.eu.habbo.messages.outgoing.navigator.*;
|
||||
import com.eu.habbo.messages.outgoing.unknown.BuildersClubExpiredComposer;
|
||||
import com.eu.habbo.messages.outgoing.mysterybox.MysteryBoxKeysComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.*;
|
||||
import com.eu.habbo.plugin.events.emulator.SSOAuthenticationEvent;
|
||||
import com.eu.habbo.plugin.events.users.UserLoginEvent;
|
||||
@ -73,9 +73,7 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
|
||||
if (sso.isEmpty()) {
|
||||
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
||||
if (Emulator.getConfig().getBoolean("debug.mode")) {
|
||||
LOGGER.warn("Client is trying to connect without SSO ticket! Closed connection...");
|
||||
}
|
||||
LOGGER.debug("Client is trying to connect without SSO ticket! Closed connection...");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -117,7 +115,15 @@ 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());
|
||||
|
||||
int roomIdToEnter = 0;
|
||||
|
||||
if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && this.client.getHabbo().getHabboInfo().getHomeRoom() != 0)
|
||||
roomIdToEnter = this.client.getHabbo().getHabboInfo().getHomeRoom();
|
||||
else if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && RoomManager.HOME_ROOM_ID > 0)
|
||||
roomIdToEnter = RoomManager.HOME_ROOM_ID;
|
||||
|
||||
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), roomIdToEnter).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());
|
||||
@ -127,7 +133,7 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
messages.add(new EnableNotificationsComposer(Emulator.getConfig().getBoolean("bubblealerts.enabled", true)).compose());
|
||||
messages.add(new UserAchievementScoreComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new IsFirstLoginOfDayComposer(true).compose());
|
||||
messages.add(new UnknownComposer5().compose());
|
||||
messages.add(new MysteryBoxKeysComposer().compose());
|
||||
messages.add(new BuildersClubExpiredComposer().compose());
|
||||
messages.add(new CfhTopicsMessageComposer().compose());
|
||||
messages.add(new FavoriteRoomsCountComposer(this.client.getHabbo()).compose());
|
||||
@ -135,8 +141,6 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
messages.add(new GameCenterAccountInfoComposer(3, 100).compose());
|
||||
messages.add(new GameCenterAccountInfoComposer(0, 100).compose());
|
||||
|
||||
//messages.add(new MessengerInitComposer(this.client.getHabbo()).compose());
|
||||
//messages.add(new FriendsComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new UserClubComposer(this.client.getHabbo(), SubscriptionHabboClub.HABBO_CLUB, UserClubComposer.RESPONSE_TYPE_LOGIN).compose());
|
||||
|
||||
if (this.client.getHabbo().hasPermission(Permission.ACC_SUPPORTTOOL)) {
|
||||
@ -146,16 +150,8 @@ public class SecureLoginEvent extends MessageHandler {
|
||||
this.client.sendResponses(messages);
|
||||
|
||||
//Hardcoded
|
||||
this.client.sendResponse(new NewNavigatorSettingsComposer(this.client.getHabbo().getHabboStats().navigatorWindowSettings));
|
||||
this.client.sendResponse(new NewNavigatorMetaDataComposer());
|
||||
this.client.sendResponse(new NewNavigatorLiftedRoomsComposer());
|
||||
this.client.sendResponse(new NewNavigatorCollapsedCategoriesComposer());
|
||||
this.client.sendResponse(new NewNavigatorSavedSearchesComposer(this.client.getHabbo().getHabboInfo().getSavedSearches()));
|
||||
this.client.sendResponse(new NewNavigatorEventCategoriesComposer());
|
||||
this.client.sendResponse(new InventoryRefreshComposer());
|
||||
//this.client.sendResponse(new ForumsTestComposer());
|
||||
this.client.sendResponse(new InventoryAchievementsComposer());
|
||||
this.client.sendResponse(new AchievementListComposer(this.client.getHabbo()));
|
||||
|
||||
ModToolSanctions modToolSanctions = Emulator.getGameEnvironment().getModToolSanctions();
|
||||
|
||||
|
@ -12,6 +12,5 @@ public class RequestNewNavigatorDataEvent extends MessageHandler {
|
||||
this.client.sendResponse(new NewNavigatorCollapsedCategoriesComposer());
|
||||
this.client.sendResponse(new NewNavigatorSavedSearchesComposer(this.client.getHabbo().getHabboInfo().getSavedSearches()));
|
||||
this.client.sendResponse(new NewNavigatorEventCategoriesComposer());
|
||||
this.client.sendResponse(new NewNavigatorSettingsComposer(this.client.getHabbo().getHabboStats().navigatorWindowSettings));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,11 +43,6 @@ public class RequestUserDataEvent extends MessageHandler {
|
||||
messages.add(new UserDataComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new UserPerksComposer(this.client.getHabbo()).compose());
|
||||
|
||||
if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && this.client.getHabbo().getHabboInfo().getHomeRoom() != 0)
|
||||
messages.add(new ForwardToRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom()).compose());
|
||||
else if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && RoomManager.HOME_ROOM_ID > 0)
|
||||
messages.add(new ForwardToRoomComposer(RoomManager.HOME_ROOM_ID).compose());
|
||||
|
||||
messages.add(new MeMenuSettingsComposer(this.client.getHabbo()).compose());
|
||||
|
||||
|
||||
|
@ -212,7 +212,7 @@ public class Outgoing {
|
||||
|
||||
//Uknown but work
|
||||
public final static int IsFirstLoginOfDayComposer = 793; // PRODUCTION-201611291003-338511768 //Quest Engine
|
||||
public final static int UnknownComposer5 = 2833; // PRODUCTION-201611291003-338511768 //Mysterbox
|
||||
public final static int MysteryBoxKeysComposer = 2833; // PRODUCTION-201611291003-338511768 //Mysterbox
|
||||
public final static int IgnoredUsersComposer = 126; // PRODUCTION-201611291003-338511768
|
||||
public final static int NewNavigatorMetaDataComposer = 3052; // PRODUCTION-201611291003-338511768
|
||||
public final static int NewNavigatorSearchResultsComposer = 2690; // PRODUCTION-201611291003-338511768
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.eu.habbo.messages.incoming.handshake;
|
||||
package com.eu.habbo.messages.outgoing.mysterybox;
|
||||
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class UnknownComposer5 extends MessageComposer {
|
||||
public class MysteryBoxKeysComposer extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.UnknownComposer5);
|
||||
this.response.init(Outgoing.MysteryBoxKeysComposer);
|
||||
this.response.appendString(""); //Box color
|
||||
this.response.appendString(""); //Key color
|
||||
return this.response;
|
@ -1,14 +0,0 @@
|
||||
package com.eu.habbo.messages.outgoing.unknown;
|
||||
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class UnknownComposer5 extends MessageComposer {
|
||||
@Override
|
||||
protected ServerMessage composeInternal() {
|
||||
this.response.init(Outgoing.UnknownComposer5);
|
||||
this.response.appendInt(0);
|
||||
return this.response;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user