PDA

View Full Version : Game Mechanics: Out of combat pet regen bonus?


kanras
01-11-2012, 01:26 PM
if(!IsEngaged())
SetHP(GetHP()+hp_regen+bonus+(GetLevel()/5));
else
SetHP(GetHP()+hp_regen+bonus);


When I was digging around trying to figure out why mage epic wasn't regenerating correctly, I found this. Does anyone have a justification for why pet regen is getting (level/5) extra hp per tic if it's out of combat? I couldn't find any info on this, so I removed it:

SetHP(GetHP()+hp_regen+bonus);

If you can dig up something about this (preferably classic), please post.

Trystych
01-11-2012, 01:42 PM
Does a pet sitting trigger the out of combat regen? They always gained hp faster when sitting as opposed to idle.

kanras
01-11-2012, 01:46 PM
The sitting bonus is "bonus" in that code. So bonus=3 when sitting, and bonus=0 when not sitting.

Xatava
01-11-2012, 01:49 PM
Not as bad as all other npcs, which erroneously regen 4 or 5% of their hp a tick out of combat. Hyuk hyuk

Yinaltin
01-11-2012, 03:14 PM
i too think the bonus was not an absolute ammount but a percentage . 3 % bonus sitting seems right if i remember my pet back then . no proof , sorry :(