diff options
author | Ovahlord <dreadkiller@gmx.de> | 2023-11-22 00:35:33 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2023-11-22 00:35:33 +0100 |
commit | 8c1f1f82e5d4269b2e44da4bd5f9b5db6c9851a9 (patch) | |
tree | 73ba5ae7d1c9e7afdc9fbb5e6e31225b69601719 /src | |
parent | f08213a005ca651948be417b48cb731e84f01505 (diff) |
Core/Players: fixed glyph related crashes when switching talent specializations and corrected glyph data send in talents info packet
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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) |