Skip to content

Commit 6c180e4

Browse files
committed
Fix crash with Gold Saver
1 parent 2d58d11 commit 6c180e4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
### Bug fixes
1515

16+
* Fixed crash in OnModifyGoldPatch with other mods which add gold before you enter a room (eg, Gold Saver)
1617
* Fixed issues where Voiceover lines for elite fights would play in non-elite fights that shared certain elite enemies (eg, Colosseum event)
1718
* Fixed memory tooltips not appearing when using Peek button from a card select screen (eg, Retain)
1819
* Fixed Weight of Memory damage number not counting Wandering Mind cards that are in the process of being played

src/main/java/stsjorbsmod/patches/OnModifyGoldPatch.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212

1313
public class OnModifyGoldPatch {
1414
private static void notifyModifyGold(AbstractPlayer player) {
15-
if (AbstractDungeon.getCurrRoom().phase == AbstractRoom.RoomPhase.COMBAT) {
15+
if (AbstractDungeon.currMapNode != null &&
16+
AbstractDungeon.getCurrRoom() != null &&
17+
AbstractDungeon.getCurrRoom().phase == AbstractRoom.RoomPhase.COMBAT)
18+
{
1619
for (AbstractPower p : player.powers) {
1720
if (p instanceof OnModifyGoldSubscriber) {
1821
((OnModifyGoldSubscriber) p).onModifyGold(player);

0 commit comments

Comments
 (0)