diff --git a/Server/src/main/content/global/handlers/item/DragonfireShieldPlugin.java b/Server/src/main/content/global/handlers/item/DragonfireShieldPlugin.java index 485cb29e2..d43770722 100644 --- a/Server/src/main/content/global/handlers/item/DragonfireShieldPlugin.java +++ b/Server/src/main/content/global/handlers/item/DragonfireShieldPlugin.java @@ -13,6 +13,8 @@ import core.game.node.entity.impl.Projectile; import core.game.node.entity.player.Player; import core.game.node.item.Item; import core.game.node.item.ItemPlugin; +import core.game.world.map.MapDistance; +import core.game.world.map.RegionManager; import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; @@ -20,6 +22,7 @@ import core.plugin.Plugin; import core.game.node.entity.combat.CombatPulse; import core.game.world.GameWorld; import core.plugin.ClassScanner; +import org.rs09.consts.Sounds; import java.util.concurrent.TimeUnit; @@ -84,6 +87,7 @@ public final class DragonfireShieldPlugin extends OptionHandler { setVarp(player, 301, 0); } player.removeAttribute("dfs_spec"); + playAudio(entity.asPlayer(), Sounds.DRAGONSLAYER_SHIELDFIRE_3761, 10, 0, true, entity.asPlayer().getLocation(), 5); Item shield = player.getEquipment().get(EquipmentContainer.SLOT_SHIELD); if (shield == null || shield.getId() != 11283) { return -1; @@ -97,7 +101,13 @@ public final class DragonfireShieldPlugin extends OptionHandler { } return super.swing(entity, victim, state); } - }; + @Override + public void visualizeImpact(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.FIRESTRIKE_HIT_161, 10, 20, true, victim.getLocation(), 5); + super.visualizeImpact(entity, victim, state); + } + + }; attack.setHandler(handler); Entity victim = player.getProperties().getCombatPulse().getVictim(); if (player.getProperties().getCombatPulse().isAttacking() && handler.canSwing(player, victim) == InteractionType.STILL_INTERACT) { @@ -110,6 +120,7 @@ public final class DragonfireShieldPlugin extends OptionHandler { player.getInventory().replace(new Item(11284), item.getSlot()); player.graphics(Graphics.create(1160)); player.getPacketDispatch().sendMessage("You release the charges."); + playAudio(player,Sounds.DRAGONSLAYER_SHIELD_EMPTY_3760); return true; case "inspect": if (item.getId() == 11284) { diff --git a/Server/src/main/content/global/handlers/item/equipment/special/AncientMaceSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/AncientMaceSpecialHandler.java index fc5268698..aa3c10502 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/AncientMaceSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/AncientMaceSpecialHandler.java @@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the ancient mace special attack "Favour of the War God". @@ -72,6 +75,7 @@ public final class AncientMaceSpecialHandler extends MeleeSwingHandler implement @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.GOBLIN_MACE_3592, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/BackstabSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/BackstabSpecialHandler.java index 0e60dbdda..d394d288e 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/BackstabSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/BackstabSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Bone dagger special attack "Backstab". @@ -70,6 +73,7 @@ public final class BackstabSpecialHandler extends MeleeSwingHandler implements P @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.DTTD_BONE_DAGGER_STAB_1084, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/ChainhitSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/ChainhitSpecialHandler.java index 838caf5a2..1b372e468 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/ChainhitSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/ChainhitSpecialHandler.java @@ -20,10 +20,13 @@ import core.tools.RandomFunction; import core.game.node.entity.combat.RangeSwingHandler; import core.game.world.GameWorld; import core.game.world.repository.Repository; +import org.rs09.consts.Sounds; import java.util.Iterator; import java.util.List; +import static core.api.ContentAPIKt.playAudio; + /** * Handles the Rune throwing axe special attack "Chain-hit". * @author Emperor @@ -104,6 +107,7 @@ public final class ChainhitSpecialHandler extends RangeSwingHandler implements P @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.CHAINSHOT_2528, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); int speed = (int) (32 + (entity.getLocation().getDistance(victim.getLocation()) * 5)); Projectile.create(entity, victim, 258, 40, 36, 32, speed, 5, 11).send(); diff --git a/Server/src/main/content/global/handlers/item/equipment/special/CleaveSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/CleaveSpecialHandler.java index c1b856eeb..5d71fd7f1 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/CleaveSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/CleaveSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Represents the cleave special handler. @@ -59,12 +62,12 @@ public final class CleaveSpecialHandler extends MeleeSwingHandler implements Plu hit = RandomFunction.random(calculateHit(entity, victim, 1.2203)); } state.setEstimatedHit(hit); - entity.asPlayer().getAudioManager().send(new Audio(2529), true); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.CLEAVE_2529, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/DescentOfDarknessSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/DescentOfDarknessSpecialHandler.java index faeca021b..1c3ce43c9 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/DescentOfDarknessSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/DescentOfDarknessSpecialHandler.java @@ -16,6 +16,9 @@ import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; import core.game.node.entity.combat.RangeSwingHandler; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Represents the descent of darkness sepcial handler. @@ -121,8 +124,6 @@ public final class DescentOfDarknessSpecialHandler extends RangeSwingHandler imp start = state.getAmmunition().getStartGraphics(); if (state.isFrozen()) { if (entity instanceof Player) { - entity.asPlayer().getAudioManager().send(new Audio(3736), true); - entity.asPlayer().getAudioManager().send(new Audio(3737), true); } DRAGON_PROJECTILE.copy(entity, victim, 5).send(); } else { @@ -145,6 +146,8 @@ public final class DescentOfDarknessSpecialHandler extends RangeSwingHandler imp @Override public void visualizeImpact(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.DARKBOW_SHADOW_ATTACK_3736, 10, 20, true, victim.getLocation(), 10); + playAudio(entity.asPlayer(), Sounds.DARKBOW_SHADOW_IMPACT_3737, 10, 40, true, victim.getLocation(), 10); victim.visualize(victim.getProperties().getDefenceAnimation(), state.isFrozen() ? DRAGON_IMPACT : DARKNESS_IMPACT); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/DragonfireSwingHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/DragonfireSwingHandler.java index d4b666c78..0497836a8 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/DragonfireSwingHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/DragonfireSwingHandler.java @@ -15,6 +15,7 @@ import core.game.world.GameWorld; import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; import static core.api.ContentAPIKt.*; @@ -137,7 +138,7 @@ public class DragonfireSwingHandler extends CombatSwingHandler { shield.setCharge(shield.getCharge() + 20); EquipmentContainer.updateBonuses(p); p.getPacketDispatch().sendMessage("Your dragonfire shield glows more brightly."); - + playAudio(p, Sounds.DRAGONSLAYER_ABSORB_FIRE_3740); p.faceLocation(entity.getCenterLocation()); victim.visualize(Animation.create(6695), Graphics.create(1163)); } else { diff --git a/Server/src/main/content/global/handlers/item/equipment/special/EnergyDrainSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/EnergyDrainSpecialHandler.java index 00f8d7913..58f44294b 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/EnergyDrainSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/EnergyDrainSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Abyssal whip's Energy drain special attack. @@ -62,12 +65,12 @@ public final class EnergyDrainSpecialHandler extends MeleeSwingHandler implement ((Player) entity).getSettings().updateRunEnergy(-10); } state.setEstimatedHit(hit); - entity.asPlayer().getAudioManager().send(new Audio(2713), true); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.ENERGYDRAIN_2713, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.animate(ANIMATION); victim.graphics(GRAPHIC); } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/ExcaliburSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/ExcaliburSpecialHandler.java index 018a88f17..3ba8c9992 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/ExcaliburSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/ExcaliburSpecialHandler.java @@ -12,6 +12,7 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; +import org.rs09.consts.Sounds; import static core.api.ContentAPIKt.*; @@ -62,6 +63,7 @@ public final class ExcaliburSpecialHandler extends MeleeSwingHandler implements if (!p.getSettings().drainSpecial(SPECIAL_ENERGY)) return -1; p.sendChat("For Camelot!"); + playAudio(entity.asPlayer(), Sounds.SANCTUARY_2539); p.visualize(ANIMATION, GRAPHIC); switch(p.getEquipment().get(EquipmentContainer.SLOT_WEAPON).getId()) { case 35: // Regular ol' excalibur diff --git a/Server/src/main/content/global/handlers/item/equipment/special/FeintSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/FeintSpecialHandler.java index 775ae3eb6..4b0e0567e 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/FeintSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/FeintSpecialHandler.java @@ -10,6 +10,9 @@ import core.game.world.update.flag.context.Animation; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles Vesta's Longsword special attack, feint. @@ -58,6 +61,7 @@ public final class FeintSpecialHandler extends MeleeSwingHandler implements Plug @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.CLEAVE_2529, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.animate(ANIMATION); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/HealingBladeSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/HealingBladeSpecialHandler.java index 8cbf175af..70e7939a5 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/HealingBladeSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/HealingBladeSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the healing blade special attack. @@ -69,12 +72,12 @@ public final class HealingBladeSpecialHandler extends MeleeSwingHandler implemen } entity.getSkills().heal(healthRestore); entity.getSkills().incrementPrayerPoints(prayerRestore); - entity.asPlayer().getAudioManager().send(new Audio(3857), true); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.GODWARS_SARADOMIN_SPECIAL_3857, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/IceCleaveSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/IceCleaveSpecialHandler.java index f988376e4..cb5374403 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/IceCleaveSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/IceCleaveSpecialHandler.java @@ -11,6 +11,7 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; import static core.api.ContentAPIKt.*; @@ -60,7 +61,6 @@ public final class IceCleaveSpecialHandler extends MeleeSwingHandler implements hit = RandomFunction.random(calculateHit(entity, victim, 1.005)); } state.setEstimatedHit(hit); - entity.asPlayer().getAudioManager().send(3846); return 1; } @@ -75,6 +75,7 @@ public final class IceCleaveSpecialHandler extends MeleeSwingHandler implements @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.GODWARS_GODSWORD_SLASH_3846, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/ImpaleSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/ImpaleSpecialHandler.java index bcb681ba9..57d178c19 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/ImpaleSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/ImpaleSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Rune claws special attack "Impale". @@ -64,6 +67,7 @@ public final class ImpaleSpecialHandler extends MeleeSwingHandler implements Plu @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.IMPALE_2534, 10, 0, true, entity.asPlayer().getLocation(), 5); if (((Player) entity).getDetails().getRights() == Rights.ADMINISTRATOR) { entity.animate(Animation.create(2068)); return; diff --git a/Server/src/main/content/global/handlers/item/equipment/special/JudgementSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/JudgementSpecialHandler.java index 9699b5520..585753830 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/JudgementSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/JudgementSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Judgement special attack. @@ -59,12 +62,12 @@ public final class JudgementSpecialHandler extends MeleeSwingHandler implements hit = RandomFunction.random(calculateHit(entity, victim, 1.25)); } state.setEstimatedHit(hit); - entity.asPlayer().getAudioManager().send(new Audio(3865), true); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.GODWARS_GODSWORD_SPECIAL_ATTACK_3865, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/PowershotSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/PowershotSpecialHandler.java index 418a7bf05..a0bbc73dd 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/PowershotSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/PowershotSpecialHandler.java @@ -10,6 +10,9 @@ import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; import core.game.node.entity.combat.RangeSwingHandler; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Magic longbow special attack "Powershot". @@ -57,7 +60,6 @@ public final class PowershotSpecialHandler extends RangeSwingHandler implements if (isAccurateImpact(entity, victim, CombatStyle.RANGE, 1.98, 1.0)) { hit = RandomFunction.random(calculateHit(entity, victim, 1.0)); } - entity.asPlayer().getAudioManager().send(2536); state.setEstimatedHit(hit); Companion.useAmmo(entity, state, victim.getLocation()); return 1 + (int) Math.ceil(entity.getLocation().getDistance(victim.getLocation()) * 0.3); @@ -65,6 +67,7 @@ public final class PowershotSpecialHandler extends RangeSwingHandler implements @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.POWERSHOT_2536, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(state.getRangeWeapon().getAnimation(), GRAPHIC); int speed = (int) (46 + (entity.getLocation().getDistance(victim.getLocation()) * 5)); Projectile.create(entity, victim, 249, 40, 36, 45, speed, 5, 11).send(); diff --git a/Server/src/main/content/global/handlers/item/equipment/special/PowerstabSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/PowerstabSpecialHandler.java index 0921b0c67..f659fad7b 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/PowerstabSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/PowerstabSpecialHandler.java @@ -16,6 +16,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Powerstab special attack. @@ -94,6 +97,7 @@ public final class PowerstabSpecialHandler extends MeleeSwingHandler implements @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.DRAGON_AXE_THUNDER_2530, 10, 0, true, entity.asPlayer().getLocation(), 6); entity.visualize(ANIMATION, GRAPHIC); } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/PunctureSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/PunctureSpecialHandler.java index 2a3385f9e..b335e2c1e 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/PunctureSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/PunctureSpecialHandler.java @@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the puncture special attack combat swing. @@ -73,13 +76,13 @@ public final class PunctureSpecialHandler extends MeleeSwingHandler implements P } else { hit = 0; } - entity.asPlayer().getAudioManager().send(2537); state.setSecondaryHit(hit); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.PUNCTURE_2537, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/QuickSmashSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/QuickSmashSpecialHandler.java index 2680f4503..615bb0f46 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/QuickSmashSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/QuickSmashSpecialHandler.java @@ -13,6 +13,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the granite maul special attack. @@ -73,12 +76,12 @@ public final class QuickSmashSpecialHandler extends MeleeSwingHandler implements hit = RandomFunction.random(calculateHit(entity, victim, 1.)); } victim.getImpactHandler().handleImpact(entity, hit, CombatStyle.MELEE); - entity.asPlayer().getAudioManager().send(new Audio(2715), true); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.QUICKSMASH_2715, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); victim.animate(victim.getProperties().getDefenceAnimation()); } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/RampageSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/RampageSpecialHandler.java index c4f7e8d08..3656a328e 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/RampageSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/RampageSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Rampage special attack. @@ -58,6 +61,7 @@ public final class RampageSpecialHandler extends MeleeSwingHandler implements Pl return -1; } p.sendChat("Raarrrrrgggggghhhhhhh!"); + playAudio(entity.asPlayer(), Sounds.RAMPAGE_2538, 1); p.visualize(ANIMATION, GRAPHIC); @SuppressWarnings("unused") int boost = 0; @@ -70,7 +74,6 @@ public final class RampageSpecialHandler extends MeleeSwingHandler implements Pl p.getSkills().updateLevel(i, (int) -drain, (int) (p.getSkills().getStaticLevel(i) - drain)); } p.getSkills().updateLevel(Skills.STRENGTH, (int) (p.getSkills().getStaticLevel(Skills.STRENGTH) * 0.20)); - p.getAudioManager().send(new Audio(386), true); return -1; } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SaradominsLightningHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SaradominsLightningHandler.java index 21cb7f485..f87a3e1b0 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SaradominsLightningHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SaradominsLightningHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Saradomin sword special attack. @@ -56,7 +59,6 @@ public final class SaradominsLightningHandler extends MeleeSwingHandler implemen } state.setEstimatedHit(hit); state.setSecondaryHit(secondary); - entity.asPlayer().getAudioManager().send(new Audio(3853), true); return 1; } @@ -75,9 +77,11 @@ public final class SaradominsLightningHandler extends MeleeSwingHandler implemen @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.GODWARS_SARADOMIN_MAGIC_IMPACT_3853, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } + @Override public Object fireEvent(String identifier, Object... args) { return null; diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SeercullSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SeercullSpecialHandler.java index 104748a42..273c65b03 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SeercullSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SeercullSpecialHandler.java @@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Represents the Seercull's special attack which lowers the opponent's magic @@ -66,6 +69,7 @@ public final class SeercullSpecialHandler extends RangeSwingHandler implements P @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.SOULSHOT_2546, 10, 0, true, entity.asPlayer().getLocation(), 5); victim.graphics(new Graphics(474)); int speed = (int) (35 + (entity.getLocation().getDistance(victim.getLocation()) * 10)); entity.visualize(entity.getProperties().getAttackAnimation(), DRAWBACK_GFX); diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SeverSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SeverSpecialHandler.java index 2ca75c4a1..226cfdb43 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SeverSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SeverSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Sever special attack. @@ -71,13 +74,13 @@ public final class SeverSpecialHandler extends MeleeSwingHandler implements Plug } } } - entity.asPlayer().getAudioManager().send(2540); state.setEstimatedHit(hit); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.SEVER_2540, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/ShatterSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/ShatterSpecialHandler.java index afd9f1baa..1720d88f5 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/ShatterSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/ShatterSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Shatter special attack. @@ -57,13 +60,13 @@ public final class ShatterSpecialHandler extends MeleeSwingHandler implements Pl if (isAccurateImpact(entity, victim, CombatStyle.MELEE, 0.87, 1.0)) { hit = RandomFunction.random(calculateHit(entity, victim, 1.3546)); } - entity.asPlayer().getAudioManager().send(new Audio(2541), true); state.setEstimatedHit(hit); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.SHATTER_2541, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/ShoveSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/ShoveSpecialHandler.java index 63e11b348..407a6eafe 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/ShoveSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/ShoveSpecialHandler.java @@ -14,7 +14,9 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; +import org.rs09.consts.Sounds; +import static core.api.ContentAPIKt.playAudio; import static core.api.ContentAPIKt.stun; /** @@ -104,12 +106,12 @@ public final class ShoveSpecialHandler extends MeleeSwingHandler implements Plug victim.getWalkingQueue().addPath(dest.getX(), dest.getY()); } } - entity.asPlayer().getAudioManager().send(2533); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.SHOVE_2544, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SliceAndDiceSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SliceAndDiceSpecialHandler.java index d06305855..76704c3ea 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SliceAndDiceSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SliceAndDiceSpecialHandler.java @@ -11,6 +11,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Dragon claws special attack "Slice and Dice". @@ -101,6 +104,7 @@ public final class SliceAndDiceSpecialHandler extends MeleeSwingHandler implemen @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.PUNCTURE_2537, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SmashSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SmashSpecialHandler.java index e5eb6e102..908821343 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SmashSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SmashSpecialHandler.java @@ -12,6 +12,9 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles Statius' Warhammer special attack - Smash. @@ -66,6 +69,7 @@ public final class SmashSpecialHandler extends MeleeSwingHandler implements Plug @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.TZHAAR_KET_OM_CRUSH_2520, 10, 0, true, entity.asPlayer().getLocation(), 4); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SnapshotSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SnapshotSpecialHandler.java index fceec555d..b851573c8 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SnapshotSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SnapshotSpecialHandler.java @@ -14,6 +14,9 @@ import core.plugin.Plugin; import core.tools.RandomFunction; import core.game.node.entity.combat.RangeSwingHandler; import core.game.world.GameWorld; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the magic shortbow special attack "Snapshot". @@ -72,7 +75,6 @@ public final class SnapshotSpecialHandler extends RangeSwingHandler implements P if (isAccurateImpact(entity, victim, CombatStyle.MELEE, 0.9, 1.0)) { hit = RandomFunction.random(max); } - entity.asPlayer().getAudioManager().send(2545); state.setSecondaryHit(hit); Companion.useAmmo(entity, state, victim.getLocation()); return 1 + (int) Math.ceil(entity.getLocation().getDistance(victim.getLocation()) * 0.3); @@ -100,6 +102,7 @@ public final class SnapshotSpecialHandler extends RangeSwingHandler implements P @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.SNAPSHOT_2545, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); int speed = (int) (27 + (entity.getLocation().getDistance(victim.getLocation()) * 5)); Projectile.create(entity, victim, 249, 40, 36, 20, speed, 15, 11).send(); diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SnipeSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SnipeSpecialHandler.java index 7c57c86d6..9ee338231 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SnipeSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SnipeSpecialHandler.java @@ -12,6 +12,9 @@ import core.plugin.Initializable; import core.plugin.Plugin; import core.tools.RandomFunction; import core.game.node.entity.combat.RangeSwingHandler; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Represents the Dorgeshuun crossbow's special attack - snipe. @@ -68,6 +71,7 @@ public final class SnipeSpecialHandler extends RangeSwingHandler implements Plug @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.DTTD_BONE_CROSSBOW_SA_1080, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.animate(ANIMATION); Projectile.create(entity, victim, 698, 36, 25, 35, 72).send(); } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SpearWallSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SpearWallSpecialHandler.java index 1b15db249..20ade75cd 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SpearWallSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SpearWallSpecialHandler.java @@ -16,6 +16,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles Vesta's Spear special attack - Spear Wall. @@ -93,7 +96,8 @@ public final class SpearWallSpecialHandler extends MeleeSwingHandler implements @Override public void visualize(Entity entity, Entity victim, BattleState state) { - entity.visualize(ANIMATION, GRAPHIC); + playAudio(entity.asPlayer(), Sounds.CLEAVE_2529, 10, 0, true, entity.asPlayer().getLocation(), 5); + entity.visualize(ANIMATION, GRAPHIC); } @Override @@ -103,6 +107,7 @@ public final class SpearWallSpecialHandler extends MeleeSwingHandler implements if (s != null) { s.getVictim().animate(victim.getProperties().getDefenceAnimation()); } + } return; } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/SweepSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/SweepSpecialHandler.java index 70c6cf229..80f273024 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/SweepSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/SweepSpecialHandler.java @@ -19,6 +19,9 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Dragon halberd special attack. @@ -156,6 +159,7 @@ public final class SweepSpecialHandler extends MeleeSwingHandler implements Plug @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.HALBERD_SWIPE_2533, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/WarstrikeSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/WarstrikeSpecialHandler.java index 028f356cc..0edd3ef68 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/WarstrikeSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/WarstrikeSpecialHandler.java @@ -13,6 +13,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles the Warstrike special attack. @@ -78,12 +81,12 @@ public final class WarstrikeSpecialHandler extends MeleeSwingHandler implements } } } - entity.asPlayer().getAudioManager().send(new Audio(3834), true); return 1; } @Override public void visualize(Entity entity, Entity victim, BattleState state) { + playAudio(entity.asPlayer(), Sounds.GODWARS_SARADOMIN_MAGIC_CASTANDFIRE_3834, 10, 0, true, entity.asPlayer().getLocation(), 5); entity.visualize(ANIMATION, GRAPHIC); } } diff --git a/Server/src/main/content/global/handlers/item/equipment/special/WeakenSpecialHandler.java b/Server/src/main/content/global/handlers/item/equipment/special/WeakenSpecialHandler.java index cc1298ff0..c9812fa5e 100644 --- a/Server/src/main/content/global/handlers/item/equipment/special/WeakenSpecialHandler.java +++ b/Server/src/main/content/global/handlers/item/equipment/special/WeakenSpecialHandler.java @@ -13,6 +13,9 @@ import core.game.world.update.flag.context.Graphics; import core.plugin.Plugin; import core.plugin.Initializable; import core.tools.RandomFunction; +import org.rs09.consts.Sounds; + +import static core.api.ContentAPIKt.playAudio; /** * Handles Darklight's special attack, Weaken. @@ -73,6 +76,6 @@ public final class WeakenSpecialHandler extends MeleeSwingHandler implements Plu @Override public void visualize(Entity entity, Entity victim, BattleState state) { entity.visualize(ANIMATION, GRAPHIC); - entity.asPlayer().getAudioManager().send(new Audio(225), true); + playAudio(entity.asPlayer(), Sounds.DARKLIGHT_WEAKEN_225, 10, 0, true, entity.asPlayer().getLocation(), 5); } } diff --git a/Server/src/main/content/global/skill/magic/ancient/BloodSpells.java b/Server/src/main/content/global/skill/magic/ancient/BloodSpells.java index b5c3b2bf4..b85dc51d9 100644 --- a/Server/src/main/content/global/skill/magic/ancient/BloodSpells.java +++ b/Server/src/main/content/global/skill/magic/ancient/BloodSpells.java @@ -17,6 +17,7 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; +import org.rs09.consts.Sounds; /** * Handles the Blood spells from the Ancient spellbook. @@ -80,10 +81,10 @@ public final class BloodSpells extends CombatSpell { @Override public Plugin newInstance(SpellType arg) throws Throwable { - SpellBook.ANCIENT.register(4, new BloodSpells(SpellType.RUSH, 56, 33.0, -1, -1, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.BLOOD_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2))); - SpellBook.ANCIENT.register(6, new BloodSpells(SpellType.BURST, 68, 39.0, -1, -1, new Animation(1979, Priority.HIGH), null, null, BURST_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4))); - SpellBook.ANCIENT.register(5, new BloodSpells(SpellType.BLITZ, 80, 45.0, -1, -1, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(2))); - SpellBook.ANCIENT.register(7, new BloodSpells(SpellType.BARRAGE, 92, 51.0, -1, -1, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(1), Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(4))); + SpellBook.ANCIENT.register(4, new BloodSpells(SpellType.RUSH, 56, 33.0, Sounds.BLOOD_RUSH_CASTING_108, Sounds.BLOOD_RUSH_IMPACT_110, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.BLOOD_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2))); + SpellBook.ANCIENT.register(6, new BloodSpells(SpellType.BURST, 68, 39.0, Sounds.BLOOD_CAST_106, Sounds.BLOOD_BURST_IMPACT_105, new Animation(1979, Priority.HIGH), null, null, BURST_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4))); + SpellBook.ANCIENT.register(5, new BloodSpells(SpellType.BLITZ, 80, 45.0, Sounds.BLOOD_CAST_106, Sounds.BLOOD_BLITZ_IMPACT_104, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(2))); + SpellBook.ANCIENT.register(7, new BloodSpells(SpellType.BARRAGE, 92, 51.0, Sounds.BLOOD_CAST_106, Sounds.BLOOD_BARRAGE_IMPACT_102, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(1), Runes.BLOOD_RUNE.getItem(4), Runes.DEATH_RUNE.getItem(4))); return this; } diff --git a/Server/src/main/content/global/skill/magic/ancient/IceSpells.java b/Server/src/main/content/global/skill/magic/ancient/IceSpells.java index 43d887426..b24e80256 100644 --- a/Server/src/main/content/global/skill/magic/ancient/IceSpells.java +++ b/Server/src/main/content/global/skill/magic/ancient/IceSpells.java @@ -18,6 +18,7 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; +import org.rs09.consts.Sounds; import static core.api.ContentAPIKt.*; @@ -93,7 +94,7 @@ public final class IceSpells extends CombatSpell { * @param end The end graphics. */ private IceSpells(SpellType type, int level, double baseExperience, int impactSound, Animation anim, Graphics start, Projectile projectile, Graphics end, Item... runes) { - super(type, SpellBook.ANCIENT, level, baseExperience, 171, impactSound, anim, start, projectile, end, runes); + super(type, SpellBook.ANCIENT, level, baseExperience, Sounds.ICE_CAST_171, impactSound, anim, start, projectile, end, runes); } @Override @@ -120,10 +121,10 @@ public final class IceSpells extends CombatSpell { @Override public Plugin newInstance(SpellType arg) throws Throwable { - SpellBook.ANCIENT.register(0, new IceSpells(SpellType.RUSH, 58, 34.0, 173, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.WATER_RUNE.getItem(2))); - SpellBook.ANCIENT.register(2, new IceSpells(SpellType.BURST, 70, 40.0, 170, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.WATER_RUNE.getItem(4))); - SpellBook.ANCIENT.register(1, new IceSpells(SpellType.BLITZ, 82, 46.0, 169, new Animation(1978, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.WATER_RUNE.getItem(3))); - SpellBook.ANCIENT.register(3, new IceSpells(SpellType.BARRAGE, 94, 52.0, 168, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.WATER_RUNE.getItem(6))); + SpellBook.ANCIENT.register(0, new IceSpells(SpellType.RUSH, 58, 34.0, Sounds.ICE_RUSH_IMPACT_173, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.WATER_RUNE.getItem(2))); + SpellBook.ANCIENT.register(2, new IceSpells(SpellType.BURST, 70, 40.0, Sounds.ICE_BURST_IMPACT_170, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.WATER_RUNE.getItem(4))); + SpellBook.ANCIENT.register(1, new IceSpells(SpellType.BLITZ, 82, 46.0, Sounds.ICE_BLITZ_IMPACT_169, new Animation(1978, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.WATER_RUNE.getItem(3))); + SpellBook.ANCIENT.register(3, new IceSpells(SpellType.BARRAGE, 94, 52.0, Sounds.ICE_BARRAGE_IMPACT_168, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.WATER_RUNE.getItem(6))); return this; } diff --git a/Server/src/main/content/global/skill/magic/ancient/MiasmicSpells.java b/Server/src/main/content/global/skill/magic/ancient/MiasmicSpells.java index ce74740f0..84a64dfc7 100644 --- a/Server/src/main/content/global/skill/magic/ancient/MiasmicSpells.java +++ b/Server/src/main/content/global/skill/magic/ancient/MiasmicSpells.java @@ -90,8 +90,8 @@ public final class MiasmicSpells extends CombatSpell { * @param projectile The projectile. * @param end The end graphics. */ - private MiasmicSpells(SpellType type, int level, double baseExperience, int impactSound, Animation anim, Graphics start, Projectile projectile, Graphics end, Item... runes) { - super(type, SpellBook.ANCIENT, level, baseExperience, 171, impactSound, anim, start, projectile, end, runes); + private MiasmicSpells(SpellType type, int level, double baseExperience, int castAudio, int impactSound, Animation anim, Graphics start, Projectile projectile, Graphics end, Item... runes) { + super(type, SpellBook.ANCIENT, level, baseExperience, castAudio, impactSound, anim, start, projectile, end, runes); } @Override @@ -111,10 +111,10 @@ public final class MiasmicSpells extends CombatSpell { @Override public Plugin newInstance(SpellType arg) throws Throwable { - SpellBook.ANCIENT.register(16, new MiasmicSpells(SpellType.RUSH, 61, 36.0, 173, new Animation(10513, Priority.HIGH), RUSH_START, null, RUSH_END, Runes.EARTH_RUNE.getItem(1), Runes.SOUL_RUNE.getItem(1), Runes.CHAOS_RUNE.getItem(2))); - SpellBook.ANCIENT.register(17, new MiasmicSpells(SpellType.BURST, 73, 42.0, 170, new Animation(10516, Priority.HIGH), BURST_START, null, BURST_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.CHAOS_RUNE.getItem(4))); - SpellBook.ANCIENT.register(18, new MiasmicSpells(SpellType.BLITZ, 85, 48.0, 169, new Animation(10524, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2))); - SpellBook.ANCIENT.register(19, new MiasmicSpells(SpellType.BARRAGE, 97, 54.0, 168, new Animation(10518, Priority.HIGH), BARRAGE_START, null, BARRAGE_END, Runes.EARTH_RUNE.getItem(4), Runes.SOUL_RUNE.getItem(4), Runes.BLOOD_RUNE.getItem(4))); + SpellBook.ANCIENT.register(16, new MiasmicSpells(SpellType.RUSH, 61, 36.0, 5368, 5365, new Animation(10513, Priority.HIGH), RUSH_START, null, RUSH_END, Runes.EARTH_RUNE.getItem(1), Runes.SOUL_RUNE.getItem(1), Runes.CHAOS_RUNE.getItem(2))); + SpellBook.ANCIENT.register(17, new MiasmicSpells(SpellType.BURST, 73, 42.0, 5366, 5372, new Animation(10516, Priority.HIGH), BURST_START, null, BURST_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.CHAOS_RUNE.getItem(4))); + SpellBook.ANCIENT.register(18, new MiasmicSpells(SpellType.BLITZ, 85, 48.0, 5370, 5367, new Animation(10524, Priority.HIGH), BLITZ_START, null, BLITZ_END, Runes.EARTH_RUNE.getItem(3), Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2))); + SpellBook.ANCIENT.register(19, new MiasmicSpells(SpellType.BARRAGE, 97, 54.0, 5371, 5369, new Animation(10518, Priority.HIGH), BARRAGE_START, null, BARRAGE_END, Runes.EARTH_RUNE.getItem(4), Runes.SOUL_RUNE.getItem(4), Runes.BLOOD_RUNE.getItem(4))); return this; } diff --git a/Server/src/main/content/global/skill/magic/ancient/ShadowSpells.java b/Server/src/main/content/global/skill/magic/ancient/ShadowSpells.java index ef5083ce6..94c555025 100644 --- a/Server/src/main/content/global/skill/magic/ancient/ShadowSpells.java +++ b/Server/src/main/content/global/skill/magic/ancient/ShadowSpells.java @@ -17,6 +17,7 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; +import org.rs09.consts.Sounds; /** * Handles the Shadow spells from the Ancient spellbook. @@ -81,10 +82,10 @@ public final class ShadowSpells extends CombatSpell { @Override public Plugin newInstance(SpellType arg) throws Throwable { - SpellBook.ANCIENT.register(12, new ShadowSpells(SpellType.RUSH, 52, 31.0, 175, 176, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.SOUL_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.AIR_RUNE.getItem(1))); - SpellBook.ANCIENT.register(14, new ShadowSpells(SpellType.BURST, 64, 37.0, 177, 178, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.SOUL_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.AIR_RUNE.getItem(1))); - SpellBook.ANCIENT.register(13, new ShadowSpells(SpellType.BLITZ, 76, 43.0, 181, 182, new Animation(1978, Priority.HIGH), null, null, BLITZ_END, Runes.SOUL_RUNE.getItem(2), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2))); - SpellBook.ANCIENT.register(15, new ShadowSpells(SpellType.BARRAGE, 88, 48.0, 181, 185, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4))); + SpellBook.ANCIENT.register(12, new ShadowSpells(SpellType.RUSH, 52, 31.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_RUSH_IMPACT_179, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.SOUL_RUNE.getItem(1), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.AIR_RUNE.getItem(1))); + SpellBook.ANCIENT.register(14, new ShadowSpells(SpellType.BURST, 64, 37.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_BURST_IMPACT_177, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.SOUL_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.AIR_RUNE.getItem(1))); + SpellBook.ANCIENT.register(13, new ShadowSpells(SpellType.BLITZ, 76, 43.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_BLITZ_IMPACT_176, new Animation(1978, Priority.HIGH), null, null, BLITZ_END, Runes.SOUL_RUNE.getItem(2), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2))); + SpellBook.ANCIENT.register(15, new ShadowSpells(SpellType.BARRAGE, 88, 48.0, Sounds.SHADOW_CAST_178, Sounds.SHADOW_BARRAGE_IMPACT_175, new Animation(1979, Priority.HIGH), null, null, BARRAGE_END, Runes.SOUL_RUNE.getItem(3), Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4))); return this; } diff --git a/Server/src/main/content/global/skill/magic/ancient/SmokeSpells.java b/Server/src/main/content/global/skill/magic/ancient/SmokeSpells.java index 7c3d23164..32a9abad8 100644 --- a/Server/src/main/content/global/skill/magic/ancient/SmokeSpells.java +++ b/Server/src/main/content/global/skill/magic/ancient/SmokeSpells.java @@ -16,6 +16,7 @@ import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.plugin.Initializable; import core.plugin.Plugin; +import org.rs09.consts.Sounds; import static core.api.ContentAPIKt.*; @@ -92,10 +93,10 @@ public final class SmokeSpells extends CombatSpell { @Override public Plugin newInstance(SpellType arg) throws Throwable { - SpellBook.ANCIENT.register(8, new SmokeSpells(SpellType.RUSH, 50, 30.0, 176, 177, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(1), Runes.AIR_RUNE.getItem(1))); - SpellBook.ANCIENT.register(10, new SmokeSpells(SpellType.BURST, 62, 36.0, 179, 180, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2))); - SpellBook.ANCIENT.register(9, new SmokeSpells(SpellType.BLITZ, 74, 42.0, 183, 184, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2))); - SpellBook.ANCIENT.register(11, new SmokeSpells(SpellType.BARRAGE, 86, 48.0, 183, 185, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4))); + SpellBook.ANCIENT.register(8, new SmokeSpells(SpellType.RUSH, 50, 30.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_RUSH_IMPACT_185, new Animation(1978, Priority.HIGH), null, RUSH_PROJECTILE, RUSH_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(1), Runes.AIR_RUNE.getItem(1))); + SpellBook.ANCIENT.register(10, new SmokeSpells(SpellType.BURST, 62, 36.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_BURST_IMPACT_182, new Animation(1979, Priority.HIGH), null, BURST_PROJECTILE, BURST_END, Runes.DEATH_RUNE.getItem(2), Runes.CHAOS_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2))); + SpellBook.ANCIENT.register(9, new SmokeSpells(SpellType.BLITZ, 74, 42.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_BLITZ_IMPACT_181, new Animation(1978, Priority.HIGH), null, BLITZ_PROJECTILE, BLITZ_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(2), Runes.FIRE_RUNE.getItem(2), Runes.AIR_RUNE.getItem(2))); + SpellBook.ANCIENT.register(11, new SmokeSpells(SpellType.BARRAGE, 86, 48.0, Sounds.SMOKE_CAST_183, Sounds.SMOKE_BARRAGE_IMPACT_180, new Animation(1979, Priority.HIGH), null, BARRAGE_PROJECTILE, BARRAGE_END, Runes.BLOOD_RUNE.getItem(2), Runes.DEATH_RUNE.getItem(4), Runes.FIRE_RUNE.getItem(4), Runes.AIR_RUNE.getItem(4))); return this; } diff --git a/Server/src/main/core/game/node/entity/player/link/TeleportManager.java b/Server/src/main/core/game/node/entity/player/link/TeleportManager.java index ec74c42f9..a58d6d4e5 100644 --- a/Server/src/main/core/game/node/entity/player/link/TeleportManager.java +++ b/Server/src/main/core/game/node/entity/player/link/TeleportManager.java @@ -11,6 +11,7 @@ import core.game.world.GameWorld; import core.game.world.map.Location; import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; +import org.rs09.consts.Sounds; import static core.api.ContentAPIKt.hasTimerActive; @@ -240,6 +241,10 @@ public class TeleportManager { @Override public boolean pulse() { if (delay == 0) { + if (entity instanceof Player) { + entity.asPlayer().getAudioManager().send(new Audio(Sounds.BLOCK_TELEPORT_197), true); + } + entity.getAnimator().forceAnimation(new Animation(getSettings().getStartEmote())); entity.graphics(new Graphics(getSettings().getStartGfx())); } else if (delay == 4) { @@ -449,9 +454,9 @@ public class TeleportManager { switch (++delay) { case 2: entity.animate(Animation.create(3265)); - if(entity instanceof Player) { - ((Player) entity).getAudioManager().send(1098, 1); - } + if(entity instanceof Player) { + ((Player) entity).getAudioManager().send(1098, 1); + } break; case 4: entity.animate(Animation.create(3266)); @@ -831,3 +836,4 @@ public class TeleportManager { this.teleportType = teleportType; } } + diff --git a/Server/src/main/core/game/node/entity/player/link/prayer/PrayerType.java b/Server/src/main/core/game/node/entity/player/link/prayer/PrayerType.java index 26bc87086..445a2449d 100644 --- a/Server/src/main/core/game/node/entity/player/link/prayer/PrayerType.java +++ b/Server/src/main/core/game/node/entity/player/link/prayer/PrayerType.java @@ -8,6 +8,7 @@ import core.game.node.entity.player.link.audio.Audio; import core.game.world.map.zone.ZoneBorders; import core.tools.StringUtils; import core.game.event.*; +import org.rs09.consts.Sounds; import java.util.List; @@ -21,33 +22,33 @@ import static core.api.ContentAPIKt.*; * @author jamix77 */ public enum PrayerType { - THICK_SKIN(1, 12, 83, 5, PrayerCategory.BABY_BLUE, 10000, new SkillBonus(Skills.DEFENCE, 0.05)), - BURST_OF_STRENGTH(4, 12, 84, 7, PrayerCategory.GREEN, 2689, new SkillBonus(Skills.STRENGTH, 0.05)), - CLARITY_OF_THOUGHT(7, 12, 85, 9, PrayerCategory.PINK, 2664, new SkillBonus(Skills.ATTACK, 0.05)), - SHARP_EYE(8, 12, 862, 11, PrayerCategory.LIME_GREEN, 2685, new SkillBonus(Skills.RANGE, 0.05)), - MYSTIC_WILL(9, 12, 863, 13, PrayerCategory.LIME_GREEN, 2670, new SkillBonus(Skills.MAGIC, 0.05)), - ROCK_SKIN(10, 6, 86, 15, PrayerCategory.BABY_BLUE, 2684, new SkillBonus(Skills.DEFENCE, 0.1)), - SUPERHUMAN_STRENGTH(13, 6, 87, 17, PrayerCategory.GREEN, 2689, new SkillBonus(Skills.STRENGTH, 0.1)), - IMPROVED_REFLEXES(16, 6, 88, 19, PrayerCategory.PINK, 2662, new SkillBonus(Skills.ATTACK, 0.1)), - RAPID_RESTORE(19, 26, 89, 21, PrayerCategory.PURPLE, 2679), - RAPID_HEAL(22, 18, 90, 23, PrayerCategory.PURPLE, 2678), - PROTECT_ITEMS(25, 18, 91, 25, PrayerCategory.DARK_GREEN, 1982), - HAWK_EYE(26, 6, 864, 27, PrayerCategory.LIME_GREEN, 2666, new SkillBonus(Skills.RANGE, 0.1)), - MYSTIC_LORE(27, 6, 865, 29, PrayerCategory.LIME_GREEN, 2668, new SkillBonus(Skills.MAGIC, 0.1)), - STEEL_SKIN(28, 3, 92, 31, PrayerCategory.BABY_BLUE, 2687, new SkillBonus(Skills.DEFENCE, 0.15)), - ULTIMATE_STRENGTH(31, 3, 93, 33, PrayerCategory.GREEN, 2691, new SkillBonus(Skills.STRENGTH, 0.15)), - INCREDIBLE_REFLEXES(34, 3, 94, 35, PrayerCategory.PINK, 2667, new SkillBonus(Skills.ATTACK, 0.15)), + THICK_SKIN(1, 12, 83, 5, PrayerCategory.BABY_BLUE, Sounds.THICK_SKIN_2690, new SkillBonus(Skills.DEFENCE, 0.05)), + BURST_OF_STRENGTH(4, 12, 84, 7, PrayerCategory.GREEN, Sounds.STRENGTH_BURST_2688, new SkillBonus(Skills.STRENGTH, 0.05)), + CLARITY_OF_THOUGHT(7, 12, 85, 9, PrayerCategory.PINK, Sounds.CLARITY_2664, new SkillBonus(Skills.ATTACK, 0.05)), + SHARP_EYE(8, 12, 862, 11, PrayerCategory.LIME_GREEN, Sounds.SHARP_EYE_2685, new SkillBonus(Skills.RANGE, 0.05)), + MYSTIC_WILL(9, 12, 863, 13, PrayerCategory.LIME_GREEN, Sounds.MYSTIC_WILL_2670, new SkillBonus(Skills.MAGIC, 0.05)), + ROCK_SKIN(10, 6, 86, 15, PrayerCategory.BABY_BLUE, Sounds.ROCK_SKIN_2684, new SkillBonus(Skills.DEFENCE, 0.1)), + SUPERHUMAN_STRENGTH(13, 6, 87, 17, PrayerCategory.GREEN, Sounds.SUPERHUMAN_STRENGTH_2689, new SkillBonus(Skills.STRENGTH, 0.1)), + IMPROVED_REFLEXES(16, 6, 88, 19, PrayerCategory.PINK, Sounds.IMPROVED_REFLEXES_2662, new SkillBonus(Skills.ATTACK, 0.1)), + RAPID_RESTORE(19, 26, 89, 21, PrayerCategory.PURPLE, Sounds.RAPID_RESTORE_2679), + RAPID_HEAL(22, 18, 90, 23, PrayerCategory.PURPLE, Sounds.RAPID_HEAL_2678), + PROTECT_ITEMS(25, 18, 91, 25, PrayerCategory.DARK_GREEN, Sounds.PROTECT_ITEMS_1982), + HAWK_EYE(26, 6, 864, 27, PrayerCategory.LIME_GREEN, Sounds.HAWK_EYE_2666, new SkillBonus(Skills.RANGE, 0.1)), + MYSTIC_LORE(27, 6, 865, 29, PrayerCategory.LIME_GREEN, Sounds.MYSTIC_2668, new SkillBonus(Skills.MAGIC, 0.1)), + STEEL_SKIN(28, 3, 92, 31, PrayerCategory.BABY_BLUE, Sounds.STEEL_SKIN_2687, new SkillBonus(Skills.DEFENCE, 0.15)), + ULTIMATE_STRENGTH(31, 3, 93, 33, PrayerCategory.GREEN, Sounds.ULTIMATE_STRENGTH_2691, new SkillBonus(Skills.STRENGTH, 0.15)), + INCREDIBLE_REFLEXES(34, 3, 94, 35, PrayerCategory.PINK, Sounds.INCREDIBLE_REFLEXES_2667, new SkillBonus(Skills.ATTACK, 0.15)), PROTECT_FROM_SUMMONING(35, 2, 1168, 53, PrayerCategory.DARK_BROWN, PrayerCategory.MAGENTA, new Audio(4262)), - PROTECT_FROM_MAGIC(37, 3, 95, 37, PrayerCategory.LIGHT_BROWN, 2675), - PROTECT_FROM_MISSILES(40, 3, 96, 39, PrayerCategory.LIGHT_BROWN, 2677), - PROTECT_FROM_MELEE(43, 4, 97, 41, PrayerCategory.LIGHT_BROWN, 2676), - EAGLE_EYE(44, 3, 866, 43, PrayerCategory.LIME_GREEN, 2666, new SkillBonus(Skills.RANGE, 0.15)), - MYSTIC_MIGHT(45, 3, 867, 45, PrayerCategory.LIME_GREEN, 2669, new SkillBonus(Skills.MAGIC, 0.15)), - RETRIBUTION(46, 12, 98, 47, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(10000)), - REDEMPTION(49, 6, 99, 49, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2678)), - SMITE(52, 2, 100, 51, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2685)), - CHIVALRY(60, 2, 1052, 55, PrayerCategory.PINK, 3826, 65, new SkillBonus(Skills.DEFENCE, 0.2), new SkillBonus(Skills.STRENGTH, 0.18), new SkillBonus(Skills.ATTACK, 0.15)), - PIETY(70, 2, 1053, 57, PrayerCategory.PINK, 3825, 70, new SkillBonus(Skills.DEFENCE, 0.25), new SkillBonus(Skills.STRENGTH, 0.23), new SkillBonus(Skills.ATTACK, 0.2)); + PROTECT_FROM_MAGIC(37, 3, 95, 37, PrayerCategory.LIGHT_BROWN, Sounds.PROTECT_FROM_MAGIC_2675), + PROTECT_FROM_MISSILES(40, 3, 96, 39, PrayerCategory.LIGHT_BROWN, Sounds.PROTECT_FROM_MISSILES_2677), + PROTECT_FROM_MELEE(43, 4, 97, 41, PrayerCategory.LIGHT_BROWN, Sounds.PROTECT_FROM_MELEE_2676), + EAGLE_EYE(44, 3, 866, 43, PrayerCategory.LIME_GREEN, Sounds.EAGLE_EYE_2665, new SkillBonus(Skills.RANGE, 0.15)), + MYSTIC_MIGHT(45, 3, 867, 45, PrayerCategory.LIME_GREEN, Sounds.MYSTIC_MIGHT_2669, new SkillBonus(Skills.MAGIC, 0.15)), + RETRIBUTION(46, 12, 98, 47, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2682)), + REDEMPTION(49, 6, 99, 49, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2680)), + SMITE(52, 2, 100, 51, PrayerCategory.LIGHT_BROWN, PrayerCategory.MAGENTA, new Audio(2686)), + CHIVALRY(60, 2, 1052, 55, PrayerCategory.PINK, Sounds.KR_CHIVALRY_3826, 65, new SkillBonus(Skills.DEFENCE, 0.2), new SkillBonus(Skills.STRENGTH, 0.18), new SkillBonus(Skills.ATTACK, 0.15)), + PIETY(70, 2, 1053, 57, PrayerCategory.PINK, Sounds.KR_PIETY_3825, 70, new SkillBonus(Skills.DEFENCE, 0.25), new SkillBonus(Skills.STRENGTH, 0.23), new SkillBonus(Skills.ATTACK, 0.2)); /** * Represents the a cache of objects related to prayers in order to decide @@ -89,7 +90,7 @@ public enum PrayerType { * The sound. */ private Audio sound; - + /** * The required level of defence to use this prayer. */ @@ -111,9 +112,9 @@ public enum PrayerType { PrayerType(int level, int drain, int config, int button, PrayerCategory restriction, int soundId, SkillBonus... bonuses) { this(level, drain, config, button, restriction, null, new Audio(soundId), bonuses); } - + /** - * + * * Constructs a new @{Code PrayerType} object. * @param level * @param drain @@ -139,9 +140,9 @@ public enum PrayerType { PrayerType(int level, int drain, int config, int button, PrayerCategory restriction, PrayerCategory secondRestriction, Audio sound, SkillBonus... bonuses) { this(level,drain,config,button,restriction,secondRestriction,sound,1,bonuses); } - + /** - * + * * Constructs a new @{Code PrayerType} object. * @param level * @param drain @@ -248,6 +249,7 @@ public enum PrayerType { player.dispatch (new PrayerActivatedEvent(this)); } else { player.getPrayer().getActive().remove(this); + player.getAudioManager().send(Sounds.CANCEL_PRAYER_2663); findNextIcon(player); player.dispatch (new PrayerDeactivatedEvent(this)); }