[11552] Implement aura SPELL_AURA_STOP_NATURAL_MANA_REGEN (294)

Also partly implement using it spell 62692.

FIXME: Some spells expected to be working for target under spell 62692 effect
       not working. This need additional research and fixes.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
breakwater 2011-05-28 05:20:26 +04:00 committed by VladimirMangos
parent e204c246f4
commit ce14b28ba4
6 changed files with 25 additions and 4 deletions

View file

@ -1399,7 +1399,7 @@ void Player::Update( uint32 update_diff, uint32 p_time )
if (isAlive())
{
// if no longer casting, set regen power as soon as it is up.
if (!IsUnderLastManaUseEffect())
if (!IsUnderLastManaUseEffect() && !HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN))
SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER);
if (!m_regenTimer)
@ -2104,6 +2104,8 @@ void Player::Regenerate(Powers power, uint32 diff)
{
case POWER_MANA:
{
if (HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN))
break;
bool recentCast = IsUnderLastManaUseEffect();
float ManaIncreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_MANA);
if (recentCast)