Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-01-2016, 03:32 PM
tigurius
Fire Beetle
 
Join Date: Sep 2004
Posts: 24
Default Mage Focus Makes Tiny Pets Fix

I finished my lower level mage focus item quests from Temple of Sol Ro to discover that the focus effect summons a laughably tiny pet. Although it was a cute lil guy i missed the beefy bigger pet from gaining the bonuses.

I took a dive into the source to figure out where it went wrong. I came down to the following line in zone/pets.cpp

Code:
npc_type->size = npc_type->size * (1 + (scale_power / 2)) > npc_type->size * 3 ? npc_type->size * 3 : 1 + (scale_power / 2);
Lets see how this evals:
npc_type->size = 4 (from SummonFireR9)
scale_power = .05 (evaluated from float scale_power = (float)act_power / 100.0f where act_power = +5 with the Torch of Alna effect (Minion of Fire)

So the formula evaluates to:
4 * (1 + (.05 /2)) > 4 * 3 = FALSE so 1 + (.05 /2) is the size to be used, which equals 1.025 - that would make a very small pet.

I believe there is possibly a missing "npc_type->size *" before the ( 1+ (scale_power / 2)). By adding this, it changes the formula to: 4 + (.05/2) = 5.25, a size that is bigger than the default 4 but by only 28% or so which makes sense.

So the line should be updated to say:
Code:
npc_type->size = npc_type->size * (1 + (scale_power / 2)) > npc_type->size * 3 ? npc_type->size * 3 : npc_type->size * (1 + (scale_power / 2)
I recompiled zone with this change and to my surprise my pet was now exactly the size it should be as focused. If I remove the torch, he's back down to size 4.

I am not sure what other repercussions have been introduced with this change but it did fix the mage pet focus issue for me.
Reply With Quote
 


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:55 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