Pārlūkot izejas kodu

BETA: Skills fixes:
* Fixed Servitor Share being removed upon usage.
* Reported by: nBd, Hindi, thorl2
* Fixed passive skills not triggering effects.
* Reported by: nBd, pandragon, thorl2, Hindi, Battlecruiser, Zoey76
* Fixed self and channeling effects shouldn't be shared with pets, only servitors.

Zoey76 11 gadi atpakaļ
vecāks
revīzija
5f6b25abc4

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/CharEffectList.java

@@ -1379,8 +1379,8 @@ public final class CharEffectList
 				infoToRemove.removeStats();
 			}
 			
-			// Add stats to the character.
-			info.addStats();
+			// Initialize effects.
+			info.initializeEffects();
 			return;
 		}
 		

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/BuffInfo.java

@@ -256,7 +256,7 @@ public final class BuffInfo
 	public void initializeEffects()
 	{
 		// When effects are initialized, the successfully landed.
-		if (_env.getTarget().isPlayer())
+		if (_env.getTarget().isPlayer() && !_env.getSkill().isPassive())
 		{
 			final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
 			sm.addSkillName(_env.getSkill());

+ 3 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/L2Skill.java

@@ -1438,7 +1438,8 @@ public abstract class L2Skill implements IChanceSkillTrigger, IIdentifiable
 			effector.getEffectList().add(info);
 			
 			// Support for buff sharing feature.
-			if (addContinuousEffects && effected.isPlayer() && effected.hasSummon() && isContinuous() && !isDebuff())
+			// Avoiding Servitor Share since it's implementation already "shares" the effect.
+			if (addContinuousEffects && effected.isPlayer() && effected.hasServitor() && isContinuous() && !isDebuff() && (getId() != SKILL_SERVITOR_SHARE))
 			{
 				applyEffects(effector, effected.getSummon(), false, 0);
 			}
@@ -1493,7 +1494,7 @@ public abstract class L2Skill implements IChanceSkillTrigger, IIdentifiable
 			effector.getEffectList().add(info);
 			
 			// Support for buff sharing feature.
-			if (addContinuousEffects && effected.isPlayer() && effected.hasSummon() && isContinuous() && !isDebuff())
+			if (addContinuousEffects && effected.isPlayer() && effected.hasServitor() && isContinuous() && !isDebuff())
 			{
 				applyEffects(effector, effected.getSummon(), false, 0);
 			}