Jump to content

[Share]Extra buffs slot


AlLupu

Recommended Posts

Index: java/com/l2jserver/Config.java
===================================================================
--- java/com/l2jserver/Config.java	(revision 4425)
+++ java/com/l2jserver/Config.java	(working copy)
@@ -41,6 +41,8 @@

import javax.xml.parsers.DocumentBuilderFactory;

+import javolution.util.FastList;
+
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -715,6 +717,8 @@
	public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP;
	public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP;
	public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST;
+	public static boolean L2JMOD_STRICT_BUFF_COUNT;
+	public static List<Integer> L2JMOD_STRICT_BUFF_EXCEPTIONS = new FastList<Integer>();;

	//--------------------------------------------------
	// NPC Settings
@@ -2422,6 +2426,12 @@
					L2WALKER_PROTECTION = Boolean.parseBoolean(L2JModSettings.getProperty("L2WalkerProtection", "False"));
					L2JMOD_DEBUG_VOICE_COMMAND = Boolean.parseBoolean(L2JModSettings.getProperty("DebugVoiceCommand", "False"));

+					L2JMOD_STRICT_BUFF_COUNT = Boolean.parseBoolean(L2JModSettings.getProperty("EnableStrictbuffCount", "False"));
+					for (String id : L2JModSettings.getProperty("StrictBuffExc", "0").split(","))
+					{
+							L2JMOD_STRICT_BUFF_EXCEPTIONS.add(Integer.parseInt(id));	
+					}	
+					
					L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP = Integer.parseInt(L2JModSettings.getProperty("DualboxCheckMaxPlayersPerIP", "0"));
					L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP = Integer.parseInt(L2JModSettings.getProperty("DualboxCheckMaxOlympiadParticipantsPerIP", "0"));
					String[] propertySplit = L2JModSettings.getProperty("DualboxCheckWhitelist", "127.0.0.1,0").split(";");
@@ -2448,7 +2458,7 @@
								_log.warning(StringUtil.concat("DualboxCheck[Config.load()]: invalid number -> DualboxCheckWhitelist \"", entrySplit[1], "\""));
							}
						}
