L2JMobius

Master Class fix kingdom cloaks

paxt · 1 · 163

Offline paxt

  • Black Sheep
  • Vassal
  • *
    • Posts: 8
fixed kingdom cloaks when they bugged and got 0% chance enchant and didn't enchant more

Code: [Select]
if (scrollTemplate.isBlessedDown() || ((supportTemplate != null) && supportTemplate.isDown()))
{
if(item.getEnchantLevel() > 0) {
client.sendPacket(SystemMessageId.THE_ENCHANT_VALUE_IS_DECREASED_BY_1);
item.setEnchantLevel(item.getEnchantLevel() - 1);
}
else {
client.sendPacket(SystemMessageId.THE_ENCHANT_VALUE_IS_DECREASED_BY_1);
item.setEnchantLevel(0);
}
}
else // Blessed enchant: Clear enchant value.
{
player.sendPacket(SystemMessageId.THE_BLESSED_ENCHANT_FAILED_THE_ENCHANT_VALUE_OF_THE_ITEM_BECAME_0);
item.setEnchantLevel(0);
}
player.sendPacket(new EnchantResult(EnchantResult.FAIL, item));
item.updateDatabase();