Adds Ziggy's pvp faction implementation.

This commit is contained in:
Zach
2015-09-21 00:23:07 -04:00
parent c5ae312627
commit a4f96018c4
4 changed files with 112 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
package intents;
import resources.PvpFaction;
import resources.control.Intent;
import resources.objects.tangible.TangibleObject;
public class FactionIntent extends Intent {
public static final String TYPE = "FactionIntent";
private TangibleObject target;
private PvpFaction newFaction;
private FactionIntentType updateType;
private FactionIntent(TangibleObject target) {
super(TYPE);
this.target = target;
}
public FactionIntent(TangibleObject target, FactionIntentType updateType) {
this(target);
this.updateType = updateType;
}
public FactionIntent(TangibleObject target, PvpFaction newFaction) {
this(target, FactionIntentType.FACTIONUPDATE);
this.newFaction = newFaction;
}
public TangibleObject getTarget() {
return target;
}
public PvpFaction getNewFaction() {
return newFaction;
}
public FactionIntentType getUpdateType() {
return updateType;
}
public enum FactionIntentType {
FLAGUPDATE,
STATUSUPDATE,
FACTIONUPDATE // Is automatically set in the correct constructor, don't use manually.
}
}