Guest User

Untitled

a guest
Jun 21st, 2013
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.21 KB | None | 0 0
  1. Index: conf/groups.conf
  2. ===================================================================
  3. --- conf/groups.conf    (revision 16785)
  4. +++ conf/groups.conf    (working copy)
  5. @@ -269,6 +269,11 @@
  6.         use_check: true
  7.         use_changemaptype: true
  8.         all_commands: true
  9. +       disable_pickup: true
  10. +       disable_exp: true
  11. +       disable_store: true
  12. +       disable_skill_usage: true
  13. +       disable_drops: true
  14.     }
  15.  }
  16.  )
  17. Index: src/map/clif.c
  18. ===================================================================
  19. --- src/map/clif.c  (revision 16785)
  20. +++ src/map/clif.c  (working copy)
  21. @@ -10302,7 +10302,7 @@
  22.     unsigned short* item_list = (unsigned short*)RFIFOP(fd,4);
  23.     int result;
  24.  
  25. -   if( sd->state.trading || !sd->npc_shopid )
  26. +   if( sd->state.trading || !sd->npc_shopid || pc_has_permission(sd,PC_PERM_DISABLE_STORE) )
  27.         result = 1;
  28.     else
  29.         result = npc_buylist(sd,n,item_list);
  30. @@ -10330,7 +10330,7 @@
  31.     n = (RFIFOW(fd,2)-4) /4;
  32.     item_list = (unsigned short*)RFIFOP(fd,4);
  33.  
  34. -   if (sd->state.trading || !sd->npc_shopid)
  35. +   if (sd->state.trading || !sd->npc_shopid || pc_has_permission(sd,PC_PERM_DISABLE_STORE) )
  36.         fail = 1;
  37.     else
  38.         fail = npc_selllist(sd,n,item_list);
  39. @@ -12358,7 +12358,10 @@
  40.         }
  41.         sprintf(command, "/kick %s (%d)", status_get_name(target), status_get_class(target));
  42.         log_atcommand(sd, command);
  43. -       status_percent_damage(&sd->bl, target, 100, 0, true); // can invalidate 'target'
  44. +       if(pc_has_permission(sd,PC_PERM_DISABLE_DROPS))
  45. +           status_kill(target);
  46. +       else
  47. +           status_percent_damage(&sd->bl, target, 100, 0, true); // can invalidate 'target'
  48.     }
  49.     break;
  50.  
  51. @@ -14314,7 +14317,7 @@
  52.      int fail = 0;
  53.      nullpo_retv(sd);
  54.  
  55. -    if( sd->state.trading || !sd->npc_shopid )
  56. +    if( sd->state.trading || !sd->npc_shopid || pc_has_permission(sd,PC_PERM_DISABLE_STORE))
  57.          fail = 1;
  58.      else
  59.      {
  60. Index: src/map/pc.c
  61. ===================================================================
  62. --- src/map/pc.c    (revision 16785)
  63. +++ src/map/pc.c    (working copy)
  64. @@ -3905,6 +3905,9 @@
  65.     if(!check_distance_bl(&fitem->bl, &sd->bl, 2) && sd->ud.skillid!=BS_GREED)
  66.         return 0;   // ‹——£‚ª‰“‚¢
  67.  
  68. +   if( pc_has_permission(sd,PC_PERM_DISABLE_PICK_UP) )
  69. +       return 0;
  70. +
  71.     if (sd->status.party_id)
  72.         p = party_search(sd->status.party_id);
  73.    
  74. @@ -5576,6 +5579,9 @@
  75.     if(!battle_config.pvp_exp && map[sd->bl.m].flag.pvp)  // [MouseJstr]
  76.         return 0; // no exp on pvp maps
  77.  
  78. +   if( pc_has_permission(sd,PC_PERM_DISABLE_EXP) )
  79. +       return 0;
  80. +
  81.     if(sd->status.guild_id>0)
  82.         base_exp-=guild_payexp(sd,base_exp);
  83.  
  84. Index: src/map/pc_groups.h
  85. ===================================================================
  86. --- src/map/pc_groups.h (revision 16785)
  87. +++ src/map/pc_groups.h (working copy)
  88. @@ -43,6 +43,11 @@
  89.     PC_PERM_DISABLE_PVM         = 0x040000,
  90.     PC_PERM_DISABLE_PVP         = 0x080000,
  91.     PC_PERM_DISABLE_CMD_DEAD    = 0x100000,
  92. +   PC_PERM_DISABLE_PICK_UP     = 0x200000,
  93. +   PC_PERM_DISABLE_STORE       = 0x400000,
  94. +   PC_PERM_DISABLE_EXP         = 0x800000,
  95. +   PC_PERM_DISABLE_DROPS       = 0x1000000,
  96. +   PC_PERM_DISABLE_SKILL_USAGE = 0x2000000,
  97.  };
  98.  
  99.  static const struct {
  100. @@ -70,6 +75,11 @@
  101.     { "disable_pvm", PC_PERM_DISABLE_PVM },
  102.     { "disable_pvp", PC_PERM_DISABLE_PVP },
  103.     { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD },
  104. +   { "disable_pickup", PC_PERM_DISABLE_PICK_UP },
  105. +   { "disable_store", PC_PERM_DISABLE_STORE },
  106. +   { "disable_exp", PC_PERM_DISABLE_EXP },
  107. +   { "disable_drops", PC_PERM_DISABLE_DROPS },
  108. +   { "disable_skill_usage", PC_PERM_DISABLE_SKILL_USAGE },
  109.  };
  110.  
  111.  #endif // _PC_GROUPS_H_
  112. Index: src/map/skill.c
  113. ===================================================================
  114. --- src/map/skill.c (revision 16785)
  115. +++ src/map/skill.c (working copy)
  116. @@ -4621,7 +4621,6 @@
  117.         return 1;
  118.     if(status_isdead(src))
  119.         return 1;
  120. -
  121.     if( src != bl && status_isdead(bl) ) {
  122.         /**
  123.          * Skills that may be cast on dead targets
  124. @@ -12076,6 +12075,9 @@
  125.     nullpo_ret(sd);
  126.    
  127.     if (lv <= 0 || sd->chatID) return 0;
  128. +  
  129. +   if (  pc_has_permission(sd, PC_PERM_DISABLE_SKILL_USAGE) )
  130. +       return 0;
  131.  
  132.     if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill )
  133.     {   //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
Advertisement
Add Comment
Please, Sign In to add comment