Jump to content

Recommended Posts

Posted

I felt myself in a sharing mood today so heres a little stuff.

 

Basically that code add to the char ++ buffslot based on the characters lvl.

 

By default(as i setted it up):

from 40-51 +2slot

from 52-60 +4slot

from 61-75 +6slot

from 76-84 +8slot

in lvl 85 +10 slot

 

### Eclipse Workspace Patch 1.0
#P L2_GameServer
Index: java/net/sf/l2j/gameserver/model/CharEffectList.java
===================================================================
--- java/net/sf/l2j/gameserver/model/CharEffectList.java	(revision 3695)
+++ java/net/sf/l2j/gameserver/model/CharEffectList.java	(working copy)
@@ -53,10 +53,13 @@

	// Owner of this list
	private L2Character _owner;
-
+	
+	private L2PcInstance player; 
+ 	int maxBuffs = 0;
	public CharEffectList(L2Character owner)
	{
		_owner = owner;
+		maxBuffs = owner.getMaxBuffCount();
	}

	/**
@@ -623,6 +626,21 @@
		if (newEffect == null) return;

		L2Skill newSkill = newEffect.getSkill();
+		
+	 	if(_owner instanceof L2PcInstance) 
+	 	{ 
+	 		player = (L2PcInstance)_owner; 
+	 		if(player.getLevel() == 85) 
+	 	    	maxBuffs = _owner.getMaxBuffCount() + 10;
+	 		else if(player.getLevel() >= 76 && (player.getLevel()) <= 84)
+	 			maxBuffs = _owner.getMaxBuffCount() + 8;
+	 		else if(player.getLevel() >= 61 && (player.getLevel()) <= 75)
+	 			maxBuffs = _owner.getMaxBuffCount() + 6;
+	 		else if(player.getLevel() >= 52 && (player.getLevel()) <= 60)
+	 			maxBuffs = _owner.getMaxBuffCount() + 4;
+	 		else if(player.getLevel() >= 40 && (player.getLevel()) <= 51)
+	 			maxBuffs = _owner.getMaxBuffCount() + 2;
+		}

		if (newSkill.isDebuff())
		{

 

work with the latest version of l2j.

 

Hint come from l2j forum besides that credits to me.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..