Core/Loot/Gameobject: Tempspawned Gameobjects after looting
Port From (https://github.com/TrinityCore/TrinityCore/commit/8c9e5cd3f3200b378ff09a6822ceb2b5bd223e3c)
This commit is contained in:
@@ -802,8 +802,17 @@ namespace Game.Entities
|
|||||||
//! The GetOwnerGUID() check is mostly for compatibility with hacky scripts - 99% of the time summoning should be done trough spells.
|
//! The GetOwnerGUID() check is mostly for compatibility with hacky scripts - 99% of the time summoning should be done trough spells.
|
||||||
if (GetSpellId() != 0 || !GetOwnerGUID().IsEmpty())
|
if (GetSpellId() != 0 || !GetOwnerGUID().IsEmpty())
|
||||||
{
|
{
|
||||||
SetRespawnTime(0);
|
//Don't delete spell spawned chests, which are not consumed on loot
|
||||||
Delete();
|
if (m_respawnTime > 0 && GetGoType() == GameObjectTypes.Chest && !GetGoInfo().IsDespawnAtAction())
|
||||||
|
{
|
||||||
|
UpdateObjectVisibility();
|
||||||
|
SetLootState(LootState.Ready);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetRespawnTime(0);
|
||||||
|
Delete();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user