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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 10-18-2008, 02:03 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

This works perfectly for the caster, but any group member that also recieved the buffs will still fall when one of the spells wears off.
Reply With Quote
  #3  
Old 10-18-2008, 02:16 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Hmmm, nevermind on that. It's working for both caster and group members now without me changing a thing. I've even recreated the situation where it didn't work and seems to be fine. It might have been lag, my test machine is under heavy load, atm.
Reply With Quote
Reply


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 07:32 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3