Fixed Henna removal.

This commit is contained in:
MobiusDevelopment
2019-08-24 12:13:13 +00:00
parent 49d216029e
commit 5413c9f399
2 changed files with 11 additions and 9 deletions

View File

@@ -220,7 +220,7 @@ public class AdminCreateItem implements IAdminCommandHandler
{
if (activeChar.getTarget() instanceof PlayerInstance)
{
if ((activeChar.getAccessLevel().getLevel() > 0) && (activeChar.getAccessLevel().getLevel() > 70))
if (activeChar.getAccessLevel().getLevel() > 70)
{
Player = (PlayerInstance) activeChar.getTarget();
}

View File

@@ -10396,6 +10396,16 @@ public class PlayerInstance extends Playable
LOGGER.warning("could not remove char henna: " + e);
}
// Add the recovered dyes to the player's inventory and notify them.
getInventory().addItem("Henna", henna.getItemIdDye(), henna.getAmountDyeRequire() / 2, this, null);
SystemMessage sm = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
sm.addItemName(henna.getItemIdDye());
sm.addNumber(henna.getAmountDyeRequire() / 2);
sendPacket(sm);
_henna[slot] = null;
// Calculate Henna modifiers of this PlayerInstance
recalcHennaStats();
@@ -10405,14 +10415,6 @@ public class PlayerInstance extends Playable
// Send Server->Client UserInfo packet to this PlayerInstance
sendPacket(new UserInfo(this));
// Add the recovered dyes to the player's inventory and notify them.
getInventory().addItem("Henna", henna.getItemIdDye(), henna.getAmountDyeRequire() / 2, this, null);
SystemMessage sm = new SystemMessage(SystemMessageId.EARNED_S2_S1_S);
sm.addItemName(henna.getItemIdDye());
sm.addNumber(henna.getAmountDyeRequire() / 2);
sendPacket(sm);
return true;
}