summaryrefslogtreecommitdiff
path: root/src/map/pc_groups.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-09 02:29:19 -0300
committerEuphy <euphy@rathena.org>2013-06-15 15:48:05 -0400
commit7cd32c8383ce1318932739c7d49fe8c935d0fb8e (patch)
tree8b3a7e5e8c6e6b0d5dbb424c8b07466d1336b0cf /src/map/pc_groups.c
parentab6c3502e63ff89f6acb5731274bdf305d6ae04a (diff)
downloadhercules-7cd32c8383ce1318932739c7d49fe8c935d0fb8e.tar.gz
hercules-7cd32c8383ce1318932739c7d49fe8c935d0fb8e.tar.bz2
hercules-7cd32c8383ce1318932739c7d49fe8c935d0fb8e.tar.xz
hercules-7cd32c8383ce1318932739c7d49fe8c935d0fb8e.zip
Fixed group cache bug
Special Thanks to Xgear~! Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc_groups.c')
-rw-r--r--src/map/pc_groups.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index 1a83c8b63..f1f69f7cb 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -414,6 +414,19 @@ int pc_group_id2level(int group_id)
return 0;
return group->level;
}
+/**
+ * Group ID -> group level lookup.
+ * @param group id
+ * @return group index
+ * @public
+ */
+int pc_group_id2idx(int group_id)
+{
+ GroupSettings *group = id2group(group_id);
+ if (group == NULL)
+ return 0;
+ return group->group_pos;
+}
/**
* Initialize PC Groups: allocate DBMaps and read config.