summaryrefslogtreecommitdiff
path: root/src/char/mapif.h
AgeCommit message (Collapse)AuthorFilesLines
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-0/+4
Remove loading and saving of storage_data through char.c Re-declaration of structure storage_data as a vector. Re-code of portions in the map-server using storage_data. A new approach is taken by saving the loaded storage data from sql into memory for the duration of the session, thereby removing the need of querying the database to re-load all items everytime a storage save routine is issued from the map-server. Saving of storage items is done through a new function that significantly reduces the number of queries compared to char_memitemdata_tosql(), and therefore run-time speed. This method potentially reduces the number of update and delete queries from MAX_STORAGE (which could be >= 600) times to literally 1. Storage items are stored in a dynamically allocated array and handled accordingly. struct mmo_charstatus size reduces by 34,800 bytes. Update pc_checkitem() with masks for item checks. `sd->state.itemcheck` has been changed to `sd->itemcheck` of type `enum pc_checkitem_types` `battle/items.conf` has been updated to reflect configuration changes. Further updates to assert a successful reception of storage data in related functions.
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-1/+1
This commit ensures that `sd->status.class` and related variables only contain Job Classes (i.e. the client-compatible values, where High Novice 4001) and are never checked against the bitmask-based MapID values. As a rule of thumb, from now on, when a variable is named `class`, it is intended to contain a Job Class ID and not a MapID. The type of such variable shall be a signed `int16` or `int`. To ensure that related third party code is also verified when this commit is merged, the variable `struct mmo_charstatus::class_ (i.e. `sd->status.class_`) is renamed to `class`. Some issues in related lines are also fixed, including: - A wrong check in the char server would prevent the correct detection of babies in code related to the family exp sharing. - Baby Arch Bishops would not be affected by Eucharistica. - A wrong check would cause the `questinfo()` script command not to display its information for most classes (except 1-1 classes). - Map IDs and Job Classes were mixed up in `itemdb_jobid2mapid()` and `itemdb_jobmask2mapid()` for 1-1 classes (causing currently no harm, since they just happen to coincide). - The Baby Sura class would not cause parties to be marked as containing a monk type character (for SLS Team Up purposes). - Baby Geneticists would bypass the cart check when trying to equip ammunitions. - Baby Mechanics would bypass the Mado Gear check when trying to equip ammunitions. - Transcendent Shadow Chasers would lose the Stalkers' ability to clone transcendent skills. Signed-off-by: Haru <haru@dotalux.com>
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-02-24Added const qualifier to several variable/argument pointersHaru1-25/+25
- This is necessary for compatibility with a const RFIFOP. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Updated inter_pet->tosql() and mapif->save_pet() to work with const dataHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Split mapif->mercenary_save() into two functions (save and create)Haru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Split mapif->homunculus_save() into two functions (save and create)Haru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Split mapif->elemental_save() into two functions (save and create)Haru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+19
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-3/+3
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Cleaned up some #includesHaru1-9/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-1/+1
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru1-0/+2
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Moved mapif_s into mapif.cHaru1-169/+169
Signed-off-by: Haru <haru@dotalux.com>
2014-11-15Fix mapif interface.Andrei Karas1-1/+1
2014-11-15Allow generate HPM hooks for all interfaces in char server.Andrei Karas1-1/+3
2014-11-15Add most functions from inter.c to interfaces.Andrei Karas1-0/+18
2014-11-15Add most functions from int_storage.c to interfaces.Andrei Karas1-0/+9
2014-11-15Add most functions from int_quest.c to interfaces.Andrei Karas1-0/+9
2014-11-15Add most functions from int_pet.c to interfaces.Andrei Karas1-0/+15
2014-11-15Add most functions from int_party.c to interfaces.Andrei Karas1-0/+18
2014-11-15Add most functions from int_mercenary.c to interfaces.Andrei Karas1-0/+11
2014-11-15Add most functions from int_mail.c to interfaces.Andrei Karas1-0/+14
2014-11-15Add most functions from int_homun.c to interfaces.Andrei Karas1-0/+15
2014-11-15Add most functions from int_guild.c to interfaces.Andrei Karas1-0/+35
2014-11-15Add most functions from int_elemental.c to interfaces.Andrei Karas1-0/+12
2014-11-15Add most functions from int_auction.c to interfaces.Andrei Karas1-0/+11
2014-11-15Add most functions from char.c to interfaces.Andrei Karas1-0/+29
Introduced interfaces: chr, mapif, loginif.