mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
fix NPE in public SoundEffectType visit(GameEventCardChangeZone event)
This commit is contained in:
@@ -38,7 +38,7 @@ public class EventVisualizer extends IGameEventVisitor.Base<SoundEffectType> {
|
|||||||
public SoundEffectType visit(GameEventCardDestroyed event) { return SoundEffectType.Destroy; }
|
public SoundEffectType visit(GameEventCardDestroyed event) { return SoundEffectType.Destroy; }
|
||||||
public SoundEffectType visit(GameEventCardEquipped event) { return SoundEffectType.Equip; }
|
public SoundEffectType visit(GameEventCardEquipped event) { return SoundEffectType.Equip; }
|
||||||
public SoundEffectType visit(GameEventCardChangeZone event) {
|
public SoundEffectType visit(GameEventCardChangeZone event) {
|
||||||
ZoneType from = event.from.getZoneType();
|
ZoneType from = event.from == null ? null : event.from.getZoneType();
|
||||||
ZoneType to = event.to.getZoneType();
|
ZoneType to = event.to.getZoneType();
|
||||||
if( from == ZoneType.Library && to == ZoneType.Hand)
|
if( from == ZoneType.Library && to == ZoneType.Hand)
|
||||||
return SoundEffectType.Draw;
|
return SoundEffectType.Draw;
|
||||||
|
|||||||
Reference in New Issue
Block a user