mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
[3.3.5] Core/Loot/Gameobject: Tempspawned Gameobjects after looting (#22124)
* spell spawned chest non-despawn fix * fix the consumed game objects
This commit is contained in:
@@ -741,8 +741,17 @@ void GameObject::Update(uint32 diff)
|
||||
//! The GetOwnerGUID() check is mostly for compatibility with hacky scripts - 99% of the time summoning should be done trough spells.
|
||||
if (GetSpellId() || GetOwnerGUID())
|
||||
{
|
||||
SetRespawnTime(0);
|
||||
Delete();
|
||||
//Don't delete spell spawned chests, which are not consumed on loot
|
||||
if (m_respawnTime > 0 && GetGoType() == GAMEOBJECT_TYPE_CHEST && !GetGOInfo()->IsDespawnAtAction())
|
||||
{
|
||||
UpdateObjectVisibility();
|
||||
SetLootState(GO_READY);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRespawnTime(0);
|
||||
Delete();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user