Ejemplo n.º 1
0
        public override string[] GetAllRoles()
        {
            var q = from role in RoleStorage.LoadAll() select role.Name;

            return(q.ToArray <string>());
        }
Ejemplo n.º 2
0
 public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
 {
     return(RoleStorage.Delete(new Role(roleName)));
 }
Ejemplo n.º 3
0
 public override bool RoleExists(string roleName)
 {
     return(RoleStorage.Load(roleName) != null);
 }
Ejemplo n.º 4
0
 public override void CreateRole(string roleName)
 {
     RoleStorage.Create(new Role(roleName));
 }
Ejemplo n.º 5
0
 //初始化仓库数据
 public void updateStorageInfo(string type, ErlArray arr)
 {
     if (type == StorageFPort.GOODS)
     {
         PropStorageVersion += 1;
         propStorage         = new PropStorage();
         propStorage.parse(arr);
     }
     else if (type == StorageFPort.CARD)
     {
         RoleStorageVersion += 1;
         roleStorage         = new RoleStorage();
         roleStorage.parse(arr);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_CARD);
     }
     else if (type == StorageFPort.BEAST)
     {
         beastStorageVersion += 1;
         beastStorage         = new BeastStorage();
         beastStorage.parse(arr);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_BEAST);
     }
     else if (type == StorageFPort.EQUIPMENT)
     {
         EquipStorageVersion += 1;
         equipStorage         = new EquipStorage();
         equipStorage.parse(arr);
     }
     else if (type == StorageFPort.TEMP)
     {
         tmpStorageVersion += 1;
         tempStorage        = new TemporaryStorage();
         tempStorage.parse(arr);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_CARD);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_BEAST);
     }
     else if (type == StorageFPort.STAR_SOUL_STORAGE)
     {
         starSoulStorageVersion += 1;
         starSoulStorage         = new StarSoulStorage();
         starSoulStorage.parse(arr);
     }
     else if (type == StorageFPort.STAR_SOUL_DRAW_STORAGE)
     {
         huntStarSoulStorageVersion += 1;
         huntStarSoulStorage         = new StarSoulStorage();
         huntStarSoulStorage.parse(arr);
     }
     else if (type == StorageFPort.MOUNTS)
     {
         mountsStorageVersion += 1;
         mountsStorage         = new MountsStorage();
         mountsStorage.parse(arr);
     }
     else if (type == StorageFPort.MAGIC_WEAPON)
     {
         magicWeaponVersion += 1;
         magicWeaponStorage  = new MagicWeaponStore();
         magicWeaponStorage.parse(arr);
     }
 }