Fixes phase 2
scripts/gameobject: correct reset of gameobjects (cages/prisons), move command out of if statement
Core/Spells:Beacon of Light

When holy paladin put beacon on someone and heal someone else, it shows up that the player with the beacon is being healed by himself, instead of the person who casting the Beacon.
This problem Can be solved by this.
Core/Script: Fix Dimensional Ripper spell learning
Implements saving of loot (items / money) contained inside lootable inventory items.

* Unlooted items / money persist across player sessions
* Loot inside items is tied to the item rather than the player so if trading
  partially looted items becomes possible, this implementation will still work

* New tables added:

    characters_database.sql (first time users)
    characters_create_item_loot.sql (existing users)

Implementation Can be tested with:

 Watertight Trunk [21113]
 Bulging Sack of Gems [25422]
 Fat Sack of Coins [11937]

Closes #2048
Core/PetAI: Fix pet's self-jumping

Fix issue, when pet autocast leap-like spells on itself
Core/PetAI: Fix Ghouls emotions

Correction IDs of COWER and ROAR emotions for ghoul.
DB/Scripts: Implemented creature_text for Trial of the Champion
DB/SAI: Fix quest: Foundation for Revenge, closes https://github.com/TrinityCore/TrinityCore/issues/8621
Core/Items: DestroyItemCount also searches bank

Closes #8240

Signed-off-by: Nay <dnpd.dd@gmail.com>
Core/Creature: Update template - reinitialize spell bar for vehicles

	* update template didn't change spell bar for players if on vehicle that updates it's template, initialize spells was needed
	* combined with faction changing, since when update is called player faction is ignored and it should be changed to his (based on sniffs)
	* the idea of this automated check inside fix SAI problems mainly, because there you have nothing to use to reinitialize the bar - closes #5254
Merge pull request #8681 from xomachine/master

Core/PetAI: Emote and autocast fixes
Merge pull request #8565 from Trista/master

Core/Creature: Update template - reinitialize spell bar for vehicles 
Merge pull request #8667 from Kirkhammett/engi_fix

Core/Script: Fix Dimensional Ripper spell learning
Merge pull request #8131 from flippy84/master

Core/Script: Heigan phase 2
DB/ToC: correcting a typo at immunities added at 1f9db80b69379f3

Closes #8641

Signed-off-by: Nay <dnpd.dd@gmail.com>
Core/Scripts: Adding script hooks to allow for third party scripts to modify damage dealt.

Originally from the VAS Autobalance script, slightly modified.

Only addresses Spells, Dots, and Melee Damage. I'll have look at the current modules on ways of doing this but, Environmental Damage(fire/lava/drowning), Fall Damage, and Potentially AoE aren't covered by these.

Closes #7867

Signed-off-by: Nay <dnpd.dd@gmail.com>
Core/Player: Fix build
Core/Quest: Song of Wind and Water

* cleanned a bit and edited old @Treak fix, credits go to him, the quest will* work 100% blizzlike when target_unit_master #8643 gets a fix for vehicle. What concerns the quest is done. I've already fixed the core kill_credit issue, but needs to be discussed.
* leaving the vehicle_AI until they get integrated correctly to SAI, this can be easily converted after. Currently need to make some hacks to make it work close to good if using SAI. (specificly terrain acts weird at that place)

Closes: #5424
Core: Fix non-PCH build again