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

Reply
 
Thread Tools Display Modes
  #1  
Old 07-14-2008, 04:01 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default Bug Fix: Stop Pets Fleeing

I started a level 1 necro and noticed my pet started fleeing at low health:

In attack.cpp, at line 1643, changing:

Code:
if(damage > 0) {
                //see if we are gunna start fleeing
                CheckFlee();
        }
to

Code:
if(damage > 0) {
                //see if we are gunna start fleeing
                if(!IsPet()) CheckFlee();
        }
seems to fix it.
Reply With Quote
  #2  
Old 07-14-2008, 04:35 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Good deal! You are the flee-master!
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 07-14-2008, 06:53 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

lol talking about realism- yey! fleeing pets!
pet rights fighters unite!
Reply With Quote
  #4  
Old 07-15-2008, 04:40 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

You can also add the f npcspecialattk to all pets. They are already like that in the PEQ database. That may be a better option than having it hardcoded into the server, for the benefit of custom server ops who may want pets to flee.
Reply With Quote
  #5  
Old 07-15-2008, 05:08 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Thanks a ton for your fixes Derision- I have this one and your other 'Pet HP Bar out-of-combat update' fix together with a few others posted at my web page.
I posted windows executables and source for who ever wants to try it out. They all are tested and work fine for me.
Also added is the 'closest_zp = NULL;' in Leikas MQ-Cheat detector code, so you either would have to use my database ( has update to zone points already) or up date your zone_points as explained in the MQ-Cheat detector thread
The 'Pet HP Bar out-of-combat update' fix was a nice one too, always bothered me ever since I started EqEmu
Reply With Quote
  #6  
Old 07-15-2008, 07:27 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Cavedude is right- there is no need to put this into a official source if a pet can be sontrolled with a simple "f" flag
Reply With Quote
  #7  
Old 07-15-2008, 08:30 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

What about charm and dire-charmed pets? do they start to run when low also? - if so, they are not supposed to (can't f-flag those).
Reply With Quote
  #8  
Old 07-15-2008, 10:30 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

hmm thats a tricky one =)

but in this case you can actualy use hard coding in charm itself, something like:

If pet is charmed then do not flee
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 01:03 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3