@Morpheus: first, thank you for the feedback it is really valuable.
Well, there it was a problem; I’m a lazy person and I used variables. It seems Sandy doesn’t love lazy guys :d :)). And… now I followed Terpla advice.
So problem solved ( and extended at other statements)
Anyway, the wrecks are looted in the new version.
You have right, even if it is a script and is slower than your main bot It happened one time when i was fucked by 6 ewar ships.
The problem is … I cannot distinguish between scramble, web, etc.
The ewartypeEnum who take the int of each ewar icon packaged into an array throw an argument null exception at first argument of Intersect.
If i put the listEWarPriorityGroupTeamplate !=null
&& listEWarPriorityGroupTeamplate !=null && listEWarPriorityGroupTeamplate.Intersect(entry.EWarType).Any())
then it ignores any ewar attack.
Now, the way to solve all that is ( from alot of documentation over net):
step 1 identifyng each ewar id in overview
step 2 comparing him with my list using HashSet and a void - to return the all thinsg if null = …
step 3 make the intersect
step 4 creating the list to attack
Another way is to use directly an" foreach ewar in overview" if is enum.scramble then attack. The problem is again, enum because are not directly accessible.
Anyway, the all process takes time and since I don’t have ( unless I create him) a memory buffer specifically for ewar …
So, unless somebody with bigger experience and knowledge ( i cannot do all that and find an reliable solution) in programming, I will stay at the simple version:
?.Where(entry => entry != null && (!entry?.EWarType?.IsNullOrEmpty() ?? false) && (entry?.EWarType).Any())
or something like that
I really thank you for feedback,it was really instructive.
The next version will be in a couple days