summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2013-08-14Fixed crash uncovered by the ab1fad052cd771e183f496f5db922fa03a13edea updateshennetsind1-2/+3
Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-07-29Ultimate Item DB Updateshennetsind1-3/+9
http://hercules.ws/board/topic/1778-ultimate-item-db-update/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-25Expanding script.c interfaceshennetsind1-11/+11
Hercules Renewal Phase One. Signed-off-by: shennetsind <ind@henn.et>
2013-07-21Fixed Bug #7520shennetsind1-2/+2
Added code to ensure 1st/2nd tabs are meeting the conditions; Special Thanks to Haruna, ToiletMaster http://hercules.ws/board/tracker/issue-7520-skill-point-error/ Also - Follow up 9bcb1423969870a6b60819e6f3846fe0235e28a9 extending it to cached item packages. Signed-off-by: shennetsind <ind@henn.et>
2013-07-21HCache & SQL Update Checker minor changeshennetsind1-1/+1
Files loaded by HCache now display a green C to distinguish whether it was loaded from cache or not Fixed a typo in the SQL Update Checker. Signed-off-by: shennetsind <ind@henn.et>
2013-07-18Fixed Bug #7525shennetsind1-3/+11
Item name constants conflicting with script var names will now result in a map server warning/notice and in the background map server will prioritise the script variable over the item name constant. http://hercules.ws/board/tracker/issue-7525-set-variable-is-not-recognized-causing-freezing/ --- Also followup 586c0f7983f81e97ca70c57712e25d4d51453d6b sc_config.txt update Signed-off-by: shennetsind <ind@henn.et>
2013-07-17Added missing initialization of some functions in the homunculus interfaceHaru1-1/+1
- Fixes issue #7536 (thanks to jTynne for the report) http://hercules.ws/board/tracker/issue-7536-map-crash-july-15th/ - Minor corrections to the other interfaces as well (reordered initialization to follow the definitions, removed duplicate entry in the skill interface initialization, commented out some unused entries) Signed-off-by: Haru <haru@dotalux.com>
2013-07-09Fixed Bug #7497shennetsind1-3/+3
Special Thanks to shenhuyong, kyeme. http://hercules.ws/board/tracker/issue-7497-iditem-idq/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-09Travis Report Fixesshennetsind1-32/+32
warn_unused_result shielding, dropped unused variables and fixed battle_calc_return_damage delay behavior (pointer was unchaged; resulting in the var afterwards always as 0) Special Thanks to Xgear. Signed-off-by: shennetsind <ind@henn.et>
2013-07-08Extended 'ID<item_id>' syntax to item packages and item groups.shennetsind1-2/+8
Signed-off-by: shennetsind <ind@henn.et>
2013-07-08Modified how itemdb->names is populatedshennetsind1-1/+6
Not only does it fix the itemdb2 name override problem, its also more efficient :P Special Thanks to kyeme for bringing this issue to our attention Signed-off-by: shennetsind <ind@henn.et>
2013-07-08Fixed package item problemshennetsind1-0/+13
Special Thanks to kyeme for bringing this to our attention. Signed-off-by: shennetsind <ind@henn.et>
2013-07-05Fixed compiler warningshennetsind1-1/+1
Special Thanks to mkbu95 for bringing this up. Signed-off-by: shennetsind <ind@henn.et>
2013-07-05HCache | Item Packages Updateshennetsind1-78/+349
http://hercules.ws/board/topic/1389-hcache-item-packages-update/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-04Split use_sql_db into the three available: item_db, mob_db, mob_skill_db.Matheus Macabu1-3/+3
Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2013-07-01Fixed Bug #7216shennetsind1-0/+2
Special Thanks to Shikazu, wouldn't have been able to identify this issue without his help! http://hercules.ws/board/index.php?app=tracker&showissue=7216 Signed-off-by: shennetsind <ind@henn.et>
2013-06-24Fixed db2sqlshennetsind1-2/+4
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>
2013-06-24Follow up fcba8a2161a392369db99ab9a516a24470c54796shennetsind1-4/+14
Fixed "random" item package rates, special thanks to Beret. Also, added the missing (+130) item package calls (special thanks to Streusel!) Signed-off-by: shennetsind <ind@henn.et>
2013-06-23Official Item Group/Package/Chainshennetsind1-111/+516
http://hercules.ws/board/topic/1244-official-item-grouppackagechain/ Also Further implemented itemdb.c/storage.c interfaces, and a minor update to db2sql plugin. Signed-off-by: shennetsind <ind@henn.et>
2013-06-14Updating .sql item db filesshennetsind1-36/+50
Also Introducing the official DB2SQL plugin to quickly update the .sql db files. http://hercules.ws/board/topic/1105-hercules-wpe-free-june-14th-patch Signed-off-by: shennetsind <ind@henn.et>
2013-06-09Fixed Bug #7319shennetsind1-4/+3
Special Thanks to KeiKun~! http://hercules.ws/board/tracker/issue-7319-db-name/ Signed-off-by: shennetsind <ind@henn.et>