forked from MagicBane/Server
players to use marksmanship again
This commit is contained in:
@@ -730,6 +730,13 @@ public enum CombatManager {
|
|||||||
dpj = ((PlayerCharacter) ac).getWeaponPower();
|
dpj = ((PlayerCharacter) ac).getWeaponPower();
|
||||||
if (dpj != null) {
|
if (dpj != null) {
|
||||||
float attackRange = getWeaponRange(wb);
|
float attackRange = getWeaponRange(wb);
|
||||||
|
PlayerBonuses bonus = ac.getBonuses();
|
||||||
|
if (bonus != null) {
|
||||||
|
float buffRange = 1;
|
||||||
|
buffRange += bonus.getFloat(ModType.WeaponRange, SourceType.None) * .01f;
|
||||||
|
attackRange *= buffRange;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
dpj.attack(target, attackRange);
|
dpj.attack(target, attackRange);
|
||||||
|
|
||||||
@@ -931,6 +938,14 @@ public enum CombatManager {
|
|||||||
PowersBase wp = dpj.getPower();
|
PowersBase wp = dpj.getPower();
|
||||||
if (wp.requiresHitRoll() == false) {
|
if (wp.requiresHitRoll() == false) {
|
||||||
float attackRange = getWeaponRange(wb);
|
float attackRange = getWeaponRange(wb);
|
||||||
|
PlayerBonuses bonus = ac.getBonuses();
|
||||||
|
if (bonus != null) {
|
||||||
|
float buffRange = 1;
|
||||||
|
buffRange += bonus.getFloat(ModType.WeaponRange, SourceType.None) * .01f;
|
||||||
|
attackRange *= buffRange;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
dpj.attack(target, attackRange);
|
dpj.attack(target, attackRange);
|
||||||
} else {
|
} else {
|
||||||
((PlayerCharacter) ac).setWeaponPower(null);
|
((PlayerCharacter) ac).setWeaponPower(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user