mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-18 04:20:19 -07:00
Merge branch 'master' into 'master'
Changes to ExaminePacket.java See merge request 2009scape/2009scape!226
This commit is contained in:
commit
82f1c171b4
1 changed files with 15 additions and 3 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue