Fixed bug where fired arrows could raise skill levels other than Archery

This commit is contained in:
GJ 2013-02-13 12:25:57 -05:00
parent 8312570825
commit 0879e1f326
2 changed files with 5 additions and 4 deletions

View File

@ -32,6 +32,7 @@ Version 1.4.00-dev
+ Added "Chinese (Taiwan)" localization files (zh_TW)
+ Added '/hardcore' and '/vampirism' commands for toggling these modes on or off.
= Fixed bug where splash potions could raise a player's unarmed level
= Fixed bug where fired arrows could raise skill levels other than Archery
= Fixed /ptp telporting the target to the player, rather than the other way around.
= Fixed Impact reducing the durability of non-armor equipped blocks
= Fixed Impact reducing improperly the durability of armors (as a consequence it is now more effective)

View File

@ -72,7 +72,7 @@ public final class CombatTools {
Material heldItemType = heldItem.getType();
DamageCause damageCause = event.getCause();
if (ItemChecks.isSword(heldItem) && damageCause != DamageCause.MAGIC) {
if (ItemChecks.isSword(heldItem) && damageCause == DamageCause.ENTITY_ATTACK) {
if (targetIsPlayer || targetIsTamedPet) {
if (!Swords.pvpEnabled) {
return;
@ -103,7 +103,7 @@ public final class CombatTools {
startGainXp(mcMMOPlayer, target, SkillType.SWORDS);
}
}
else if (ItemChecks.isAxe(heldItem) && damageCause != DamageCause.MAGIC) {
else if (ItemChecks.isAxe(heldItem) && damageCause == DamageCause.ENTITY_ATTACK) {
if (targetIsPlayer || targetIsTamedPet) {
if (!Axes.pvpEnabled) {
return;
@ -141,7 +141,7 @@ public final class CombatTools {
startGainXp(mcMMOPlayer, target, SkillType.AXES);
}
}
else if (heldItemType == Material.AIR && damageCause != DamageCause.MAGIC) {
else if (heldItemType == Material.AIR && damageCause == DamageCause.ENTITY_ATTACK) {
if (targetIsPlayer || targetIsTamedPet) {
if (!configInstance.getUnarmedPVP()) {
return;
@ -176,7 +176,7 @@ public final class CombatTools {
startGainXp(mcMMOPlayer, target, SkillType.UNARMED);
}
}
else if (heldItemType == Material.BONE && target instanceof Tameable && Permissions.beastLore(player) && damageCause != DamageCause.MAGIC) {
else if (heldItemType == Material.BONE && target instanceof Tameable && Permissions.beastLore(player) && damageCause == DamageCause.ENTITY_ATTACK) {
TamingManager tamingManager = new TamingManager(Users.getPlayer(player));
tamingManager.beastLore(target);
event.setCancelled(true);