Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-18-2008, 10:01 AM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default Check For SpellEffect Fix

I ran into this issue primarily with Levitate. If anyone can think of another effect that this might be useful for it should be a reasonably simple implementation.

Basically, lets say you cast Flight of Eagles and then a Bard uses Selo's Song of Travel (Invis/Levi/Movement song). As soon as EITHER buff fades, you lose levi, even though you still have the other buff supposedly giving you levi.

This is my fix.

{mob.h}
insert anywhere
Code:
bool    AffectedExcludingSlot(int slot, int effect);
{spell_effects.cpp}
append
Code:
bool Mob::AffectedExcludingSlot(int slot, int effect)
{
	for (int i = 0; i <= EFFECT_COUNT; i++)
	{
		if (i == slot)
			continue;

		if (IsEffectInSpell(buffs[i].spellid, effect))
			return true;
	}
	return false;
}
in void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
find
Code:
case SE_Levitate:
			{
				SendAppearancePacket(AT_Levitate, 0);
				break;
			}
replace with
Code:
case SE_Levitate:
			{
				if (!AffectedExcludingSlot(slot, SE_Levitate))
					SendAppearancePacket(AT_Levitate, 0);
				break;
			}
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 10:18 AM.


 

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