summaryrefslogtreecommitdiff
path: root/src/char/inter.h
diff options
context:
space:
mode:
authormarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-07 05:13:54 +0000
committermarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2013-01-07 05:13:54 +0000
commit24987d8513307094064f59d3c9f9c35d0f6a6e87 (patch)
treec535cefbdf72d7de8ec676f4d9d89fcaebbd8668 /src/char/inter.h
parent92880a66754afb8b3b4285276c70c0fc6aa75c1f (diff)
downloadhercules-24987d8513307094064f59d3c9f9c35d0f6a6e87.tar.gz
hercules-24987d8513307094064f59d3c9f9c35d0f6a6e87.tar.bz2
hercules-24987d8513307094064f59d3c9f9c35d0f6a6e87.tar.xz
hercules-24987d8513307094064f59d3c9f9c35d0f6a6e87.zip
* Implemented Unique identifier for Non stackable items. (tid:69380)
* Set as off by default, it can be changed in /src/config/core.h. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17080 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/inter.h')
-rw-r--r--src/char/inter.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/char/inter.h b/src/char/inter.h
index ac2e1785f..e5bfa1572 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -27,4 +27,18 @@ extern char main_chat_nick[16];
int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type);
+uint64 inter_chk_lastuid(int8 flag, uint64 value);
+#ifdef NSI_UNIQUE_ID
+ #define updateLastUid(val_) inter_chk_lastuid(1, val_)
+ #define dbUpdateUid(handler_)\
+ { \
+ uint64 nsiuid_ = inter_chk_lastuid(0, 0); \
+ if (nsiuid_ && SQL_ERROR == Sql_Query(handler_, "UPDATE `interreg` SET `value`='%"PRIu64"' WHERE `varname`='nsiuid'", nsiuid_)) \
+ Sql_ShowDebug(handler_);\
+ }
+#else
+ #define dbUpdateUid(handler_)
+ #define updateLastUid(val_)
+#endif
+
#endif /* _INTER_SQL_H_ */