-					}
+					}				
				}
				catch (Exception e)
				{
Index: java/com/l2jserver/gameserver/model/CharEffectList.java
===================================================================
--- java/com/l2jserver/gameserver/model/CharEffectList.java	(revision 4425)
+++ java/com/l2jserver/gameserver/model/CharEffectList.java	(working copy)
@@ -831,6 +831,8 @@
				else
				{
					effectsToRemove = getBuffCount() - _owner.getMaxBuffCount();
+				 if (!Config.L2JMOD_STRICT_BUFF_COUNT)
+				 {
					if (effectsToRemove >= 0)
					{
						switch (newSkill.getSkillType())
@@ -861,6 +863,40 @@
								}
						}
					}
+				 }
+				 else
+				 {
+						if (effectsToRemove >= 0 && (!Config.L2JMOD_STRICT_BUFF_EXCEPTIONS.contains(newSkill.getId())))
+						{
+							switch (newSkill.getSkillType())
+							{
+								case BUFF:
+								case REFLECT:
+								case HEAL_PERCENT:
+								case MANAHEAL_PERCENT:
+									for (L2Effect e : _buffs)
+									{
+										if (e == null || e.getSkill().isDance())
+											continue;
+										
+										switch (e.getSkill().getSkillType())
+										{
+											case BUFF:
+											case REFLECT:
+											case HEAL_PERCENT:
+											case MANAHEAL_PERCENT:
+												if (!Config.L2JMOD_STRICT_BUFF_EXCEPTIONS.contains(e.getSkill().getId())) e.exit();
+												effectsToRemove--;
+												break; // break switch()
+											default:
+												continue; // continue for()
+										}
+										if (effectsToRemove < 0)
+											break; // break for()
+									}
+							}
+						}					 
+				 }
				}
			}

Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Character.java	(revision 4425)
+++ java/com/l2jserver/gameserver/model/actor/L2Character.java	(working copy)
@@ -6870,7 +6870,10 @@
	 */
	public int getMaxBuffCount()
	{
-		return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION));
+		if (!Config.L2JMOD_STRICT_BUFF_COUNT)
+			return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION));
+		else
+			return Config.BUFFS_MAX_AMOUNT;
	}

	/**
Index: java/config/l2jmods.properties
===================================================================
--- java/config/l2jmods.properties	(revision 4425)
+++ java/config/l2jmods.properties	(working copy)
@@ -397,7 +397,16 @@
# Default: False
DebugVoiceCommand = False

+# ---------------------------------------------------------------------------
+# Strict buff control by szmajso@wp.pl
+# ---------------------------------------------------------------------------
+# NOTE!: Divine inspiration is disabled when this mod is enabled!
+# Enable system
+EnableStrictbuffCount = False

+#List of buff that are not count for maxbuff value (1;2;...)
+StrictBuffExc = 1207,1059
+
# ---------------------------------------------------------------------------
# Dualbox Check
# ---------------------------------------------------------------------------
@@ -418,3 +427,4 @@
# will be 1+2=3. Use 0 or negative value for unlimited number of connections.
# Default: 127.0.0.1,0 (no limits from localhost)
DualboxCheckWhitelist = 127.0.0.1,0
+

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt  
    • Server Rates: » Xp 500x. » Sp 500x. » Aden 500x. » Drop 1x. » PartyXp 2x. » PartySp 2x. » Starting character level -61. Enchant rates: » Safe enchant +4. » Blessed and simple scrolls max enchant (+16). » Crystal scrolls max enchant (+20). » Simple enchant scrolls chance – 65%. » Blessed enchant scrolls chance – 100%. » Crystal enchant scrolls chance – 50% Augmentations: » Mid life stone skill chance – 5%. » High life stone skill chance – 10%. » Top life stone skill chance – 20%. » Augments 1+1 Unique features: » Main town – Giran » Automatic-Manual Potions. » Working 2 castle sieges. (Giran-Aden) » SPS cancel lasts 10 seconds and than buffs come back. » Stackable scrolls, lifestones, book of giants. » Unique pvp zone » More then 11 active raid bosses. » Wedding system. » Unique farming areas. » Npc skill enchanter. » Full npc buffer with auto buff. » Max count of buffs – 55. » Max subclasses – 4. » Free and no quest class change. » Free and no quest sub class. » Raid boss drop nobless item. » No weight limit. » Unique protection anti-hwy armor for archers/daggers etc. » Ingame password change. » Top pvp/pk/online ranks NPC. » Unique monsters & NPC. » Interlude retail skills. » Server up-time [24/7] [99]%. » Perfect class balance (all class can kill all class depending on players skill and setup knowledge,gear,augmentations). » Announcements on double kills triple kills etc. » Announcements on Grand Boss death , with the name of the killer as well as clan name of the player. » Information Npc in game with all servers infromations. Custom server gear : 1). Titanium Armor Lv.1 2). Epic Armor Lv.2 3). Epic Weapons-Kamikaze-Black S grade (Same Stats) 4). Demonic-Angelic Wings-Baium Hair-Custom Accessories (SameStats) 5). Custom Fighter/Mage tattoo Lv1-Lv2-Lv3 6). Shirt (STR,CON,INT +1) 7). Custom Shields Server Commands: .tvtjoin .tvtleave – Join or leave tvt event. .ctfjoin .ctfleave – Join or leave ctf event. .dmjoin .dmleave – Join of leave dm event. .online – current online players count. .repair – repairs stuck character in world. .menu – opens online menu panel. .exit – PVP zone exit in case you are bullied. .changepassword - Opens online menu then u can change ur password in game. .farm - Enable/disable autofarm Event system: » TVT event » CTF event » DM event » Tournament Event » Party Zone » Unique event shop. Olympiad game: » Retail olympiad game. » Competition period [1] week. » Olympiad start time [18:00] end [00:00] GMT+2. » New Heroes every Sunday.
    • Tomorrow grand opening lests go 🙂 
  • Topics

×
×
  • Create New...