|
@@ -19,9 +19,12 @@ import com.gmail.nossr50.util.player.UserManager;
|
|
|
import com.gmail.nossr50.util.skills.PerksUtils;
|
|
|
import com.gmail.nossr50.util.skills.SkillActivationType;
|
|
|
import com.gmail.nossr50.util.skills.SkillUtils;
|
|
|
+import com.gmail.nossr50.util.sounds.SoundManager;
|
|
|
+import com.gmail.nossr50.util.sounds.SoundType;
|
|
|
import net.md_5.bungee.api.chat.ComponentBuilder;
|
|
|
import org.bukkit.Location;
|
|
|
import org.bukkit.Material;
|
|
|
+import org.bukkit.SoundCategory;
|
|
|
import org.bukkit.enchantments.Enchantment;
|
|
|
import org.bukkit.entity.Player;
|
|
|
import org.bukkit.event.Event;
|
|
@@ -225,6 +228,7 @@ public class Roll extends AcrobaticsSubSkill implements RandomChance {
|
|
|
|
|
|
if (!isFatal(player, modifiedDamage) && SkillUtils.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.ACROBATICS_ROLL, player, getPrimarySkill(), skillLevel, getActivationChance(mcMMOPlayer))) {
|
|
|
NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Roll.Text");
|
|
|
+ SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ROLL_ACTIVATED, SoundCategory.PLAYERS);
|
|
|
//player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Text"));
|
|
|
|
|
|
if (!SkillUtils.cooldownExpired((long) mcMMOPlayer.getTeleportATS(), Config.getInstance().getXPAfterTeleportCooldown())) {
|
|
@@ -264,6 +268,7 @@ public class Roll extends AcrobaticsSubSkill implements RandomChance {
|
|
|
AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.ACROBATICS_ROLL) / 2)) //This effectively makes it so you reach the max chance for success at half the requirements of roll's max chance (which would make graceful roll twice as likely per skill level)
|
|
|
{
|
|
|
NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Acrobatics.Ability.Proc");
|
|
|
+ SoundManager.sendCategorizedSound(player, player.getLocation(), SoundType.ROLL_ACTIVATED, SoundCategory.PLAYERS,0.5F);
|
|
|
SkillUtils.applyXpGain(mcMMOPlayer, getPrimarySkill(), calculateRollXP(player, damage, true), XPGainReason.PVE);
|
|
|
|
|
|
return modifiedDamage;
|