Browse Source

Activating a super ability has a sound, and trying to cut down trees or activate skull splitter when on cooldown also has a sound.

nossr50 6 years ago
parent
commit
ac4b8068b0

+ 5 - 0
src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java

@@ -806,6 +806,7 @@ public class McMMOPlayer {
              */
             if (skill == PrimarySkillType.WOODCUTTING || skill == PrimarySkillType.AXES) {
                 NotificationManager.sendPlayerInformation(player, NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining));
+                SoundManager.sendSound(player, player.getLocation(), SoundType.TIRED);
             }
 
             return;
@@ -828,6 +829,10 @@ public class McMMOPlayer {
 
         SkillUtils.sendSkillMessage(player, NotificationType.SUPER_ABILITY_ALERT_OTHERS, ability.getAbilityPlayer());
 
+        //Sounds
+        SoundManager.worldSendSound(player.getWorld(), player.getLocation(), SoundType.ABILITY_ACTIVATED_GENERIC);
+
+
         // Enable the ability
         profile.setAbilityDATS(ability, System.currentTimeMillis() + (ticks * Misc.TIME_CONVERSION_FACTOR));
         setAbilityMode(ability, true);

+ 2 - 0
src/main/java/com/gmail/nossr50/util/sounds/SoundManager.java

@@ -86,6 +86,8 @@ public class SoundManager {
                 return Sound.ITEM_TRIDENT_RIPTIDE_3;
             case DEFLECT_ARROWS:
                 return Sound.ENTITY_ENDER_EYE_DEATH;
+            case TIRED:
+                return Sound.BLOCK_CONDUIT_AMBIENT;
             default:
                 return null;
         }

+ 2 - 1
src/main/java/com/gmail/nossr50/util/sounds/SoundType.java

@@ -13,7 +13,8 @@ public enum SoundType {
     DEFLECT_ARROWS,
     TOOL_READY,
     ABILITY_ACTIVATED_GENERIC,
-    ABILITY_ACTIVATED_BERSERK;
+    ABILITY_ACTIVATED_BERSERK,
+    TIRED;
 
     public boolean usesCustomPitch()
     {

+ 3 - 0
src/main/resources/sounds.yml

@@ -42,4 +42,7 @@ Sounds:
         Pitch: 0.1
     ABILITY_ACTIVATED_BERSERK:
         Volume: 0.5
+        Pitch: 1.7
+    TIRED:
+        Volume: 1.0
         Pitch: 1.7