Refactor: replaced sourceId by source and introduced source param in some methods;

This commit is contained in:
Oleg Agafonov 2020-12-12 20:23:19 +04:00
parent 2bb472607b
commit db239a1055
3205 changed files with 7080 additions and 6795 deletions

View file

@ -0,0 +1,30 @@
package mage.game.events;
import mage.abilities.Ability;
import mage.cards.Card;
import java.util.UUID;
/**
* @author JayDi85
*/
public class TargetEvent extends GameEvent {
/**
* @param target
* @param sourceId
* @param sourceControllerId can be different from real controller (example: ability instructs another player to targeting)
*/
public TargetEvent(Card target, UUID sourceId, UUID sourceControllerId) {
super(GameEvent.EventType.TARGET, target.getId(), null, sourceControllerId);
this.setSourceId(sourceId);
}
/**
* @param targetId
* @param source
*/
public TargetEvent(UUID targetId, Ability source) {
super(GameEvent.EventType.TARGET, targetId, source, source.getControllerId());
}
}