forked from 2009Scape/Server
Award ranged XP when damage is calculated instead of when it's applied
This commit is contained in:
parent
8a231f1898
commit
cfc2d17083
2 changed files with 4 additions and 1 deletions
|
|
@ -171,7 +171,9 @@ public final class ImpactHandler {
|
|||
if (fam && player.getFamiliarManager().hasFamiliar() && !(player.getFamiliarManager().getFamiliar() instanceof Pet)) {
|
||||
source.setAttribute("fam-exp", true);
|
||||
}
|
||||
style.getSwingHandler().addExperience(source, entity, state);
|
||||
if(style != CombatStyle.RANGE) {
|
||||
style.getSwingHandler().addExperience(source, entity, state);
|
||||
}
|
||||
source.removeAttribute("fam-exp");
|
||||
}
|
||||
boolean dead = false;
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ open class RangeSwingHandler
|
|||
return -1
|
||||
}
|
||||
useAmmo(entity, state, victim.location)
|
||||
addExperience(entity, victim, state)
|
||||
return 1 + ceil(entity.location.getDistance(victim.location) * 0.3).toInt()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue