|
|
@ -432,15 +432,20 @@ public enum PowersManager { |
|
|
|
float range = pb.getRange(); |
|
|
|
float range = pb.getRange(); |
|
|
|
// verify target is in range
|
|
|
|
// verify target is in range
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(pb.token != 429396028) { |
|
|
|
|
|
|
|
|
|
|
|
if (verifyInvalidRange(playerCharacter, target, range)) |
|
|
|
if (verifyInvalidRange(playerCharacter, target, range)) |
|
|
|
// (pc.getLoc().distance(target.getLoc()) > pb.getRange()) {
|
|
|
|
// (pc.getLoc().distance(target.getLoc()) > pb.getRange()) {
|
|
|
|
// TODO send message that target is out of range
|
|
|
|
// TODO send message that target is out of range
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
// verify target is valid type
|
|
|
|
// verify target is valid type
|
|
|
|
if (!validateTarget(target, playerCharacter, pb)) |
|
|
|
if (!validateTarget(target, playerCharacter, pb)) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
pb.isSpell = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (AbstractWorldObject.IsAbstractCharacter(target)) |
|
|
|
if (AbstractWorldObject.IsAbstractCharacter(target)) |
|
|
@ -584,7 +589,9 @@ public enum PowersManager { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// update cast (use skill) fail condition
|
|
|
|
// update cast (use skill) fail condition
|
|
|
|
|
|
|
|
if(pb.token != 429396028) { |
|
|
|
playerCharacter.cancelOnCast(); |
|
|
|
playerCharacter.cancelOnCast(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// update castSpell (use spell) fail condition if spell
|
|
|
|
// update castSpell (use spell) fail condition if spell
|
|
|
|
if (pb.isSpell()) |
|
|
|
if (pb.isSpell()) |
|
|
@ -874,6 +881,7 @@ public enum PowersManager { |
|
|
|
} |
|
|
|
} |
|
|
|
float range = pb.getRange() + speedRange; |
|
|
|
float range = pb.getRange() + speedRange; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(pb.token != 429396028) { |
|
|
|
|
|
|
|
|
|
|
|
if (verifyInvalidRange(playerCharacter, mainTarget, range)) { |
|
|
|
if (verifyInvalidRange(playerCharacter, mainTarget, range)) { |
|
|
|
|
|
|
|
|
|
|
@ -882,7 +890,7 @@ public enum PowersManager { |
|
|
|
} |
|
|
|
} |
|
|
|
// (pc.getLoc().distance(target.getLoc()) > pb.getRange()) {
|
|
|
|
// (pc.getLoc().distance(target.getLoc()) > pb.getRange()) {
|
|
|
|
// TODO send message that target is out of range
|
|
|
|
// TODO send message that target is out of range
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|