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

This commit is contained in:
Uleat
2015-12-01 20:30:43 -05:00
parent a483d37c26
commit fe48f18f71
5 changed files with 15 additions and 1 deletions
+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);