Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 09-22-2019, 03:54 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Quote:
Originally Posted by strugglegenerator View Post
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;
}}
__________________
Clumsy's World: Resurgence [2019-Present]
Clumsy's World 2.0 [2014-2016]
Clumsy's World [2006-2012]
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:36 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3