Moved reference item check in skill mastery calculation.
This commit is contained in:
@@ -251,7 +251,7 @@ public class SkillCaster implements Runnable
|
||||
int reuseDelay = caster.getStat().getReuseTime(_skill);
|
||||
if (reuseDelay > 10)
|
||||
{
|
||||
if (Formulas.calcSkillMastery(caster, _skill) && !(_skill.getReferenceItemId() > 0))
|
||||
if (Formulas.calcSkillMastery(caster, _skill))
|
||||
{
|
||||
reuseDelay = 100;
|
||||
caster.sendPacket(SystemMessageId.A_SKILL_IS_READY_TO_BE_USED_AGAIN);
|
||||
|
@@ -943,10 +943,20 @@ public class Formulas
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean calcSkillMastery(Creature actor, Skill sk)
|
||||
public static boolean calcSkillMastery(Creature actor, Skill skill)
|
||||
{
|
||||
// Static Skills are not affected by Skill Mastery.
|
||||
if (sk.isStatic() || !actor.isPlayer())
|
||||
// Non players are not affected by Skill Mastery.
|
||||
if (!actor.isPlayer())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Static skills are not affected by Skill Mastery.
|
||||
if (skill.isStatic())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Item skills are not affected by Skill Mastery.
|
||||
if (skill.getReferenceItemId() > 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user