From 8c1f1f82e5d4269b2e44da4bd5f9b5db6c9851a9 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 22 Nov 2023 00:35:33 +0100 Subject: Core/Players: fixed glyph related crashes when switching talent specializations and corrected glyph data send in talents info packet --- src/server/game/Entities/Player/Player.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a36ac7b266d..533bc3c0bb9 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -26460,7 +26460,7 @@ void Player::SendTalentsInfoData() groupInfo.Talents.push_back({ pair.first, pair.second.Rank }); } - for (uint32 glyph : GetGlyphs(activeGroup)) + for (uint32 glyph : GetGlyphs(i)) groupInfo.GlyphIDs.push_back(glyph); } @@ -27085,7 +27085,12 @@ void Player::ActivateTalentGroup(uint8 talentGroup) ApplyTraitConfig(m_activePlayerData->ActiveCombatTraitConfigID, false); for (uint32 glyphId : GetGlyphs(GetActiveTalentGroup())) + { + if (!glyphId) + continue; + RemoveAurasDueToSpell(sGlyphPropertiesStore.AssertEntry(glyphId)->SpellID); + } SetActiveTalentGroup(talentGroup); SetPrimarySpecialization(0); @@ -27124,7 +27129,12 @@ void Player::ActivateTalentGroup(uint8 talentGroup) SetVisibleItemSlot(i, equippedItem); for (uint32 glyphId : GetGlyphs(talentGroup)) + { + if (!glyphId) + continue; + CastSpell(this, sGlyphPropertiesStore.AssertEntry(glyphId)->SpellID, true); + } Unit::AuraEffectList const& shapeshiftAuras = GetAuraEffectsByType(SPELL_AURA_MOD_SHAPESHIFT); for (AuraEffect* aurEff : shapeshiftAuras) -- cgit v1.2.3