fix urls for v7
@@ -24,6 +24,18 @@ const (
func (b *OGame) getPage(page string, celestialID CelestialID) ([]byte, error) {
vals := url.Values{"page": {page}}
+ if b.serverData.Version[0] == '7' {
+ if page == DefensePage {
+ page = "defenses"
+ } else if page == ResourcesPage {
+ page = "supplies"
+ } else if page == StationPage {
+ page = "facilities"
+ } else if page == Fleet1Page {
+ page = "fleetdispatch"
+ }
+ vals = url.Values{"page": {"ingame"}, "component": {page}}
+ }
if celestialID != 0 {
vals.Add("cp", strconv.Itoa(int(celestialID)))
}
