Quote:
Originally Posted by strugglegenerator
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;
}}