diff options
author | shennetsind <ind@henn.et> | 2013-06-09 02:29:19 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-09 02:29:19 -0300 |
commit | 3d6f56c679d1c66f02baf1c5978c4ced6f2d4535 (patch) | |
tree | 17c5eaa412f4fc1adfdcd20b4d2ebd4c5b0c0a37 /src/map/pc_groups.c | |
parent | 74d9eeee60543806e8902812349bcc67e1ddead1 (diff) | |
download | hercules-3d6f56c679d1c66f02baf1c5978c4ced6f2d4535.tar.gz hercules-3d6f56c679d1c66f02baf1c5978c4ced6f2d4535.tar.bz2 hercules-3d6f56c679d1c66f02baf1c5978c4ced6f2d4535.tar.xz hercules-3d6f56c679d1c66f02baf1c5978c4ced6f2d4535.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.c | 13 |
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. |