浏览代码

BETA: Improved pets should avoid casting when the master has certain abnormal type blocked.

Reported by: Cresceus
Zoey76 11 年之前
父节点
当前提交
d84e672346

+ 6 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2BabyPetInstance.java

@@ -316,12 +316,17 @@ public final class L2BabyPetInstance extends L2PetInstance
 							continue;
 						}
 						
+						// If owner already have the buff, continue.
 						final BuffInfo buffInfo = owner.getEffectList().getBuffInfoByAbnormalType(skill.getAbnormalType());
 						if ((buffInfo != null) && (skill.getAbnormalLvl() <= buffInfo.getSkill().getAbnormalLvl()))
 						{
 							continue;
 						}
-						
+						// If owner have the buff blocked, continue.
+						if (owner.getEffectList().getAllBlockedBuffSlots().contains(skill.getAbnormalType()))
+						{
+							continue;
+						}
 						_currentBuffs.add(skill);
 					}
 				}