summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-16Whitespace cleanup (no code changes)Haru1-26/+27
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-11-03Introducing 2014-10-22, Roulette and Per-Char Gender!shennetsind1-0/+4
Details in http://hercules.ws/board/topic/7618-2014-10-22-roulette-and-per-char-gender/ Special Thanks to the all-mighty Yommy, Ziu and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2014-11-03Missing 'type' field in itemdb now defaults to IT_ETC rather than IT_UNKNOWNshennetsind1-1/+1
Signed-off-by: shennetsind <ind@henn.et>
2014-08-07Corrected several format-string errors through the codeHaru1-8/+9
- 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-05-31Corrected GM level override checks for Nouse and TradeHaru1-2/+2
- Values are now clamped to the [0,100] range. Removed useless positivity check for item_usage.override (fixes a compiler warning). - Special thanks to KeiKun, ossi0110. Signed-off-by: Haru <haru@dotalux.com>
2014-05-31Extended ItemDB to support several other formats (part 2)Dastgir Pojee1-216/+220
- Actual source edits Signed-off-by: Haru <haru@dotalux.com>
2014-05-31 Added ItemTradeRestriction enumHaru1-10/+10
- To be used in a follow-up item_db.conf edit. Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-1/+1
2014-05-13Removed trailing whitespace (sources)Haru1-9/+8
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-11/+16
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-16/+11
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-11/+16
- 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-09Return EXIT_FAILURE if a script parse error occurred.Haru1-7/+7
- This affects normal execution as well as ./script-checker runs. Signed-off-by: Haru <haru@dotalux.com>
2014-05-08Changed warning labels for itemdb_read_cached_packages, they were stating ↵panikon1-3/+3
other function which could be misleading when debugging without a debugger.
2014-04-19Fixed issue: 8146panikon1-2/+4
* http://hercules.ws/board/tracker/issue-8146-reloaditemdb-item-combo-db-crash/
2014-04-18Rewritten NSI_UNIQUE_ID system to get rid of the cross-database interreg ↵Ibrahim Hossam1-39/+3
dependency - Removes the need for map-server to access the interreg table to store the last used ID. - Login, char and map databases can now be hosted separately. - Note: the unique_id structure has changed, and it now contains the generator character ID in its upper 32 bits. - Now NSI_UNIQUE_ID System is enabled always Special thanks to Haruna.
2014-02-09Improved script case check reports to include more accurate source info.Haru1-0/+12
- Fixes bugreport:8013, thanks to Dastgir Pojee http://hercules.ws/board/tracker/issue-8013-script-add-str-problem/ Signed-off-by: Haru <haru@dotalux.com>
2014-02-02Fixed item combo bypassing disabled item restrictionsshennetsind1-52/+42
Special Thanks to Mhalicot! Also improves the overall memory usage of the item combo feature Signed-off-by: shennetsind <ind@henn.et>
2014-01-18Libconfig Interfacedshennetsind1-89/+89
Ready for plugin use. Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2014-01-13Improved overwriting priority of variables/constants/parametersHaru1-11/+0
- Fixes issue 7968, thanks to Moguri http://hercules.ws/board/tracker/issue-7968-trader-npc-not-working/ - Corrected sprite name for KO_KAGE to match latest kRO info (previouly KO_ZANZOU, conflicting with a Kagerou/Oboro skill identifier) - Updated self-test script to include checks for constants and for setd and getd. - Made possible thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-12-17Fixed several compiler warningsHaru1-5/+4
- 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-04Follow-up to 6e9c385b8fa2fbca97ca23e35f0b8e5dabd13526Haru1-7/+22
- Case-sensitive AegisName and Sprite ID lookups are now optional, controlled by the case_sensitive_aegisnames battle config flag (you can set it to "no" to restore the case insensitive behavior.) - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-12-04Fixed Bug 7883shennetsind1-1/+1
Special Thanks to Megasantos, Beret. Follows up 098dbcf672e04657553b9f1629550e6bc8771af3 http://hercules.ws/board/tracker/issue-7883-reloaditemdb/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-01Changed item Aegis ID and mob Sprite ID lookups to case sensitive.Haru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2013-11-29Minor improvementshennetsind1-0/+3
pc_checkitem is now triggered by @reloaditemdb to ensure modified conditions are respected, also a performance boost that causes the itemlist/cartlist/storagelist/gstoragelist lookups to only be triggered on demand instead of on every teleport. Closes #219 Fixed ancient monster ai bug that caused mobs to consider themselves elegible targets, which would waste status_check_skilluse and battle_check_target calls. Signed-off-by: shennetsind <ind@henn.et>
2013-11-18Fixed itemdb elvmax issue caused by inheritshennetsind1-1/+1
Special Thanks to Yommy, Haruna. Signed-off-by: shennetsind <ind@henn.et>
2013-11-18Follow-up to 1f5161a2bd3c7934373146d8cac3c131536758baHaru1-1/+7
- Added explicit column names in the item_db query, to ensure it will throw a SQL error in case some are missing, rahter than silently failing and returning incorrect data. - Added sql upgrade file to add the bindonequip column to the item_db2 table for those who have it. - As with all the item_db2 upgrade scripts, you need at least MySQL 5.0 in order to run it. If your version is not compatible, or if the script fails for any reason, manual upgrade instructions are provided within the script. - Special thanks to Mumbles. Signed-off-by: Haru <haru@dotalux.com>
2013-11-18Fixed an issue with item_db2 entries that specify Inherit, and no ScriptHaru1-53/+100
- Added missing source documentation for the itemdb overhaul related functions. - Slighty refactored the readdb sql function. - Special thanks to sevenzz23 for reporting the crash issue (topic:3029) http://hercules.ws/board/topic/3029-ritem-data-structure-overhaul-error-msg/ and to Ind for testing. Signed-off-by: Haru <haru@dotalux.com>
2013-11-16Fixed a mapserver crash when using SQL item DB and an item's script is NULLHaru1-3/+3
- Special thanks to Mumbles. Signed-off-by: Haru <haru@dotalux.com>
2013-11-15Official Item BindOnEquip Supportshennetsind1-3/+9
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-15Small fix to the Item DB parser (Slots, not Slot!)Haru1-1/+1
- Special thanks to kyeme Signed-off-by: Haru <haru@dotalux.com>
2013-11-14Added Inheritance support for item_db2Haru1-22/+39
- If an item is marked as Inherit: true in item_db2, and it already exists, in item_db, then any unspecified fields are taken from the item_db entry rather than using their default values. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-11-14Updated db2sql plugin for the needs of the new itemdbshennetsind1-74/+49
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-11-14Item DB overhaulHaru1-254/+285
http://hercules.ws/board/topic/2954-item-db-file-structure-overhaul - Item db was changed to libconfig format. - This new format is larger than the original format, but it's less subject to conflicts when some items are edited and the file gets updated. - It is no longer necessary to specify fields with no value, and only the actually used fields are specified. - Items scripts (especially the long ones) are made more readable by splitting them into multiple lines, with proper indentation. - A converter perl script is provided in the tools directory (and a link to the web-based version of the same script canbe found in the above forum topic) - All of this was made possible thanks to Ind, Yommy. Signed-off-by: Haru <haru@dotalux.com>
2013-11-10Fixed item chain drop rate processing algorithmHaru1-13/+6
- This corrects the absurdly high drop rate the Blacksmith skill Ore Discovery was granting, to its correct values (and processing algorithm) from Aegis. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-11-06Merge pull request #217 from HerculesWS/script-checkershennetsind1-4/+11
Introducing the Hercules Standalone Script Syntax Checker
2013-11-06Modified status_calc_shennetsind1-1/+1
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-4/+11
- 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-11-02Fixed Bug #7793shennetsind1-2/+5
package parser will now throw an error when using a invalid random: field, also fixed another error message (was missing a double %) http://hercules.ws/board/tracker/issue-7793-item-packages-crash/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-24Fixed Bug #7781shennetsind1-0/+3
Item parsing was missing a check for IDs beyond maximum and allowing them to remain in the system which can cause numerous issues including the one in the report http://hercules.ws/board/tracker/issue-7781-mapcrash-when-add-itemid-above-50k-in-itemdb2/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-16Fixed Bug#7770malufett1-1/+1
-split 'item_delay.txt'. Follow up @ 9692bc034537693d331148ae8bd15153265c6cf0 -implement PACKET_ZC_SHOWSCRIPT. Special thanks to Kyeme and super awesome Yommy. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-10Fixed Bug #7570shennetsind1-6/+13
Thanks to frenzmu06. Added code into the item db parser to throw a warning when there is more than one version of a item from within the same file, thanks to EvilPuncker. Closes #183 Signed-off-by: shennetsind <ind@henn.et>
2013-10-02HPM: Map.c Completedshennetsind1-11/+11
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-28Merge pull request #161 from shenhuyong/mastershennetsind1-0/+5
Added full support for the Rebellion.
2013-09-27Renamed iMap interface to mapHaru1-19/+18
Signed-off-by: Haru <haru@dotalux.com>
2013-09-27Added full support for the Rebellion.shenhuyong1-0/+5
Credits to 3ceam2 for the base,Thanks to Rytech. -The skill still needs to be completed, as well as support for higher base stats. -Bonus stats are set to temporarily values until the official ones are known. -Updated the item_db.txt file with information on the Rebellion's job equip mask. -Added packets and packet keys for 2013-08-07Ragexe with the info provided by Shakto,Thanks to Shakto. -A 2013-08-07Ragexe client or higher is required for this job to be properly playable.
2013-09-25Renamed more forgotten variables during interface conversionsHaru1-38/+30
(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: Itemdb.c Interfaceshennetsind1-104/+142
Fully Integrated. Closes #110 Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Mob.c Interfaceshennetsind1-1/+1
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-08-26Fixed Bug#7584malufett1-2/+6
-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>