Core/Entities: Fix guid lookup for linked respawn system

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-12-25 02:22:35 +01:00
parent 95eb430dc0
commit 06955a1113
2 changed files with 5 additions and 3 deletions
@@ -464,7 +464,8 @@ void Creature::Update(uint32 diff)
if (!allowed) // Will be rechecked on next Update call
break;
time_t linkedRespawntime = sObjectMgr->GetLinkedRespawnTime(GetGUID(), GetMap()->GetInstanceId());
uint64 dbtableHighGuid = MAKE_NEW_GUID(m_DBTableGuid, GetEntry(), HIGHGUID_UNIT);
time_t linkedRespawntime = sObjectMgr->GetLinkedRespawnTime(dbtableHighGuid, GetMap()->GetInstanceId());
if (!linkedRespawntime) // Can respawn
Respawn();
else // the master is dead