Check guild membership

This commit is contained in:
Alejandro 2020-06-07 14:52:07 +03:00
parent ff021608f5
commit db14789d6b

View File

@ -1019,6 +1019,9 @@ public class CatalogManager {
return;
}
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
if (guild != null && Emulator.getGameEnvironment().getGuildManager().getGuildMember(guild, habbo) != null) {
InteractionGuildFurni habboItem = (InteractionGuildFurni) Emulator.getGameEnvironment().getItemManager().createItem(habbo.getClient().getHabbo().getHabboInfo().getId(), baseItem, limitedStack, limitedNumber, extradata);
habboItem.setExtradata("");
habboItem.needsUpdate(true);
@ -1028,14 +1031,11 @@ public class CatalogManager {
itemsList.add(habboItem);
if (baseItem.getName().equals("guild_forum")) {
Guild guild = Emulator.getGameEnvironment().getGuildManager().getGuild(guildId);
if (guild != null) {
guild.setForum(true);
guild.needsUpdate = true;
guild.run();
}
}
} else if (baseItem.getInteractionType().getType() == InteractionMusicDisc.class) {
SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(item.getExtradata());