aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp12
-rw-r--r--src/server/game/Spells/SpellEffects.cpp2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 98e89e73fff..1346f8682ae 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1168,7 +1168,9 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
if (target->GetTypeId() == TYPEID_PLAYER)
{
- PlayerSpellMap const& sp_list = target->ToPlayer()->GetSpellMap();
+ Player* plrTarget = target->ToPlayer();
+
+ PlayerSpellMap const& sp_list = plrTarget->GetSpellMap();
for (auto itr = sp_list.begin(); itr != sp_list.end(); ++itr)
{
if (itr->second.state == PLAYERSPELL_REMOVED || itr->second.disabled)
@@ -1188,7 +1190,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
// Also do it for Glyphs
for (uint32 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
{
- if (uint32 glyphId = target->ToPlayer()->GetGlyph(i))
+ if (uint32 glyphId = plrTarget->GetGlyph(plrTarget->GetActiveSpec(), i))
{
if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId))
{
@@ -1203,19 +1205,21 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
}
// Leader of the Pack
- if (target->ToPlayer()->HasSpell(17007))
+ if (plrTarget->HasSpell(17007))
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(24932);
if (spellInfo && spellInfo->Stances & (UI64LIT(1) << (GetMiscValue() - 1)))
target->CastSpell(target, 24932, this);
}
+
// Improved Barkskin - apply/remove armor bonus due to shapeshift
- if (target->ToPlayer()->HasSpell(63410) || target->ToPlayer()->HasSpell(63411))
+ if (plrTarget->HasSpell(63410) || plrTarget->HasSpell(63411))
{
target->RemoveAurasDueToSpell(66530);
if (GetMiscValue() == FORM_TRAVEL || GetMiscValue() == FORM_NONE) // "while in Travel Form or while not shapeshifted"
target->CastSpell(target, 66530, true);
}
+
// Heart of the Wild
if (HotWSpellId)
{ // hacky, but the only way as spell family is not SPELLFAMILY_DRUID
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index be1fefa8a51..423883689d7 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3805,7 +3805,7 @@ void Spell::EffectApplyGlyph()
}
// remove old glyph
- if (uint32 oldglyph = player->GetGlyph(m_glyphIndex))
+ if (uint32 oldglyph = player->GetGlyph(player->GetActiveSpec(), m_glyphIndex))
{
if (GlyphPropertiesEntry const* old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph))
{