diff options
| author | megamage <none@none> | 2009-03-21 14:54:21 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-21 14:54:21 -0600 |
| commit | 42d5b79eead2608c00c1068a5eec98798333fc42 (patch) | |
| tree | 746863e532d0030d491b99ce4bc5c7c76231c322 | |
| parent | de849cc5087e9a11ddff2f4e9ec42b1ec293cf2a (diff) | |
[7508] Revert to "check first, proccess later" code style in WorldSession::HandleRemoveGlyph. Author: VladimirMangos
--HG--
branch : trunk
| -rw-r--r-- | src/game/CharacterHandler.cpp | 21 |
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) |
