summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-10-04 21:42:15 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-10-04 21:42:15 +0000
commit37a78d0554f4a66793aa2f20694b8716a56b3c25 (patch)
tree1b208438a1d87960911bee590ddc9d62bf4f5fe8 /src/char_sql
parent6f630e5f6d0082fb105de0b0edb0afe78075abdc (diff)
downloadhercules-37a78d0554f4a66793aa2f20694b8716a56b3c25.tar.gz
hercules-37a78d0554f4a66793aa2f20694b8716a56b3c25.tar.bz2
hercules-37a78d0554f4a66793aa2f20694b8716a56b3c25.tar.xz
hercules-37a78d0554f4a66793aa2f20694b8716a56b3c25.zip
- Implemented new packets for rental items (from Jobbie and Natz and fixed 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
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/int_storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char_sql/int_storage.c b/src/char_sql/int_storage.c
index cc6ccd1b7..7cab6d5d9 100644
--- a/src/char_sql/int_storage.c
+++ b/src/char_sql/int_storage.c
@@ -39,7 +39,7 @@ int storage_fromsql(int account_id, struct storage_data* p)
// storage {`account_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`}
StringBuf_Init(&buf);
- StringBuf_AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`");
+ StringBuf_AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`expire_time`");
for( j = 0; j < MAX_SLOTS; ++j )
StringBuf_Printf(&buf, ",`card%d`", j);
StringBuf_Printf(&buf, " FROM `%s` WHERE `account_id`='%d' ORDER BY `nameid`", storage_db, account_id);
@@ -59,10 +59,10 @@ int storage_fromsql(int account_id, struct storage_data* p)
Sql_GetData(sql_handle, 4, &data, NULL); item->identify = atoi(data);
Sql_GetData(sql_handle, 5, &data, NULL); item->refine = atoi(data);
Sql_GetData(sql_handle, 6, &data, NULL); item->attribute = atoi(data);
- item->expire_time = 0;
+ Sql_GetData(sql_handle, 7, &data, NULL); item->expire_time = (unsigned int)atoi(data);
for( j = 0; j < MAX_SLOTS; ++j )
{
- Sql_GetData(sql_handle, 7+j, &data, NULL); item->card[j] = atoi(data);
+ Sql_GetData(sql_handle, 8+j, &data, NULL); item->card[j] = atoi(data);
}
}
p->storage_amount = i;