mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixed Disarm not working ever
This commit is contained in:
parent
69dfd5645a
commit
d099bc562b
@ -25,6 +25,7 @@ Version 1.3.00-dev
|
||||
+ Added 'mcmmo.commands.inspect' permission node for the new /inspect command
|
||||
+ Added Impact & Greater Impact subskills to Axes
|
||||
+ Re-added mcMMO reporting damage events
|
||||
= Fixed bug where Disarm didn't work at all ever
|
||||
= Fixed bug where Swords command showed Bleed Length twice instead of Bleed Chance
|
||||
= Fixed bug where Tree Feller wasn't checking for Tree Feller permission
|
||||
= Fixed bug where Leaf Blower required Tree Feller permissions rather than Woodcutting permissions
|
||||
@ -48,7 +49,7 @@ Version 1.3.00-dev
|
||||
! Changed Unarmed to start with a +3 DMG (1 Heart = 2 DMG) bonus from Iron Arm Style to make leveling it more viable
|
||||
! Changed Unarmed to gain bonus damage every 50 skill levels
|
||||
! Changed Unarmed to gain more bonus damage total than before
|
||||
! Changed Unarmed to disarm 1.5x more often than before
|
||||
! Changed Unarmed to have a max disarm chance of 33.3% rather than 25%
|
||||
! Changed Tree Feller to take down entire trees
|
||||
! Changed mob spawn tracking to use Unique Entity ID instead of Entity Object
|
||||
! Changed stats command name to mcstats for better plugin compatibility
|
||||
|
@ -28,7 +28,7 @@ public class UnarmedCommand implements CommandExecutor {
|
||||
if (PP.getSkillLevel(SkillType.UNARMED) < 1000)
|
||||
percentage = String.valueOf((skillvalue / 3000) * 100);
|
||||
else
|
||||
percentage = String.valueOf((1000 / 3000) * 100);
|
||||
percentage = "33.3";
|
||||
|
||||
if (PP.getSkillLevel(SkillType.UNARMED) < 1000)
|
||||
arrowpercentage = String.valueOf(((skillvalue / 1000) * 100) / 2);
|
||||
|
@ -42,19 +42,16 @@ public class Unarmed {
|
||||
public static void disarmProcCheck(Player attacker, Player defender)
|
||||
{
|
||||
int skillLevel = Users.getProfile(attacker).getSkillLevel(SkillType.UNARMED);
|
||||
if(attacker.getItemInHand() == null)
|
||||
if(attacker.getItemInHand() != null)
|
||||
{
|
||||
if(skillLevel >= 1000)
|
||||
{
|
||||
if(Math.random() * 3000 <= 1000)
|
||||
{
|
||||
ItemStack item = defender.getItemInHand();
|
||||
if(item != null)
|
||||
{
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
m.mcDropItem(defender.getLocation(), item);
|
||||
defender.setItemInHand(null);
|
||||
}
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
m.mcDropItem(defender.getLocation(), item);
|
||||
defender.setItemInHand(null);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -62,12 +59,9 @@ public class Unarmed {
|
||||
if(Math.random() * 3000 <= skillLevel)
|
||||
{
|
||||
ItemStack item = defender.getItemInHand();
|
||||
if(item != null)
|
||||
{
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
m.mcDropItem(defender.getLocation(), item);
|
||||
defender.setItemInHand(null);
|
||||
}
|
||||
defender.sendMessage(mcLocale.getString("Skills.Disarmed"));
|
||||
m.mcDropItem(defender.getLocation(), item);
|
||||
defender.setItemInHand(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user