Make use of the next/previous arrows in the interface used for ::stats, tracking all npc kills and tracking drops of items tagged with "rare_item": "true", and displaying a curated subset of them.

This commit is contained in:
Avi Weinstock
2021-10-18 22:00:06 -04:00
parent 1cd298b14c
commit b9328d40f4
11 changed files with 344 additions and 60 deletions
+10
View File
@@ -35,7 +35,9 @@ import core.game.world.update.flag.chunk.AnimateObjectUpdateFlag
import core.game.world.update.flag.context.Animation
import core.game.world.update.flag.context.Graphics
import rs09.game.content.dialogue.DialogueFile
import rs09.game.content.global.GlobalKillCounter;
import rs09.game.system.SystemLogger
import rs09.game.system.config.ItemConfigParser;
import rs09.game.world.GameWorld
import rs09.game.world.GameWorld.Pulser
import rs09.game.world.repository.Repository
@@ -1254,4 +1256,12 @@ object ContentAPI {
is Graphics -> Graphics.send(gfx, location)
}
}
@JvmStatic
fun announceIfRare(player: Player, item: Item) {
if (item.definition.getConfiguration(ItemConfigParser.RARE_ITEM, false)) {
ContentAPI.sendNews("${player.username} has just received: ${item.amount} x ${item.name}.");
GlobalKillCounter.incrementRareDrop(player, item);
}
}
}