mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[7071] Fixed recent problem with pacified aura for druids with flight forms. Cleanups code.
This commit is contained in:
parent
8b87829099
commit
76f7a25f2d
3 changed files with 22 additions and 17 deletions
|
|
@ -2723,23 +2723,27 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool disabled
|
||||||
// also cast passive spells (including all talents without SPELL_EFFECT_LEARN_SPELL) with additional checks
|
// also cast passive spells (including all talents without SPELL_EFFECT_LEARN_SPELL) with additional checks
|
||||||
else if (IsPassiveSpell(spell_id))
|
else if (IsPassiveSpell(spell_id))
|
||||||
{
|
{
|
||||||
// if spell doesn't require a stance or the player is in the required stance
|
bool need_cast = false;
|
||||||
if( ( !spellInfo->Stances &&
|
|
||||||
spell_id != 5420 && spell_id != 5419 && spell_id != 7376 &&
|
switch(spell_id)
|
||||||
spell_id != 7381 && spell_id != 21156 && spell_id != 21009 &&
|
{
|
||||||
spell_id != 21178 && spell_id != 33948 && spell_id != 40121 ) ||
|
// some spells not have stance data expacted cast at form change or present
|
||||||
m_form != 0 && (spellInfo->Stances & (1<<(m_form-1))) ||
|
case 5420: need_cast = (m_form == FORM_TREE); break;
|
||||||
(spell_id == 5420 && m_form == FORM_TREE) ||
|
case 5419: need_cast = (m_form == FORM_TRAVEL); break;
|
||||||
(spell_id == 5419 && m_form == FORM_TRAVEL) ||
|
case 7376: need_cast = (m_form == FORM_DEFENSIVESTANCE); break;
|
||||||
(spell_id == 7376 && m_form == FORM_DEFENSIVESTANCE) ||
|
case 7381: need_cast = (m_form == FORM_BERSERKERSTANCE); break;
|
||||||
(spell_id == 7381 && m_form == FORM_BERSERKERSTANCE) ||
|
case 21156: need_cast = (m_form == FORM_BATTLESTANCE); break;
|
||||||
(spell_id == 21156 && m_form == FORM_BATTLESTANCE)||
|
case 21178: need_cast = (m_form == FORM_BEAR || m_form == FORM_DIREBEAR); break;
|
||||||
(spell_id == 21178 && (m_form == FORM_BEAR || m_form == FORM_DIREBEAR) ) ||
|
case 33948: need_cast = (m_form == FORM_FLIGHT); break;
|
||||||
(spell_id == 33948 && m_form == FORM_FLIGHT) ||
|
case 34764: need_cast = (m_form == FORM_FLIGHT); break;
|
||||||
(spell_id == 40121 && m_form == FORM_FLIGHT_EPIC) )
|
case 40121: need_cast = (m_form == FORM_FLIGHT_EPIC); break;
|
||||||
|
case 40122: need_cast = (m_form == FORM_FLIGHT_EPIC); break;
|
||||||
|
// another spells have proper stance data
|
||||||
|
default: need_cast = !spellInfo->Stances && m_form != 0 && (spellInfo->Stances & (1<<(m_form-1))); break;
|
||||||
|
}
|
||||||
//Check CasterAuraStates
|
//Check CasterAuraStates
|
||||||
if (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState)))
|
if (need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState))))
|
||||||
CastSpell(this, spell_id, true);
|
CastSpell(this, spell_id, true);
|
||||||
}
|
}
|
||||||
else if( IsSpellHaveEffect(spellInfo,SPELL_EFFECT_SKILL_STEP) )
|
else if( IsSpellHaveEffect(spellInfo,SPELL_EFFECT_SKILL_STEP) )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5296,6 +5296,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
break;
|
break;
|
||||||
case FORM_FLIGHT:
|
case FORM_FLIGHT:
|
||||||
spellId = 33948;
|
spellId = 33948;
|
||||||
|
spellId2 = 34764;
|
||||||
break;
|
break;
|
||||||
case FORM_FLIGHT_EPIC:
|
case FORM_FLIGHT_EPIC:
|
||||||
spellId = 40122;
|
spellId = 40122;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7070"
|
#define REVISION_NR "7071"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue