mangos / MaNGOS

This is the master Information repository for MaNGOS
http://getmangos.eu
3.03k stars 1.36k forks source link

HP regen doesn't work #91

Closed KiriX closed 12 years ago

KiriX commented 12 years ago

HP doesn't regen

KiriX commented 12 years ago

Regen doesn't work becouse comment this block in Player.cpp

float Player::OCTRegenHPPerSpirit() { //uint32 level = getLevel(); //uint32 pclass = getClass();

//if (level>GT_MAX_LEVEL) level = GT_MAX_LEVEL;

//GtOCTRegenHPEntry const _baseRatio = sGtOCTRegenHPStore.LookupEntry((pclass-1)_GT_MAX_LEVEL + level-1); //GtRegenHPPerSptEntry const _moreRatio = sGtRegenHPPerSptStore.LookupEntry((pclass-1)_GT_MAX_LEVEL + level-1); //if (baseRatio==NULL || moreRatio==NULL) return 0.0f;

// Formula from PaperDollFrame script //float spirit = GetStat(STAT_SPIRIT); //float baseSpirit = spirit; //if (baseSpirit>50) baseSpirit = 50; //float moreSpirit = spirit - baseSpirit; //float regen = baseSpirit * baseRatio->ratio + moreSpirit * moreRatio->ratio; //return regen; }

So in case addvalue = OCTRegenHPPerSpirit() * HealthIncreaseRate; we always have addvalue=0...

KiriX commented 12 years ago

Fix 1 - just remove 0 and not need anymore function: https://gist.github.com/3462472

KiriX commented 12 years ago

Fix 2 - by TC way... It's look more correctly... https://gist.github.com/3462653

FailZorD commented 12 years ago

There is a Fix but it needs to be written correctly. If you like i can share it. Find me on IRC.

FailZorD commented 12 years ago

Fixed