Definitely not the packet client sided, can you show the server side "refresh" method and processing.
|
Issue (Happens when you first login):
This generally happens when you update a container when you first login, also happens when updating a singular slot in the container (e.g drinking a potion, the potion will dissappere for a split of a second).
What could be the issue? I don't imagine the time from encoding the packet to the client recieving it, is super slow.
Packet 34 (updating a single slot)
packet 53 (updating multiple slots)Code:case 34: int containerInterfaceId = inStream.readUnsignedWord(); RSInterface class9_2 = RSInterface.interfaceCache[containerInterfaceId]; while (inStream.position < pktSize) { int itemSlot = inStream.method422(); int itemId = inStream.readUnsignedWord(); int itemAmount = inStream.readUnsignedByte(); if (itemAmount == 255) itemAmount = inStream.readDWord(); if (itemSlot >= 0 && itemSlot < class9_2.inv.length) { class9_2.inv[itemSlot] = itemId; class9_2.invStackSizes[itemSlot] = itemAmount; } } pktType = -1; return true;
Code:int i7 = inStream.readUnsignedWord(); RSInterface class9_1 = RSInterface.interfaceCache[i7]; int j19 = inStream.readUnsignedWord(); for (int j22 = 0; j22 < j19; j22++) { int i25 = inStream.readUnsignedByte(); if (i25 == 255) i25 = inStream.method440(); class9_1.inv[j22] = inStream.method436(); class9_1.invStackSizes[j22] = i25; } for (int j25 = j19; j25 < class9_1.inv.length; j25++) { class9_1.inv[j25] = 0; class9_1.invStackSizes[j25] = 0; } pktType = -1;
Definitely not the packet client sided, can you show the server side "refresh" method and processing.
// used when regularily updating the container (wearing an item)
// used when initiating the containerCode:PacketBuilder updateContainerSlotBuilder = new PacketBuilder(PacketConstants.UPDATE_CONTAINER_SLOT, PacketType.VARIABLE_SHORT); updateContainerSlotBuilder.writeShort(interfaceId); updateContainerSlotBuilder.writeSmart(slot); if (item == null) { updateContainerSlotBuilder.writeShort(0); updateContainerSlotBuilder.writeByte(0); } else { updateContainerSlotBuilder.writeShort((item.getId() + 1)); if (item.getAmount() > 254) { updateContainerSlotBuilder.writeByte(255); updateContainerSlotBuilder.writeInt(item.getAmount()); } else { updateContainerSlotBuilder.writeByte(item.getAmount()); } } player.write(updateContainerSlotBuilder.toPacket());
Code:PacketBuilder updateContainerBuilder = new PacketBuilder(PacketConstants.UPDATE_ALL_CONTAINER_SLOTS, PacketType.VARIABLE_SHORT); updateContainerBuilder.writeShort(interfaceId); updateContainerBuilder.writeShort(items.length); for (int slot = 0; slot < items.length; slot++) { Item item = items[slot]; if (item == null) { updateContainerBuilder.writeByte((byte) 0); updateContainerBuilder.writeLEShortA(0); } else { if (item.getAmount() > 254) { updateContainerBuilder.writeByte((byte) 255); updateContainerBuilder.writeInt2(item.getAmount()); } else { updateContainerBuilder.writeByte((byte) item.getAmount()); } updateContainerBuilder.writeLEShortA(item.getId() + 1); } } player.write(updateContainerBuilder.toPacket()); return this;
It doesn't seem like it's just the container, it also appears to be the interface button and the slot backgrounds as well. The issue could be anything from the client not drawing interface components fast enough to having a limited number of bytes being sent over the network at once.
If you're worried it's the latency in the network you can always send an additional 8 bytes representing the timestamp that the packet was created and then compare it against when it was received. You could also check the duration between when you start to draw the container and when it's done. It could really be anything, just debug.
item container packet is received then the next draw cycle will draw the container that you have updated, item by item. this is exactly what you're seeing in both gifs.
Is it possible your using packet 53 to update a single slot, forcing multiple updates to occur per slot per cycle? Can you post the code that gets sent on login to update worn items? Check to see how long in milliseconds each reference to update a slot or all slots take. Is it possible the packets being sent out are limited at a certain rate per cycle?
I’m not using packet 53 to update single slots; its only sent when you login or a new container is attached to the player.
Will get back to you eith an answer to the rest of your questions, am currently out, thanks for your inputs
Need to pack the new overlays and underlays
It's a problem with all 317s, nothing to really worry over. It's not just the items or the container that's causing this, it's how 317s load the interfaces. If you look at your very first gif, you'll notice that it's not just items that are loaded with a delay, the bonuses button there is loaded as the final component. 317s don't do any caching for the components when loading them, unlike osrs(and all the other higher revisions obviously) which caches everything during the load process and after it finishes all of it(cs2 calls n other misc crap), it will draw everything instantly.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |