Merge branch 'master' into Playerbot

# Conflicts:
#	src/server/apps/worldserver/worldserver.conf.dist
#	src/server/game/Battlegrounds/Battleground.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/World/World.cpp
This commit is contained in:
郑佩茹
2022-07-13 10:31:30 -06:00
123 changed files with 6889 additions and 1214 deletions

View File

@@ -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);