diff --git a/common/ruletypes.h b/common/ruletypes.h index f8697f6c3..776e1d752 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -473,6 +473,7 @@ RULE_BOOL(Spells, UseLegacyFizzleCode, false, "Enable will turn on the legacy fi RULE_BOOL(Spells, LegacyManaburn, false, "Enable to have the legacy manaburn system from 2003 and earlier.") RULE_BOOL(Spells, EvacClearAggroInSameZone, false, "Enable to clear aggro on clients when evacing in same zone.") RULE_BOOL(Spells, CharmAggroOverLevel, false, "Enabling this rule will cause Charm casts over level to show resisted and cause aggro. Early EQ style.") +RULE_BOOL(Spells, RequireMnemonicRetention, true, "Enabling will require spell slots 9-12 to have the appropriate Mnemonic Retention AA learned.") RULE_CATEGORY_END() RULE_CATEGORY(Combat) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index e9e042ba9..e6daf6e83 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4329,6 +4329,14 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app) LogSpells("OP CastSpell: slot [{}] spell [{}] target [{}] inv [{}]", castspell->slot, castspell->spell_id, castspell->target_id, (unsigned long)castspell->inventoryslot); CastingSlot slot = static_cast(castspell->slot); + if (RuleB(Spells, RequireMnemonicRetention)) { + if (EQ::ValueWithin(castspell->slot, 8, 11) && GetAA(aaMnemonicRetention) < (castspell->slot - 7)) { + InterruptSpell(castspell->spell_id); + Message(Chat::Red, "You do not have the required AA to use this spell slot."); + return; + } + } + /* Memorized Spell */ if (m_pp.mem_spells[castspell->slot] && m_pp.mem_spells[castspell->slot] == castspell->spell_id) { uint16 spell_to_cast = 0;