View Full Version : [SOLVED] Bosses Bugging [Huge HP issue]

10-04-2013, 10:47 AM
So, my friend and I are running TrinityCore based 255 FUN server. We have custom instances with bosses having 1-2 billion health points. So, we have this issue when boss literally bugs out and goes down by mistake to 600 thousand/million health points. We have came to realisation that uint32 has max value of 1,4 billion, and we have bosses that have around 1,9B health points. We believe something in this paragraph of code has to be changed. We tried fix tricks, but nothing really changed or boss would not regenerate at all.

void Creature::RegenerateHealth()
if (!isRegeneratingHealth())

uint32 curValue = GetHealth();
uint32 maxValue = GetMaxHealth();

if (curValue >= maxValue)

uint32 addvalue = 0;

// Not only pet, but any controlled creature
if (GetCharmerOrOwnerGUID())
float HealthIncreaseRate = sWorld->getRate(RATE_HEALTH);
float Spirit = GetStat(STAT_SPIRIT);

if (GetPower(POWER_MANA) > 0)
addvalue = uint32(Spirit * 0.25 * HealthIncreaseRate);
addvalue = uint32(Spirit * 0.80 * HealthIncreaseRate);
addvalue = maxValue/3;

Do you have any idea what should be changed/fixed in it?

10-04-2013, 11:02 AM
1.4 billion doesnt sound correct thought the max should be around 2.1 billion but anyway these threads might help you understand it some more.

10-04-2013, 02:40 PM
I kinda wrote it the wrong way.

I am aware that max value of uint32 is 2,147,483,647, but my bosses that are over 1.4 B + HP can be bugged. They literally die, start attacking, and then come to life regaining HP in 3 series. [ like 600mil if boss has 1,8B] 600*3=1.8

10-04-2013, 04:23 PM
Does a boss really need that much health in general? If you want to make it more difficult, then you can just increase his armor or immunity to spells..

10-04-2013, 05:09 PM
You can also reduce damage through a script.