mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +01:00
Start Renaming and Incoming Refactor
This commit is contained in:
parent
8c86ad5564
commit
a23fb4f8cd
@ -5,13 +5,13 @@ import com.eu.habbo.habbohotel.items.Item;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.outgoing.achievements.AchievementProgressComposer;
|
||||
import com.eu.habbo.messages.outgoing.achievements.AchievementComposer;
|
||||
import com.eu.habbo.messages.outgoing.achievements.AchievementUnlockedComposer;
|
||||
import com.eu.habbo.messages.outgoing.achievements.talenttrack.TalentLevelUpdateComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UserBadgesComposer;
|
||||
import com.eu.habbo.plugin.Event;
|
||||
import com.eu.habbo.plugin.events.users.achievements.UserAchievementLeveledEvent;
|
||||
@ -119,7 +119,7 @@ public class AchievementManager {
|
||||
|
||||
if (newLevel == null ||
|
||||
(oldLevel != null && (oldLevel.level == newLevel.level && newLevel.level < achievement.levels.size()))) {
|
||||
habbo.getClient().sendResponse(new AchievementProgressComposer(habbo, achievement));
|
||||
habbo.getClient().sendResponse(new AchievementComposer(habbo, achievement));
|
||||
} else {
|
||||
if (Emulator.getPluginManager().isRegistered(UserAchievementLeveledEvent.class, true)) {
|
||||
Event userAchievementLeveledEvent = new UserAchievementLeveledEvent(habbo, achievement, oldLevel, newLevel);
|
||||
@ -129,7 +129,7 @@ public class AchievementManager {
|
||||
return;
|
||||
}
|
||||
|
||||
habbo.getClient().sendResponse(new AchievementProgressComposer(habbo, achievement));
|
||||
habbo.getClient().sendResponse(new AchievementComposer(habbo, achievement));
|
||||
habbo.getClient().sendResponse(new AchievementUnlockedComposer(habbo, achievement));
|
||||
|
||||
//Exception could possibly arise when the user disconnects while being in tour.
|
||||
@ -157,7 +157,7 @@ public class AchievementManager {
|
||||
return;
|
||||
|
||||
badge = new HabboBadge(0, newBadgCode, 0, habbo);
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(badge));
|
||||
habbo.getClient().sendResponse(new BadgeReceivedComposer(badge));
|
||||
badge.needsInsert(true);
|
||||
badge.needsUpdate(true);
|
||||
habbo.getInventory().getBadgesComponent().addBadge(badge);
|
||||
@ -364,12 +364,10 @@ public class AchievementManager {
|
||||
if (level.badges != null && level.badges.length > 0) {
|
||||
for (String badge : level.badges) {
|
||||
if (!badge.isEmpty()) {
|
||||
if (!habbo.getInventory().getBadgesComponent().hasBadge(badge)) {
|
||||
HabboBadge b = new HabboBadge(0, badge, 0, habbo);
|
||||
Emulator.getThreading().run(b);
|
||||
habbo.getInventory().getBadgesComponent().addBadge(b);
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(b));
|
||||
}
|
||||
HabboBadge b = new HabboBadge(0, badge, 0, habbo);
|
||||
Emulator.getThreading().run(b);
|
||||
habbo.getInventory().getBadgesComponent().addBadge(b);
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(b));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package com.eu.habbo.habbohotel.catalog;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.achievements.AchievementManager;
|
||||
import com.eu.habbo.habbohotel.bots.Bot;
|
||||
import com.eu.habbo.habbohotel.campaign.calendar.CalendarRewardObject;
|
||||
import com.eu.habbo.habbohotel.catalog.layouts.*;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||
@ -19,7 +18,6 @@ import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.habbohotel.users.HabboGender;
|
||||
import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.outgoing.catalog.*;
|
||||
import com.eu.habbo.messages.outgoing.events.calendar.AdventCalendarProductComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddBotComposer;
|
||||
@ -27,7 +25,7 @@ import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddPetComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
||||
import com.eu.habbo.messages.outgoing.modtool.ModToolIssueHandledComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UserCreditsComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UserPointsComposer;
|
||||
import com.eu.habbo.plugin.events.emulator.EmulatorLoadCatalogManagerEvent;
|
||||
@ -1105,7 +1103,7 @@ public class CatalogManager {
|
||||
HabboBadge badge = new HabboBadge(0, b, 0, habbo);
|
||||
Emulator.getThreading().run(badge);
|
||||
habbo.getInventory().getBadgesComponent().addBadge(badge);
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(badge));
|
||||
habbo.getClient().sendResponse(new BadgeReceivedComposer(badge));
|
||||
THashMap<String, String> keys = new THashMap<>();
|
||||
keys.put("display", "BUBBLE");
|
||||
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.gameclients.GameClient;
|
||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.messages.outgoing.users.MeMenuSettingsComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.AccountPreferencesComposer;
|
||||
|
||||
public class ChatTypeCommand extends Command {
|
||||
public ChatTypeCommand() {
|
||||
@ -42,7 +42,7 @@ public class ChatTypeCommand extends Command {
|
||||
}
|
||||
|
||||
gameClient.getHabbo().getHabboStats().chatColor = RoomChatMessageBubbles.getBubble(chatColor);
|
||||
gameClient.sendResponse(new MeMenuSettingsComposer(gameClient.getHabbo()));
|
||||
gameClient.sendResponse(new AccountPreferencesComposer(gameClient.getHabbo()));
|
||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.succes.cmd_chatcolor.set").replace("%chat%", RoomChatMessageBubbles.values()[chatColor].name().replace("_", " ").toLowerCase()), RoomChatMessageBubbles.ALERT);
|
||||
return true;
|
||||
} else {
|
||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
import gnu.trove.map.hash.THashMap;
|
||||
|
||||
import java.util.Map;
|
||||
@ -41,7 +41,7 @@ public class MassBadgeCommand extends Command {
|
||||
HabboBadge b = BadgesComponent.createBadge(badge, habbo);
|
||||
|
||||
if (b != null) {
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(b));
|
||||
habbo.getClient().sendResponse(new BadgeReceivedComposer(b));
|
||||
|
||||
habbo.getClient().sendResponse(message);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertComposer;
|
||||
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
import gnu.trove.map.hash.THashMap;
|
||||
|
||||
public class RoomBadgeCommand extends Command {
|
||||
@ -39,7 +39,7 @@ public class RoomBadgeCommand extends Command {
|
||||
if (habbo.getInventory() != null && habbo.getInventory().getBadgesComponent() != null && !habbo.getInventory().getBadgesComponent().hasBadge(badge)) {
|
||||
HabboBadge b = BadgesComponent.createBadge(badge, habbo);
|
||||
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(b));
|
||||
habbo.getClient().sendResponse(new BadgeReceivedComposer(b));
|
||||
habbo.getClient().sendResponse(message);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@ import com.eu.habbo.messages.outgoing.rooms.FloodCounterComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.*;
|
||||
import com.eu.habbo.messages.outgoing.users.*;
|
||||
import com.eu.habbo.plugin.events.furniture.FurnitureBuildheightEvent;
|
||||
import com.eu.habbo.plugin.events.users.UserCreditsEvent;
|
||||
import com.eu.habbo.plugin.events.users.UserDisconnectEvent;
|
||||
import com.eu.habbo.plugin.events.users.UserGetIPAddressEvent;
|
||||
@ -385,7 +384,7 @@ public class Habbo implements Runnable {
|
||||
if (!this.habboInventory.getBadgesComponent().hasBadge(code)) {
|
||||
HabboBadge badge = BadgesComponent.createBadge(code, this);
|
||||
this.habboInventory.getBadgesComponent().addBadge(badge);
|
||||
this.client.sendResponse(new AddUserBadgeComposer(badge));
|
||||
this.client.sendResponse(new BadgeReceivedComposer(badge));
|
||||
this.client.sendResponse(new AddHabboItemComposer(badge.getId(), AddHabboItemComposer.AddHabboItemCategory.BADGE));
|
||||
|
||||
THashMap<String, String> keys = new THashMap<>();
|
||||
|
@ -21,7 +21,7 @@ import com.eu.habbo.habbohotel.users.HabboItem;
|
||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
import com.eu.habbo.messages.outgoing.wired.WiredRewardAlertComposer;
|
||||
import com.eu.habbo.plugin.events.furniture.wired.WiredConditionFailedEvent;
|
||||
import com.eu.habbo.plugin.events.furniture.wired.WiredStackExecutedEvent;
|
||||
@ -313,7 +313,7 @@ public class WiredHandler {
|
||||
HabboBadge badge = new HabboBadge(0, rewardReceived.value, 0, habbo);
|
||||
Emulator.getThreading().run(badge);
|
||||
habbo.getInventory().getBadgesComponent().addBadge(badge);
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(badge));
|
||||
habbo.getClient().sendResponse(new BadgeReceivedComposer(badge));
|
||||
habbo.getClient().sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_BADGE));
|
||||
} else {
|
||||
String[] data = reward.data.split("#");
|
||||
|
@ -521,7 +521,7 @@ public class PacketManager {
|
||||
this.registerHandler(Incoming.RequestGuildPartsEvent, RequestGuildPartsEvent.class);
|
||||
this.registerHandler(Incoming.RequestGuildBuyEvent, RequestGuildBuyEvent.class);
|
||||
this.registerHandler(Incoming.RequestGuildInfoEvent, RequestGuildInfoEvent.class);
|
||||
this.registerHandler(Incoming.RequestGuildManageEvent, RequestGuildManageEvent.class);
|
||||
this.registerHandler(Incoming.GetGuildEditInfoEvent, RequestGuildManageEvent.class);
|
||||
this.registerHandler(Incoming.RequestGuildMembersEvent, RequestGuildMembersEvent.class);
|
||||
this.registerHandler(Incoming.RequestGuildJoinEvent, RequestGuildJoinEvent.class);
|
||||
this.registerHandler(Incoming.GuildChangeNameDescEvent, GuildChangeNameDescEvent.class);
|
||||
|
@ -187,7 +187,7 @@ public class Incoming {
|
||||
public static final int RequestUserCitizinShipEvent = 2127;
|
||||
public static final int RoomUserStopTypingEvent = 1474;
|
||||
public static final int RoomUserStartTypingEvent = 1597;
|
||||
public static final int RequestGuildManageEvent = 1004;
|
||||
public static final int GetGuildEditInfoEvent = 1004;
|
||||
public static final int RequestUserClubEvent = 3166;
|
||||
public static final int PetPickupEvent = 1581;
|
||||
public static final int RequestOwnGuildsEvent = 367;
|
||||
|
@ -121,7 +121,7 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
||||
HabboBadge badge = new HabboBadge(0, i.getName(), 0, this.client.getHabbo());
|
||||
Emulator.getThreading().run(badge);
|
||||
this.client.getHabbo().getInventory().getBadgesComponent().addBadge(badge);
|
||||
this.client.sendResponse(new AddUserBadgeComposer(badge));
|
||||
this.client.sendResponse(new BadgeReceivedComposer(badge));
|
||||
THashMap<String, String> keys = new THashMap<>();
|
||||
keys.put("display", "BUBBLE");
|
||||
keys.put("image", "${image.library.url}album1584/" + badge.getCode() + ".gif");
|
||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.habbohotel.users.inventory.BadgesComponent;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
|
||||
public class HotelViewClaimBadgeRewardEvent extends MessageHandler {
|
||||
@Override
|
||||
@ -17,7 +17,7 @@ public class HotelViewClaimBadgeRewardEvent extends MessageHandler {
|
||||
if (!badgeCode.isEmpty()) {
|
||||
if (!this.client.getHabbo().getInventory().getBadgesComponent().hasBadge(badgeCode)) {
|
||||
HabboBadge badge = BadgesComponent.createBadge(badgeCode, this.client.getHabbo());
|
||||
this.client.sendResponse(new AddUserBadgeComposer(badge));
|
||||
this.client.sendResponse(new BadgeReceivedComposer(badge));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.polls.Poll;
|
||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
import com.eu.habbo.messages.outgoing.wired.WiredRewardAlertComposer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -56,7 +56,7 @@ public class AnswerPollEvent extends MessageHandler {
|
||||
HabboBadge badge = new HabboBadge(0, poll.badgeReward, 0, this.client.getHabbo());
|
||||
Emulator.getThreading().run(badge);
|
||||
this.client.getHabbo().getInventory().getBadgesComponent().addBadge(badge);
|
||||
this.client.sendResponse(new AddUserBadgeComposer(badge));
|
||||
this.client.sendResponse(new BadgeReceivedComposer(badge));
|
||||
this.client.sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_RECEIVED_BADGE));
|
||||
} else {
|
||||
this.client.sendResponse(new WiredRewardAlertComposer(WiredRewardAlertComposer.REWARD_ALREADY_RECEIVED));
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.eu.habbo.messages.incoming.users;
|
||||
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.users.MeMenuSettingsComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.AccountPreferencesComposer;
|
||||
|
||||
public class RequestMeMenuSettingsEvent extends MessageHandler {
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
this.client.sendResponse(new MeMenuSettingsComposer(this.client.getHabbo()));
|
||||
this.client.sendResponse(new AccountPreferencesComposer(this.client.getHabbo()));
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
package com.eu.habbo.messages.incoming.users;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomManager;
|
||||
import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||
import com.eu.habbo.messages.outgoing.rooms.ForwardToRoomComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.MeMenuSettingsComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.AccountPreferencesComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UserDataComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UserPerksComposer;
|
||||
import org.slf4j.Logger;
|
||||
@ -43,7 +41,7 @@ public class RequestUserDataEvent extends MessageHandler {
|
||||
messages.add(new UserDataComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new UserPerksComposer(this.client.getHabbo()).compose());
|
||||
|
||||
messages.add(new MeMenuSettingsComposer(this.client.getHabbo()).compose());
|
||||
messages.add(new AccountPreferencesComposer(this.client.getHabbo()).compose());
|
||||
|
||||
|
||||
//
|
||||
|
@ -8,11 +8,11 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class AchievementProgressComposer extends MessageComposer {
|
||||
public class AchievementComposer extends MessageComposer {
|
||||
private final Habbo habbo;
|
||||
private final Achievement achievement;
|
||||
|
||||
public AchievementProgressComposer(Habbo habbo, Achievement achievement) {
|
||||
public AchievementComposer(Habbo habbo, Achievement achievement) {
|
||||
this.habbo = habbo;
|
||||
this.achievement = achievement;
|
||||
}
|
@ -4,10 +4,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class NewYearResolutionCompletedComposer extends MessageComposer {
|
||||
public class AchievementResolutionCompletedMessageComposer extends MessageComposer {
|
||||
public final String badge;
|
||||
|
||||
public NewYearResolutionCompletedComposer(String badge) {
|
||||
public AchievementResolutionCompletedMessageComposer(String badge) {
|
||||
this.badge = badge;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class NewYearResolutionProgressComposer extends MessageComposer {
|
||||
public class AchievementResolutionProgressMessageComposer extends MessageComposer {
|
||||
private final int stuffId;
|
||||
private final int achievementId;
|
||||
private final String achievementName;
|
||||
@ -12,7 +12,7 @@ public class NewYearResolutionProgressComposer extends MessageComposer {
|
||||
private final int progressNeeded;
|
||||
private final int timeLeft;
|
||||
|
||||
public NewYearResolutionProgressComposer(int stuffId, int achievementId, String achievementName, int currentProgress, int progressNeeded, int timeLeft) {
|
||||
public AchievementResolutionProgressMessageComposer(int stuffId, int achievementId, String achievementName, int currentProgress, int progressNeeded, int timeLeft) {
|
||||
this.stuffId = stuffId;
|
||||
this.achievementId = achievementId;
|
||||
this.achievementName = achievementName;
|
@ -6,10 +6,10 @@ import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class MessengerErrorComposer extends MessageComposer {
|
||||
public class AcceptFriendResultComposer extends MessageComposer {
|
||||
private final Map<Integer, Integer> errors;
|
||||
|
||||
public MessengerErrorComposer(Map<Integer, Integer> errors) {
|
||||
public AcceptFriendResultComposer(Map<Integer, Integer> errors) {
|
||||
this.errors = errors;
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class UnknownStatusComposer extends MessageComposer {
|
||||
public class AccountSafetyLockStatusChangeMessageComposer extends MessageComposer {
|
||||
public final int STATUS_ZERO = 0;
|
||||
public final int STATUS_ONE = 1;
|
||||
|
||||
private final int status;
|
||||
|
||||
public UnknownStatusComposer(int status) {
|
||||
public AccountSafetyLockStatusChangeMessageComposer(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class MeMenuSettingsComposer extends MessageComposer {
|
||||
public class AccountPreferencesComposer extends MessageComposer {
|
||||
private final Habbo habbo;
|
||||
|
||||
public MeMenuSettingsComposer(Habbo habbo) {
|
||||
public AccountPreferencesComposer(Habbo habbo) {
|
||||
this.habbo = habbo;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ import com.eu.habbo.messages.ServerMessage;
|
||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||
|
||||
public class AddUserBadgeComposer extends MessageComposer {
|
||||
public class BadgeReceivedComposer extends MessageComposer {
|
||||
private final HabboBadge badge;
|
||||
|
||||
public AddUserBadgeComposer(HabboBadge badge) {
|
||||
public BadgeReceivedComposer(HabboBadge badge) {
|
||||
this.badge = badge;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.rcon;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboBadge;
|
||||
import com.eu.habbo.messages.outgoing.users.AddUserBadgeComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.BadgeReceivedComposer;
|
||||
import com.google.gson.Gson;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -48,7 +48,7 @@ public class GiveBadge extends RCONMessage<GiveBadge.GiveBadgeJSON> {
|
||||
badge.run();
|
||||
|
||||
habbo.getInventory().getBadgesComponent().addBadge(badge);
|
||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(badge));
|
||||
habbo.getClient().sendResponse(new BadgeReceivedComposer(badge));
|
||||
|
||||
this.message = Emulator.getTexts().getValue("commands.succes.cmd_badge.given").replace("%user%", username).replace("%badge%", badgeCode);
|
||||
}
|
||||
|
@ -1,21 +1,12 @@
|
||||
package com.eu.habbo.messages.rcon;
|
||||
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.habbohotel.users.HabboInfo;
|
||||
import com.eu.habbo.habbohotel.users.subscriptions.Subscription;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.MeMenuSettingsComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UpdateUserLookComposer;
|
||||
import com.google.gson.Gson;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class ModifyUserSubscription extends RCONMessage<ModifyUserSubscription.JSON> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ModifyUserSubscription.class);
|
||||
|
||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.rcon;
|
||||
import com.eu.habbo.Emulator;
|
||||
import com.eu.habbo.habbohotel.users.Habbo;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.MeMenuSettingsComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.AccountPreferencesComposer;
|
||||
import com.eu.habbo.messages.outgoing.users.UpdateUserLookComposer;
|
||||
import com.google.gson.Gson;
|
||||
import org.slf4j.Logger;
|
||||
@ -60,7 +60,7 @@ public class UpdateUser extends RCONMessage<UpdateUser.JSON> {
|
||||
}
|
||||
|
||||
habbo.getHabboStats().run();
|
||||
habbo.getClient().sendResponse(new MeMenuSettingsComposer(habbo));
|
||||
habbo.getClient().sendResponse(new AccountPreferencesComposer(habbo));
|
||||
} else {
|
||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) {
|
||||
try (PreparedStatement statement = connection.prepareStatement("UPDATE users_settings SET achievement_score = achievement_score + ? " +
|
||||
|
Loading…
Reference in New Issue
Block a user