Can't get OnEntityTakeDamage to change all MLRS Missiles

Im been trying to figure out why the MLRS can damage noob bases for Anti Noob Raid but having some troubles. I can see that the first missile damage is scaling to 0 but any aftet that is still doing the full damage. i have narrowed it down to 3 pieces of code but I don't understand why there causing issue as there just checking Teams or clans For Owner and IgnoredPlayers API and all other wepons and ammo work great. any help will be great thanks

        private object OnEntityTakeDamage(BaseCombatEntity entity, HitInfo hitinfo)
            {                    
                var owner = config.CheckFullOwnership ? FullOwner(entity) : entity.OwnerID;
                BasePlayer attacker = hitinfo.InitiatorPlayer;
                string name = hitinfo?.WeaponPrefab?.ShortPrefabName ?? string.Empty;

                if (entity == null || hitinfo == null) return null; //null checks

                var dmgType = hitinfo?.damageTypes?.GetMajorityDamageType() ?? DamageType.Generic;
                if (dmgType == DamageType.Decay || dmgType == DamageType.Generic) return null;

                if (entity.OwnerID == 0u || !(entity is BuildingBlock || entity is Door || entity.PrefabName.Contains("deployable"))) return null;

                if (config.AllowTwigDestruction && ((entity as BuildingBlock)?.grade == BuildingGrade.Enum.Twigs)) return null;

                if (config.AllowedEntities.ContainsKey(entity.ShortPrefabName))
                        {
                            if (config.AllowedEntities[entity.ShortPrefabName] || entity.GetBuildingPrivilege() == null) return null;
                            if (!entity.GetBuildingPrivilege().authorizedPlayers.Select(x => x.userid).Contains(entity.OwnerID)) return null;
                        }

                if (attacker == null || entity?.OwnerID == attacker?.userID) return null;

                if (storedData.IgnoredPlayers.Contains(attacker.userID)) return null;

                if (owner == 0u) return null;

                if (owner == attacker?.userID) return null;

                if (config.CheckClanForOwner)
                        {
                            ulong userID = attacker?.userID ?? 0u;
                            var clan = ClanInfo.GetClanOf(userID) ?? null;
                            if (clan == null)
                            {
                                var clanName = Clans?.Call<string>("GetClanOf", userID) ?? string.Empty;
                                if (!string.IsNullOrEmpty(clanName))
                                {
                                    var members = GetClanMembers(clanName);
                                    var claninfo = new ClanInfo { clanName = clanName, members = members };
                                    ClanInfo.clanCache.Add(claninfo);

                                    if (claninfo.members.Contains(owner)) return null;
                                }
                            }

                            else if (clan.members.Contains(owner)) return null;
                        }

                if (config.CheckTeamForOwner)
                        {
                            var instance = RelationshipManager.ServerInstance;
                            if (instance == null) PrintWarning("RelationshipManager instance is null! how is this even possible?");

                            else
                            {
                                BasePlayer ownerPlayer;
                                if (instance.cachedPlayers.TryGetValue(owner, out ownerPlayer))
                                {
                                    if (ownerPlayer.currentTeam == attacker.currentTeam && ownerPlayer.currentTeam != 0) return null;
                                }
                            }
                        }

                if (config.RemoveClanProtection && !string.IsNullOrEmpty(hitinfo?.WeaponPrefab?.ShortPrefabName))
                {               
                    string val;
                    if (raidtools.TryGetValue(hitinfo?.WeaponPrefab?.ShortPrefabName, out val))
                    RemoveClanP(attacker?.userID ?? 0u);
                }

                bool wipe = false;
                try
                        {
                            if (WipeProtection != null) wipe = WipeProtection.Call<bool>("WipeProtected");
                        }

                        catch (Exception e)
                        {
                            PrintError("Caught an exception while trying to get data from WipeProtection: " + e.Message);
                        }

                if (wipe) return null;

                if (cooldown.Contains(attacker))
                {                
                    RemoveCD(cooldown, attacker);
                    if (PlayerIsNew(owner))
                            {
                                hitinfo.damageTypes = new DamageTypeList();
                                hitinfo.DoHitEffects = false;
                                hitinfo.HitMaterial = 0;
                                hitinfo.damageTypes.ScaleAll(0f);
                                return true;
                            }
                    return null;
                }

                cooldown.Add(attacker);
                RemoveCD(cooldown, attacker);
                LogPlayer(attacker);

                if (config.PreventNew && PlayerIsNew(attacker.userID))
                        {
                            //keep in mind, antinoobraid.noob perm doesn't get removed
                            hitinfo.damageTypes = new DamageTypeList();
                            hitinfo.DoHitEffects = false;
                            hitinfo.HitMaterial = 0;
                            hitinfo.damageTypes.ScaleAll(0f);

                            NextTick(() => {
                                //if player was *manually* set to noob we don't remove his protection on raid attempt
                                if (config.UnNoobNew)
                                {
                                    if (storedData.players[attacker.userID] >= 0 || (storedData.players[attacker.userID] == -25d && config.UnNoobManual))
                                    {
                                        storedData.players[attacker.userID] = -50d;
                                        SendReply(attacker, lang.GetMessage("new_user_lostprotection", this, attacker.UserIDString));
                                    }
                                }

                                else SendReply(attacker, lang.GetMessage("cannot_attack_new_raider", this, attacker.UserIDString));

                                Refund(attacker, name, entity);
                            });
                            return true;
                        }

                if (PlayerIsNew(owner))
                {
                    hitinfo.damageTypes = new DamageTypeList();
                    hitinfo.DoHitEffects = false;
                    hitinfo.HitMaterial = 0;
                    hitinfo.damageTypes.ScaleAll(0f);
                    var msg = $"Trying To Nullify Damage";
                    Puts(msg);
                    NextTick(() => {                  
                        MessagePlayer(attacker, owner);
                        Refund(attacker, name, entity);
                    });                
                    return true;
                }

            return null;
        }​
 

It seem the the "attacker = hitinfo.InitiatorPlayer;"  is only valid for the first MLRS missile. but i dont know why this is

Merged post

I did more test with that issue, and it seem that  hitinfo.InitiatorPlayer  is valid as long as a player is sitting in the MLRS Launcher
hitinfo.InitiatorPlayer= null when there is no player.