summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-18Improvements all over the placeshennetsind1-1/+1
Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95! Signed-off-by: shennetsind <ind@henn.et>
2013-01-08* Renaming variable name from nsiuid to unique_id for better understanding ↵markzd1-4/+4
of its meaning, as requested on tid:69380. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17086 54d463be-8e91-2dee-dedb-b68131a5f0ec
2013-01-07* Implemented Unique identifier for Non stackable items. (tid:69380)markzd1-1/+48
* Set as off by default, it can be changed in /src/config/core.h. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17080 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-1117/+1121
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-1121/+1117
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-08Fixed item_db parser:shennetsind1-6/+16
1. map server would crash with mismatching curly braces in unequip script field 2. the parser wouldn't accept specific combinations of curly braces in the uniquip script field. special thanks to mkbu95! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16878 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29* Follow-up r16835: Some cleanup.euphyy1-2/+2
* Updated Hunting Missions script to v1.2b, which adds experience multipliers to config (custom\quests\hunting_missions.txt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16839 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29-Add some src basic documentation.glighta1-6/+8
-Change some remaining -1 for status ending timer. -Move some hardcoded msg in msg_athena -Small optimisation on battle_attr_fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-07Removed pre-re item_db from mysql item db load order when renewal is enabled ↵shennetsind1-16/+15
(special thanks to Xantara for finding out). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16755 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-14Added equipment max-level support as per manager Kenpachi request (required ↵shennetsind1-0/+4
for upcoming renewal items). - in renewal mode item_db's elv field now supports a optional elvmax separated by a colon, example: - 65:70 in the elv field means the item can only be worn by characters whose level is within 65~70 base level range. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16632 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-27Splitted item_buyingstore.txt into pre-re and re as per Kenpachi's request.shennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16515 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-27Fixed bugreport:309 combos may now stack properly. moved all combo ↵shennetsind1-81/+88
processing out of item bonuses and made it's own processing scheme, which is by far more efficient cpu-wise although it requires a little more memory, instead of checking for combo items whenever a status effect is turned on/off it only checks when equipping/un-equipping a item (and on login). Special Thanks to GreenBox, Kenpachi, Skotlex and Trojal git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16508 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-12Fixed "comparison of unsigned expression < 0 is always false" warning.shennetsind1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16412 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-12Improved item_combo_db error message so it makes it easier to identify which ↵shennetsind1-1/+12
item causes the error. for bugreport:6213 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-12Improved item_combo_db parsing to detect missing bracketsshennetsind1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-11Implementing Kenpachi's design of item_combo_db.txtshennetsind1-17/+177
- Credits to Kenpachi and Masao for the db file edits. - Credits to GreenBox for the parsing - This commit might accidentally override a few item db entries, our db developers are expecting this and will work on the conflicting entries. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16393 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-12* Merged /branches/renewal/ r14635 Item Stacking System to /trunk (follow up ↵brianluau1-5/+46
to r15060) pid:106973 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16279 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-10moved skill_nocast_db.txt to re / pre-re db path blacksirius1-5/+5
moved item_noequip.txt to re / pre-re db path NOTE: both files are now located in db/re/ (or db/pre-re/) folders depending on your build. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16265 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-22=Generaltechnote241-1/+1
*Removed IT_THROWWEAPON as its not needed. -The items that use this are being treated as a ammo type through A_THROWWEAPON. =Database *Updated throwable items and cannonballs to official. -Genetics can now equip cannonballs. -Throwable items are now ammo type number 9 as they should be. =Jobs *Genetic's Cart Cannon and Sling Item skills should now work due to the item fixes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15922 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-20=Generaltechnote241-1/+10
*Added CANNONBALL and THROWWEAPON item types as ammo types. -IT_THROWWEAPON will be removed soon as all ammo equiptable -items should be fully treated as ammo type in rAthena and -not as a item type. =Jobs *Added a config to set max stat limit for baby 3rd's. Default is 108. *Kagerou/Oboro stat limit is now set to whatever the limit is set to for 3rd jobs. -Which is the default 120. *Added item job masks for Gangsi, Death Knight, Dark Collector, and Kagerou/Oboro. -Note: Backwards compatibility was added to allow Kagerou/Oboro to use all the equips -the Ninja job can use to prevent needing to edit a chunk of the item database. -The job also has its own exclusive mask which will be used on their exclusive equips soon. *Kagerou/Oboro jobs can now duel weld daggers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15882 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-09- Spring cleaning of various source filesepoque111-2/+2
- Removed unused src/map/config/Skills/Mage_Classes.h file git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15837 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-23* Reading the itemDB checks for extra columns.xazax-hun1-0/+6
* Fixed a typo in mobDB reading followup r15531. (bugreport:5482) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15784 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-22Rehashed Item_delay.txt (bugreport:5487)shennetsind1-1/+1
- Before you could only have MAX_ITEMDELAYS (10) items with delays. Now: you can have up to MAX_ITEMDELAYS (10) concurrent delays. and of course you can always increase MAX_ITEMDELAYS in src/map/itemdb.h as much as you may need. - Item delays are no longer lost on logout, they're persistent until server restarts. - When a item use is denied due to delay still up a message now tells the user why he can't use the item (before would leave the user wondering wtf was going on. it had no response) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-18* uncluttered DB paths between REMODE on/off a littlelordttseven1-15/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15719 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13Enhanced `DBMap` implementation to allow storing integer type data in ↵gepard19841-17/+24
addition to void pointers. - Added enum for data: `int`, `unsigned int` and `void*` - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`) - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`) - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData` - Enabled statistics for new functions in `db_stats` struct - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*` - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*` - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*` - `DBReleaser` functions now take `DBData` as parameter instead of `void*` - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*` - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*` - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry - `DBMap::put()` now takes `DBData` as parameter instead of `void*` - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer - Updated macros: - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()` - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`) - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`) - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`) - added `NULL` in place of extra parameter for removed data in `db_remove` macros - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions - Updated `DBMap` documentation, and fixed a dozen of typos in it. - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions). - Fixed a bug where `DBMap::put()` would return data of a deleted entry. - Removed some unnecessary pointer casts. - Increased `showmsg.c` static buffer size to fit entire DBMap stats report. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-12Follow up r15569 fixed console errorshennetsind1-3/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15570 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-11Added 2 new item_trade.txt flags as per kenpachi request:shennetsind1-15/+16
- Item can't be attached to mail - Item can't be auctioned git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15564 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-08* item_trade.txt is split into re and pre-re folder as per Kenpachi's request.xazax-hun1-1/+5
* skill_tree.txt is split into re and pre-re folder. In renewal version only level 5 spear mastery is required for spiral pierce. * Removed an unnecessary new line on a message. * Enabled mechanic summons in pre-re/mob_db.txt to avoid some startup error messages. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15546 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed more trailing tabs.brianluau1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-26 * Modified drop system to allow overriding global item drop rates on ↵gepard19841-5/+0
per-item basis. For detailed explanation read source:trunk/db/mob_item_ratio.txt (topic:56118). * Added missing update to `logs.sql` (follow-up to r15519). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-20Merged TXT removal branch back to trunk.gepard19841-4/+0
* TXT save engine is removed and no longer supported. * See also tid:53926, tid:57717. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17Enabled Mersenne Twister MT19937 as random number generator instead of ↵gepard19841-1/+2
standard `rand()` function (follow-up to r14865, r14870). - It fixes issues caused by RAND_MAX being only 32k in Windows system (bugreport:1927, bugreport:86). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15483 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-04Re-designed /db/ folder structure as previously discussed.shennetsind1-7/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15390 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-27` Updated item_db_re.sql to match item_db_re.txtxantara1-2/+2
` Renamed a function to say RE instead of RR git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15286 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-22itemdb item type range check fixed, bugreport:5140shennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15207 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14Renamed RRMODE to REMODEshennetsind1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15111 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-08Optimized/Improved r15030, credits to Epoque!shennetsind1-21/+31
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15031 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-08@reloaditemdb Fix for bugreport:5104shennetsind1-23/+21
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15030 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-06Fixed @reloaditemdb @whodrops bug - (bugreport:5084)shennetsind1-0/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15012 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-05Merging RREmu into rAthena -- quite a few stuff yet to be renamed, but we'll ↵shennetsind1-3/+46
get it sorted. Some of the stuff included in RREmu that is now part of rAthena: - RE Drop Rate Modifier - RE Experience Rate Modifier - RE Weapon MATK - RE Shield ASPD job-specific penalty - RE Cast Time - Renewal-specific item DEF - 3.1 classes. - All-New Mounts - Official Magical Reflection - And other perks, such as fully-functional @mapflag also merged eAthena 15006 into rAthena. For Bugs, Comments and Suggestions: http://rathena.org/board/tracker/ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-02-19* Implemented buying store system (aka. reverse vending, purchase shop) ↵ai4rei1-0/+28
together with related skill and items, without NPCs. - For SQL apply upgrade_svn14713_log.sql to upgrade tables `picklog` and `zenylog`; for TXT no action is necessary. - Requires 2010-04-20aRagexeRE or later and can be disabled in 'conf/battle/feature.conf'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14713 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-30* Made remaining csv databases (guild, castle, homunculus, itemdb, ↵ai4rei1-136/+75
mercenary) use sv_readdb, where applicable (follow up to r14524, r14526 and r14532). - Few databases remain unchanged, which have either a custom layout or are otherwise incompatible with sv_readdb. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07* Reverted r14563, due to multiple issues which render the source ↵ai4rei1-5/+5
malfunctioning or uncompilable. To be redone later (bugreport:4627). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07Changed almost all instances of sprintf() to snprintf().Paradox924X1-5/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-03* Removed leftovers of the item_value_db.txt feature (bugreport:2031, since ↵ai4rei1-2/+0
athena-dev-2.1.1-mod377, followup to pre-svn 2004/05/29). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14553 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-02* Various code tweaks and updates related to item types.ai4rei1-0/+28
- Replaced item type literals with their appropriate constants. - Added itemdb_typename to replace the ugly "BUG!" filled array in @iteminfo (since r1741, follow up to r14550). - Made the item database parser verify item type for validity. - Added item type constants to const.txt for use in scripts (getiteminfo). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14551 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-29* Resolved issues with item delay system.ai4rei1-5/+6
- Fixed random crashes caused by map_session_data corruption due to out-of-bounds access to item_delay array (bugreport:4568, since r14455). - Fixed item delay database not being compatible with @reloaditemdb. Item delays are now reset upon reloading, much like a restart would do (bugreport:4589). - Fixed trailing commented lines in db/item_delay.txt could cause 'too many entries' error to be displayed. - Fixed last entity of a cash food item not being recognized as cash food, thus not receiving use delay, due to access to deleted inventory slot (since r14426). - These changes also fix a warning regarding variable 'i' in pc_useitem being potentionally uninitialized (bugreport:4559). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-24Display a message showing the user where to change MAX_ITEMDELAYS when they ↵Paradox924X1-1/+1
have too many entries in the item_delays db. Follow-up to r14455. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-10Added an item_delay database usable for item-specific use delays.Paradox924X1-1/+46
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14455 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-09Replaced all nullpo_retr() calls which returned 0 with nullpo_ret() calls.Paradox924X1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14414 54d463be-8e91-2dee-dedb-b68131a5f0ec