Browse Source

likely fix for too many status updates

Sami 17 years ago
parent
commit
f9e2edaf45

+ 2 - 2
L2_GameServer_It/java/net/sf/l2j/gameserver/model/L2Character.java

@@ -391,8 +391,8 @@ public abstract class L2Character extends L2Object
 	    {
 	    {
 	    	if (currentHp == getMaxHp())
 	    	if (currentHp == getMaxHp())
 	    	{
 	    	{
-	    		_hpUpdateIncCheck = getMaxHp();
-	    		_hpUpdateDecCheck = _hpUpdateIncCheck - _hpUpdateInterval;
+	    		_hpUpdateIncCheck = currentHp + 1;
+	    		_hpUpdateDecCheck = currentHp - _hpUpdateInterval;
 	    	}
 	    	}
 	    	else
 	    	else
 	    	{
 	    	{

+ 4 - 4
L2_GameServer_It/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java

@@ -3471,8 +3471,8 @@ public final class L2PcInstance extends L2PlayableInstance
 	    {
 	    {
 	    	if (currentCp == getMaxCp())
 	    	if (currentCp == getMaxCp())
 	    	{
 	    	{
-	    		_cpUpdateIncCheck = getMaxCp();
-	    		_cpUpdateDecCheck = _cpUpdateIncCheck - _cpUpdateInterval;
+	    		_cpUpdateIncCheck = currentCp + 1;
+	    		_cpUpdateDecCheck = currentCp - _cpUpdateInterval;
 	    	}
 	    	}
 	    	else
 	    	else
 	    	{
 	    	{
@@ -3504,8 +3504,8 @@ public final class L2PcInstance extends L2PlayableInstance
 	    {
 	    {
 	    	if (currentMp == getMaxMp())
 	    	if (currentMp == getMaxMp())
 	    	{
 	    	{
-	    		_mpUpdateIncCheck = getMaxMp();
-	    		_mpUpdateDecCheck = _mpUpdateIncCheck - _mpUpdateInterval;
+	    		_mpUpdateIncCheck = currentMp + 1;
+	    		_mpUpdateDecCheck = currentMp - _mpUpdateInterval;
 	    	}
 	    	}
 	    	else
 	    	else
 	    	{
 	    	{