Selaa lähdekoodia

revert [4040]. need rework.

JIV 15 vuotta sitten
vanhempi
sitoutus
9e3cbd3ea3

+ 1 - 11
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java

@@ -7747,7 +7747,7 @@ public final class L2PcInstance extends L2Playable
 
 					storedSkills.add(skill.getReuseHashCode());
 
-					if (effect != null && !effect.isHerbEffect() && effect.getInUse()
+					if (!effect.isHerbEffect() && effect.getInUse()
 					        && !skill.isToggle())
 					{
 						
@@ -11525,16 +11525,6 @@ public final class L2PcInstance extends L2Playable
 	 */
 	public void deleteMe(boolean closeClient)
 	{
-		try
-		{
-			if (closeClient && getClient() != null)
-				getClient().isDetached(true); // stop receiving any packets
-		}
-		catch (Exception e)
-		{
-			_log.log(Level.SEVERE, "deleteMe()", e);
-		}
-
 		try
 		{
 			abortAttack();

+ 3 - 3
L2_GameServer/java/com/l2jserver/gameserver/network/L2GameClient.java

@@ -219,7 +219,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>>
 		return _isDetached;
 	}
 	
-	public void isDetached(boolean b)
+	public void setDetached(boolean b)
 	{
 		_isDetached = b;
 	}
@@ -619,7 +619,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>>
 				final L2PcInstance player = L2GameClient.this.getActiveChar();
 				if (player != null && !isDetached())
 				{
-					isDetached(true);
+					setDetached(true);
 					if (!player.isInOlympiadMode()
 							&& !player.isFestivalParticipant()
 							&& !TvTEvent.isPlayerParticipant(player.getObjectId()) && !player.isInJail())
@@ -704,7 +704,7 @@ public final class L2GameClient extends MMOClient<MMOConnection<L2GameClient>>
 						L2Event.connectionLossData.put(player.getName(), data);
 					}
 					// to prevent call cleanMe() again
-					isDetached(false);
+					setDetached(false);
 
 					player.logout();