I'm playing around with this a little. I started up a monk that I can't really play because mobs attack me instead of my warrior bot.
I replaced the code mentioned first, which is comething like
Code:
if(cur->ent->IsClient()) {
}
to
Code:
if(!cur->ent->IsPet()) {
}
as I don't believe the IsBot() check will compile for non-bot releases.. I have thought about changing this to
Code:
if(!cur->ent->IsPet() && !cur->ent->IsNPC()) {
}
but I wasn't sure of the consequences. This would impact npc attacking other npcs, so that they would attack PCs or Bots rather than continuing to attack the NPC which I believe would be more livelike. One situation that I havn't considered too much is npc or pc charming.. I'd have to think about it, or if anyone has any ideas, I would appreciate it. I would not change this myself without the approval of someone a little more familiar with aggro code, etc.
But, in the little bit of testing I did last night.. I went in to attack, and the mob attacked me back. My bots attacked right after me, but the mob continued to attack me until the warrior had a successful taunt, and then he kept the aggro until the mob was dead. This seems to be the behavior I would expect, and I will continue to test this out so maybe it can make it in. I will at least be running it on my private server.