Added rule-based check for race/class restriction of spell scribing

This commit is contained in:
Uleat committed 2015-12-01 20:30:43 -05:00
1 parent a483d37c26
commit fe48f18f71
5 files changed
+15 -1

No files matched your search

+5
View File
@@ -1153,6 +1153,11 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
{
const Item_Struct* item = inst->GetItem();
if (RuleB(Character, RestrictSpellScribing) && !item->IsEquipable(GetRace(), GetClass())) {
Message_StringID(13, CANNOT_USE_ITEM);
break;
}
if(item && item->Scroll.Effect == (int32)(memspell->spell_id))
{
ScribeSpell(memspell->spell_id, memspell->slot);