- 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)
- 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
- 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)
- 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
- 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
- Removed redundant code
- Fixed two small bugs in the distance_client calculation
- Improved the "step action" system added in the last commit
* Added a "unit_step_timer" that is now used for all step actions; now even skills will always be executed at "full cell" (if you don't lag)
* The "step action" system will no longer mess with anything and rather just call the normal attack/skill functions that are also called by the client; this removes a lot of unneeded code and also works a lot better since the existing functions have been bug-tested the most; this also fixes a problem with the "auto-follow if you can't reach target" system
- Updated monster skill use behavior so monsters use skills the same way and at the same rhythm as official servers (bugreport:009326), the changes include:
* Unified the "monster can't move by default" and the "monster trapped" code as it really should behave exactly the same
* Fixed a bug that caused the "monster skill use" routine to be called 20 times more often than it should in some situations
* When a monster attacks you and you run away from it, the monster will now check if it has a ranged skill on "attack" state before switching to chase state
* Monsters will now always do a normal attack before using "attack" state skills
* Fixed a bug that caused monsters to switch to idle mode and never use their chase skills when they get hit continuously
* Changed default for skillrange_from_weapon from 30 (all but player) to 0 (none); monsters will now use all skills at the skill range and not at their own attack range, if they get tanked from farther away than skill range, they won't use these skills
- Updated ranges to work as on official servers (bugreport:009326), the changes include:
* Implemented new functions "check_distance_client" and "distance_client", that instead of the server-sided square range system use the circular one that the client uses; these functions should be used for units that send their commands via the client (players mostly)
* Applied the new distance algorithm to some player-specific range checks, players will now have a circular attack range that reflects their attack range on the client; this makes it impossible to hack the client for more diagonal range
* Removed the arbitrary +1 range bonus at range checks; as monsters now react fluently, they won't need it anymore, that means a monster with for example 4 attack range will now only attack targets within a 9x9 area around it, the moment you step out of this area, the attacks will stop (if the monster can move it will follow you); as for players, the extra cell attack range when on a linear line to the target now is integrated into the distance algorithm, that means a player with attack range 4 can attack from 5 cells away when directly on line with a monster, but no longer diagonally as range is circular for players now
* Implemented a new "step action" feature to reflect official chase range behavior; when an attack or skill is used inside the attack range, it will act exactly as now, the skill is used once the signal from the client was received; however, if an attack or skill is used outside the attack range, the player should move into the chase area which is 1 cell inside the attack range border; the client actually sends us where to use the attack / skill from, but previously we just dropped that information the moment an attack request came; now instead of stopping the player instantly on an attack request, the player will continue moving to the target cell and then automatically use the command received earlier (it will be remembered); this change was absolutely necessary as the client sends the attack request slightly before attack range is reached, execution on official servers only takes place on every full cell moved; the new system copies this behavior
- Implemented an improved hit-lock system (bugreport:007460), the changes include:
* MVPs are no longer immune to being stopped by a hit unless they used Endure
* When hitting any unit, it will stop for its "dMotion" interval, exactly at the end of "dMotion" it will continue walking (official behavior); this helps getting more "move" packets to be displayed
* The unit that was hit will be immune to being stopped for another "dMotion" interval, this allows to slow down any units by hitting them frequently, but makes it almost impossible to completely stop them forever (depends a lot of ASPD and dMotion value); this does not affect special hit-lock properties (some skills and events should set delay anyway)
* The unit that was hit will no longer be "pulled" to the next cell; this caused a lot of position lag, it should be much better now
- Fixed Sightrasher missing its variable cast time in Renewal
- This should solve most of the position lag problems, especially ones that caused monsters to suddenly appear next to you (happened especially often when using icewall)
- Added a new heap implementation to db.h (POP2, PUSH2, SIFTUP, SIFTDOWN, UPDATE) that simulates the heap that the client uses, there was no other way to reproduce 100% exact behavior
- I recommend using the old heap implementation for everything else
- Updated path.c to use the new heap macros and also fixed the order in which the different possible directions are pushed into heap
- Special thanks to rversteegen for helping me with various tests and the heap implementation
- Special thanks to ultramage for providing info that helped us narrowing down the possible variables
* Added and cleaned up comments.
* Added checks to prevent map server crashes.
* Cleaned up some reports from CPPCheck.
* Other various stylization cleanups.
* Wizard/Warlock Skill
* Moved Sightrasher (WZ_SIGHTRASHER) requirement to check Sight (SC_SIGHT) is active or not to skill_check_condition_castend section.
* Fixed Sightrasher (WZ_SIGHTRASHER) splash area to 3x3. (bugreport:9298)
* Now Comet (WL_COMET) cannot hits Hiding target (The mistake is not at flag 0x10000 in skill_db.txt, the flash should be added by SD_ANIMATION). (bugreport:8909).
* Now Reading Spell Book (WL_READING_SB) checking the number of available spell books in Spell Book DB first to prevent infinite loop.
* Sage Skill
* Now Abracadabra (SA_ABRACADABRA) checking the number of available skills in Abra DB first to prevent infinite loop.
* Reduced MAX_SKILL_ABRA_DB from 350 to 160.
* Shadow Chaser Skill
* Fixed Chaos Panic (SC_CHAOSPANIC) effect. (bugreport:9321).
* Genetic Skill
* Now Wall of Thorn (GN_WALLOFTHORN) can be knocked back but not a whole skill group and durability (HP & max hit) for each skill unit.
* Guillotine Cross Skill
* Now Magic Mushroom (SC_MAGICMUSHROOM) effect checks the number of available skills in Magic Mushroom DB first to prevent infinite loop.
* Changed 'RemoveFlag' in db/magicmushroom_db.txt value to 1 to remove skill by importing. (bugreport:9322).
* Wanderer/Minstrel Skill
* Now Randomize Spell (WM_RANDOMIZESPELL) checks the number of available skills in Improvise DB first to prevent infinite loop.
* Reduced MAX_SKILL_IMPROVISE_DB from 50 to 30.
* Rebellion Skill
* Cleaned up, added, corrected some (missing) sequences & DB values.
* Fixed Hammer of God (RL_HAMMER_OF_GOD) splash damage.
* Fixed Shaterred Strom (RL_S_STORM) push back & force to sit effect (for player, or stun for monsters) (first implementation leftover).
* Fixed Slug Shot (RL_SLUGSHOT) hitrate-distance penalty (first implementation leftover).
* Fixed Howling Mine (RL_H_MINE) damage ratios (first implementation leftover).
* Now Bind Trap (RL_B_TRAP) only can be placed 1 at same time.
* Fixed Bind Trap (RL_B_TRAP) damage calculation by using Caster's DEX, Target's Current HP, & Skill Level. FIXME: Exact formula still unknown (refers to idAthena formula).
* Now Dragon Tail (RL_D_TAIL) doesn't split damage among targets anymore.
* Now Crimson Marker (RL_C_MARKER) will fails to cast if no slot available.
* Implemented official packet `ZC_C_MARKERINFO` of Crimson Marker (RL_C_MARKER) mini-map marker (first implementation leftover). !TODO: Confirm the packet for older or newer clients (idAthena partial merge r1497)
* References: http://forums.irowiki.org/showpost.php?p=1387992&postcount=968, follow up 507f047, dd67f9d
Misc:
* Fixed some skills that should work only in shoot range (map_foreachinshootange, by default), and added check for respecting *skill_wall_check* (map_foreachinrange).
* Fixed item stackable check for `/item` command, follow up 9b4d922.
* Fixed npc source file isn't removed properly by @unloadnpcfile. (bugreport:9311).
* Added constantan for status_change_start() and sc_start() scripts as well
* SCSTART_NONE = 0x0
* SCSTART_NOAVOID = 0x1
* SCSTART_NOTICKDEF = 0x2
* SCSTART_LOADED = 0x4
* SCSTART_NORATEDEF = 0x8
* SCSTART_NOICON = 0x10
* Moved and changed itemdb_unique_id() to pc_generate_unique_id().
* Seperated check for skill SC requirement to skill_check_condition_sc_required().
* Added skill unit flag `UF_KNOCKBACK_GROUP`, just an option to make skill unit can be knocked back a whole group.
* Typos and other minor changes!
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Wrong calls, should be callfunc. Thank @raynra
* Follow up 8256194, updated const.txt following new MAPID values for Super Novices
* EAJL_SUPER_NOVICE 0x8000, for Super Novice masking
* EAJ_SUPER_NOVICE 0x8100
* EAJ_SUPER_BABY 0xA100
* EAJ_SUPER_NOVICE_E 0xC100
* EAJ_SUPER_BABY_E 0xE100
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
(https://github.com/HerculesWS/Hercules/commit/78028c8)
* This fixes a problem where units sometimes walk diagonally through a wall server-sided; there should be less client desync now (but it might not be perfect yet)
* I kept the rAthena specific option path_blown_halt
* Special thanks to piotrhalaczkiewicz for the original implementation and aleos for helping me with the merge
* Updated Napalm Vulcan damage to official. (bugreport:9297)
* Firing Trap should be removed immediately once it has detonated.
* Updated Expanded Super Novice ASPD values for weapons to match normal Super Novices.
* Updated Expanded Super Novice and Super Baby to be able to do anything normal Super Novices can do. Guardian Angel, Dori Dori, etc.
* Super Novices are able to equip any level 4 weapons of type Daggers, 1H Swords, 1H Axes, 1H Maces, and 1H/2H Staves while Soul Linked. (bugreport:2765, bugreport:5568)
* Reverted the Warlock elemental summons to not be limited per level from 237579c. All levels allow up to 5 summons.
* Monsters will now attack immediately when they are chasing a target and it comes into attack range (bugreport:7370)
* Monsters will now chase their target during their aDelay, but they still have to wait for aMotion to be able to move again (bugreport:9269)
* Monsters will now rethink their chase in a configurable interval (see monster_chase_refresh in monster.conf), official value is once per cell, previously it was once per 3 cells
* Monsters will now stop when they rethink their chase and their target is gone (player hides or target loot was picked), regardless of the monster_ai setting (note: if you want the old, stupid behavior, just increase monster_chase_refresh instead)
* Switching arrows no longer stops attacks. (bugreport:9270)
* Looter monsters will now randomly pick items rather than going for the closest one. (bugreport:9268)
* Follow up to 0fed97c. Moved pc_setsit before skill_sit to not break skills that count players who are sitting. (bugreport:8966)
* Follow up to 2d2991a. Cleaned up some compile warnings.
* Updated the inf3 descriptions in the skill_db.
* Follow up 2d2991a, remove trailing spaces in inter_athena.conf
* Added `bound` field on `picklog` table (bugreport:9240) Thank @icxbb-xx (Napster)
* Fixed Randomize Spell infinite loop. Failure of skill improvise db reading. (bugreport:9288)
* Added **max_extended_aspd** for caping max ASPD for KO/Rebellion, default is 193. Pointed by @raynra & Ziu
* Mail attachment
* Added `bound` field on `mail` table, since group with PC_PERM_TRADE_BOUNDED can put bound item into attachment
* Fixed wrong data type causing wrong zeny amount (bugreport:9291)
* Fixed item color issue for bound item (bugreport:9238)
* Stackable item shouldn't be displayed as yellow color
* Equip doesn't shown as yellow after relog or item is moved
* Silence status immunity for Renewal (bugreport:9227)
* Bleeding (SC_BLEEDING): Vit -> Agi
* Silence (SC_SILENCE): Vit -> Int
* Sleep (SC_SLEEP): Int -> Agi
* Thank @Playtester, @Lilith-, partial merge of Hercules:6f26451
* Fixed status check when cast a skill to hidden target
* Stone Curse shouldn't be casted to hidden enemy when the caster has intravision (bugreport:9266)
* Added **INF3_HIT_HIDING** for skills that *maybe* have effect to/can hit the hidden target. Previously, every Earth Element skills *always* had it, doesn't matter ground skill or single-target skill
* **!TODO: Confirm other skills that have ability for this!**
* **!FIXME: For now, I rely as the previous check did, I put some Earth Element skills (and) with area/ground effect**
* Correcting Devotion behavior (Hercules:e7be725, 41f28c0)
* Failing to cast Devotion to the 6th player
* Only player who devotes other that 'shout' Auto Guard when it active also with the walk delay
* Status icon that inherited from devoter won't be displayed at devoted player
* Reflect Damage on devoted player won't reflect normal attack, only melee skill attack
* Added config **devotion_rdamage_skill_only** for backward compability, ignore the behavior above
**IMPORTANT**
* Please import sql-files/upgrades/upgrade_20140915_log.sql
* Please import sql-files/upgrades/upgrade_20140915.sql
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
- Removed any remaining TXT and SQL references from files.
- The 'make sql' command is now replaced by 'make server'.
- Removed account.engine feature as it is no longer needed.
- Moved login and IP ban configs to inter_athena.conf.
- Cleaned up cmake files.
- Miscellaneous clean ups.
- Optimized SQL structure to better fit uint32 value for uniqueitem_counter. (bugreport:9249)
- Added font and uniqueitem_counter to load when loading character menu on char-server.
- Added 'ID' as identifier/index for produce_db and skill_changematerial_db to avoid 'rewriting' product result with different materials. As we can see there 'Starsand_Of_Witch' can be produced by (1) 10 Insect Feeler + 15 Blue Porcelain or (2) 100 Moth Dust + 100 Scell.
- Map-server crashed issue while @reloadskilldb. Some counters aren't zeroed on skill_readdb() makes array overflow. (bugreport:9241, bugreport:9243)
- Allowing import file to remove original entry by put certain value. See the changed db files for more details.
- Relying to skill_spellbook_db for listing available book as spell book. For Warlock skill Reading Spellbook (WL_READING_SB).
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
- System is now enabled by default.
- All non-stackable items that previously existed will get unique IDs if items::item_check is enabled.
- Added 'getequipuniqueid' script command to get the unique ID of an equipment on a player.
- Don't forget to apply the SQL update!
* Renamed SQL update file that applied to logs.
- Fixed map-server crashed caused by Wall of Thorn when atatcked by Fire element (with wide range skill unit, bugreport9102). Also reverted some changes in c046668
- Added config conf/battle/skill.conf 'arrow_shower_knockback', as follow up 453b6d0. Direction of Arrow Shower knockback depends on Arrow Shower location
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
- Changed enum for NPC subtype, added prefix NPCTYPE_. See map.h::npc_subtype.
- Changed Channel_Config struct usage to -> extern struct Channel_Config channel_config.
- Added restriction for atcommand that cannot be executed when Player is in autotrade, to prevent map crash. (bugreport:9196) TODO: Check other atcommand or change this behavior.
- Added enum for atcommand restriction with prefix ATCMD_NO. See atcommand.c::e_atcmd_restict.
- Updated atcommand documentations.
- Changed dummy_sd's attributes to group_id & group_level 99, and gives all permissions (PC_PERM_ALLPERMISSION). dummy_sd is being used by 'atcommand' or 'useatcmd' script when no rid/player attached.
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Fixed mouse cursor displaying incorrectly for PvP scenarios. Thanks to Napster. (bugreport:8605)
* Fixed summons getting stuck when master gets too far off screen or changes maps. (bugreport:9152)
* Added a battle_config 'spawn_direction' for keeping a character's face direction when teleporting/changing maps/logging in. Default is always North (official). (bugreport:8754)
* Cast sensor mobs should always target the caster whenever any skill is used. (bugreport:8555)
* Added a packet version check to char_del_option based on client date. (bugreport:8521)
* Script command query_sql will now return -1 on an empty result or failed result. (bugreport:5937)
* Fixed Shield Spell not being able to be casted. Can now be casted even with skill_unconditional permission while wearing no shield. (bugreport:9198)
* Fixed divest chance of Earth Strain to official. (bugreport:8999)
* Cleaned up ATK and WATK calculation for some skills to only work in pre-renewal.
* Fixed Magnum Break not giving 20% Fire property damage. (bugreport:9199)
-- Base Level 150 ~ 175 for 3rd classes & Expanded classes (256 ~ 1000 use custom gap 10m)
-- Job Level 50 ~ 60 for 3rd classes (61 ~ 255 use custom gap 5m)
Reference: http://www.divine-pride.net/database/experience
* Follow up fea3489
- Got extra ';' there fea348968c (commitcomment-7332456)
- Reduce w1's length
* Added some newline at end of file
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
- Added base level modifier for Great Echo. (bugreport:9179).
- Fixed Max HP/SP rate reduction, should be limited to -100% if the value less than it. (bugreport:9195).
- Fixed Knuckle Arrow (SR_KNUCKLEARROW, Sura) knockback damage bonus behavior. (bugreport:9096).
- Fixed Knuckle Arrow (SR_KNUCKLEARROW, Sura) knockback direction by saving last direction before attacker slides to target first.
- Fixed Overbrand (LG_OVERBRAND_BRANDISH, Royal Guard) knockback damage bonus behavior. (bugreport:9096).
- Fixed knockback direction for Arrow Shower (AC_SHOWER, Archer), now using target to attacker direction. (bugreport:1709).
* Misc:
- Added new flags for Skill Unit to remove hardcoded checks:
--- UF_NOKNOCKBACK: Cannot be knocked back (only unit that can be damaged).
--- UF_REM_CRAZYWEED: Removed if be overlapped by GN_CRAZYWEED.
--- UF_REM_FIRERAIN: Removed if be overlapped by RL_FIRE_RAIN.
- Implemented knockback damage bonus for Round Trip (RL_R_TRIP, Rebellion).
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>