mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Some changes to logged data and a NPE prevention.
This commit is contained in:
parent
3e4c9dc645
commit
41ba4c9540
3 changed files with 19 additions and 14 deletions
|
|
@ -1159,6 +1159,9 @@ public abstract class AbilityImpl implements Ability {
|
|||
public MageObject getSourceObject(Game game) {
|
||||
if (sourceObject == null) {
|
||||
setSourceObject(null, game);
|
||||
if (sourceObject == null) {
|
||||
logger.warn("Source object could not be retrieved: " + this.getRule());
|
||||
}
|
||||
}
|
||||
return sourceObject;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,10 @@ public class ManaPoolItem implements Serializable {
|
|||
}
|
||||
|
||||
public UUID getSourceId() {
|
||||
return sourceObject.getId();
|
||||
if (sourceObject != null) {
|
||||
return sourceObject.getId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public UUID getOriginalId() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue