Core/GameObjects: Added spell cast for GAMEOBJECT_TYPE_CHEST (#30996)

This commit is contained in:
Meji
2025-05-28 10:27:19 +02:00
committed by GitHub
parent 451f251e83
commit f7cd7661b8

View File

@@ -2687,6 +2687,10 @@ void GameObject::Use(Unit* user, bool ignoreCastInProgress /*= false*/)
if (uint32 trapEntry = info->chest.linkedTrap)
TriggeringLinkedGameObject(trapEntry, player);
// Cast spell before sending loot
if (spellCaster && info->chest.spell)
spellCaster->CastSpell(nullptr, info->chest.spell, spellArgs);
AddUniqueUse(player);
}