Proper solution for class change unequip issue.
This commit is contained in:
@@ -158,7 +158,6 @@ public class CreatureAI extends AbstractAI
|
||||
|
||||
// Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)
|
||||
clientStopAutoAttack();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -365,7 +365,6 @@ public class InstanceManager implements IXmlReader
|
||||
|
||||
// Save template
|
||||
_instanceTemplates.put(id, template);
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@@ -2444,6 +2444,11 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isChangingClass()
|
||||
{
|
||||
return _subclassLock;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Experience of the PlayerInstance.
|
||||
*/
|
||||
|
@@ -85,7 +85,6 @@ public class PlayerEventHolder
|
||||
_player.setPvpKills(_pvpKills);
|
||||
_player.setPkKills(_pkKills);
|
||||
_player.setReputation(_reputation);
|
||||
|
||||
}
|
||||
|
||||
public void setSitForced(boolean sitForced)
|
||||
|
@@ -931,6 +931,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);
|
||||
@@ -961,6 +966,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_BROOCH)
|
||||
{
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_JEWEL1);
|
||||
@@ -991,6 +1001,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_L_BRACELET)
|
||||
{
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_AGATHION1);
|
||||
@@ -1019,6 +1034,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_ARTIFACT_BOOK)
|
||||
{
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_ARTIFACT1);
|
||||
@@ -1071,7 +1091,6 @@ public abstract class Inventory extends ItemContainer
|
||||
|
||||
// common
|
||||
addPaperdollListener(StatsListener.getInstance());
|
||||
|
||||
}
|
||||
|
||||
protected abstract ItemLocation getEquipLocation();
|
||||
@@ -2475,7 +2494,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()
|
||||
{
|
||||
@@ -2488,13 +2508,6 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
slot = item.getLocationSlot();
|
||||
|
||||
// Do not unequip bracelets, talismans or artifacts.
|
||||
if ((slot >= PAPERDOLL_LBRACELET) && (slot <= PAPERDOLL_ARTIFACT21))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (PaperdollListener listener : _paperdollListeners)
|
||||
{
|
||||
if (listener == null)
|
||||
@@ -2506,6 +2519,7 @@ public abstract class Inventory extends ItemContainer
|
||||
listener.notifyEquiped(slot, item, this);
|
||||
}
|
||||
}
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@@ -305,7 +305,6 @@ public class LongTimeEvent extends Quest
|
||||
}
|
||||
}
|
||||
}.load();
|
||||
|
||||
}
|
||||
|
||||
protected class ScheduleStart implements Runnable
|
||||
|
@@ -52,6 +52,5 @@ public class SnoopQuit implements IClientIncomingPacket
|
||||
|
||||
target.removeSnooper(player);
|
||||
player.removeSnooped(target);
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user