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

This commit is contained in:
nossr50 2019-01-20 02:44:18 -08:00
parent b1be43154a
commit ac4b8068b0
4 changed files with 12 additions and 1 deletions

View File

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

View File

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

View File

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

View File

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