forked from Upstream/mmocore
Fixed issue #809 about passive skill being shown in the skill casting bar.
This commit is contained in:
parent
edc873a6c7
commit
d2d03e322c
@ -119,11 +119,12 @@ public class SkillBar implements Listener {
|
|||||||
if (!data.isOnline()) return str.toString();
|
if (!data.isOnline()) return str.toString();
|
||||||
for (int slot : data.mapBoundSkills().keySet()) {
|
for (int slot : data.mapBoundSkills().keySet()) {
|
||||||
ClassSkill skill = data.getBoundSkill(slot);
|
ClassSkill skill = data.getBoundSkill(slot);
|
||||||
str.append(str.isEmpty() ? "" : split).append((onCooldown(data, skill) ? onCooldown.replace("{cooldown}",
|
if (!skill.getSkill().getTrigger().isPassive())
|
||||||
String.valueOf(data.getCooldownMap().getInfo(skill).getRemaining() / 1000)) : noMana(data, skill) ? noMana : (noStamina(
|
str.append(str.isEmpty() ? "" : split).append((onCooldown(data, skill) ? onCooldown.replace("{cooldown}",
|
||||||
data, skill) ? noStamina : ready)).replace("{index}",
|
String.valueOf(data.getCooldownMap().getInfo(skill).getRemaining() / 1000)) : noMana(data, skill) ? noMana : (noStamina(
|
||||||
String.valueOf(slot + (data.getPlayer().getInventory().getHeldItemSlot() < slot ? 1 : 0)))
|
data, skill) ? noStamina : ready)).replace("{index}",
|
||||||
.replace("{skill}", data.getBoundSkill(slot).getSkill().getName()));
|
String.valueOf(slot + (data.getPlayer().getInventory().getHeldItemSlot() < slot ? 1 : 0)))
|
||||||
|
.replace("{skill}", data.getBoundSkill(slot).getSkill().getName()));
|
||||||
}
|
}
|
||||||
return MMOCore.plugin.placeholderParser.parse(data.getPlayer(), str.toString());
|
return MMOCore.plugin.placeholderParser.parse(data.getPlayer(), str.toString());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user