EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Spell Support (https://www.eqemulator.org/forums/forumdisplay.php?f=664)
-   -   Boon of the Clear Mind (https://www.eqemulator.org/forums/showthread.php?t=42621)

strugglegenerator 09-22-2019 12:57 PM

Boon of the Clear Mind
 
I can cast the single target version of Clarity on players in my group. Great!

However, I cannot cast the group version of Clarity (Boon of the Clear Mind) on my group because I get the error: "Your spell is too powerful for your intended target."

Why am I not allowed to cast Boon of the Clear Mind on my group? It only casts on myself (the enchanter).

I cannot find anywhere in the database to fix this. I even compared Clarity to Boon of the Clear Mind, but they have identical settings other than 1 spell being a group buff and the other being a single target.

chrsschb 09-22-2019 02:11 PM

In rules_values table:
Code:

Spells:BuffLevelRestrictions  True
Set to false.

strugglegenerator 09-22-2019 02:26 PM

Thank you. So this is server wide? I cannot control it on a spell by spell basis?

chrsschb 09-22-2019 03:54 PM

Quote:

Originally Posted by strugglegenerator (Post 263576)
Thank you. So this is server wide? I cannot control it on a spell by spell basis?

Correct. The level restrictions are in the source and based on what live uses.

Lines 573-581 in spells.cpp
Code:

if (RuleB(Spells, BuffLevelRestrictions)) {
                // casting_spell_targetid is guaranteed to be what we went, check for ST_Self for now should work though
                if (spell_target && spells[spell_id].targettype != ST_Self && !spell_target->CheckSpellLevelRestriction(spell_id)) {
                        LogSpells("Spell [{}] failed: recipient did not meet the level restrictions", spell_id);
                        if (!IsBardSong(spell_id))
                                MessageString(Chat::SpellFailure, SPELL_TOO_POWERFUL);
                        return false;
                }
        }

And lines 3110-3139 in spells.cpp
Code:

// Check Spell Level Restrictions
// returns true if they meet the restrictions, false otherwise
// derived from http://samanna.net/eq.general/buffs.shtml
// spells 1-50: no restrictons
// 51-65: SpellLevel/2+15
// 66+ Group Spells 62, Single Target 61
bool Mob::CheckSpellLevelRestriction(uint16 spell_id)
{
        return true;
}

bool Client::CheckSpellLevelRestriction(uint16 spell_id)
{
        int SpellLevel = GetMinLevel(spell_id);

        // Only check for beneficial buffs
        if (IsBuffSpell(spell_id) && IsBeneficialSpell(spell_id)) {
                if (SpellLevel > 65) {
                        if (IsGroupSpell(spell_id) && GetLevel() < 62)
                                return false;
                        else if (GetLevel() < 61)
                                return false;
                } else if (SpellLevel > 50) { // 51-65
                        if (GetLevel() < (SpellLevel / 2 + 15))
                                return false;
                }
        }

        return true;
}}


strugglegenerator 09-22-2019 05:57 PM

Wow thank you for the detailed information.

I am so intimidated by code and I really want to be able to mess with things like that, but I am not confident in my ability to even get a custom server up and running from scratch, which is why I used the Akka repak.

I appreciate the info!


All times are GMT -4. The time now is 12:07 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.