Jump to content

Recommended Posts

Posted
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
+

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


  • Posts

    • No, the real purpose is cheating and custom  development for games.  I'm building a custom AI moderator specially for checking illegal activity and flag current topica.
    • Hello trying to edit Armorgrp_Classic.dat using L2ClientDat Editor - l2jmobius edition I can normally open a file but can't save, even can't save "clean" version of file (just open and then click save) Other files i can normally open, edit and save. but there is problem with Armorgrp_Classic.dat Anyone find solution, or other Editor for protocol 166 ?   [25/12 15:10:11] --------------------------------------- [25/12 15:10:11] Open file: Armorgrp_Classic.dat [25/12 15:10:11] File Armorgrp_Classic.dat encrypted. Lineage2Ver413 decrypt ... [25/12 15:10:11] Decrypt Armorgrp_Classic.dat file successfully by v413_encdec decrypter. [25/12 15:10:11] Read the file structure ... [25/12 15:10:11] Unpacking [L2GameDataName.dat] [25/12 15:10:11] GameDataName: Load 97534 count. [25/12 15:10:11] Completed. [25/12 15:11:32] Wrong param count for wrapper: fertheia_mesh_add, paramIndex: 1, params: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} -node: fertheia_mesh_add[WRAPPER][null][null] param: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} org.l2jmobius.xml.exceptions.PackDataException: Wrong param count for wrapper: fertheia_mesh_add, paramIndex: 1, params: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} -node: fertheia_mesh_add[WRAPPER][null][null] param: {{{[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11];[None];[LineageAccessory3.fertheia_pvp_Hrm_ad11;[none]};{{109;114};{0;-1};{109;114};{0;-1};{109;114}}};{[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None];[Mantleguild.kingdom.E_elmd_1_t00];[None]};[None]} at org.l2jmobius.xml.DescriptorWriter.packData(DescriptorWriter.java:275) at org.l2jmobius.xml.DescriptorWriter.packData(DescriptorWriter.java:184) at org.l2jmobius.xml.DescriptorWriter.parseData(DescriptorWriter.java:100) at org.l2jmobius.actions.SaveDat.action(SaveDat.java:70) at org.l2jmobius.actions.ActionTask.doInBackground(ActionTask.java:48) at org.l2jmobius.actions.ActionTask.doInBackground(ActionTask.java:27) at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:303) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328) at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:340) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619) at java.base/java.lang.Thread.run(Thread.java:1447) [25/12 15:11:32] buff == null.  
    • Leave your contact information or write to me on Telegram @dieorditsa
    • Hello everyone, I’m looking for a graphic designer to design a custom logo that will be used in NPC HTML interfaces for Lineage. Please send me a private message if you are interested.
    • ok sounds good sign me up
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock