Fixed passive effects not applied when conditions are met.
Contributed by Sahar.
This commit is contained in:
parent
e56a1374d3
commit
f17155b4f0
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1251,6 +1251,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1257,6 +1257,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1257,6 +1257,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -926,12 +926,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1257,6 +1257,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1286,6 +1286,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1362,6 +1362,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1362,6 +1362,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected(), true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1355,6 +1355,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1257,6 +1257,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1257,6 +1257,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1286,6 +1286,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1362,6 +1362,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1362,6 +1362,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected(), true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1355,6 +1355,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
@ -922,12 +922,6 @@ public class EffectList
|
||||
LOGGER.warning("Passive " + skill + " with abnormal type: " + skill.getAbnormalType() + "!");
|
||||
}
|
||||
|
||||
// Check for passive skill conditions.
|
||||
if (!skill.checkCondition(info.getEffector(), info.getEffected()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous passives of this id.
|
||||
_passives.stream().filter(Objects::nonNull).filter(b -> b.getSkill().getId() == skill.getId()).forEach(b ->
|
||||
{
|
||||
|
@ -1257,6 +1257,8 @@ public abstract class Inventory extends ItemContainer
|
||||
item.updateDatabase();
|
||||
}
|
||||
|
||||
getOwner().getStat().recalculateStats(!getOwner().isPlayer());
|
||||
|
||||
if (getOwner().isPlayer())
|
||||
{
|
||||
getOwner().sendPacket(new ExUserInfoEquipSlot(getOwner().getActingPlayer()));
|
||||
|
@ -1375,7 +1375,7 @@ public class Skill implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
if (passive && checkConditions(SkillConditionScope.PASSIVE, effector, effector))
|
||||
if (passive)
|
||||
{
|
||||
final BuffInfo info = new BuffInfo(effector, effector, this, true, item, null);
|
||||
applyEffectScope(EffectScope.GENERAL, info, false, true);
|
||||
|
Loading…
Reference in New Issue
Block a user