bool BlockDamage(HitData.DamageInstance.Data[] dmgData) { bool flag = false; bool flag2 = true; for (int i = 0; i < dmgData.Length; i++) { DamageType type = dmgData[i].type; if (this._anyDamage || (Invulnerable.ContainsElement(type, this._damageElements) ^ this._invertElements)) { dmgData[i].damage = 0f; flag = true; } else { flag2 = false; } } return(flag && flag2); }