Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
3927b9ba6b | |||
cd5c0b161f |
@ -4,8 +4,8 @@
|
||||
|
||||
__author__ = """Eriks Karls"""
|
||||
__email__ = 'eriks@72.lv'
|
||||
__version__ = '0.20.2.1'
|
||||
__commit_id__ = "6c8dbcd"
|
||||
__version__ = '0.20.2.2'
|
||||
__commit_id__ = "cd5c0b1"
|
||||
|
||||
from erepublik import classes, utils
|
||||
from erepublik.citizen import Citizen
|
||||
|
@ -565,6 +565,10 @@ class ErepublikProfileAPI(CitizenBaseAPI):
|
||||
data = dict(_token=self.token, rewardId=reward_id)
|
||||
return self.post("{}/main/weekly-challenge-collect-reward".format(self.url), data=data)
|
||||
|
||||
def _post_main_profile_update(self, action: str, params: str):
|
||||
data = {"action": action, "params": params, "_token": self.token}
|
||||
return self.post(f"{self.url}/main/profile-update", data=data)
|
||||
|
||||
|
||||
class ErepublikTravelAPI(CitizenBaseAPI):
|
||||
def _post_main_travel(self, check: str, **kwargs) -> Response:
|
||||
|
@ -1669,6 +1669,9 @@ class CitizenMilitary(CitizenTravel):
|
||||
pass
|
||||
elif r_json.get("message") == "NOT_ENOUGH_WEAPONS":
|
||||
self.set_default_weapon(battle_id, zone_id)
|
||||
elif r_json.get("message") == "FIGHT_DISABLED":
|
||||
self._post_main_profile_update('options', params='{"optionName":"enable_web_deploy","optionValue":"off"}')
|
||||
self.set_default_weapon(battle_id, zone_id)
|
||||
else:
|
||||
if r_json.get("message") == "UNKNOWN_SIDE":
|
||||
self._rw_choose_side(battle_id, side_id)
|
||||
|
@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.20.2.1
|
||||
current_version = 0.20.2.2
|
||||
commit = True
|
||||
tag = True
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.?(?P<dev>\d+)?
|
||||
|
Reference in New Issue
Block a user