[z2480] Simple fix for Stealth is removed on fall damage problem Surely could be done better way...

Can be backported but need a little more work to make it work on TBC/Classic

(based on commit [12638] - 2f8474a)

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

(based on commit [s2121] - 676d7ec)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2481] Fix bad english.

(based on commit [12639] - 8541443)

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

(based on commit [s2122] - e13df34)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2482] Better value to check distance between owner and pet. This problem was introduced in [z2456]

Maybe i misunderstaind that commit but the pet now follow correctly its master.
Before the minimal check distance was too small so pet position was updated every update.

(based on commit [12640] - ea228ed)

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

(based on commit [s2123] - b337a28)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2483] Implement SMSG_INVALIDATE_PLAYER

Inspired by TC and R2

(based on commit [12642] - 8e92a6a)

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

(based on commit [s2124] - 2241a87)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2484] Add Visual Studio 2013 files

(based on commit [12645] - 8be3780)

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

(based on commit [s2125] - 9b2de3d)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2485] Fix creature not stopping in some conditions.

Patch imported from TC, original author @Shauren

(based on commit [12652] - 1cd6ca8)

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

(based on commit [s2126] - 0c596fd)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2486] Fix creature change z position when speed change.

No need to send explicit MSG_MOVE_SET_RUN_SPEED

(based on commit [12653] - 3486cba)

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

(based on commit [s2127] - f059aa2)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2487] Add new Regen Health / Power flags and rename database fields accordingly

(based on commit [12654] - 7bdcadb)

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

(based on commit [s2128] - acb3821)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2488] Implement generic power handling for Creatures and Pets

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

(based on commit [12655] - 9a91f3f)

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

(based on commit [s2129] - 08f914c)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2489] Initialize power type and power type values for creatures

This will assign the correct power type based on UnitClass and will also provide proper values for the scaled powers

(based on commit [12656] - 186069f)

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

(based on commit [s2130] - afc2299)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2490] Revert [z2486] and use a better fix.

More infos on https://github.com/cmangos/mangos-wotlk/commit/3486cba310f9a301e2ec8e4f9824ed84447f6b76
Sending spline speed instead of complete movement info seem enough no matter if the unit is Player or Creature.
Big thanks to @SilverIce

(based on commit [12658] - 9cc20e1)

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

(based on commit [s2131] - aae00ec)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2491] Allow sending custom eventAI events to all units in range

Thanks @ulduar and @schmoozerd for pointing the idea.

(based on commit [12659] - 4359c99)

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

(based on commit [s2132] - 1dfdda1)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2492] Implement condition CREATURE_IN_RANGE

Will return TRUE if any alive creature of given entry in the selected range is found.
This is useful for gossip or quest conditions that must avoid double spawning a certain creature

(based on commit [12660] - 401d33d)

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

(based on commit [s2133] - ea0a198)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2493] Fixed build git_id at VS2013

(based on commit [12662] - ae4babf)

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

(based on commit [s2134] - f0d0ef5)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2494] Add missing trap id for SendGameObjectCustomAnim call

Thanks to @grz3s

(based on commit [12665] - d76e940)

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

(based on commit [s2135] - f4c3d35)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2495] Add forgotten break by commit [z2173].

This will fix AoE target filling.

(based on commit [12667] - 53224ff)

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

(based on commit [s2137] - 0b7124f)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2496] Implement ACTION_T_CHANGE_MOVEMENT for EventAI

This will allow changing the creature movement based on eventAI events.

(based on commit [12671] - 54c0593)

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

(based on commit [s2139] - 8b661c3)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2497] Implement SCRIPT_COMMAND_SEND_AI_EVENT_AROUND for dbscripts engine

This allows more flexibility in interaction between eventAI and dbscripts

(based on commit [12672] - f1a0fd3)

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

(based on commit [s2140] - 5be9e75)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
Fix bug in debug SendOpcode command

Spotted by Laizerox,
explained by evilwow and tested by Neo.

Operator precedence: ! before >>

(based on commit 408f27b)

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

(based on commit 5c1e680)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
[z2498] Fix spell 9712

Fix player spell 9712 used in quests 2203 & 2501. Spell 9712 has NPC target while triggered spell 21029 has self-target (player).

Signed-off-by: Cala Haryon <calaftp@free.fr>

(based on commit [12681] - f3efdce)

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

(based on commit [s2142] - 999127e)

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