[11159] Remove now redundent GetDBTableGUIDLow support.

Now any creatures/gameobjects loaded base at DB data
in non-instanceable/instanceable maps always have same guid
as in DB data.

* Also remove useless by same reasons MaNGOS::GameObjectWithDbGUIDCheck
This commit is contained in:
VladimirMangos 2011-02-14 06:04:06 +03:00
parent 654dac1e11
commit 04c21c95d3
20 changed files with 150 additions and 176 deletions

View file

@ -2703,23 +2703,14 @@ bool ChatHandler::ExtractUint32KeyFromLink(char** text, char const* linkType, ui
return ExtractUInt32(&arg, value);
}
GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid,uint32 entry)
GameObject* ChatHandler::GetGameObjectWithGuid(uint32 lowguid,uint32 entry)
{
if(!m_session)
if (!m_session)
return NULL;
Player* pl = m_session->GetPlayer();
GameObject* obj = pl->GetMap()->GetGameObject(ObjectGuid(HIGHGUID_GAMEOBJECT, entry, lowguid));
if(!obj && sObjectMgr.GetGOData(lowguid)) // guid is DB guid of object
{
MaNGOS::GameObjectWithDbGUIDCheck go_check(*pl,lowguid);
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(obj,go_check);
Cell::VisitGridObjects(pl,checker, pl->GetMap()->GetVisibilityDistance());
}
return obj;
return pl->GetMap()->GetGameObject(ObjectGuid(HIGHGUID_GAMEOBJECT, entry, lowguid));
}
enum SpellLinkType