validspell check (#1895)

This commit is contained in:
KayenEQ
2021-12-21 09:17:35 -05:00
committed by GitHub
parent 886b321e66
commit f26d56d6d5
2 changed files with 15 additions and 5 deletions
+6 -1
View File
@@ -4061,7 +4061,12 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app)
return;
}
CastSpell(spell_to_cast, castspell->target_id, slot);
if (IsValidSpell(spell_to_cast)) {
CastSpell(spell_to_cast, castspell->target_id, slot);
}
else {
InterruptSpell();
}
}
/* Spell Slot or Potion Belt Slot */
else if (slot == CastingSlot::Item || slot == CastingSlot::PotionBelt) // ITEM or POTION cast