mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Fixed issues with merging remaining 3.5 features into 4.0 branch
This commit is contained in:
parent
a5bc4f9c50
commit
717c7f313b
@ -367,7 +367,7 @@ public class AchievementManager {
|
|||||||
HabboBadge b = new HabboBadge(0, badge, 0, habbo);
|
HabboBadge b = new HabboBadge(0, badge, 0, habbo);
|
||||||
Emulator.getThreading().run(b);
|
Emulator.getThreading().run(b);
|
||||||
habbo.getInventory().getBadgesComponent().addBadge(b);
|
habbo.getInventory().getBadgesComponent().addBadge(b);
|
||||||
habbo.getClient().sendResponse(new AddUserBadgeComposer(b));
|
habbo.getClient().sendResponse(new BadgeReceivedComposer(b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ import com.eu.habbo.messages.ServerMessage;
|
|||||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.HabboBroadcastMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.GenericErrorComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
import com.eu.habbo.messages.outgoing.hotelview.CloseConnectionMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
|
import com.eu.habbo.messages.outgoing.inventory.UnseenItemsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer;
|
import com.eu.habbo.messages.outgoing.inventory.PetAddedToInventoryComposer;
|
||||||
@ -4285,7 +4285,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
|
|
||||||
if (!member.isPresent()) continue;
|
if (!member.isPresent()) continue;
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, member.get()));
|
habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, member.get()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildMemberMgmtFailedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildMemberMgmtFailedMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.guilds.GuildAcceptedMembershipEvent;
|
import com.eu.habbo.plugin.events.guilds.GuildAcceptedMembershipEvent;
|
||||||
|
|
||||||
@ -27,13 +27,13 @@ public class GuildAcceptMembershipEvent extends MessageHandler {
|
|||||||
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || groupMember.getRank().equals(GuildRank.ADMIN) || groupMember.getRank().equals(GuildRank.OWNER) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
if (userId == this.client.getHabbo().getHabboInfo().getId() || guild.getOwnerId() == this.client.getHabbo().getHabboInfo().getId() || groupMember.getRank().equals(GuildRank.ADMIN) || groupMember.getRank().equals(GuildRank.OWNER) || this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN)) {
|
||||||
if (habbo.getHabboStats().hasGuild(guild.getId())) {
|
if (habbo.getHabboStats().hasGuild(guild.getId())) {
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
this.client.sendResponse(new GuildAcceptMemberErrorComposer(guild.getId(), GuildAcceptMemberErrorComposer.ALREADY_ACCEPTED));
|
this.client.sendResponse(new GuildMemberMgmtFailedMessageComposer(guild.getId(), GuildMemberMgmtFailedMessageComposer.ALREADY_ACCEPTED));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
//Check the user has requested
|
//Check the user has requested
|
||||||
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, habbo);
|
GuildMember member = Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, habbo);
|
||||||
if (member == null || member.getRank().type != GuildRank.REQUESTED.type) {
|
if (member == null || member.getRank().type != GuildRank.REQUESTED.type) {
|
||||||
this.client.sendResponse(new GuildAcceptMemberErrorComposer(guild.getId(), GuildAcceptMemberErrorComposer.NO_LONGER_MEMBER));
|
this.client.sendResponse(new GuildMemberMgmtFailedMessageComposer(guild.getId(), GuildMemberMgmtFailedMessageComposer.NO_LONGER_MEMBER));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
GuildAcceptedMembershipEvent event = new GuildAcceptedMembershipEvent(guild, userId, habbo);
|
GuildAcceptedMembershipEvent event = new GuildAcceptedMembershipEvent(guild, userId, habbo);
|
||||||
@ -43,11 +43,11 @@ public class GuildAcceptMembershipEvent extends MessageHandler {
|
|||||||
Emulator.getGameEnvironment().getGuildManager().joinGuild(guild, this.client, habbo.getHabboInfo().getId(), true);
|
Emulator.getGameEnvironment().getGuildManager().joinGuild(guild, this.client, habbo.getHabboInfo().getId(), true);
|
||||||
guild.decreaseRequestCount();
|
guild.decreaseRequestCount();
|
||||||
guild.increaseMemberCount();
|
guild.increaseMemberCount();
|
||||||
this.client.sendResponse(new GuildRefreshMembersListComposer(guild));
|
this.client.sendResponse(new GuildMembershipRejectedMessageComposer(guild));
|
||||||
Room room = habbo.getHabboInfo().getCurrentRoom();
|
Room room = habbo.getHabboInfo().getCurrentRoom();
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
if (room.getGuildId() == guildId) {
|
if (room.getGuildId() == guildId) {
|
||||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, userId)));
|
habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guildId, userId)));
|
||||||
room.refreshRightsForHabbo(habbo);
|
room.refreshRightsForHabbo(habbo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
|||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildMembersComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildMembersComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.guilds.GuildDeclinedMembershipEvent;
|
import com.eu.habbo.plugin.events.guilds.GuildDeclinedMembershipEvent;
|
||||||
@ -36,7 +36,7 @@ public class GuildDeclineMembershipEvent extends MessageHandler {
|
|||||||
Room room = habbo.getHabboInfo().getCurrentRoom();
|
Room room = habbo.getHabboInfo().getCurrentRoom();
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
if (room.getGuildId() == guildId) {
|
if (room.getGuildId() == guildId) {
|
||||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, null));
|
habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import com.eu.habbo.habbohotel.permissions.Permission;
|
|||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipUpdatedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipUpdatedMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.guilds.GuildRemovedAdminEvent;
|
import com.eu.habbo.plugin.events.guilds.GuildRemovedAdminEvent;
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ public class GuildRemoveAdminEvent extends MessageHandler {
|
|||||||
Emulator.getGameEnvironment().getGuildManager().removeAdmin(guild, userId);
|
Emulator.getGameEnvironment().getGuildManager().removeAdmin(guild, userId);
|
||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild.getId(), userId)));
|
habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild.getId(), userId)));
|
||||||
|
|
||||||
if (room != null && habbo.getHabboInfo().getCurrentRoom() != null && habbo.getHabboInfo().getCurrentRoom() == room) room.refreshRightsForHabbo(habbo);
|
if (room != null && habbo.getHabboInfo().getCurrentRoom() != null && habbo.getHabboInfo().getCurrentRoom() == room) room.refreshRightsForHabbo(habbo);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import com.eu.habbo.habbohotel.rooms.Room;
|
|||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.FavoriteMembershipUpdateMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.FavoriteMembershipUpdateMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildMembershipRejectedMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.guilds.GuildRemovedMemberEvent;
|
import com.eu.habbo.plugin.events.guilds.GuildRemovedMemberEvent;
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ public class GuildRemoveMemberEvent extends MessageHandler {
|
|||||||
room.refreshRightsForHabbo(habbo);
|
room.refreshRightsForHabbo(habbo);
|
||||||
}
|
}
|
||||||
|
|
||||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, null));
|
habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (room != null) {
|
if (room != null) {
|
||||||
|
@ -11,7 +11,7 @@ import com.eu.habbo.messages.outgoing.catalog.PurchaseErrorMessageComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
|
import com.eu.habbo.messages.outgoing.catalog.PurchaseOKMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildCreatedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildCreatedMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildEditFailedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.GuildEditFailedMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
import com.eu.habbo.plugin.events.guilds.GuildPurchasedEvent;
|
import com.eu.habbo.plugin.events.guilds.GuildPurchasedEvent;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -99,7 +99,7 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
|||||||
this.client.sendResponse(new PurchaseOKMessageComposer());
|
this.client.sendResponse(new PurchaseOKMessageComposer());
|
||||||
this.client.sendResponse(new GuildCreatedMessageComposer(guild));
|
this.client.sendResponse(new GuildCreatedMessageComposer(guild));
|
||||||
for (Habbo habbo : r.getHabbos()) {
|
for (Habbo habbo : r.getHabbos()) {
|
||||||
habbo.getClient().sendResponse(new GuildInfoComposer(guild, habbo.getClient(), false, null));
|
habbo.getClient().sendResponse(new HabboGroupDetailsMessageComposer(guild, habbo.getClient(), false, null));
|
||||||
}
|
}
|
||||||
r.refreshGuild(guild);
|
r.refreshGuild(guild);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package com.eu.habbo.messages.incoming.guilds;
|
|||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.guilds.Guild;
|
import com.eu.habbo.habbohotel.guilds.Guild;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
|
|
||||||
public class RequestGuildInfoEvent extends MessageHandler {
|
public class RequestGuildInfoEvent extends MessageHandler {
|
||||||
@Override
|
@Override
|
||||||
@ -14,7 +14,7 @@ public class RequestGuildInfoEvent extends MessageHandler {
|
|||||||
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
|
||||||
|
|
||||||
if (guild != null) {
|
if (guild != null) {
|
||||||
this.client.sendResponse(new GuildInfoComposer(guild, this.client, newWindow, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo())));
|
this.client.sendResponse(new HabboGroupDetailsMessageComposer(guild, this.client, newWindow, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import com.eu.habbo.habbohotel.guilds.Guild;
|
|||||||
import com.eu.habbo.habbohotel.guilds.GuildState;
|
import com.eu.habbo.habbohotel.guilds.GuildState;
|
||||||
import com.eu.habbo.habbohotel.rooms.Room;
|
import com.eu.habbo.habbohotel.rooms.Room;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.GuildInfoComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupDetailsMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.HabboGroupJoinFailedMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.HabboGroupJoinFailedMessageComposer;
|
||||||
|
|
||||||
public class RequestGuildJoinEvent extends MessageHandler {
|
public class RequestGuildJoinEvent extends MessageHandler {
|
||||||
@ -27,7 +27,7 @@ public class RequestGuildJoinEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Emulator.getGameEnvironment().getGuildManager().joinGuild(guild, this.client, 0, false);
|
Emulator.getGameEnvironment().getGuildManager().joinGuild(guild, this.client, 0, false);
|
||||||
this.client.sendResponse(new GuildInfoComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo())));
|
this.client.sendResponse(new HabboGroupDetailsMessageComposer(guild, this.client, false, Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, this.client.getHabbo())));
|
||||||
|
|
||||||
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
Room room = this.client.getHabbo().getHabboInfo().getCurrentRoom();
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
|
|||||||
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
import com.eu.habbo.habbohotel.guilds.forums.ForumThreadState;
|
||||||
import com.eu.habbo.habbohotel.permissions.Permission;
|
import com.eu.habbo.habbohotel.permissions.Permission;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
|
import com.eu.habbo.messages.outgoing.generic.alerts.BubbleAlertKeys;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.ThreadMessagesMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.ThreadMessagesMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.NotificationDialogMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.guilds.forums.ForumDataMessageComposer;
|
import com.eu.habbo.messages.outgoing.guilds.forums.ForumDataMessageComposer;
|
||||||
@ -37,8 +38,8 @@ public class GuildForumThreadsMessagesEvent extends MessageHandler {
|
|||||||
|
|
||||||
|
|
||||||
if (thread.getState() != ForumThreadState.HIDDEN_BY_GUILD_ADMIN || hasStaffPermissions || isGuildAdministrator) {
|
if (thread.getState() != ForumThreadState.HIDDEN_BY_GUILD_ADMIN || hasStaffPermissions || isGuildAdministrator) {
|
||||||
this.client.sendResponse(new GuildForumCommentsComposer(guildId, threadId, index, thread.getComments(limit, index)));
|
this.client.sendResponse(new ThreadMessagesMessageComposer(guildId, threadId, index, thread.getComments(limit, index)));
|
||||||
this.client.sendResponse(new ThreadMessagesMessageComposer(guild, this.client.getHabbo()));
|
this.client.sendResponse(new ForumDataMessageComposer(guild, this.client.getHabbo()));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_ACCESS_DENIED.key).compose());
|
this.client.sendResponse(new NotificationDialogMessageComposer(BubbleAlertKeys.FORUMS_ACCESS_DENIED.key).compose());
|
||||||
|
@ -19,7 +19,7 @@ public class RequestInventoryItemsEvent extends MessageHandler {
|
|||||||
int totalItems = this.client.getHabbo().getInventory().getItemsComponent().getItems().size();
|
int totalItems = this.client.getHabbo().getInventory().getItemsComponent().getItems().size();
|
||||||
|
|
||||||
if (totalItems == 0) {
|
if (totalItems == 0) {
|
||||||
this.client.sendResponse(new InventoryItemsComposer(0, 1, new TIntObjectHashMap<>()));
|
this.client.sendResponse(new FurniListComposer(0, 1, new TIntObjectHashMap<>()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,13 +14,13 @@ import com.eu.habbo.messages.outgoing.Outgoing;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class GuildInfoComposer extends MessageComposer {
|
public class HabboGroupDetailsMessageComposer extends MessageComposer {
|
||||||
private final Guild guild;
|
private final Guild guild;
|
||||||
private final GameClient client;
|
private final GameClient client;
|
||||||
private final boolean newWindow;
|
private final boolean newWindow;
|
||||||
private final GuildMember member;
|
private final GuildMember member;
|
||||||
|
|
||||||
public GuildInfoComposer(Guild guild, GameClient client, boolean newWindow, GuildMember member) {
|
public HabboGroupDetailsMessageComposer(Guild guild, GameClient client, boolean newWindow, GuildMember member) {
|
||||||
this.guild = guild;
|
this.guild = guild;
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.newWindow = newWindow;
|
this.newWindow = newWindow;
|
||||||
@ -30,7 +30,7 @@ public class GuildInfoComposer extends MessageComposer {
|
|||||||
@Override
|
@Override
|
||||||
protected ServerMessage composeInternal() {
|
protected ServerMessage composeInternal() {
|
||||||
boolean adminPermissions = this.client.getHabbo().getHabboStats().hasGuild(this.guild.getId()) && this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN) || Emulator.getGameEnvironment().getGuildManager().getOnlyAdmins(guild).get(this.client.getHabbo().getHabboInfo().getId()) != null;
|
boolean adminPermissions = this.client.getHabbo().getHabboStats().hasGuild(this.guild.getId()) && this.client.getHabbo().hasPermission(Permission.ACC_GUILD_ADMIN) || Emulator.getGameEnvironment().getGuildManager().getOnlyAdmins(guild).get(this.client.getHabbo().getHabboInfo().getId()) != null;
|
||||||
this.response.init(Outgoing.GuildInfoComposer);
|
this.response.init(Outgoing.HabboGroupDetailsMessageComposer);
|
||||||
this.response.appendInt(this.guild.getId());
|
this.response.appendInt(this.guild.getId());
|
||||||
this.response.appendBoolean(true);
|
this.response.appendBoolean(true);
|
||||||
this.response.appendInt(this.guild.getState().state);
|
this.response.appendInt(this.guild.getState().state);
|
@ -16,7 +16,6 @@ public class IgnoredUsersMessageComposer extends MessageComposer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ServerMessage composeInternal() {
|
protected ServerMessage composeInternal() {
|
||||||
}
|
|
||||||
this.response.init(Outgoing.IgnoredUsersMessageComposer);
|
this.response.init(Outgoing.IgnoredUsersMessageComposer);
|
||||||
this.response.appendInt(0);
|
this.response.appendInt(0);
|
||||||
return this.response;
|
return this.response;
|
||||||
|
@ -2,9 +2,7 @@ package com.eu.habbo.messages.rcon;
|
|||||||
|
|
||||||
import com.eu.habbo.Emulator;
|
import com.eu.habbo.Emulator;
|
||||||
import com.eu.habbo.habbohotel.users.Habbo;
|
import com.eu.habbo.habbohotel.users.Habbo;
|
||||||
import com.eu.habbo.habbohotel.users.HabboInfo;
|
import com.eu.habbo.messages.outgoing.users.UserObjectComposer;
|
||||||
import com.eu.habbo.habbohotel.users.subscriptions.Subscription;
|
|
||||||
import com.eu.habbo.messages.outgoing.users.UserDataComposer;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -37,7 +35,7 @@ public class ChangeUsername extends RCONMessage<ChangeUsername.JSON> {
|
|||||||
habbo.alert(Emulator.getTexts().getValue("rcon.alert.user.change_username"));
|
habbo.alert(Emulator.getTexts().getValue("rcon.alert.user.change_username"));
|
||||||
|
|
||||||
habbo.getHabboStats().allowNameChange = json.canChange;
|
habbo.getHabboStats().allowNameChange = json.canChange;
|
||||||
habbo.getClient().sendResponse(new UserDataComposer(habbo));
|
habbo.getClient().sendResponse(new UserObjectComposer(habbo));
|
||||||
} else {
|
} else {
|
||||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) {
|
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) {
|
||||||
try (PreparedStatement statement = connection.prepareStatement("UPDATE users_settings SET allow_name_change = ? WHERE user_id = ? LIMIT 1")) {
|
try (PreparedStatement statement = connection.prepareStatement("UPDATE users_settings SET allow_name_change = ? WHERE user_id = ? LIMIT 1")) {
|
||||||
|
@ -24,6 +24,6 @@ class RemoveFloorItemTask implements Runnable {
|
|||||||
this.room.removeHabboItem(this.item);
|
this.room.removeHabboItem(this.item);
|
||||||
this.room.updateTile(tile);
|
this.room.updateTile(tile);
|
||||||
this.room.sendComposer(new RemoveFloorItemComposer(this.item, true).compose());
|
this.room.sendComposer(new RemoveFloorItemComposer(this.item, true).compose());
|
||||||
this.room.sendComposer(new HeightMapUpdateMessageComposer(this.item.getX(), this.item.getY(), tile.relativeHeight()).compose());
|
this.room.sendComposer(new HeightMapUpdateMessageComposer(this.item.getX(), this.item.getY(), tile.z, tile.relativeHeight()).compose());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user