summaryrefslogtreecommitdiff
path: root/src/plugins/db2sql.c
AgeCommit message (Collapse)AuthorFilesLines
2019-03-30update db2sqllouisplag1-1/+3
fixed bug load mob_skill_db.sql https://github.com/HerculesWS/Hercules/pull/2407#issuecomment-475771443
2018-09-02Extended db2sql plugin to allow generation of mob_skill_db sql files.Dastgir1-1/+329
Fixes #2128
2018-07-19Update db2sql plugin with support for 32 bit item id.Andrei Karas1-1/+1
2018-07-19Replace item id shorts to int in map server.Andrei Karas1-1/+1
2017-09-17Add support for bitmask arrays in the item_db Upper fieldHaru1-2/+3
Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Split 'View' in two different fields in the item databaseHaru1-3/+7
- 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-04-04Implementation of Item Options System.Smokexyz1-0/+4
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-10-03use mediumint for equip_locationsGde Mahardhikha Satrigraha1-1/+1
2016-07-09db2sql plugin now will dump equip_job as Decimalinstead of Hexadecimalhemagx1-2/+2
2016-07-02Fixed a rare crash in the db2sql pluginHaru1-9/+13
- Fixes a crash that would occur when an item_db2 inherited item was missing Script, OnEquipScript or OnUnequipScript while its item_db counterpart had it. Signed-off-by: Haru <haru@dotalux.com>
2016-07-02Added 'GENERATED FILE DO NOT EDIT' to the auto-generated filesHaru1-1/+3
See https://github.com/Reviewable/Reviewable/wiki/FAQ#how-do-i-tell-reviewable-that-a-file-is-generated-and-should-not-be-reviewed Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru1-0/+1
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-03-06Added support for the textual "Job" field to the itemdb2sql converterHaru1-6/+109
Signed-off-by: Haru <haru@dotalux.com>
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-33/+33
Add all missing -Wformat flags into configure.
2016-02-17Removed unnecessary typedefs from libconfigHaru1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Added modb2sql converter to the db2sql pluginHaru1-2/+306
Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Renamed some db2sql* plugin functions to itemdb2sql*Haru1-69/+141
Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Changed DB2SQL plugin to not cross-convert databasesHaru1-2/+7
- To convert a renewal database, compile the server and plugin as renewal, and to convert a pre-renewal database, compile both as pre-renewal. - This is a necessary evil, for future compatibility. Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Removed duplicate code from the db2sql pluginHaru1-36/+24
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to sql filesHaru1-1/+24
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-3/+19
Signed-off-by: Haru <haru@dotalux.com>
2015-10-22Updated db2sql pluginHaru1-8/+3
Signed-off-by: Haru <haru@dotalux.com>
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-12/+5
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-07-08Update Unique ID system to match official now it cover all cash items ↵Ibrahim Hossam1-1/+5
include stackable ones. Implement ForceSerial option in Package Item Database to force serial for any item. Implement ForceSerial option in item database to force serial for any item. Implement Merge Client interface to merge stackable items with serial numbers ( check npc/other/item_merge.txt ).
2015-06-19Removed ".." from include directivesHaru1-15/+15
- 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-22Removed name distinction between (sql) mob/item/mob_skill db and db_re variantsHaru1-1/+1
- Since there (currently and in future) is no difference between the table structure for renewal and pre-renewal databases, it makes no sense to have extra code that makes a distinction between their names. A server will always use either one or the other, never both at the same time. - If you have a mob_db_re, mob_skill_db_re and/or item_db_re table, please rename it to mob_db, mob_skill_db and/or item_db_re, respectively. - No upgrade script provided. I'd like to remind everyone that these tables are optional (and deprecated), and they are only offered for convenience for those who need them for web control panels and similar software. Signed-off-by: Haru <haru@dotalux.com>
2015-01-18Command line arguments handling overhaulHaru1-2/+4
- login_server, char_server, map_server as well as the tools (mapcache) now have a common command line arguments handling mechanism. - All of them now accept `--help` (`-h`), `--version` (`-v`) and `--load-plugin`. - login_server now accepts `--login-config` and `--lan-config` instead of relying on positional arguments to override those files. The old syntax will no longer work, please update your custom startup scripts. - char_server now accepts `--char-config`, `--inter-config`, `--lan-config` instead of relying on positional arguments. The old syntax will no longer work, please update your custom startup scripts. - mapcache now accepts `--grf-list`, `--map-list`, `--map-cache`, `--rebuild` in place of, respectively, `-grf`, `-list`, `-cache`, `-rebuild`. - A new macro `CMDLINEARG()` is provided, to help defining new command line argument handlers (i.e. in plugins). the `addArg()` call is still required, but its syntax has changed. The `help` argument is now of type `const char *` rather than a function pointer, and it is supposed to contain the message to show in the `--help` screen. Pass `NULL` if no help message is desired. Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-23/+23
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-05-31Updated db2sql converter to match the recent item db changesHaru1-0/+57
Signed-off-by: Haru <haru@dotalux.com>
2014-05-31Changes to the db2sql plugin to make it better maintainableHaru1-46/+149
Signed-off-by: Haru <haru@dotalux.com>
2014-05-16Follow-up to b6b3f58795288701d0e162d43fa6f0a47af913b3Haru1-9/+11
- Includes in some files weren't sorted alphabetically. Special thanks to KeiKun. Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (sources)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-02-03Wrap up on HPMDCshennetsind1-0/+2
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-18Libconfig Interfacedshennetsind1-15/+8
Ready for plugin use. Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-12-10Fixed 64b warnings on db2sqlshennetsind1-5/+5
Special Thanks to Haru! Signed-off-by: shennetsind <ind@henn.et>
2013-11-25Fixed equip_level_max handling in the sql db convertershennetsind1-3/+13
The field is now NULL when the value is not provided, instead of MAX_LEVEL. Special Thanks to Mvmbles for bringing the issue to our attention. Signed-off-by: shennetsind <ind@henn.et>
2013-11-22Minor HPMi Sub Modificationsshennetsind1-1/+1
- HPMi->addCommand is now addAtcommand, dropped usage of ACMD_A() - HPMi->addScript is now addScriptCommand, dropped usage of BUILDIN_A() - HPMi->addCPCommand is now addCPCommand, dropped necessity of CPCMD_A() - HPMi->addPacket is now addPacket, 5th param (HPMi->pid) is now automatically filled by the macro, therefore param count drops to 4 (packetID,packetLength,packetFunction,packetIncomingPoint). There is no longer necessity to check for the availability of the commands, the macros will do it on their own and drop a warning about it upon failure. These changes won't affect pre-compiled plugins. Signed-off-by: shennetsind <ind@henn.et>
2013-11-18Follow-up to d9a89c56ea63e369999ca13f1584eef9e511490fHaru1-3/+3
- Updated db2sql plugin to reflect the latest changes. - Fixes bugreport:7835, special thanks to ossi0110 http://hercules.ws/board/tracker/issue-7835-db2sql-plugin-error/ Signed-off-by: Haru <haru@dotalux.com>
2013-11-15Official Item BindOnEquip Supportshennetsind1-2/+3
Implements the 'BindOnEquip' item db field which determines whether the piece of equipment should bind to the character upon being equipped. When a character tries to equip such a item for the first time a dialog shows up asking the character to confirm whether to equip the item or not, and notifying the character that by equipping the item it will become bound to the character, and therefore unable to be used by another character. Special Thanks to Beret for all the information, Haruna for testing. Signed-off-by: shennetsind <ind@henn.et>
2013-11-15Fixed db2sql plugin forcing minimal modeshennetsind1-4/+2
Would turn map server into minimal mode regardless of the --db2sql option being used. Signed-off-by: shennetsind <ind@henn.et>
2013-11-15Modified db2sql plugin to maintain item_db2.sqlshennetsind1-0/+13
makes it easier to keep the table structure up to date Signed-off-by: shennetsind <ind@henn.et>
2013-11-15Re-generated SQL item databases with the updated db2sql pluginHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2013-11-14Updated db2sql plugin for the needs of the new itemdbshennetsind1-96/+150
May be used as ./map-server --db2sql or by typing "server tools db2sql" within map-server console parse. Special Thanks to Haruna. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-17/+17
Signed-off-by: Haru <haru@dotalux.com>
2013-09-16Corrected line endings and BOM issues with several filesHaru1-1/+1
- Ensured final end-of-line character in every file. - Corrected cases of mixed line endings (mostly CR and CRLF within the same file.) - Removed extra BOM from some scripts, since it causes a parsing error. Signed-off-by: Haru <haru@dotalux.com>
2013-07-04Split use_sql_db into the three available: item_db, mob_db, mob_skill_db.Matheus Macabu1-4/+4
Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2013-06-24Fixed db2sqlshennetsind1-3/+3
Wasn't taking in account the delay_consume flag which actually means the item type is 11 not 2. Also added a extra warning in the item packages parser. Special Thanks to ossi0110 for bringing this up. Signed-off-by: shennetsind <ind@henn.et>