Пример #1
0
 public Byte[] RequestCharacterSettings(string CharacterKey)
 {
     OperationsLog("Character Settings Request received from " + @CharacterKey);
       				CharacterSettings chSet = sMasterSettings.CharacterSettingsHash.Where(x => @x.CharacterKey == @CharacterKey).FirstOrDefault();
       				if(chSet == null)
       				{
       					chSet = new CharacterSettings(@CharacterKey);
       					tCharacterSettingsHash.Add(chSet);
       					OperationsLog("Added Character Settings for " + chSet.CharacterKey);
         savesettings = true;
       				}
       				using(MemoryStream stream = new MemoryStream())
       			{
       					try
       					{
       				Serializer.PrepareSerializer<CharacterSettings>();
       					Serializer.Serialize(stream, chSet);
       				}catch(Exception ex){LogError(ex);}
       				return stream.ToArray();
       			}
 }
        private void InitLoginFilenames()
        {
            try
            {
                GearFiles.CharacterKey = @AetherServer.ServerName + "_" + @AetherCharacter.CharStats.Name;
                mCharacterSettings = GetCharacterSettingsFromLocker(@GearFiles.CharacterKey);
                glCharacterInventory = GetCharcterInventoryFromLocker(@GearFiles.ServerKey, @GearFiles.CharacterKey);
                if(mCharacterSettings.AccountKey == String.Empty) {mCharacterSettings.AccountKey = @GearFiles.AccountKey;}
                if(mCharacterSettings.CharacterKey == String.Empty) {mCharacterSettings.CharacterKey = @GearFiles.CharacterKey;}
                if(mCharacterSettings.ServerKey == String.Empty) {mCharacterSettings.ServerKey = @GearFiles.ServerKey;}

            } catch (Exception ex) { LogError(ex); }
        }