mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[10348] Add missing Player check in unapply part of [10345]
Yes copy&paste is evil...
This commit is contained in:
parent
b0d42a6f67
commit
fbf517e763
2 changed files with 14 additions and 11 deletions
|
|
@ -6021,17 +6021,20 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
||||||
if(MasterShaperSpellId)
|
if(MasterShaperSpellId)
|
||||||
target->RemoveAurasDueToSpell(MasterShaperSpellId);
|
target->RemoveAurasDueToSpell(MasterShaperSpellId);
|
||||||
|
|
||||||
// re-apply passive spells that don't need shapeshift but were inactive in current form:
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
const PlayerSpellMap& sp_list = ((Player *)target)->GetSpellMap();
|
|
||||||
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
|
||||||
{
|
{
|
||||||
if (itr->second.state == PLAYERSPELL_REMOVED) continue;
|
// re-apply passive spells that don't need shapeshift but were inactive in current form:
|
||||||
if (itr->first==spellId1 || itr->first==spellId2) continue;
|
const PlayerSpellMap& sp_list = ((Player *)target)->GetSpellMap();
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
||||||
if (!spellInfo || !IsPassiveSpell(spellInfo))
|
{
|
||||||
continue;
|
if (itr->second.state == PLAYERSPELL_REMOVED) continue;
|
||||||
if ((spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT) && spellInfo->StancesNot & (1<<(form-1)))
|
if (itr->first==spellId1 || itr->first==spellId2) continue;
|
||||||
target->CastSpell(target, itr->first, true, NULL, this);
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||||
|
if (!spellInfo || !IsPassiveSpell(spellInfo))
|
||||||
|
continue;
|
||||||
|
if ((spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT) && spellInfo->StancesNot & (1<<(form-1)))
|
||||||
|
target->CastSpell(target, itr->first, true, NULL, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Unit::SpellAuraHolderMap& tAuras = target->GetSpellAuraHolderMap();
|
Unit::SpellAuraHolderMap& tAuras = target->GetSpellAuraHolderMap();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10347"
|
#define REVISION_NR "10348"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue