Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Optimized Inventory, Cart Inventory, and Storage usage (#1115)
* These storage types now mimic Guild Storage and can be loaded/saved whenever needed. * Relieves mmo_charstatus from having to send storage types and lets the char-server handle it. * All storage types now have an increased max amount. * Implemented Premium Storage System. Thanks to @cydh! * Fixes #441 - Players will no longer be required to log out to resync cart item data before opening a Vending Store. * Refactored player weight and cart weight calculations into their own functions. * Added script commands openstorage2, guildstoragecountitem[2] and guildstoragedelitem[2]. * Refactored several function return types as well as documentation. Thanks to @lighta and @cydh for their help with it!
- Loading branch information
Showing
with
2,513 additions
and 1,557 deletions.
- 0 conf/import-tmpl/inter_server.conf
- +2 −1 conf/inter_athena.conf
- +26 −0 conf/inter_server.conf
- +1 −1 conf/msg_conf/map_msg.conf
- +1 −1 conf/msg_conf/map_msg_idn.conf
- +67 −0 doc/packet_interserv.txt
- +59 −12 doc/script_commands.txt
- +38 −0 sql-files/upgrades/premium_storage.sql
- +133 −291 src/char/char.c
- +3 −12 src/char/char.h
- +2 −4 src/char/char_clif.c
- +11 −14 src/char/int_auction.c
- +311 −170 src/char/int_storage.c
- +8 −9 src/char/int_storage.h
- +105 −6 src/char/inter.c
- +11 −0 src/char/inter.h
- +40 −14 src/common/mmo.h
- +11 −15 src/login/account.c
- +61 −51 src/map/atcommand.c
- +6 −6 src/map/battle.c
- +4 −4 src/map/buyingstore.c
- +20 −8 src/map/chrif.c
- +156 −136 src/map/clif.c
- +2 −3 src/map/clif.h
- +24 −18 src/map/guild.c
- +291 −42 src/map/intif.c
- +6 −2 src/map/intif.h
- +1 −1 src/map/itemdb.c
- +9 −9 src/map/mail.c
- +3 −2 src/map/map.c
- +13 −13 src/map/npc.c
- +1 −1 src/map/party.c
- +182 −191 src/map/pc.c
- +17 −3 src/map/pc.h
- +5 −8 src/map/pet.c
- +246 −155 src/map/script.c
- +4 −0 src/map/script_constants.h
- +37 −32 src/map/skill.c
- +116 −56 src/map/status.c
- +2 −0 src/map/status.h
- +402 −204 src/map/storage.c
- +42 −22 src/map/storage.h
- +9 −9 src/map/trade.c
- +3 −1 src/map/unit.c
- +18 −30 src/map/vending.c
- +1 −0 vcproj-10/map-server.vcxproj
- +1 −0 vcproj-12/map-server.vcxproj
- +1 −0 vcproj-13/map-server.vcxproj
- +1 −0 vcproj-14/map-server.vcxproj
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,26 @@ | ||
| /** | ||
| * Config for Storages | ||
| * | ||
| * To access the premium storage, use script command 'openstorage2'. | ||
| * If premium storages are added, copy the structure of the storage table and match the table name in this config. | ||
| * The 'max' of premium storages are not adjusted by 'vip_storage_increase' config nor MIN_STORAGE. | ||
| * | ||
| * Structure: | ||
| { | ||
| id: <storage_id> // (int) Storage ID will be used for script command 'openstorage2'. | ||
| name: "<storage name>" // (string) Storage name will be sent to the client to display on the title bar. | ||
| table: "<storage_table>" // (string) Name of table where storage is saved. The table stucture is the same as the default storage table. | ||
| max: <max_amount> // (int) *optional* Maximum number of items in storage. MAX_STORAGE will be used if no value is defined. | ||
| }, // Use comma to add more storages | ||
| **/ | ||
|
|
||
| storages: ( | ||
| { | ||
| // Default Storage | ||
| // DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU ARE DOING | ||
| id: 0 | ||
| name: "Storage" | ||
| table: "storage" | ||
| //max: 600 | ||
| } | ||
| ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -770,7 +770,7 @@ | ||
|
|
||
| 732: Item cannot be opened when your inventory is full. | ||
|
|
||
| //733 free | ||
|
|
||
| // @cloneequip/@clonestat | ||
| 734: Cannot clone your own %s. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -769,7 +769,7 @@ | ||
|
|
||
| 732: Item tidak dapat dibuka ketika inventory penuh. | ||
|
|
||
| //733 free | ||
|
|
||
| // @cloneequip/@clonestat | ||
| 734: Tidak dapat mengkloning %s diri sendiri. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,38 @@ | ||
| -- | ||
| -- Table structure for table `storage_1` | ||
| -- | ||
|
|
||
| CREATE TABLE IF NOT EXISTS `storage_1` ( | ||
| `id` int(11) unsigned NOT NULL auto_increment, | ||
| `account_id` int(11) unsigned NOT NULL default '0', | ||
| `nameid` smallint(5) unsigned NOT NULL default '0', | ||
| `amount` smallint(11) unsigned NOT NULL default '0', | ||
| `equip` int(11) unsigned NOT NULL default '0', | ||
| `identify` smallint(6) unsigned NOT NULL default '0', | ||
| `refine` tinyint(3) unsigned NOT NULL default '0', | ||
| `attribute` tinyint(4) unsigned NOT NULL default '0', | ||
| `card0` smallint(5) unsigned NOT NULL default '0', | ||
| `card1` smallint(5) unsigned NOT NULL default '0', | ||
| `card2` smallint(5) unsigned NOT NULL default '0', | ||
| `card3` smallint(5) unsigned NOT NULL default '0', | ||
| `option_id0` smallint(5) unsigned NOT NULL default '0', | ||
| `option_val0` smallint(5) unsigned NOT NULL default '0', | ||
| `option_parm0` tinyint(3) unsigned NOT NULL default '0', | ||
| `option_id1` smallint(5) unsigned NOT NULL default '0', | ||
| `option_val1` smallint(5) unsigned NOT NULL default '0', | ||
| `option_parm1` tinyint(3) unsigned NOT NULL default '0', | ||
| `option_id2` smallint(5) unsigned NOT NULL default '0', | ||
| `option_val2` smallint(5) unsigned NOT NULL default '0', | ||
| `option_parm2` tinyint(3) unsigned NOT NULL default '0', | ||
| `option_id3` smallint(5) unsigned NOT NULL default '0', | ||
| `option_val3` smallint(5) unsigned NOT NULL default '0', | ||
| `option_parm3` tinyint(3) unsigned NOT NULL default '0', | ||
| `option_id4` smallint(5) unsigned NOT NULL default '0', | ||
| `option_val4` smallint(5) unsigned NOT NULL default '0', | ||
| `option_parm4` tinyint(3) unsigned NOT NULL default '0', | ||
| `expire_time` int(11) unsigned NOT NULL default '0', | ||
| `bound` tinyint(3) unsigned NOT NULL default '0', | ||
| `unique_id` bigint(20) unsigned NOT NULL default '0', | ||
| PRIMARY KEY (`id`), | ||
| KEY `account_id` (`account_id`) | ||
| ) ENGINE=MyISAM; |
Oops, something went wrong.