Stat update & Mob skill animation & Yellow EXP patch + Packet logging

Solved a deadlock case within character stat locks that would sometimes tangle up during stat update dispatch operations.
Fixed skill animation being unproperly casted when a mob tries to use a skill even though it couldn't possibly use from its current skillset.
Fixed a bug with EXP gain (on where the solo player is on a party) where the EXP would appear in yellow even after soloing a mob.
Added packet logging.

Happy Easter, folks!
This commit is contained in:
ronancpl
2019-04-21 21:37:29 -03:00
parent d121ba7d2a
commit bad69dc66f
13 changed files with 186 additions and 17 deletions

View File

@@ -52,6 +52,7 @@ public class FilePrinter {
EXPLOITS = "game/exploits/",
STORAGE = "game/storage/",
PACKET_LOGS = "game/packetlogs/",
PACKET_STREAM = "game/packetstream/",
FREDRICK = "game/npcs/fredrick/",
NPC_UNCODED = "game/npcs/UncodedNPCs.txt",
QUEST_UNCODED = "game/quests/UncodedQuests.txt",

View File

@@ -21,6 +21,7 @@
*/
package tools;
import constants.CharsetConstants;
import java.io.ByteArrayOutputStream;
public class HexTool {
@@ -84,4 +85,23 @@ public class HexTool {
}
return baos.toByteArray();
}
public static final String toStringFromAscii(final byte[] bytes) {
byte[] ret = new byte[bytes.length];
for (int x = 0; x < bytes.length; x++) {
if (bytes[x] < 32 && bytes[x] >= 0) {
ret[x] = '.';
} else {
int chr = ((short) bytes[x]) & 0xFF;
ret[x] = (byte) chr;
}
}
String encode = CharsetConstants.MAPLE_TYPE.getAscii();
try {
String str = new String(ret, encode);
return str;
} catch (Exception e) {}
return "";
}
}