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); | ||||
| 		 | ||||
| 	} | ||||
| 	 | ||||
| 	// -------------------------------------------------------------------- | ||||
|   | ||||
| @@ -2478,6 +2478,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) | ||||
|   | ||||
| @@ -892,6 +892,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); | ||||
| @@ -922,6 +927,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); | ||||
| @@ -958,7 +968,6 @@ public abstract class Inventory extends ItemContainer | ||||
| 		 | ||||
| 		// common | ||||
| 		addPaperdollListener(StatsListener.getInstance()); | ||||
| 		 | ||||
| 	} | ||||
| 	 | ||||
| 	protected abstract ItemLocation getEquipLocation(); | ||||
| @@ -2213,7 +2222,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() | ||||
| 	{ | ||||
| @@ -2237,6 +2247,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
	 MobiusDevelopment
					MobiusDevelopment