Proper timing on removing exploded meso

No longer using scheduling on server side but rather
a delay value inherent to the "remove item from map" packet.
This commit is contained in:
P0nk
2024-08-20 20:10:32 +02:00
parent 439753eb6d
commit cdd1c8cb61
2 changed files with 34 additions and 40 deletions

View File

@@ -2595,7 +2595,6 @@ public class PacketCreator {
* @param slot
* @return
*/
// TODO: look for a "delay" in case animation = 4 (explode). Doesn't make sense for it to be server-sided.
public static Packet removeItemFromMap(int objId, int animation, int chrId, boolean pet, int slot) {
OutPacket p = OutPacket.create(SendOpcode.REMOVE_ITEM_FROM_MAP);
p.writeByte(animation); // expire
@@ -2609,6 +2608,14 @@ public class PacketCreator {
return p;
}
public static Packet removeExplodedMesoFromMap(int mapObjectId, short delay) {
OutPacket p = OutPacket.create(SendOpcode.REMOVE_ITEM_FROM_MAP);
p.writeByte(4);
p.writeInt(mapObjectId);
p.writeShort(delay);
return p;
}
public static Packet updateCharLook(Client target, Character chr) {
OutPacket p = OutPacket.create(SendOpcode.UPDATE_CHAR_LOOK);
p.writeInt(chr.getId());