Award combat xp on calculation instead of on impact

This commit is contained in:
ceikry
2021-07-05 17:10:54 -05:00
parent cfc2d17083
commit 2ef549b50f
3 changed files with 2 additions and 3 deletions
@@ -171,9 +171,6 @@ public final class ImpactHandler {
if (fam && player.getFamiliarManager().hasFamiliar() && !(player.getFamiliarManager().getFamiliar() instanceof Pet)) { if (fam && player.getFamiliarManager().hasFamiliar() && !(player.getFamiliarManager().getFamiliar() instanceof Pet)) {
source.setAttribute("fam-exp", true); source.setAttribute("fam-exp", true);
} }
if(style != CombatStyle.RANGE) {
style.getSwingHandler().addExperience(source, entity, state);
}
source.removeAttribute("fam-exp"); source.removeAttribute("fam-exp");
} }
boolean dead = false; boolean dead = false;
@@ -86,6 +86,7 @@ open class MagicSwingHandler
if (spell!!.type === SpellType.BLITZ) { if (spell!!.type === SpellType.BLITZ) {
ticks++ ticks++
} }
addExperience(entity, victim, state)
return ticks return ticks
} }
@@ -75,6 +75,7 @@ open class MeleeSwingHandler
hit = RandomFunction.random(max) hit = RandomFunction.random(max)
} }
state.estimatedHit = hit state.estimatedHit = hit
addExperience(entity, victim, state)
return 1 return 1
} }