mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* 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:
parent
1c1daf8bcb
commit
dc5fc69287
1 changed files with 2 additions and 1 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue