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
+42 -42
View File
@@ -21,61 +21,61 @@ import java.util.concurrent.ConcurrentHashMap;
public class FinishSummonsJob extends AbstractScheduleJob {
PlayerCharacter source;
PlayerCharacter target;
PlayerCharacter source;
PlayerCharacter target;
public FinishSummonsJob(PlayerCharacter source, PlayerCharacter target) {
super();
this.source = source;
this.target = target;
}
public FinishSummonsJob(PlayerCharacter source, PlayerCharacter target) {
super();
this.source = source;
this.target = target;
}
@Override
protected void doJob() {
@Override
protected void doJob() {
if (this.target == null)
return;
if (this.target == null)
return;
//clear summon timer
//clear summon timer
ConcurrentHashMap<String, JobContainer> timers = this.target.getTimers();
ConcurrentHashMap<String, JobContainer> timers = this.target.getTimers();
if (timers != null && timers.containsKey("Summon"))
timers.remove("Summon");
if (timers != null && timers.containsKey("Summon"))
timers.remove("Summon");
if (this.source == null || !this.source.isAlive() || !this.target.isAlive())
return;
if (this.source == null || !this.source.isAlive() || !this.target.isAlive())
return;
// cannot summon a player in combat
if (this.target.isCombat()) {
// cannot summon a player in combat
if (this.target.isCombat()) {
ErrorPopupMsg.sendErrorMsg(this.source, "Cannot summon player in combat.");
ErrorPopupMsg.sendErrorMsg(this.source, "Cannot summon player in combat.");
PowersManager.finishRecycleTime(428523680, this.source, false);
return;
}
PowersManager.finishRecycleTime(428523680, this.source, false);
return;
}
if (this.target.getBonuses() != null && this.target.getBonuses().getBool(ModType.BlockedPowerType, SourceType.SUMMON)) {
ErrorPopupMsg.sendErrorMsg(this.target, "You have been blocked from receiving summons!");
ErrorPopupMsg.sendErrorMsg(this.source, "Target is blocked from receiving summons!");
return;
}
if (this.target.getBonuses() != null && this.target.getBonuses().getBool(ModType.BlockedPowerType, SourceType.SUMMON)) {
ErrorPopupMsg.sendErrorMsg(this.target, "You have been blocked from receiving summons!");
ErrorPopupMsg.sendErrorMsg(this.source, "Target is blocked from receiving summons!");
return;
}
if (this.source.region != null)
this.target.setRegion(this.source.region);
//teleport target to source
target.teleport(source.getLoc());
}
if (this.source.region != null)
this.target.setRegion(this.source.region);
//teleport target to source
target.teleport(source.getLoc());
}
@Override
protected void _cancelJob() {
}
@Override
protected void _cancelJob() {
}
public PlayerCharacter getSource() {
return this.source;
}
public PlayerCharacter getSource() {
return this.source;
}
public PlayerCharacter getTarget() {
return this.target;
}
public PlayerCharacter getTarget() {
return this.target;
}
}