aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 1ac4c8fa2f0..11d9350ad78 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -259,13 +259,13 @@ void Object::BuildOutOfRangeUpdateBlock(UpdateData * data) const
data->AddOutOfRangeGUID(GetGUID());
}
-void Object::DestroyForPlayer(Player *target) const
+void Object::DestroyForPlayer( Player *target, bool anim ) const
{
ASSERT(target);
WorldPacket data(SMSG_DESTROY_OBJECT, 8);
data << uint64(GetGUID());
- data << uint8(0); // WotLK (bool)
+ data << uint8(anim ? 1 : 0); // WotLK (bool), may be despawn animation
target->GetSession()->SendPacket( &data );
}
@@ -760,7 +760,7 @@ void Object::_SetCreateBits(UpdateMask *updateMask, Player* /*target*/) const
void Object::SetInt32Value( uint16 index, int32 value )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
if(m_int32Values[ index ] != value)
{
@@ -779,7 +779,7 @@ void Object::SetInt32Value( uint16 index, int32 value )
void Object::SetUInt32Value( uint16 index, uint32 value )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
if(m_uint32Values[ index ] != value)
{
@@ -798,7 +798,7 @@ void Object::SetUInt32Value( uint16 index, uint32 value )
void Object::SetUInt64Value( uint16 index, const uint64 &value )
{
- ASSERT( index + 1 < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index + 1 < m_valuesCount || PrintIndexError( index, true ) );
if(*((uint64*)&(m_uint32Values[ index ])) != value)
{
m_uint32Values[ index ] = *((uint32*)&value);
@@ -859,7 +859,7 @@ bool Object::RemoveUInt64Value(uint16 index, const uint64 &value)
void Object::SetFloatValue( uint16 index, float value )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
if(m_floatValues[ index ] != value)
{
@@ -878,7 +878,7 @@ void Object::SetFloatValue( uint16 index, float value )
void Object::SetByteValue( uint16 index, uint8 offset, uint8 value )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
if(offset > 4)
{
@@ -904,7 +904,7 @@ void Object::SetByteValue( uint16 index, uint8 offset, uint8 value )
void Object::SetUInt16Value( uint16 index, uint8 offset, uint16 value )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
if(offset > 2)
{
@@ -978,7 +978,7 @@ void Object::ApplyModPositiveFloatValue(uint16 index, float val, bool apply)
void Object::SetFlag( uint16 index, uint32 newFlag )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
uint32 oldval = m_uint32Values[ index ];
uint32 newval = oldval | newFlag;
@@ -999,7 +999,7 @@ void Object::SetFlag( uint16 index, uint32 newFlag )
void Object::RemoveFlag( uint16 index, uint32 oldFlag )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
uint32 oldval = m_uint32Values[ index ];
uint32 newval = oldval & ~oldFlag;
@@ -1020,7 +1020,7 @@ void Object::RemoveFlag( uint16 index, uint32 oldFlag )
void Object::SetByteFlag( uint16 index, uint8 offset, uint8 newFlag )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
if(offset > 4)
{
@@ -1045,7 +1045,7 @@ void Object::SetByteFlag( uint16 index, uint8 offset, uint8 newFlag )
void Object::RemoveByteFlag( uint16 index, uint8 offset, uint8 oldFlag )
{
- ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
+ ASSERT( index < m_valuesCount || PrintIndexError( index, true ) );
if(offset > 4)
{
@@ -1462,7 +1462,7 @@ bool WorldObject::IsInBetween(const WorldObject *obj1, const WorldObject *obj2,
void WorldObject::GetRandomPoint( float x, float y, float z, float distance, float &rand_x, float &rand_y, float &rand_z) const
{
- if(distance==0)
+ if(distance == 0)
{
rand_x = x;
rand_y = y;
@@ -1696,7 +1696,7 @@ void WorldObject::SendMessageToSetInRange(WorldPacket *data, float dist, bool /*
void WorldObject::SendObjectDeSpawnAnim(uint64 guid)
{
WorldPacket data(SMSG_GAMEOBJECT_DESPAWN_ANIM, 8);
- data << guid;
+ data << uint64(guid);
SendMessageToSet(&data, true);
}