[8628] Code cleanup.

Signed-off-by: ApoC <apoc@nymfe.net>
(cherry picked from commit 5aab292281cbd57d65960003451155cc5a92d25a)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
ApoC 2009-09-15 23:01:49 +02:00 committed by VladimirMangos
parent 023b13f348
commit 2be50d4b95
2 changed files with 6 additions and 22 deletions

View file

@ -185,30 +185,14 @@ ObjectAccessor::SaveAllPlayers()
void
ObjectAccessor::_buildUpdateObject(Object *obj, UpdateDataMapType &update_players)
{
bool build_for_all = true;
Player *pl = NULL;
if(obj->isType(TYPEMASK_ITEM))
{
Item *item = static_cast<Item *>(obj);
pl = item->GetOwner();
build_for_all = false;
}
if( pl != NULL )
if (Player* pl = item->GetOwner())
_buildPacket(pl, obj, update_players);
// Capt: okey for all those fools who think its a real fix
// THIS IS A TEMP FIX
if( build_for_all )
{
WorldObject * temp = dynamic_cast<WorldObject*>(obj);
//assert(dynamic_cast<WorldObject*>(obj)!=NULL);
if (temp)
_buildChangeObjectForPlayer(temp, update_players);
else
sLog.outDebug("ObjectAccessor: Ln 405 Temp bug fix");
}
else
_buildChangeObjectForPlayer(static_cast<WorldObject*>(obj), update_players);
}
void

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8627"
#define REVISION_NR "8628"
#endif // __REVISION_NR_H__