summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2016-01-17 19:02:46 +0530
committerHaru <haru@dotalux.com>2016-03-19 22:27:31 +0100
commitf5ff79f1aca3e3fd1621913e275b0fc50a2cf062 (patch)
tree68cf723c49f20a9dbc948feff7181a8cfa1f44c7 /src/map/status.c
parentadd2ea4f7944ccabfcaa67be9d9ee5a57fbfb97e (diff)
downloadhercules-f5ff79f1aca3e3fd1621913e275b0fc50a2cf062.tar.gz
hercules-f5ff79f1aca3e3fd1621913e275b0fc50a2cf062.tar.bz2
hercules-f5ff79f1aca3e3fd1621913e275b0fc50a2cf062.tar.xz
hercules-f5ff79f1aca3e3fd1621913e275b0fc50a2cf062.zip
status_get_name returns NULL instead of Unknown, Changed all functions to use clif_get_bl_name
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 55c95a987..2f0007b8f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6243,6 +6243,12 @@ uint32 status_calc_mode(const struct block_list *bl, const struct status_change
return mode & MD_MASK;
}
+/**
+ * Returns the name of the given bl.
+ *
+ * @param bl The requested bl.
+ * @return The bl's name or NULL if not available.
+ */
const char *status_get_name(const struct block_list *bl)
{
nullpo_ret(bl);
@@ -6259,7 +6265,7 @@ const char *status_get_name(const struct block_list *bl)
case BL_HOM: return BL_UCCAST(BL_HOM, bl)->homunculus.name;
case BL_NPC: return BL_UCCAST(BL_NPC, bl)->name;
}
- return "Unknown";
+ return NULL;
}
/*==========================================