public void chargePlayer(Player player, Integer skillId) { if (player.getIncreasedForce() >= _charges) { player.sendPacket(SystemMsg.YOUR_FORCE_HAS_REACHED_MAXIMUM_CAPACITY_); return; } if (_fullCharge) player.setIncreasedForce(_charges); else player.setIncreasedForce(player.getIncreasedForce() + 1); }
@Override public boolean checkCondition( final Creature activeChar, final Creature target, boolean forceUse, boolean dontMove, boolean first) { if (!activeChar.isPlayer()) return false; Player player = (Player) activeChar; if (_charges == 10 && player.getSkillLevel(10301) != -1) // maybe something more practical? right now overrides any level of force before // that. _charges = 15; // Камушки можно юзать даже если заряд > 7, остальное только если заряд < уровень скила if (getPower() <= 0 && getId() != 2165 && player.getIncreasedForce() >= _charges) { activeChar.sendPacket(SystemMsg.YOUR_FORCE_HAS_REACHED_MAXIMUM_CAPACITY_); return false; } else if (getId() == 2165) player.sendPacket(new MagicSkillUse(player, player, 2165, 1, 0, 0)); return super.checkCondition(activeChar, target, forceUse, dontMove, first); }