Skip to content

Commit

Permalink
[10491] Search player in player list in update fields data prepare is…
Browse files Browse the repository at this point in the history
… bad idea.
  • Loading branch information
VladimirMangos committed Sep 16, 2010
1 parent 869f23d commit a14cbac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game/Object.cpp
Expand Up @@ -661,7 +661,7 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *
else
{
// flag only for original loot recipent
if (target == ((Creature*)this)->GetOriginalLootRecipient())
if (target->GetObjectGuid() == ((Creature*)this)->GetLootRecipientGuid())
*data << m_uint32Values[ index ];
else
*data << (m_uint32Values[ index ] & ~(UNIT_DYNFLAG_TAPPED | UNIT_DYNFLAG_TAPPED_BY_PLAYER));
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10490"
#define REVISION_NR "10491"
#endif // __REVISION_NR_H__

2 comments on commit a14cbac

@LordJZ
Copy link
Contributor

@LordJZ LordJZ commented on a14cbac Sep 16, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol :)

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because we compare target->GetObjectGuid() then target is online, for us important this case.
So my main reason is perfomence: not need do player search if we can just compare guids.

Please sign in to comment.