[7508] Revert to "check first, proccess later" code style in WorldSession::HandleRemoveGlyph. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-21 14:54:21 -06:00
parent de849cc508
commit 42d5b79eea
+10 -11
View File
@@ -1226,21 +1226,20 @@ void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
uint32 slot; uint32 slot;
recv_data >> slot; recv_data >> slot;
if(slot < MAX_GLYPH_SLOT_INDEX) if(slot >= MAX_GLYPH_SLOT_INDEX)
{ {
if(uint32 glyph = _player->GetGlyph(slot)) sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
{
if(GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph))
{
_player->RemoveAurasDueToSpell(gp->SpellId);
_player->SetGlyph(slot, 0);
}
}
return; 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) void WorldSession::HandleCharCustomize(WorldPacket& recv_data)