Переглянути джерело

Reverting [2396] until can be reworked. New side effects detected: #3084

DrHouse 16 роки тому
батько
коміт
d8fb867594

+ 2 - 5
L2_GameServer/java/config/Character.properties

@@ -119,12 +119,9 @@ AutoLearnSkills = False
 # Retail: false
 AutoLootHerbs = False
 
-# Maximum number of buffs and songs/dances
-# Since Gracia, song and dance count is split from other buffs.
-# (default buffs = 20 + 4 with divine inspiration skill)
-# Retail: 20, 12
+# Maximum number of buffs (default = 20 + 4 with divine inspiration skill)
+# Retail: 20
 maxbuffamount = 20
-maxdanceamount = 12
 
 # This option allows a player to automatically learn Divine Inspiration.
 # this is not included in AutoLearnSkills above.

+ 1 - 3
L2_GameServer/java/net/sf/l2j/Config.java

@@ -110,7 +110,6 @@ public final class Config
     public static boolean	AUTO_LEARN_SKILLS;
     public static boolean	AUTO_LOOT_HERBS;
     public static byte		BUFFS_MAX_AMOUNT;
-    public static byte		DANCES_MAX_AMOUNT;
     public static boolean	AUTO_LEARN_DIVINE_INSPIRATION;
     public static boolean	ALT_GAME_CANCEL_BOW;
     public static boolean	ALT_GAME_CANCEL_CAST;
@@ -1127,8 +1126,7 @@ public final class Config
                 
                 AUTO_LEARN_SKILLS					= Boolean.parseBoolean(Character.getProperty("AutoLearnSkills", "false"));
                 AUTO_LOOT_HERBS						= Boolean.parseBoolean(Character.getProperty("AutoLootHerbs", "true"));
-                BUFFS_MAX_AMOUNT					= Byte.parseByte(Character.getProperty("maxbuffamount","20"));
-                DANCES_MAX_AMOUNT					= Byte.parseByte(Character.getProperty("maxdanceamount","12"));
+                BUFFS_MAX_AMOUNT					= Byte.parseByte(Character.getProperty("maxbuffamount","24"));
                 AUTO_LEARN_DIVINE_INSPIRATION		= Boolean.parseBoolean(Character.getProperty("AutoLearnDivineInspiration", "false"));
                 ALT_GAME_CANCEL_BOW					= Character.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow") || Character.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");
                 ALT_GAME_CANCEL_CAST				= Character.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || Character.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");

+ 5 - 15
L2_GameServer/java/net/sf/l2j/gameserver/model/CharEffectList.java

@@ -294,9 +294,8 @@ public class CharEffectList
 	 * Removes the first buff of this list.
 	 *
 	 * @param preferSkill If != 0 the given skill Id will be removed instead of the first
-	 * @param danceBuff If true removes song/dance type buff only
 	 */
-	private void removeFirstBuff(int preferSkill, boolean danceBuff)
+	private void removeFirstBuff(int preferSkill)
 	{
 		L2Effect[] effects = getAllEffects();
 		L2Effect removeMe = null;
@@ -304,14 +303,12 @@ public class CharEffectList
 		for (L2Effect e : effects)
 		{
 			if ( e != null &&
-					(danceBuff && e.getSkill().isDance()) ||
-					(!danceBuff && !e.getSkill().isDance() &&
-					 (e.getSkill().getSkillType() == L2SkillType.BUFF ||
+					(e.getSkill().getSkillType() == L2SkillType.BUFF ||
 					 e.getSkill().getSkillType() == L2SkillType.DEBUFF ||
 					 e.getSkill().getSkillType() == L2SkillType.REFLECT ||
 					 e.getSkill().getSkillType() == L2SkillType.HEAL_PERCENT ||
 					 e.getSkill().getSkillType() == L2SkillType.MANAHEAL_PERCENT) &&
-					!(e.getSkill().getId() > 4360  && e.getSkill().getId() < 4367))) // Seven Signs buff
+					!(e.getSkill().getId() > 4360  && e.getSkill().getId() < 4367)) // Seven Signs buff
 			{
 				if (preferSkill == 0) { removeMe = e; break; }
 				else if (e.getSkill().getId() == preferSkill) { removeMe = e; break; }
@@ -448,8 +445,7 @@ public class CharEffectList
                 tempSkill.getSkillType() == L2SkillType.REFLECT ||
                 tempSkill.getSkillType() == L2SkillType.HEAL_PERCENT ||
                 tempSkill.getSkillType() == L2SkillType.MANAHEAL_PERCENT) &&
-                !tempSkill.isDebuff() &&  !tempSkill.isDance() &&
-                !(tempSkill.getId() > 4360 && tempSkill.getId() < 4367))
+                !tempSkill.isDebuff() &&  !(tempSkill.getId() > 4360 && tempSkill.getId() < 4367))
         	)
 			{
 				// if max buffs, no herb effects are used, even if they would replace one old
@@ -458,13 +454,7 @@ public class CharEffectList
 					newEffect.stopEffectTask(); 
 					return; 
 				}
-				removeFirstBuff(tempSkill.getId(), false);
-			}
-
-			// Remove first Song/Dance if number of Song/Dances > getMaxDanceCount()
-			if (tempSkill.isDance() && getDanceCount() >= Config.DANCES_MAX_AMOUNT && !doesStack(tempSkill))
-			{
-				removeFirstBuff(tempSkill.getId(), true);
+				removeFirstBuff(tempSkill.getId());
 			}
 
 			// Add the L2Effect to all effect in progress on the L2Character