Hi everyone.
With quests, its common where when giving an item the item is displayed in the chatbox with a message.
However, for some reason some items are moved up and off center. An example:
imgur.com/a/dznKBoD
Does anyone know what this happens and how it is fixed?
Thanks.
EDIT
I send the item via this
Code:
public void sendGiveItemNpc(String text, int item) {
player.getPlayerAssistant().sendFrame126(text, 308);
player.getPlayerAssistant().sendFrame246(307, 200, item);
player.getPlayerAssistant().sendChatInterface(306);
}
which is then processed
Code:
public void sendFrame246(int MainFrame, int SubFrame, int SubFrame2) {
// synchronized(c) {
if (player.getOutStream() != null && player != null) {
player.getOutStream().createFrame(246);
player.getOutStream().writeWordBigEndian(MainFrame);
player.getOutStream().writeWord(SubFrame);
player.getOutStream().writeWord(SubFrame2);
player.flushOutStream();
}
}
and therefore is passed to the client via this:
Code:
if (pktType == 246) {
int i6 = inStream.method434();
int i13 = inStream.readUnsignedWord();
int k18 = inStream.readUnsignedWord();
if (k18 == 65535) {
RSInterface.interfaceCache[i6].anInt233 = 0;
pktType = -1;
return true;
} else {
ItemDef itemDef = ItemDef.forID(k18);
RSInterface.interfaceCache[i6].anInt233 = 4;
RSInterface.interfaceCache[i6].mediaID = k18;
RSInterface.interfaceCache[i6].anInt270 = itemDef.modelRotation1;
RSInterface.interfaceCache[i6].anInt271 = itemDef.modelRotation2;
RSInterface.interfaceCache[i6].anInt269 = itemDef.modelZoom * 100 / i13;
pktType = -1;
return true;
}
}
So the only thing I can think of is the "ModelZoom" but I'm sure that this would account for all items. I'm still struggling to figure this out.