Exemple #1
0
 public static bool ExplosionServer_Prefix(GameManager __instance, Vector3 _worldPos, Vector3i _blockPos, int _playerId)
 {
     try
     {
         if (_playerId > 0)
         {
             AdminToolsClientInfo Admin = GameManager.Instance.adminTools.GetAdminToolsClientInfo(_playerId.ToString());
             if (Admin.PermissionLevel > ProcessDamage.Admin_Level)
             {
                 return(ProtectedSpaces.AllowExplosion(_worldPos));
             }
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in Injections.ExplosionServer_Prefix: {0}", e.Message));
     }
     return(true);
 }
 public static bool ExplosionServer_Prefix(Vector3 _worldPos, int _playerId)
 {
     try
     {
         if (_playerId > 0)
         {
             ClientInfo _cInfo = PersistentOperations.GetClientInfoFromEntityId(_playerId);
             if (_cInfo != null)
             {
                 if (GameManager.Instance.adminTools.GetUserPermissionLevel(_cInfo) > ProcessDamage.Admin_Level)
                 {
                     return(ProtectedSpaces.AllowExplosion(_worldPos));
                 }
             }
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in Injections.ExplosionServer_Prefix: {0}", e.Message));
     }
     return(true);
 }