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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2008, 04:47 PM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default TGB Change

As per live, when someone uses /tgb it can hit up to 7 targets. This is noted in the comments, as you will see, but for some reason in Group::CastGroupSpell it has been omitted by a comment. Since I can't speculate nor determine the reason for that change, I will implement it in SpellFinished instead.

{spells.cpp}

Find (~1448)
Code:
case GroupSpell:
		{
			if(IsClient() && CastToClient()->CheckAAEffect(aaEffectMassGroupBuff)){
				SpellOnTarget(spell_id, this);
				entity_list.AESpell(this, this, spell_id, true);
				CastToClient()->DisableAAEffect(aaEffectMassGroupBuff);
			}
			else
			{
				// at this point spell_target is a member of the other group, or the
				// caster if they're not using TGB
				// NOTE: this will always hit the caster, plus the target's group so
				// it can affect up to 7 people if the targeted group is not our own
				if(spell_target->IsGrouped())
				{
					Group *target_group = entity_list.GetGroupByMob(spell_target);
					if(target_group)
					{
						target_group->CastGroupSpell(this, spell_id);
					}
				}
				else
				{
					// if target is grouped, CastGroupSpell will cast it on the caster
					// too, but if not then we have to do that here.
					if(spell_target != this){
						SpellOnTarget(spell_id, this);
	#ifdef GROUP_BUFF_PETS
						//pet too
						if (GetPet() && GetAA(aaPetAffinity))
							SpellOnTarget(spell_id, GetPet());
	#endif					
					}

					SpellOnTarget(spell_id, spell_target);
	#ifdef GROUP_BUFF_PETS
					//pet too
					if (spell_target->GetPet() && GetAA(aaPetAffinity))
						SpellOnTarget(spell_id, spell_target->GetPet());
	#endif
				}
			}
			break;
		}
And REPLACE with:
Code:
case GroupSpell:
		{
			if(IsClient() && CastToClient()->CheckAAEffect(aaEffectMassGroupBuff)){
				SpellOnTarget(spell_id, this);
				entity_list.AESpell(this, this, spell_id, true);
				CastToClient()->DisableAAEffect(aaEffectMassGroupBuff);
			}
			else
			{
				if(spell_target != this){
					SpellOnTarget(spell_id, this);
#ifdef GROUP_BUFF_PETS
					//pet too
					if (GetPet() && GetAA(aaPetAffinity))
						SpellOnTarget(spell_id, GetPet());
#endif					
				}

				// at this point spell_target is a member of the other group, or the
				// caster if they're not using TGB
				// NOTE: this will always hit the caster, plus the target's group so
				// it can affect up to 7 people if the targeted group is not our own
				if(spell_target->IsGrouped())
				{
					Group *target_group = entity_list.GetGroupByMob(spell_target);
					if(target_group)
					{
						target_group->CastGroupSpell(this, spell_id);
					}
				}
				else
				{
					SpellOnTarget(spell_id, spell_target);
	#ifdef GROUP_BUFF_PETS
					//pet too
					if (spell_target->GetPet() && GetAA(aaPetAffinity))
						SpellOnTarget(spell_id, spell_target->GetPet());
	#endif
				}
			}
			break;
		}
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 11:11 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3