[s1998]  Add some safety to rare case of target-selection for unreachable target

Thanks to Atari for reporting and researching this problem

(based on commit [12478] - ae2a837)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s1999]  Enable using table creature_linking with empty table creature_linking_template

Note: Guids are evil!
Close cmangos/issues#148

(based on commit [12479] - 4e65ae9)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2000] Fix a bug with vmap extraction

This bug appears to have no real impact in wotlk

(based on commit [12481] - c444465)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2001] Fix a stupid mistake from me introduced in [s1990]

Thanks to boxa for pointing

(based on commit [12484] - bffff06)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2002] Improve WaypointMMGen

* Add correct Reset position (Npc will evade now to the last reached waypoint, and not to the next waypoint)
* Add proper return value for the CONDITION_LAST_WAYPOINT

* Let WaypointMMGen behave better after evading (keep PAUSED state, keep waittimer

(based on commit [12485] - 3d41af5)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2003] Change Debug Output to EventAIError output if no target is found

(based on commit c698466)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2004] Stop movement of dead npcs

Close cmangos/issues#213
Also thanks to pyromaniac for posting this bug on the forums (and a few users for confirming)

(based on commit [12489] - 204838e)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2005] Keep CombatMovement, Running and Waypoint-Paused states after evade

(based on commit [12490] - 40d014a)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2006] Add additional miscValue to AIEvent throwing

(based on commit [12491] - dfb0b55)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2007] Rearrange code for Aura::HandleAuraModIncreaseHealth

* Also fix some behaviour with SetHealth/SetPower if set to max health/power

(based on commit [12492] - dd0633c)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2008] Fix onefalse positive startup errors

* Fix startup-error related to quest 10162

(based on commit [12493] - be0e810)

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2009] Fix spell 14185 for TBC

Close cmangos/issues#208

Originally mask changed in wotlk 2a8d947 - [7078] with the client switch to wotlk

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2010] Fix proc flag for spell 31233

Close cmangos/issues#188
[ci skip]

Signed-off-by: Schmoozerd <schmoozerd@cmangos.net>
[s2011] Implement some spells for Ahune encounter

Spell entries: 46371, 46372 and 46430

(based on commit [12495] - ab40202)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2012] Add some doxygen documentation

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

(based on commit [12496] - 300f9d7)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2013] Convert some files to markdown

[ci skip]

(based on commit [12497] - f6e6e9d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2014] Fix a typo for spell 37096

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

(based on commit [12498] - b3fe1c1)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2015] Add some safety to some preprocessor defines

(based on commit [12499] - b16927a)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2016] Remove a few empty lines

(based on commit [12500] - c980fab)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[s2017] DBScripts Engine: Support buddy search by guid

* Add new `data_flags` flag SCRIPT_FLAG_BUDDY_BY_GUID (0x10)
If this flag is set, the content of `search_distance` is interpreted as db-guid of the requested buddy

* Also switch most error log output to DB-error log output (though this will include false positives)

(based on commit [12501] - f2ee8c0)

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