to get all digsites you must read all records from ResearchSite_dbc (and related tables).
there is my working code (for example), that read a countours of active digsites.
Code:
def get_active_digsites_pois():
player = GetUnitByKeyword("player")
sites = player.getArcheologySites()
cur_continent_id = GetMapID()
need_poi = []
for site_id in sites:
rec = ResearchSite_dbc.getRecord(site_id)
if rec:
rec_site_id, continent_id, poi_id, name, icon_id = rec
assert rec_site_id == site_id
if continent_id == cur_continent_id:
print "research site:", site_id, continent_id, poi_id, name, icon_id
need_poi.append(poi_id)
return need_poi
all_questpoi = {}
def get_digsite_contours(need_poi):
global all_questpoi
if not all_questpoi:
for i in range(QuestPOIPoint_dbc.hdr.minIndex, QuestPOIPoint_dbc.hdr.maxIndex):
rec = QuestPOIPoint_dbc.getRecord(i)
if rec:
point_id, x, y, poi_id = rec
if poi_id not in all_questpoi:
all_questpoi[poi_id] = []
all_questpoi[poi_id].append((x, y))
contours = []
for poi_id in need_poi:
if poi_id not in all_questpoi:
continue
points = all_questpoi[poi_id]
contours.append(list(points))
#print need_poi, contours
return contours
def get_active_digsites():
res = []
for contour in get_digsite_contours(get_active_digsites_pois()):
res.append(Polygon.Polygon(contour))
return res