Issue information

Issue ID
#5362
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
Feb 22, 2012 20:12
Last Post
Hercules Elf Bot
Apr 19, 2012 18:30
Confirmation
N/A

Hercules Elf Bot - Feb 22, 2012 20:12

Originally posted by [b]Napster[/b]
char/int_storage.c

[quote]
/// Load guild_storage data to mem
int guild_storage_fromsql(int guild_id, struct guild_storage* p)
{
StringBuf buf;
struct item* item;
char* data;
int i;
int j;

memset(p, 0, sizeof(struct guild_storage)); //clean up memory
p->storage_amount = 0;
p->guild_id = guild_id;

// storage {`guild_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`}
StringBuf_Init(&buf);
[b]StringBuf_AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`");[/b]
for( j = 0; j < MAX_SLOTS; ++j )
StringBuf_Printf(&buf, ",`card%d`", j);
StringBuf_Printf(&buf, " FROM `%s` WHERE `guild_id`='%d' ORDER BY `nameid`", guild_storage_db, guild_id);

if( SQL_ERROR == Sql_Query(sql_handle, StringBuf_Value(&buf)) )
Sql_ShowDebug(sql_handle);

StringBuf_Destroy(&buf);

for( i = 0; i < MAX_GUILD_STORAGE && SQL_SUCCESS == Sql_NextRow(sql_handle); ++i )
{
item = &p->items[i];
Sql_GetData(sql_handle, 0, &data, NULL); item->id = atoi(data);
Sql_GetData(sql_handle, 1, &data, NULL); item->nameid = atoi(data);
Sql_GetData(sql_handle, 2, &data, NULL); item->amount = atoi(data);
Sql_GetData(sql_handle, 3, &data, NULL); item->equip = atoi(data);
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;
for( j = 0; j < MAX_SLOTS; ++j )
{
Sql_GetData(sql_handle, 7+j, &data, NULL); item->card[j] = atoi(data);
}
}
p->storage_amount = i;
Sql_FreeResult(sql_handle);

ShowInfo("guild storage load complete from DB - id: %d (total: %d)\n", guild_id, p->storage_amount);
return 0;
}
[/quote]

I'am not sure pls confirm

Hercules Elf Bot - Feb 23, 2012 0:57

Originally posted by [b]EvilPuncker[/b]
well, I think that rental items aren't supposed to be put in storage/gstorage o.O that is why

Hercules Elf Bot - Feb 27, 2012 0:55

Originally posted by [b]Ind[/b]
rental items are not allowed in guild storage -- that's why it doesn't even try to load expire_time data