Fixed Henna removal.
This commit is contained in:
@@ -220,7 +220,7 @@ public class AdminCreateItem implements IAdminCommandHandler
|
|||||||
{
|
{
|
||||||
if (activeChar.getTarget() instanceof PlayerInstance)
|
if (activeChar.getTarget() instanceof PlayerInstance)
|
||||||
{
|
{
|
||||||
if ((activeChar.getAccessLevel().getLevel() > 0) && (activeChar.getAccessLevel().getLevel() > 70))
|
if (activeChar.getAccessLevel().getLevel() > 70)
|
||||||
{
|
{
|
||||||
Player = (PlayerInstance) activeChar.getTarget();
|
Player = (PlayerInstance) activeChar.getTarget();
|
||||||
}
|
}
|
||||||
|
@@ -10396,6 +10396,16 @@ public class PlayerInstance extends Playable
|
|||||||
LOGGER.warning("could not remove char henna: " + e);
|
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
|
// Calculate Henna modifiers of this PlayerInstance
|
||||||
recalcHennaStats();
|
recalcHennaStats();
|
||||||
|
|
||||||
@@ -10405,14 +10415,6 @@ public class PlayerInstance extends Playable
|
|||||||
// Send Server->Client UserInfo packet to this PlayerInstance
|
// Send Server->Client UserInfo packet to this PlayerInstance
|
||||||
sendPacket(new UserInfo(this));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user