Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: hyakkimaru on May 25, 2014, 04:39:25 pm

Title: MP regen
Post by: hyakkimaru on May 25, 2014, 04:39:25 pm
Hi everybody,

I tried to add new possibilities on my server about races & classes, I created a shaman Dwarf, before level 21, my character have 0 in mana regeneration, I supposed it's about gtRegenMPPerSpt.dbc and I fill all the 0 inside, but my character regen hasn't moved...

Anyone can explain me how set a regeneration for my shaman ?

Thank you :)
Title: Re: MP regen
Post by: Ascathos on May 26, 2014, 05:44:56 pm
TC: Set Regenrate in config to 0.

Code: [Select]
(Player.cpp::Regenerate())
        case POWER_MANA:
        {
            bool recentCast = IsUnderLastManaUseEffect();
            float ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA);

            if (getLevel() < 15)
                ManaIncreaseRate = sWorld->getRate(RATE_POWER_MANA) * (2.066f - (getLevel() * 0.066f));

            if (recentCast) // Trinity Updates Mana in intervals of 2s, which is correct
                addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER) *  ManaIncreaseRate * 0.001f * m_regenTimer;
            else
                addvalue += GetFloatValue(UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER) * ManaIncreaseRate * 0.001f * m_regenTimer;
        }   break;

Also:
StatSystem.cpp::OCTRegenMPPerSpirit()
Title: Re: MP regen
Post by: hyakkimaru on May 26, 2014, 05:55:07 pm
I'll check that later, thank you :) !