summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-09 02:29:19 -0300
committershennetsind <ind@henn.et>2013-06-09 02:29:19 -0300
commit3d6f56c679d1c66f02baf1c5978c4ced6f2d4535 (patch)
tree17c5eaa412f4fc1adfdcd20b4d2ebd4c5b0c0a37 /src/map/atcommand.c
parent74d9eeee60543806e8902812349bcc67e1ddead1 (diff)
downloadhercules-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/atcommand.c')
-rw-r--r--src/map/atcommand.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 835248918..15443640e 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -10095,14 +10095,15 @@ void atcommand_db_load_groups(void) {
cmd->at_groups = aMalloc( pc_group_max * sizeof(char) );
cmd->char_groups = aMalloc( pc_group_max * sizeof(char) );
for(i = 0; i < pc_group_max; i++) {
+ int idx = pc_group_id2idx(atcommand->group_ids[i]);
if( pc_group_can_use_command(atcommand->group_ids[i], cmd->command, COMMAND_ATCOMMAND ) )
- cmd->at_groups[i] = 1;
+ cmd->at_groups[idx] = 1;
else
- cmd->at_groups[i] = 0;
+ cmd->at_groups[idx] = 0;
if( pc_group_can_use_command(atcommand->group_ids[i], cmd->command, COMMAND_CHARCOMMAND ) )
- cmd->char_groups[i] = 1;
+ cmd->char_groups[idx] = 1;
else
- cmd->char_groups[i] = 0;
+ cmd->char_groups[idx] = 0;
}
}