mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user