*Implement aura type SPELL_AURA_PREVENT_REGENERATE_POWER(294).
--HG-- branch : trunk
This commit is contained in:
@@ -2041,6 +2041,9 @@ void Player::RegenerateAll()
|
|||||||
|
|
||||||
void Player::Regenerate(Powers power)
|
void Player::Regenerate(Powers power)
|
||||||
{
|
{
|
||||||
|
// TODO: possible use of miscvalueb instead of amount
|
||||||
|
if (HasAuraTypeWithValue(SPELL_AURA_PREVENT_REGENERATE_POWER, power))
|
||||||
|
return;
|
||||||
uint32 curValue = GetPower(power);
|
uint32 curValue = GetPower(power);
|
||||||
uint32 maxValue = GetMaxPower(power);
|
uint32 maxValue = GetMaxPower(power);
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ enum AuraType
|
|||||||
SPELL_AURA_MOD_XP_QUEST_PCT,
|
SPELL_AURA_MOD_XP_QUEST_PCT,
|
||||||
SPELL_AURA_292,
|
SPELL_AURA_292,
|
||||||
SPELL_AURA_293,
|
SPELL_AURA_293,
|
||||||
SPELL_AURA_294,
|
SPELL_AURA_PREVENT_REGENERATE_POWER,
|
||||||
TOTAL_AURAS = 295
|
TOTAL_AURAS = 295
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
|||||||
&Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_XP_QUEST_PCT implemented in Player::RewardQuest
|
&Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_XP_QUEST_PCT implemented in Player::RewardQuest
|
||||||
&Aura::HandleNULL, //292 call stabled pet
|
&Aura::HandleNULL, //292 call stabled pet
|
||||||
&Aura::HandleNULL, //293 2 test spells
|
&Aura::HandleNULL, //293 2 test spells
|
||||||
&Aura::HandleNULL //294 2 spells, possible prevent mana regen
|
&Aura::HandleNoImmediateEffect //294 SPELL_AURA_PREVENT_REGENERATE_POWER implemented in Player::Regenerate(Powers power)
|
||||||
};
|
};
|
||||||
#undef Aura
|
#undef Aura
|
||||||
|
|
||||||
|
|||||||
@@ -4185,6 +4185,16 @@ bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Unit::HasAuraTypeWithValue(AuraType auratype, uint32 value) const
|
||||||
|
{
|
||||||
|
AuraEffectList const& mTotalAuraList = GetAurasByType(auratype);
|
||||||
|
for(AuraEffectList::const_iterator i = mTotalAuraList.begin();i != mTotalAuraList.end(); ++i)
|
||||||
|
if (value == (*i)->GetAmount())
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Unit::HasAuraType(AuraType auraType) const
|
bool Unit::HasAuraType(AuraType auraType) const
|
||||||
{
|
{
|
||||||
return (!m_modAuras[auraType].empty());
|
return (!m_modAuras[auraType].empty());
|
||||||
|
|||||||
@@ -1613,6 +1613,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
bool HasAura(Aura * aur) const;
|
bool HasAura(Aura * aur) const;
|
||||||
bool HasAuraType(AuraType auraType) const;
|
bool HasAuraType(AuraType auraType) const;
|
||||||
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
|
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
|
||||||
|
bool HasAuraTypeWithValue(AuraType auratype, uint32 value) const;
|
||||||
inline AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId, effIndex);}
|
inline AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId, effIndex);}
|
||||||
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const;
|
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const;
|
||||||
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
|
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
|
||||||
|
|||||||
Reference in New Issue
Block a user