mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[8892] Implement spell 29166 and glyph 40908.
Original patch provided by bobaz. Signed-off-by: VladimirMangos <vladimir@getmangos.com> Also add protection from wrong periodic heal at relogin.
This commit is contained in:
parent
8465ae23f9
commit
d542e25302
3 changed files with 29 additions and 4 deletions
|
|
@ -4428,10 +4428,31 @@ void Aura::HandlePeriodicEnergize(bool apply, bool Real)
|
||||||
if (!Real)
|
if (!Real)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (apply)
|
// For prevent double apply bonuses
|
||||||
|
bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading());
|
||||||
|
|
||||||
|
if (apply && !loading)
|
||||||
{
|
{
|
||||||
switch (GetId())
|
switch (GetId())
|
||||||
{
|
{
|
||||||
|
case 54833: // Glyph of Innervate (value%/2 of casters base mana)
|
||||||
|
{
|
||||||
|
Unit* caster = GetCaster();
|
||||||
|
m_modifier.m_amount = int32(caster->GetCreateMana() * GetBasePoints() / (200 * m_maxduration / m_periodicTimer));
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
case 29166: // Innervate (value% of casters base mana)
|
||||||
|
{
|
||||||
|
Unit* caster = GetCaster();
|
||||||
|
|
||||||
|
// Glyph of Innervate
|
||||||
|
if (caster && caster->HasAura(54832))
|
||||||
|
caster->CastSpell(caster,54833,true,NULL,this);
|
||||||
|
|
||||||
|
m_modifier.m_amount = int32(caster->GetCreateMana() * GetBasePoints() / (100 * m_maxduration / m_periodicTimer));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 48391: // Owlkin Frenzy 2% base mana
|
case 48391: // Owlkin Frenzy 2% base mana
|
||||||
m_modifier.m_amount = m_target->GetCreateMana() * 2 / 100;
|
m_modifier.m_amount = m_target->GetCreateMana() * 2 / 100;
|
||||||
break;
|
break;
|
||||||
|
|
@ -4461,8 +4482,6 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
|
||||||
// For prevent double apply bonuses
|
// For prevent double apply bonuses
|
||||||
bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading());
|
bool loading = (m_target->GetTypeId() == TYPEID_PLAYER && ((Player*)m_target)->GetSession()->PlayerLoading());
|
||||||
|
|
||||||
Unit* caster = GetCaster();
|
|
||||||
|
|
||||||
SpellEntry const*spell = GetSpellProto();
|
SpellEntry const*spell = GetSpellProto();
|
||||||
switch( spell->SpellFamilyName)
|
switch( spell->SpellFamilyName)
|
||||||
{
|
{
|
||||||
|
|
@ -4482,6 +4501,8 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_HUNTER:
|
case SPELLFAMILY_HUNTER:
|
||||||
{
|
{
|
||||||
|
Unit* caster = GetCaster();
|
||||||
|
|
||||||
// Explosive Shot
|
// Explosive Shot
|
||||||
if (apply && !loading && caster)
|
if (apply && !loading && caster)
|
||||||
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 14 / 100);
|
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 14 / 100);
|
||||||
|
|
|
||||||
|
|
@ -1537,6 +1537,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
|
||||||
(spellId_2 == 33891 && spellId_1 == 34123))
|
(spellId_2 == 33891 && spellId_1 == 34123))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Innervate and Glyph of Innervate and some other spells
|
||||||
|
if (spellInfo_1->SpellIconID == 62 && spellInfo_2->SpellIconID == 62)
|
||||||
|
return false;
|
||||||
|
|
||||||
// Wrath of Elune and Nature's Grace
|
// Wrath of Elune and Nature's Grace
|
||||||
if( spellInfo_1->Id == 16886 && spellInfo_2->Id == 46833 || spellInfo_2->Id == 16886 && spellInfo_1->Id == 46833 )
|
if( spellInfo_1->Id == 16886 && spellInfo_2->Id == 46833 || spellInfo_2->Id == 16886 && spellInfo_1->Id == 46833 )
|
||||||
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 "8891"
|
#define REVISION_NR "8892"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue