foul-magics/Mage/src/main/java/mage/game/events/AttachEvent.java
Susucre 95adcf0e9a revert the GameEvent::setSourceId removal
xenodron mentionned that one of the use of setSourceId is to more easily find the Event that use non-standard
sourceId.

So reverting the change made in a previous commit.

It was a non-functional change meant to ease new
BatchEvent sharing sourceId, but I'll use setSourceId
instead there.
2024-04-30 11:51:11 +02:00

18 lines
502 B
Java

package mage.game.events;
import mage.abilities.Ability;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author JayDi85
*/
public class AttachEvent extends GameEvent {
// TODO: investigate why source is provided but not used at all?
public AttachEvent(UUID targetPermanentId, Permanent attachment, Ability source) {
super(GameEvent.EventType.ATTACH, targetPermanentId, null, attachment.getControllerId());
this.setSourceId(attachment.getId());
}
}