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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2008, 10:13 AM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default CoH Hate List Wipe

{spell_effects.cpp}

~1734, find

Code:
					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!");
Add:
Code:
					WhipeHateList();
Reply With Quote
  #2  
Old 10-18-2008, 12:16 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

This change would wipe the hate list of the character being CoH'd is that what you want?
Reply With Quote
  #3  
Old 10-18-2008, 12:45 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

That's what it does on Live. Good fix =)
Reply With Quote
  #4  
Old 10-18-2008, 12:58 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

KLS changed the spelling to the correct WipeHateList(); in Rev 108 just so you know
Reply With Quote
  #5  
Old 10-18-2008, 04:49 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yeah seeing whipehatelist all the time was just too much for me sorry.
Reply With Quote
  #6  
Old 10-18-2008, 05:00 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Can you Garuntee that you got them all? LOL JK! I know the Garuntee spelling error isn't in actual code, but seeing that note everywhere has made me want to run the comments through spell checker lol. I give 3 cheers for the whipehatelist change lol.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 10-19-2008, 10:39 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I got a report on PEQ that this isn't working: http://www.projecteq.net/phpBB2/viewtopic.php?t=5836

It may have not been merged in correctly, might want to double check SVN. I did use the correct spelling.
Reply With Quote
  #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
  #9  
Old 10-20-2008, 08:57 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Quote:
Originally Posted by Congdar View Post
This change would wipe the hate list of the character being CoH'd is that what you want?
Quote:
Originally Posted by So_1337 View Post
That's what it does on Live. Good fix =)
Quote:
Originally Posted by AndMetal View Post
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.
See... this is why I ask these questions.
Reply With Quote
  #10  
Old 10-20-2008, 09:22 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

I misunderstood the question, then. I was speaking from a generality of the player should no hate on them after it's cast, I didn't realize it wasn't being whiped (/tease KLS) off the NPCs, which you seemed to understand =P

Good catch, then, and sorry I didn't know enough to follow it.
Reply With Quote
  #11  
Old 10-20-2008, 08:33 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Fixed & tested in SVN Revision 124.
__________________
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
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 02:13 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