/// <summary> /// 加载活动怪 /// </summary> /// <param name="scene"></param> public static void LoadPartApcs(SceneBusiness scene, string partID) { foreach (SceneApc bb in m_sceneApcs.Values) { if (bb.SceneID == scene.ID && bb.SubType == partID) { bb.ResetApc(); m_activeApcs[bb.ID] = bb; scene.HaveApc = true; } } IList apcs = GetSceneApc(scene.ID); scene.CallAll(0, ClientCommand.RefreshApcR, new object[] { scene.ID, apcs }); }
/// <summary> /// 移除活动怪 /// </summary> /// <param name="scene"></param> public static void UnloadPartApcs(SceneBusiness scene, string partID) { bool haveAPc = false; foreach (SceneApc sb in m_activeApcs.Values) { if (sb.SceneID == scene.ID) { if (sb.SubType == partID) { SceneApc t; m_activeApcs.TryRemove(sb.ID, out t); } else { haveAPc = true; } } } scene.HaveApc = haveAPc; IList apcs = GetSceneApc(scene.ID); scene.CallAll(0, ClientCommand.RefreshApcR, new object[] {scene.ID, apcs }); }