aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/CharacterHandler.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index f119909a31e..26223b2b0af 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -1226,21 +1226,20 @@ void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
uint32 slot;
recv_data >> slot;
- if(slot < MAX_GLYPH_SLOT_INDEX)
+ if(slot >= MAX_GLYPH_SLOT_INDEX)
{
- if(uint32 glyph = _player->GetGlyph(slot))
- {
- if(GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph))
- {
- _player->RemoveAurasDueToSpell(gp->SpellId);
- _player->SetGlyph(slot, 0);
- }
- }
-
+ sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
return;
}
- sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
+ if(uint32 glyph = _player->GetGlyph(slot))
+ {
+ if(GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph))
+ {
+ _player->RemoveAurasDueToSpell(gp->SpellId);
+ _player->SetGlyph(slot, 0);
+ }
+ }
}
void WorldSession::HandleCharCustomize(WorldPacket& recv_data)