summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
AgeCommit message (Collapse)AuthorFilesLines
2021-02-15Add support for auto exp insurance itemsAsheraf1-0/+5
2020-09-12This is Hercules v2019.10.20r12.5_BUGGYJesusaves1-16/+8
2020-09-12This is Hercules v2019.09.22Jesusaves1-166/+301
2020-08-07This is Hercules v2019.08.25r12.4+1Jesusaves1-2/+2
2019-05-30Adds Option DB and Option Drop Groups DB to be loaded on minimal modeGuilherme Menaldo1-1/+2
2019-05-05Removal of refine database code from status.c and moving it respectfully to ↵Ibrahim Zidan1-0/+1
its own files Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2019-03-07moving stylist into it's own interfaceAsheraf1-3/+0
2019-01-14Allow load item with big id even if packet version not support this id.Andrei Karas1-0/+12
2019-01-14Fix search item by name if id bigger than MAX_ITEMDBAndrei Karas1-0/+20
2018-07-19Fixing detecting item id or item name in string.Andrei Karas1-3/+3
2018-07-19Add new constant MAX_ITEM_ID for maximum allowed item id.Andrei Karas1-10/+24
For clients older than 2018-07-04 Re maximum supported and enabled id is 65535 (0xffff). For newer clients miximum id is 2147483648. Enabled by default 131072 (0x20000)
2018-07-19Replace item id shorts to int in map server.Andrei Karas1-9/+14
2018-07-01Change functions to static where possible (Part 4 - map)Haru1-68/+105
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-06-29Fix packet 836 (search in stores).Andrei Karas1-7/+7
Added item options fields into this packet. Updated other things for support for report item options in vending. Buying store not supported for now.
2018-06-02Implementation of stylist uiAsheraf1-1/+3
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2018-04-07Implementation of Attendance systemAsheraf1-0/+5
2017-12-23Add support for new drop packet 0xadd for zero clientsAsheraf1-0/+6
2017-09-19remove trailing whitespaces from sourcegumi1-10/+10
2017-09-17Add support for bitmask arrays in the item_db Loc fieldHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Add support for bitmask arrays in the item_db Upper fieldHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Add support for parsing arrays of constants as bitmasks in the item_dbHaru1-7/+63
Fields marked as constant bitmasks will support the following syntaxes: Field: 10 // Decimal value Field: 0xA // Hexadecimal value Field: "FOO" // Constant Field: [2, 8] // Array of decimal values Field: [0x2, 0x8] // Array of hexadecimal values Field: ["FOO", "BAR"] // Array of constants Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Split 'View' in two different fields in the item databaseHaru1-8/+35
- The field was used both for sprite view IDs and for weapon or ammunition subtypes. Now the fields 'ViewSprite' and 'Subtype' are used respectively. Signed-off-by: Haru <haru@dotalux.com>
2017-07-27Fix possible buffer overflows with snprintf.Andrei Karas1-2/+2
2017-05-27Merge pull request #1722 from Smokexyz/mmo_charstatus-fixHaru1-3/+7
Dismemberment of `storage_data` from `mmo_charstatus`.
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-3/+7
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.
2017-04-29Fixes #994Jedzkie1-0/+3
2017-04-04Implementation of Item Options System.Smokexyz1-1/+155
Allows the infusing of equipments with bonus item options. This feature is constrained to clients of packet versions greater than or equal to `20150226`. Item Options and their effects are defined server-side in `db/item_options.conf` and client side in `data/luafiles514/lua files/datainfo/addrandomoptionnametable.lub` The ID of the option must tally with the correct index of the description provided in the client side lua file to avoid bugs. IT_OPT_* keys and MAX_ITEM_OPTIONS macro are also exported from the source as constants. An additional flag `disable_options` has been added to sql, and as `DisableOptions: true/false (boolean, defaults to false !!for equipments only!!)` to item_db.conf files. Script commands documentation is also included. SQL file updates are included. Credits: [Smokexyz](https://github.com/Smokexyz) Style and Script Fixes by [Asheraf](https://github.com/Asheraf) Initial design Idea by [secretdataz](https://github.com/secretdataz)
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-8/+25
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-11-20Added validation for the AegisName while parsing the item dbHaru1-0/+24
Signed-off-by: Haru <haru@dotalux.com>
2016-10-22Added Summoner Class.Dastgir Pojee1-0/+5
(Only Placeholder, other things related to summoner will follow-up soon) Added SQL-Upgrade: Added `class` column in charlog
2016-09-30Add different fixes for gcc 7 warnings.Andrei Karas1-1/+1
Some possible buffer overflows. Add attribute for mark fallthrough cases. Skipped libconfig warnings.
2016-07-02Trivialities: indentation fixesHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru1-2/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-03-14Dont load roulette_db.conf if roulette disabled.Andrei Karas1-1/+1
2016-03-06Merge pull request #1189 from 4144/itemdbviewHaru1-0/+6
Check allowed range for "View" field in item_db for weapon items.
2016-03-06Check allowed range for "View" field in item_db for weapon items.Andrei Karas1-0/+6
Also fix some array sizes.
2016-03-06Fixes some issues while processing item db "Job" fieldsHaru1-5/+14
- In the numeric format, certain valid masks (greater than 0x7fffffff) could fail to process - In the textual format, masks having "All" in a position other than the first, would reset any preceding jobs. Signed-off-by: Haru <haru@dotalux.com>
2016-02-23Corrected some warnings in Visual StudioHaru1-94/+98
- Changed literal 1L values used in unit64 bit-shift operations to 1ULL. - Follow-up to f606519c3b611573ade246ec82db26437bf03668 (reported by zackdreaver) Signed-off-by: Haru <haru@dotalux.com>
2016-02-21Changing Job field to 'int64'Dastgir1-8/+8
Signed-off-by: Haru <haru@dotalux.com>
2016-02-21New format for Job field in job_db.confDastgir1-10/+160
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-6/+6
Add all missing -Wformat flags into configure.
2016-02-17Removed unnecessary typedefs from libconfigHaru1-15/+15
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru1-11/+10
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Modified Mob DB loader to behave like the Item DB loaderHaru1-18/+18
- Separated load and validation logic. - The load/validation functions now return the loaded mob ID Signed-off-by: Haru <haru@dotalux.com>
2016-01-13Added support to mark constants in db/constants.conf as deprecatedHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Corrected various zero-argument function definitionsHaru1-1/+2
- Functions should always specify their arguments, even if they take none. In C, not specifying arguments is different than specifying (void). Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-1/+1
- Replaced the map-iterator related casts. Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Replaced some numeric mob IDs with the proper constants (MOBID_TREASURE_BOX*)Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>