This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: MP regen  (Read 737 times)

hyakkimaru

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 128
    • View Profile
    • http://mc-revolution.fr
MP regen
« 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 :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: MP regen
« Reply #1 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()
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

hyakkimaru

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 128
    • View Profile
    • http://mc-revolution.fr
Re: MP regen
« Reply #2 on: May 26, 2014, 05:55:07 pm »
I'll check that later, thank you :) !
« Last Edit: January 01, 1970, 01:00:00 am by Admin »