summaryrefslogtreecommitdiff
path: root/src/map/intif.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-16Whitespace cleanup (no code changes)Haru1-73/+74
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-10-05Follow up a46b190764df4cce0b378bc691218ac0814a5673shennetsind1-2/+2
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 b9b32ac7609eshennetsind1-3/+3
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-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-08-07Corrected several format-string errors through the codeHaru1-32/+34
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Fixed reserved __identifier violationsHaru1-1/+1
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-5/+5
2014-05-17Renamed incuvate of Pet System.Shido1-2/+2
2014-05-13Removed trailing whitespace (sources)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-24/+27
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-27/+24
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-24/+27
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
2014-05-06Bug fixes and other changespanikon1-1/+19
#Fixed issue where a corrupted map cache would lead to a crash *Moved Big-endian compatibility functions to common/utils.h #Fixed issue 8162 *http://hercules.ws/board/tracker/issue-8162-loadnpc-doesnt-trigger-oninit-of-duplicate-npcs/ *Added options to npc_parse_duplicate #Fixed issue 8169 *http://hercules.ws/board/tracker/issue-8169-script-command-guildskill-skill-idlevel-not-working-as-intended/ *Changed *guildskill behavior, now it behaves exactly as depicted in the documentation *Updated *guildskill documentation #Added missing GBI types to mapif_parse_GuildBasicInfoChange now it's possible to change guild exp, lv, skill point and skill information #GeoIP revamp *GeoIP module was partially rewritten *Added several data checks to prevent corruption and crashes *Updated GeoIP database *See https://github.com/maxmind/geoip-api-c/blob/master/libGeoIP/GeoIP.c for more information #Added packetver checks regarding NST_MARKET *Now *tradertype warns if user is trying to use this feature with older clients
2014-04-19Follow up to 6f6a6b3panikon1-1/+1
* Added new method to handle refreshing the storage window when it was closed automatically by the client * http://hercules.ws/board/tracker/issue-8027-when-the-storage-is-open-you-can-use-self-skills * http://hercules.ws/board/tracker/issue-7694-guild-notice Follow up to d57781c * Fixed minor typo as pointed by @MishimaHaruna
2014-04-19Fixed issue: 8150panikon1-2/+2
* http://hercules.ws/board/tracker/issue-8150-cash-shop-updating-quantity-bug/ * Also fixed issue where when using ATitem to get more than one pet egg would result on getting only one egg * Changed packet 0x3880 structure now it also contains pet class and dropped flag from this packet, it was pointless
2014-03-29Minor script_add_str error/debug additionshennetsind1-0/+4
intif_parse_Registers now flags/unflags parser_current_file so that any possible naming issues with the variables being loaded are referenced here (previously they'd be reported anyway but without mentioning where it came from Signed-off-by: shennetsind <ind@henn.et>
2014-03-05Ref redesign, part 2Haru1-2/+2
- Reorganized regs var/array DBMaps into a specific reg_db structure Signed-off-by: Haru <haru@dotalux.com>
2014-02-24Fixed console parse gm command crash on select commandsshennetsind1-1/+1
Also fixed an issue with socket flushing Signed-off-by: shennetsind <ind@henn.et>
2014-02-22Changed function types related to SG days in date.cpanikon1-1/+1
Changed types in clif.c: bool clif_setip -> map:ip_set, map: char_ip_set changed as well bool clif_setbindip bool clif_send bool clif_spawn void clif_homskillinfoblock bool clif_sub_guild_invite Note that return values of those types have changed, so if any modification uses their return values it should be changed. clif_disp_onlyself replaced as a macro clif_viewequip_fail replaced as a macro Merged clif_skillup and clif_guild_skillup as they were using the same packet Added packet_len() values in clif_updatestatus
2014-02-19Fixed Bug 8031shennetsind1-1/+1
way to check for char server connection fixed Special Thanks to FeNixZ! http://hercules.ws/board/tracker/issue-8031-map-server-crash-save-scdata-single-del-scdata-single/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-12Changed some void* to the correct data types where applicableHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2014-01-12Fixed Bug 7963shennetsind1-1/+1
Syntax error when compiling with GP_BOUND_ITEMS disabled. http://hercules.ws/board/tracker/issue-7963-intifc-compile-error/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-11Hercules 1st 2014 MegaPatchshennetsind1-83/+176
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-15Replaced pc->pc_has_permission/can_give_items/can_give_bound_items with ↵shennetsind1-1/+1
equivalent macros Because 2/3 jumps to perform such a operation is just awful Signed-off-by: shennetsind <ind@henn.et>
2013-12-13Follow up b7171479shennetsind1-5/+5
Fixed couple intif.c interface members being called outside the interface Signed-off-by: shennetsind <ind@henn.et>
2013-12-17Fixed several compiler warningsHaru1-5/+5
- Warnings detected thanks to Xcode's compiler settings (more strict by default) and clang, warnings mostly but not only related to data sizes on 64 bit systems, that were silenced until now by very lax compiler settings. - This also decreases by a great deal the amount of warnings produced by MSVC in x64 mode (for the adventurous ones who tried that) - Also fixed (or silenced in case of false positives) the potential issues pointed out by the (awesome) clang static analyzer. - Patch co-produced with Ind, I'm merging and committing in his place! Signed-off-by: Haru <haru@dotalux.com>
2013-12-11Corrected some local 'mapindex' variables shadowing the global oneHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2013-12-06Corrected some potential issues in the questlog systemHaru1-2/+3
- Should fixe bugreport:7888, thanks to rosfus http://hercules.ws/board/tracker/issue-7888-some-issue-crush-my-mapserver - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-12-03Questlog fixesHaru1-34/+66
- Improved memory usage of the quest log system. (saves up to 75kB per online character). Fixes issue #133. - Fixed various issues with quest entries disappearing from characters without an apparent reason, or monster kill counters getting stuck - the issues were caused by a de-synchronization between the two parallel questlog arrays in map_session_data. - Added some code documentation. - Thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-11-19Sanitized and improved several macros through the codeHaru1-1/+1
- Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru <haru@dotalux.com>
2013-11-07Further item bind adjustmentsshennetsind1-1/+5
Thanks to Haruna! Signed-off-by: shennetsind <ind@henn.et>
2013-11-07Item Bound Fixes/Adjustments/Improvementsshennetsind1-12/+16
Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-10-31No error after compilation, but when logging in at map server it will crash.sevenzz231-15/+48
Im pretty sure its on the clif.c Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
2013-10-02HPM: Map.c Completedshennetsind1-3/+3
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: Intif.c Completedshennetsind1-360/+305
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27HPM: Chrif.c Completedshennetsind1-3/+2
Moved missing vars and declarations of interest into the interface. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-59/+42
Signed-off-by: Haru <haru@dotalux.com>
2013-09-26Renamed variables that would conflict with a rename of iMap to mapHaru1-2/+2
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-21Fixed a potentially negative array subscript causing a mapserver crashHaru1-3/+2
- Fixes bugreport:7717, special thanks to quesoph http://hercules.ws/board/tracker/issue-7717-map-crash-when-warping-on-a-floating-npc/ - Also changed various map[foo].index to the map_id2index(foo) macro. Signed-off-by: Haru <haru@dotalux.com>
2013-09-16HPM: Quest.c Interfaceshennetsind1-2/+2
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Pet.c Interfaceshennetsind1-3/+3
Fully Integrated. Signed-off-by: shennetsind <ind@henn.et>
2013-09-11Fixed announce script command support for bc_blue and bc_woeHaru1-4/+4
- Fixes an issue where it wasn't possible to use bc_blue or bc_woe at the same time as bc_map, bc_area or bc_self. (this partly works around bugreport:7693 - http://hercules.ws/board/tracker/issue-7693-character-with-name ) - Replaced bc_* related values from various places through the sources with constants. Signed-off-by: Haru <haru@dotalux.com>
2013-07-31Merge pull request #71 from HerculesWS/permission-cache-fixPiotr Hałaczkiewicz1-1/+1
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-30Fixed mapserver crash (bugreport:7599)Haru1-0/+2
http://hercules.ws/board/tracker/issue-7599-map-crash-july-29-latest/ Follow-up to 853489b intif->create_pet was defined but never initialized, causing a mapserver crash (segmentation fault) whenever a pet was created. Thanks to jTynne for reporting it. Signed-off-by: Haru <haru@dotalux.com>
2013-07-29Permission cache overhaulPiotr Hałaczkiewicz1-1/+1
* 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-29Fixed Bug #7597 / Follow up b7171479a47490ff80bf04849f763158d6d96facshennetsind1-1/+1
http://hercules.ws/board/tracker/issue-7597-server-crash/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-29Added mercenary interfaceSusu1-2351/+2352
2013-07-29Added intif interfaceSusu1-2259/+2351
2013-07-29Added elemental interfaceSusu1-1/+1
2013-06-25- Added chrif interfaceSusu1-8/+8