Fixes phase 2
scripts/gameobject: correct reset of gameobjects (cages/prisons), move command out of if statement
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>
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
Core: Remove tabs, fix whitespace and fix nonPCH properly (5am, too late for this stuff...)
SQL: Fix sql import problems