Fix for recycling missions
@@ -2066,10 +2066,13 @@ func (b *OGame) sendFleet(celestialID CelestialID, ships []Quantifiable, speed S
payload.Add(k, v)
}
cs := false // ColonyShip flag for fleet check
+ recycler := false // Recycler flag for fleet check
for _, s := range ships {
if s.Nbr > 0 {
if s.ID == ColonyShipID {
cs = true
+ } else if s.ID == RecyclerID {
+ recycler = true
}
payload.Add("am"+strconv.Itoa(int(s.ID)), strconv.Itoa(s.Nbr))
}
@@ -2113,6 +2116,9 @@ func (b *OGame) sendFleet(celestialID CelestialID, ships []Quantifiable, speed S
if cs {
fleetCheckPayload.Add("cs", "1")
}
+ if recycler {
+ fleetCheckPayload.Add("recycler", "1")
+ }
by1, err := b.postPageContent(url.Values{"page": {"fleetcheck"}, "ajax": {"1"}, "espionage": {"0"}}, fleetCheckPayload)
if err != nil {
return Fleet{}, err
