mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[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:
parent
023b13f348
commit
2be50d4b95
2 changed files with 6 additions and 22 deletions
|
|
@ -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<Item *>(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<WorldObject*>(obj);
|
||||
|
||||
//assert(dynamic_cast<WorldObject*>(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<WorldObject*>(obj), update_players);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8627"
|
||||
#define REVISION_NR "8628"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue