mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[9455] Check glyph index send by client at glyph adding to prevent cheating.
This commit is contained in:
parent
73eeac234f
commit
62726741d6
2 changed files with 15 additions and 8 deletions
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue