EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Mob::IsEngaged() (https://www.eqemulator.org/forums/showthread.php?t=31640)

c0ncrete 07-10-2010 11:47 AM

Mob::IsEngaged()
 
In line 891 in mob.h

replace this:
Code:

bool IsEngaged() { return( !hate_list.IsEmpty() ); }
with something like this:
Code:

bool IsEngaged() { return( IsAIControlled() ? !hate_list.IsEmpty() : !CastToClient()->GetAggroCount() ); }
This should clear up some logic issues in the current bot code.

Reasoning: Combat checks are made to determine if a player is allowed to spawn a bot. Since a client's hate list is always empty, they're able to spawn a bot when they have aggro (assuming they don't have any bots spawned). This allows a client to camp bots and respawn them to zerg raid targets until they're dead.

I don't think it should have any adverse effects on other processes.

c0ncrete 07-10-2010 01:19 PM

In addition to the previous reasoning behind the suggested change, priest bots (CLR, DRU, SHM) use tar->IsEngaged() to determine how they heal a target. With the current logic and the way IsEngaged() works, a client will only receive a CHeal from a bot if they fall below 30% health. They get a normal single-target heal from 30-74% health and a HoT anywhere above that.

c0ncrete 07-19-2010 09:51 PM

I'm an idiot.

That doesn't work at all.


All times are GMT -4. The time now is 08:46 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.