[9455] Check glyph index send by client at glyph adding to prevent cheating.

This commit is contained in:
VladimirMangos 2010-02-26 01:26:30 +03:00
parent 73eeac234f
commit 62726741d6
2 changed files with 15 additions and 8 deletions

View file

@ -47,6 +47,13 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
recvPacket >> bagIndex >> slot >> cast_count >> spellid >> item_guid >> glyphIndex >> unk_flags; recvPacket >> bagIndex >> slot >> cast_count >> spellid >> item_guid >> glyphIndex >> unk_flags;
// reject fake data
if (glyphIndex >= MAX_GLYPH_SLOT_INDEX)
{
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL );
return;
}
Item *pItem = pUser->GetItemByPos(bagIndex, slot); Item *pItem = pUser->GetItemByPos(bagIndex, slot);
if (!pItem) if (!pItem)
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9454" #define REVISION_NR "9455"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__