summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-17 17:44:03 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-17 17:44:03 +0000
commit7b337e44d79cc427a0568d488de7831567409e50 (patch)
tree6084b19ae2e5f16a1e446a2548cddb4409581249 /src
parent21e32863d3f486d48bfee8c2b859fe811f671437 (diff)
downloadhercules-7b337e44d79cc427a0568d488de7831567409e50.tar.gz
hercules-7b337e44d79cc427a0568d488de7831567409e50.tar.bz2
hercules-7b337e44d79cc427a0568d488de7831567409e50.tar.xz
hercules-7b337e44d79cc427a0568d488de7831567409e50.zip
- Fixed group permissions not recognizing `false` setting (bug:5342).
- Reverted a line from `clif.c` that accidentaly got commited in r15586. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15597 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/pc_groups.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index fd0f856e8..2c6b3e742 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -269,7 +269,7 @@ static inline unsigned char clif_bl_type(struct block_list *bl) {
case BL_SKILL: return 0x3; //SKILL_TYPE
case BL_CHAT: return 0x4; //UNKNOWN_TYPE
case BL_MOB: return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x5; //NPC_MOB_TYPE
- case BL_NPC: return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x6; //NPC_EVT_TYPE
+ case BL_NPC: return 0x6; //NPC_EVT_TYPE
case BL_PET: return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x7; //NPC_PET_TYPE
case BL_HOM: return 0x8; //NPC_HOM_TYPE
case BL_MER: return 0x9; //NPC_MERSOL_TYPE
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index 3ceb905ba..f62e16218 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -285,8 +285,11 @@ static void read_config(void)
for (i = 0; i < count; ++i) {
config_setting_t *perm = config_setting_get_elem(permissions, i);
const char *name = config_setting_name(perm);
+ int val = config_setting_get_bool(perm);
int j;
+ if (val == 0) // does not have this permission
+ continue;
ARR_FIND(0, ARRAYLENGTH(permission_name), j, strcmp(permission_name[j].name, name) == 0);
group_settings->e_permissions |= permission_name[j].permission;
}