mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Fixed a bug with slayer
This commit is contained in:
parent
fdc060cbc1
commit
f24d6f44f7
3 changed files with 8 additions and 6 deletions
|
|
@ -24,7 +24,7 @@ public class VarpHelpers {
|
|||
SystemLogger.logInfo(parentVarp + " - bitStart: " + lowerBound + " bitEnd: " + upperBound + " bitSize = " + (varbitSize + 1));
|
||||
int expectedMinimumValue = Class3_Sub6.expectedMinimumValues[varbitSize];
|
||||
SystemLogger.logInfo("emv: " + expectedMinimumValue + " || vs: " + (127 + valueToSet));
|
||||
if (valueToSet < 0|| expectedMinimumValue < valueToSet) { //<-- commented out due to heavy suspicion of it being an Arios modification. Things work fine without it.
|
||||
if (valueToSet < 0|| expectedMinimumValue < valueToSet) {
|
||||
SystemLogger.logInfo(expectedMinimumValue + " < " + valueToSet);
|
||||
valueToSet = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ public class NPC extends Entity {
|
|||
if (getZoneMonitor().handleDeath(killer)) {
|
||||
return;
|
||||
}
|
||||
if (task != null && killer instanceof Player && ((Player) killer).getSlayer().getTask() == task) {
|
||||
if (task != null && killer instanceof Player && ((Player) killer).getSlayer().getTask() == task && ((Player) killer).getSlayer().hasTask()) {
|
||||
((Player) killer).getSlayer().finalizeDeath(killer.asPlayer(), this);
|
||||
}
|
||||
if (killer instanceof Player && killer.getAttribute("jobs:id",null) != null) {
|
||||
|
|
|
|||
|
|
@ -105,10 +105,12 @@ public final class SlayerManager {
|
|||
* @param npc The NPC. You're currently
|
||||
*/
|
||||
public void finalizeDeath(Player player, NPC npc) {
|
||||
player.getSkills().addExperience(Skills.SLAYER,npc.getSkills().getMaximumLifepoints());
|
||||
decrementAmount(1);
|
||||
if (!hasTask()) {
|
||||
clear();
|
||||
if(hasTask()) {
|
||||
player.getSkills().addExperience(Skills.SLAYER, npc.getSkills().getMaximumLifepoints());
|
||||
decrementAmount(1);
|
||||
}
|
||||
|
||||
if(!hasTask()){
|
||||
flags.setTaskStreak(flags.getTaskStreak() + 1);
|
||||
flags.setCompletedTasks(flags.getCompletedTasks() + 1);
|
||||
if ((flags.getCompletedTasks() > 4 || flags.canEarnPoints() ) && flags.getMaster() != Master.TURAEL && flags.getPoints() < 64000) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue