summaryrefslogtreecommitdiff
path: root/src/txt-converter
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-13 16:14:32 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-13 16:14:32 +0000
commitfb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63 (patch)
tree52b66f102c20e6b47e060efe0e7ceabd36d5aa29 /src/txt-converter
parent2e7ba13554118cdc78c9bfa5a6f0e5e8e58baf7b (diff)
downloadhercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.tar.gz
hercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.tar.bz2
hercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.tar.xz
hercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.zip
Modified storage data loading
* 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
Diffstat (limited to 'src/txt-converter')
-rw-r--r--src/txt-converter/char-converter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/txt-converter/char-converter.c b/src/txt-converter/char-converter.c
index a5943729a..a43520f20 100644
--- a/src/txt-converter/char-converter.c
+++ b/src/txt-converter/char-converter.c
@@ -107,7 +107,7 @@ int convert_init(void)
input = getchar();
if(input == 'y' || input == 'Y')
{
- struct storage_data storage_;
+ struct storage_data storage;
ShowMessage("\n");
ShowStatus("Converting Storage Database...\n");
if( (fp = fopen(storage_txt,"r")) == NULL )
@@ -121,11 +121,11 @@ int convert_init(void)
lineno++;
set=sscanf(line,"%d,%d",&tmp_int[0],&tmp_int[1]);
if(set==2) {
- memset(&storage_, 0, sizeof(struct storage_data));
- storage_.account_id=tmp_int[0];
- if (storage_fromstr(line,&storage_) == 0) {
+ memset(&storage, 0, sizeof(struct storage_data));
+ storage.account_id = tmp_int[0];
+ if (storage_fromstr(line,&storage) == 0) {
count++;
- storage_tosql(storage_.account_id,&storage_); //to sql. (dump)
+ storage_tosql(storage.account_id,&storage); //to sql. (dump)
} else {
ShowError("Error parsing storage line [%s] (at %s:%d)\n", line, storage_txt, lineno);
}