diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-02 23:59:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-15 11:47:29 +0300 |
commit | dad6fe920ab9d28aa883a93252c243a5f64c35b6 (patch) | |
tree | 88c3bc6d12ea32dc1ec2f2f9a829cb8ef9b4a982 /src | |
parent | 12fb24d5709bb89856d2c2ed055caf146538c847 (diff) | |
download | hercules-dad6fe920ab9d28aa883a93252c243a5f64c35b6.tar.gz hercules-dad6fe920ab9d28aa883a93252c243a5f64c35b6.tar.bz2 hercules-dad6fe920ab9d28aa883a93252c243a5f64c35b6.tar.xz hercules-dad6fe920ab9d28aa883a93252c243a5f64c35b6.zip |
Add prefix inter_storage_ to most functions in int_storage.c
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 2 | ||||
-rw-r--r-- | src/char/int_storage.c | 14 | ||||
-rw-r--r-- | src/char/int_storage.h | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/char/char.c b/src/char/char.c index 4aa7b1c6a..d6978f2e6 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1341,7 +1341,7 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every strcat(t_msg, " cart"); //read storage - storage_fromsql(p->account_id, &p->storage); + inter_storage_fromsql(p->account_id, &p->storage); strcat(t_msg, " storage"); //read skill diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 94470cfcd..07ce8436f 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -23,14 +23,14 @@ #define STORAGE_MEMINC 16 /// Save storage data to sql -int storage_tosql(int account_id, struct storage_data* p) +int inter_storage_tosql(int account_id, struct storage_data* p) { char_memitemdata_to_sql(p->items, MAX_STORAGE, account_id, TABLE_STORAGE); return 0; } /// Load storage data to mem -int storage_fromsql(int account_id, struct storage_data* p) +int inter_storage_fromsql(int account_id, struct storage_data* p) { StringBuf buf; struct item* item; @@ -79,7 +79,7 @@ int storage_fromsql(int account_id, struct storage_data* p) } /// Save guild_storage data to sql -int guild_storage_tosql(int guild_id, struct guild_storage* p) +int inter_storage_guild_storage_tosql(int guild_id, struct guild_storage* p) { char_memitemdata_to_sql(p->items, MAX_GUILD_STORAGE, guild_id, TABLE_GUILD_STORAGE); ShowInfo ("guild storage save to DB - guild: %d\n", guild_id); @@ -87,7 +87,7 @@ int guild_storage_tosql(int guild_id, struct guild_storage* p) } /// Load guild_storage data to mem -int guild_storage_fromsql(int guild_id, struct guild_storage* p) +int inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage* p) { StringBuf buf; struct item* item; @@ -154,7 +154,7 @@ int inter_storage_delete(int account_id) Sql_ShowDebug(sql_handle); return 0; } -int inter_guild_storage_delete(int guild_id) +int inter_storage_guild_storage_delete(int guild_id) { if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `guild_id`='%d'", guild_storage_db, guild_id) ) Sql_ShowDebug(sql_handle); @@ -176,7 +176,7 @@ int mapif_load_guild_storage(int fd,int account_id,int guild_id, char flag) WFIFOL(fd,4) = account_id; WFIFOL(fd,8) = guild_id; WFIFOB(fd,12) = flag; //1 open storage, 0 don't open - guild_storage_fromsql(guild_id, (struct guild_storage*)WFIFOP(fd,13)); + inter_storage_guild_storage_fromsql(guild_id, (struct guild_storage*)WFIFOP(fd,13)); WFIFOSET(fd, WFIFOW(fd,2)); return 0; } @@ -228,7 +228,7 @@ int mapif_parse_SaveGuildStorage(int fd) } else if(SQL->NumRows(sql_handle) > 0) { // guild exists SQL->FreeResult(sql_handle); - guild_storage_tosql(guild_id, (struct guild_storage*)RFIFOP(fd,12)); + inter_storage_guild_storage_tosql(guild_id, (struct guild_storage*)RFIFOP(fd,12)); mapif_save_guild_storage_ack(fd, RFIFOL(fd,4), guild_id, 0); return 0; } diff --git a/src/char/int_storage.h b/src/char/int_storage.h index 1cef94d98..abf4703f9 100644 --- a/src/char/int_storage.h +++ b/src/char/int_storage.h @@ -10,13 +10,13 @@ struct guild_storage; int inter_storage_sql_init(void); void inter_storage_sql_final(void); int inter_storage_delete(int account_id); -int inter_guild_storage_delete(int guild_id); +int inter_storage_guild_storage_delete(int guild_id); int inter_storage_parse_frommap(int fd); //Exported for use in the TXT-SQL converter. -int storage_fromsql(int account_id, struct storage_data* p); -int storage_tosql(int account_id,struct storage_data *p); -int guild_storage_tosql(int guild_id, struct guild_storage *p); +int inter_storage_fromsql(int account_id, struct storage_data* p); +int inter_storage_tosql(int account_id,struct storage_data *p); +int inter_storage_guild_storage_tosql(int guild_id, struct guild_storage *p); #endif /* CHAR_INT_STORAGE_H */ |