mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
For check allowed in dead state auras apply use IsDeathPersistentSpell instead hack code.
This commit is contained in:
parent
6db608d1d3
commit
49b88a14a9
2 changed files with 4 additions and 3 deletions
|
|
@ -2354,7 +2354,7 @@ void Spell::EffectApplyAura(uint32 i)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load)
|
// ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load)
|
||||||
if( !unitTarget->isAlive() && m_spellInfo->Id != 20584 && m_spellInfo->Id != 8326 &&
|
if( !unitTarget->isAlive() && !IsDeathPersistentSpell(m_spellInfo) &&
|
||||||
(unitTarget->GetTypeId()!=TYPEID_PLAYER || !((Player*)unitTarget)->GetSession()->PlayerLoading()) )
|
(unitTarget->GetTypeId()!=TYPEID_PLAYER || !((Player*)unitTarget)->GetSession()->PlayerLoading()) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3406,8 +3406,10 @@ int32 Unit::GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_
|
||||||
|
|
||||||
bool Unit::AddAura(Aura *Aur)
|
bool Unit::AddAura(Aura *Aur)
|
||||||
{
|
{
|
||||||
|
SpellEntry const* aurSpellInfo = Aur->GetSpellProto();
|
||||||
|
|
||||||
// ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load)
|
// ghost spell check, allow apply any auras at player loading in ghost mode (will be cleanup after load)
|
||||||
if( !isAlive() && Aur->GetId() != 20584 && Aur->GetId() != 8326 && Aur->GetId() != 2584 &&
|
if( !isAlive() && !IsDeathPersistentSpell(aurSpellInfo) &&
|
||||||
(GetTypeId()!=TYPEID_PLAYER || !((Player*)this)->GetSession()->PlayerLoading()) )
|
(GetTypeId()!=TYPEID_PLAYER || !((Player*)this)->GetSession()->PlayerLoading()) )
|
||||||
{
|
{
|
||||||
delete Aur;
|
delete Aur;
|
||||||
|
|
@ -3423,7 +3425,6 @@ bool Unit::AddAura(Aura *Aur)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellEntry const* aurSpellInfo = Aur->GetSpellProto();
|
|
||||||
AuraType aurName = Aur->GetModifier()->m_auraname;
|
AuraType aurName = Aur->GetModifier()->m_auraname;
|
||||||
|
|
||||||
spellEffectPair spair = spellEffectPair(Aur->GetId(), Aur->GetEffIndex());
|
spellEffectPair spair = spellEffectPair(Aur->GetId(), Aur->GetEffIndex());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue