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

Reply
 
Thread Tools Display Modes
  #16  
Old 11-28-2010, 12:56 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

I reverted this off the svn, if/when you get the problem fixed and you would like me to commit it, make sure to use a diff of the bot.cpp/h I committed(fixed obviously) as I won't be making the same changes again and if you post a fixed diff of the old stuff I won't bother to go through it.
Reply With Quote
  #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
  #18  
Old 11-28-2010, 01:44 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

no worries, it took like 30 sec to revert and shouldn't take much longer to put it back if your fixes work, just test it out alittle and make sure its solid and we should be good to go(didnt seem to notice any problems myself so hopefully that is the only issue).
Reply With Quote
  #19  
Old 11-29-2010, 09:31 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I more testing last night and found another issue, which was actually pretty funny. While I fixed the crash bug where it was trying to transfer aggro to group members, there's a similar issue with pets. While it doesn't crash the zone, I had an instance in Tactics where the bot with the HP -> Mana buff summoned his pet, and it took off running. A minute later it came back followed by a couple of boars, a Gladiator, and a zek initiate. I think I have a fix for it, but I will have to test it more tonight.
Reply With Quote
  #20  
Old 12-06-2010, 04:13 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

So I will most likely be resubmitting this in two parts. I am still having issues with buffs (or debuffs/dots) cast by mobs who die or when spawning the bot with buffs that were saved when camping.

I will submit all the fixes for regen, stats, etc, and continue to work on the buffs problem. The issue I've had is that I have tried to stay within only the bot.h, bot.cpp files, but with the way buff are handled, and bufftics processed, there will most likely need to be some code added to Mob:: Damage and CommonDamage that prevents aggro from being added if there is no caster or the caster is a bot, or the pet's owner. There is code put in for a client's pet, so similar code will need to be added for bots. Because this will need a lot more testing, I will want to resubmit the rest of the code. I will test it out by itself to make sure I'm not getting any more crashes.

Good news is I've had lots of practice with using my new defensive command. Once I add in the timers, I think this will be pretty nice.
Reply With Quote
  #21  
Old 12-07-2010, 12:58 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

BTW if you can, leave out the bot stats window. I'm in process of changing it quite significantly and its going to be integrated into the regular showstats(which will just pull different info based on what is calling it, ie client, npc, pet, bot).
Reply With Quote
  #22  
Old 12-07-2010, 02:22 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Will do. I will just take out the bot showstats command. Just as long as yours uses the Bot's calculations instead of Mob's, it will be just fine (mob returns inaccurate AC and ATK stats).

Tested last night after not allowing Buffs to process without a living caster, and no more crashes, so it looks like I will be able to resubmit it this week. I want to try it out again in VT and against Mithanial Marr where I was getting crashes this weekend, but I think that should fix the crashes. I may need to tweak the casting AI for hybrids, as they seem to go OOM all the time without all of the mana regen they shouldn't have had. I'll try with resting regen as well, but if someone doesn't have OOC regen on, it can be a long wait for their mana to return. I took out Bertox last night, and waiting in between kings was the killer, not the mobs themselves.
Reply With Quote
  #23  
Old 12-14-2010, 01:51 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I have run into a bit of a snag on this. I started having crashes again, but instead of just crashing zone.exe, it made my whole server unresponsive. After a week (30 minutes a night) of trying to debug this and figure out what's going on (and learning a lot about minidumps and remote debugging), I've come to the conclusion that I have either faulty RAM or HD. The crashes are happening more and more often, even without any of my code running (stock EqEmu source). Plus I crashed it running a script that writes debug stuff out to a file. After a minute, my server locked up. I guess I will have to get this sorted out before I can submit this, which sucks because I had found another issue that I believe solved the problem for good. With limited funds, I will be trying to use a friend's extra PC to test on until I can do more testing as to whether it's RAM or the HD that's the problem.

Good news, I have rest regen working, which was definitely helping with the hybrid mana issues.
Reply With Quote
Reply


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:56 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3