L2JMobius

C6 Non-dropable items are dropped on karma death

G-hamsteR · 5 · 5130

Online G-hamsteR

  • Viscount
  • *****
    • Posts: 335
Hello,

In addition to a previous fix (https://l2jmobius.org/forum/index.php?topic=5056.0), I noticed that non-dropable items are still getting dropped when you die with karma.

I dropped a Lord's Crown, which is a non-droppable item.


Online G-hamsteR

  • Viscount
  • *****
    • Posts: 335
I think I found a solution. PlayerInstance.java:

I changed this:

Code: [Select]
// Don't drop
if (itemDrop.isAugmented() || // Dont drop augmented items
itemDrop.isShadowItem() || // Dont drop Shadow Items
(itemDrop.getItemId() == 57) || // Adena
(itemDrop.getItem().getType2() == Item.TYPE2_QUEST) || // Quest Items
Config.KARMA_LIST_NONDROPPABLE_ITEMS.contains(itemDrop.getItemId()) || // Item listed in the non droppable item list
Config.KARMA_LIST_NONDROPPABLE_PET_ITEMS.contains(itemDrop.getItemId()) || // Item listed in the non droppable pet item list
((getPet() != null) && (getPet().getControlItemId() == itemDrop.getItemId() // Control Item of active pet
)))
{
continue;
}


To this:
Code: [Select]
// Don't drop
if (itemDrop.isAugmented() || // Dont drop augmented items
itemDrop.isShadowItem() || // Dont drop Shadow Items
(itemDrop.getItemId() == 57) || // Adena
(itemDrop.getItem().getType2() == Item.TYPE2_QUEST) || // Quest Items
(itemDrop.getItem().isDropable() == false) || // Non-dropable item
Config.KARMA_LIST_NONDROPPABLE_ITEMS.contains(itemDrop.getItemId()) || // Item listed in the non droppable item list
Config.KARMA_LIST_NONDROPPABLE_PET_ITEMS.contains(itemDrop.getItemId()) || // Item listed in the non droppable pet item list
((getPet() != null) && (getPet().getControlItemId() == itemDrop.getItemId() // Control Item of active pet
)))
{
continue;
}


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16135