From 2be50d4b9567a3c743c4f558f09759b6276b184f Mon Sep 17 00:00:00 2001 From: ApoC Date: Tue, 15 Sep 2009 23:01:49 +0200 Subject: [PATCH] [8628] Code cleanup. Signed-off-by: ApoC (cherry picked from commit 5aab292281cbd57d65960003451155cc5a92d25a) Signed-off-by: VladimirMangos --- src/game/ObjectAccessor.cpp | 26 +++++--------------------- src/shared/revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index 6b99ef178..9604eee8f 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -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) ) + if(obj->isType(TYPEMASK_ITEM)) { Item *item = static_cast(obj); - pl = item->GetOwner(); - build_for_all = false; - } - - if( pl != NULL ) - _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(obj); - - //assert(dynamic_cast(obj)!=NULL); - if (temp) - _buildChangeObjectForPlayer(temp, update_players); - else - sLog.outDebug("ObjectAccessor: Ln 405 Temp bug fix"); + if (Player* pl = item->GetOwner()) + _buildPacket(pl, obj, update_players); } + else + _buildChangeObjectForPlayer(static_cast(obj), update_players); } void diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 524c2cf73..0384cf75d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8627" + #define REVISION_NR "8628" #endif // __REVISION_NR_H__