Code:
public void appendHitUpdate(Stream str) {
synchronized(this) {
str.writeByte(getHitDiff()); // What the perseon got 'hit' for
if (poisonMask == 1) {
str.writeByteA(2);
} else if (getHitDiff() > 0) {
str.writeByteA(1); // 0: red hitting - 1: blue hitting
} else {
str.writeByteA(0); // 0: red hitting - 1: blue hitting
}
if (playerLevel[3] <= 0) {
playerLevel[3] = 0;
isDead = true;
}
str.writeByte(CIcon); // The combat icon
str.writeByteC(playerLevel[3]); // Their current hp, for HP bar
str.writeByte(getLevelForXP(playerXP[3])); // Their max hp, for HP bar
}
}
public void appendHitUpdate2(Stream str) {
synchronized(this) {
str.writeByte(hitDiff2); // What the perseon got 'hit' for
if (poisonMask == 2) {
str.writeByteS(2);
poisonMask = -1;
} else if (hitDiff2 > 0) {
str.writeByteS(1); // 0: red hitting - 1: blue hitting
} else {
str.writeByteS(0); // 0: red hitting - 1: blue hitting
}
if (playerLevel[3] <= 0) {
playerLevel[3] = 0;
isDead = true;
}
str.writeByte(CIcon); // The combat icon
str.writeByte(playerLevel[3]); // Their current hp, for HP bar
str.writeByteC(getLevelForXP(playerXP[3])); // Their max hp, for HP bar
}
}
here
and also when you're poisoned you get a critical melee hit icon.