Пример #1
0
 public static Database.Records.AccountDataRecord CreateNewAccountData(Database.Records.AccountRecord account)
 {
     try
     {
         Database.Records.AccountDataRecord newAccountData = new Database.Records.AccountDataRecord();
         newAccountData.AccountID = account.ID;
         newAccountData.NickName = account.Pseudo;
         newAccountData.Bank = World.Game.Items.ItemBag.CreateBag();
         newAccountData.Bank.Create();
         newAccountData.BankID = newAccountData.Bank.ID;
         Database.Cache.AccountDataCache.Cache.Add(newAccountData);
         newAccountData.CreateAndFlush();
         return newAccountData;
     }catch(Exception e)
     {
         Utilities.ConsoleStyle.Error("Error : " + e.ToString());
         return null;
     }
 }
Пример #2
0
 public static Database.Records.AccountDataRecord CreateNewAccountData(Database.Records.AccountRecord account)
 {
     try
     {
         Database.Records.AccountDataRecord newAccountData = new Database.Records.AccountDataRecord();
         newAccountData.AccountID = account.ID;
         newAccountData.NickName  = account.Pseudo;
         newAccountData.Bank      = World.Game.Items.ItemBag.CreateBag();
         newAccountData.Bank.Create();
         newAccountData.BankID = newAccountData.Bank.ID;
         Database.Cache.AccountDataCache.Cache.Add(newAccountData);
         newAccountData.CreateAndFlush();
         return(newAccountData);
     }catch (Exception e)
     {
         Utilities.ConsoleStyle.Error("Error : " + e.ToString());
         return(null);
     }
 }