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,80 +2426,85 @@ 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) {
playerProps.writeWord(0x200 + playerEquipment[ItemConstants.HAT]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
if (playerEquipment[playerCape] > 1) { if (playerEquipment[ItemConstants.CAPE] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerCape]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.CAPE]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
if (playerEquipment[playerAmulet] > 1) { if (playerEquipment[ItemConstants.AMULET] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerAmulet]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.AMULET]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
if (playerEquipment[playerWeapon] > 1) { if (playerEquipment[ItemConstants.WEAPON] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerWeapon]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.WEAPON]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
if (playerEquipment[playerChest] > 1) { if (playerEquipment[ItemConstants.CHEST] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerChest]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.CHEST]);
} else { } else {
playerProps.writeWord(0x100 + playerAppearance[2]); playerProps.writeWord(0x100 + playerAppearance[2]);
} }
if (playerEquipment[playerShield] > 1) { if (playerEquipment[ItemConstants.SHIELD] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerShield]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.SHIELD]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
if (!ItemData.isFullBody(playerEquipment[playerChest])) { if (!ItemData.isFullBody(playerEquipment[ItemConstants.CHEST])) {
playerProps.writeWord(0x100 + playerAppearance[3]); playerProps.writeWord(0x100 + playerAppearance[3]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
if (playerEquipment[playerLegs] > 1) { if (playerEquipment[ItemConstants.LEGS] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerLegs]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.LEGS]);
} else { } else {
playerProps.writeWord(0x100 + playerAppearance[5]); playerProps.writeWord(0x100 + playerAppearance[5]);
} }
if (!ItemData.isFullHelm(playerEquipment[playerHat]) if (!ItemData.isFullHelm(playerEquipment[ItemConstants.HAT])
&& !ItemData.isFullMask(playerEquipment[playerHat])) { && !ItemData.isFullMask(playerEquipment[ItemConstants.HAT])) {
playerProps.writeWord(0x100 + playerAppearance[1]); playerProps.writeWord(0x100 + playerAppearance[1]);
} else { } else {
playerProps.writeByte(0); playerProps.writeByte(0);
} }
if (playerEquipment[playerHands] > 1) { if (playerEquipment[ItemConstants.HANDS] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerHands]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.HANDS]);
} else { } else {
playerProps.writeWord(0x100 + playerAppearance[4]); playerProps.writeWord(0x100 + playerAppearance[4]);
} }
if (playerEquipment[playerFeet] > 1) { if (playerEquipment[ItemConstants.FEET] > 1) {
playerProps.writeWord(0x200 + playerEquipment[playerFeet]); playerProps.writeWord(0x200 + playerEquipment[ItemConstants.FEET]);
} else { } else {
playerProps.writeWord(0x100 + playerAppearance[6]); playerProps.writeWord(0x100 + playerAppearance[6]);
} }
if (playerAppearance[0] != 1 if (playerAppearance[0] != 1 && !ItemData.isFullMask(playerEquipment[ItemConstants.HAT])) {
&& !ItemData.isFullMask(playerEquipment[playerHat])) {
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]);
playerProps.writeByte(playerAppearance[10]); playerProps.writeByte(playerAppearance[10]);
Binary file not shown.