本文整理汇总了Python中core.formation.Formation.working_staff_oids方法的典型用法代码示例。如果您正苦于以下问题:Python Formation.working_staff_oids方法的具体用法?Python Formation.working_staff_oids怎么用?Python Formation.working_staff_oids使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.formation.Formation
的用法示例。
在下文中一共展示了Formation.working_staff_oids方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: force_load_staffs
# 需要导入模块: from core.formation import Formation [as 别名]
# 或者: from core.formation.Formation import working_staff_oids [as 别名]
def force_load_staffs(self, send_notify=False):
from core.staff import StaffManger, Staff
from core.formation import Formation
from core.unit import UnitManager
from core.talent import TalentManager
from core.collection import Collection
from core.party import Party
from core.inspire import Inspire
from core.union import Union
from core.bag import Bag
self.formation_staffs = []
sm = StaffManger(self.server_id, self.char_id)
fm = Formation(self.server_id, self.char_id)
um = UnitManager(self.server_id, self.char_id)
ins = Inspire(self.server_id, self.char_id)
staffs = sm.get_staffs_data()
in_formation_staffs = fm.in_formation_staffs()
staff_objs = {}
""":type: dict[str, core.staff.Staff]"""
for k, v in staffs.items():
staff_objs[k] = Staff(self.server_id, self.char_id, k, v)
for k, v in staff_objs.iteritems():
if k in in_formation_staffs:
self.formation_staffs.append(v)
v.policy = in_formation_staffs[k]['policy']
v.formation_position = in_formation_staffs[k]['position']
unit_id = in_formation_staffs[k]['unit_id']
if unit_id:
v.set_unit(um.get_unit_object(unit_id))
working_staff_oids = fm.working_staff_oids()
for k in in_formation_staffs:
staff_objs[k].check_qianban(working_staff_oids)
staff_objs[k].add_self_talent_effect(self)
talent_effects_1 = TalentManager(self.server_id, self.char_id).get_talent_effects()
talent_effects_2 = Collection(self.server_id, self.char_id).get_talent_effects()
talent_effects_3 = fm.get_talent_effects()
talent_effects_4 = Party(self.server_id, self.char_id).get_talent_effects()
talent_effects_5 = Union(self.server_id, self.char_id).get_union_skill_talent_effects()
self.add_talent_effects(talent_effects_1)
self.add_talent_effects(talent_effects_2)
self.add_talent_effects(talent_effects_3)
self.add_talent_effects(talent_effects_4)
self.add_talent_effects(talent_effects_5)
config_inspire_level_addition, config_inspire_step_addition = ins.get_addition_config()
bag = Bag(self.server_id, self.char_id)
for _, v in staff_objs.iteritems():
v.config_inspire_level_addition = config_inspire_level_addition
v.config_inspire_step_addition = config_inspire_step_addition
v.calculate(bag=bag, um=um)
v.make_cache()
if send_notify:
self.send_notify()
in_formation_staff_ids = fm.in_formation_staffs().keys()
sm.send_notify(ids=in_formation_staff_ids)