Skip to content

Commit

Permalink
Merge pull request #230 from Rakkuzan/autopirate
Browse files Browse the repository at this point in the history
Potential bugfix for autoconvert crew strength
  • Loading branch information
ikagod authored Feb 13, 2024
2 parents 97b6699 + 4969ef8 commit 7e6bdd8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ikabot/function/autoPirate.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,16 @@ def convertCapturePoints(session, piracyCities, convertPerMission):
session : ikabot.web.session.Session
piracyCities: a list containing all cities which have a pirate fortress
"""
html = session.get('view=pirateFortress&activeTab=tabCrew&cityId={0}&position=17&backgroundView=city&currentCityId={0}&templateView=pirateFortress'.format(piracyCities[0]['id']))
params = {'view': "pirateFortress",
'activeTab': "tabCrew",
'cityId': piracyCities[0]['id'],
'position': 17,
'backgroundView': "city",
'currentCityId': piracyCities[0]['id'],
'templateView': "pirateFortress",
'actionRequest': actionRequest,
'ajax': 1}
html = session.post(params=params)
rta = re.search(r'\\"capturePoints\\":\\"(\d+)\\"', html)
capturePoints = int(rta.group(1))
if convertPerMission == 'all':
Expand Down

0 comments on commit 7e6bdd8

Please sign in to comment.