mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 02:11:30 +00:00
[Rule] RequireMnemonicRetention for Spells 9-12 Rule (#3876)
* [Rule] RequireMnemonicRetention for Spells 9-12 Rule Rule is default false to maintain current server setup. Enabling will require clients to have the required ranks of Mnemonic Retention in order to cast. This is a stopgap as on live, the buttons are not even available to use. This will mimic the functionality but denying the cast. * Change to default true * Cleanup Logic - Thank you @KinglyKrab * To aggressive on the cleanup * True != true * fix duplicated rule after rebase.
This commit is contained in:
parent
cd85a8524a
commit
066b762e73
@ -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)
|
||||
|
||||
@ -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<CastingSlot>(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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user