Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
+61 -62
View File
@@ -24,87 +24,86 @@ import java.util.HashSet;
public class PersistentAoeJob extends AbstractEffectJob {
private final AbstractEffectJob aej;
private int iteration = 0;
private Vector3fImmutable targetLoc;
private Vector3fImmutable lastLoc;
private final AbstractEffectJob aej;
private int iteration = 0;
private Vector3fImmutable targetLoc;
private Vector3fImmutable lastLoc;
public PersistentAoeJob(AbstractWorldObject source, AbstractWorldObject target, String stackType, int trains, ActionsBase action, PowersBase power, EffectsBase eb, AbstractEffectJob aej, Vector3fImmutable targetLoc) {
super(source, target, stackType, trains, action, power, eb);
this.aej = aej;
if (target != null && this.target.getObjectType() == GameObjectType.PlayerCharacter)
this.targetLoc = this.target.getLoc();
else
this.targetLoc = targetLoc;
this.lastLoc = targetLoc;
}
public PersistentAoeJob(AbstractWorldObject source, AbstractWorldObject target, String stackType, int trains, ActionsBase action, PowersBase power, EffectsBase eb, AbstractEffectJob aej, Vector3fImmutable targetLoc) {
super(source, target, stackType, trains, action, power, eb);
this.aej = aej;
if (target != null && this.target.getObjectType() == GameObjectType.PlayerCharacter)
this.targetLoc = this.target.getLoc();
else
this.targetLoc = targetLoc;
this.lastLoc = targetLoc;
}
@Override
protected void doJob() {
@Override
protected void doJob() {
if (this.aej == null || this.source == null || this.action == null || this.power == null || this.source == null || this.eb == null)
return;
if (this.aej == null || this.source == null || this.action == null || this.power == null || this.source == null || this.eb == null)
return;
if (!this.source.isAlive())
PowersManager.finishEffectTime(this.source, this.target, this.action, this.trains);
else if (this.iteration < this.power.getChantIterations()) {
if (!this.source.isAlive())
PowersManager.finishEffectTime(this.source, this.target, this.action, this.trains);
else if (this.iteration < this.power.getChantIterations()) {
this.skipSendEffect = true;
this.iteration++;
this.skipSendEffect = true;
this.iteration++;
if (this.target != null){
this.lastLoc = this.target.getLoc();
this.targetLoc = this.target.getLoc();
}
if (this.target != null) {
this.lastLoc = this.target.getLoc();
this.targetLoc = this.target.getLoc();
}
String stackType = action.getStackType();
stackType = (stackType.equals("IgnoreStack")) ? Integer.toString(action.getUUID()) : stackType;
HashSet<AbstractWorldObject> awolist = null;
String stackType = action.getStackType();
stackType = (stackType.equals("IgnoreStack")) ? Integer.toString(action.getUUID()) : stackType;
HashSet<AbstractWorldObject> awolist = null;
if (this.source instanceof PlayerCharacter)
awolist = PowersManager.getAllTargets(null, this.targetLoc, (PlayerCharacter) this.source, this.power);
else
awolist = new HashSet<>();
PerformActionMsg msg = new PerformActionMsg(power.getToken(), 9999, source
.getObjectType().ordinal(), source.getObjectUUID(), source.getObjectType().ordinal(),
source.getObjectUUID(), 0, 0, 0, 2, 0);
if (this.source instanceof PlayerCharacter)
awolist = PowersManager.getAllTargets(null, this.targetLoc, (PlayerCharacter) this.source, this.power);
else
awolist = new HashSet<>();
PerformActionMsg msg = new PerformActionMsg(power.getToken(), 9999, source
.getObjectType().ordinal(), source.getObjectUUID(), source.getObjectType().ordinal(),
source.getObjectUUID(), 0, 0, 0, 2, 0);
for (AbstractWorldObject awo : awolist) {
for (AbstractWorldObject awo : awolist) {
//judge the defense of the target
//judge the defense of the target
if (awo == null
|| PowersManager.testAttack((PlayerCharacter) this.source, awo, this.power, msg))
continue;
if (awo == null
|| PowersManager.testAttack((PlayerCharacter) this.source, awo, this.power, msg))
continue;
PowersManager.finishApplyPowerA((AbstractCharacter) this.source, awo, this.targetLoc, this.power, this.trains, true);
if (this.target != null && !this.target.isAlive()) {
this.target = null;
}
PowersManager.finishApplyPowerA((AbstractCharacter) this.source, awo, this.targetLoc, this.power, this.trains, true);
if (this.target != null && !this.target.isAlive()){
this.target = null;
}
}
if (AbstractWorldObject.IsAbstractCharacter(source))
((AbstractCharacter) this.source).addPersistantAoe(stackType, (int) (this.power.getChantDuration() * 1000), this, this.eb, this.trains);
} else
PowersManager.finishEffectTime(this.source, this.target, this.action, this.trains);
}
}
if (AbstractWorldObject.IsAbstractCharacter(source))
((AbstractCharacter) this.source).addPersistantAoe(stackType, (int) (this.power.getChantDuration() * 1000), this, this.eb, this.trains);
} else
PowersManager.finishEffectTime(this.source, this.target, this.action, this.trains);
}
@Override
protected void _cancelJob() {
}
@Override
protected void _cancelJob() {
}
public int getIteration() {
return this.iteration;
}
public int getIteration() {
return this.iteration;
}
public int inc() {
this.iteration++;
return this.iteration;
}
public int inc() {
this.iteration++;
return this.iteration;
}
}