summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authormarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-08 05:31:06 +0000
committermarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-08 05:31:06 +0000
commit5d1712c1483dd106d067256db5728c41e0676177 (patch)
treeaf54c995977893556d030f7ee75398a76d6bb895 /src/map
parenteaf2728d7f5b47e316b07608cb264bc8de2dd4cc (diff)
downloadhercules-5d1712c1483dd106d067256db5728c41e0676177.tar.gz
hercules-5d1712c1483dd106d067256db5728c41e0676177.tar.bz2
hercules-5d1712c1483dd106d067256db5728c41e0676177.tar.xz
hercules-5d1712c1483dd106d067256db5728c41e0676177.zip
* Renaming variable name from nsiuid to unique_id for better understanding of its meaning, as requested on tid:69380.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17086 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/itemdb.c8
-rw-r--r--src/map/itemdb.h2
-rw-r--r--src/map/log.c10
-rw-r--r--src/map/pc.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 810e85a4a..68baae1e1 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1261,7 +1261,7 @@ static int itemdb_read_sqldb(void) {
* 2 set new value bypassing anything
* 3/other return last value
*------------------------------------------*/
-uint64 itemdb_nsiuid(int8 flag, int64 value) {
+uint64 itemdb_unique_id(int8 flag, int64 value) {
static uint64 item_uid = 0;
if(flag)
@@ -1280,18 +1280,18 @@ uint64 itemdb_nsiuid(int8 flag, int64 value) {
int itemdb_uid_load(){
char * uid;
- if (SQL_ERROR == Sql_Query(mmysql_handle, "SELECT `value` FROM `interreg` WHERE `varname`='nsiuid'"))
+ if (SQL_ERROR == Sql_Query(mmysql_handle, "SELECT `value` FROM `interreg` WHERE `varname`='unique_id'"))
Sql_ShowDebug(mmysql_handle);
if( SQL_SUCCESS != Sql_NextRow(mmysql_handle) )
{
- ShowError("itemdb_uid_load: Unable to fetch nsiuid data\n");
+ ShowError("itemdb_uid_load: Unable to fetch unique_id data\n");
Sql_FreeResult(mmysql_handle);
return -1;
}
Sql_GetData(mmysql_handle, 0, &uid, NULL);
- itemdb_nsiuid(1, (uint64)strtoull(uid, NULL, 10));
+ itemdb_unique_id(1, (uint64)strtoull(uid, NULL, 10));
Sql_FreeResult(mmysql_handle);
return 0;
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index e8c6d6487..e308b248b 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -219,7 +219,7 @@ int itemdb_isequip2(struct item_data *);
int itemdb_isidentified(int);
int itemdb_isstackable(int);
int itemdb_isstackable2(struct item_data *);
-uint64 itemdb_nsiuid(int8 flag, int64 value); // Unique Item ID
+uint64 itemdb_unique_id(int8 flag, int64 value); // Unique Item ID
void itemdb_reload(void);
diff --git a/src/map/log.c b/src/map/log.c
index 9d50be62a..ca10c97ab 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -188,12 +188,12 @@ void log_pick(int id, int16 m, e_log_pick_type type, int amount, struct item* it
#ifdef BETA_THREAD_TEST
char entry[512];
int e_length = 0;
- e_length = sprintf(entry, LOG_QUERY " INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `nsiuid`) VALUES (NOW(), '%d', '%c', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%"PRIu64"')",
- log_config.log_pick, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], map[m].name?map[m].name:"", itm->nsiuid);
+ e_length = sprintf(entry, LOG_QUERY " INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `unique_id`) VALUES (NOW(), '%d', '%c', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%"PRIu64"')",
+ log_config.log_pick, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], map[m].name?map[m].name:"", itm->unique_id);
queryThread_log(entry,e_length);
#else
- if( SQL_ERROR == Sql_Query(logmysql_handle, LOG_QUERY " INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `nsiuid`) VALUES (NOW(), '%d', '%c', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%"PRIu64"')",
- log_config.log_pick, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], map[m].name?map[m].name:"", itm->nsiuid) )
+ if( SQL_ERROR == Sql_Query(logmysql_handle, LOG_QUERY " INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `unique_id`) VALUES (NOW(), '%d', '%c', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%"PRIu64"')",
+ log_config.log_pick, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], map[m].name?map[m].name:"", itm->unique_id) )
{
Sql_ShowDebug(logmysql_handle);
return;
@@ -210,7 +210,7 @@ void log_pick(int id, int16 m, e_log_pick_type type, int amount, struct item* it
return;
time(&curtime);
strftime(timestring, sizeof(timestring), "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp,"%s - %d\t%c\t%d,%d,%d,%d,%d,%d,%d,%s,'%"PRIu64"'\n", timestring, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], map[m].name?map[m].name:"", itm->nsiuid);
+ fprintf(logfp,"%s - %d\t%c\t%d,%d,%d,%d,%d,%d,%d,%s,'%"PRIu64"'\n", timestring, id, log_picktype2char(type), itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], map[m].name?map[m].name:"", itm->unique_id);
fclose(logfp);
}
}
diff --git a/src/map/pc.c b/src/map/pc.c
index 5c839385b..f06d48779 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3837,8 +3837,8 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
clif_additem(sd,i,amount,0);
}
#ifdef NSI_UNIQUE_ID
- if( !itemdb_isstackable2(data) && !item_data->nsiuid )
- sd->status.inventory[i].nsiuid = itemdb_nsiuid(0,0);
+ if( !itemdb_isstackable2(data) && !item_data->unique_id )
+ sd->status.inventory[i].unique_id = itemdb_unique_id(0,0);
#endif
log_pick_pc(sd, log_type, amount, &sd->status.inventory[i]);