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

Commit

Permalink
fix: Fix party finder crash on housing island (#669)
Browse files Browse the repository at this point in the history
* fix: Fix party finder crash on housing island

Fixes a bug where you will crash if you attempt to join a party in party finder, from your housing island.

* Update src/main/java/com/wynntils/modules/richpresence/events/ClientEvents.java

* Update src/main/java/com/wynntils/modules/richpresence/events/ClientEvents.java

---------

Co-authored-by: Alex Todaro <3767283+P0keDev@users.noreply.github.com>
  • Loading branch information
ENORMOUZ and P0keDev committed Apr 1, 2023
1 parent 1a93a1e commit f97f5ad
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ public class ClientEvents implements Listener {

@SubscribeEvent
public void onJoinParty(WynnSocialEvent.Party.Join e) {
RichPresenceModule.getModule().getRichPresence().setJoinSecret(new SecretContainer(e.getParty().getOwner(), Reference.getUserWorld().replaceAll("\\d+", ""), Integer.parseInt(Reference.getUserWorld().replace("WC", "").replace("HB", ""))));
int world;
try {
world = Integer.parseInt(Reference.getUserWorld().replace("WC", "").replace("HB", ""));
} catch (NumberFormatException npe) {
world = 0;
npe.printStackTrace();
}
RichPresenceModule.getModule().getRichPresence().setJoinSecret(new SecretContainer(e.getParty().getOwner(), Reference.getUserWorld().replaceAll("\\d+", ""), world));
}

@SubscribeEvent
Expand Down

0 comments on commit f97f5ad

Please sign in to comment.