public ModItem(int Index, ModItemStat Stat) { this.m_Index = Index; m_StatList = new List <ModItemStat> { Stat }; m_EffectList = new List <ModHitEffect>(); }
/// <summary> /// Get Multiplicative Bonus from Count /// </summary> /// <param name="Stat"></param> /// <param name="Count"></param> /// <returns></returns> public float GetMultStackBonusFromCount(StatIndex Stat, int Count) { ModItemStat s = m_StatList.Find(x => x.Stat == Stat); if (s != null) { return(s.GetPercentBonusFromCount(Count)); } return(0); }
/// <summary> /// Multiplicative bonus Per item after the first one /// </summary> /// <param name="Stat"></param> /// <returns></returns> public float MultStackBonus(StatIndex Stat) { ModItemStat s = m_StatList.Find(x => x.Stat == Stat); if (s != null) { return(s.MultStackBonus); } return(0); }
static public void AddStatToItem(int index, ModItemStat stat) { if (ModItemDictionary.ContainsKey(index)) { ModItemDictionary[index] += stat; } else { throw new Exception("ModItemManager ERROR : int does not exist in ModItemDictionary"); } }
static private void DefaultStatItem(int index, ModItemStat stat) { if (m_DefaultModItemDictionary.ContainsKey(index)) { m_DefaultModItemDictionary[index] += stat; } else { throw new Exception("ModItemManager ERROR : int does not exist in m_DefaultModItemDictionary\nBtw you shouldn't mess with this boi ! Index : " + index); } }
public ModItem(int Index, ModItemStat Stat1, ModItemStat Stat2, ModItemStat Stat3, ModItemStat Stat4) { this.m_Index = Index; m_StatList = new List <ModItemStat> { Stat1, Stat2, Stat3, Stat4 }; m_EffectList = new List <ModHitEffect>(); }