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.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-08-2014, 02:30 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Sorry for resurrecting such an old thread, but some of this code was never added, as the issue is still around.

I don't seem to be able to find this bit of code anywhere in the mentioned files.

May I get some confirmation as to if this is the cause of the issue, and if adding these lines would fix it?
Code:
@@ -3594,7 +3594,8 @@ 
void Bot::AI_Process() 
{
	if(g) 
	{
		for(int counter = 0; counter < g->GroupCount(); counter++) 
		{
			if(g->members[counter]) 
			{
-				if(g->members[counter]->IsEngaged() && g->members[counter]->GetTarget()) {
+				if(g->members[counter]->IsEngaged() && g->members[counter]->GetTarget() &&
+					g->members[counter]->GetTarget() != this && this->IsAttackAllowed(g->members[counter]->GetTarget())) {
Code:
if(g)
{
	for(int counter = 0; counter < g->GroupCount(); counter++) 
	{
		if(g->members[counter]) 
		{
			Mob* tar = g->members[counter]->GetTarget();
			if(tar && tar->IsNPC() && tar->GetHateAmount(g->members[counter]) && IsAttackAllowed(g->members[counter]->GetTarget())) 
			{
				AddToHateList(tar, 1);
				if(HasPet())
					GetPet()->AddToHateList(tar, 1);
				break;
			}
		}
	}
}
IsGrouped(), IsAttackAllowed() wasn't added.
Code:
@@ -6364,8 +6365,10 @@ 
void Bot::Damage(Mob *from, int32 damage, uint16 spell_id, SkillType attack_skill, bool avoidable, int8 buffslot, bool iBuffTic)
{
+	if(this == from) { return; } // IsAttackAllowed() check below returns true for 'this = this'
+
 	// Aggro the bot's group members
-	if(IsGrouped())
+	if(IsGrouped() && IsAttackAllowed(from))
Code:
if(IsGrouped())
{
	Group *g = GetGroup();
	if(g)
	{
		for(int i=0; i<MAX_GROUP_MEMBERS; i++)
		{
			if(g->members[i] && g->members[i]->IsBot() && from && !g->members[i]->CheckAggro(from) && g->members[i]->IsAttackAllowed(from))
			{
				g->members[i]->AddToHateList(from, 1);
			}
		}
	}
}
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:35 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