Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-06-30 09:34:51 -06:00
committed by GitHub
16 changed files with 1017 additions and 4 deletions
@@ -1573,6 +1573,23 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
if (GlyphPropertiesEntry const* glyphEntry = sGlyphPropertiesStore.LookupEntry(glyph))
{
_player->RemoveAurasDueToSpell(glyphEntry->SpellId);
// Removed any triggered auras
Unit::AuraMap& ownedAuras = _player->GetOwnedAuras();
for (Unit::AuraMap::iterator iter = ownedAuras.begin(); iter != ownedAuras.end();)
{
Aura* aura = iter->second;
if (SpellInfo const* triggeredByAuraSpellInfo = aura->GetTriggeredByAuraSpellInfo())
{
if (triggeredByAuraSpellInfo->Id == glyphEntry->SpellId)
{
_player->RemoveOwnedAura(iter);
continue;
}
}
++iter;
}
_player->SendLearnPacket(glyphEntry->SpellId, false); // Send packet to properly handle client-side spell tooltips
_player->SetGlyph(slot, 0, true);
_player->SendTalentsInfoData(false);