[7508] Revert to "check first, proccess later" code style in WorldSession::HandleRemoveGlyph. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -1226,8 +1226,12 @@ void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
|
||||
uint32 slot;
|
||||
recv_data >> slot;
|
||||
|
||||
if(slot < MAX_GLYPH_SLOT_INDEX)
|
||||
if(slot >= MAX_GLYPH_SLOT_INDEX)
|
||||
{
|
||||
sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
|
||||
return;
|
||||
}
|
||||
|
||||
if(uint32 glyph = _player->GetGlyph(slot))
|
||||
{
|
||||
if(GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph))
|
||||
@@ -1236,11 +1240,6 @@ void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
|
||||
_player->SetGlyph(slot, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
|
||||
Reference in New Issue
Block a user