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)
|
||||
target->RemoveAurasDueToSpell(MasterShaperSpellId);
|
||||
|
||||
// re-apply passive spells that don't need shapeshift but were inactive in current form:
|
||||
const PlayerSpellMap& sp_list = ((Player *)target)->GetSpellMap();
|
||||
for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (itr->second.state == PLAYERSPELL_REMOVED) continue;
|
||||
if (itr->first==spellId1 || itr->first==spellId2) continue;
|
||||
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);
|
||||
// re-apply passive spells that don't need shapeshift but were inactive in current form:
|
||||
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;
|
||||
if (itr->first==spellId1 || itr->first==spellId2) continue;
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10347"
|
||||
#define REVISION_NR "10348"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue