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.