[8866] Replace [8864] by more correct way fix attack stance problem.

Thanks to TOM_RUS for help in more deep reseach problem source.
This commit is contained in:
VladimirMangos 2009-11-23 15:05:12 +03:00
parent 06e90a954a
commit 670a2dbb4c
4 changed files with 20 additions and 17 deletions

View file

@ -181,8 +181,8 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
if(isType(TYPEMASK_UNIT))
{
if(((Unit*)this)->GetTargetGUID())
flags |= UPDATEFLAG_HAS_TARGET;
if(((Unit*)this)->getVictim())
flags |= UPDATEFLAG_HAS_ATTACKING_TARGET;
}
}
@ -546,9 +546,12 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 flags, uint32 flags2)
}
// 0x4
if(flags & UPDATEFLAG_HAS_TARGET) // packed guid (current target guid)
if(flags & UPDATEFLAG_HAS_ATTACKING_TARGET) // packed guid (current target guid)
{
data->appendPackGUID(((Unit*)this)->GetTargetGUID());
if (((Unit*)this)->getVictim())
data->append(((Unit*)this)->getVictim()->GetPackGUID());
else
data->appendPackGUID(0);
}
// 0x2