mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge remote branch 'origin/master' into 330
This commit is contained in:
commit
90ee507cf7
83 changed files with 1629 additions and 737 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -261,7 +261,27 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 flags, uint32 flags2)
|
|||
{
|
||||
case TYPEID_UNIT:
|
||||
{
|
||||
flags2 = ((Creature*)this)->canFly() ? (MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_LEVITATING) : MOVEMENTFLAG_NONE;
|
||||
flags2 = MOVEMENTFLAG_NONE;
|
||||
|
||||
if (!((Creature*)this)->IsStopped())
|
||||
flags2 |= MOVEMENTFLAG_FORWARD; // not set if not really moving
|
||||
|
||||
if (((Creature*)this)->canFly())
|
||||
{
|
||||
flags2 |= MOVEMENTFLAG_LEVITATING; // (ok) most seem to have this
|
||||
|
||||
if (((Creature*)this)->IsStopped())
|
||||
flags2 |= MOVEMENTFLAG_FLY_UNK1; // (ok) possibly some "hover" mode
|
||||
else
|
||||
{
|
||||
if (((Creature*)this)->IsMounted())
|
||||
flags2 |= MOVEMENTFLAG_FLYING; // seems to be often when mounted
|
||||
/* for further research
|
||||
else
|
||||
flags2 |= MOVEMENTFLAG_FLYING2; // not seen, but work on some, even if not "correct"
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TYPEID_PLAYER:
|
||||
|
|
@ -546,9 +566,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
|
||||
|
|
@ -1115,8 +1138,8 @@ void Object::BuildUpdateData( UpdateDataMapType& update_players )
|
|||
}
|
||||
|
||||
WorldObject::WorldObject()
|
||||
: m_mapId(0), m_InstanceId(0), m_phaseMask(PHASEMASK_NORMAL),
|
||||
m_positionX(0.0f), m_positionY(0.0f), m_positionZ(0.0f), m_orientation(0.0f), m_currMap(NULL)
|
||||
: m_currMap(NULL), m_mapId(0), m_InstanceId(0), m_phaseMask(PHASEMASK_NORMAL),
|
||||
m_positionX(0.0f), m_positionY(0.0f), m_positionZ(0.0f), m_orientation(0.0f)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue