Example #1
0
        public ItemParam ToItemParam()
        {
            JSON_ItemParam json = new JSON_ItemParam();

            json.iname = this.iname;
            json.name  = this.name;
            json.icon  = this.icon;
            json.rare  = this.grade - 1;
            json.type  = 19;
            ItemParam itemParam = new ItemParam();

            itemParam.Deserialize(json);
            return(itemParam);
        }
Example #2
0
 public bool Deserialize(JSON_ItemParam json)
 {
     if (json == null)
     {
         return(false);
     }
     this.iname        = json.iname;
     this.name         = json.name;
     this.expr         = json.expr;
     this.flavor       = json.flavor;
     this.type         = (EItemType)json.type;
     this.rare         = (OInt)json.rare;
     this.cap          = (OInt)json.cap;
     this.invcap       = (OInt)json.invcap;
     this.equipLv      = (OInt)Math.Max(json.eqlv, 1);
     this.coin         = (OInt)json.coin;
     this.tour_coin    = (OInt)json.tc;
     this.arena_coin   = (OInt)json.ac;
     this.multi_coin   = (OInt)json.mc;
     this.piece_point  = (OInt)json.pp;
     this.buy          = (OInt)json.buy;
     this.sell         = (OInt)json.sell;
     this.enhace_cost  = (OInt)json.encost;
     this.enhace_point = (OInt)json.enpt;
     this.value        = (OInt)json.val;
     this.icon         = (OString)json.icon;
     this.skill        = (OString)json.skill;
     this.recipe       = json.recipe;
     this.quests       = (string[])null;
     this.is_valuables = json.is_valuables > 0;
     this.cmn_type     = json.cmn_type;
     if (json.quests != null)
     {
         this.quests = new string[json.quests.Length];
         for (int index = 0; index < json.quests.Length; ++index)
         {
             this.quests[index] = json.quests[index];
         }
     }
     return(true);
 }
Example #3
0
 public void Deserialize(string language, JSON_ItemParam json)
 {
     this.Deserialize(json);
     this.localizeFields(language);
 }