Core/GameObjects: Added spell cast for GAMEOBJECT_TYPE_CHEST

Port From (https://github.com/TrinityCore/TrinityCore/commit/f7cd7661b8429b9bbca559ccdeb453718a1daa63)
This commit is contained in:
Hondacrx
2025-08-17 23:03:26 -04:00
parent d6c7ea67fc
commit 6abf251446
@@ -1811,6 +1811,10 @@ namespace Game.Entities
if (trapEntry != 0)
TriggeringLinkedGameObject(trapEntry, player);
// Cast spell before sending loot
if (spellCaster != null && info.Chest.spell != 0)
spellCaster.CastSpell(null, info.Chest.spell, spellArgs);
AddUniqueUse(player);
}