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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #17  
Old 11-28-2010, 01:42 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Of course, I'm 45 minutes late. Oh, well.

There was a problem with the preexisting code, where when a buff damages the bot, and there's no caster (it is null), it crashes the zone because the null caster was not checked for in the code. This is when it tries to add the caster to the bot's group members' hate list..

Code:
// Aggro the bot's group members
	if(IsGrouped()) {
		Group *g = GetGroup();
		if(g) {
			for(int i=0; i<MAX_GROUP_MEMBERS; i++) {
				if(g->members[i] && g->members[i]->IsBot() && !g->members[i]->CheckAggro(from)) {
					g->members[i]->AddToHateList(from, 1);
				}
			}
		}
	}
the line should be changed to:
Code:
if(g->members[i] && g->members[i]->IsBot() && from && !g->members[i]->CheckAggro(from)) {

I may not get to it tomorrow, but I'll try to repost the fix with your changes Caryatis soon. Sorry you had to revert the changes.

Interestingly, it brought up another issue I keep forgetting about that was present before any of these changes, but I never got around to looking into it, is that bots sometimes don't go through their complete spell lists when casting buffs. I actually DID have the HP -> Mana spell on my necro bots, but they were not casting them (and I don't think I've ever seen them cast them). I think how the bots iterate through their spells and decide what to cast and on whom needs to be looked at and probably rewritten..
Reply With Quote
 

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 04:34 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