mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/GameObjects: Added spell cast for GAMEOBJECT_TYPE_CHEST (#30996)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user