[11465] non-ObjectGuid guids in random places.

Only ChannelMgr code wide use uint64 guids now, and Map object stores.
This commit is contained in:
VladimirMangos 2011-05-10 21:24:43 +04:00
parent a925db80fa
commit ef6a48fe03
44 changed files with 219 additions and 215 deletions

View file

@ -61,7 +61,7 @@ HostileReference::HostileReference(Unit* pUnit, ThreatManager *pThreatManager, f
iThreat = pThreat;
iTempThreatModifyer = 0.0f;
link(pUnit, pThreatManager);
iUnitGuid = pUnit->GetGUID();
iUnitGuid = pUnit->GetObjectGuid();
iOnline = true;
iAccessible = true;
}
@ -128,10 +128,9 @@ void HostileReference::updateOnlineStatus()
bool online = false;
bool accessible = false;
if(!isValid())
if (!isValid())
{
Unit* target = ObjectAccessor::GetUnit(*getSourceUnit(), getUnitGuid());
if(target)
if (Unit* target = ObjectAccessor::GetUnit(*getSourceUnit(), getUnitGuid()))
link(target, getSource());
}
// only check for online status if
@ -224,10 +223,10 @@ void ThreatContainer::clearReferences()
HostileReference* ThreatContainer::getReferenceByTarget(Unit* pVictim)
{
HostileReference* result = NULL;
uint64 guid = pVictim->GetGUID();
ObjectGuid guid = pVictim->GetObjectGuid();
for(ThreatList::const_iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
{
if((*i)->getUnitGuid() == guid)
if ((*i)->getUnitGuid() == guid)
{
result = (*i);
break;