Merge branch 'feature/fix-hc-pages' into 'dev'

Fix HC pages catalogue

See merge request morningstar/Arcturus-Community!418
This commit is contained in:
Remco 2021-03-08 14:39:38 +00:00
commit ea730baa11

View File

@ -649,10 +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) {
if (object.isClubOnly() && !habbo.getHabboStats().hasActiveClub()) {
return false;
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);
}
return true;