Proper solution for class change unequip issue.

This commit is contained in:
MobiusDevelopment
2021-08-23 21:12:01 +00:00
parent bda02389c6
commit 8975ca9f7e
171 changed files with 536 additions and 261 deletions

View File

@@ -2444,6 +2444,11 @@ public class PlayerInstance extends Playable
}
}
public boolean isChangingClass()
{
return _subclassLock;
}
/**
* Used for AltGameSkillLearn to set a custom skill learning class Id.
*/

View File

@@ -78,7 +78,6 @@ public class PlayerEventHolder
_player.setPvpKills(_pvpKills);
_player.setPkKills(_pkKills);
_player.setKarma(_karma);
}
public void setSitForced(boolean sitForced)

View File

@@ -711,6 +711,11 @@ public abstract class Inventory extends ItemContainer
@Override
public void notifyUnequiped(int slot, ItemInstance item, Inventory inventory)
{
if (item.getActingPlayer().isChangingClass())
{
return;
}
if (item.getItem().getBodyPart() == Item.SLOT_R_BRACELET)
{
inventory.unEquipItemInSlot(PAPERDOLL_DECO1);
@@ -746,7 +751,6 @@ public abstract class Inventory extends ItemContainer
// common
addPaperdollListener(StatsListener.getInstance());
}
protected abstract ItemLocation getEquipLocation();
@@ -1862,7 +1866,8 @@ public abstract class Inventory extends ItemContainer
}
/**
* Re-notify to paperdoll listeners every equipped item
* Re-notify to paperdoll listeners every equipped item.<br>
* Only used by player ClassId set methods.
*/
public void reloadEquippedItems()
{