Jump to content

[ZERO][DB?] Wrong HP on elite mobs


stefanfa

Recommended Posts

Posted

Hi,

I've successfully compiled the mangoszero source in a 64-bit linux environment.

Using these sources:

git clone --recursive git://github.com/mangoszero/server.git -b rel20

git clone --recursive git://github.com/mangoszero/database.git -b Rel20

Everything is working ok from what i can tell, there's just one thing.

Elite mobs/npc's and all kinds of bosses have the wrong HP (waaay too low)

For example Kazzak has ~3k HP and the same with Onyxia.

Did i do something wrong when importing the database ? I did follow all the instructions and the actual mobs are spawned.

It's just that they have too low HP =)

Thanks.

Regards, Stefan.

Posted

Thank you.

What's the best way to avoid this issue ? use a different branch or version ? if so, which ?

Or is there a fix for this issue ? (didn't find any fix in the issue tracker you provided link for).

Thanks.

Posted

We are currently working to try and get an update for this.

As always - time / resources prevent us from getting everything done as quick as we'd like !

Posted

Replaced

if (CreatureClassLvlStats const* cCLS = sObjectMgr.GetCreatureClassLvlStats(level, cinfo->UnitClass))
   {
       // Use Creature Stats to calculate stat values

       // health
       health = cCLS->BaseHealth * cinfo->HealthMultiplier;

       // mana
       mana = cCLS->BaseMana * cinfo->ManaMultiplier;
   }
   else
   {
       // Use old style to calculate stat values
       float rellevel = maxlevel == minlevel ? 0 : (float(level - minlevel)) / (maxlevel - minlevel);

       // health
       uint32 minhealth = std::min(cinfo->MaxLevelHealth, cinfo->MinLevelHealth);
       uint32 maxhealth = std::max(cinfo->MaxLevelHealth, cinfo->MinLevelHealth);
       health = uint32(minhealth + uint32(rellevel * (maxhealth - minhealth)));

       // mana
       uint32 minmana = std::min(cinfo->MaxLevelMana, cinfo->MinLevelMana);
       uint32 maxmana = std::max(cinfo->MaxLevelMana, cinfo->MinLevelMana);
       mana = minmana + uint32(rellevel * (maxmana - minmana));
   }

with

       // Use old style to calculate stat values
       float rellevel = maxlevel == minlevel ? 0 : (float(level - minlevel)) / (maxlevel - minlevel);

       // health
       uint32 minhealth = std::min(cinfo->MaxLevelHealth, cinfo->MinLevelHealth);
       uint32 maxhealth = std::max(cinfo->MaxLevelHealth, cinfo->MinLevelHealth);
       health = uint32(minhealth + uint32(rellevel * (maxhealth - minhealth)));

       // mana
       uint32 minmana = std::min(cinfo->MaxLevelMana, cinfo->MinLevelMana);
       uint32 maxmana = std::max(cinfo->MaxLevelMana, cinfo->MinLevelMana);
       mana = minmana + uint32(rellevel * (maxmana - minmana));

Worked like a charm =)

The code is in Creatures.cpp if anyone wants to know.

Posted

This should only be considered as a temporary fix, because it just reverts the new system to the old one.

The main problem porbably lies in wrong basehealth, -mana and/or modifier. Which is a database issue in the end.

Posted

I dont see the need to recalculate health and mana this way when there is already information for all creatures in the database, also it is well known that creatures in vanilla didnt run under a common stat for its class that was later on around TBC when that changed. You realise that the new code simply takes the information in the database for level 1- 63 of each class type and takes those stats given it to the creature with the same class. But as it is well known a level 60 elite dragon from BWL wont have the same health as a level 60 elite dragon from UBRS. I really dont see how this concept could possibly work it would need sub classes and to put it simply the database would be massive just for all these different creatures.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use