More code optimizations
- Added a new function unit_stop_stepaction which completely cleans up a planned action
- The new function will now be called when a new action request is received and when changing the map
- Removed setting of "chaserange" as part of the step action system as it's no longer used
- Changed check_distance functions to return "bool" rather than "int"
- Special thanks to Cydh for pointing out possible optimizations
Random walking, monster target dropping
- Implemented official behavior for random walking of monsters (bugreport:9340)
  * Updated the interval between walks from 3-6 seconds to 4-5 seconds
  * Added a define MIN_RANDOMWALKTIME that is now used anywhere the interval is applied so it's easier to change
  * Monsters will no longer attempt to walk to the cell they are currently standing on (note: still requires a proper "no cell stacking" implementation)
  * Monsters will only target a cell within a 15x15 area around them
- Moved the "mob_ai" 0x008 configuration setting to mob_unlocktarget, so it applies to all cases of monsters unlocking targets
- Cleaned up the unit_stop_attack and unit_stop_stepaction functions
  * unit_stop_attack now makes sure that the target is always set to 0, even if no attack timer currently exists
  * replaced several calls of unit_set_target that set target to 0 with unit_stop_attack, this is important because the attack timer should always be deleted at the same time the target is set to 0
  * this also fixes the problem that caused monsters to sometimes drop their target after an attack
Minor monster walk and skill use fixes
- Fixed a bug that caused monsters to never use their idle skills even if the define MOB_LAZYSKILLPERC was set
* The default value of the define is now 100% for spotted mobs and 0% for non-spotted mobs as on official servers
* On officials, spotted monsters also use skills when nobody is on the map (healing up, metamorphing), but I decided to not implement this out of performance reasons for now; needs to be discussed as this would prevent the exploit of players leaving the map to heal up SP and then coming back to kill an MVP
- Monsters now use complex path searching for their random walk, so they can also walk around corners now (OFFICIAL_WALKPATH still applies!)
- Fixed spotted monsters using their "walk" skills even if nobody is on the map
- Monsters will no longer stop when using "walk" skills (they are supposed to be used while walking)
Monster idle skills, chase, final cleanups
- Spotted monsters will now use their idle skills even if no players are on the map
* This is official behavior and allows them to metamorph and heal up even if nobody is on the map
* I originally had concerns about the performance, but as the dynamic mobs option is enabled by default and set to 5 minutes, monsters will only stay "spotted" for 5 minutes when nobody is on the map anyway, this doesn't cost much extra performance
- Increased chase range of monsters by 2
* Tested this thoroughly and the effective chase range is actually 2 cells larger than listed in the "Range3" column
* Special thanks to ultramage and Michieru for helping me testing this
- Some final cleanups in the unit_stop_attack and unit_stop_stepaction functions
* Special thanks to icxbb-xx for pointing these out
MVP item drop mode setting added
- Added a new configuration setting "item_drop_mvp_mode"
* By default "item_drop_mvp_mode" is set to official order (0) which is always starting at first, then going to the second if the first didn't drop and only checking the third if the second didn't drop either
* @mobinfo will now properly consider this and display the effective chance, so if the MVP has 3 MVP item drops at 50%, the first item will display the chance 50%, the second 25% and the third 12.5%, this should help a lot against drop rate confusion (e.g. players wondering why always only the first item drops when all three are displayed at 100%); this only applies to official order (0)
* When "item_drop_mvp_mode" is set to random order (1), MVP item drops are checked in random order, but if one MVP item drops, the process will be canceled, so you will never get more than one MVP item no matter how high the drop rate is
* When "item_drop_mvp_mode" is set to all items (2), all MVP item drops are checked and have a chance to drop, regardless of other MVP items already being dropped or not (i.e. there is a chance that the player gets all 3 MVP items)
Merge remote-tracking branch 'upstream/master'