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);
|
||||
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@@ -2434,6 +2434,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)
|
||||
|
@@ -894,6 +894,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);
|
||||
@@ -924,6 +929,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);
|
||||
@@ -960,7 +970,6 @@ public abstract class Inventory extends ItemContainer
|
||||
|
||||
// common
|
||||
addPaperdollListener(StatsListener.getInstance());
|
||||
|
||||
}
|
||||
|
||||
protected abstract ItemLocation getEquipLocation();
|
||||
@@ -2215,7 +2224,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()
|
||||
{
|
||||
@@ -2239,6 +2249,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