Merge commit 'origin/master' into 330

This commit is contained in:
tomrus88 2009-10-14 17:32:52 +04:00
commit b10c3e2287
63 changed files with 942 additions and 1102 deletions

View file

@ -198,22 +198,12 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
data->AddUpdateBlock(buf);
}
void Object::BuildUpdate(UpdateDataMapType &update_players)
void Object::SendCreateUpdateToPlayer(Player* player)
{
ObjectAccessor::_buildUpdateObject(this,update_players);
ClearUpdateMask(true);
}
void Object::SendUpdateToPlayer(Player* player)
{
// send update to another players
SendUpdateObjectToAllExcept(player);
// send create update to player
UpdateData upd;
WorldPacket packet;
upd.Clear();
BuildCreateUpdateBlockForPlayer(&upd, player);
upd.BuildPacket(&packet);
player->GetSession()->SendPacket(&packet);
@ -762,20 +752,6 @@ void Object::ClearUpdateMask(bool remove)
}
}
// Send current value fields changes to all viewers
void Object::SendUpdateObjectToAllExcept(Player* exceptPlayer)
{
// changes will be send in create packet
if(!IsInWorld())
return;
// nothing do
if(!m_objectUpdated)
return;
ObjectAccessor::UpdateObject(this,exceptPlayer);
}
bool Object::LoadValues(const char* data)
{
if(!m_uint32Values) _InitValues();
@ -1658,7 +1634,7 @@ namespace MaNGOS
float x,y,z;
if( !c->isAlive() || c->hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED) ||
if( !c->isAlive() || c->hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED | UNIT_STAT_DIED) ||
!c->GetMotionMaster()->GetDestination(x,y,z) )
{
x = c->GetPositionX();