private void LoadTargetYearsDDL() { try { ddlTargetYear.Items.Clear(); SalesTarget target = new SalesTarget(); target.Where.Active.Value = 1; target.Where.Year.Value = DateTime.Now.Year; target.Where.Year.Operator = WhereParameter.Operand.GreaterThanOrEqual; target.Query.AddOrderBy(SalesTarget.ColumnNames.Year, WhereParameter.Dir.ASC); target.Query.Load(); if (target.RowCount > 0) { target.Rewind(); do { ddlTargetYear.Items.Add(new ListItem(target.Year.ToString(), target.ID.ToString())); } while (target.MoveNext()); } if (TargetID != -1) { ddlTargetYear.SelectedValue = TargetID.ToString(); } else { ddlTargetYear.SelectedIndex = 0; TargetID = int.Parse(ddlTargetYear.SelectedValue); } ddlTargetYear_SelectedIndexChanged(null, null); } catch (Exception ex) { //Logger.LogException(ex); } }
public override void OnGetBuffEffect() { base.OnGetBuffEffect(); Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("actor is not exist! actor id=" + TargetID.ToString()); return; } BuffInfo info = GameTable.BuffTableAsset.Lookup(BuffID); if (info == null) { Debug.LogWarning("buff is not exist! buff id=" + BuffID.ToString()); return; } IsNeedResultPass = true; if (actor.Type == ActorType.enNPC) {//npc不能潜行 Debug.LogWarning("npc can not sneak"); return; } //开始潜行 actor.StartSneak(BuffID); }
//取消潜行 void StopSneak() { Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("actor is not exist! actor id=" + TargetID.ToString()); return; } actor.StopSneak(); }
public override void OnRemoved(IResultControl control) { base.OnRemoved(control); Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("actor is not exist! actor id=" + TargetID.ToString()); return; } actor.ActionControl.RemoveAction(m_action); }
public bool Search(string str) { if (MinX.ToString().Contains(str) || MinY.ToString().Contains(str) || MinZ.ToString().Contains(str) || MaxX.ToString().Contains(str) || MaxY.ToString().Contains(str) || MaxZ.ToString().Contains(str) || TargetID.ToString().Contains(str) || Target_Type.ToString().Contains(str)) { return(true); } else { return(false); } }
/// <summary> /// Возвращает коллекцию параметров. /// </summary> public override Dictionary <string, string> GetParameters() { var parameters = base.GetParameters(); if (TargetID != 0) { parameters["target_id"] = TargetID.ToString(); } parameters["video_id"] = VideoID.ToString(); parameters["owner_id"] = OwnerID.ToString(); return(parameters); }
public override void OnRemoved(IResultControl control) { base.OnRemoved(control); Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("actor is not exist! actor id=" + TargetID.ToString()); return; } actor.CurrentTarget = null;//重新选择目标 actor.TempType = actor.Type; }
void FindSneak(bool isFind) { Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("actor is not exist! actor id=" + TargetID.ToString()); return; } if (actor.Type != ActorType.enNPC) { Debug.LogWarning("can not find sneak, type is " + actor.Type); return; } (actor.SelfAI as AINpc).IsFindSneak = isFind; }
/// <summary> /// Возвращает коллекцию параметров. /// </summary> public override Dictionary <string, string> GetParameters() { var parameters = base.GetParameters(); if (TargetID != 0) { parameters["target_id"] = TargetID.ToString(); } if (IsSingle) { parameters["album_id"] = AlbumID.ToString(); } else { parameters["album_ids"] = string.Join(",", AlbumIDs); } parameters["video_id"] = VideoID.ToString(); parameters["owner_id"] = OwnerID.ToString(); return(parameters); }
/// <summary> /// Возвращает словарь параметров. /// </summary> public override Dictionary <string, string> GetParameters() { var parameters = base.GetParameters(); if (SourceID > 0) { parameters["source_uid"] = SourceID.ToString(); } if (Order.Value == VKFriendsOrder.Random) { parameters["order"] = "random"; } if (IsSingle) { parameters["target_uid"] = TargetID.ToString(); } else { parameters["target_uids"] = String.Join(",", TargetIDs); } return(parameters); }
void NotifySkillSilence(bool isSilence) { Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("actor is not exist! actor id=" + TargetID.ToString()); return; } BuffInfo info = GameTable.BuffTableAsset.Lookup(BuffID); if (info == null) { Debug.LogWarning("buff is not exist! buff id=" + BuffID.ToString()); return; } foreach (var item in info.BuffResultList) { if (item.ID == (int)ClassID) { actor.NotifySkillSilence((int)item.ParamList[0], (int)item.ParamList[1], isSilence); } } }
public bool Search(string str) { if (RadiusValue.ToString().Contains(str) || RadiusType.ToString().Contains(str) || TargetID.ToString().Contains(str) || Target_Type.ToString().Contains(str)) { return(true); } else { return(false); } }
public override void OnGetBuffEffect() { base.OnGetBuffEffect(); Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("OnGetBuffEffect failed! actor is not exist! actor id=" + TargetID.ToString()); return; } BuffInfo info = GameTable.BuffTableAsset.Lookup(BuffID); if (info == null) { Debug.LogWarning("buff is not exist, id is " + BuffID); return; } foreach (var item in info.BuffResultList) { if (item.ID == (int)ClassID) { m_action = actor.ActionControl.AddAction(ControlMoveAction.SGetActionType()) as ControlMoveAction; if (null != m_action) { ControlMoveAction cmAction = m_action as ControlMoveAction; cmAction.Init((ControlMoveAction.ENAnimType)item.ParamList[0]); } else { Debug.LogWarning("add ControlMoveAction failed"); } } } }
public override void OnRemoved(IResultControl control) { base.OnRemoved(control); Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("OnGetBuffEffect failed! actor is not exist! actor id=" + TargetID.ToString()); return; } BuffInfo info = GameTable.BuffTableAsset.Lookup(BuffID); if (info == null) { Debug.LogWarning("OnGetBuffEffect failed! buff is not exist! buff id=" + BuffID.ToString()); return; } if (actor.Type == ActorType.enNPC) {//此buff效果只对npc生效 foreach (var item in info.BuffResultList) { if (item.ID == (int)ClassID) { switch ((ENFearType)item.ParamList[0]) { case ENFearType.enEscape: { //更改ai actor.SelfAI = m_selfAI; } break; } } } } }
public override void OnGetBuffEffect() { base.OnGetBuffEffect(); Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("OnGetBuffEffect failed! actor is not exist! actor id=" + TargetID.ToString()); return; } m_action = actor.ActionControl.AddAction(ControlAttackAction.SGetActionType()); if (null == m_action) { Debug.LogWarning("add ControlAttackAction failed, buff id is " + BuffID); } }
/// <summary> /// Returns the Job object as a string /// </summary> /// <returns></returns> public override string ToString() { return(Type + "," + TargetID.ToString() + "," + Priority.ToString() + "," + Args + "," + Assigned.ToString()); }
public override string[] ToArray() { return(new string[] { User?.Name ?? UserID.ToString(), Collection?.Name ?? TargetID.ToString(), Type }); }
public override void OnGetBuffEffect() { base.OnGetBuffEffect(); Actor actor = ActorManager.Singleton.Lookup(TargetID); if (null == actor) { Debug.LogWarning("OnGetBuffEffect failed! actor is not exist! actor id=" + TargetID.ToString()); return; } BuffInfo info = GameTable.BuffTableAsset.Lookup(BuffID); if (info == null) { Debug.LogWarning("OnGetBuffEffect failed! buff is not exist! buff id=" + BuffID.ToString()); return; } if (actor.Type == ActorType.enNPC) { //此buff效果只对npc生效 actor.CurrentTarget = null; //重新选择目标 actor.TempType = ActorType.enNPC_AllEnemy; } }