Merge branch 'master' into 'master'

Changes to ExaminePacket.java

See merge request 2009scape/2009scape!226
This commit is contained in:
Ceikry 2021-08-13 13:29:45 +00:00
commit 82f1c171b4

View file

@ -8,6 +8,7 @@ import core.cache.def.impl.VarbitDefinition;
import core.game.node.entity.player.Player;
import core.net.packet.IncomingPacket;
import core.net.packet.IoBuffer;
import org.rs09.consts.Items;
import java.util.Arrays;
@ -61,16 +62,27 @@ public final class ExaminePacket implements IncomingPacket {
/**
* Gets the item examine.
* @param id the id.
* @return the name.
* @param id the item id.
* @return the item examine.
*/
public static String getItemExamine(int id) {
if (id == 995) {
// Coins examine override
if (id == Items.COINS_995) {
return "Lovely money!";
}
// Clue scroll examine override
if (ItemDefinition.forId(id).getExamine().length() == 255) {
return "A set of instructions to be followed.";
}
// Noted item examine override
if (!ItemDefinition.forId(id).isUnnoted()) {
return "Swap this note at any bank for the equivalent item.";
}
// Return the examine string for the given item ID
return ItemDefinition.forId(id).getExamine();
}
}