mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[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:
parent
e204c246f4
commit
ce14b28ba4
6 changed files with 25 additions and 4 deletions
|
|
@ -1399,7 +1399,7 @@ void Player::Update( uint32 update_diff, uint32 p_time )
|
||||||
if (isAlive())
|
if (isAlive())
|
||||||
{
|
{
|
||||||
// if no longer casting, set regen power as soon as it is up.
|
// 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);
|
SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER);
|
||||||
|
|
||||||
if (!m_regenTimer)
|
if (!m_regenTimer)
|
||||||
|
|
@ -2104,6 +2104,8 @@ void Player::Regenerate(Powers power, uint32 diff)
|
||||||
{
|
{
|
||||||
case POWER_MANA:
|
case POWER_MANA:
|
||||||
{
|
{
|
||||||
|
if (HasAuraType(SPELL_AURA_STOP_NATURAL_MANA_REGEN))
|
||||||
|
break;
|
||||||
bool recentCast = IsUnderLastManaUseEffect();
|
bool recentCast = IsUnderLastManaUseEffect();
|
||||||
float ManaIncreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_MANA);
|
float ManaIncreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_MANA);
|
||||||
if (recentCast)
|
if (recentCast)
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,7 @@ enum AuraType
|
||||||
SPELL_AURA_MOD_QUEST_XP_PCT = 291,
|
SPELL_AURA_MOD_QUEST_XP_PCT = 291,
|
||||||
SPELL_AURA_OPEN_STABLE = 292,
|
SPELL_AURA_OPEN_STABLE = 292,
|
||||||
SPELL_AURA_ADD_MECHANIC_ABILITIES = 293,
|
SPELL_AURA_ADD_MECHANIC_ABILITIES = 293,
|
||||||
SPELL_AURA_294 = 294,
|
SPELL_AURA_STOP_NATURAL_MANA_REGEN = 294,
|
||||||
SPELL_AURA_295 = 295,
|
SPELL_AURA_295 = 295,
|
||||||
SPELL_AURA_296 = 296,
|
SPELL_AURA_296 = 296,
|
||||||
SPELL_AURA_297 = 297,
|
SPELL_AURA_297 = 297,
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||||
&Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_QUEST_XP_PCT implemented in Player::GiveXP
|
&Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_QUEST_XP_PCT implemented in Player::GiveXP
|
||||||
&Aura::HandleAuraOpenStable, //292 call stabled pet
|
&Aura::HandleAuraOpenStable, //292 call stabled pet
|
||||||
&Aura::HandleAuraAddMechanicAbilities, //293 SPELL_AURA_ADD_MECHANIC_ABILITIES replaces target's action bars with a predefined spellset
|
&Aura::HandleAuraAddMechanicAbilities, //293 SPELL_AURA_ADD_MECHANIC_ABILITIES replaces target's action bars with a predefined spellset
|
||||||
&Aura::HandleNULL, //294 2 spells, possible prevent mana regen
|
&Aura::HandleAuraStopNaturalManaRegen, //294 SPELL_AURA_STOP_NATURAL_MANA_REGEN implemented in Player:Regenerate
|
||||||
&Aura::HandleUnused, //295 unused (3.2.2a)
|
&Aura::HandleUnused, //295 unused (3.2.2a)
|
||||||
&Aura::HandleNULL, //296 2 spells
|
&Aura::HandleNULL, //296 2 spells
|
||||||
&Aura::HandleNULL, //297 1 spell (counter spell school?)
|
&Aura::HandleNULL, //297 1 spell (counter spell school?)
|
||||||
|
|
@ -8295,6 +8295,14 @@ void Aura::HandleAuraModAllCritChance(bool apply, bool Real)
|
||||||
((Player*)target)->UpdateAllSpellCritChances();
|
((Player*)target)->UpdateAllSpellCritChances();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Aura::HandleAuraStopNaturalManaRegen(bool apply, bool real)
|
||||||
|
{
|
||||||
|
if (!real)
|
||||||
|
return;
|
||||||
|
|
||||||
|
GetTarget()->ApplyModFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_REGENERATE_POWER, !apply && !GetTarget()->IsUnderLastManaUseEffect());
|
||||||
|
}
|
||||||
|
|
||||||
bool Aura::IsLastAuraOnHolder()
|
bool Aura::IsLastAuraOnHolder()
|
||||||
{
|
{
|
||||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||||
|
|
@ -8863,6 +8871,11 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
|
||||||
caster->RemoveAurasDueToSpell(34027);
|
caster->RemoveAurasDueToSpell(34027);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case 62692: // Aura of Despair
|
||||||
|
{
|
||||||
|
spellId1 = 64848;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 71905: // Soul Fragment
|
case 71905: // Soul Fragment
|
||||||
{
|
{
|
||||||
if (!apply)
|
if (!apply)
|
||||||
|
|
|
||||||
|
|
@ -370,6 +370,7 @@ class MANGOS_DLL_SPEC Aura
|
||||||
void HandleAuraModAllCritChance(bool Apply, bool Real);
|
void HandleAuraModAllCritChance(bool Apply, bool Real);
|
||||||
void HandleAuraOpenStable(bool apply, bool Real);
|
void HandleAuraOpenStable(bool apply, bool Real);
|
||||||
void HandleAuraAddMechanicAbilities(bool apply, bool Real);
|
void HandleAuraAddMechanicAbilities(bool apply, bool Real);
|
||||||
|
void HandleAuraStopNaturalManaRegen(bool apply, bool real);
|
||||||
|
|
||||||
virtual ~Aura();
|
virtual ~Aura();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1898,6 +1898,11 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
(spellInfo_2->Id == 8326 && spellInfo_1->Id == 20584))
|
(spellInfo_2->Id == 8326 && spellInfo_1->Id == 20584))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Aura of Despair auras
|
||||||
|
if ((spellInfo_1->Id == 64848 && spellInfo_2->Id == 62692) ||
|
||||||
|
(spellInfo_2->Id == 64848 && spellInfo_1->Id == 62692))
|
||||||
|
return false;
|
||||||
|
|
||||||
// Blood Fury and Rage of the Unraveller
|
// Blood Fury and Rage of the Unraveller
|
||||||
if (spellInfo_1->SpellIconID == 1662 && spellInfo_2->SpellIconID == 1662)
|
if (spellInfo_1->SpellIconID == 1662 && spellInfo_2->SpellIconID == 1662)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11551"
|
#define REVISION_NR "11552"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue