Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-02-2006, 08:45 AM
dclark
Fire Beetle
 
Join Date: Dec 2004
Posts: 21
Default Heal aggro bug

For starters I have the peq-velious DB and latest 0.6.4 source. I when running around eastwastes when I came to the orc fort. I saw it was setup as if the 8th ring quest was starting. Well I changed this and add quests to start this and not have the fort in a constant start of war. I got to the point where the dwarfs and orcs/giants would charge one another, but the dwarfs would do more damage to themselfs than they would to the orcs/giants. I came to find out that if I took out the healers the palies and priests then all was fine, so something was wrong with the casters. I did alot of digging though the code and decided to add debug messages everywhere someone was added to the hatelist. I found out if an npc healed himself or anyone all npcs around him friend or foe added him to their hatelist. Well this realy goes bad for an event like this when friends attack friends. I added this code to entity.cpp about line 2650 in void EntityList::AddHealAggro(Mob* target, Mob* caster, int16 thedam).
Code:
while(iterator.MoreElements())
	{
		cur = iterator.GetData();
		if (!cur->GetOwnerID() && !cur->IsMezzed() && !cur->IsStunned()
			&& cur->CheckAggro(target))
		{
			int16 tmpd = thedam;
			if (cur->GetHateAmount(caster) < 100)
				tmpd /= 20;
// This is the start
			if(cur->GetPrimaryFaction() == caster->GetPrimaryFaction() ||
						cur->IsFactionListAlly(caster->GetPrimaryFaction()))
			{
				LogFile->write(EQEMuLog::Debug, "I %s won't attack %s because we are friends",
				cur->GetName(), caster->GetName());
			}
			else if(cur->GetOwnerID() == caster->GetOwnerID())
			{
				LogFile->write(EQEMuLog::Debug, "I %s am not a masticist",
				cur->GetName());
			}
			else
			{
				cur->AddToHateList(caster, tmpd);
				LogFile->write(EQEMuLog::Debug, "I %s don't like %s because he healed %s",
				cur->GetName(), caster->GetName(), caster->GetTarget());
			}//ending right here
		}
		iterator.Advance();
	}
This keeps any npc on the same primary faction from being added to the hatelist and any faction that is allied with them. I am not so sure the else if statment is need. If they heal themselfs it would get added to their own hatelist. Never didn't see one attack themselfs I think the code prevents that elsewhere.
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 09:45 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