private boolean canUseSkillInMove() { if (castingSkill != null) { SkillTemplate st = DataManager.SKILL_DATA.getSkillTemplate(castingSkill.getSkillId()); if (st.getStartconditions() != null && st.getMovedCondition() != null) { if (!st.getMovedCondition().isAllow()) return false; } } return true; }
public void rewardPlayer(Player player) { if (player != null) { int skillLvl = getObjectTemplate().getSkillLevel(); int xpReward = (int) ((0.008 * (skillLvl + 100) * (skillLvl + 100) + 60) * player.getRates().getGatheringXPRate()); if (player .getSkillList() .addSkillXp(player, getObjectTemplate().getHarvestSkill(), xpReward)) { PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.EXTRACT_GATHER_SUCCESS_GETEXP()); player.getCommonData().addExp(xpReward); } else PacketSendUtility.sendPacket( player, SM_SYSTEM_MESSAGE.MSG_DONT_GET_PRODUCTION_EXP( new DescriptionId( DataManager.SKILL_DATA .getSkillTemplate(getObjectTemplate().getHarvestSkill()) .getNameId()))); } }
/** @return the skill name */ public String getSkillName() { return DataManager.SKILL_DATA.getSkillTemplate(skillId).getName(); }