summaryrefslogtreecommitdiff
path: root/src/map/chrif.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-12 18:29:24 +0100
committerHaru <haru@dotalux.com>2015-01-12 18:35:36 +0100
commit4fa9fd843e19d041a6b142722e1f2c717a45f625 (patch)
tree5271cda69234c97a07a1ed9f2f6ef8510bdf94ac /src/map/chrif.h
parentfe00cc320396bc7ac301a22592b718792ae49adf (diff)
downloadhercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.tar.gz
hercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.tar.bz2
hercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.tar.xz
hercules-4fa9fd843e19d041a6b142722e1f2c717a45f625.zip
Blocked compilation of plugins that use unavailable functions
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/chrif.h')
-rw-r--r--src/map/chrif.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 2ef4d0eb5..271fc076d 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -40,6 +40,8 @@ struct auth_node {
enum sd_state state; //To track whether player was login in/out or changing maps.
};
+#define chrif_char_offline(x) chrif->char_offline_nsd((x)->status.account_id,(x)->status.char_id)
+
/*=====================================
* Interface : chrif.h
* Generated by HerculesInterfaceMaker
@@ -150,8 +152,8 @@ struct chrif_interface {
struct chrif_interface *chrif;
+#ifdef HERCULES_CORE
void chrif_defaults(void);
-// There's no need for another function when a simple macro can do exactly the same effect
-#define chrif_char_offline(x) chrif->char_offline_nsd((x)->status.account_id,(x)->status.char_id)
+#endif // HERCULES_CORE
#endif /* MAP_CHRIF_H */