Merge branch 'fancier-stats' into 'master'
Make use of the next/previous arrows in the interface used for `::stats`,... See merge request 2009scape/2009scape!309
This commit is contained in:
@@ -31,6 +31,7 @@ import core.game.world.update.flag.npc.NPCFaceLocation;
|
||||
import core.game.world.update.flag.npc.NPCForceChat;
|
||||
import core.game.world.update.flag.npc.NPCSwitchId;
|
||||
import core.tools.RandomFunction;
|
||||
import rs09.game.content.global.GlobalKillCounter;
|
||||
import rs09.game.content.jobs.JobManager;
|
||||
import rs09.game.node.entity.combat.CombatSwingHandler;
|
||||
import rs09.game.system.config.NPCConfigParser;
|
||||
@@ -534,6 +535,7 @@ public class NPC extends Entity {
|
||||
Player p = !(killer instanceof Player) ? null : (Player) killer;
|
||||
if (p != null) {
|
||||
p.incrementAttribute("/save:" + STATS_BASE + ":" + STATS_ENEMIES_KILLED);
|
||||
GlobalKillCounter.incrementKills(p, originalId);
|
||||
}
|
||||
handleDrops(p, killer);
|
||||
if (!isRespawn()) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package core.game.node.entity.npc.drop;
|
||||
|
||||
import api.ContentAPI;
|
||||
import core.cache.def.impl.NPCDefinition;
|
||||
import core.game.content.global.Bones;
|
||||
import core.game.ge.GrandExchangeDatabase;
|
||||
@@ -17,6 +18,7 @@ import core.tools.StringUtils;
|
||||
import rs09.game.ai.AIPlayer;
|
||||
import rs09.game.ai.AIRepository;
|
||||
import rs09.game.ai.general.GeneralBotCreator;
|
||||
import rs09.game.content.global.GlobalKillCounter;
|
||||
import rs09.game.content.global.NPCDropTable;
|
||||
import rs09.game.ge.OfferManager;
|
||||
import rs09.game.system.config.ItemConfigParser;
|
||||
@@ -111,9 +113,7 @@ public final class NPCDropTables {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (item.getDefinition().getConfiguration(ItemConfigParser.RARE_ITEM, false)) {
|
||||
Repository.sendNews(player.getUsername() + " has just received: " + item.getAmount() + " x " + item.getName() + ".");
|
||||
}
|
||||
ContentAPI.announceIfRare(player, item);
|
||||
if(item.getId() == 6199 && player instanceof Player){
|
||||
player.sendMessage("<col=990000>A mystery box has fallen on the ground.</col>");
|
||||
}
|
||||
@@ -239,4 +239,4 @@ public final class NPCDropTables {
|
||||
this.modRate = modRate;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
package core.game.node.entity.skill.runecrafting;
|
||||
|
||||
import core.game.container.impl.EquipmentContainer;
|
||||
import core.game.node.entity.skill.SkillPulse;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.entity.impl.Animator.Priority;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.node.entity.player.link.diary.DiaryType;
|
||||
import core.game.node.entity.skill.SkillPulse;
|
||||
import core.game.node.entity.skill.Skills;
|
||||
import core.game.node.item.Item;
|
||||
import rs09.game.world.GameWorld;
|
||||
import core.game.world.update.flag.context.Animation;
|
||||
import core.game.world.update.flag.context.Graphics;
|
||||
import core.tools.RandomFunction;
|
||||
import static rs09.game.node.entity.player.info.stats.StatAttributeKeysKt.STATS_BASE;
|
||||
import static rs09.game.node.entity.player.info.stats.StatAttributeKeysKt.STATS_RC;
|
||||
import rs09.game.world.GameWorld;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -176,6 +178,7 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
|
||||
|
||||
if (player.getInventory().remove(item) && player.getInventory().hasSpaceFor(i)) {
|
||||
player.getInventory().add(i);
|
||||
player.incrementAttribute("/save:" + STATS_BASE + ":" + STATS_RC, amount);
|
||||
player.getSkills().addExperience(Skills.RUNECRAFTING, rune.getExperience() * amount, true);
|
||||
|
||||
// Achievement Diary handling
|
||||
@@ -195,6 +198,7 @@ public final class RuneCraftPulse extends SkillPulse<Item> {
|
||||
}
|
||||
} else {
|
||||
if (player.getInventory().remove(item)) {
|
||||
player.incrementAttribute("/save:" + STATS_BASE + ":" + STATS_RC, amount);
|
||||
for (int i = 0; i < amount; i++) {
|
||||
Rune rune = null;
|
||||
while (rune == null) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import core.game.node.entity.player.info.login.PlayerParser;
|
||||
import rs09.Server;
|
||||
import rs09.ServerConstants;
|
||||
import rs09.ServerStore;
|
||||
import rs09.game.content.global.GlobalKillCounter;
|
||||
import rs09.game.ge.OfferManager;
|
||||
import rs09.game.system.SystemLogger;
|
||||
import rs09.game.world.repository.Repository;
|
||||
@@ -91,6 +92,7 @@ public final class SystemTermination {
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
Repository.getDisconnectionQueue().update();
|
||||
GlobalKillCounter.save();
|
||||
GrandExchangeDatabase.save();
|
||||
OfferManager.save();
|
||||
SystemLogger.flushLogs();
|
||||
@@ -102,4 +104,4 @@ public final class SystemTermination {
|
||||
// ServerStore.dump(directory + "store/");
|
||||
SystemLogger.logInfo("[SystemTerminator] Saved player accounts!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user