add ajax param
@@ -1537,9 +1537,9 @@ func (b *OGame) createUnion(fleet Fleet) (int, error) {
if fleet.ID == 0 {
return 0, errors.New("invalid fleet id")
}
- pageHTML, _ := b.getPageContent(url.Values{"page": {"federationlayer"}, "union": {"0"}, "fleet": {strconv.Itoa(int(fleet.ID))}, "target": {strconv.Itoa(fleet.TargetPlanetID)}})
+ pageHTML, _ := b.getPageContent(url.Values{"page": {"federationlayer"}, "union": {"0"}, "fleet": {strconv.Itoa(int(fleet.ID))}, "target": {strconv.Itoa(fleet.TargetPlanetID)}, "ajax": {"1"}})
payload := ExtractFederation(pageHTML)
- by, err := b.postPageContent(url.Values{"page": {"unionchange"}}, payload)
+ by, err := b.postPageContent(url.Values{"page": {"unionchange"}, "ajax": {"1"}}, payload)
if err != nil {
return 0, err
}
