forked from MagicBane/Server
starting of new power manager
This commit is contained in:
@@ -35,16 +35,6 @@ public class UsePowerJob extends AbstractScheduleJob {
|
||||
this.targetLiveCounter = targetLiveCounter;
|
||||
}
|
||||
|
||||
public UsePowerJob(PlayerCharacter pc, PerformActionMsg msg, int token, Power pb, int casterLiveCounter, int targetLiveCounter) {
|
||||
super();
|
||||
this.pc = pc;
|
||||
this.msg = msg;
|
||||
this.token = token;
|
||||
this.pb = pb;
|
||||
this.casterLiveCounter = casterLiveCounter;
|
||||
this.targetLiveCounter = targetLiveCounter;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doJob() {
|
||||
PowersManager.finishUsePower(this.msg, this.pc, casterLiveCounter, targetLiveCounter);
|
||||
|
||||
@@ -262,7 +262,7 @@ public class WpakPowerManager {
|
||||
copyMsg.setNumTrains(tr);
|
||||
|
||||
// make person casting stand up if spell (unless they're casting a chant which does not make them stand up)
|
||||
if (pb.isSpell() && !pb.isChant() && playerCharacter.isSit()) {
|
||||
if (powerCast.isSpell() && !powerCast.isChant() && playerCharacter.isSit()) {
|
||||
playerCharacter.update();
|
||||
playerCharacter.setSit(false);
|
||||
UpdateStateMsg updateStateMsg = new UpdateStateMsg(playerCharacter);
|
||||
@@ -274,11 +274,11 @@ public class WpakPowerManager {
|
||||
playerCharacter.cancelOnCast();
|
||||
|
||||
// update castSpell (use spell) fail condition if spell
|
||||
if (pb.isSpell())
|
||||
if (powerCast.isSpell())
|
||||
playerCharacter.cancelOnSpell();
|
||||
|
||||
// get cast time in ms.
|
||||
time = pb.getCastTime(trains);
|
||||
time = powerCast.getCastTime(trains);
|
||||
|
||||
// set player is casting for regens
|
||||
|
||||
|
||||
@@ -106,4 +106,15 @@ public class Power {
|
||||
return this.cost * (1 + (float)(this.curves.get("COSTAMT").getValue() * trains));
|
||||
|
||||
}
|
||||
|
||||
public boolean isSpell(){
|
||||
return true;
|
||||
}
|
||||
public boolean isSkill(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isChant(){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user