diff options
author | Ovahlord <dreadkiller@gmx.de> | 2023-11-21 23:59:42 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2023-11-21 23:59:42 +0100 |
commit | f08213a005ca651948be417b48cb731e84f01505 (patch) | |
tree | 7cfa4028ca310dbede2b087e310afa751f5b3f76 /src/server/game/Handlers/SkillHandler.cpp | |
parent | 8605fd8851d22fad908a6998d61ef808458fabd6 (diff) |
Core/Players: downgraded the glyph system
Diffstat (limited to 'src/server/game/Handlers/SkillHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SkillHandler.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/server/game/Handlers/SkillHandler.cpp b/src/server/game/Handlers/SkillHandler.cpp index 77471c3b350..c86725d2a52 100644 --- a/src/server/game/Handlers/SkillHandler.cpp +++ b/src/server/game/Handlers/SkillHandler.cpp @@ -84,3 +84,22 @@ void WorldSession::HandleTradeSkillSetFavorite(WorldPackets::Spells::TradeSkillS _player->SetSpellFavorite(tradeSkillSetFavorite.RecipeID, tradeSkillSetFavorite.IsFavorite); } + +void WorldSession::HandleRemoveGlyphOpcode(WorldPackets::Talent::RemoveGlyph& packet) +{ + if (packet.GlyphSlot >= MAX_GLYPH_SLOT_INDEX) + { + TC_LOG_DEBUG("network", "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH {}", packet.GlyphSlot); + return; + } + + if (uint32 glyph = _player->GetGlyph(packet.GlyphSlot)) + { + if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) + { + _player->RemoveAurasDueToSpell(gp->SpellID); + _player->SetGlyph(packet.GlyphSlot, 0); + _player->SendTalentsInfoData(); + } + } +} |