Advertisement
6jarjar6

Battle Run Save File Format

Jun 13th, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.84 KB | None | 0 0
  1. // Type: PlayerSaveFile
  2. // Assembly: Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
  3. // MVID: E28DCA22-3777-4723-8281-E05AF28F0AAA
  4. // Assembly location: D:\Andy's\Games\New folder\Assembly-CSharp.dll
  5.  
  6. using System;
  7. using System.Collections.Generic;
  8.  
  9. public class PlayerSaveFile
  10. {
  11.   public string login_Name = string.Empty;
  12.   public string auth_Token = string.Empty;
  13.   public string account_email = string.Empty;
  14.   public string account_registered = string.Empty;
  15.   public bool option_sound_on = true;
  16.   public bool option_music_on = true;
  17.   public string allChatHistoryJSON = string.Empty;
  18.   public int leaguePanelState = 1;
  19.   public DateTime lastSavedTime = DateTime.MinValue;
  20.   public string allCharacterCustomizationsJSON = string.Empty;
  21.   public BaseCharacterID lastUsedBaseCharacterID = BaseCharacterID.Dust;
  22.   public string objectiveJSON = string.Empty;
  23.   public string allPlayerInfoString = string.Empty;
  24.   public string adsModelSaveString = string.Empty;
  25.   public bool isRegistered;
  26.   public bool isLoginThroughFaceBook;
  27.   public Language option_language;
  28.   public int lastLeagueIDValue;
  29.   public int lastReadLobbyHint;
  30.  
  31.   public PlayerSaveFile()
  32.   {
  33.   }
  34.  
  35.   public PlayerSaveFile(Dictionary<string, object> iSavedDict)
  36.   {
  37.     this.login_Name = WebModel.GetStringFromResponseData("login_Name", iSavedDict);
  38.     this.auth_Token = WebModel.GetStringFromResponseData("auth_Token", iSavedDict);
  39.     this.account_email = WebModel.GetStringFromResponseData("account_email", iSavedDict);
  40.     this.allCharacterCustomizationsJSON = WebModel.GetStringFromResponseData("allCharacterCustomizationsJSON", iSavedDict);
  41.     this.lastUsedBaseCharacterID = (BaseCharacterID) WebModel.GetIntFromResponseData("lastUsedBaseCharacterID", iSavedDict);
  42.     this.isRegistered = WebModel.GetBoolFromResponseData("isRegistered", iSavedDict);
  43.     this.isLoginThroughFaceBook = WebModel.GetBoolFromResponseData("isLoginThroughFaceBook", iSavedDict);
  44.     this.option_sound_on = WebModel.GetBoolFromResponseData("option_sound_on", iSavedDict);
  45.     this.option_music_on = WebModel.GetBoolFromResponseData("option_music_on", iSavedDict);
  46.     this.option_language = Language.English;
  47.     if (iSavedDict.ContainsKey("option_language"))
  48.       this.option_language = (Language) WebModel.GetIntFromResponseData("option_language", iSavedDict);
  49.     this.allChatHistoryJSON = WebModel.GetStringFromResponseData("allChatHistoryJSON", iSavedDict);
  50.     this.objectiveJSON = WebModel.GetStringFromResponseData("objectiveJSON", iSavedDict);
  51.     if (iSavedDict.ContainsKey("leaguePanelState"))
  52.     {
  53.       this.leaguePanelState = WebModel.GetIntFromResponseData("leaguePanelState", iSavedDict);
  54.       if (this.leaguePanelState == -1)
  55.         this.leaguePanelState = 1;
  56.     }
  57.     if (iSavedDict.ContainsKey("lastSavedTime"))
  58.       DateTime.TryParse(iSavedDict["lastSavedTime"].ToString(), out this.lastSavedTime);
  59.     if (iSavedDict.ContainsKey("lastLeagueIDValue"))
  60.       this.lastLeagueIDValue = int.Parse(iSavedDict["lastLeagueIDValue"].ToString());
  61.     if (iSavedDict.ContainsKey("lastReadLobbyHint"))
  62.       this.lastReadLobbyHint = int.Parse(iSavedDict["lastReadLobbyHint"].ToString());
  63.     this.allPlayerInfoString = WebModel.GetStringFromResponseData("allPlayerInfoString", iSavedDict);
  64.     this.adsModelSaveString = WebModel.GetStringFromResponseData("adsModelSaveString", iSavedDict);
  65.   }
  66.  
  67.   public Dictionary<string, object> GetSaveDict()
  68.   {
  69.     Dictionary<string, object> dictionary = new Dictionary<string, object>();
  70.     dictionary["login_Name"] = (object) this.login_Name;
  71.     dictionary["auth_Token"] = (object) this.auth_Token;
  72.     dictionary["account_email"] = (object) this.account_email;
  73.     dictionary["allCharacterCustomizationsJSON"] = (object) this.allCharacterCustomizationsJSON;
  74.     dictionary["lastUsedBaseCharacterID"] = (object) this.lastUsedBaseCharacterID;
  75.     dictionary["option_sound_on"] = (object) (bool) (this.option_sound_on ? 1 : 0);
  76.     dictionary["option_music_on"] = (object) (bool) (this.option_music_on ? 1 : 0);
  77.     dictionary["option_language"] = (object) this.option_language;
  78.     dictionary["isRegistered"] = (object) (bool) (this.isRegistered ? 1 : 0);
  79.     dictionary["isLoginThroughFaceBook"] = (object) (bool) (this.isLoginThroughFaceBook ? 1 : 0);
  80.     dictionary["allChatHistoryJSON"] = (object) this.allChatHistoryJSON;
  81.     dictionary["leaguePanelState"] = (object) this.leaguePanelState;
  82.     dictionary["lastSavedTime"] = (object) this.lastSavedTime;
  83.     dictionary["allPlayerInfoString"] = (object) this.allPlayerInfoString;
  84.     dictionary["adsModelSaveString"] = (object) this.adsModelSaveString;
  85.     dictionary["objectiveJSON"] = (object) this.objectiveJSON;
  86.     dictionary["lastLeagueIDValue"] = (object) this.lastLeagueIDValue;
  87.     dictionary["lastReadLobbyHint"] = (object) this.lastReadLobbyHint;
  88.     return dictionary;
  89.   }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement