summaryrefslogtreecommitdiff
path: root/src/map/battle.c
AgeCommit message (Collapse)AuthorFilesLines
2013-11-17Added emblem blank pixels checkHaru1-0/+1
- Made possible thanks to (and using base code by) Ai4rei - eAthena r15263 and add-on patch http://hercules.ws/board/topic/2974-add-on-patch-for-ea-r15263-commit/ - Modified to allow checking for a percentage of transparent pixels rather than full image transparency. - Tweaked to accept some other bmp formats that are currently allowed by the client. - The performance hit from enabling this check is negligible (benchmarks show that scanning an emblem requires about half the time required to decompress it after it's received), but it does exist, as noted in the configuration file. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-11-16Renewal elemental attr fixshennetsind1-2/+5
I'm committing on malufett's behalf. Signed-off-by: shennetsind <ind@henn.et>
2013-11-06Merge pull request #217 from HerculesWS/script-checkershennetsind1-1/+4
Introducing the Hercules Standalone Script Syntax Checker
2013-11-06Modified status_calc_shennetsind1-2/+2
Replaces the previous 'first' flag with a multi-option flag capable of selectively determining calls where the recalculation must not be hold by delayed damage, and therefore must take place immediately. This fixes issues caused by actions that require immediate recalculation e.g. on-level-up max_hp update, also modified @baselevel where status_calc was being called after the heal and not before, causing it not to be fully healed. Special Thanks to Haruna! <3 Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-1/+4
- Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another.
2013-10-26Changed 'tick' variables to 64 bitHaru1-9/+9
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-10-24Added idletime optionsshennetsind1-0/+1
There have been requests for the extension of the feature, I was reluctant given more options would cause features relying on the feature to be easier to counter (less accurate), with the modification of the feature to employ options the feature is now configurable at the server owners discretion. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-10-19Fixed Bug#7737malufett1-22/+7
-http://hercules.ws/board/tracker/issue-7737-shadow-form-and-interaction-with-multi-hit-skills/?gopid=20576#entry20576 Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-16Fixed Bug#7122malufett1-0/+2
-where 'bLongAtkDef' affects magic in RE. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-16Fixed Bug#7374malufett1-1/+8
-Hercules now fully support Monster Transformation. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-11Follow up 646f7e2f4ea4bd6b07e66d2949817ebdc18f3484shennetsind1-1/+1
Adjusted range, thanks to haruna realising the feature had been fixed on recent clients. Special Thanks to ossi0110 for testing the feature on multiple 2013 clients, which allowed us to restrict the date range more accurately. Signed-off-by: shennetsind <ind@henn.et>
2013-10-10Added code to disable auction for clients it is no longer stableshennetsind1-0/+10
Regarding http://hercules.ws/board/topic/414-auction-feature-all-screwed-up Signed-off-by: shennetsind <ind@henn.et>
2013-10-10Introducing Bank Supportshennetsind1-0/+10
http://hercules.ws/board/topic/2455-introducing-bank-support/ Thanks to Yommy, Haru! Signed-off-by: shennetsind <ind@henn.et>
2013-10-08Follow up 547b01da35d290b633efaefbbc3af2755d2811e7shennetsind1-1/+1
Thanks to Haruna, ossi0110 Signed-off-by: shennetsind <ind@henn.et>
2013-10-07Fixed Pre-re spiral pierce (when cast by mobs)shennetsind1-4/+4
Partial merge of a4b7719bde71b7fa82a2fcebb9084a3dafb1dc5c Closes #153 Signed-off-by: shennetsind <ind@henn.et>
2013-10-04HPM: Hooking!shennetsind1-12/+14
http://hercules.ws/board/topic/2399-hpm-hooking-now-available/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-02HPM: Map.c Completedshennetsind1-61/+61
Fully Interfaced. Moved missing vars and declarations of interest into the interface, removed duplicate mentions of map within calls to shorten wherever it made sense to. Ladies and Gentleman its my pleasure to announce that with this commit we've revised all of map-server, we've learned a hell lot from this, improved many things on the go and have a number of features to be released thanks to this. *cough* hpm hooking *cough*. Signed-off-by: shennetsind <ind@henn.et>
2013-09-28HPM: pc.c Completedshennetsind1-1/+1
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-28HPM: Party.c Completedshennetsind1-3/+3
Moved missing vars and declarations of interest into the interface, removed duplicate mentions of party within calls to shorten wherever it made sense to, and renamed some members to ease reading. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27HPM: Battle.c Completedshennetsind1-25/+10
Moved missing vars and declarations of interest into the interface Signed-off-by: shennetsind <ind@henn.et>
2013-09-27HPM: Skill.c Completedshennetsind1-3/+3
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-122/+124
Signed-off-by: Haru <haru@dotalux.com>
2013-09-27Renamed iStatus interface to statusHaru1-146/+141
Signed-off-by: Haru <haru@dotalux.com>
2013-09-26Renamed variables that would conflict with a rename of iMap to mapHaru1-82/+76
Note to plugin developers: if you were importing the "map", you'll need to change it to "maplist" Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Renamed local variables that would conflict with a rename of iStatus to statusHaru1-35/+33
Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-66/+64
Conflicts: src/map/chrif.c src/map/clif.c src/map/homunculus.c src/map/pet.c src/map/script.c src/map/skill.c src/map/status.c All clear.
2013-09-25Renamed iTimer interface to timer.shennetsind1-29/+29
Also removed duplicate mentions of timer within calls to shorten.
2013-09-25Renamed more forgotten variables during interface conversionsHaru1-66/+64
(related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru <haru@dotalux.com>
2013-09-17HPM: Battleground.c Interfaceshennetsind1-2/+2
Fully Integrated. Closes #97 Signed-off-by: shennetsind <ind@henn.et>
2013-09-17Fixed Tiger Cannon Damageshennetsind1-1/+1
Issue identified and solved by Michieru, Thanks! Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Path.c Interfaceshennetsind1-3/+3
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Unit.c Interfaceshennetsind1-12/+12
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Mob.c Interfaceshennetsind1-11/+11
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-09-09Fixed Bug #7694shennetsind1-0/+1
Implemented official guild notice behavior of re-displaying upon teleport, added conf/battle/guild.conf setting to modify this. Special Thanks to kyeme, Frost. http://hercules.ws/board/tracker/issue-7694-guild-notice/ Signed-off-by: shennetsind <ind@henn.et>
2013-09-09Fixed Bug #6626shennetsind1-0/+1
Game client is currently broken on this feature, sending the request when the criteria doesn't match and not doing anything when it matches, I've restored the previous method to make the feature work once again, the message is configurable by conf/messages.conf and whether maxed characters can use it now a setting in conf/battle/player.conf http://hercules.ws/board/tracker/issue-6626-cant-prayer-guardian-angel-super-novice/ Signed-off-by: shennetsind <ind@henn.et>
2013-08-29Follow up@c11390cbffc983b01ac9ee4af3b16ccb533dd94cmalufett1-2/+2
-Fixed bug#7681 -sorry guys got crossed eyed in diffing..XD
2013-08-30Follow up @ cccc5bc9256b196b1f4e9ad881838ad32c8b3424malufett1-1/+3
-Bonus 'bLongAtkRate' is not working properly. RE Updates -Added missing atk bonus of BS_HILTBINDING and removed unnecessary hit bonus of BS_WEAPONRESEARCH. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-08-26Fixed Bug#7584malufett1-129/+128
-Where HW_SOULDRAIN should work only in single target. Fixed Bug#7670 -Where PA_GOSPEL is not working properly. Fixed Bug#7668 -Bonus 'bLongAtkRate' is not working properly. Fixed Bug#7512 -Bonus 'bCritAtkRate' is not working properly. Fixed Bug#7515 -Fixed MO_EXTREMITYFIST animation. -Fixed RE armor/weapon storage tab positioning. -Fixed HW_MAGICPOWER cast time. -Fixed '/item' '/monster' aegis command where it not working properly in some item names or monsters. -Added NC_DISJOINT cast time hidden modifier. -Updated RE ATK for post damage modifier. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-08-22Fixed MSVC warnings on 7f9f6e1b84061a7d393debf37395c8b4a2667db1shennetsind1-20/+22
Special Thanks to KeiKun for bringing them to me. Signed-off-by: shennetsind <ind@henn.et>
2013-08-22Fixed Bug #7652shennetsind1-24/+24
damage storage has been changed from int32 to int64 within areas where it could otherwise modified beyond the limit and get screwed up, this solves all related problems within any skills, not only asura. http://hercules.ws/board/tracker/issue-7652-asura-strike-overdamage/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-31Merge pull request #71 from HerculesWS/permission-cache-fixPiotr HaƂaczkiewicz1-2/+2
Permission cache overhaul * Reworked group permission caching in session data (follow-up to cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc) * Removed duplicated information from session data in favor of direct pointer to group settings. * Added getters for all group data required to process permissions and related stuff. * Added new functions to PC interface and updated calls everywhere. * Extracted function to set new group for a player (used at login, group config reload, manual adjustment of group). * Moved command permission config parsing to atcommand module. * Improved dummy map session handling. * Since it's required for all map sessions to have a valid group, dummy sessions are now created by a designated function. * Updated related code that uses dummy sessions (console `gm use` and script `atcommand`, `useatcmd`). * Various minor improvements and cleanups. * Eliminated some global variables related to loading atcommand permissions for group by passing them directly to function. * Moved definition of global array holding PC permission names from header file to source file. * Streamlined destuction of atcommands database to use DBApply helper function instead of DBIterator. * Replaced hardcoded position of console dummy session with defines from mapindex.h (thx Haruna for pointing it out). * Removed fixed length restriction on group names.
2013-07-31Fixed Bug#7601malufett1-2/+8
-Disabled reflect damage cap in pre-re. Fixed Bug#7606 -Where GC_CREATENEWPOISON is not working properly. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-07-29Permission cache overhaulPiotr HaƂaczkiewicz1-2/+2
* Reworked group permission caching in session data (follow-up to cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc) * Removed duplicated information from session data in favor of direct pointer to group settings. * Added getters for all group data required to process permissions and related stuff. * Added new functions to PC interface and updated calls everywhere. * Extracted function to set new group for a player (used at login, group config reload, manual adjustment of group). * Moved command permission config parsing to atcommand module. * Improved dummy map session handling. * Since it's required for all map sessions to have a valid group, dummy sessions are now created by a designated function. * Updated related code that uses dummy sessions (console `gm use` and script `atcommand`, `useatcmd`). * Various minor improvements and cleanups. * Eliminated some global variables related to loading atcommand permissions for group by passing them directly to function. * Moved definition of global array holding PC permission names from header file to source file. * Streamlined destuction of atcommands database to use DBApply helper function instead of DBIterator. * Replaced hardcoded position of console dummy session with defines from mapindex.h (thx Haruna for pointing it out). * Removed fixed length restriction on group names.
2013-07-26Follow up 144a9d0843dfe47e0b58c8857762f58ae70543c8shennetsind1-5/+10
It will no longer block the equipping of items, instead it will delay (if applicable) the item's effect until it is no longer capable of affecting the skills under the timer. Special Thanks to kyeme for the information. Signed-off-by: shennetsind <ind@henn.et>
2013-07-21Merge branch 'master' of https://github.com/HerculesWS/Herculesmalufett1-8/+8
2013-07-21Fixed Bug#7558malufett1-1/+1
-Where 'bLongAtkDef' is not working properly with physical attack. Fixed Bug#7530 -Where Masquerades affect boss monsters. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-07-17Added missing initialization of some functions in the homunculus interfaceHaru1-8/+8
- Fixes issue #7536 (thanks to jTynne for the report) http://hercules.ws/board/tracker/issue-7536-map-crash-july-15th/ - Minor corrections to the other interfaces as well (reordered initialization to follow the definitions, removed duplicate entry in the skill interface initialization, commented out some unused entries) Signed-off-by: Haru <haru@dotalux.com>
2013-07-11Fixed Bug#7498malufett1-2/+2
-Where RE equip atk doesn't properly update status window and negative equip atk should now affect atk. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-07-09Travis Report Fixesshennetsind1-27/+28
warn_unused_result shielding, dropped unused variables and fixed battle_calc_return_damage delay behavior (pointer was unchaged; resulting in the var afterwards always as 0) Special Thanks to Xgear. Signed-off-by: shennetsind <ind@henn.et>
2013-07-09Follow up 144a9d0843dfe47e0b58c8857762f58ae70543c8shennetsind1-1/+5
fixed counter going off if target died while timer was running. Signed-off-by: shennetsind <ind@henn.et>