Fixed noncombat spells getting the 33% chance to not use runes.

This commit is contained in:
randy 2024-11-13 15:21:17 -07:00
parent e7ed5b0d7a
commit 964c95b572

View file

@ -201,9 +201,9 @@ public abstract class MagicSpell implements Plugin<SpellType> {
if (!checkLevelRequirement(caster, message)) {
return false;
}
/* Snowscape custom. Removing this allows guthix staff to autocast claws of guthix.
if (caster instanceof Player) {
CombatSpell spell = ((Player) caster).getProperties().getAutocastSpell();
/* Snowscape custom. Removing this allows guthix staff to autocast claws of guthix.
if (spell != null) {
boolean slayer = ((Player) caster).getEquipment().get(3).getName().contains("layer's staff");
boolean voidKnight = ((Player) caster).getEquipment().get(3).getName().contains("knight mace");
@ -212,8 +212,8 @@ public abstract class MagicSpell implements Plugin<SpellType> {
return false;
}
}
*/
}
*/
if((spellId == 12 || spellId == 30 || spellId == 56) && caster instanceof Player){
if (caster.getAttribute("entangleDelay", 0) > GameWorld.getTicks()) {
caster.asPlayer().sendMessage("You have recently cast a binding spell.");
@ -223,7 +223,7 @@ public abstract class MagicSpell implements Plugin<SpellType> {
if (caster instanceof Player) {
Player p = (Player) caster;
//if(p.getEquipment().get(3) != null && p.getEquipment().get(3).getId() == 14726){
if(RandomFunction.getRandom(100) > 33){
if(this instanceof CombatSpell && RandomFunction.getRandom(100) > 33){
//p.sendMessage("Your staff negates the rune requirement of the spell.");
return true;
}