WantedQuestsEx.py 709 B

123456789101112131415161718192021222324252627282930
  1. from tasks.WantedQuests.config import CooperationType, WantedQuestsConfig
  2. def need_invite_vip(self):
  3. return True
  4. def get_invite_vip_name(self, ctype: CooperationType):
  5. if not self.fade_conf:
  6. return ""
  7. return self.fade_conf.get_invite_name(ctype)
  8. def next_run(self):
  9. pass
  10. def invite_success_callback(self, ctype: CooperationType, name: str):
  11. if not self.fade_conf:
  12. return
  13. self.fade_conf.update_invite_history(ctype, name)
  14. self.config.save()
  15. def get_config(self):
  16. config=WantedQuestsConfig()
  17. config.invite_friend_name="default"
  18. config.cooperation_only=True
  19. config.cooperation_type=self.fade_conf.get_cooperation_type_mask()
  20. return config