Quick fix for monkey gree gree's (#447)

This commit is contained in:
Mr Extremez
2020-12-17 08:00:31 -06:00
committed by GitHub
parent 953419b33a
commit ec7a4b0b74
2 changed files with 78 additions and 73 deletions
@@ -2426,79 +2426,84 @@ public abstract class Player {
playerProps.writeByte(headIcon); playerProps.writeByte(headIcon);
playerProps.writeByte(headIconPk); playerProps.writeByte(headIconPk);
if (playerEquipment[playerHat] > 1) { if(!isNpc) {
playerProps.writeWord(0x200 + playerEquipment[playerHat]); if (playerEquipment[ItemConstants.HAT] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.HAT]);
playerProps.writeByte(0); } else {
} playerProps.writeByte(0);
}
if (playerEquipment[playerCape] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerCape]); if (playerEquipment[ItemConstants.CAPE] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.CAPE]);
playerProps.writeByte(0); } else {
} playerProps.writeByte(0);
}
if (playerEquipment[playerAmulet] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerAmulet]); if (playerEquipment[ItemConstants.AMULET] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.AMULET]);
playerProps.writeByte(0); } else {
} playerProps.writeByte(0);
}
if (playerEquipment[playerWeapon] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerWeapon]); if (playerEquipment[ItemConstants.WEAPON] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.WEAPON]);
playerProps.writeByte(0); } else {
} playerProps.writeByte(0);
}
if (playerEquipment[playerChest] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerChest]); if (playerEquipment[ItemConstants.CHEST] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.CHEST]);
playerProps.writeWord(0x100 + playerAppearance[2]); } else {
} playerProps.writeWord(0x100 + playerAppearance[2]);
}
if (playerEquipment[playerShield] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerShield]); if (playerEquipment[ItemConstants.SHIELD] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.SHIELD]);
playerProps.writeByte(0); } else {
} playerProps.writeByte(0);
}
if (!ItemData.isFullBody(playerEquipment[playerChest])) {
playerProps.writeWord(0x100 + playerAppearance[3]); if (!ItemData.isFullBody(playerEquipment[ItemConstants.CHEST])) {
} else { playerProps.writeWord(0x100 + playerAppearance[3]);
playerProps.writeByte(0); } else {
} playerProps.writeByte(0);
}
if (playerEquipment[playerLegs] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerLegs]); if (playerEquipment[ItemConstants.LEGS] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.LEGS]);
playerProps.writeWord(0x100 + playerAppearance[5]); } else {
} playerProps.writeWord(0x100 + playerAppearance[5]);
}
if (!ItemData.isFullHelm(playerEquipment[playerHat])
&& !ItemData.isFullMask(playerEquipment[playerHat])) { if (!ItemData.isFullHelm(playerEquipment[ItemConstants.HAT])
playerProps.writeWord(0x100 + playerAppearance[1]); && !ItemData.isFullMask(playerEquipment[ItemConstants.HAT])) {
} else { playerProps.writeWord(0x100 + playerAppearance[1]);
playerProps.writeByte(0); } else {
} playerProps.writeByte(0);
}
if (playerEquipment[playerHands] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerHands]); if (playerEquipment[ItemConstants.HANDS] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.HANDS]);
playerProps.writeWord(0x100 + playerAppearance[4]); } else {
} playerProps.writeWord(0x100 + playerAppearance[4]);
}
if (playerEquipment[playerFeet] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerFeet]); if (playerEquipment[ItemConstants.FEET] > 1) {
} else { playerProps.writeWord(0x200 + playerEquipment[ItemConstants.FEET]);
playerProps.writeWord(0x100 + playerAppearance[6]); } else {
} playerProps.writeWord(0x100 + playerAppearance[6]);
}
if (playerAppearance[0] != 1
&& !ItemData.isFullMask(playerEquipment[playerHat])) { if (playerAppearance[0] != 1 && !ItemData.isFullMask(playerEquipment[ItemConstants.HAT])) {
playerProps.writeWord(0x100 + playerAppearance[7]); playerProps.writeWord(0x100 + playerAppearance[7]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
} else {//send npc data
playerProps.writeWord(-1);//Tells client that were being a npc
playerProps.writeWord(npcId2);//send NpcID
}
playerProps.writeByte(playerAppearance[8]); playerProps.writeByte(playerAppearance[8]);
playerProps.writeByte(playerAppearance[9]); playerProps.writeByte(playerAppearance[9]);
Binary file not shown.