public float AdjustedMeleeDamageAmount(Tool tool, Pawn attacker, Thing equipment, HediffComp_VerbGiver hediffCompSource)
        {
            if (!IsMeleeAttack)
            {
                Log.ErrorOnce($"Attempting to get melee damage for a non-melee verb {this}", 26181238);
            }
            float num = tool?.AdjustedBaseMeleeDamageAmount(equipment, meleeDamageDef) ?? ((float)meleeDamageBaseAmount);

            if (attacker != null)
            {
                num *= GetDamageFactorFor(tool, attacker, hediffCompSource);
            }
            return(num);
        }
Exemple #2
0
        public float AdjustedMeleeDamageAmount(Tool tool, Pawn attacker, Thing equipment, HediffComp_VerbGiver hediffCompSource)
        {
            if (!this.IsMeleeAttack)
            {
                Log.ErrorOnce(string.Format("Attempting to get melee damage for a non-melee verb {0}", this), 26181238, false);
            }
            float num;

            if (tool != null)
            {
                num = tool.AdjustedBaseMeleeDamageAmount(equipment, this.meleeDamageDef);
            }
            else
            {
                num = (float)this.meleeDamageBaseAmount;
            }
            if (attacker != null)
            {
                num *= this.GetDamageFactorFor(tool, attacker, hediffCompSource);
            }
            return(num);
        }