[s2094] Improve handling of TargetMMGen

This will have impact on Chase and Follow Movement.

* Refactor code to check if a new position is required for the MMGen into the new function RequiresNewPosition
* Refactor code to get the current targeted distance into function GetDynamicTargetDistance
* Change ChaseMMGen (angle = 0.0f case) chase to best contact point, not zero angle.

Thanks to Cala and X-Savior for testing. Special thanks to cala for also suggesting improved values for the magic numbers

(based on commit [12565] - 897ed82)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2095] Correct some BG chat message missing target name. Thank to @CamilleMoon for pointing.

(based on commit [12601] - 8ce25e0)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2096] Set max gossip menu items to 32

Client does not show more than that.

Signed-off-by: stfx <stfx@hotmail.de>

(based on commit [12602] - 5e15f3b)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2097] Implement dummy effect for spell 41283

(based on commit [12603] - c4d644c)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2098] Fix debug parameters added in [s2083]

Thanks to @ottowayne for pointing out

(based on commit [12605] - 346d928)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2099] Update all stats after creature respawn. That fix the stats were not correct when creature could have more than one level.

(based on commit [12609] - 1c83096)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2100] Remove unused argument in CalculateMeleeDamage

(based on commit [12610] - 078f88d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2101] This is used to prevent creatures from pulling too many nearby monsters, for example during certain scripted events.

A good example is Mr. Smite in the Deadmines. There are two guards at the
bottom of his bridge which trigger aggro for him, but if he is missing
this flag he will also pull nearby mobs on the ship, which is not expected
behavior.

(based on commit [12612] - cc137f6)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2102] Add ACTION_T_SET_STAND_STATE for EventAI

This will allow changing the stand state of the current creature

(based on commit [12613] - bbb6f0e)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2103] Reserve more DB_SCRIPT_STRING_ID. It seem that could be usefull.

(based on commit [12614] - 43f0d77)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2104] Reorganize code to allow rage rewarded for critter type.

(based on commit [12616] - fb81def)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2105] Fix creature loose target while rooted.

(based on commit [12617] - 34d4083)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2106] Remove unused constructor overloads

(based on commit [12618] - 0ec52a4)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2107] Fix conflicting typedef error in ACE Prevent assert on platforms where we cannot change thread priority

(based on commit [12619] - 93de196)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2108] Fix creature flee dont loose target. Also Feared creature will loose correctly target then target will be restored.

(based on commit [12620] - b3877ed)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2109] Hotfix broken ACE configure script of [s2107]

Note: This will reintroduce problems for MacOS. So a proper patch is still pending.

(based on commit [12625] - 218db48)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2110] Improve "NPCs gets stuck in melee animation while casting".

(based on commit [12626] - ff4734d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2111] Improve  random movement by permit randomly no wait time to next waypoint

Thank to @dev-intra for this proposal.
Thank to @Schmoozerd for his improvement.
Slightly modified version of https://github.com/mangoszero/server/commit/0feaee0d5a34489a756a46d24d318bf885b23318

(based on commit [12627] - 3afdf8f)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2112] Fix PostgreSQL bindings and add support to build directly with PostgreSQL instead of MySQL.

(based on commit [12628] - 5eeeba7)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2113] Don't do periodic heal ticks if the target is already at max health.

If a target is at maximum health already periodic healing spells should
not tick.

From the healer's point of view this means far less overhealing, improving their healing performance information.

(based on commit [12629] - ef356e1)

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