summaryrefslogtreecommitdiff
path: root/src/map/storage.h
AgeCommit message (Collapse)AuthorFilesLines
2021-03-08[TMW2] Hercules Ultimate Storage SystemJesusaves1-8/+27
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-03-20Dropped typedef from DBMapHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-4/+4
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-06-19Removed ".." from include directivesHaru1-2/+2
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-06-01Replaced some of the hardcoded values with constants (map)Haru1-0/+9
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru1-0/+2
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2014-10-05Follow up a46b190764df4cce0b378bc691218ac0814a5673shennetsind1-1/+0
Dropped id2storage entirely, replaced with idb_get (1) it was redundant 2) the rename on a46b190764df4cce0b378bc691218ac0814a5673 was a very poor choice as plugins using the previous version would be calling the other). Signed-off-by: shennetsind <ind@henn.et>
2014-10-05Follow up b9b32ac7609eshennetsind1-1/+1
Fixes issue where kicking a online guild member (on a server with GP_BOUND_ITEMS defined) would render the guilds storage (if not previously loaded during the servers lifespan (since boot)) to be wiped. Special Thanks to Xgear! Signed-off-by: shennetsind <ind@henn.et>
2014-07-11Fixed reserved __identifier violationsHaru1-4/+4
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-2/+3
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-3/+2
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-2/+3
- 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-02-02Introducing HPM Datacheckshennetsind1-3/+3
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-1/+1
- 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-09-28HPM: Storage.c Completedshennetsind1-2/+8
Moved missing declarations of interest into the interface, init/final from storage into gstorage Signed-off-by: shennetsind <ind@henn.et>
2013-07-01Fixed Bug #7216shennetsind1-2/+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-23Official Item Group/Package/Chainshennetsind1-0/+4
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-20Hercules Renewal Phase One: storage.cshennetsind1-29/+40
2 new interfaces: - storage - gstorage http://hercules.ws/board/topic/237-hercules-renewal/ Signed-off-by: shennetsind <ind@henn.et>
2012-12-19Implemented @clearstorage, @cleargstorage, @clearcart, @clearinventory ↵momacabu1-0/+1
(alias for @itemreset) as suggested in tid:70764. For further details read the documentation in doc/atcommands.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17029 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-2/+2
[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-2/+2
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-04- Implemented new packets for rental items (from Jobbie and Natz and fixed ↵zephyrus1-0/+1
by me). - Rental items now can be moved to storage and cart. - Autotrade cannot be used when user is dead, and it's not dispelled if user dies to prevent abuse. - Fixed pc_checkitem to do a proper item check and remove. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14082 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-13Modified storage data loadingultramage1-7/+2
* storage is now loaded/saved along with character status * as a consequence, a lot of storage handling code was removed * there is no more locking done within storage data * mapservers no longer cache the data (solves muiltimapserver exploit) * loading storage on char select may decrease charserver performance git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-13storage code cleanup (no behavioral changes yet)ultramage1-5/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12948 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-10Renamed 'struct storage' to 'struct storage_data' (to make 'storage' ↵ultramage1-4/+4
available as a variable name). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12932 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27Cleaning up the itemdb reload mess (see r12635, r12643, r12650, r12661, ↵ultramage1-1/+0
r12662, r12663) * the player data inventory-itemdb index is now refreshed using pc_setinventorydata() * mobdb will no longer initialize with nonexistent items, and mobs will no longer drop them in case of a reload * the clif_buylist() function once again hides invalid npc shop items * it is no longer possible to purchase nonexistent items from a npc shop * npc shop loading will not abort if there is a nonexistent item entry, it will just skip over it git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12665 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27Changed the last commit so it must be called with @reloaditemdb2. ↵Kevin1-2/+0
@reloaditemdb only removes the item_data from the itemdb subsystem. If you don't like my code you can uncomment the macro I_HATE_KEVIN in item_db.c so it isn't even compiled. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12662 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27Some major changes to @reloaditemdb to allow unloading of any item while map ↵Kevin1-0/+2
server is running. - Delete any item from inventory/cart/open storages that went missing during the reload. - Delete item from any shop that has this item. - Refresh item screen for anyone who has a shop open. - Delete mob db drop table references. - Delete item from storage during load if it isn't in the item db. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-4/+9
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects) * Removed way messed-up script function 'unitdeadsit' * Tagged 'FIXME' lines written by myself git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01Cleaned up some parts of the code.ultramage1-2/+2
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Applied a consistent look to all header files (copyright, ifdefs)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-45/+45
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29- Fixed guild storage being "eternally in use" if you quit/logout before ↵skotlex1-1/+1
closing it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7395 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27- Fixed indentation on int_pet.c (how did it got messed up?)skotlex1-1/+1
- Added mapflag "loadevent", now load-map script events will ONLY trigger on maps with this mapflag on, rather than every map. - High Jump can now be used in all versus maps. - Added Kaite's opt3 value, taken from jA - Added state dirty == 2 to storages. Signals when a storage was sent for final saving. Said storage is removed from memory after the ack from the char-server, and they are sent to save if the map/char servers reconnect before the act arrives. In short: they are guaranteed to be saved after a char logs out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29[Optimized ] Lance1-1/+1
Removed unused variable (account_id) in storage_guild_storagesaved. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6815 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES ↵Valaris1-0/+45
GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29Clearing trunk.Valaris1-39/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-23Save storage one last time for good measureamber1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@761 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-18updateamber1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@601 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-11-14Fixed some file typesamber1-39/+39
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@172 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-11-04git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@2 ↵(no author)1-0/+39
54d463be-8e91-2dee-dedb-b68131a5f0ec