/// <summary>
        /// Filters the owner out from the attack so that they do not hit themselves with their own attack.
        /// Useful for Option Seeds' behavior to avoid hitting the owner.
        /// </summary>
        /// <param name="bulletAttack">The bullet attack being worked on.</param>
        public static void FilterOutOwnerFromAttack(this BulletAttack bulletAttack)
        {
            bulletAttack.filterCallback = (ref BulletHit hitInfo) =>
            {
                if (bulletAttack.owner == hitInfo.entityObject || bulletAttack.weapon == hitInfo.entityObject)
                {
                    return(false);
                }

                return(bulletAttack.DefaultFilterCallback(ref hitInfo));
            };

            bulletAttack.hitCallback = (ref BulletHit hitInfo) =>
            {
                if (bulletAttack.owner == hitInfo.entityObject || bulletAttack.weapon == hitInfo.entityObject)
                {
                    return(false);
                }

                return(bulletAttack.DefaultHitCallback(ref hitInfo));
            };
        }
        // Token: 0x06002E87 RID: 11911 RVA: 0x000C5B08 File Offset: 0x000C3D08
        private void FireBeamServer(Ray aimRay, GameObject tracerEffectPrefab, float maxDistance, bool isInitialBeam)
        {
            bool         didHit       = false;
            BulletAttack bulletAttack = new BulletAttack
            {
                origin                  = aimRay.origin,
                aimVector               = aimRay.direction,
                bulletCount             = 1U,
                damage                  = base.GetDamage() * FireMainBeamState.mainBeamDamageCoefficient,
                damageColorIndex        = DamageColorIndex.Item,
                damageType              = DamageType.Generic,
                falloffModel            = BulletAttack.FalloffModel.None,
                force                   = FireMainBeamState.mainBeamForce,
                hitEffectPrefab         = FireMainBeamState.mainBeamImpactEffect,
                HitEffectNormal         = false,
                hitMask                 = LayerIndex.entityPrecise.mask,
                isCrit                  = this.isCrit,
                maxDistance             = maxDistance,
                minSpread               = 0f,
                maxSpread               = 0f,
                muzzleName              = "",
                owner                   = base.ownerBody.gameObject,
                procChainMask           = default(ProcChainMask),
                procCoefficient         = FireMainBeamState.mainBeamProcCoefficient,
                queryTriggerInteraction = QueryTriggerInteraction.UseGlobal,
                radius                  = FireMainBeamState.mainBeamRadius,
                smartCollision          = true,
                sniper                  = false,
                spreadPitchScale        = 1f,
                spreadYawScale          = 1f,
                stopperMask             = LayerIndex.world.mask,
                tracerEffectPrefab      = (isInitialBeam ? tracerEffectPrefab : null),
                weapon                  = base.gameObject
            };
            TeamIndex teamIndex = base.ownerBody.teamComponent.teamIndex;

            bulletAttack.hitCallback = delegate(ref BulletAttack.BulletHit info)
            {
                bool flag = bulletAttack.DefaultHitCallback(ref info);
                if (!isInitialBeam)
                {
                    return(true);
                }
                if (flag)
                {
                    HealthComponent healthComponent = info.hitHurtBox ? info.hitHurtBox.healthComponent : null;
                    if (healthComponent && healthComponent.alive && info.hitHurtBox.teamIndex != teamIndex)
                    {
                        flag = false;
                    }
                }
                if (!flag)
                {
                    didHit = true;
                    this.beamHitPosition = info.point;
                }
                return(flag);
            };
            bulletAttack.Fire();
            if (!didHit)
            {
                RaycastHit raycastHit;
                if (Physics.Raycast(aimRay, out raycastHit, FireMainBeamState.mainBeamMaxDistance, LayerIndex.world.mask, QueryTriggerInteraction.Ignore))
                {
                    didHit = true;
                    this.beamHitPosition = raycastHit.point;
                }
                else
                {
                    this.beamHitPosition = aimRay.GetPoint(FireMainBeamState.mainBeamMaxDistance);
                }
            }
            if (didHit & isInitialBeam)
            {
                FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo);
                fireProjectileInfo.projectilePrefab = FireMainBeamState.secondBombPrefab;
                fireProjectileInfo.owner            = base.ownerBody.gameObject;
                fireProjectileInfo.position         = this.beamHitPosition - aimRay.direction * 0.5f;
                fireProjectileInfo.rotation         = Quaternion.identity;
                fireProjectileInfo.damage           = base.GetDamage() * FireMainBeamState.secondBombDamageCoefficient;
                fireProjectileInfo.damageColorIndex = DamageColorIndex.Item;
                fireProjectileInfo.crit             = this.isCrit;
                ProjectileManager.instance.FireProjectile(fireProjectileInfo);
            }
            if (!isInitialBeam)
            {
                EffectData effectData = new EffectData
                {
                    origin = aimRay.origin,
                    start  = base.transform.position
                };
                effectData.SetNetworkedObjectReference(base.gameObject);
                EffectManager.SpawnEffect(tracerEffectPrefab, effectData, true);
            }
        }