static void InitEntityManager() { // DataService IDS_MonsterMap mapDs = new DS_MonsterMapImpl(); IDS_Character charDs = new DS_CharacterImpl(); IDS_Monster monsterDs = new DS_MonsterImpl(); IDS_Status statusDs = new DS_StatusImpl(); IDS_Skill skillDs = new DS_SkillImpl(); IDS_Mall mallDs = new DS_MallImpl(); IDS_Item itemDs = new DS_ItemImpl(); IDS_GroundItemMap gndItemDs = new DS_GroundItemMapImpl(); IDS_Mission misDs = new DS_MissionImpl(); // DataEntity DEM_Character charDem = new DEM_Character(charDs); DEM_Status statusDem = new DEM_Status(statusDs); DEM_Skill skillDem = new DEM_Skill(skillDs); DEM_MallItem mallItemDem = new DEM_MallItem(mallDs); DEM_Mission misDem = new DEM_Mission(misDs); DEM_Monster monDem = new DEM_Monster(monsterDs, mapDs); DEM_Item itemDem = new DEM_Item(itemDs, gndItemDs); // DynamicDataService var ddsImpl = new DynamicDataServiceImpl(); IDDS_User userDds = ddsImpl; IDDS_Character charDds = ddsImpl; IDDS_CharacterAttribute charAttrDds = ddsImpl; IDDS_CharacterWallet charWalletDds = ddsImpl; IDDS_CharacterVipCard charVipCardDds = ddsImpl; IDDS_Item itemDds = ddsImpl; IDDS_Skill skillDds = ddsImpl; IDDS_Mission misDds = ddsImpl; IDDS_MissionLog misLogDds = ddsImpl; IDDS_CombatEfct combatEfctDds = ddsImpl; IDDS_Mail mailDds = ddsImpl; IDDS_Notice noticeDds = ddsImpl; IDDS_Title titleDds = ddsImpl; IDDS_Shortcut shortcutDds = ddsImpl; // EntityManager EM_BossDamage.s_instance = new EM_BossDamage(); EM_Camp.s_instance = new EM_Camp(); EM_Character.s_instance = new EM_Character(charDem, charDds, charAttrDds); EM_Item.s_instance = new EM_Item(itemDem, itemDds); EM_Mail.s_instance = new EM_Mail(mailDds); EM_MallItem.s_instance = new EM_MallItem(mallItemDem); EM_Mission.s_instance = new EM_Mission(misDem, misDds, titleDds); EM_MissionLog.s_instance = new EM_MissionLog(misLogDds); EM_Monster.s_instance = new EM_Monster(monDem); EM_MonsterSkill.s_instance = new EM_MonsterSkill(); EM_Notice.s_instance = new EM_Notice(noticeDds); EM_Rank.s_instance = new EM_Rank(combatEfctDds); EM_Shortcut.s_instance = new EM_Shortcut(shortcutDds); EM_Sight.s_instance = new EM_Sight(); EM_Skill.s_instance = new EM_Skill(skillDem, skillDds); EM_Status.s_instance = new EM_Status(statusDem); EM_User.s_instance = new EM_User(userDds); EM_Wallet.s_instance = new EM_Wallet(charWalletDds, charVipCardDds); // EM init EntityManagerInitializer.Init(skillDem, monDem); }
public MissionFactory(DEM_Mission dem) { m_dem = dem; // 实例化所有 MTR 接口的实现类 var type = typeof(IMissionTargetReseter); var implTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()).Where(p => p.IsClass && type.IsAssignableFrom(p)); foreach (var implType in implTypes) { IMissionTargetReseter implObj = implType.GetConstructor(Type.EmptyTypes).Invoke(null) as IMissionTargetReseter; m_misTarReseterDict.Add(implObj.m_Type, implObj); } }
public EM_Mission(DEM_Mission dem, IDDS_Mission misDds, IDDS_Title titleDds) { m_dem = dem; m_fact = new MissionFactory(dem); m_misDds = misDds; m_titleDds = titleDds; // 初始任务加载 OccupationType[] ocpArr = new OccupationType[] { OccupationType.MAGE, OccupationType.ROGUE, OccupationType.TAOIST, OccupationType.WARRIOR }; var allMisDe = dem.GetAllCommonMission(); foreach (var ocp in ocpArr) { m_ocpInitMisIdDict.Add(ocp, new List <short> ()); } foreach (var mDe in allMisDe) { if (mDe.m_fatherIdList.Count == 0) { foreach (var ocp in ocpArr) { if ((ocp | mDe.m_occupation) != 0) { m_ocpInitMisIdDict[ocp].Add(mDe.m_id); } } } } var allTitleMis = dem.GetAllTitleMission(); foreach (var titleMis in allTitleMis) { m_titleMisIdList.Add(titleMis.m_id); } }
public void Reset(IMissionTarget resMt, short tarId, int progress, DEM_Mission dem) { var de = dem.GetMissionTargetChargeAdequately(tarId); (resMt as E_MissionTargetChargeAdequately).Reset(de, progress); }
public void Reset(IMissionTarget resMt, short tarId, int progress, DEM_Mission dem) { var de = dem.GetMissionTargetLevelUpSkill(tarId); (resMt as E_MissionTargetLevelUpSkill).Reset(de, progress); }
public void Reset(IMissionTarget resMt, short tarId, int progress, DEM_Mission dem) { var de = dem.GetMissionTargetGainItem(tarId); (resMt as E_MissionTargetGainItem).Reset(de, progress); }
public void Reset(IMissionTarget resMt, short tarId, int progress, DEM_Mission dem) { var de = dem.GetMissionTargetKillMonster(tarId); (resMt as E_MissionTargetKillMonster).Reset(de, progress); }
public void Reset(IMissionTarget resMt, short tarId, int progress, DEM_Mission dem) { (resMt as E_MissionTargetTalkToNpc).Reset(tarId, progress); }