[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.
This commit is contained in:
Trust
2024-01-07 02:51:28 -05:00
parent 5909ca2a41
commit c65e86223d
2 changed files with 22 additions and 0 deletions
+1
View File
@@ -466,6 +466,7 @@ RULE_INT(Spells, DefensiveProcPenaltyLevelGap, 6, "Defensive Proc Penalty Level
RULE_REAL(Spells, DefensiveProcPenaltyLevelGapModifier, 10.0f, "Defensive Proc Penalty Level Gap Modifier where procs start losing their proc rate at defined % after RuleI(Spells, DefensiveProcLevelGap) level difference")
RULE_BOOL(Spells, DOTBonusDamageSplitOverDuration, true, "Disable to have Damage Over Time total bonus damage added to each tick instead of divided across duration")
RULE_BOOL(Spells, HOTBonusHealingSplitOverDuration, true, "Disable to have Heal Over Time total bonus healing added to each tick instead of divided across duration")
RULE_BOOL(Spells, RequireMnemonicRetention, false, "Enabling will require spell slots 9-12 to have the appropriate Mnemonic Retention AA learned.")
RULE_CATEGORY_END()
RULE_CATEGORY(Combat)
+21
View File
@@ -4329,6 +4329,27 @@ 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)) {
// casting from slot 9, 10, 11 or 12, we disable cause not classic.
if (castspell->slot == 8 && GetAA(aaMnemonicRetention) < 1) {
InterruptSpell(castspell->spell_id);
Message(Chat::Red, "You do not have the required AA to use this spell slot.");
return;
} else if(castspell->slot == 9 && GetAA(aaMnemonicRetention) < 2) {
InterruptSpell(castspell->spell_id);
Message(Chat::Red, "You do not have the required AA to use this spell slot.");
return;
} else if(castspell->slot == 10 && GetAA(aaMnemonicRetention) < 3) {
InterruptSpell(castspell->spell_id);
Message(Chat::Red, "You do not have the required AA to use this spell slot.");
return;
} else if(castspell->slot == 11 && GetAA(aaMnemonicRetention) < 4) {
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;