Advertisement
Guest User

Untitled

a guest
Aug 16th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. public class BoosterJsData : ShopItemJsData
  2. {
  3. private readonly SF3.Items.Booster.BoosterType _type;
  4. public SF3.Items.Booster.BoosterType type { get { return _type; } }
  5.  
  6. private readonly string _hint;
  7. public string hint { get { return _hint; } }
  8.  
  9. private readonly string _background;
  10. public string background { get { return _background; } }
  11.  
  12. private readonly sf3DTO.Faction _faction;
  13. public sf3DTO.Faction faction { get { return _faction; } }
  14.  
  15. private readonly string _label;
  16. public string label { get { return _label; } }
  17.  
  18. private readonly string _icon;
  19. public string icon { get {return _icon; } }
  20.  
  21. private readonly string _dan;
  22. public string dan { get { return _dan; } }
  23.  
  24. public BoosterJsData(Dictionary<string, JsValue> itemData) : base(itemData)
  25. {
  26. _background = itemData.GetNodeSafeAsString("Background", "");
  27.  
  28. SF3.SF3Utils.TryParseEnum(out _faction, itemData.GetNodeSafeAsString("Faction", "UnknownFaction"), Faction.UnknownFaction);
  29. SF3.SF3Utils.TryParseEnum(out _type, itemData.GetNodeSafeAsString("Type", "UNKNOWN_BOOSTER_TYPE"), SF3.Items.Booster.BoosterType.Unknown);
  30.  
  31. _label = itemData.GetNodeSafeAsString("Label", "");
  32. _dan = itemData.GetNodeSafeAsString("DanNumber", "");
  33. _icon = itemData.GetNodeSafeAsString("Icon", "");
  34. _hint = itemData.GetNodeSafeAsString("Hint", "");
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement