[z2102] Improve AreaTrigger teleport requirement checks

Implement AreaLockStatus concept by rsa

Also drop basicly unneeded `areatrigger_teleport`.required_failed_text field.
This concept is still in testing phase, please feedback results of some glitches that might exist!

TODO: Use Player::GetAreaLockStatus or GetAreaTriggerLockStatus for other "CanEnter" checks as well.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>

(based on commit [12148] - 8ff1eb4)

(based on commit [s1723] - 95502d4)
[z2103] Fix broken gossip_menu_option due to [z1972]. Thanks Salja for reporting
[z2104] Improve target selection for TARGET_DUELVSPLAYER

Also set the spell to be Redirected only if the spell is actually redirected

(based on commit [12150] - 76312ff)

(based on commit [s1724] - a9a7f80)
[z2105] Improve EffectTeleUnitsFaceCaster and target-selection for position targets

* Let EffectTeleUnitsFaceCaster use a destination for teleporting if provided
* Expect to add caster for TARGET_RANDOM_NEARBY_LOC, TARGET_RANDOM_CIRCUMFERENCE_POINT only for summon spells (or similar spells)

(based on commit [12151] - 60827bd)

(based on commit [s1725] - d589c6d)
[z2106] Let GetMapEntranceTrigger and GetGoBackTrigger work in a better defined order

Actually as this is still no total order (and it is basicly impossible to define a reasonable total order for areatrigger_teleport) it is not well defined, but probably good enough for all cases

(based on commit [12154] - 6bfcef0)

(based on commit [s1728] - 6e468ea)
[z2107] Rewrite Checks required when entering a map

Expected way from now on is:
- Test if a map can be entered with Player::GetAreaTriggerLockStatus
- IF this doesn't return AREA_LOCKSTATUS_OK, and if wanted,
  send the fail-message with Player::SendTransferAbortedByLockStatus function.

Please feedback any hidden problems!

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>

(based on commit [12155] - 3d95311)

(based on commit [s1729] - d1828ad)
[z2108] Improve the RepopAtGraveyard handling of last commit. Thx to rsa for pointing

(based on commit [12156] - ccecf5b)

(based on commit [s1730] - f880c3b)
[z2109] Improve ObjectMgr::GetGoBackTrigger to get back to a trigger that actually ports into the map that could not be entered

(based on commit [12157] - 7dedd50)

(based on commit [s1731] - f002ef8)
[z2110] Fixup problems with recent teleportation changes

(based on commit [12158] - 57884bc)

(based on commit [s1732] - a837a27)
[z2111] Fix message for Area lockstatus missing item
[z2112] Improve Initialisation of COMMAND_ATTACK field

This moves the set command of COMMAND_ATTACK out of CharmInfo::InitPetAction bar, so that this function can be used more genericly for other purposes

Signed-off-by: Schmoozerd <cmangos>

(based on commit [12163] - 9b0d888)

(based on commit [s1735] - a18d019)
[z2113] Implement support to track aura targets more genericly

Replace the old SingleTarget aura tracking with a more generic concept, and use this also for CONTROL_VEHICLE auras

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12165] - 7e0fb2f)

(based on commit [s1737] - e764577)
[z2114] Add EVENT_T_TIMER to EventAI. This is a generic timer that ticks out of combat and in combat

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit bae9646)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit [s1738] - 1796f4a)
[z2115] Fix typo

(based on commit [12176] - 600cc40)

(based on commit [s1739] - 824cd59)
Update src/game/CreatureEventAI.h

(based on commit 19c4b54)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>

(based on commit 53ace2c)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2116] Improve [z2050]

Partial backport

(based on commit [12178] - 8314222)

(based on commit [s1741] - c94afc7)
[z2117] SQLStorage cleanup and rewrite. Introduce new abstract class SQLStorageBase

Based on ideas and work by Silverice.
Also note that the abstract class SQLStorageBase will hold the actual loaded data.
This is to be seen in view of comming additional changes so that it is possible to directly iterate over the data and not over indexes with additional lookups.

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12181] - 6f7791e)

(based on commit [s1743] - 601be9f)
[z2118] Implement SQLHashStorage

Thanks to Cyberium for working on this and updating to recent changes

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12182] - 045e86e)

(based on commit [s1744] - f3ef62b)
[z2119] Ignore MechanicImmuneMask(from database) for self-cast spells

(based on commit [12183] - fe331d7)

(based on commit [s1745] - c2577ea)
[z2120] Drop old condition system in core

Dropping columns from the database will follow soon (TM)

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12184] - c33dc5a)

(based on commit [s1746] - b667116)