diff --git a/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatPulse.kt b/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatPulse.kt index 7dcb61a8a..dc015aa6f 100644 --- a/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatPulse.kt +++ b/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatPulse.kt @@ -129,7 +129,7 @@ class CombatPulse( if (handler == null) { handler = entity.getSwingHandler(true) } - if (!entity.isAttackable(v, handler!!.type)) { + if (!v.isAttackable(entity, handler!!.type)) { return true } if (!swing(entity, victim, handler)) { diff --git a/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/Patch.kt b/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/Patch.kt index a213820b9..13969e39e 100644 --- a/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/Patch.kt +++ b/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/Patch.kt @@ -17,7 +17,11 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl var cropLives = 3 fun setNewHarvestAmount() { - val compostMod = if(compost == CompostType.SUPER) 2 else 1 + val compostMod = when(compost) { + CompostType.NONE -> 0 + CompostType.NORMAL -> 1 + CompostType.SUPER -> 2 + } harvestAmt = when (plantable) { Plantable.LIMPWURT_SEED, Plantable.WOAD_SEED -> 3 Plantable.MUSHROOM_SPORE -> 6 diff --git a/Server/src/main/kotlin/rs09/game/node/entity/skill/hunter/pitfall/HunterPitfall.kt b/Server/src/main/kotlin/rs09/game/node/entity/skill/hunter/pitfall/HunterPitfall.kt index 5f83e7d61..0226fa5aa 100644 --- a/Server/src/main/kotlin/rs09/game/node/entity/skill/hunter/pitfall/HunterPitfall.kt +++ b/Server/src/main/kotlin/rs09/game/node/entity/skill/hunter/pitfall/HunterPitfall.kt @@ -319,6 +319,10 @@ class PitfallNPC : AbstractNPC { } override fun isAttackable(entity: Entity, style: CombatStyle): Boolean { - return entity is Player + return false + } + + override fun isIgnoreAttackRestrictions(victim: Entity): Boolean { + return victim is Player } }