diff options
author | Smokexyz <sagunkho@hotmail.com> | 2017-04-28 05:57:39 +0800 |
---|---|---|
committer | Smokexyz <sagunkho@hotmail.com> | 2017-05-22 17:55:49 +0800 |
commit | e8affc41f106503b530abaa7faa20d6e63b727b8 (patch) | |
tree | 4e4418da2e850e9ae89f357d8b396da5ec739ac4 /src/map/intif.h | |
parent | 109661e3d5fb4cc6ddde9b32f8c99012c8d17bce (diff) | |
download | hercules-e8affc41f106503b530abaa7faa20d6e63b727b8.tar.gz hercules-e8affc41f106503b530abaa7faa20d6e63b727b8.tar.bz2 hercules-e8affc41f106503b530abaa7faa20d6e63b727b8.tar.xz hercules-e8affc41f106503b530abaa7faa20d6e63b727b8.zip |
Add storage_data reception, parsing and sending to/from the map-server.
Remove loading and saving of storage_data through char.c
Re-declaration of structure storage_data as a vector.
Re-code of portions in the map-server using storage_data.
A new approach is taken by saving the loaded storage data from sql into memory for the duration of the session, thereby removing the need of querying the database to re-load all items everytime a storage save routine is issued from the map-server.
Saving of storage items is done through a new function that significantly reduces the number of queries compared to char_memitemdata_tosql(), and therefore run-time speed. This method potentially reduces the number of update and delete queries from MAX_STORAGE (which could be >= 600) times to literally 1.
Storage items are stored in a dynamically allocated array and handled accordingly.
struct mmo_charstatus size reduces by 34,800 bytes.
Update pc_checkitem() with masks for item checks.
`sd->state.itemcheck` has been changed to `sd->itemcheck` of type `enum pc_checkitem_types`
`battle/items.conf` has been updated to reflect configuration changes.
Further updates to assert a successful reception of storage data in related functions.
Diffstat (limited to 'src/map/intif.h')
-rw-r--r-- | src/map/intif.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/intif.h b/src/map/intif.h index b20acf029..3d6a52440 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -66,6 +66,8 @@ struct intif_interface { int (*wis_message_to_gm) (char *Wisp_name, int permission, char *mes); int (*saveregistry) (struct map_session_data *sd); int (*request_registry) (struct map_session_data *sd, int flag); + void (*request_account_storage) (const struct map_session_data *sd); + void (*send_account_storage) (const struct map_session_data *sd); int (*request_guild_storage) (int account_id, int guild_id); int (*send_guild_storage) (int account_id, struct guild_storage *gstor); int (*create_party) (struct party_member *member, const char *name, int item, int item2); @@ -139,8 +141,10 @@ struct intif_interface { int (*pWisToGM_sub) (struct map_session_data* sd,va_list va); void (*pWisToGM) (int fd); void (*pRegisters) (int fd); + void (*pAccountStorage) (int fd); void (*pChangeNameOk) (int fd); void (*pMessageToFD) (int fd); + void (*pAccountStorageSaveAck) (int fd); void (*pLoadGuildStorage) (int fd); void (*pSaveGuildStorage) (int fd); void (*pPartyCreated) (int fd); |