Commit ea730baa authored by Remco's avatar Remco

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

Fix HC pages catalogue

See merge request !418
parents b02beb8c 0ca39a0b
Pipeline #2043 passed with stage
in 15 seconds
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment