viewing paste PC_PERM_INTRAVISION | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
Index: conf/groups.conf
===================================================================
--- conf/groups.conf    (revision 17128)
+++ conf/groups.conf    (working copy)
@@ -93,6 +93,7 @@
        trade or party */
        can_trade: true
        can_party: true
+       intravision: true
    }
 },
 {
Index: src/map/pc.c
===================================================================
--- src/map/pc.c    (revision 17128)
+++ src/map/pc.c    (working copy)
@@ -922,9 +922,6 @@
    sd->login_id2 = login_id2;
    sd->group_id = group_id;
 
-   /* load user permissions */
-   pc_group_pc_load(sd);
-
    memcpy(&sd->status, st, sizeof(*st));
 
    if (st->sex != sd->status.sex) {
@@ -1044,6 +1041,9 @@
 
    clif_authok(sd);
 
+   /* load user permissions */
+   pc_group_pc_load(sd);
+
    //Prevent S. Novices from getting the no-death bonus just yet. [Skotlex]
    sd->die_counter=-1;
 
Index: src/map/pc_groups.c
===================================================================
--- src/map/pc_groups.c (revision 17128)
+++ src/map/pc_groups.c (working copy)
@@ -357,6 +357,11 @@
    sd->permissions = group->e_permissions;
    sd->group_pos = group->group_pos;
    sd->group_level = group->level;
+
+   if( sd->permissions&PC_PERM_INTRAVISION )
+       clif_status_load(&sd->bl, SI_INTRAVISION, 1);
+   else
+       clif_status_load(&sd->bl, SI_INTRAVISION, 0);
 }
 /**
  * Checks if player group has a permission
Index: src/map/pc_groups.h
===================================================================
--- src/map/pc_groups.h (revision 17128)
+++ src/map/pc_groups.h (working copy)
@@ -43,6 +43,7 @@
    PC_PERM_DISABLE_PVM         = 0x040000,
    PC_PERM_DISABLE_PVP         = 0x080000,
    PC_PERM_DISABLE_CMD_DEAD    = 0x100000,
+   PC_PERM_INTRAVISION         = 0x200000,
 };
 
 static const struct {
@@ -70,6 +71,7 @@
    { "disable_pvm", PC_PERM_DISABLE_PVM },
    { "disable_pvp", PC_PERM_DISABLE_PVP },
    { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD },
+   { "intravision", PC_PERM_INTRAVISION },
 };
 
 #endif // _PC_GROUPS_H_
Viewed 1192 times, submitted by Lilith.