* Cavern of Soul - Fixed possible java exception when it is checked if with the Cavern mana was payed (Fixes #336).

This commit is contained in:
LevelX2 2013-09-24 11:05:25 +02:00
parent 1c1daf8bcb
commit dc5fc69287

View file

@ -185,7 +185,8 @@ class CavernOfSoulsWatcher extends WatcherImpl<CavernOfSoulsWatcher> {
@Override @Override
public void watch(GameEvent event, Game game) { public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.MANA_PAYED) { if (event.getType() == GameEvent.EventType.MANA_PAYED) {
if (game.getObject(event.getSourceId()).getName().equals("Cavern of Souls")) { MageObject object = game.getObject(event.getSourceId());
if (object != null && object.getName().equals("Cavern of Souls")) {
spells.add(event.getTargetId()); spells.add(event.getTargetId());
} }
} }