Award combat xp on calculation instead of on impact
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user