public void SetBuffLevel(string name, int level, int max_level = 0) { if (level == 0) { if (Dic.ContainsKey(name)) { Dic.Remove(name); } return; } else { Dic[name] = new UserConsumableBuffnfo(name, level, max_level); } }
public void InitBuffs(params Dictionary <string, ConsumableBuffInfo>[] buff_list) { List.Clear(); foreach (Dictionary <string, ConsumableBuffInfo> consumable in buff_list) { foreach (KeyValuePair <string, ConsumableBuffInfo> buff in consumable) { UserConsumableBuffnfo user_buff = new UserConsumableBuffnfo(); user_buff.Name = buff.Key; user_buff.Name_Kor = buff.Value.NAME_KOR; user_buff.Detail = buff.Value; user_buff.Level = 0; user_buff.Max_Level = buff.Value.MAX_LV; List.Add(user_buff); } } }