Merge branch 'xp' into 'master'

fix granting hp xp on controlled

See merge request 2009scape/2009scape!343
This commit is contained in:
Ceikry
2021-12-16 00:25:16 +00:00
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -71,3 +71,4 @@
- Spending points to cancel your slayer task no longer sets your task streak to 0.
- Stars now have bots that will spawn and help mine for stars higher than level 5.
- Barrows equipment now lasts for 15 hours of combat instead of 40 minutes of combat.
- Fix granting hp xp on controlled
@@ -410,6 +410,10 @@ abstract class CombatSwingHandler(var type: CombatStyle?) {
}
if (state != null) {
val hit = state.totalDamage
if (entity is Player) {
player.skills.addExperience(Skills.HITPOINTS, hit * 1.33, true)
}
var skill = -1
when (attStyle) {
WeaponInterface.STYLE_DEFENSIVE -> skill = Skills.DEFENCE
@@ -441,7 +445,6 @@ abstract class CombatSwingHandler(var type: CombatStyle?) {
}
if (skill < 0) return
player.skills.addExperience(skill, hit * EXPERIENCE_MOD, true)
player.skills.addExperience(Skills.HITPOINTS, hit * 1.33, true)
}
}