Project cleanup pre merge.
This commit is contained in:
@@ -18,47 +18,45 @@ import engine.objects.NPC;
|
||||
|
||||
public class UpgradeNPCJob extends AbstractScheduleJob {
|
||||
|
||||
private final AbstractCharacter rankingAC;
|
||||
boolean success;
|
||||
private final AbstractCharacter rankingAC;
|
||||
boolean success;
|
||||
|
||||
public UpgradeNPCJob(AbstractCharacter ac) {
|
||||
super();
|
||||
this.rankingAC = ac;
|
||||
}
|
||||
public UpgradeNPCJob(AbstractCharacter ac) {
|
||||
super();
|
||||
this.rankingAC = ac;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doJob() {
|
||||
@Override
|
||||
protected void doJob() {
|
||||
|
||||
int newRank;
|
||||
int newRank;
|
||||
|
||||
if (this.rankingAC.getObjectType() == GameObjectType.NPC){
|
||||
if (this.rankingAC.getObjectType() == GameObjectType.NPC) {
|
||||
|
||||
|
||||
if (this.rankingAC == null) //NPC could've been removed...
|
||||
return;
|
||||
newRank = (this.rankingAC.getRank() * 10) + 10;
|
||||
|
||||
|
||||
|
||||
((NPC)this.rankingAC).setRank(newRank);
|
||||
((NPC)this.rankingAC).setUpgradeDateTime(null);
|
||||
}else if (this.rankingAC.getObjectType() == GameObjectType.Mob){
|
||||
if (this.rankingAC == null) //NPC could've been removed...
|
||||
return;
|
||||
newRank = (this.rankingAC.getRank() * 10) + 10;
|
||||
if (this.rankingAC == null) //NPC could've been removed...
|
||||
return;
|
||||
newRank = (this.rankingAC.getRank() * 10) + 10;
|
||||
|
||||
|
||||
((NPC) this.rankingAC).setRank(newRank);
|
||||
((NPC) this.rankingAC).setUpgradeDateTime(null);
|
||||
} else if (this.rankingAC.getObjectType() == GameObjectType.Mob) {
|
||||
if (this.rankingAC == null) //NPC could've been removed...
|
||||
return;
|
||||
newRank = (this.rankingAC.getRank() * 10) + 10;
|
||||
|
||||
((Mob)this.rankingAC).setRank(newRank);
|
||||
Mob.setUpgradeDateTime((Mob)this.rankingAC, null);
|
||||
WorldGrid.updateObject(this.rankingAC);
|
||||
|
||||
}
|
||||
((Mob) this.rankingAC).setRank(newRank);
|
||||
Mob.setUpgradeDateTime((Mob) this.rankingAC, null);
|
||||
WorldGrid.updateObject(this.rankingAC);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _cancelJob() {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _cancelJob() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user