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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 10-20-2008, 01:38 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

It looks like this was merged correctly, so unfortunately we can't blame it on you this time cd
Code:
Index: spell_effects.cpp
===================================================================
--- spell_effects.cpp	(revision 112)
+++ spell_effects.cpp	(revision 113)
@@ -1763,6 +1763,7 @@
 					CastToClient()->cheat_timer.Start(3500, false);
 					CastToClient()->MovePC(zone->GetZoneID(), caster->GetX(), caster->GetY(), caster->GetZ(), caster->GetHeading(), 2, SummonPC);
 					Message(15, "You have been summoned!");
+                              WipeHateList();
 				}
 				else
 					caster->Message(13, "This spell can only be cast on players.");
The issue is that we're wiping the hate list for the client it's being cast on, and not from the mobs that have them on their hate list.

To wipe from the mob hate list, I think we can use EntityList::ClearFeignAggro & EntityList::ClearZoneFeignAggro:
Code:
			case SE_SummonPC:
			{
			if(IsClient()){
					CastToClient()->cheat_timer.Start(3500, false);
					CastToClient()->MovePC(zone->GetZoneID(), caster->GetX(), caster->GetY(), caster->GetZ(), caster->GetHeading(), 2, SummonPC);
					Message(15, "You have been summoned!");
					entity_list.ClearFeignAggro(CastToClient()); //clear aggro just like FD
					entity_list.ClearZoneFeignAggro(CastToClient()); //clear any aggro that didn't succeed from FD
					WipeHateList(); //wipe client's hate list
				}
				else
					caster->Message(13, "This spell can only be cast on players.");

				break;
			}
Ideally, we might want to make a new function, EntityList::ClearZoneAggro(), that just does what both of the 2 do, but in 1 function:
Code:
void EntityList::ClearZoneAggro(Client* targ)
{
	LinkedListIterator<NPC*> iterator(npc_list);
	iterator.Reset();
	while(iterator.MoreElements())
	{
		if (iterator.GetData()->CheckAggro(targ))
			iterator.GetData()->RemoveFromHateList(targ);

		iterator.GetData()->RemoveFromFeignMemory(targ);
		iterator.Advance();
	}
}
Anyone wanna give this a shot?
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
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 07:02 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