mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8430] Reapply persistent passive spells at related spellmods apply/remove.
This is solve problems with talents/glyphs/etc that affect of some talent/passive ability bonus in case: affected talent/ability spell aura already applied before spellmod apply and not affecte as must until relearn/reload. Example: talent 14983 and later applied glyph 42971. Also drop dead code for removed in 3.x talent 12303.
This commit is contained in:
parent
16b617c3c3
commit
4cbaa5b186
2 changed files with 12 additions and 7 deletions
|
|
@ -1305,13 +1305,18 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||
|
||||
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
|
||||
|
||||
// reapply some passive spells after add/remove related spellmods
|
||||
if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && (spellFamilyMask & UI64LIT(0x0000100000000000)))
|
||||
{
|
||||
m_target->RemoveAurasDueToSpell(45471);
|
||||
// reaplly talents to own passive persistent auras
|
||||
std::set<uint32> affectedPassives;
|
||||
|
||||
if(apply)
|
||||
m_target->CastSpell(m_target, 45471, true);
|
||||
for(Unit::AuraMap::const_iterator itr = m_target->GetAuras().begin(); itr != m_target->GetAuras().end(); ++itr)
|
||||
if (itr->second->IsPassive() && itr->second->IsPermanent() &&
|
||||
itr->second->GetCasterGUID() == m_target->GetGUID() && isAffectedOnSpell(itr->second->GetSpellProto()))
|
||||
affectedPassives.insert(itr->second->GetId());
|
||||
|
||||
for(std::set<uint32>::const_iterator set_itr = affectedPassives.begin(); set_itr != affectedPassives.end(); ++set_itr)
|
||||
{
|
||||
m_target->RemoveAurasDueToSpell(*set_itr);
|
||||
m_target->CastSpell(m_target, *set_itr, true);
|
||||
}
|
||||
}
|
||||
void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8429"
|
||||
#define REVISION_NR "8430"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue