From 4389a19ae5bda42083dfa7f924d4278e2ce311c4 Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Thu, 1 Aug 2019 22:02:15 +0300 Subject: [PATCH] Update guild badge when removed --- .../messages/incoming/guilds/GuildRemoveFavoriteEvent.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveFavoriteEvent.java b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveFavoriteEvent.java index 5aaf3e7f..9f92df68 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveFavoriteEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/guilds/GuildRemoveFavoriteEvent.java @@ -3,6 +3,8 @@ package com.eu.habbo.messages.incoming.guilds; import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.guilds.Guild; import com.eu.habbo.messages.incoming.MessageHandler; +import com.eu.habbo.messages.outgoing.guilds.GuildFavoriteRoomUserUpdateComposer; +import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersAddGuildBadgeComposer; import com.eu.habbo.messages.outgoing.users.UserProfileComposer; import com.eu.habbo.plugin.events.guilds.GuildRemovedFavoriteEvent; @@ -20,6 +22,10 @@ public class GuildRemoveFavoriteEvent extends MessageHandler { this.client.getHabbo().getHabboStats().guild = 0; + if (this.client.getHabbo().getHabboInfo().getCurrentRoom() != null && guild != null) { + this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new GuildFavoriteRoomUserUpdateComposer(this.client.getHabbo().getRoomUnit(), guild).compose()); + } + this.client.sendResponse(new UserProfileComposer(this.client.getHabbo(), this.client)); } }