Sight Blaster and other skill fixes, magic reflect, crash, trap display and monster behavior fixes
- Fixed cast time of Sightrasher in pre-renewal (700ms -> 500ms)
- Official Sight Blaster behavior (bugreport:6945, partially bugreport:144)
  * Sight Blaster's AoE is now 3x3 even in pre-renewal (it was originally larger so it hits traps before they trigger)
  * Sight Blaster will now prevent traps from triggering as long as they are knocked back
  * Fixed a bug that caused Sight Blaster to not work on traps and ice walls at all
  * Sight Blaster will no longer expire when the attack was reflected
  * Sight Blaster will now expire when hitting an ice wall
  * Sight Blaster will now properly protect you from being attacked from its AoE range
- Sight, Ruwach and Sight Blaster will now check for a target every 20ms (previously every 250ms)
- Step action will now be canceled when being knocked back (skills won't be executed anymore when knocked out of range)
- When knock back magic is reflected it will no longer lead to the caster being knocked back (related to bugreport:6945)
- Activated traps can no longer be hit
- Fixed a problem that left "trap ghosts" forever on the screen when a trap was knocked out of the screen
- Fixed three more potential map server crashes
- Monster behavior fixes
  * Monsters will no longer be able to do normal attacks when hiding
  * If out of any reason a monster on "attack" state can't move and can't do normal attacks, it will now use "attack" state skills
  * The order of monster thought processing is now equal to official servers
Status change and crash fixes
- Fixed a potential map server crash when attacking traps
- Fixed a problem that sometimes randomly a status change was removed on logout although it shouldn't
  * Special thanks to icxbb-xx for pointing these two issues out
- Sight Blaster will now always be removed on logout
- Implemented official formula for Gypsy's Kiss / Service For You (bugreport:9359)
Combo skill updates
- Cleaned up skill_combo so it's easier to understand and update
- Monk updates (bugreport:9364, bugreport:4534)
  * Default combo delay is now (1000 - 4*AGI - 2*DEX) milliseconds, it will be used when none is specified in the skill_cast_db.txt
  * Fixed DEX increasing combo delay rather than decreasing it
  * Fixed "Triple Attack" not giving any "can act" delay so you were able to use a skill right when it triggered
  * Fixed combo delays of all combo skills (turns out they all use the default in both pre-re and re!)
  * Fixed "Palm Strike" in renewal having cast time rather than cast delay
  * Monk Spirit now reduces the SP cost of all Monk/Champion combo skills to 2 SP
- Taekwon updates (bugreport:9364)
  * Stances will no longer give you walk delay when they trigger
  * You can still use the Kick after moving as long as it's still within the combo delay
- Hunter updates (bugreport:9082)
  * Beast Strafing is now a target skill, you can target any brute or insect monster with it regardless of your previous target
  * You no longer need to target a brute or insect monster with Double Strafe for the combo to trigger
  * If the combo triggers you no longer get walk and attack delay (that means you can still use DS continuously)
  * You can still use Beast Strafe after moving as long as it's still within the combo delay
Quick fixes
- Fire Pillar is no longer a trap and can no longer be hit or knocked back in renewal (bugreport:144)
- Fixed Super Novice Spirit not working and giving compiler warnings (bugreport:9366, bugreport:9365)
Icewall stacking update
- If you now cast Icewall on an existing ice wall cell, the duration (HP) will no longer be refreshed
- If casting Icewall doesn't change any cell, there won't be a skill animation/sound anymore (SP will still be consumed)
Improved Icewall walk block implementation
- Moved the configuration setting "icewall_walk_block" to monster.conf
- Split the configuration into mob_icewall_walk_block and boss_icewall_walk_block so it can be configured for bosses separately
- Expanded the configuration
  * If the value is set to 1, monsters on an ice wall cell will behave like trapped monsters, that means they won't be able to move at all, they will use idle skills and if they are attacked while nobody is in their attack range, they will use their rudeattacked skills; this is equal to official behavior of bosses
  * If the value is set to 2-255, it will behave as before but monsters in the AI loop now use both idle and chase skills, but will no longer use their rudeattacked skills even if attacked from range; this is equal to official behavior of normal monsters
  * Official values would be "220" for normal monsters (loop until Icewall expiration) and "1" for bosses (behave like trapped monster) on most official servers, but as some official servers have a less exploitable implementation (from looping AI only a limited amount of times up to outright blocking Icewall on all maps with bosses), we decided for less exploitable default values for now which are 75 for normal monsters (loop 15-35 seconds) and 0 for bosses (impossible to trap in Icewall)
- Cleaned up the rudeattacked code a little so it's easier to read
MaxHP, MaxSP and Autotrade fixes
- Percentual bonuses to MaxHP and MaxSP will now always be rounded down (Aegis style)
- Added a security check when calculating MaxHP and MaxSP so there can't be a number underflow (bugreport:9369)
- When an auto-vendor gets logged out because of at_timeout, his store will be deleted and no longer restored after server restart (bugreport:9370)
Misc fixes.
- Updated turn-in requirements for Tripatriate Union's Feud. (incl. bugreport:9339)
http://rathena.org/board/tracker/issue-9339-the-tripartite-unions-feud/
- Moved "Voyage log" NPC coordinates. (bugreport:9225)
http://rathena.org/board/tracker/issue-9225-turtle-island-quest-voyage-log/
- Updated "Immuned Shield" (2168) item script. (bugreport:9319)
http://rathena.org/board/tracker/issue-9319-immuned-shield-is-using-the-pre-renewal-effect/
- Added Wolfchev's Laboratory warp to custom warper.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
Follow-up to 9cf01b2.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
Knockback, stop effects and Skid Trap reworked, monster chase and direction updates, code optimizations
- Created a new function unit_blown_immune that will now serve as the central function to determine if an object can be knocked back or stopped (bugreport:7637)
  * Moved the check code from skill_blown to unit_blown_immune
  * Several stopping effects and traps will now use unit_blown_immune to check if the object can be stopped, if not, the object will always move to its target cell before stopping
  * Bosses and monsters immune to knockback will now no longer be stopped by such traps
  * Expanded the configuration skill_trap_type and moved its checks into unit_blown_immune, so it's possible to switch the "no stop" behavior off for GVG/BG and monsters individually
  * Long-term we should make all skills use this function to check for knockback immunity, it will make the checks a lot cleaner and more centralized
- Monster chase range updates (bugreport:7637)
  * Updated monster_chase_range in monster.conf from 1 to 3; I originally thought official value is 1, but doing some in-depth tests myself I realized it's 3 for the most important situations
  * When a monster cannot issue new "move" commands because it was affected by a status change, but is still moving due to knockback immunity, it will no longer unlock its target and stop
  * Fixed a bug that always caused the chase path monsters calculated to be 1 cell too short causing them to recalculate their path one cell before their goal every single time
- Fixed the direction calculation once again and optimized it at the same time (bugreport:9373)
  * Now the calculated direction is 100% official, really truly, checked it myself with every single cell and various skills
  * Added a new function map_calc_dir_xy that allows to check for a direction between two cells without the need of a block_list
  * map_calc_dir will now just use map_calc_dir_xy to avoid duplicate code
- Implemented Skid Trap properly (bugreport:9373)
  * The direction of the knockback will now be "away from position of the caster during cast" rather than "away from trap"
  * Skid Trap will now stop the target for 3 seconds; this works even in GVG/BG and on bosses, even though the actual knockback doesn't happen
default battleground icon on non-allies is now visible! (Hercules 4ad0766)
Quick fixes
- hom_setting problem 0x08 when use teleport skill (bugreport:9292)
Update new param.
- CharRename add for item Change_Name_Card (12790)
- Font
Fixed Bug.
- Issue on packetver 20131223 or newer where skill-damage with type 6 would be considered by the client as endure-type, fixing by swapping with value 8 which presents no different graphical representation than it'd otherwise. (Hercules 1c1e10a)

- Implemented official party-leader-changed-packet (Hercules 14475dc)
- Add Older Packet ShowScript & Implemented to montransform status change parameter optional
- Add support for packet ZC_SKILL_POSTDELAY_LIST. (idAthena)
Follow-up to e403ede
Autobonus in combos and monster target drop
- Fixed Autobonus not working in combos (bugreport:8300)
  * Combos will now have a "pos" variable that saves the combination of equipment slots used
  * Autobonus now works with combined positions rather than just a single position
  * Autobonus should now also work with all equipment slots instead of just the first 15
  * This does NOT fix problems with multiple auto-bonuses activating at the same time
- Monsters will now stop instantly if their target is completely non-existent
  * This is mainly for looters that had their loot taken
  * Hide and most other situations still use the configuration setting monster_chase_refresh
Fixed Bug.
- bonus2 bVariableCastrate, bonus2 bFixedCastrate not working (bugreport:9114)(Hercules c5173e0)
- Safe check type cash disappear when overweight 90%
Fixed NPC_STONESKIN, NPC_ANTIMAGIC, NPC_MAGICMIRROR and Autocast on magic hit
- Fixed NPC_STONESKIN, NPC_ANTIMAGIC, NPC_MAGICMIRROR (bugreport:6118, bugreport:9375)
  * Using the skills will now be 100% successful (can't be resisted)
  * Fixed skills not working for players (e.g. Ulfhedinn, Mithril Magic Cape, Platinum Shield)
  * Fixed level 5 and 10 not working at all
  * NPC_STONESKIN and NPC_ANTIMAGIC will no longer change DEF/MDEF, instead they will increase/reduce physical/magical damage percentually, this IS official behavior
- Fixed "Autocast on magic hit" having its chance halved (bugreport:9377)
add new scriptcommand
- dispcolor or displaymessage
displaymessage("<message>"{,<color>{,<Account ID>}})
now you can send message with color to player
Hex color see more : http://www.colorschemer.com/online.html
No cell stacking implemented (official version) (bugreport:9378)
- Split config cell_stack_limit into custom_cell_stack_limit (previous feature) and official_cell_stack_limit (see below)
- Expanded map_count_oncell by a flag parameter, currently only one flag is supported: only count standing units (needed for official cell stack feature)
- Added a new function map_closest_freecell that will return the closest free cell using the same order that official servers use
- Monsters will now actively search for a free cell when starting to walk randomly and when unlocking target
- When any unit finishes walking (regularly) and is not on a free cell, it will now actively search for a free cell
- Step actions will be delayed until a suitable cell was found, they will even be executed when the player walked slightly out of attack range