private float GetClassDamage(DamageType _type) { float value = 1; RPGPlayer pEntity = Main.player[Main.myPlayer].GetModPlayer <RPGPlayer>(); if (ActiveClass == null) { return(1); } JsonChrClass actualClass = JsonCharacterClass.GetJsonCharList.GetClass(ActiveClass.GetClassType); value *= 1 + actualClass.Damage[(int)_type]; if (_type == DamageType.Ranged) { if (pEntity.HaveBow()) { value *= 1 + actualClass.Damage[5]; } if (pEntity.HaveRangedWeapon() && !pEntity.HaveBow()) { value *= 1 + actualClass.Damage[6]; } } return(value); }