Fix for boots of lightness (#272)

This commit is contained in:
Danial
2019-12-12 22:32:06 +13:00
committed by Daniel Ginovker
parent c891e4741e
commit 8ec8a92d20
4 changed files with 13 additions and 25 deletions
@@ -1,5 +1,6 @@
package com.rebotted.net.packets.impl;
import com.rebotted.game.items.Weight;
import com.rebotted.game.items.impl.RareProtection;
import com.rebotted.game.players.Player;
import com.rebotted.net.packets.PacketType;
@@ -14,6 +15,7 @@ public class WearItem implements PacketType {
player.wearId = player.getInStream().readUnsignedWord();
player.wearSlot = player.getInStream().readUnsignedWordA();
player.interfaceId = player.getInStream().readUnsignedWordA();
Weight.updateWeight(player);
if (!RareProtection.equipItem(player)) {
return;
}
@@ -47,16 +49,13 @@ public class WearItem implements PacketType {
player.getPlayerAssistant().emptyPouch(pouch);
return;
}
if (player.wearId == 88 && player.playerEquipment[10] != 88) {
player.weight -= 4.5;
player.getPacketSender().writeWeight((int) player.weight);
}
if (player.wearSlot == player.playerHat) {
player.getPacketSender().setConfig(491, 0);
}
player.getPlayerAssistant().handleTiara();
player.getItemAssistant().wearItem(player.wearId, player.wearSlot);
Weight.updateWeight(player);
}
}