Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Fixed warp inventory bug
Browse files Browse the repository at this point in the history
  • Loading branch information
noahhusby committed Feb 22, 2022
1 parent f338bed commit d1e7e40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ public GroupWarpInventoryController(GUIController controller, WarpPayload payloa

@Override
public void init() {
WarpGroupPayload group = payload.getGroups().get(groupId);
if (group == null) {
if (groupId == null || !payload.getGroups().containsKey(groupId)) {
close();
GUIRegistry.register(new AllWarpInventory.AllWarpInventoryController(getPlayer(), payload));
return;
}

WarpGroupPayload group = payload.getGroups().get(groupId);
List<Warp> warps = Lists.newArrayList();
for (Integer warpId : group.getWarps()) {
Warp warp = payload.getWaypoints().get(warpId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ public WarpPayload generateGUIPayload(SledgehammerPlayer player, boolean editAcc
} else {
localGroup = warpGroup.getId();
}
if (page == Page.LOCAL_GROUP && localGroup != null && !warpGroups.containsKey(localGroup)) {
page = Page.ALL;
}
}

Map<String, WarpGroupPayload> groups = Maps.newHashMap();
Expand Down

0 comments on commit d1e7e40

Please sign in to comment.