mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7508] Revert to "check first, proccess later" code style in WorldSession::HandleRemoveGlyph.
This commit is contained in:
parent
28dc20c6e2
commit
befa6c5c86
2 changed files with 11 additions and 12 deletions
|
|
@ -1210,8 +1210,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))
|
||||
|
|
@ -1220,11 +1224,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)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7507"
|
||||
#define REVISION_NR "7508"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue