Cleaned storage saving output
This commit is contained in:
parent
ade1b171eb
commit
28cee2caa9
@ -537,7 +537,7 @@ int char_memitemdata_to_sql(const struct item items[], int max, int id, enum sto
|
||||
selectoption = "char_id";
|
||||
break;
|
||||
case TABLE_STORAGE:
|
||||
printname = "Storage";
|
||||
printname = inter_premiumStorage_getPrintableName(stor_id);
|
||||
tablename = inter_premiumStorage_getTableName(stor_id);
|
||||
selectoption = "account_id";
|
||||
break;
|
||||
@ -826,7 +826,7 @@ bool char_memitemdata_from_sql(struct s_storage* p, int max, int id, enum storag
|
||||
memcpy(&storage[i], &item, sizeof(item));
|
||||
|
||||
p->amount = i;
|
||||
ShowInfo("Loaded %s (%d) data from table %s for %s: %d (total: %d)\n", printname, p->stor_id, tablename, selectoption, id, p->amount);
|
||||
ShowInfo("Loaded %s data from table %s for %s: %d (total: %d)\n", printname, tablename, selectoption, id, p->amount);
|
||||
|
||||
SqlStmt_FreeResult(stmt);
|
||||
SqlStmt_Free(stmt);
|
||||
|
@ -63,6 +63,22 @@ const char *inter_premiumStorage_getTableName(uint8 id) {
|
||||
return schema_config.storage_db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get printable name of storage
|
||||
* @param id Storage ID
|
||||
* @return printable name
|
||||
**/
|
||||
const char *inter_premiumStorage_getPrintableName(uint8 id) {
|
||||
if (interserv_config.storages && interserv_config.storage_count) {
|
||||
int i;
|
||||
for (i = 0; i < interserv_config.storage_count; i++) {
|
||||
if (&interserv_config.storages[i] && interserv_config.storages[i].id == id)
|
||||
return interserv_config.storages[i].name;
|
||||
}
|
||||
}
|
||||
return "Storage";
|
||||
}
|
||||
|
||||
/**
|
||||
* Save inventory entries to SQL
|
||||
* @param char_id: Character ID to save
|
||||
|
@ -12,6 +12,7 @@ void inter_storage_sql_final(void);
|
||||
bool inter_premiumStorage_exists(uint8 id);
|
||||
int inter_premiumStorage_getMax(uint8 id);
|
||||
const char *inter_premiumStorage_getTableName(uint8 id);
|
||||
const char *inter_premiumStorage_getPrintableName(uint8 id);
|
||||
|
||||
bool inter_storage_parse_frommap(int fd);
|
||||
|
||||
|
@ -10303,7 +10303,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
|
||||
|
||||
status_change_clear_onChangeMap(&sd->bl, &sd->sc);
|
||||
map_iwall_get(sd); // Updates Walls Info on this Map to Client
|
||||
status_calc_pc(sd, SCO_NONE); // Some conditions are map-dependent so we must recalculate
|
||||
status_calc_pc(sd, sd->state.autotrade ? SCO_FIRST : SCO_NONE); // Some conditions are map-dependent so we must recalculate
|
||||
|
||||
#ifdef VIP_ENABLE
|
||||
if (!sd->state.connect_new &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user