Core/Objects: Fixed linked respawn cases when linking to itself in order to prevent respawning

This commit is contained in:
Shauren committed 2011-05-16 15:36:02 +02:00
1 parent 9650ba678b
commit a28da3582e
2 files changed
+3 -3

No files matched your search

@@ -332,7 +332,7 @@ void GameObject::Update(uint32 diff)
if (linkedRespawntime) // Can't respawn, the master is dead
{
uint64 targetGuid = sObjectMgr->GetLinkedRespawnGuid(dbtableHighGuid);
if (targetGuid == GetGUID()) // if linking self, never respawn (check delayed to next day)
if (targetGuid == dbtableHighGuid) // if linking self, never respawn (check delayed to next day)
SetRespawnTime(DAY);
else
m_respawnTime = (now > linkedRespawntime ? now : linkedRespawntime)+urand(5, MINUTE); // else copy time from master and add a little