summaryrefslogtreecommitdiff
path: root/src/map
AgeCommit message (Collapse)AuthorFilesLines
2014-10-16Fix warning when compile in linuxMichieru1-2/+2
2014-10-15Fix Hovering Booster should be equip to cast HoveringMichieru1-0/+8
2014-10-15Fixes some typo on replacestr.dastgir1-1/+1
(Bug:8396)
2014-10-13* Monster skill use behavior, ranges, position lag fixesMichieru10-90/+319
- 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 * 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 - 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 Super ultra mega thanks to Playtester (rAthena 2c86ee435670168,ebd3dc97bc7e,f3916c1baf1,b1330a4c6,c2377c8f54,464dd4586380)
2014-10-10Fix Kyougaku make client crash and update the formula to official (bug:7975)Michieru3-31/+26
2014-10-08HPM Hooks UpdateHercules.ws1-9/+9
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2014-10-08Update Hovering to it's official formula. (bug:8384)Michieru3-10/+19
2014-10-05Follow up a46b190764df4cce0b378bc691218ac0814a5673shennetsind7-23/+16
Dropped id2storage entirely, replaced with idb_get (1) it was redundant 2) the rename on a46b190764df4cce0b378bc691218ac0814a5673 was a very poor choice as plugins using the previous version would be calling the other). Signed-off-by: shennetsind <ind@henn.et>
2014-10-05Follow up b9b32ac7609eshennetsind7-16/+16
Fixes issue where kicking a online guild member (on a server with GP_BOUND_ITEMS defined) would render the guilds storage (if not previously loaded during the servers lifespan (since boot)) to be wiped. Special Thanks to Xgear! Signed-off-by: shennetsind <ind@henn.et>
2014-10-04Fix skill Weapon Crush (bug:6985)Michieru2-2/+13
2014-10-04Pathfinding now works exactly as on the clientMichieru1-23/+20
- 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 Mega thanks to Playtester (rathena:c009b3f4a)
2014-10-02* Rewrote the hard monster AI. Monsters will now behave a lot closer to ↵Michieru3-30/+38
official servers: * 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) Thanks to Playtester (rathena: cfef8a0088c3)
2014-10-02Recode crazy weed to work as official (bug:8052)Michieru1-32/+10
Thanks to idAthena
2014-10-02HPM Hooks UpdateHercules.ws1-1/+1
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
2014-10-02Hesperuslit could be cast when you are in Inspiration state and no more ↵Michieru1-7/+4
working when RG is alone. (idAthena rev1532)
2014-09-29Emperium can not be move by vacuum (bug:8372)Michieru2-4/+7
On renewal only double attack work on emperium
2014-09-26Merge branch 'master' of https://github.com/HerculesWS/HerculesAnnieRuru1-1/+2
2014-09-26Fix bug 8271AnnieRuru1-4/+19
http://hercules.ws/board/tracker/issue-8271-map-zone-db-disabled-items/ me careless, didn't know that when the item are disabled, OnUnequip shouldn't trigger it was my pull request so me go fix it thx to kyeme for the report
2014-09-23Fixes card increment damage on Renewal. Bug 8364csnv1-1/+2
http://hercules.ws/board/tracker/issue-8364-about-damage-on-race-card/
2014-09-23Fixed bug 8365AnnieRuru1-2/+0
*unittalk script command will send the message twice to the invoking character hercules.ws/board/tracker/issue-8365-bug-unittalk-twice-message/
2014-09-21Using Hovering should off-set the effect of Magnetic Field (bug:8022)Michieru1-1/+1
2014-09-21Fix Switching arrows no longer stops attacks. (rathena: a080117a74bd)Michieru1-1/+0
2014-09-21Fixed Bug 8293shennetsind4-6/+26
Implemented official party-leader-changed-packet Special Thanks to kyeme! http://hercules.ws/board/tracker/issue-8293-change-party-leader/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-21Fixed Bug 8294shennetsind1-2/+2
Asura can now issue damage regardless of distance (including map-transfer) Special Thanks to kyeme! <3 videos http://hercules.ws/board/tracker/issue-8294-no-damage-when-warped-out/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-21Fixed Bug 8344shennetsind1-3/+3
socket.c will no longer drop connections based on wdata size vs WFIFO_MAX. Fixed issue in cooldown logic which'd cause invalid timers and provide characters with ever-lasting cooldowns Special Thanks to Haruna! http://hercules.ws/board/tracker/issue-8344-some-error-message-on-map-server/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed bug 8186 (@who3)shennetsind1-1/+1
Issue where certain name patterns could cause the game client to crash, solved by changing the packet. Special Thanks to kyeme! http://hercules.ws/board/tracker/issue-8186-client-crashes-in-disguise-and-who/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8186shennetsind1-10/+5
Fixed issue with @disguise characters crashing their party mates when they open the party window. Related 4147d9f7966e7ebd94811248527cc45af1e54941 http://hercules.ws/board/tracker/issue-8186-client-crashes-in-disguise-and-who/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8151shennetsind1-3/+1
map server will no longer complain when it receives mail data for a character that is no longer online (its a pretty silly thing, consider you login, it requests mail data, you logout while it still hasn't arrived -> it annoys you with a warning when it arrives) Special Thanks to Frost! http://hercules.ws/board/tracker/issue-8151-at-first-time-show-error-in-console/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 7932shennetsind1-0/+15
It is no longer possible to cast skills on the dead (unless they're predetermined, e.g. resurrection) Special Thanks to kyeme! http://hercules.ws/board/tracker/issue-7932-casting-on-dead-player/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8138shennetsind4-3/+4
@at persistency no longer sends characters to save point when starting autotrade on a nosave location. http://hercules.ws/board/tracker/issue-8138-autotrade-teleports-char-to-the-savepoint/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed @at with buyingstore issueshennetsind1-8/+4
Where it'd not leave channels upon starting autotrade (for buying stores only), no report to link -- noticed while working on a different report. Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8318shennetsind1-2/+1
Fixed @at crash as described in 8318. Related to 4147d9f7966e Special Thanks to Haruna! <3 http://hercules.ws/board/tracker/issue-8318-something-crash-with-autotrade/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 7894shennetsind1-2/+2
default battleground icon on non-allies is now visible! Special Thanks to kyeme. http://hercules.ws/board/tracker/issue-7894-battlegrounds-emblem-and-guardian/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8272shennetsind1-1/+1
Fixed issue where 'pvp off' mapflag would assign the map the pk zone (this would not affect the pvp status of the map, only the disabled_ settings). Special Thanks to kyeme http://hercules.ws/board/tracker/issue-8272-map-zone-db-mapflags/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8301shennetsind2-4/+10
reloadscript now clears npc-spawned (by warpportal script command) warps properly. Special Thanks to Emistry, Cydh http://hercules.ws/board/tracker/issue-8301-warpportal-reloadscript-map-server-error/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8260shennetsind2-2/+9
Fixed issue with map zone inheritance failing to inherit subtype, and fixed MOB_BOSS subtype criteria in order to separate from non-MOB_BOSS. Special Thanks to Angelmelody, Michieru. http://hercules.ws/board/tracker/issue-8260-the-uint-type-of-map-zone-system-was-not-working-properly/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8325shennetsind1-2/+2
Code did not expect sd->equip_index to be empty ( -1 ), which'd cause a crash as reported. Special Thanks to Gerz! http://hercules.ws/board/tracker/issue-8325-another-map-server-crash-on-skill-shield-spell/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed Bug 8263shennetsind1-2/+6
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. Special Thanks to kyeme, Rytech, Valo. http://hercules.ws/board/tracker/issue-8263-dec-23-2013-client/ Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Replaced hardcoded values with constants for status_change_start's flagHaru8-96/+119
- Please use the values from enum scstart_flag when calling status_change_start or related functions. - This also applies to the sc_start script commands. Signed-off-by: Haru <haru@dotalux.com>
2014-09-20Land Protector should have an animation even if you don't have gemstones ↵Michieru1-2/+4
(bug:8351)
2014-09-20Fix attack in pre-re (bug:8353)Michieru1-7/+2
2014-09-19Fix some skills reduction. Follow update (bug:8329) ↵Michieru1-6/+0
https://github.com/HerculesWS/Hercules/commit/9a15ccdbfb2c48d6eb73999ad2a61701d7abd6f4
2014-09-19Fix compile error in pre-re follow: ↵Michieru1-1/+1
https://github.com/HerculesWS/Hercules/commit/acc4d2eb875ddf67898ae0ac443e76de2d640daa
2014-09-19Update official Homunculus renewal stats (bug:6970) ↵Michieru6-29/+73
http://hercules.ws/board/tracker/issue-6970-homunculus-renewal-stats/ Follow up (bug 8348): https://github.com/HerculesWS/Hercules/commit/ddc52570a9bf694cdba6445bc02350a94856a583 Update official overbrand damage (special thanks to Rytech) The skill damage is no longer affected by your base level. It is now affected by the enemy's base level (special thanks to Rytech) Updated the list of skills usable while mounted on a mado. (special thanks to Rytech)
2014-09-19Fixes damage missing. Snap dodging bug.csnv2-7/+14
- Fixes damage miss on out of range Devotion. Follow-up: 964b47351ef2156423f6e0a68bfd3361283936c1 - Fixes snap dodge bug. Added setting snap_dodge to return to old behavior. Bug report: http://hercules.ws/board/tracker/issue-3510-snap-dodge-bug/
2014-09-18Follow-up: 9a15ccdbfb2c48d6eb73999ad2a61701d7abd6f4csnv1-2/+1
2014-09-18Fixed weapon skills reduction card damage (bug:8329)Michieru1-1/+1
Mega thanks to csnv
2014-09-17Devotion statuses fixed. Cleaned some warnings. Unit range shortened!csnv3-27/+40
- Now SC_AUTOGUARD and SC_REFLECTSHIELD won't have effect if the devotion range is too big. Bug report http://hercules.ws/board/tracker/issue-8345-about-devotion-status-tra/ - Cleaned some warnings - Due to the exploit of some client edits and with the feedback of some users, I can say it's safe to change back the range extra cell to 1. Thanks Juvia, KeyWorld.
2014-09-16Follow: ↵Michieru7-32/+32
https://github.com/HerculesWS/Hercules/commit/8ab61745b81d1cf0602c7998f590aac8749187da This fixed all mob size problem :) Fix estin estun not working properly (bug:7891)
2014-09-16Follow rev: ↵Michieru2-10/+10
https://github.com/HerculesWS/Hercules/commit/0a24a4bb6340459a6128c39d13ab1bf37a5bc6b8 Fix bug: 7891: http://hercules.ws/board/tracker/issue-7891-estin-estun-breakfall-and-kick-stance/