Don't send the page if HC condition is not met.

This commit is contained in:
Thijmen Stavenuiter 2021-03-08 15:04:40 +01:00
parent f186420abe
commit 5398a04b47

View File

@ -649,7 +649,17 @@ public class CatalogManager {
this.catalogPages.get(parentId).childPages.forEachValue(new TObjectProcedure<CatalogPage>() {
@Override
public boolean execute(CatalogPage object) {
if (object.getRank() <= habbo.getHabboInfo().getRank().getId() && object.visible) {
boolean isVisiblePage = object.visible;
boolean hasRightRank = object.getRank() <= habbo.getHabboInfo().getRank().getId();
boolean clubRightsOkay = true;
if(object.isClubOnly() && !habbo.getHabboInfo().getHabboStats().hasActiveClub()) {
clubRightsOkay = false;
}
if (isVisiblePage && hasRightRank && clubRightsOkay) {
pages.add(object);
}