Update guild badge when removed

This commit is contained in:
Alejandro 2019-08-01 22:02:15 +03:00
parent f2b2fc8d99
commit 4389a19ae5

View File

@ -3,6 +3,8 @@ 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.GuildFavoriteRoomUserUpdateComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUsersAddGuildBadgeComposer;
import com.eu.habbo.messages.outgoing.users.UserProfileComposer; import com.eu.habbo.messages.outgoing.users.UserProfileComposer;
import com.eu.habbo.plugin.events.guilds.GuildRemovedFavoriteEvent; import com.eu.habbo.plugin.events.guilds.GuildRemovedFavoriteEvent;
@ -20,6 +22,10 @@ public class GuildRemoveFavoriteEvent extends MessageHandler {
this.client.getHabbo().getHabboStats().guild = 0; 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)); this.client.sendResponse(new UserProfileComposer(this.client.getHabbo(), this.client));
} }
} }