Fixed custom tools not handling the Ability_Enabled flag properly.

This commit is contained in:
GJ
2012-06-28 11:20:53 -04:00
parent 9789143c6d
commit 189f23f407
4 changed files with 14 additions and 49 deletions

View File

@ -323,12 +323,6 @@ public class Combat {
* @param type The type of skill being used
*/
public static void applyAbilityAoE(Player attacker, LivingEntity target, int damage, SkillType type) {
ItemStack inHand = attacker.getItemInHand();
if (ModChecks.isCustomTool(inHand) && !ModChecks.getToolFromItemStack(inHand).isAbilityEnabled()) {
return;
}
int numberOfTargets = Misc.getTier(attacker.getItemInHand()); //The higher the weapon tier, the more targets you hit
int damageAmount = damage;

View File

@ -101,6 +101,10 @@ public class Skills {
ToolType tool = skill.getTool();
ItemStack inHand = player.getItemInHand();
if (ModChecks.isCustomTool(inHand) && !ModChecks.getToolFromItemStack(inHand).isAbilityEnabled()) {
return;
}
/* Check if any abilities are active */
if (!PP.getAbilityUse()) {
return;