Instead of
Code:
Prayer.useBonesOnAltar(c, objectId, itemId); break;
Use
Code:
c.prayer.handleBones(itemId, true)
and want to create an instance of prayer in your client with
above the constructor and
Code:
prayer = new Prayer(this)
in the constructor of the client
Alternatively you can change
Code:
public void handleBones(int boneID, boolean altar) {
Bones bon = forBone(boneID);
if (bon != null) {
if (System.currentTimeMillis() - c.buryDelay >= 1200) {
c.getItems().deleteItem(bon.getId(), 1);
c.getPA().addSkillXP(altar ? bon.getAltarXP() : bon.getBuryXP(), c.playerPrayer);
c.buryDelay = System.currentTimeMillis();
c.startAnimation(altar ? 896 : 827);
c.sendMessage(altar ? "The gods are pleased with your offerings." : "You bury the bones.");
if(altar) {
c.getPA().createPlayersStillGfx(624, c.objectX, c.objectY, 0, 0);
}
}
}
}
to
Code:
public static void handleBones(int boneID, boolean altar, Client c) {
Bones bon = forBone(boneID);
if (bon != null) {
if (System.currentTimeMillis() - c.buryDelay >= 1200) {
c.getItems().deleteItem(bon.getId(), 1);
c.getPA().addSkillXP(altar ? bon.getAltarXP() : bon.getBuryXP(), c.playerPrayer);
c.buryDelay = System.currentTimeMillis();
c.startAnimation(altar ? 896 : 827);
c.sendMessage(altar ? "The gods are pleased with your offerings." : "You bury the bones.");
if(altar) {
c.getPA().createPlayersStillGfx(624, c.objectX, c.objectY, 0, 0);
}
}
}
}
And call
Code:
handleBones(itemId, true, c);